/* ============================================================
   BloodSync — style.css
   Philippine Red Cross · Batangas Chapter
   ============================================================
   SECTIONS:
   [1] Google Fonts Import
   [2] CSS Variables (Design Tokens)
   [3] Reset & Base
   [4] Utility Classes
   [5] APP LAYOUT — Sidebar, Topbar, Content (all inner pages)
   [6] LOGIN PAGE  (login.php)
   ============================================================ */


/* ============================================================
   [1] GOOGLE FONTS
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&display=swap');


/* ============================================================
   [2] CSS VARIABLES — Design Tokens
   ============================================================ */
:root {
    /* Brand colors */
    --bs-red:          #C0202A;
    --bs-red-dark:     #9B1820;
    --bs-red-light:    #F9E8E9;
    --bs-red-muted:    rgba(192, 32, 42, 0.12);

    /* Neutrals */
    --bs-white:        #FFFFFF;
    --bs-surface:      #F5F4F2;
    --bs-bg:           #F5F4F2; /* alias for surface */
    --bs-border:       #E4E2DE;
    --bs-border-focus: #C0202A;
    --bs-text:         #1A1917;
    --bs-text-primary: #1A1917; /* alias for bs-text */
    --bs-text-muted:   #6B6862;
    --bs-text-subtle:  #A09C97;

    /* Accent */
    --bs-accent:       #C0202A;

    /* Shadows */
    --bs-shadow-sm:    0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.05);
    --bs-shadow-md:    0 4px 16px rgba(0,0,0,.08), 0 1px 4px rgba(0,0,0,.05);
    --bs-shadow-lg:    0 12px 40px rgba(0,0,0,.10), 0 2px 8px rgba(0,0,0,.06);

    /* Typography */
    --font-brand:      'Instrument Serif', Georgia, serif;
    --font-ui:         'DM Sans', system-ui, sans-serif;

    /* Radii */
    --radius-sm:       6px;
    --radius-md:       10px;
    --radius-lg:       16px;
    --radius-xl:       24px;

    /* Transitions */
    --transition:      0.18s ease;
}


/* ============================================================
   [3] RESET & BASE
   ============================================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-ui);
    color: var(--bs-text);
    background-color: var(--bs-surface);
    line-height: 1.5;
}

a {
    color: var(--bs-red);
    text-decoration: none;
    transition: color var(--transition);
}
a:hover { color: var(--bs-red-dark); }

img, svg { display: block; }

button {
    font-family: var(--font-ui);
    cursor: pointer;
    border: none;
    background: none;
}

input, textarea, select {
    font-family: var(--font-ui);
}


/* ============================================================
   [4] UTILITY CLASSES
   ============================================================ */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 0.9375rem;
    line-height: 1;
    transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--bs-red);
    color: var(--bs-white);
}
.btn-primary:hover {
    background: var(--bs-red-dark);
    box-shadow: 0 4px 14px rgba(192, 32, 42, 0.35);
    transform: translateY(-1px);
}
.btn-primary:active {
    transform: translateY(0);
    box-shadow: none;
}

.btn-lg {
    padding: 13px 24px;
    font-size: 1rem;
    font-weight: 600;
}

/* Alerts */
.bs-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 20px;
}
.bs-alert svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 1px;
}
.bs-alert-danger {
    background: var(--bs-red-light);
    color: var(--bs-red-dark);
    border: 1px solid rgba(192, 32, 42, 0.2);
}


/* ============================================================
   [5] APP LAYOUT — Sidebar, Topbar, Content (all inner pages)
   ============================================================ */

/* header.php uses Plus Jakarta Sans + Crimson Pro — update tokens */
:root {
    --font-brand: 'Crimson Pro', Georgia, serif;
    --font-ui:    'Plus Jakarta Sans', system-ui, sans-serif;
    --sidebar-width: 240px;
    --topbar-height: 60px;
}

.bs-wrapper {
    display: flex;
    min-height: 100vh;
    background: var(--bs-surface);
}

/* ── Sidebar ── */
.bs-sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    background: var(--bs-white);
    border-right: 1px solid var(--bs-border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 100;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--bs-border) transparent;
}

.bs-sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--bs-border);
    flex-shrink: 0;
}

.bs-sidebar-logo-icon {
    width: 32px;
    height: 32px;
    background: var(--bs-red);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.bs-sidebar-logo-icon svg {
    width: 18px;
    height: 18px;
    fill: white;
    stroke: none;
}

.bs-sidebar-logo-name {
    font-family: var(--font-brand);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--bs-text);
    line-height: 1.1;
    display: block;
}

.bs-sidebar-logo-sub {
    font-size: 0.6875rem;
    color: var(--bs-text-subtle);
    display: block;
    line-height: 1;
    margin-top: 2px;
}

.bs-sidebar-nav {
    flex: 1;
    padding: 12px 0;
    overflow-y: auto;
}

.bs-nav-section {
    margin-bottom: 4px;
    padding: 0 12px;
}

.bs-nav-section-label {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--bs-text-subtle);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    padding: 10px 8px 4px;
}

.bs-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--bs-text-muted);
    text-decoration: none;
    transition: background var(--transition), color var(--transition);
    margin-bottom: 2px;
}

.bs-nav-item svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    opacity: 0.7;
    transition: opacity var(--transition);
}

.bs-nav-item:hover {
    background: var(--bs-surface);
    color: var(--bs-text);
}

.bs-nav-item:hover svg { opacity: 1; }

.bs-nav-item.active {
    background: var(--bs-red-light);
    color: var(--bs-red);
    font-weight: 600;
}

.bs-nav-item.active svg { opacity: 1; }

/* Sidebar User Footer */
.bs-sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-top: 1px solid var(--bs-border);
    flex-shrink: 0;
}

.bs-user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--bs-red);
    color: white;
    font-size: 0.8125rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    letter-spacing: 0.02em;
}

.bs-user-info { flex: 1; min-width: 0; }

.bs-user-name {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--bs-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bs-user-role {
    font-size: 0.6875rem;
    color: var(--bs-text-subtle);
    margin-top: 1px;
}

.bs-logout-btn {
    width: 30px;
    height: 30px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bs-text-subtle);
    transition: background var(--transition), color var(--transition);
    flex-shrink: 0;
}

.bs-logout-btn svg { width: 16px; height: 16px; }

.bs-logout-btn:hover {
    background: var(--bs-red-light);
    color: var(--bs-red);
}

/* ── Main Area ── */
.bs-main {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ── Topbar ── */
.bs-topbar {
    height: var(--topbar-height);
    background: var(--bs-white);
    border-bottom: 1px solid var(--bs-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 50;
    gap: 16px;
}

.bs-topbar-left { display: flex; flex-direction: column; justify-content: center; }

.bs-topbar-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--bs-text);
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.bs-topbar-breadcrumb {
    font-size: 0.75rem;
    color: var(--bs-text-subtle);
    margin-top: 1px;
}

.bs-topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.bs-notif-btn {
    position: relative;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bs-text-muted);
    background: none;
    border: none;
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
}

.bs-notif-btn svg { width: 18px; height: 18px; }

.bs-notif-btn:hover {
    background: var(--bs-surface);
    color: var(--bs-text);
}

.bs-notif-dot {
    position: absolute;
    top: 7px; right: 7px;
    width: 7px; height: 7px;
    background: var(--bs-red);
    border-radius: 50%;
    border: 1.5px solid var(--bs-white);
}

/* ── Content Area ── */
.bs-content {
    flex: 1;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ── Page Header ── */
.bs-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.bs-page-title {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--bs-text);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.bs-page-subtitle {
    font-size: 0.875rem;
    color: var(--bs-text-muted);
    margin-top: 3px;
}

.bs-page-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* ── Stat Cards ── */
.bs-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}

.bs-stat-card {
    background: var(--bs-white);
    border: 1px solid var(--bs-border);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: box-shadow var(--transition), transform var(--transition);
}

.bs-stat-card:hover {
    box-shadow: var(--bs-shadow-md);
    transform: translateY(-1px);
}

.bs-stat-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.bs-stat-icon svg { width: 18px; height: 18px; }

.bs-stat-card.danger  .bs-stat-icon { background: #FEE2E2; color: #DC2626; }
.bs-stat-card.info    .bs-stat-icon { background: #DBEAFE; color: #2563EB; }
.bs-stat-card.warning .bs-stat-icon { background: #FEF3C7; color: #D97706; }
.bs-stat-card.success .bs-stat-icon { background: #D1FAE5; color: #059669; }

.bs-stat-value {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--bs-text);
    letter-spacing: -0.03em;
    line-height: 1;
}

.bs-stat-label {
    font-size: 0.8125rem;
    color: var(--bs-text-muted);
    font-weight: 500;
}

/* ── Tabs ── */
.bs-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid var(--bs-border);
}

.bs-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--bs-text-muted);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color var(--transition), border-color var(--transition);
}

.bs-tab:hover { color: var(--bs-text); }

.bs-tab.active {
    color: var(--bs-red);
    border-bottom-color: var(--bs-red);
    font-weight: 600;
}

.bs-tab-count {
    background: var(--bs-red);
    color: white;
    font-size: 0.6875rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 20px;
    min-width: 18px;
    text-align: center;
}

/* ── Table ── */
.bs-table-wrapper {
    background: var(--bs-white);
    border: 1px solid var(--bs-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.bs-table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--bs-border);
    gap: 12px;
    flex-wrap: wrap;
}

.bs-table-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--bs-text);
}

.bs-table-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.bs-table-scroll { overflow-x: auto; }

.bs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.bs-table thead tr {
    background: var(--bs-surface);
    border-bottom: 1px solid var(--bs-border);
}

.bs-table th {
    padding: 10px 16px;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--bs-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.bs-table td {
    padding: 12px 16px;
    color: var(--bs-text);
    border-bottom: 1px solid var(--bs-border);
    vertical-align: middle;
}

.bs-table tbody tr:last-child td { border-bottom: none; }
.bs-table tbody tr:hover { background: var(--bs-surface); }

/* ── Search Input ── */
.bs-search-input {
    position: relative;
    display: flex;
    align-items: center;
}

.bs-search-input svg {
    position: absolute;
    left: 10px;
    width: 15px; height: 15px;
    color: var(--bs-text-subtle);
    pointer-events: none;
}

.bs-search-input .bs-input {
    padding-left: 34px;
    width: 220px;
    height: 36px;
    font-size: 0.875rem;
}

/* ── Select ── */
.bs-select {
    height: 36px;
    padding: 0 10px;
    border: 1.5px solid var(--bs-border);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    color: var(--bs-text);
    background: var(--bs-white);
    cursor: pointer;
    outline: none;
    font-family: var(--font-ui);
    transition: border-color var(--transition);
}

.bs-select:focus { border-color: var(--bs-red); }

/* ── Badges ── */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 0.6875rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge-submitted { background: #EFF6FF; color: #2563EB; }
.badge-approved  { background: #F0FDF4; color: #16A34A; }
.badge-paid      { background: #FEF9C3; color: #CA8A04; }
.badge-success   { background: #D1FAE5; color: #059669; }
.badge-danger    { background: #FEE2E2; color: #DC2626; }
.badge-secondary { background: var(--bs-surface); color: var(--bs-text-muted); }

.badge-blood {
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 0.6875rem;
    font-weight: 700;
    background: var(--bs-red-light);
    color: var(--bs-red);
    margin-right: 3px;
}

/* ── Button extras ── */
.btn-sm {
    padding: 5px 12px;
    font-size: 0.8125rem;
    border-radius: var(--radius-sm);
}

.btn-secondary {
    background: var(--bs-surface);
    color: var(--bs-text);
    border: 1px solid var(--bs-border);
}

.btn-secondary:hover { background: var(--bs-border); }

/* ── Alert success ── */
.bs-alert-success {
    background: #F0FDF4;
    color: #15803D;
    border: 1px solid #BBF7D0;
}

/* ── Text utilities ── */
.text-muted { color: var(--bs-text-muted); }
.text-sm    { font-size: 0.8125rem; }


/* ============================================================
   [6] LOGIN PAGE  (login.php)
   ============================================================ */

/* Full-page centered layout */
.bs-auth-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bs-surface);
    background-image:
        radial-gradient(ellipse 80% 60% at 50% -10%, rgba(192, 32, 42, 0.07) 0%, transparent 70%),
        radial-gradient(ellipse 60% 40% at 80% 100%, rgba(192, 32, 42, 0.04) 0%, transparent 60%);
    padding: 24px;
}

/* Login card */
.bs-auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--bs-white);
    border-radius: var(--radius-xl);
    box-shadow: var(--bs-shadow-lg);
    border: 1px solid var(--bs-border);
    padding: 44px 40px 40px;
    animation: bs-card-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes bs-card-in {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Logo / brand area */
.bs-auth-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 32px;
}

.bs-auth-logo-img {
    display: block;
    width: 120px;
    height: auto;
    max-width: 100%;
    object-fit: contain;
}

/* Heading */
.bs-auth-heading {
    text-align: center;
    margin-bottom: 28px;
}

.bs-auth-title {
    font-size: 1.1875rem;
    font-weight: 600;
    color: var(--bs-text);
    margin-bottom: 4px;
    letter-spacing: -0.01em;
}

.bs-auth-subtitle {
    font-size: 0.8125rem;
    color: var(--bs-text-muted);
}

/* Divider */
.bs-auth-divider {
    height: 1px;
    background: var(--bs-border);
    margin-bottom: 28px;
}

/* Form groups */
.bs-form-group {
    margin-bottom: 18px;
}

.bs-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--bs-text);
    margin-bottom: 6px;
}

.bs-input {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--bs-border);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    color: var(--bs-text);
    background: var(--bs-white);
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}

.bs-input::placeholder {
    color: var(--bs-text-subtle);
}

.bs-input:focus {
    border-color: var(--bs-red);
    box-shadow: 0 0 0 3px var(--bs-red-muted);
}

/* Password toggle wrapper */
.bs-input-password-wrap {
    position: relative;
}

.bs-input-password-wrap .bs-input {
    padding-right: 44px;
}

.bs-input-password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--bs-text-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px;
    transition: color var(--transition);
}

.bs-input-password-toggle:hover {
    color: var(--bs-text-muted);
}

.bs-input-password-toggle svg {
    width: 18px;
    height: 18px;
}

/* Submit button — full width in login */
.bs-auth-submit {
    width: 100%;
    justify-content: center;
    margin-top: 8px;
}

/* Footer note */
.bs-auth-footer-note {
    text-align: center;
    margin-top: 24px;
    font-size: 0.75rem;
    color: var(--bs-text-subtle);
}

/* ── Sidebar submenu (collapsible groups) ── */
.bs-nav-sub {
    padding-left: 26px;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.22s ease;
}
.bs-nav-group.open > .bs-nav-sub { max-height: 200px; }

/* ============================================================
   COMPONENT CLASSES
   ============================================================ */

/* Cards */
.bs-card {
    background: var(--bs-white);
    border: 1px solid var(--bs-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--bs-shadow-sm);
    overflow: hidden;
}

.bs-card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--bs-border);
    background: var(--bs-surface);
}

.bs-card-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--bs-text);
    margin: 0;
}

.bs-card-body {
    padding: 24px;
}

/* Forms */
.bs-form-group {
    margin-bottom: 18px;
}

.bs-form-group label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--bs-text);
    margin-bottom: 6px;
}

.bs-form-control {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--bs-border);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    color: var(--bs-text);
    background: var(--bs-white);
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}

.bs-form-control:focus {
    border-color: var(--bs-red);
    box-shadow: 0 0 0 3px var(--bs-red-muted);
}

.bs-form-control::placeholder {
    color: var(--bs-text-subtle);
}

.bs-form-inline {
    display: flex;
    gap: 12px;
    align-items: end;
    flex-wrap: wrap;
}

.bs-form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

/* Buttons */
.bs-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    font-family: var(--font-ui);
}

.bs-btn-primary {
    background: var(--bs-red);
    color: var(--bs-white);
}

.bs-btn-primary:hover {
    background: var(--bs-red-dark);
}

.bs-btn-secondary {
    background: var(--bs-surface);
    color: var(--bs-text);
    border: 1px solid var(--bs-border);
}

.bs-btn-secondary:hover {
    background: var(--bs-border);
}

.bs-btn-danger {
    background: #dc3545;
    color: var(--bs-white);
}

.bs-btn-danger:hover {
    background: #c82333;
}

.bs-btn-sm {
    padding: 6px 12px;
    font-size: 0.8125rem;
}

/* Tables */
.bs-table-responsive {
    overflow-x: auto;
}

.bs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.bs-table th,
.bs-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--bs-border);
}

.bs-table th {
    font-weight: 600;
    color: var(--bs-text);
    background: var(--bs-surface);
}

.bs-table tbody tr:hover {
    background: var(--bs-surface);
}

/* Alerts */
.bs-alert {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.bs-alert-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.bs-alert-error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

/* Badges */
.bs-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
}

.bs-badge-success {
    background: #dcfce7;
    color: #166534;
}

.bs-badge-secondary {
    background: var(--bs-surface);
    color: var(--bs-text-muted);
    border: 1px solid var(--bs-border);
}

/* Grid and layout */
.bs-grid {
    display: grid;
    gap: 20px;
}

.bs-main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    background: var(--bs-surface);
}

.bs-content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px;
}

.bs-content-header {
    margin-bottom: 32px;
}

.bs-content-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--bs-text);
    margin: 0 0 4px;
}

.bs-content-header p {
    font-size: 0.875rem;
    color: var(--bs-text-muted);
    margin: 0;
}

/* Stats */
.bs-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.bs-stat-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bs-stat-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--bs-text-muted);
}

.bs-stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--bs-text);
    line-height: 1;
}

/* Text utilities */
.bs-text-muted {
    color: var(--bs-text-muted);
}

.bs-text-error {
    color: #dc2626;
}

/* Modal */
.bs-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.bs-modal-content {
    background: var(--bs-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--bs-shadow-lg);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.bs-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--bs-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.bs-modal-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--bs-text);
    margin: 0;
}

.bs-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--bs-text-muted);
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bs-modal-body {
    padding: 24px;
}

.bs-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

.bs-nav-group-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--bs-text-muted);
    cursor: pointer;
    width: 100%;
    background: none;
    border: none;
    margin-bottom: 2px;
    transition: background var(--transition), color var(--transition);
    font-family: var(--font-ui);
}
.bs-nav-group-toggle:hover {
    background: var(--bs-surface);
    color: var(--bs-text);
}
.bs-nav-group-toggle.active {
    background: var(--bs-red);
    color: var(--bs-white);
}
.bs-nav-group-toggle.active svg.icon { opacity: 1; }
.bs-nav-group-toggle svg.icon {
    width: 16px; height: 16px;
    flex-shrink: 0; opacity: 0.7;
}
.bs-nav-group-toggle .chevron {
    width: 14px; height: 14px;
    margin-left: auto;
    transition: transform 0.2s ease;
    opacity: 0.5;
}
.bs-nav-group.open .chevron { transform: rotate(180deg); }
.bs-nav-sub .bs-nav-item {
    font-size: 0.8125rem;
    padding: 6px 10px;
}

/* ── Direct content pages (no .bs-main wrapper) ── */
.bs-main-content {
    margin-left: var(--sidebar-width);
    padding: 28px 32px;
    min-height: 100vh;
    box-sizing: border-box;
}