/* ═══════════════════════════════════════════════════════════════
   Msg4 AdminConsole — Design System
   Based on WEBCONTROL standard (theme.md + webcontrol-layout-components.md)
   ═══════════════════════════════════════════════════════════════ */

:root {
    /* Brand */
    --primary:             #206bc4;
    --primary-hover:       #1a5ba8;
    --primary-active:      #1d4ed8;

    /* Sidebar */
    --sidebar-bg:          #111a27;
    --sidebar-border:      #253143;
    --sidebar-text:        rgba(255,255,255,0.6);
    --sidebar-text-muted:  rgba(255,255,255,0.3);
    --sidebar-active-bg:   #206bc4;
    --sidebar-width:       236px;

    /* App shell */
    --app-bg:              #f2f5f9;
    --topbar-bg:           #ffffff;
    --topbar-border:       #e4eaf2;
    --topbar-height:       56px;
    --content-padding:     16px;

    /* Cards */
    --card-bg:             #ffffff;
    --card-border:         #e5ebf3;
    --card-shadow:         0 8px 18px rgba(22,34,51,0.05);
    --card-radius:         4px;

    /* Text */
    --text-heading:        #1a2332;
    --text-body:           #3d4a5c;
    --text-muted:          #6b7a90;
    --text-disabled:       #9aa5b4;

    /* Borders */
    --border:              #e6e9ef;
    --border-input:        #ccd3dd;

    /* Status badges */
    --badge-green-bg:      #dcfce7;
    --badge-green-text:    #166534;
    --badge-red-bg:        #fee2e2;
    --badge-red-text:      #991b1b;
    --badge-gray-bg:       #f1f5f9;
    --badge-gray-text:     #475569;
    --badge-blue-bg:       #dbeafe;
    --badge-blue-text:     #1d4ed8;
    --badge-yellow-bg:     #fef9c3;
    --badge-yellow-text:   #854d0e;
    --badge-orange-bg:     #ffedd5;
    --badge-orange-text:   #9a3412;
    --badge-purple-bg:     #ede9fe;
    --badge-purple-text:   #5b21b6;

    /* Buttons */
    --btn-primary-bg:      #206bc4;
    --btn-danger-bg:       #d63939;
    --btn-success-bg:      #2fb344;

    /* Table */
    --table-header-bg:     #f9fafb;
    --table-header-text:   #6b7a90;
    --table-row-border:    #f0f2f5;
    --table-row-hover:     #f9fafb;

    /* Font */
    --font-family:         Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ═══ LIGHT MODE (default) ═══════════════════════════════════════ */
:root,
[data-theme="light"] {
  --bg-primary:          #ffffff;
  --bg-secondary:        #f2f5f9;
  --bg-sidebar:          #111a27;
  --bg-topbar:           #ffffff;
  --bg-card:             #ffffff;
  --bg-table-header:     #206bc4;
  --bg-input:            #ffffff;
  --text-primary-th:     #1a2332;
  --text-secondary-th:   #6b7a90;
  --text-table-header:   #ffffff;
  --border-color-th:     #e5ebf3;
  --border-input-th:     #ccd3dd;
  --shadow-card-th:      0 8px 18px rgba(22,34,51,0.05);
  --modal-bg:            #ffffff;
  --dropdown-bg:         #ffffff;
  --sidebar-active-th:   rgba(255,255,255,0.15);
}

/* ═══ DARK MODE ══════════════════════════════════════════════════ */
[data-theme="dark"] {
  --bg-primary:          #1a1a2e;
  --bg-secondary:        #16213e;
  --bg-sidebar:          #0d1117;
  --bg-topbar:           #161b22;
  --bg-card:             #1e2a45;
  --bg-table-header:     #1565c0;
  --bg-input:            #2a3a5c;
  --text-primary-th:     #e0e0e0;
  --text-secondary-th:   #9e9e9e;
  --text-table-header:   #ffffff;
  --border-color-th:     #2a3a5c;
  --border-input-th:     #3a4a6c;
  --shadow-card-th:      0 8px 18px rgba(0,0,0,0.3);
  --modal-bg:            #1e2a45;
  --dropdown-bg:         #1e2a45;
  --sidebar-active-th:   rgba(255,255,255,0.2);
  /* Override existing tokens for dark mode */
  --app-bg:              #16213e;
  --topbar-bg:           #161b22;
  --topbar-border:       #2a3a5c;
  --card-bg:             #1e2a45;
  --card-border:         #2a3a5c;
  --text-heading:        #e0e0e0;
  --text-body:           #b0bec5;
  --text-muted:          #78909c;
  --border:              #2a3a5c;
  --border-input:        #3a4a6c;
}

/* Apply dark theme to key elements */
[data-theme="dark"] body { background-color: #16213e; color: #e0e0e0; }
[data-theme="dark"] .app-main { background: #16213e; }
[data-theme="dark"] .app-topbar { background: #161b22 !important; border-bottom-color: #2a3a5c; }
[data-theme="dark"] .app-topbar-icon-btn { background: #1e2a45; border-color: #2a3a5c; color: #e0e0e0; }
[data-theme="dark"] .app-topbar-icon-btn:hover { background: #2a3a5c; }
[data-theme="dark"] .app-user-menu { background: #1e2a45 !important; border-color: #2a3a5c !important; color: #e0e0e0 !important; }
[data-theme="dark"] .app-topbar-divider { background: #2a3a5c; }
[data-theme="dark"] .dashboard-shell .card { background: #1e2a45 !important; border-color: #2a3a5c !important; box-shadow: 0 8px 18px rgba(0,0,0,0.3) !important; }
[data-theme="dark"] .dashboard-shell .card-header { background: #1e2a45; border-bottom-color: #2a3a5c; }
[data-theme="dark"] .dashboard-shell .card-title { color: #e0e0e0; }
[data-theme="dark"] .app-footer { background: #161b22; border-color: #2a3a5c; color: #9e9e9e; }
[data-theme="dark"] .app-footer-version { background: #1e2a45; border-color: #2a3a5c; color: #90caf9; }
[data-theme="dark"] .table thead th { background: #1565c0 !important; }
[data-theme="dark"] .table tbody td { background: #1e2a45; color: #e0e0e0; border-bottom-color: #2a3a5c; }
[data-theme="dark"] .table tbody tr:hover td { background: #2a3a5c; }
[data-theme="dark"] .form-control, [data-theme="dark"] .form-select {
  background: #2a3a5c !important; color: #e0e0e0 !important; border-color: #3a4a6c !important;
}
[data-theme="dark"] .form-label { color: #b0bec5; }
[data-theme="dark"] .modal-content { background: #1e2a45; color: #e0e0e0; border-color: #2a3a5c; }
[data-theme="dark"] .modal-header { background: #1565c0; }
[data-theme="dark"] .dropdown-menu { background: #1e2a45 !important; border-color: #2a3a5c !important; }
[data-theme="dark"] .dropdown-item { color: #e0e0e0 !important; }
[data-theme="dark"] .dropdown-item:hover { background: #2a3a5c !important; }
[data-theme="dark"] .dropdown-header { color: #9e9e9e; }
[data-theme="dark"] .breadcrumb-item, [data-theme="dark"] .breadcrumb-item a { color: #90caf9; }
[data-theme="dark"] .text-secondary { color: #9e9e9e !important; }
[data-theme="dark"] .alert-success { background: #1b3a2a; border-color: #2e7d52; color: #a5d6a7; }
[data-theme="dark"] .alert-danger  { background: #3a1b1b; border-color: #7d2e2e; color: #ef9a9a; }
[data-theme="dark"] .page-hdr { background: #1e2a45; border-color: #2a3a5c; }
[data-theme="dark"] .page-hdr-title { color: #e0e0e0; }

/* Theme toggle button (prompt spec) */
#theme-toggle {
  cursor: pointer;
  border: 1px solid var(--border-color-th, #d8e2ee);
  border-radius: 20px !important;
  padding: 4px 12px !important;
  width: auto !important; height: auto !important;
  display: inline-flex !important; align-items: center; gap: 6px;
  font-size: 13px;
  background: transparent;
  color: var(--text-primary-th, #33465d);
  transition: all 0.2s ease;
}
#theme-toggle:hover { background: var(--bg-secondary, #f6f9fd); }
#theme-toggle .icon-sun  { display: none; }
#theme-toggle .icon-moon { display: inline; }
[data-theme="dark"] #theme-toggle .icon-sun  { display: inline; }
[data-theme="dark"] #theme-toggle .icon-moon { display: none; }
[data-theme="dark"] #theme-toggle { border-color: #2a3a5c; color: #e0e0e0; }
.theme-label { font-size: 12px; font-weight: 600; }

/* ── App Shell ─────────────────────────────────────────────────── */
html, body { min-height: 100%; }
body {
    color: var(--text-body);
    background: var(--app-bg);
    font-family: var(--font-family);
    font-size: 14px;
    letter-spacing: 0;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); }

.app-layout {
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--app-bg);
}

/* ── Sidebar ────────────────────────────────────────────────────── */
.app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 30;
    width: var(--sidebar-width);
    height: 100vh;          /* FIX 2: exact height, not min */
    overflow-y: auto;       /* FIX 2: enable vertical scroll */
    overflow-x: hidden;
    color: var(--sidebar-text);
    background: var(--sidebar-bg);
    border-right: 1px solid var(--sidebar-border);
    /* Subtle scrollbar */
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.18) transparent;
}
.app-sidebar::-webkit-scrollbar { width: 4px; }
.app-sidebar::-webkit-scrollbar-track { background: transparent; }
.app-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.18); border-radius: 2px; }
.app-sidebar::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.35); }

.app-sidebar-inner {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: min-content;  /* FIX 2: shrink to content, no overflow blocking */
    padding: 12px;
    padding-bottom: 32px;     /* FIX 2: breathing room at bottom */
}
.app-sidebar-toggle {
    display: none;
    width: 36px; height: 36px;
    color: #d7e0ed; background: transparent;
    border: 1px solid #2c394b; border-radius: 4px;
    place-items: center;
}
.app-brand {
    width: 100%; padding: 2px 4px 14px;
    margin: 0; font-size: 0.92rem; font-weight: 800; line-height: 1;
}
.app-brand a {
    display: flex; align-items: center; gap: 10px;
    width: 100%; min-height: 34px; color: #ffffff !important;
    text-decoration: none;
}
.brand-mark {
    display: inline-grid; flex: 0 0 30px;
    width: 30px; height: 30px;
    color: #ffffff; background: var(--primary);
    border-radius: 4px; place-items: center;
    box-shadow: 0 8px 18px rgba(32,107,196,0.28);
}
.app-nav {
    display: flex; flex-direction: column;
    gap: 2px; width: 100%; padding: 0; margin: 0; list-style: none;
}
.nav-section-title {
    padding: 8px 6px 5px; margin: 4px 0 2px;
    font-size: 0.62rem; font-weight: 800; line-height: 1;
    color: var(--sidebar-text-muted);
    text-transform: uppercase; letter-spacing: 0.08em;
}
.sidebar-dark-nav .nav-item { width: 100%; }
.sidebar-dark-nav .nav-link {
    display: flex; align-items: center; width: 100%;
    min-height: 38px; padding: 0 12px;
    color: var(--sidebar-text) !important;
    font-size: 0.82rem; font-weight: 600; line-height: 1.2;
    border-radius: 4px; text-decoration: none;
    transition: background 0.12s, color 0.12s;
}
.sidebar-dark-nav .nav-link-icon {
    display: grid; flex: 0 0 20px;
    width: 20px; height: 20px;
    margin-right: 10px; font-size: 1rem; opacity: 0.9;
    place-items: center;
}
.sidebar-dark-nav .nav-link-title {
    min-width: 0; overflow: hidden;
    text-overflow: ellipsis; white-space: nowrap;
}
.sidebar-dark-nav .nav-link:hover,
.sidebar-dark-nav .nav-item.active .nav-link {
    color: #ffffff !important;
    background: var(--sidebar-active-bg) !important;
}

/* ── Main / Topbar ──────────────────────────────────────────────── */
.app-main {
    min-height: 100vh; min-height: 100dvh;
    width: calc(100% - var(--sidebar-width));
    margin-left: var(--sidebar-width) !important;
    display: flex; flex-direction: column;
    background: var(--app-bg);
}
.app-topbar {
    min-height: var(--topbar-height);
    background: var(--topbar-bg);
    border-bottom: 1px solid var(--topbar-border);
    box-shadow: 0 1px 0 rgba(22,34,51,0.03);
    position: sticky; top: 0; z-index: 20;
}
.app-topbar-inner {
    display: flex; align-items: center;
    justify-content: space-between;
    min-height: var(--topbar-height);
    padding: 0 24px;
}
.app-page-title {
    font-size: 0.88rem; font-weight: 800; color: var(--text-heading);
    letter-spacing: -0.01em;
}
.app-topbar-actions {
    display: flex; align-items: center; gap: 0.5rem; margin-left: auto;
}
.app-topbar-icon-btn {
    display: inline-grid; width: 34px; height: 34px;
    color: #33465d; background: #ffffff;
    border: 1px solid #d8e2ee; border-radius: 4px;
    place-items: center; text-decoration: none; cursor: pointer;
    transition: background 0.12s, border-color 0.12s;
}
.app-topbar-icon-btn:hover { background: #f6f9fd; border-color: #c6d5e7; }
.app-topbar-divider { width: 1px; height: 26px; margin: 0 0.15rem; background: #e2e9f2; }
.app-user-menu {
    display: flex; align-items: center;
    padding: 0.2rem 0.35rem 0.2rem 0.2rem !important;
    color: #27364a !important; font-size: 0.78rem; font-weight: 600;
    border: 1px solid #d8e2ee; border-radius: 4px;
    text-decoration: none; background: #ffffff;
    transition: background 0.12s;
}
.app-user-menu:hover { background: #f6f9fd; border-color: #c6d5e7; }
.app-user-name { line-height: 1; }
.app-topbar .avatar { width: 26px; height: 26px; font-size: 0.74rem; background: var(--primary) !important; }

/* ── Content ─────────────────────────────────────────────────────── */
.app-content {
    flex: 1 0 auto; padding: var(--content-padding);
    padding-bottom: 24px;
}
.dashboard-shell { max-width: none; padding: 0; }

/* ── Footer ──────────────────────────────────────────────────────── */
.app-footer {
    display: flex; align-items: center; justify-content: center;
    gap: 0.55rem; margin-top: auto;
    padding: 0.65rem 0.95rem;
    font-size: 0.75rem; font-weight: 600; color: #5f7288;
    background: linear-gradient(180deg,#ffffff 0%,#f7faff 100%);
    border: 1px solid #dce6f2; border-radius: 4px;
    box-shadow: 0 6px 16px rgba(22,34,51,0.04);
}
.app-footer-version {
    display: inline-flex; align-items: center;
    padding: 0.12rem 0.42rem; color: #355274;
    font-size: 0.7rem; font-weight: 700;
    background: #eaf2fb; border: 1px solid #cfdff1; border-radius: 4px;
}

/* ── Cards ───────────────────────────────────────────────────────── */
.dashboard-shell .card {
    background: var(--card-bg);
    border: 1px solid var(--card-border) !important;
    border-radius: var(--card-radius) !important;
    box-shadow: var(--card-shadow) !important;
    overflow: hidden;
}
.dashboard-shell .card-header {
    min-height: 48px; padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--card-border);
    background: var(--card-bg);
}
.dashboard-shell .card-title {
    font-size: 0.9rem; font-weight: 800; color: var(--text-heading); margin: 0;
}

/* ── Badges ──────────────────────────────────────────────────────── */
.badge { font-size: 0.7rem !important; font-weight: 700 !important; border-radius: 4px !important; padding: 0.28em 0.6em !important; text-transform: uppercase; letter-spacing: 0.04em; }
.badge-green  { background: var(--badge-green-bg)  !important; color: var(--badge-green-text)  !important; }
.badge-red    { background: var(--badge-red-bg)    !important; color: var(--badge-red-text)    !important; }
.badge-gray   { background: var(--badge-gray-bg)   !important; color: var(--badge-gray-text)   !important; }
.badge-blue   { background: var(--badge-blue-bg)   !important; color: var(--badge-blue-text)   !important; }
.badge-yellow { background: var(--badge-yellow-bg) !important; color: var(--badge-yellow-text) !important; }
.badge-orange { background: var(--badge-orange-bg) !important; color: var(--badge-orange-text) !important; }
.badge-purple { background: var(--badge-purple-bg) !important; color: var(--badge-purple-text) !important; }
.badge-outline-primary { background: transparent !important; color: var(--primary) !important; border: 1px solid var(--primary) !important; }
.record-count-badge { background: var(--badge-blue-bg) !important; color: var(--badge-blue-text) !important; }

/* ── Tables ──────────────────────────────────────────────────────── */
.table thead th {
    background: var(--table-header-bg) !important;
    color: var(--table-header-text) !important;
    font-size: 0.7rem !important; font-weight: 700 !important;
    text-transform: uppercase; letter-spacing: 0.06em;
    border-bottom: 1px solid var(--border) !important;
}
.table tbody td { font-size: 0.84rem; border-bottom-color: var(--table-row-border); }
.table-vcenter td, .table-vcenter th { vertical-align: middle; }
.table tbody tr:hover td { background: var(--table-row-hover); }

/* ── Form controls ───────────────────────────────────────────────── */
.form-control, .form-select {
    font-size: 0.84rem; border-color: var(--border-input);
    border-radius: 6px; transition: border-color 0.12s, box-shadow 0.12s;
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(32,107,196,0.15);
}
.form-label { font-size: 0.78rem; font-weight: 600; color: var(--text-body); }
.required-marker {
    position: relative; top: -0.45em; margin-left: 0.18rem;
    font-size: 0.72rem; font-weight: 700; color: #d63939;
}

/* ── Flash alerts ────────────────────────────────────────────────── */
.alert-flash { border-radius: 6px; font-size: 0.84rem; padding: 0.65rem 1rem; }
.alert-flash.success { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.alert-flash.error   { background: #fff1f2; border-color: #fecdd3; color: #9f1239; }
.alert-flash.warning { background: #fff7ed; border-color: #fed7aa; color: #9a3412; }
.alert-flash.info    { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }

/* ── Page header ─────────────────────────────────────────────────── */
.page-hdr {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem; margin-bottom: 1rem;
    padding: 0.9rem 1rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border); border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
}
.page-hdr-title { font-size: 1rem; font-weight: 800; color: var(--text-heading); margin: 0; }
.page-hdr-subtitle { font-size: 0.78rem; color: var(--text-muted); margin: 2px 0 0; }

/* ── Breadcrumb ──────────────────────────────────────────────────── */
.breadcrumb { font-size: 0.78rem; margin-bottom: 0.85rem; }

/* ── Welcome panel (dashboard) ───────────────────────────────────── */
.welcome-panel {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem; padding: 1.2rem 1.25rem;
    color: #ffffff;
    background: linear-gradient(125deg,#0f4d88 0%,#266db8 54%,#5a8fc9 100%);
    border-radius: 4px;
    box-shadow: 0 10px 22px rgba(21,49,80,0.18);
    margin-bottom: 1rem;
}
.welcome-panel h2 { margin: 0; font-size: 1.05rem; font-weight: 800; color: #fff; }
.welcome-panel p  { margin: 0.3rem 0 0; font-size: 0.8rem; color: rgba(255,255,255,0.87); }

/* ── Stat cards ──────────────────────────────────────────────────── */
.module-card .module-icon {
    display: inline-grid; width: 42px; height: 42px;
    border-radius: 4px; place-items: center; font-size: 1.1rem;
}
.module-card .module-title {
    font-size: 0.72rem; font-weight: 700; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.04em;
}
.module-card .module-value { font-size: 1.15rem; font-weight: 800; color: var(--text-heading); }
.module-card .module-meta  { font-size: 0.73rem; font-weight: 600; }

/* ── SMS counter bar ─────────────────────────────────────────────── */
.sms-counter-bar {
    display: flex; gap: 0; border: 1px solid var(--border-input);
    border-radius: 6px; overflow: hidden; font-size: 0.72rem;
    font-weight: 700; background: var(--app-bg); margin-top: 4px;
}
.sms-counter-bar .sms-counter-cell {
    flex: 1; padding: 0.3rem 0.5rem; text-align: center;
    border-right: 1px solid var(--border-input);
}
.sms-counter-bar .sms-counter-cell:last-child { border-right: none; }
.sms-counter-bar .sms-counter-label { color: var(--text-muted); font-size: 0.65rem; }
.sms-counter-bar .sms-counter-value { font-size: 0.82rem; font-weight: 800; color: var(--text-heading); }

/* ── Responsive ──────────────────────────────────────────────────── */
@media (min-width: 992px) {
    .app-sidebar-menu.collapse { display: block !important; height: auto !important; visibility: visible !important; }
}
@media (max-width: 991.98px) {
    .app-sidebar { position: sticky; top: 0; width: 100%; min-height: auto; }
    .app-sidebar-inner { min-height: auto; }
    .app-sidebar-toggle { display: grid; position: absolute; top: 11px; right: 12px; }
    .app-brand { width: calc(100% - 48px); padding-bottom: 4px; }
    .app-sidebar-menu { margin-top: 10px; }
    .app-main { width: 100%; margin-left: 0 !important; }
    .app-topbar-inner { padding: 0 16px; }
    .app-footer { flex-direction: column; gap: 0.35rem; }
}

/* ── Impersonation banner ─────────────────────────────────────────── */
.impersonation-banner {
    background: linear-gradient(135deg, #e65100, #f57c00);
    color: #ffffff;
    text-align: center;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 1100;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}
.impersonation-banner strong { font-weight: 800; }
.impersonation-banner .btn-exit-impersonation {
    padding: 3px 12px; font-size: 12px; font-weight: 700;
    background: rgba(255,255,255,0.2); border: 1px solid rgba(255,255,255,0.6);
    color: #fff; border-radius: 4px; cursor: pointer;
    transition: background 0.15s;
}
.impersonation-banner .btn-exit-impersonation:hover { background: rgba(255,255,255,0.35); }

/* ── Legacy data-bs-theme dark support (Tabler compatibility) ────── */
[data-bs-theme="dark"] body { background: var(--bg-secondary, #16213e); color: var(--text-primary-th, #e0e0e0); }
[data-bs-theme="dark"] .app-main { background: var(--bg-secondary, #16213e); }
[data-bs-theme="dark"] .app-topbar { background: var(--bg-topbar, #161b22) !important; border-bottom-color: var(--border-color-th, #2a3a5c); }
[data-bs-theme="dark"] .dashboard-shell .card { background: var(--bg-card, #1e2a45) !important; border-color: var(--border-color-th, #2a3a5c) !important; }
[data-bs-theme="dark"] .dashboard-shell .card-header { background: var(--bg-card, #1e2a45); border-bottom-color: var(--border-color-th, #2a3a5c); }
[data-bs-theme="dark"] .table thead th { background: var(--bg-table-header, #1565c0) !important; color: #ffffff !important; }
[data-bs-theme="dark"] .table tbody td { color: var(--text-primary-th, #e0e0e0); border-bottom-color: var(--border-color-th, #2a3a5c); }
[data-bs-theme="dark"] .form-control, [data-bs-theme="dark"] .form-select {
    background: var(--bg-input, #2a3a5c) !important; color: var(--text-primary-th, #e0e0e0) !important; border-color: var(--border-input-th, #3a4a6c) !important;
}

/* ── Login page ───────────────────────────────────────────────────── */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.login-card {
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.login-brand {
    text-align: center;
    margin-bottom: 28px;
}
.login-brand .brand-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    font-size: 28px;
    color: #ffffff;
}
.login-brand h1 {
    font-size: 22px;
    font-weight: 700;
    color: #1a2332;
    margin: 0 0 4px;
}
.login-brand p {
    font-size: 14px;
    color: #6b7a90;
    margin: 0;
}
.login-card .form-control {
    padding: 10px 14px;
    font-size: 15px;
    border-radius: 8px;
}
.login-card .btn-primary {
    padding: 12px;
    font-size: 15px;
    font-weight: 500;
    border-radius: 8px;
}
.alert-flash {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
}
.alert-flash.error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
