/* 營帳管理 subbar：年/月工具列的間距與排列 */
#campsContent{
    margin-top: 32px;
}
#campsToolbar {
    margin-bottom: 8px;           /* 與月份工具列的垂直間距 */
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
#campsToolbarMonths {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* 年、月按鈕通用尺寸與外觀（避免擠在一起） */
#campsToolbar .btn-year,
#campsToolbarMonths .btn-month {
    border: 1px solid #334155;
    color: #e5e7eb;
    background: #111827;
    border-radius: 8px;
    padding: 8px 12px;      /* 稍加寬手感 */
    cursor: pointer;
    white-space: nowrap;
    min-width: 64px;        /* 關鍵：即使在 flex 下也至少這麼寬 */
}

/* active 狀態（由 JS 切換 class active） */
#campsToolbar .btn-year.active,
#campsToolbarMonths .btn-month.active {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

/* disabled 樣式（HTML button disabled 屬性即可觸發） */
#campsToolbar .btn-year:disabled,
#campsToolbarMonths .btn-month:disabled {
    opacity: .45;
    cursor: not-allowed;     /* 顯示禁止符號 */
    filter: grayscale(.1);
}

/* 既有通用按鈕規則，縮小為桌面預設更窄（手機會被下方 media 覆蓋） */
#campsToolbarMonths .btn-month {
    padding: 6px 10px;
    min-width: 40px;        /* 通用更小的基準 */
}

/* 營帳卡片樣式調整 */
.camp-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
}

/* 左側群組：文字靠左、字體加大 */
.camp-left {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    font-size: 15px;          /* 加大一些 */
    color: #111827;
}
.camp-date {
    font-weight: 800;         /* 日期更醒目 */
    letter-spacing: .3px;
    white-space: nowrap;
}
.camp-status {
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    border: 1px solid;
    white-space: nowrap;
}
.camp-status.open {         /* 開放：綠色 */
    color: #065f46;
    background: #ecfdf5;
    border-color: #a7f3d0;
}
.camp-status.close {        /* 關閉：紅色 */
    color: #991b1b;
    background: #fef2f2;
    border-color: #fecaca;
}

/* 左側群組：文字靠左、字體加大 */
.camp-left {
    display: flex;
    align-items: center;
    gap: 16px;           /* 與狀態之間間隔稍大 */
    min-width: 0;
    font-size: 16px;     /* 再大一點 */
    color: #111827;
}
.camp-status {
    padding: 3px 12px;
    border-radius: 999px;
    font-size: 13px;     /* 狀態字再大一點 */
    font-weight: 800;
    border: 1px solid;
    white-space: nowrap;
}

/* 右側：price/slot 靠左，與左側有間隔；編輯鈕靠最右 */
.camp-right {
    display: flex;
    align-items: center;
    gap: 18px;           /* 提高區塊間距 */
    margin-left: 24px;   /* 與左側整體拉開一些 */
}
.camp-amount {
    min-width: 110px;
    text-align: center;    /* 靠左 */
    color: #111827;
    font-weight: 700;
}
.camp-slot {
    min-width: 100px;
    text-align: center;    /* 靠左 */
    color: #475569;
    font-weight: 700;
}

/* 編輯按鈕加寬並靠右更醒目 */
.btn-edit {
    border: 1px solid #334155;
    color: #0ea5e9;
    background: #f0f9ff;
    border-radius: 8px;
    padding: 8px 16px;   /* 加寬 */
    min-width: 96px;     /* 固定較寬 */
    cursor: pointer;
    font-weight: 800;
    white-space: nowrap;
    text-align: center;
}
.btn-edit:hover {
    background: #e0f2fe;
    border-color: #1e40af;
}

/* 手機置底時：年、月按鈕平均滿版 */
@media (max-width: 600px) {

    #campsContent{
        margin-top: 0;
        padding-bottom: 120px;
    }

    #campsToolbar, #campsToolbarMonths {
        display: grid;
        gap: 6px;
        width: 100%;
    }
    /* 年份：自動填滿等分（避免擠在一起） */
    #campsToolbar {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
    /* 月份：6 欄等分，兩行滿版 */
    #campsToolbarMonths {
        grid-template-columns: repeat(6, 1fr);
    }
    #campsToolbar .btn-year,
    #campsToolbarMonths .btn-month {
        width: 100%;
        justify-content: center;
    }

    .camp-row {
        padding: 10px 12px;
    }
    .camp-left {
        gap: 10px;          /* 左側欄位彼此更緊 */
        font-size: 14px;    /* 整體字級小一點 */
    }
    .camp-date {
        letter-spacing: 0;  /* 日期字距更緊 */
        font-weight: 700;   /* 稍降粗細避免過大占位 */
        white-space: nowrap;
    }
    .camp-status {
        padding: 2px 8px;   /* 膠囊縮窄 */
        font-size: 12px;
        font-weight: 700;
    }
    .camp-right {
        gap: 12px;          /* 右側區塊間距縮小 */
        margin-left: 12px;  /* 與左側距離縮小 */
    }
    .camp-amount {
        min-width: 96px;    /* PRICE 欄縮窄 */
        font-size: 13px;
    }
    .camp-slot {
        min-width: 84px;    /* SLOT 欄縮窄 */
        font-size: 12.5px;
    }
    .btn-edit {
        padding: 6px 12px;  /* 編輯鈕也更精簡 */
        min-width: 84px;
        font-size: 12.5px;
    }
}