/*
 * app.css — 全站唯一自訂樣式檔
 *
 * 使用方式：
 *   所有頁面透過 fragments/layout.html 的 head fragment 自動引入，
 *   不需要在個別頁面重複 <link>。
 *
 * 注意事項：
 *   - Bootstrap 5.3 的 class（btn、card、badge…）直接在 HTML 用就好，不要在這裡重寫。
 *   - 需要微調元件樣式，在對應區塊加規則即可，不要新增第二個 css 檔案。
 *   - 顏色變數如果越來越多，可以在最上方加 :root { --primary: #3b6fd4; } 統一管理。
 */

/* ── 全域 ─────────────────────────────────────── */
body {
    background: #f5f6fa;
}

/* ── 側邊欄 ───────────────────────────────────── */
.sidebar {
    min-height: 100vh;
    background: #1e2a3a;
    width: 220px;
    position: fixed;
    top: 0;
    left: 0;
}

.sidebar .logo {
    padding: 24px 20px 16px;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    border-bottom: 1px solid #2d3d50;
}

/* 帳號頭像：消除 Bootstrap Icons 預設的 vertical-align:-.125em 下沉，讓字形與名字置中對齊 */
.sidebar .identity-avatar::before {
    vertical-align: middle;
}

.sidebar .nav-section {
    color: #5a7a9a;
    font-size: .75rem;
    padding: 16px 20px 4px;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.sidebar .nav-link {
    color: #a8b8c8;
    padding: 10px 20px;
    font-size: .9rem;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    color: #fff;
    background: #2d3d50;
    border-radius: 6px;
    margin: 0 8px;
    padding: 10px 12px;
}

/* ── 頂部列 ───────────────────────────────────── */
.topbar {
    background: #fff;
    border-bottom: 1px solid #e8eaf0;
    padding: 12px 32px;
    margin-left: 220px;
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ── 主內容區 ─────────────────────────────────── */
.main-content {
    margin-left: 220px;
    padding: 28px 32px;
}

/* ── Card ─────────────────────────────────────── */
.card {
    border: none;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .08);
    border-radius: 10px;
}

.card-header {
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    font-weight: 600;
}

/* ── 按鈕 ─────────────────────────────────────── */
.btn-primary {
    background: #3b6fd4;
    border-color: #3b6fd4;
}

.btn-primary:hover {
    background: #2f5bb8;
    border-color: #2f5bb8;
}

/* ── 表格 ─────────────────────────────────────── */
.table th {
    background: #f8f9fb;
    font-size: .85rem;
    font-weight: 600;
}

.btn-xs {
    padding: 0.15rem 0.4rem;
    font-size: .75rem;
    border-radius: 4px;
}
.btn-xs.active {
    background-color: #6c757d;
    color: #fff;
}
