/**
 * システム共通CSS
 *
 * デザインサンプル(doc/10_デザインサンプル)のCSSと競合しないよう、
 * システム機能専用のスタイルをここに定義する。
 */

/* ============================================
   プレースホルダの色（common.cssを上書き）
   ============================================ */

h2 {
    margin-top: 1em;
}

input::placeholder,
textarea::placeholder {
    color: #bdbdbd !important;
}

/* selectのdisabled時の色（ロック状態を明確にする） */
select:disabled {
    background-color: #f5f5f5 !important;
    color: #666666 !important;
    border-color: #e0e0e0 !important;
}

/* ============================================
   メッセージ表示エリア
   ============================================ */

.message-area {
    margin: 20px 0;
    padding: 15px;
    border-radius: 4px;
}

.message-area p {
    margin: 0;
}

.message-area.success {
    background-color: #D8F0E1;
    border: 1px solid #82C49B;
    color: #005E45;
}

.message-area.error {
    background-color: #FFF5EB;
    border: 1px solid #F0A33A;
    color: #8C2F0A;
}

.message-area.warning {
    background-color: #FFF9E6;
    border: 1px solid #FFD700;
    color: #8B6914;
}

.message-area.info {
    background-color: #E3F2FD;
    border: 1px solid #2196F3;
    color: #0D47A1;
}

.message-area.neutral {
    background-color: #F5F5F5;
    border: 1px solid #9E9E9E;
    color: #424242;
}

.message-area ul {
    margin: 10px 0 0 20px;
    padding: 0;
}

.message-area li {
    margin: 5px 0;
}

/* ============================================
   ボタンのmargin-block-end無効化
   ============================================ */

/**
 * 一覧等でボタン間隔が冗長なため
 * common.cssの.buttonに設定されているmargin-block-endを
 * ログイン済みユーザーの画面では無効化する
 * （公開ページの未ログイン状態,マイページトップでは適用しない）
 */
body.logged-in .button {
    margin-block-end: 0 !important;
}

/* ============================================
   ボタン幅の自動調整
   ============================================ */

/**
 * common.cssの.normalButton等に設定されている width: min(100%, 360px) を
 * 打ち消して、文字数に応じた幅にする
 */
.button.autoWidth {
    width: auto !important;
}

/* ============================================
   プロフィール未完了時のメニュー無効化
   ============================================ */

/**
 * プロフィール未完了時にis-disabledクラスが付与されたメニュー項目を無効化
 * - サイドバーナビゲーション（PC）
 * - SPメニュー（dashboardNavi）
 */
.dashboardSideberNavi ul li.is-disabled a,
#dashboardNavi ul li.is-disabled a {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* ホバー時の背景色変更を無効化 */
@media (any-hover: hover) {

    .dashboardSideberNavi ul li.is-disabled a:hover,
    #dashboardNavi ul li.is-disabled a:hover {
        background-color: transparent;
        border-radius: 0;
    }
}

/* ============================================
   統合ボタンスタイル
   ============================================ */

/**
 * システム用ボタンスタイル
 * 共通CSSの btn-primary などを踏襲
 *
 * NOTE: #contents内にスコープを限定してfooterのボタンに影響しないようにする
 */

/* 1. 角丸ボタン（緑メイン） */
#contents .sys-btn-primary {
    display: inline-block;
    position: relative;
    padding: 1em 2em;
    min-width: 8em;
    text-align: center;
    text-decoration: none;
    font-weight: 700;
    border-radius: 3em;
    color: #fff;
    background-color: var(--color-main, #007D5C);
    border: 2px solid var(--color-main, #007D5C);
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1em;
}

#contents .sys-btn-primary:hover {
    background-color: var(--color-main-dark, #005E45);
    border-color: var(--color-main-dark, #005E45);
    opacity: 0.9;
}

#contents .sys-btn-primary:focus {
    color: #fff;
    background-color: var(--color-main-dark, #005E45);
    border-color: var(--color-main-dark, #005E45);
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

#contents .sys-btn-primary:disabled,
#contents .sys-btn-primary.sys-btn-disabled {
    background: #ccc;
    border-color: #ccc;
    cursor: not-allowed;
    pointer-events: none;
    opacity: 1;
}

/* 1-2. 角丸ボタン（水色バリエーション） */
#contents .sys-btn-primary-cyan {
    display: inline-block;
    position: relative;
    padding: 1em 2em;
    min-width: 8em;
    text-align: center;
    text-decoration: none;
    font-weight: 700;
    border-radius: 3em;
    color: #fff;
    background-color: #3498db !important;
    border: 2px solid #3498db !important;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1em;
}

#contents .sys-btn-primary-cyan:hover {
    background-color: #2980b9 !important;
    border-color: #2980b9 !important;
    opacity: 0.9;
}

#contents .sys-btn-primary-cyan:focus {
    color: #fff;
    background-color: #2980b9 !important;
    border-color: #2980b9 !important;
    outline: 2px solid #3498db !important;
    outline-offset: 2px;
}

#contents .sys-btn-primary-cyan:disabled {
    background: #ccc;
    border-color: #ccc;
    cursor: not-allowed;
    opacity: 1;
}

/* 2. セカンダリボタン（白背景+緑枠） */
#contents .sys-btn-secondary {
    display: inline-block;
    position: relative;
    padding: 1em 2em;
    min-width: 8em;
    text-align: center;
    text-decoration: none;
    font-weight: 700;
    border-radius: 3em;
    background-color: #fff;
    color: var(--color-main, #007D5C);
    border: 2px solid var(--color-main, #007D5C);
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1em;
}

#contents .sys-btn-secondary:hover {
    background-color: #f8f9fa;
}

#contents .sys-btn-secondary:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* 3. 危険ボタン（角丸、赤） */
#contents .sys-btn-danger {
    display: inline-block;
    position: relative;
    padding: 1em 2em;
    text-align: center;
    text-decoration: none;
    font-weight: 700;
    border-radius: 3em;
    background-color: #e74c3c;
    color: #fff;
    border: 2px solid #e74c3c;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1em;
}

#contents .sys-btn-danger:hover,
#contents .sys-btn-submit:hover {
    background-color: #c0392b;
    border-color: #c0392b;
}

#contents .sys-btn-danger:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* 4. キャンセルボタン（白背景+緑枠、sys-btn-secondaryと同じ） */
#contents .sys-btn-cancel {
    display: inline-block;
    position: relative;
    padding: 1em 2em;
    min-width: 8em;
    text-align: center;
    text-decoration: none;
    font-weight: 700;
    border-radius: 3em;
    background-color: #fff;
    color: var(--color-main, #007D5C);
    border: 2px solid var(--color-main, #007D5C);
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1em;
}

#contents .sys-btn-cancel:hover {
    background-color: #f8f9fa;
}

#contents .sys-btn-cancel:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* 小さめボタン */
#contents .sys-btn-middle {
    padding: 0.5em 1em !important;
    margin-bottom: 0.5em !important;
}

/* 行内(項目脇)ボタン */
#contents .sys-btn-inline {
    padding: 0.5em 1em !important;
    margin: 0 !important;
}

/* 中サイズタブボタン */
#contents .sys-tab-btn-middle {
    padding: 0.5em 1em !important;
    font-size: 0.9em !important;
}

/* 5. トグルボタン（角ばった、タブ切り替え用） */
#contents .sys-tab-btn {
    display: inline-block;
    padding: 0.75em 1.5em;
    text-align: center;
    font-weight: 700;
    background-color: #ecf0f1;
    color: #2c3e50;
    border: 2px solid #ecf0f1;
    cursor: pointer;
    transition: all 0.3s ease;
}

#contents .sys-tab-btn.active {
    background-color: var(--color-main, #007D5C);
    color: #fff;
    border-color: var(--color-main, #007D5C);
}

#contents .sys-tab-btn:hover {
    background-color: #d5dbdb;
    border-color: #d5dbdb;
}

#contents .sys-tab-btn.active:hover {
    background-color: var(--color-main-dark, #005E45);
    border-color: var(--color-main-dark, #005E45);
}

/* TODO AD01の一覧で使用 */
#contents .sys-action-btn-md {
    padding: 10px 20px;
    font-size: 14px;
}

/* 7. 角丸10pxボタン（common.cssの.homeButtonベース） */
/* 基本スタイル */
#contents .sys-btn-round10 {
    display: inline-block;
    position: relative;
    padding-block: 1em;
    padding-inline: 2em;
    text-align: center;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 700;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* 白背景+緑枠バリエーション */
#contents .sys-btn-round10-outline {
    color: var(--color-main, #007D5C);
    background-color: var(--color-white, #fff);
    border: 2px solid var(--color-main, #007D5C);
}

#contents .sys-btn-round10-outline:hover {
    background-color: #f8f9fa;
}

#contents .sys-btn-round10-outline:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* 白背景+水色枠バリエーション */
#contents .sys-btn-round10-outline-cyan {
    color: #3498db;
    background-color: var(--color-white, #fff);
    border: 2px solid #3498db;
}

#contents .sys-btn-round10-outline-cyan:hover {
    background-color: #f8f9fa;
}

#contents .sys-btn-round10-outline-cyan:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* 8. フォーム要素のフォーカス */
#contents input:focus,
#contents select:focus,
#contents textarea:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* タブフィルタのレイアウト */
.sys-tab-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* アコーディオン */
.sys-accordion {
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #f9f9f9;
}

.sys-accordion-summary {
    padding: 12px 15px;
    cursor: pointer;
    font-weight: bold;
    color: #2c3e50;
    user-select: none;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sys-accordion-summary::marker,
.sys-accordion-summary::-webkit-details-marker {
    display: none;
}

.sys-accordion-icon {
    font-size: 12px;
    color: #666;
    transition: transform 0.3s;
}

.sys-accordion[open] .sys-accordion-icon {
    transform: rotate(90deg);
}

.sys-accordion-content {
    padding: 15px;
    background: white;
}

/* アコーディオン内のボタングループ */
.sys-filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* 一覧アイテム共通 */
.sys-list-item {
    padding: 10px 0;
    border-bottom: 1px solid #ddd;
}

.sys-list-item.last {
    border-bottom: none;
}

.sys-ad-approval-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.sys-ad-approval-info {
    flex: 1;
}

.sys-ad-approval-badges {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.sys-ad-company-name {
    font-size: 18px;
}

.sys-ad-approval-detail>div {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.sys-ad-approval-detail>div:last-child {
    margin-bottom: 0;
}

.sys-ad-approval-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* ステータスバッジ */
.sys-ad-status-badge {
    padding: 4px 12px;
    color: white;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
}

.sys-ad-status-badge.status-pending {
    background: #ff9800;
}

.sys-ad-status-badge.status-approved {
    background: #27ae60;
}

.sys-ad-status-badge.status-revision {
    background: #e74c3c;
}

.sys-ad-status-badge.status-unknown {
    background: #95a5a6;
}

/* 種別バッジ */
.sys-ad-type-badge {
    padding: 4px 12px;
    background: #9b59b6;
    color: white;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
}

.sys-event-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* 追加のステータスバッジ */
.sys-ad-status-badge.status-publish {
    background: #27ae60;
}

.sys-ad-status-badge.status-draft {
    background: #95a5a6;
}

.sys-ad-status-badge.status-archived {
    background: #7f8c8d;
}

/* 予約枠設定専用 */
.sys-slot-window-select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-width: 300px;
}

.sys-slot-control-row {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.sys-slot-date-range {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sys-slot-date-range input {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* 予約一覧専用 */
.sys-reservation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.sys-reservation-date-time {
    font-weight: bold;
    font-size: 16px;
    color: #2c3e50;
}

.sys-reservation-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sys-reservation-actions {
    display: flex;
    gap: 10px;
}

/* 追加のステータスバッジ（予約用） */
.sys-ad-status-badge.status-reserved {
    background: #3498db;
}

.sys-ad-status-badge.status-completed {
    background: #27ae60;
}

.sys-ad-status-badge.status-cancelled {
    background: #95a5a6;
}

.sys-ad-status-badge.status-no_show {
    background: #e74c3c;
}

.sys-ad-status-badge.status-sent {
    background: #27ae60;
}

.sys-ad-status-badge.status-scheduled {
    background: #3498db;
}

/* フィルタコントロール（すべてボタン+適用ボタン） */
.sys-filter-controls {
    margin-bottom: 15px;
    display: flex;
    gap: 10px;
    align-items: center;
}

/* フィルタボタン群 */
.sys-filter-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* 通知アイテム */
.sys-notification-item {
    padding: 15px;
    margin-bottom: 12px;
    border: 2px solid #27ae60;
    border-radius: 4px;
    background: white;
}

.sys-notification-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 10px;
    gap: 15px;
}

.sys-notification-date-time {
    font-weight: bold;
    font-size: 14px;
    color: #666;
    white-space: nowrap;
}

.sys-notification-subject {
    color: #444;
    flex: 1;
}

.sys-notification-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.sys-notification-info {
    display: flex;
    gap: 20px;
    color: #666;
    font-size: 14px;
    flex: 1;
}

.sys-notification-actions {
    display: flex;
    gap: 10px;
}

/* 4. アイテム操作ボタン（編集・削除・詳細） */
/* 共通スタイル */
#contents .sys-item-btn {
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 700;
    border: none;
    border-radius: 3em;
    color: white;
    cursor: pointer;
    transition: background-color 0.2s;
    text-decoration: none;
    display: inline-block;
}

/* 編集ボタン（グレー */
#contents .sys-edit-btn {
    background: rgb(108, 117, 125);
    border-color: rgb(108, 117, 125);
}

#contents .sys-edit-btn:hover {
    background: rgb(108, 117, 125);
    border-color: rgb(108, 117, 125);
}

/* 削除ボタン（赤） */
#contents .sys-delete-btn {
    background: #dc3545;
    border-color: #dc3545;
}

#contents .sys-delete-btn:hover {
    background: #c82333;
    border-color: #dc3545;
}

/* 詳細ボタン（青） */
#contents .sys-detail-btn {
    background: #3498db;
    border-color: #3498db;
}

#contents .sys-detail-btn:hover {
    background: #2980b9;
    border-color: #3498db;
}

/* コピーボタン（赤） */
#contents .sys-copy-btn {
    background: #e74c3c;
    border-color: #e74c3c;
}

#contents .sys-copy-btn:hover {
    background: #c0392b;
    border-color: #e74c3c;
}

/* ========================================
   レスポンシブ対応：ボタン
   ======================================== */
@media (max-width: 768px) {

    #contents .sys-btn-primary,
    #contents .sys-btn-secondary,
    #contents button[type="submit"] {
        min-width: 6em;
    }
}

/* ========================================
   フォームグループ：下線非表示
   ======================================== */
.formGroup.no-border {
    border-bottom: none !important;
}

.formGroupInner.for-filter {
    flex-direction: unset;
}

.formGroupInner.for-filter .flex {
    display: flex;
    gap: 20px;
}

.formGroupInner.for-filter .label {
    min-width: 8em;
}

/* ========================================
   郵便番号グループ
   ======================================== */
.postal-code-group .sub-label {
    margin-top: 10px;
}

.postal-code-group .input-group {
    align-items: stretch;
}

.postal-code-group .input-group input {
    max-width: 200px;
    flex: 0 0 auto;
}

.postal-code-group .input-group button {
    flex-shrink: 0;
    white-space: nowrap;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    border-radius: 3em;
    font-weight: 700;
}

/* ========================================
   フォームフィールド
   ======================================== */

.form-field {
    margin-bottom: 20px;
}

.form-field label,
.sub-label {
    display: block;
    margin: 0.5em 1em 0.5em 0;
    font-weight: bold;
}

.form-field input[type="text"],
.form-field input[type="tel"],
.form-field input[type="email"],
.form-field input[type="url"],
.form-field input[type="number"],
.form-field input[type="date"],
.form-field input[type="time"],
.form-field textarea,
.form-field select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}

.form-field input[type="date"],
.form-field input[type="time"] {
    width: 11em;
}

.form-field textarea {
    resize: vertical;
}

.form-field input[type="text"]:focus,
.form-field input[type="tel"]:focus,
.form-field input[type="email"]:focus,
.form-field input[type="url"]:focus,
.form-field input[type="number"]:focus,
.form-field input[type="date"]:focus,
.form-field input[type="time"]:focus,
.form-field textarea:focus,
.form-field select:focus {
    border-color: #3498db;
}

/* 読み取り専用フィールド */
input[type="text"][readonly],
input[type="tel"][readonly],
input[type="email"][readonly],
input[type="url"][readonly],
input[type="number"][readonly],
input[type="date"][readonly],
input[type="time"][readonly],
textarea[readonly],
input[type="text"][disabled],
input[type="tel"][disabled],
input[type="email"][disabled],
input[type="url"][disabled],
input[type="number"][disabled],
input[type="date"][disabled],
input[type="time"][disabled],
textarea[disabled] {
    background: #f5f5f5 !important;
    border-color: #e0e0e0 !important;
    cursor: not-allowed;
}

/* 必須マーカーの左余白 */
.textBackRed {
    margin-left: 0.5em;
}

/* h3内の必須マーカーが縦に潰れないようにする */
h3 .textBackRed,
h3 .required {
    margin-left: 8px;
    vertical-align: middle;
}

/* h3のline-heightを必須マーカーの高さに対応させる */
/* common.cssの main h3:not([class]):not(.nodecoHeading) { display: grid } を上書き */
main h3:not([class]):not(.nodecoHeading):has(.textBackRed),
main h3:not([class]):not(.nodecoHeading):has(.required) {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.hint {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

/* エリア・項目グループ表示 */
.area-group {
    margin-bottom: 15px;
}

.area-group-label {
    margin-bottom: 8px;
    font-weight: bold;
}

/* フロー表示（市町村選択、月選択等） */
.area-children {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.area-child-label {
    margin-right: 1em;
}

/* 読み取り専用表示フィールド */
.readonly-field {
    background-color: #f5f5f5;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* 数値入力（短い） */
.form-field input.input-number-short {
    width: 100px;
    display: inline-block;
}

/* ファイル入力（非表示） */
.file-input-hidden {
    display: none;
}

/* ========================================
   テーブルpadding-inline調整
   ======================================== */
.table-padding-1em table th,
.table-padding-1em table td {
    padding-inline: 1.0em !important;
}

/**
 * システム共通CSS
 * 求職者・企業担当者・管理者で共通利用するスタイル
 */

/* ==================== 動的アイテム管理 ==================== */

/* 動的アイテムコンテナ */
.dynamic-item {
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 15px;
}

/* 動的アイテムヘッダー */
.dynamic-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.dynamic-item-number {
    font-weight: bold;
    font-size: 14px;
    color: #333;
}

.dynamic-item-actions {
    display: flex;
    gap: 8px;
}

/* 動的アイテムコンテンツ */
.dynamic-item-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ロック状態のスタイル - data属性で機能制御 */
/* 動的アイテム、連絡先マスターなど、複数の画面で共通使用 */
.dynamic-item-content[data-locked] input[type="text"],
.dynamic-item-content[data-locked] input[type="url"],
.dynamic-item-content[data-locked] input[type="email"],
.dynamic-item-content[data-locked] input[type="tel"],
.dynamic-item-content[data-locked] textarea,
.contact-content[data-locked] input[type="text"],
.contact-content[data-locked] input[type="email"],
.contact-content[data-locked] input[type="tel"] {
    background: #f5f5f5 !important;
    border-color: #e0e0e0 !important;
}

/* ロック状態ではplaceholderを非表示 */
.dynamic-item-content[data-locked] input[type="text"]::placeholder,
.dynamic-item-content[data-locked] input[type="url"]::placeholder,
.dynamic-item-content[data-locked] textarea::placeholder {
    color: transparent;
}

/* 追加ボタン */
.add-item-btn {
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 700;
    border: none;
    border-radius: 3em;
    background: #28a745;
    color: white;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-bottom: 10px;
}

.add-item-btn:hover {
    background: #218838;
}

.add-item-btn:disabled {
    background: #6c757d;
    border-color: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .dynamic-item-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .dynamic-item-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* ========================================
   2カラムレイアウト
   ======================================== */

/* 公開開始日・終了日など、2つの項目を並べるための2カラムレイアウト */
.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

@media (max-width: 768px) {
    .form-row-2 {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   フローレイアウト（左寄せ、1em間隔）
   ======================================== */

/* 公開開始日・終了日など、項目を左寄せで並べるためのフローレイアウト */
.form-flow-1em {
    display: flex;
    flex-wrap: wrap;
    gap: 1em;
}

/* ========================================
   フォームセクション間のマージン
   ======================================== */

/* セクション間の間隔を設定 */
.sys-form-section {
    margin-bottom: 40px;
}

/* ========================================
   セクション見出し
   ======================================== */

/* セクション見出し（下線付き） */
.sys-section-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #2c3e50;
    border-bottom: 2px solid #2c3e50;
    padding-bottom: 8px;
}

/* ========================================
   コンテンツエリアの最小高さ
   ======================================== */

/**
 * コンテンツの高さが低い場合にサイドバーが詰まる問題を修正
 */
@media print, screen and (min-width: 1024px) {
    #contents {
        min-height: 620px;
    }
}


/* ============================================
   残枠/定員 表示色
   ============================================ */

/* 残枠10%以下: 黄色 */
.capacity-low {
    color: #b8860b;
    font-weight: bold;
}

/* 満員: 赤 */
.capacity-full {
    color: #e74c3c;
    font-weight: bold;
}

/* ============================================
   文字カウンター
   ============================================ */

/**
 * テキストエリア等の文字数カウンター表示
 *
 * 使用例:
 * <textarea data-char-counter="#my-count" maxlength="200"></textarea>
 * <div class="char-count"><span id="my-count">0</span>/200文字</div>
 */
.char-count {
    text-align: right;
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

/* 上限超過時の警告色 */
.char-count.is-over {
    color: #e74c3c;
}

/* ========================================
   添付ファイル・画像アップロード共通
   ======================================== */

/* 添付アイテムグリッドコンテナ */
.attachment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

/* 添付アイテムカード（画像・ファイル共通） */
.attachment-card {
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 10px;
    position: relative;
}

/* 添付画像プレビュー */
.attachment-card .attachment-preview-img {
    width: 100%;
    height: auto;
    max-height: 150px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 10px;
}

/* 添付アイテム内タイトル入力 */
.attachment-card .attachment-title-input {
    width: 100%;
    padding: 5px;
    border: 1px solid #bdc3c7;
    border-radius: 4px;
    margin-bottom: 5px;
}

/* 添付アイテム削除ボタン（丸×ボタン） */
.attachment-card .attachment-remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
}

/* ファイルアイコン */
.attachment-card .attachment-file-icon {
    font-size: 40px;
    text-align: center;
    margin-bottom: 10px;
}

/* ファイル名表示 */
.attachment-card .attachment-file-name {
    font-size: 12px;
    color: #666;
    text-align: center;
    word-break: break-all;
    margin-bottom: 10px;
}

/* アップロード追加ボタンエリア */
.attachment-add-area {
    border: 2px dashed #bdc3c7;
    border-radius: 4px;
    padding: 40px 10px;
    text-align: center;
    cursor: pointer;
    background: #f8f9fa;
}

/* アップロードトリガーボタン（+記号） */
.attachment-add-area .attachment-add-trigger {
    background: none;
    border: none;
    font-size: 40px;
    color: #3498db;
    cursor: pointer;
    line-height: 1;
}

/* アップロードラベル */
.attachment-add-area .attachment-add-label {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}
