/* ============================================================
   MSCS Society ERP - Professional Corporate CSS
   ============================================================ */

/* ---------- CSS Variables ---------- */
:root {
    --sidebar-bg: #1e293b;
    --sidebar-hover: #334155;
    --sidebar-active: #3b82f6;
    --sidebar-text: #94a3b8;
    --sidebar-text-active: #ffffff;
    --sidebar-width: 260px;
    --sidebar-collapsed: 64px;

    --topbar-height: 60px;

    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-card: #ffffff;

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;

    --border-color: #e2e8f0;
    --border-radius: 8px;
    --border-radius-sm: 4px;
    --border-radius-lg: 12px;

    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #06b6d4;
    --purple: #8b5cf6;

    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);

    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --transition: 0.2s ease;
}

/* ---------- Dark Mode ---------- */
[data-theme="dark"] {
    --sidebar-bg: #0f172a;
    --sidebar-hover: #1e293b;
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-card: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    --border-color: #334155;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
    --shadow: 0 1px 3px rgba(0,0,0,0.4);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.4);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.5);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; -webkit-font-smoothing: antialiased; }
body {
    font-family: var(--font);
    background: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

.hidden { display: none !important; }

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }

/* ---------- LOGIN SCREEN ---------- */
.login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e293b 0%, #334155 50%, #1e293b 100%);
    padding: 1rem;
}
.login-card {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 420px;
    padding: 2.5rem;
}
.login-header {
    text-align: center;
    margin-bottom: 2rem;
}
.login-logo {
    width: 64px;
    height: 64px;
    background: var(--sidebar-bg);
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}
.login-logo .material-icons-outlined {
    font-size: 32px;
    color: #fff;
}
.login-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}
.login-subtitle {
    color: var(--text-muted);
    font-size: 0.875rem;
}
.login-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}
.login-footer p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ---------- FORMS ---------- */
.form-group {
    margin-bottom: 1rem;
    flex: 1;
}
.form-group label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.375rem;
}
.form-input,
.form-select {
    width: 100%;
    padding: 0.625rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.875rem;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}
textarea.form-input { resize: vertical; }
.form-select { cursor: pointer; }

/* Searchable Select Dropdown */
.searchable-select {
    position: relative;
    width: 100%;
}
.searchable-select .ss-input {
    width: 100%;
    padding: 0.625rem 2rem 0.625rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.875rem;
    transition: border-color var(--transition), box-shadow var(--transition);
    cursor: text;
}
.searchable-select .ss-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}
.searchable-select .ss-input::placeholder { color: var(--text-muted); }
.searchable-select .ss-arrow {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: var(--text-muted);
    pointer-events: none;
}
.searchable-select .ss-clear {
    position: absolute;
    right: 28px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: var(--text-muted);
    cursor: pointer;
    display: none;
    background: none;
    border: none;
    padding: 0;
    line-height: 1;
}
.searchable-select .ss-clear:hover { color: #ef4444; }
.searchable-select.has-value .ss-clear { display: block; }
.searchable-select .ss-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 220px;
    overflow-y: auto;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 var(--border-radius-sm) var(--border-radius-sm);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    z-index: 1000;
    display: none;
}
.searchable-select.ss-open .ss-dropdown { display: block; }
.searchable-select .ss-option {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    cursor: pointer;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-light);
    transition: background 0.1s;
}
.searchable-select .ss-option:last-child { border-bottom: none; }
.searchable-select .ss-option:hover,
.searchable-select .ss-option.ss-highlighted { background: var(--bg-hover); }
.searchable-select .ss-option.ss-selected { background: rgba(59,130,246,0.1); font-weight: 600; }
.searchable-select .ss-option small { color: var(--text-muted); margin-left: 0.5rem; }
.searchable-select .ss-empty {
    padding: 0.75rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.82rem;
}

.form-row {
    display: flex;
    gap: 1rem;
}
.input-icon {
    position: relative;
}
.input-icon .material-icons-outlined {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.125rem;
    color: var(--text-muted);
}
.input-icon input {
    width: 100%;
    padding: 0.625rem 0.75rem 0.625rem 2.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.875rem;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.input-icon input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    cursor: pointer;
}
.link-muted {
    font-size: 0.8125rem;
    color: var(--text-muted);
}
.link-muted:hover { color: var(--accent); }

.form-actions {
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* ---------- BUTTONS ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 0.8125rem;
    font-weight: 500;
    transition: all var(--transition);
    line-height: 1.5;
    white-space: nowrap;
}
.btn .material-icons-outlined { font-size: 1rem; }
.btn-primary {
    background: var(--accent);
    color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}
.btn-outline:hover { background: var(--bg-tertiary); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #059669; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-sm { padding: 0.25rem 0.625rem; font-size: 0.75rem; }
.btn-block { width: 100%; justify-content: center; padding: 0.75rem; font-size: 0.9375rem; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius-sm);
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    transition: all var(--transition);
}
.btn-icon:hover { background: var(--bg-tertiary); }
.btn-icon .material-icons-outlined { font-size: 1rem; }

.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- APP SHELL LAYOUT ---------- */
.app-shell {
    display: flex;
    min-height: 100vh;
}

/* ---------- SIDEBAR ---------- */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transition: width var(--transition);
    overflow-y: auto;
    overflow-x: hidden;
}
.sidebar.collapsed {
    width: var(--sidebar-collapsed);
}
.sidebar.collapsed .nav-text,
.sidebar.collapsed .brand-name,
.sidebar.collapsed .brand-sub,
.sidebar.collapsed .nav-section-label {
    display: none;
}
.sidebar.collapsed .sidebar-brand {
    justify-content: center;
    padding: 1rem 0.5rem;
}
.sidebar.collapsed .sidebar-brand > .material-icons-outlined { margin-right: 0; }
.sidebar.collapsed .nav-item { justify-content: center; padding: 0.625rem; }
.sidebar.collapsed .nav-item .material-icons-outlined { margin-right: 0; }

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    flex-shrink: 0;
}
.sidebar-brand > .material-icons-outlined {
    font-size: 1.75rem;
    color: var(--accent);
}
.brand-name {
    font-weight: 700;
    font-size: 1rem;
    color: #fff;
    display: block;
    line-height: 1.2;
}
.brand-sub {
    font-size: 0.6875rem;
    color: var(--sidebar-text);
    display: block;
}
.sidebar-collapse-btn {
    background: none;
    border: none;
    color: var(--sidebar-text);
    margin-left: auto;
    padding: 0.25rem;
    border-radius: var(--border-radius-sm);
    display: flex;
}
.sidebar-collapse-btn:hover { color: #fff; background: var(--sidebar-hover); }
.sidebar-collapse-btn .material-icons-outlined { font-size: 1.25rem; }

.sidebar-nav {
    flex: 1;
    padding: 0.75rem 0;
}
.nav-section-label {
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(148,163,184,0.6);
    padding: 1.25rem 1.25rem 0.375rem;
}
.nav-section-label.nav-collapsible {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
    border-radius: 6px;
    margin: 0 0.5rem;
    padding: 0.625rem 0.75rem 0.375rem;
    transition: background 0.15s;
}
.nav-section-label.nav-collapsible:hover {
    background: rgba(148,163,184,0.08);
    color: rgba(148,163,184,0.9);
}
.nav-section-arrow {
    font-size: 1rem;
    transition: transform 0.25s;
}
.nav-section-label.collapsed .nav-section-arrow {
    transform: rotate(-90deg);
}
.nav-section-items {
    overflow: hidden;
    max-height: 500px;
    transition: max-height 0.3s ease;
}
.nav-section-items.collapsed {
    max-height: 0;
}
.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5625rem 1.25rem;
    color: var(--sidebar-text);
    font-size: 0.8125rem;
    font-weight: 400;
    transition: all var(--transition);
    border-left: 3px solid transparent;
    text-decoration: none;
}
.nav-item:hover {
    color: #fff;
    background: var(--sidebar-hover);
}
.nav-item.active {
    color: var(--sidebar-text-active);
    background: rgba(59,130,246,0.1);
    border-left-color: var(--accent);
    font-weight: 500;
}
.nav-item .material-icons-outlined {
    font-size: 1.25rem;
    flex-shrink: 0;
}

/* ---------- MAIN WRAP ---------- */
.main-wrap {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-left var(--transition);
}
.sidebar.collapsed ~ .main-wrap {
    margin-left: var(--sidebar-collapsed);
}

/* ---------- TOPBAR (Two-Row Header) ---------- */
.topbar-info {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #1a2332 0%, #243447 100%);
    color: #fff;
    padding: 8px 20px;
    gap: 12px;
    min-height: 54px;
}
[data-theme="light"] .topbar-info {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}
.topbar-society {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}
.society-logo {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.15);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.society-logo .material-icons-outlined { font-size: 24px; color: #60a5fa; }
.society-logo img { width: 100%; height: 100%; object-fit: contain; border-radius: 8px; }
.society-details { line-height: 1.3; }
.society-name { font-size: 0.95rem; font-weight: 700; color: #fff; }
.society-meta { font-size: 0.68rem; color: rgba(255,255,255,0.6); }

.topbar-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.topbar-user-details { text-align: right; }
.topbar-user-name { font-size: 0.82rem; font-weight: 600; color: #fff; }
.topbar-user-role { font-size: 0.68rem; color: rgba(255,255,255,0.6); }
.topbar-user-info .topbar-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: all 0.15s;
    position: relative;
}
.topbar-user-info .topbar-btn:hover { background: rgba(255,255,255,0.1); color: #fff; }
.topbar-avatar-btn {
    cursor: pointer;
    display: flex;
    align-items: center;
}
.topbar-avatar-btn .user-avatar {
    width: 34px;
    height: 34px;
    border: 2px solid rgba(255,255,255,0.3);
}

/* Navigation bar (second row) */
.topbar-navbar {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    padding: 0 16px;
    display: flex;
    align-items: center;
    min-height: 40px;
    position: relative;
    z-index: 100;
}

/* Breadcrumb bar (below navbar) */
.topbar-breadcrumb {
    background: var(--bg-secondary);
    padding: 6px 24px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    border-bottom: 1px solid var(--border-color);
    min-height: 30px;
}
.topbar-breadcrumb a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s;
}
.topbar-breadcrumb a:hover {
    color: var(--text-primary);
    text-decoration: underline;
}
.topbar-breadcrumb .bc-sep {
    color: var(--text-muted);
    margin: 0 2px;
    font-size: 0.75rem;
}
.topbar-breadcrumb .bc-current {
    color: var(--text-primary);
    font-weight: 600;
}

/* OLD topbar compat */
.topbar {
    height: var(--topbar-height);
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: var(--shadow-sm);
}
.topbar-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 0.25rem;
}
.topbar-menu-btn .material-icons-outlined { font-size: 1.5rem; }

.topbar-title { flex: 1; overflow: hidden; }
.topbar-title h2 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Horizontal Navigation Bar */
.topbar-nav {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 1;
    white-space: nowrap;
    overflow: visible;
}

/* Menu items (section headers with dropdowns) */
.topbar-menu-wrap {
    position: relative;
}
.topbar-nav-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
    border: none;
    background: none;
    white-space: nowrap;
    flex-shrink: 0;
}
.topbar-nav-item:hover {
    background: var(--bg-muted);
    color: var(--text-primary);
}
.topbar-nav-item.active {
    background: rgba(59,130,246,0.12);
    color: var(--primary);
}
.topbar-nav-item .material-icons-outlined {
    font-size: 18px;
}

/* Dropdown under topbar sections */
.topbar-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 230px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    z-index: 9999;
    padding: 6px 0;
    animation: topDropIn 0.15s ease;
}
.topbar-menu-wrap.open > .topbar-dropdown,
.topbar-menu-wrap:focus-within > .topbar-dropdown {
    display: block;
}
@keyframes topDropIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.topbar-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.82rem;
    transition: background 0.12s;
}
.topbar-dropdown a:hover {
    background: var(--bg-muted);
    color: var(--text-primary);
}
.topbar-dropdown a .material-icons-outlined {
    font-size: 18px;
    color: var(--text-muted);
}
.topbar-dropdown a.topdd-active {
    background: rgba(59,130,246,0.08);
    color: var(--primary);
    font-weight: 600;
}
.topbar-dropdown a.topdd-active .material-icons-outlined {
    color: var(--primary);
}

/* Profile button in topbar */
.topbar-profile-btn {
    padding: 4px 10px !important;
    gap: 6px !important;
}
.topbar-profile-btn .user-avatar {
    flex-shrink: 0;
}

/* Right-align profile dropdown */
#topbarUser > .topbar-dropdown {
    left: auto;
    right: 0;
}
.topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.topbar-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 0.375rem;
    border-radius: var(--border-radius-sm);
    position: relative;
    display: flex;
}
.topbar-btn:hover { background: var(--bg-tertiary); color: var(--text-primary); }
.topbar-btn .material-icons-outlined { font-size: 1.25rem; }
.notif-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--danger);
    color: #fff;
    font-size: 0.625rem;
    font-weight: 600;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.375rem 0.5rem;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    position: relative;
    margin-left: 0.5rem;
    border-left: 1px solid var(--border-color);
    padding-left: 1rem;
}
.topbar-user:hover { background: var(--bg-tertiary); }
.user-avatar {
    width: 34px;
    height: 34px;
    background: var(--accent);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.8125rem;
}
.user-info { display: flex; flex-direction: column; }
.user-name { font-size: 0.8125rem; font-weight: 500; color: var(--text-primary); line-height: 1.2; }
.user-role { font-size: 0.6875rem; color: var(--text-muted); }

.user-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    min-width: 180px;
    z-index: 200;
    margin-top: 0.25rem;
}
.user-dropdown.show { display: block; }
.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}
.user-dropdown a:hover { background: var(--bg-tertiary); color: var(--text-primary); }
.user-dropdown a .material-icons-outlined { font-size: 1.125rem; }

/* ---------- CONTENT AREA ---------- */
.content {
    flex: 1;
    padding: 1.5rem;
}
.page { animation: fadeIn 0.2s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- CARDS ---------- */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
}
.card-header h3 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
}
.card-body {
    padding: 1.25rem;
}

/* ---------- STAT CARDS ---------- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}
.stat-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: attr(data-accent);
}
.stat-card[data-accent="#3b82f6"]::before { background: #3b82f6; }
.stat-card[data-accent="#10b981"]::before { background: #10b981; }
.stat-card[data-accent="#f59e0b"]::before { background: #f59e0b; }
.stat-card[data-accent="#ef4444"]::before { background: #ef4444; }
.stat-card[data-accent="#8b5cf6"]::before { background: #8b5cf6; }
.stat-card[data-accent="#06b6d4"]::before { background: #06b6d4; }

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--bg-tertiary);
}
.stat-card[data-accent="#3b82f6"] .stat-icon { background: rgba(59,130,246,0.1); color: #3b82f6; }
.stat-card[data-accent="#10b981"] .stat-icon { background: rgba(16,185,129,0.1); color: #10b981; }
.stat-card[data-accent="#f59e0b"] .stat-icon { background: rgba(245,158,11,0.1); color: #f59e0b; }
.stat-card[data-accent="#ef4444"] .stat-icon { background: rgba(239,68,68,0.1); color: #ef4444; }
.stat-card[data-accent="#8b5cf6"] .stat-icon { background: rgba(139,92,246,0.1); color: #8b5cf6; }
.stat-card[data-accent="#06b6d4"] .stat-icon { background: rgba(6,182,212,0.1); color: #06b6d4; }

.stat-icon .material-icons-outlined { font-size: 1.5rem; }
.stat-body { display: flex; flex-direction: column; }
.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}
.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* ---------- DATA TABLES ---------- */
.table-responsive { overflow-x: auto; }
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
}
.data-table thead th {
    background: var(--bg-tertiary);
    padding: 0.625rem 0.75rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
    position: sticky;
    top: 0;
}
.data-table tbody td {
    padding: 0.625rem 0.75rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    vertical-align: middle;
}
.data-table tbody tr:nth-child(even) {
    background: var(--bg-secondary);
}
.data-table tbody tr:hover {
    background: rgba(59,130,246,0.04);
}
.data-table tfoot td {
    padding: 0.75rem;
    border-top: 2px solid var(--border-color);
    background: var(--bg-tertiary);
}

/* Accounting table */
.accounting-table .text-right {
    font-variant-numeric: tabular-nums;
    font-family: 'Inter', monospace;
}
.total-row td {
    font-weight: 600;
}

/* ---------- BADGES ---------- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.1875rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 500;
    white-space: nowrap;
    line-height: 1.4;
}
.badge-success { background: rgba(16,185,129,0.1); color: #059669; }
.badge-warning { background: rgba(245,158,11,0.1); color: #d97706; }
.badge-danger  { background: rgba(239,68,68,0.1);  color: #dc2626; }
.badge-info    { background: rgba(59,130,246,0.1);  color: #2563eb; }
.badge-purple  { background: rgba(139,92,246,0.1);  color: #7c3aed; }
.badge-primary { background: rgba(99,102,241,0.1);  color: #4f46e5; }
.badge-default { background: var(--bg-tertiary);    color: var(--text-secondary); }
.badge-muted   { background: var(--bg-tertiary);    color: var(--text-muted); }

[data-theme="dark"] .badge-success { background: rgba(16,185,129,0.2); color: #34d399; }
[data-theme="dark"] .badge-warning { background: rgba(245,158,11,0.2); color: #fbbf24; }
[data-theme="dark"] .badge-danger  { background: rgba(239,68,68,0.2);  color: #f87171; }
[data-theme="dark"] .badge-info    { background: rgba(59,130,246,0.2);  color: #60a5fa; }
[data-theme="dark"] .badge-purple  { background: rgba(139,92,246,0.2);  color: #a78bfa; }
[data-theme="dark"] .badge-primary { background: rgba(99,102,241,0.2);  color: #818cf8; }
[data-theme="dark"] .badge-default { background: var(--bg-tertiary);    color: var(--text-secondary); }

/* Priority badges */
.priority-low { color: var(--success); }
.priority-medium { color: var(--warning); }
.priority-high { color: var(--danger); }
.priority-critical { color: #dc2626; font-weight: 700; }

/* ---------- PAGE TOOLBAR ---------- */
.page-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.toolbar-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.toolbar-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.search-box {
    position: relative;
}
.search-box .material-icons-outlined {
    position: absolute;
    left: 0.625rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.125rem;
    color: var(--text-muted);
}
.search-box input {
    padding: 0.5rem 0.75rem 0.5rem 2.25rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.8125rem;
    width: 240px;
    transition: border-color var(--transition);
}
.search-box input:focus {
    outline: none;
    border-color: var(--accent);
}

/* ---------- PAGINATION ---------- */
.pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    margin-top: 0.5rem;
}
.pagination button {
    min-width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-secondary);
    border-radius: var(--border-radius-sm);
    font-size: 0.8125rem;
    transition: all var(--transition);
    padding: 0 0.375rem;
}
.pagination button:hover { background: var(--bg-tertiary); }
.pagination button.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.pagination button:disabled { opacity: 0.4; cursor: default; }
.pagination .page-info {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0 0.5rem;
}

/* ---------- MODALS ---------- */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.5);
    z-index: 500;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    backdrop-filter: blur(2px);
}
.modal-overlay.show {
    display: flex;
}
.modal {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalIn 0.2s ease;
}
@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(-10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}
.modal-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}
.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    line-height: 1;
    padding: 0.125rem;
}
.modal-close:hover { color: var(--text-primary); }
.modal-body { padding: 1.5rem; }
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
    border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
}

/* ---------- TOAST NOTIFICATIONS ---------- */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
}
.toast {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    padding: 0.875rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    min-width: 280px;
    max-width: 400px;
    font-size: 0.8125rem;
    animation: toastIn 0.3s ease;
    pointer-events: auto;
}
.toast.removing { animation: toastOut 0.3s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateX(100%); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastOut { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(100%); } }
.toast-success { border-left: 4px solid var(--success); }
.toast-error   { border-left: 4px solid var(--danger); }
.toast-warning { border-left: 4px solid var(--warning); }
.toast-info    { border-left: 4px solid var(--accent); }
.toast .material-icons-outlined { font-size: 1.25rem; flex-shrink: 0; }
.toast-success .material-icons-outlined { color: var(--success); }
.toast-error .material-icons-outlined   { color: var(--danger); }
.toast-warning .material-icons-outlined { color: var(--warning); }
.toast-info .material-icons-outlined    { color: var(--accent); }
.toast-msg { flex: 1; color: var(--text-primary); }
.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    font-size: 1.125rem;
    line-height: 1;
}

/* ---------- GRID LAYOUTS ---------- */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

/* ---------- FACILITIES GRID ---------- */
.facility-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}
.facility-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.facility-card-icon {
    width: 40px;
    height: 40px;
    background: rgba(59,130,246,0.1);
    color: var(--accent);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
}
.facility-card-icon .material-icons-outlined { font-size: 1.25rem; }
.facility-card h4 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
}
.facility-card p {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.5;
}
.facility-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}
.facility-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}
.facility-meta .material-icons-outlined { font-size: 0.875rem; }

/* ---------- SOCIAL FEED ---------- */
.social-feed {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 720px;
}
.post-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}
.post-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
}
.post-avatar {
    width: 36px;
    height: 36px;
    background: var(--accent);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.8125rem;
    flex-shrink: 0;
}
.post-meta { flex: 1; }
.post-author { font-weight: 500; font-size: 0.875rem; color: var(--text-primary); }
.post-time { font-size: 0.75rem; color: var(--text-muted); }
.post-category {
    font-size: 0.6875rem;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    background: rgba(59,130,246,0.1);
    color: var(--accent);
    font-weight: 500;
}
.post-body {
    padding: 1rem 1.25rem;
}
.post-body h4 {
    font-size: 0.9375rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}
.post-body p {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.6;
}
.post-actions {
    display: flex;
    gap: 1rem;
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--border-color);
}
.post-action-btn {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.8125rem;
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius-sm);
    transition: all var(--transition);
}
.post-action-btn:hover { background: var(--bg-tertiary); color: var(--accent); }
.post-action-btn .material-icons-outlined { font-size: 1.125rem; }
.post-comments {
    padding: 0 1.25rem 1rem;
}
.comment-item {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem 0;
    border-top: 1px solid var(--border-color);
}
.comment-avatar {
    width: 28px;
    height: 28px;
    background: var(--bg-tertiary);
    color: var(--text-muted);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.625rem;
    font-weight: 600;
    flex-shrink: 0;
}
.comment-body { flex: 1; }
.comment-author { font-size: 0.75rem; font-weight: 500; color: var(--text-primary); }
.comment-text { font-size: 0.75rem; color: var(--text-secondary); }

.comment-input-wrap {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem 0;
    border-top: 1px solid var(--border-color);
}
.comment-input-wrap input {
    flex: 1;
    padding: 0.375rem 0.625rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.75rem;
}
.comment-input-wrap input:focus { outline: none; border-color: var(--accent); }

/* ---------- AD GRID ---------- */
.ad-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}
.ad-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.ad-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.ad-card h4 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
}
.ad-card p {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.5;
}
.ad-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-color);
}

/* ---------- REPORTS GRID ---------- */
.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}
.report-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
}
.report-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.report-card .material-icons-outlined {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 0.75rem;
}
.report-card h4 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.375rem;
}
.report-card p {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ---------- SETTINGS FORM ---------- */
.settings-form .form-row { margin-bottom: 0; }

/* ---------- LIVE INDICATOR ---------- */
.live-indicator {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--success);
}
.live-dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(16,185,129,0.5); }
    70% { box-shadow: 0 0 0 6px rgba(16,185,129,0); }
    100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); }
}

/* ---------- RATING STARS ---------- */
.rating {
    display: inline-flex;
    gap: 1px;
    color: #f59e0b;
}
.rating .material-icons-outlined { font-size: 0.875rem; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1024px) {
    .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width);
    }
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    .main-wrap {
        margin-left: 0;
    }
    .topbar-menu-btn { display: flex; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .page-toolbar { flex-direction: column; align-items: stretch; }
    .toolbar-left { flex-direction: column; }
    .search-box input { width: 100%; }
    .form-row { flex-direction: column; gap: 0; }
    .user-info { display: none; }
    .facility-grid { grid-template-columns: 1fr; }
    .reports-grid { grid-template-columns: repeat(2, 1fr); }
    .ad-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .reports-grid { grid-template-columns: 1fr; }
    .content { padding: 1rem; }
}

/* ---------- PRINT STYLES ---------- */
@media print {
    .sidebar, .topbar, .page-toolbar, .modal-overlay, .toast-container,
    .btn, .pagination, .search-box, .form-select { display: none !important; }
    .main-wrap { margin-left: 0 !important; }
    .content { padding: 0; }
    .card { border: 1px solid #ddd; box-shadow: none; break-inside: avoid; }
    .data-table { font-size: 10pt; }
    .data-table thead th { background: #f0f0f0 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .stat-card { break-inside: avoid; }
    .stats-grid { grid-template-columns: repeat(3, 1fr); }
    body { background: #fff; color: #000; }
    .badge { border: 1px solid #999; }
}

/* ---------- SCROLLBAR ---------- */
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

/* Table action buttons group */
.action-btns { display: flex; gap: 0.25rem; justify-content: flex-end; }

/* ---------- CATEGORY NAVIGATION STRIP ---------- */
.category-strip {
    background: #1a2332;
    position: sticky;
    top: var(--topbar-height);
    z-index: 100;
    overflow: visible;
}
[data-theme="light"] .category-strip {
    background: #1a2332;
}
.cat-strip-inner {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0 16px;
    overflow: visible;
}
.cat-strip-item {
    position: relative;
    flex-shrink: 0;
}
.cat-strip-label {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 11px 18px;
    font-size: 0.88rem;
    font-weight: 500;
    color: #ffffffcc;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.15s, background 0.15s;
    letter-spacing: 0.2px;
    border-bottom: 2px solid transparent;
}
.cat-strip-label:hover {
    color: #fff;
    background: rgba(255,255,255,0.08);
}
.cat-strip-label > .material-icons-outlined:first-child {
    display: none;
}
.cat-arrow {
    font-size: 16px !important;
    transition: transform 0.2s;
    color: #ffffff88;
    margin-left: 2px;
}
.cat-strip-item.open .cat-arrow {
    transform: rotate(180deg);
    color: #fff;
}
.cat-strip-item.open .cat-strip-label {
    color: #fff;
    background: rgba(255,255,255,0.1);
    border-bottom-color: #60a5fa;
}
.cat-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 230px;
    background: #1e2d3d;
    border: 1px solid rgba(255,255,255,0.1);
    border-top: 2px solid #60a5fa;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.35);
    z-index: 9999;
    padding: 4px 0;
}
.cat-strip-item.open .cat-dropdown {
    display: block;
}
.cat-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    font-size: 0.86rem;
    color: #ffffffcc;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
}
.cat-dropdown a:hover {
    background: rgba(96,165,250,0.15);
    color: #fff;
}
.cat-dropdown a .material-icons-outlined {
    font-size: 19px;
    opacity: 0.8;
    pointer-events: none;
}
.cat-dropdown a * {
    pointer-events: none;
}
.cat-strip-label * {
    pointer-events: none;
}
.cat-strip-label {
    pointer-events: auto;
}
@media (max-width: 768px) {
    .cat-strip-label {
        padding: 9px 12px;
        font-size: 0.8rem;
    }
    .cat-dropdown {
        min-width: 180px;
    }
}

/* ---------- BREADCRUMB STRIP ---------- */
.breadcrumb-strip {
    background: #151f2e;
    padding: 7px 28px;
    font-size: 0.82rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
[data-theme="light"] .breadcrumb-strip {
    background: #151f2e;
}
#breadcrumbTrail {
    display: flex;
    align-items: center;
    gap: 0;
    flex-wrap: wrap;
}
#breadcrumbTrail .bc-item {
    color: #60a5fa;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    padding: 2px 0;
    transition: color 0.12s;
}
#breadcrumbTrail .bc-item:hover {
    color: #93c5fd;
    text-decoration: underline;
}
#breadcrumbTrail .bc-item.bc-current {
    color: #ffffffcc;
    cursor: default;
    pointer-events: none;
    font-weight: 400;
}
#breadcrumbTrail .bc-sep {
    color: #ffffff44;
    font-size: 1rem;
    margin: 0 6px;
    user-select: none;
}

/* ---------- SECTION SUB-NAV ---------- */
.section-subnav {
    background: #1e2d3d;
    padding: 8px 28px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
#sectionSubnavItems {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.subnav-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    color: #ffffffcc;
    font-size: 0.83rem;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
    border: 1px solid rgba(255,255,255,0.1);
}
.subnav-item:hover {
    background: rgba(96,165,250,0.15);
    border-color: rgba(96,165,250,0.3);
    color: #fff;
}
.subnav-item.active {
    background: rgba(96,165,250,0.2);
    border-color: #60a5fa;
    color: #60a5fa;
}
.subnav-item .material-icons-outlined {
    font-size: 18px;
    pointer-events: none;
}

/* ---------- NOC CATEGORY PANELS ---------- */
.noc-type-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--bg-primary);
}
.noc-type-card:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(59,130,246,0.12);
    transform: translateY(-1px);
}
.noc-type-card strong {
    display: block;
    font-size: 0.88rem;
    line-height: 1.3;
    color: var(--text-primary);
}
.noc-type-card small {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}
/* Compact NOC cards */
.noc-type-card.noc-compact {
    padding: 8px 10px;
    gap: 8px;
}
.noc-type-card.noc-compact .material-icons-outlined {
    font-size: 22px;
}
.noc-type-card.noc-compact strong {
    font-size: 0.78rem;
    line-height: 1.2;
}
.noc-type-card.noc-compact small {
    font-size: 0.68rem;
    margin-top: 1px;
}
.noc-panel-body {
    transition: max-height 0.3s ease, padding 0.3s ease, opacity 0.2s ease;
    overflow: hidden;
}
.noc-panel-body.collapsed {
    max-height: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    opacity: 0;
}
.noc-panel-arrow {
    transition: transform 0.3s ease;
    color: var(--text-muted);
}
.noc-panel-arrow.rotated {
    transform: rotate(180deg);
}

/* ── Member Dashboard ── */
.md-notice-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
}
.md-notice-item:last-child { border-bottom: none; }
.md-notice-item:hover { background: var(--bg-muted); }
.md-notice-item .md-notice-title {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.3;
}
.md-notice-item .md-notice-meta {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 2px;
}
.md-booking-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
}
.md-booking-item:last-child { border-bottom: none; }
.md-booking-date {
    text-align: center;
    min-width: 48px;
    padding: 4px 8px;
    background: var(--primary);
    color: #fff;
    border-radius: 6px;
    font-size: 0.7rem;
    line-height: 1.3;
    flex-shrink: 0;
}
.md-booking-date strong { display: block; font-size: 1.1rem; }
.md-activity-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 9px 16px;
    border-bottom: 1px solid var(--border);
}
.md-activity-item:last-child { border-bottom: none; }
.md-activity-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 5px;
    flex-shrink: 0;
}
.md-activity-item .md-act-title {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.3;
}
.md-activity-item .md-act-meta {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 1px;
}
@media (max-width: 1024px) {
    #memberDashboard .grid-2 { grid-template-columns: 1fr; }
    #memberDashboard [style*="grid-template-columns: 1fr 1fr 1fr"] { grid-template-columns: 1fr !important; }
}

/* ── Tab Strip ── */
.tab-strip {
    display: flex;
    gap: 0.25rem;
    border-bottom: 2px solid var(--border);
    padding-bottom: 0;
}
.tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.6rem 1.1rem;
    border: none;
    background: none;
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.2s, border-color 0.2s;
}
.tab-btn:hover {
    color: var(--primary);
}
.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* ── Voice Input ── */
.voice-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.voice-input-wrap .form-input {
    padding-right: 2.5rem;
}
.voice-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: var(--bg-muted);
    color: var(--text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 0;
}
.voice-btn:hover {
    background: var(--primary);
    color: #fff;
}
.voice-btn.listening {
    background: #dc2626;
    color: #fff;
    animation: voice-pulse 1s infinite;
}
.voice-btn .material-icons-outlined {
    font-size: 18px;
}
@keyframes voice-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(220,38,38,0.4); }
    50% { box-shadow: 0 0 0 8px rgba(220,38,38,0); }
}
.voice-status {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.85);
    color: #fff;
    padding: 10px 24px;
    border-radius: 24px;
    font-size: 0.85rem;
    z-index: 10000;
    display: none;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(8px);
}
.voice-status.active {
    display: flex;
}
.voice-status .voice-wave {
    display: flex;
    align-items: center;
    gap: 2px;
    height: 16px;
}
.voice-status .voice-wave span {
    display: block;
    width: 3px;
    background: #dc2626;
    border-radius: 2px;
    animation: voice-bar 0.6s ease-in-out infinite alternate;
}
.voice-status .voice-wave span:nth-child(2) { animation-delay: 0.15s; }
.voice-status .voice-wave span:nth-child(3) { animation-delay: 0.3s; }
.voice-status .voice-wave span:nth-child(4) { animation-delay: 0.45s; }
@keyframes voice-bar {
    from { height: 4px; }
    to   { height: 16px; }
}
