/* ── LinSar CMS — Bulma Theme ───────────────────────────────────────────── */

/* Flash messages menggunakan Bulma notification */
.linsari-flash { margin: 1rem 0; }

/* Navbar active link */
.navbar-item.is-active,
.navbar-item:focus { background-color: rgba(0, 0, 0, .07) !important; }

/* Card shadow ringan */
.card { box-shadow: 0 2px 8px rgba(0,0,0,.08); }

/* Form full-width submit button */
.button.is-fullwidth { width: 100%; }

/* Profile hero gradient */
.profile-hero {
    height: 140px;
    background: linear-gradient(135deg, var(--theme-primary) 0%, var(--theme-secondary) 100%);
    border-radius: 8px 8px 0 0;
}
.profile-avatar {
    width: 120px; height: 120px;
    object-fit: cover;
    border: 4px solid #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,.15);
    margin-top: -60px;
    display: block;
}

/* Tab active indicator override */
.tabs.is-boxed li.is-active a {
    border-bottom-color: var(--theme-primary) !important;
    color: var(--theme-primary) !important;
}

/* Admin topbar */
.admin-topbar {
    height: 56px;
    background: #fff;
    border-bottom: 1px solid #e8e8e8;
    display: flex;
    align-items: center;
    padding: 0 1.25rem;
    gap: .75rem;
    position: sticky;
    top: 0;
    z-index: 30;
}

/* Sidebar toggle button */
.sidebar-toggle {
    background: none;
    border: 1px solid #dbdbdb;
    border-radius: 4px;
    width: 36px; height: 36px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #555;
    transition: background .15s;
}
.sidebar-toggle:hover { background: #f5f5f5; }

/* Notification — replaces Bootstrap alert */
.notification { position: relative; }
.notification .delete { position: absolute; right: .5rem; top: .5rem; }

/* Breadcrumb / divider in dropdowns */
.dropdown-divider { border-top: 1px solid #f0f0f0; margin: .25rem 0; }

/* Lock icon on restricted menu items */
.menu-locked { opacity: .5; cursor: not-allowed !important; }

/* Maintenance page center */
.maintenance-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0a0a23;
}

/* ── Bootstrap nav-tabs → Bulma tabs: penyesuaian layout ────────────────── */

/* Tabs yang berada tepat di atas .card: hilangkan jarak & radius atas card */
.tabs.is-boxed + .card {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    margin-top: 0;
    border-top: none;          /* border atas sudah "digantikan" garis tabs */
}

/* Hilangkan margin bawah default Bulma tabs saat menempel ke card */
.tabs.is-boxed {
    margin-bottom: 0 !important;
}

/* Tab aktif: warna primer tema */
.tabs.is-boxed li.is-active a {
    background-color: #fff !important;
    border-color: #dbdbdb #dbdbdb #fff !important;
    color: var(--theme-primary, #485fc7) !important;
    font-weight: 600;
}

/* Badge Bootstrap di dalam tab (misal tanda "!" pada upgrade tema) */
.tabs.is-boxed li a .badge {
    font-size: .65rem;
    vertical-align: middle;
    margin-left: .3rem;
}

/* Ikon Bootstrap Icons di dalam tab */
.tabs.is-boxed li a .bi {
    font-size: .9em;
    margin-right: .3rem;
    vertical-align: -0.1em;
}

/* Row ekstra (tombol di samping tabs) */
.is-flex.is-align-items-center.is-justify-content-space-between {
    margin-bottom: .25rem;
}

/* ── Admin Sidebar ───────────────────────────────────────────────────────── */

.admin-sidebar {
    width: 230px;
    min-height: 100vh;
    background: #1a1a2e;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

/* Brand */
.sidebar-brand {
    padding: 1rem 1.1rem .75rem;
    border-bottom: 1px solid rgba(255,255,255,.08);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .4rem;
    flex-shrink: 0;
}
.sidebar-brand-icon { color: #7c83fd; font-size: 1.1rem; }
.sidebar-brand-name {
    font-weight: 700;
    color: #fff;
    font-size: 1rem;
    flex: 1;
}
.sidebar-brand-sub {
    width: 100%;
    font-size: .65rem;
    color: #6b7db3;
    padding-left: 1.6rem;
    margin-top: -.25rem;
}

/* Nav wrapper */
.sidebar-menu {
    padding: .6rem .5rem;
    flex: 1;
}
.sidebar-menu > .menu-list {
    display: flex;
    flex-direction: column;
    gap: .1rem;
}
.sidebar-menu .menu-list { border-left: none !important; }

/* Shared item base */
.sidebar-item,
.sidebar-group-trigger {
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .5rem .75rem;
    border-radius: 7px;
    color: #c8d0e7;
    font-size: .875rem;
    cursor: pointer;
    transition: background .15s, color .15s;
    text-decoration: none;
    width: 100%;
    box-sizing: border-box;
}
.sidebar-item:hover,
.sidebar-group-trigger:hover {
    background: rgba(255,255,255,.08);
    color: #fff;
}
.sidebar-item.is-active {
    background: #485fc7;
    color: #fff !important;
    font-weight: 600;
}
.sidebar-item.is-locked {
    opacity: .45;
    cursor: not-allowed;
}

/* Icon column — fixed width so labels stay aligned */
.sidebar-item-icon {
    width: 1.15rem;
    text-align: center;
    flex-shrink: 0;
    font-size: .9rem;
}
.sidebar-item-label { flex: 1; }

/* Lock badge */
.sidebar-lock-icon {
    font-size: .65rem;
    color: #f5a623;
    flex-shrink: 0;
}

/* Group trigger (parent row) */
.sidebar-group-trigger {
    font-weight: 600;
    color: #a0aec8;
    letter-spacing: .01em;
}
.sidebar-group-trigger.is-active {
    color: #fff;
    background: rgba(255,255,255,.06);
}
.sidebar-group-trigger:hover { color: #fff; }

/* Chevron */
.sidebar-chevron {
    font-size: .7rem;
    margin-left: auto;
    flex-shrink: 0;
    color: #6b7db3;
    transition: color .15s;
}
.sidebar-group-trigger:hover .sidebar-chevron,
.sidebar-group-trigger.is-active .sidebar-chevron { color: #a0aec8; }

/* Sub-menu list — accordion slide */
.sidebar-sub {
    padding-left: .5rem;
    margin-top: .1rem;
    display: none;              /* hidden by default */
    flex-direction: column;
    gap: .05rem;
}
.sidebar-sub.is-open { display: flex; }

/* Sub-item indent line */
.sidebar-sub .sidebar-item {
    font-size: .84rem;
    padding: .42rem .75rem .42rem 2rem;
    color: #9aa8c7;
    border-left: 2px solid rgba(255,255,255,.07);
    border-radius: 0 7px 7px 0;
}
.sidebar-sub .sidebar-item:hover {
    background: rgba(255,255,255,.07);
    color: #fff;
    border-left-color: rgba(255,255,255,.2);
}
.sidebar-sub .sidebar-item.is-active {
    background: rgba(72,95,199,.35);
    color: #fff;
    border-left-color: #485fc7;
    font-weight: 600;
}

/* Version footer */
.sidebar-version {
    padding: .6rem 1.1rem;
    border-top: 1px solid rgba(255,255,255,.07);
    font-size: .65rem;
    color: #6b7db3;
    flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   BOOTSTRAP → BULMA: Form & UI Transformer
   Mengkonversi class Bootstrap yang di-emit CMS ke tampilan Bulma
   tanpa menyentuh file PHP CMS sama sekali.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── CSS Variables ──────────────────────────────────────────────────────── */
:root {
    --b-primary:   #485fc7;
    --b-success:   #48c78e;
    --b-danger:    #f14668;
    --b-warning:   #ffe08a;
    --b-info:      #3e8ed0;
    --b-secondary: #6b7280;
    --b-light:     #f5f5f5;
    --b-radius:    6px;
    --b-border:    #dbdbdb;
    --b-text:      #363636;
    --b-muted:     #7a7a7a;
    --b-input-h:   2.5em;
    --b-shadow:    0 2px 8px rgba(0,0,0,.08);
}

/* ── Spacing helpers (mb-*, mt-*, gap-*) ───────────────────────────────── */
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: .25rem !important; }
.mb-2 { margin-bottom: .5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mb-5 { margin-bottom: 3rem !important; }
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: .25rem !important; }
.mt-2 { margin-top: .5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.me-1 { margin-right: .25rem !important; }
.me-2 { margin-right: .5rem !important; }
.ms-1 { margin-left: .25rem !important; }
.ms-2 { margin-left: .5rem !important; }
.ms-auto { margin-left: auto !important; }
.py-2 { padding-top: .5rem !important; padding-bottom: .5rem !important; }
.py-4 { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }
.p-1  { padding: .25rem !important; }
.p-3  { padding: 1rem !important; }
.gap-1 { gap: .25rem !important; }
.gap-2 { gap: .5rem !important; }
.gap-3 { gap: 1rem !important; }

/* ── Typography helpers ─────────────────────────────────────────────────── */
.fw-bold     { font-weight: 700 !important; }
.fw-semibold { font-weight: 600 !important; }
.small, small { font-size: .875em; }
.fs-2        { font-size: 2rem !important; }
.fs-4        { font-size: 1.5rem !important; }
.text-muted  { color: var(--b-muted) !important; }
.text-danger { color: var(--b-danger) !important; }
.text-success{ color: var(--b-success) !important; }
.text-center { text-align: center !important; }
.text-decoration-none { text-decoration: none !important; }
.flex-grow-1  { flex-grow: 1 !important; }
.flex-shrink-0{ flex-shrink: 0 !important; }

/* ── Display & Flex helpers ─────────────────────────────────────────────── */
.d-flex          { display: flex !important; }
.d-inline        { display: inline !important; }
.d-inline-flex   { display: inline-flex !important; }
.d-block         { display: block !important; }
.align-items-center    { align-items: center !important; }
.align-items-start     { align-items: flex-start !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-end     { justify-content: flex-end !important; }
.flex-wrap       { flex-wrap: wrap !important; }
.flex-column     { flex-direction: column !important; }

/* ── Grid: row / col-* ─────────────────────────────────────────────────── */
.row    { display: flex; flex-wrap: wrap; margin: 0 -.5rem; }
.row.g-2 { gap: .5rem; margin: 0; }
.row.g-3 { gap: .75rem; margin: 0; }
.row.g-4 { gap: 1rem; margin: 0; }
[class*="col-"] { padding: 0 .5rem; box-sizing: border-box; }
.row.g-2 [class*="col-"],
.row.g-3 [class*="col-"],
.row.g-4 [class*="col-"] { padding: 0; }

.col-md-2  { flex: 0 0 16.666%; max-width: 16.666%; }
.col-md-4  { flex: 0 0 33.333%; max-width: 33.333%; }
.col-md-5  { flex: 0 0 41.666%; max-width: 41.666%; }
.col-md-6  { flex: 0 0 50%;     max-width: 50%;     }
.col-md-7  { flex: 0 0 58.333%; max-width: 58.333%; }
.col-md-8  { flex: 0 0 66.666%; max-width: 66.666%; }
.col-sm-3  { flex: 0 0 25%;     max-width: 25%;     }
.col-sm-4  { flex: 0 0 33.333%; max-width: 33.333%; }
.col-sm-6  { flex: 0 0 50%;     max-width: 50%;     }
.col-sm-8  { flex: 0 0 66.666%; max-width: 66.666%; }
.col-sm-9  { flex: 0 0 75%;     max-width: 75%;     }
.col-lg-3  { flex: 0 0 25%;     max-width: 25%;     }
.col-sm-4.text-muted,
.col-sm-3.text-muted { color: var(--b-muted) !important; font-size: .875em; }

@media (max-width: 768px) {
    [class*="col-md-"],
    [class*="col-sm-"],
    [class*="col-lg-"] { flex: 0 0 100%; max-width: 100%; }
}

/* ── form-label ─────────────────────────────────────────────────────────── */
.form-label {
    display: block;
    font-size: .875rem;
    font-weight: 600;
    color: var(--b-text);
    margin-bottom: .4rem;
}
.form-label.fw-semibold,
.form-label.fw-bold { font-weight: 700; }
.form-label.small,
.form-label.form-label.mb-1 { font-size: .8rem; margin-bottom: .2rem; }

/* ── form-control (input, textarea) ────────────────────────────────────── */
.form-control {
    display: block;
    width: 100%;
    box-sizing: border-box;
    height: var(--b-input-h);
    padding: calc(var(--b-input-h)/2 - .65em) .75rem;
    font-size: .95rem;
    font-family: inherit;
    color: var(--b-text);
    background: #fff;
    border: 1.5px solid var(--b-border);
    border-radius: var(--b-radius);
    box-shadow: inset 0 1px 2px rgba(0,0,0,.04);
    transition: border-color .15s, box-shadow .15s;
    line-height: 1.5;
    -webkit-appearance: none;
}
.form-control:focus {
    border-color: var(--b-primary);
    box-shadow: 0 0 0 3px rgba(72,95,199,.18);
    outline: none;
}
.form-control::placeholder { color: #b5bac4; }
.form-control[type="file"] {
    height: auto;
    padding: .45rem .65rem;
    cursor: pointer;
    font-size: .875rem;
}
.form-control[type="file"]::-webkit-file-upload-button {
    background: var(--b-primary);
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: .3rem .75rem;
    margin-right: .75rem;
    cursor: pointer;
    font-size: .8rem;
    font-family: inherit;
    transition: background .15s;
}
.form-control[type="file"]::-webkit-file-upload-button:hover {
    background: #3a4fa8;
}
textarea.form-control {
    height: auto;
    padding: .6rem .75rem;
    resize: vertical;
    min-height: 80px;
}
.form-control.form-control-sm {
    height: 2em;
    padding: .2rem .5rem;
    font-size: .85rem;
    border-radius: 4px;
}
.form-control[readonly] {
    background: #f8f9fa;
    color: var(--b-muted);
}
.form-control.is-invalid {
    border-color: var(--b-danger);
}
.invalid-feedback {
    display: block;
    color: var(--b-danger);
    font-size: .8rem;
    margin-top: .2rem;
}

/* ── form-select (select dropdown) ─────────────────────────────────────── */
.form-select {
    display: block;
    width: 100%;
    box-sizing: border-box;
    height: var(--b-input-h);
    padding: 0 2.4rem 0 .75rem;
    font-size: .95rem;
    font-family: inherit;
    color: var(--b-text);
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 16 16'%3E%3Cpath fill='%236b7280' d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E") no-repeat right .75rem center;
    border: 1.5px solid var(--b-border);
    border-radius: var(--b-radius);
    box-shadow: inset 0 1px 2px rgba(0,0,0,.04);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s;
}
.form-select:focus {
    border-color: var(--b-primary);
    box-shadow: 0 0 0 3px rgba(72,95,199,.18);
    outline: none;
}

/* ── form-text (hint di bawah input) ───────────────────────────────────── */
.form-text {
    display: block;
    font-size: .8rem;
    color: var(--b-muted);
    margin-top: .3rem;
    line-height: 1.4;
}

/* ── form-check & form-switch ───────────────────────────────────────────── */
.form-check {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: 0;
    margin: .25rem 0;
}
.form-check-label {
    font-size: .9rem;
    color: var(--b-text);
    cursor: pointer;
    user-select: none;
}
/* Plain checkbox */
.form-check-input[type="checkbox"]:not(.form-switch .form-check-input) {
    width: 1.1em;
    height: 1.1em;
    border: 1.5px solid var(--b-border);
    border-radius: 3px;
    background: #fff;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    flex-shrink: 0;
    transition: background .15s, border-color .15s;
}
.form-check-input[type="checkbox"]:not(.form-switch .form-check-input):checked {
    background: var(--b-primary);
    border-color: var(--b-primary);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23fff' d='M13.485 1.43 5.455 9.46 2.515 6.52.1 8.935l5.354 5.354 10.446-10.446z'/%3E%3C/svg%3E");
    background-size: 65%;
    background-repeat: no-repeat;
    background-position: center;
}
/* Toggle switch */
.form-check.form-switch {
    gap: .75rem;
}
.form-switch .form-check-input {
    position: relative;
    width: 2.6em;
    height: 1.4em;
    border-radius: 1em;
    background: #ccc;
    border: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    flex-shrink: 0;
    transition: background .2s;
}
.form-switch .form-check-input::after {
    content: '';
    position: absolute;
    width: 1em;
    height: 1em;
    border-radius: 50%;
    background: #fff;
    top: .2em;
    left: .2em;
    transition: left .2s;
    box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.form-switch .form-check-input:checked {
    background: var(--b-primary);
}
.form-switch .form-check-input:checked::after {
    left: 1.4em;
}
.form-switch .form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(72,95,199,.18);
    outline: none;
}

/* ── input-group ────────────────────────────────────────────────────────── */
.input-group {
    display: flex;
    align-items: stretch;
}
.input-group .form-control {
    border-radius: var(--b-radius) 0 0 var(--b-radius);
    flex: 1;
    min-width: 0;
}
.input-group-text {
    display: flex;
    align-items: center;
    padding: 0 .75rem;
    font-size: .9rem;
    color: var(--b-muted);
    background: #f5f5f5;
    border: 1.5px solid var(--b-border);
    border-left: none;
    border-radius: 0 var(--b-radius) var(--b-radius) 0;
    white-space: nowrap;
}

/* ── pre / code blocks ──────────────────────────────────────────────────── */
pre.bg-light {
    background: #f5f5f5 !important;
    border: 1px solid #e8e8e8;
    border-radius: var(--b-radius);
    padding: 1rem;
    font-size: .82rem;
    overflow-x: auto;
    color: #363636;
}
code {
    background: #f5f5f5;
    border-radius: 3px;
    padding: .1em .35em;
    font-size: .875em;
    color: #e83e8c;
}
pre code { background: none; padding: 0; color: inherit; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    padding: .55em 1.1em;
    font-size: .9rem;
    font-family: inherit;
    font-weight: 500;
    border-radius: var(--b-radius);
    border: 1.5px solid transparent;
    cursor: pointer;
    text-decoration: none;
    line-height: 1.4;
    transition: background .15s, border-color .15s, box-shadow .15s, opacity .15s;
    white-space: nowrap;
    -webkit-appearance: none;
}
.btn:focus { outline: none; box-shadow: 0 0 0 3px rgba(72,95,199,.2); }
.btn:disabled, .btn[disabled] { opacity: .55; cursor: not-allowed; }

.btn-primary       { background: var(--b-primary); border-color: var(--b-primary); color: #fff; }
.btn-primary:hover { background: #3a4fa8; border-color: #3a4fa8; color: #fff; }

.btn-secondary       { background: #f0f0f0; border-color: #d0d0d0; color: var(--b-text); }
.btn-secondary:hover { background: #e4e4e4; color: var(--b-text); }

.btn-success       { background: var(--b-success); border-color: var(--b-success); color: #fff; }
.btn-success:hover { background: #38a374; color: #fff; }

.btn-danger        { background: var(--b-danger); border-color: var(--b-danger); color: #fff; }
.btn-danger:hover  { background: #cc2244; color: #fff; }

.btn-warning       { background: #f5c518; border-color: #f5c518; color: #333; }
.btn-warning:hover { background: #d4aa10; color: #333; }

.btn-info          { background: var(--b-info); border-color: var(--b-info); color: #fff; }
.btn-info:hover    { background: #2d72b8; color: #fff; }

.btn-outline-primary       { background: transparent; border-color: var(--b-primary); color: var(--b-primary); }
.btn-outline-primary:hover { background: var(--b-primary); color: #fff; }

.btn-outline-secondary       { background: transparent; border-color: #d0d0d0; color: var(--b-secondary); }
.btn-outline-secondary:hover { background: #f0f0f0; color: var(--b-text); }

.btn-outline-danger       { background: transparent; border-color: var(--b-danger); color: var(--b-danger); }
.btn-outline-danger:hover { background: var(--b-danger); color: #fff; }

.btn-outline-success       { background: transparent; border-color: var(--b-success); color: var(--b-success); }
.btn-outline-success:hover { background: var(--b-success); color: #fff; }

.btn-outline-warning       { background: transparent; border-color: #e0a800; color: #856404; }
.btn-outline-warning:hover { background: #f5c518; color: #333; }

.btn-sm { padding: .35em .75em; font-size: .82rem; border-radius: 4px; }
.btn-close {
    width: 1.5rem; height: 1.5rem;
    background: transparent;
    border: none; cursor: pointer;
    font-size: 1.2rem; color: var(--b-muted);
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    transition: background .15s;
}
.btn-close::before { content: '×'; line-height: 1; }
.btn-close:hover { background: #f0f0f0; color: #333; }

/* ── Badges ─────────────────────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    padding: .25em .55em;
    font-size: .72rem;
    font-weight: 600;
    border-radius: 20px;
    line-height: 1;
    white-space: nowrap;
}
.bg-primary   { background: var(--b-primary) !important; color: #fff !important; }
.bg-success   { background: var(--b-success) !important; color: #fff !important; }
.bg-danger    { background: var(--b-danger)  !important; color: #fff !important; }
.bg-warning   { background: var(--b-warning) !important; }
.bg-info      { background: var(--b-info)    !important; color: #fff !important; }
.bg-secondary { background: #9e9e9e !important; color: #fff !important; }
.bg-light     { background: var(--b-light) !important; }
.text-dark    { color: #363636 !important; }
.text-secondary { color: var(--b-secondary) !important; }
.border       { border: 1px solid var(--b-border) !important; }

/* ── Alerts ─────────────────────────────────────────────────────────────── */
.alert {
    display: flex;
    gap: .75rem;
    padding: .9rem 1rem;
    border-radius: var(--b-radius);
    border-left: 4px solid transparent;
    font-size: .9rem;
    line-height: 1.5;
}
.alert-primary   { background: #eef0fb; border-color: var(--b-primary); color: #2d3d8a; }
.alert-success   { background: #effaf5; border-color: var(--b-success); color: #257953; }
.alert-danger    { background: #fff0f3; border-color: var(--b-danger);  color: #9e1c35; }
.alert-warning   { background: #fffbeb; border-color: #e0a800;          color: #7a5a00; }
.alert-info      { background: #eff8ff; border-color: var(--b-info);    color: #1a4f7a; }
.alert-secondary { background: #f5f5f5; border-color: #bbb;             color: #555;    }

/* ── Card ────────────────────────────────────────────────────────────────── */
.card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    box-shadow: var(--b-shadow);
}
.card-body   { padding: 1.25rem; }
.card-body.p-0 { padding: 0; }
.card-header {
    padding: .85rem 1.25rem;
    border-bottom: 1px solid #eee;
    background: #fafafa;
    border-radius: 8px 8px 0 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem;
}
.card-footer {
    padding: .85rem 1.25rem;
    border-top: 1px solid #eee;
    background: #fafafa;
    border-radius: 0 0 8px 8px;
}

/* ── Table ───────────────────────────────────────────────────────────────── */
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: .9rem;
}
.table th, .table td {
    padding: .65rem .85rem;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}
.table th {
    font-weight: 600;
    color: var(--b-muted);
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    background: #fafafa;
}
.table-light th { background: #f5f5f5; }
.table-hover tbody tr:hover { background: #fafafa; }
.table-bordered th,
.table-bordered td { border: 1px solid #eee; }

/* ── hr ──────────────────────────────────────────────────────────────────── */
hr {
    border: none;
    border-top: 1px solid #eee;
    margin: 1.25rem 0;
}

/* ── Modal ───────────────────────────────────────────────────────────────── */
.modal.fade  { display: none; }
.modal.show  { display: flex; align-items: center; justify-content: center;
               position: fixed; inset: 0; z-index: 1050;
               background: rgba(0,0,0,.45); padding: 1rem; }
.modal-dialog { width: 100%; max-width: 520px; margin: auto; }
.modal-content {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0,0,0,.18);
    overflow: hidden;
}
.modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #eee;
}
.modal-title  { font-weight: 700; font-size: 1.05rem; }
.modal-body   { padding: 1.25rem; }
.modal-footer {
    display: flex; justify-content: flex-end; gap: .5rem;
    padding: .85rem 1.25rem;
    border-top: 1px solid #eee;
    background: #fafafa;
}

/* ── Pagination ──────────────────────────────────────────────────────────── */
.pagination { display: flex; gap: .25rem; flex-wrap: wrap; list-style: none; padding: 0; margin: 1rem 0; }
.page-item .page-link {
    display: flex; align-items: center; justify-content: center;
    min-width: 2.2em; height: 2.2em;
    padding: 0 .6em;
    border: 1.5px solid var(--b-border);
    border-radius: var(--b-radius);
    color: var(--b-primary);
    font-size: .875rem;
    text-decoration: none;
    transition: background .15s, border-color .15s;
}
.page-item .page-link:hover { background: #f0f0f0; }
.page-item.active .page-link {
    background: var(--b-primary); border-color: var(--b-primary); color: #fff; font-weight: 600;
}
.page-item.disabled .page-link { color: #bbb; pointer-events: none; }

/* ── Rich editor (pages tab) ─────────────────────────────────────────────── */
.rich-toolbar {
    display: flex; gap: .25rem; flex-wrap: wrap;
    padding: .4rem .5rem;
    background: #f5f5f5;
    border: 1.5px solid var(--b-border);
    border-bottom: none;
    border-radius: var(--b-radius) var(--b-radius) 0 0;
}
.rich-toolbar button {
    padding: .25em .55em;
    font-size: .85rem;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: background .12s;
    color: var(--b-text);
}
.rich-toolbar button:hover { background: #e8e8ff; border-color: var(--b-primary); }
.rich-editor {
    min-height: 140px;
    padding: .65rem .85rem;
    border: 1.5px solid var(--b-border);
    border-radius: 0 0 var(--b-radius) var(--b-radius);
    background: #fff;
    font-size: .9rem;
    line-height: 1.6;
    outline: none;
}
.rich-editor:focus { border-color: var(--b-primary); box-shadow: 0 0 0 3px rgba(72,95,199,.12); }

/* ── Misc utility ────────────────────────────────────────────────────────── */
.rounded  { border-radius: var(--b-radius) !important; }
.border   { border: 1px solid var(--b-border) !important; }
.shadow-sm { box-shadow: 0 1px 4px rgba(0,0,0,.08) !important; }
.w-100    { width: 100% !important; }
.h-100    { height: 100% !important; }
.overflow-auto { overflow: auto !important; }
.text-nowrap { white-space: nowrap !important; }
.d-none   { display: none !important; }
