/**
 * HOA Management System — App Shell Overlay
 *
 * Visual-only adaptation of the existing shell (#header / #app-sidebar /
 * .main-content / #notification-panel / #global-search-overlay) inspired by
 * the reference SaaS design language. Brand stays HOA green.
 *
 * Strict rules followed:
 *   - Token-driven only — no hard-coded colors or shadows.
 *   - No DOM, JS, or PHP changes. All hooks and IDs preserved.
 *   - Layered after style.css; rules use !important only where Bootstrap
 *     or legacy style.css would otherwise win the cascade.
 *   - Dark mode comes for free via [data-theme="dark"] on existing tokens.
 *
 * Loaded from app/index.html after css/style.css and css/dashboard.css.
 */

/* ═══════════════════════════════════════════════════════════════════════════
   SHELL-LOCAL DESIGN TOKENS
   Scoped extras — derived from the global token system.
═══════════════════════════════════════════════════════════════════════════ */
:root {
    --shell-radius-lg: 16px;
    --shell-radius-md: 12px;
    --shell-radius-sm: 10px;
    --shell-radius-pill: 999px;

    --shell-ease: cubic-bezier(0.4, 0, 0.2, 1);
    --shell-transition: 0.2s var(--shell-ease);
    --shell-transition-slow: 0.3s var(--shell-ease);

    --shell-icon-btn-size: 38px;
    --shell-flyout-width: 240px;
    --shell-font: "Figtree", "Inter", -apple-system, BlinkMacSystemFont,
                  "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PAGE BACKGROUND + TYPOGRAPHY POLISH
═══════════════════════════════════════════════════════════════════════════ */
body {
    font-family: var(--shell-font);
    background: var(--bg-page);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ═══════════════════════════════════════════════════════════════════════════
   HEADER
═══════════════════════════════════════════════════════════════════════════ */
.header {
    background: var(--navbar-bg) !important;
    border-bottom: 1px solid var(--navbar-border) !important;
    box-shadow: var(--shadow-sm);
    backdrop-filter: saturate(180%) blur(8px);
    -webkit-backdrop-filter: saturate(180%) blur(8px);
    transition: background var(--shell-transition),
                border-color var(--shell-transition),
                box-shadow var(--shell-transition);
}

/* Tinted header surface so the brand, hamburger, and icon buttons read as
   distinct chrome instead of disappearing into the white page in light mode. */
:root .header {
    background: linear-gradient(180deg, #e2e8f0 0%, #cbd5e1 100%) !important;
    border-bottom: 1px solid rgba(15, 23, 42, 0.12) !important;
}
[data-theme="dark"] .header {
    background: var(--navbar-bg) !important;
}

.header .navbar-brand {
    color: var(--text-primary) !important;
    font-weight: 700;
    letter-spacing: -0.01em;
    transition: opacity var(--shell-transition);
}
.header .navbar-brand:hover { opacity: 0.85; }

.header .brand-text {
    font-size: 1rem;
    font-weight: 700;
}

.header .logo {
    border-radius: 8px;
    transition: transform var(--shell-transition);
}
.header .navbar-brand:hover .logo { transform: scale(1.04); }

/* ── Sidebar toggle + icon buttons ───────────────────────────────────── */
.header .sidebar-toggle-btn,
.header #notification-bell-btn,
.header #header-portal-qr-btn,
.header #theme-toggle-btn,
.header #global-search-btn-mobile {
    width: var(--shell-icon-btn-size);
    height: var(--shell-icon-btn-size);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--shell-radius-sm);
    color: #0f172a !important;
    background: #ffffff !important;
    border: 1px solid rgba(15, 23, 42, 0.25) !important;
    transition: background var(--shell-transition),
                color var(--shell-transition),
                border-color var(--shell-transition),
                transform var(--shell-transition);
}
[data-theme="dark"] .header .sidebar-toggle-btn,
[data-theme="dark"] .header #notification-bell-btn,
[data-theme="dark"] .header #header-portal-qr-btn,
[data-theme="dark"] .header #theme-toggle-btn,
[data-theme="dark"] .header #global-search-btn-mobile {
    color: var(--text-primary) !important;
    background: var(--bg-subtle) !important;
    border-color: var(--border-default) !important;
}

.header .sidebar-toggle-btn:hover,
.header #notification-bell-btn:hover,
.header #header-portal-qr-btn:hover,
.header #theme-toggle-btn:hover,
.header #global-search-btn-mobile:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.header .sidebar-toggle-btn:focus-visible,
.header #notification-bell-btn:focus-visible,
.header #header-portal-qr-btn:focus-visible,
.header #theme-toggle-btn:focus-visible,
.header #global-search-btn-mobile:focus-visible {
    outline: none;
    box-shadow: var(--shadow-focus);
}

.header .sidebar-toggle-btn i,
.header #notification-bell-btn i,
.header #header-portal-qr-btn i,
.header #theme-toggle-btn i {
    font-size: 1.05rem;
    line-height: 1;
    /* Force inheritance from the button so legacy style.css rules
       (e.g. .sidebar-toggle-btn i { color:#ffffff }) don't render the
       glyph invisible on the white header surface. */
    color: inherit !important;
}

/* ── Notification badge (red dot with count) ─────────────────────────── */
.header #notification-bell-btn .notification-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--color-red-500);
    color: var(--color-white);
    border: 2px solid var(--navbar-bg);
    border-radius: var(--shell-radius-pill);
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 14px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    animation: shellBadgePulse 2s ease-in-out infinite;
}

@keyframes shellBadgePulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.08); }
}

/* ── Global search pill (desktop) ────────────────────────────────────── */
.header .btn-search-global {
    height: var(--shell-icon-btn-size);
    padding: 0 14px 0 12px;
    min-width: 240px;
    border-radius: var(--shell-radius-pill);
    background: var(--bg-sunken);
    border: 1px solid var(--border-default);
    color: var(--text-secondary);
    font-size: 0.85rem;
    transition: background var(--shell-transition),
                border-color var(--shell-transition),
                box-shadow var(--shell-transition);
}
.header .btn-search-global:hover {
    background: var(--bg-surface);
    border-color: var(--brand-primary-border);
    box-shadow: var(--shadow-xs);
}
.header .btn-search-global .search-hint-text { color: var(--text-secondary); }
.header .btn-search-global kbd {
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    color: var(--text-secondary);
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 6px;
    box-shadow: 0 1px 0 var(--border-default);
}

/* ── Offline badge ───────────────────────────────────────────────────── */
.header #offline-badge {
    border-radius: var(--shell-radius-pill);
    padding: 6px 10px;
    font-weight: 600;
}

/* ── User dropdown trigger ───────────────────────────────────────────── */
.header .dropdown-toggle {
    height: var(--shell-icon-btn-size);
    padding: 0 12px 0 4px;
    border-radius: var(--shell-radius-pill);
    color: var(--text-primary) !important;
    transition: background var(--shell-transition),
                box-shadow var(--shell-transition);
}
.header .dropdown-toggle:hover {
    background: var(--bg-hover);
}
.header .header-avatar,
.header .header-avatar-initials {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--brand-primary);
    color: var(--brand-on-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 700;
    box-shadow: var(--shadow-xs);
}
.header #user-display-name {
    font-size: 0.88rem;
    font-weight: 600;
}

/* ── User dropdown menu ──────────────────────────────────────────────── */
.header .dropdown-menu {
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: var(--shell-radius-md);
    box-shadow: var(--shadow-lg);
    padding: 6px;
    margin-top: 8px;
    min-width: 220px;
}
.header .dropdown-menu .dropdown-item {
    border-radius: 8px;
    padding: 8px 12px;
    color: var(--text-primary);
    font-size: 0.88rem;
    transition: background var(--shell-transition),
                color var(--shell-transition);
}
.header .dropdown-menu .dropdown-item:hover,
.header .dropdown-menu .dropdown-item:focus {
    background: var(--bg-hover);
    color: var(--text-primary);
}
.header .dropdown-menu .dropdown-divider {
    margin: 6px 4px;
    border-color: var(--border-default);
}

/* ═══════════════════════════════════════════════════════════════════════════
   SIDEBAR
═══════════════════════════════════════════════════════════════════════════ */
.sidebar {
    background: var(--sidebar-bg) !important;
    border-right: 1px solid var(--sidebar-border) !important;
    box-shadow: var(--shadow-sm);
    transition: width var(--shell-transition-slow),
                background var(--shell-transition);
    overflow-x: hidden;
    overflow-y: auto;
}

/* Prevent Bootstrap's default `.nav { flex-wrap: wrap }` from spilling
   sidebar links into a second column when vertical space is tight.
   Also keep group lists from being squeezed by the parent flex column. */
.sidebar > ul.nav,
.sidebar .sidebar-group-items {
    flex-wrap: nowrap !important;
    flex-shrink: 0;
}

/* Group heading — caps + chevron */
.sidebar .sidebar-heading {
    color: rgba(255, 255, 255, 0.45) !important;
    font-size: 0.68rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 14px 18px 6px !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
    transition: color var(--shell-transition);
}
.sidebar .sidebar-heading:hover { color: rgba(255, 255, 255, 0.70) !important; }

.sidebar .sidebar-chevron {
    font-size: 0.7rem;
    transition: transform var(--shell-transition);
}
.sidebar .sidebar-heading.collapsed .sidebar-chevron {
    transform: rotate(-90deg);
}

.sidebar .sidebar-group-items {
    margin: 0 !important;
    padding: 0 8px !important;
    overflow: hidden;
    max-height: 1000px;
    flex-direction: column !important;
    transition: max-height var(--shell-transition-slow),
                opacity var(--shell-transition),
                padding var(--shell-transition);
}
.sidebar .sidebar-group-items.collapsed {
    max-height: 0;
    opacity: 0;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* Top-level Main group (no heading) */
.sidebar > ul.nav.flex-column:first-child {
    padding: 12px 8px 4px !important;
}

/* Nav links — pill style */
.sidebar .nav-item { margin: 2px 0; }

.sidebar .nav-link {
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding: 9px 12px !important;
    border-radius: var(--shell-radius-sm) !important;
    color: var(--sidebar-text) !important;
    font-size: 0.88rem;
    font-weight: 500;
    text-decoration: none;
    position: relative;
    transition: background var(--shell-transition),
                color var(--shell-transition),
                transform var(--shell-transition);
    white-space: nowrap;
    overflow: hidden;
}
.sidebar .nav-link i {
    font-size: 1.05rem;
    line-height: 1;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
    opacity: 0.85;
    transition: opacity var(--shell-transition),
                transform var(--shell-transition);
}
.sidebar .nav-link:hover {
    background: var(--sidebar-item-hover) !important;
    color: var(--sidebar-text-active) !important;
}
.sidebar .nav-link:hover i { opacity: 1; transform: scale(1.05); }

.sidebar .nav-link:focus-visible {
    outline: none;
    box-shadow: var(--shadow-focus);
    background: var(--sidebar-item-hover) !important;
}

/* Active route — left accent bar + tinted bg */
.sidebar .nav-link.active {
    background: var(--sidebar-item-active) !important;
    color: var(--sidebar-text-active) !important;
    font-weight: 600;
}
.sidebar .nav-link.active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 6px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--brand-primary);
}
.sidebar .nav-link.active i { opacity: 1; color: var(--brand-primary); }

/* Plan-locked links — keep dim but allow polish */
.sidebar .nav-link.plan-locked-link .badge {
    border-radius: var(--shell-radius-pill);
    padding: 2px 7px;
    font-weight: 700;
}

/* Communications red badge in sidebar */
.sidebar .comms-sidebar-badge {
    border-radius: var(--shell-radius-pill);
    padding: 2px 7px;
    font-weight: 700;
}

/* ── Collapsed sidebar (icon-only) — flyout submenus on hover ────────── */
body.sidebar-collapsed .sidebar .sidebar-heading {
    padding: 12px 0 4px !important;
    justify-content: center;
}
body.sidebar-collapsed .sidebar .sidebar-heading > span,
body.sidebar-collapsed .sidebar .sidebar-chevron {
    display: none;
}
body.sidebar-collapsed .sidebar .sidebar-heading::after {
    content: "";
    display: block;
    width: 22px;
    height: 1px;
    background: rgba(255, 255, 255, 0.10);
    margin: 0 auto;
}

body.sidebar-collapsed .sidebar .nav-link {
    justify-content: center;
    padding: 10px 0 !important;
    /* Strip text by zeroing the font; icon overrides below restore size. */
    font-size: 0;
    position: relative;
}
body.sidebar-collapsed .sidebar .nav-link > span,
body.sidebar-collapsed .sidebar .nav-link .badge {
    /* Hide labels & inline badges in collapsed rail */
    display: none;
}
body.sidebar-collapsed .sidebar .nav-link i {
    font-size: 1.15rem;
    width: auto;
}

/* Tooltip-style label hook (currently disabled — group flyout handles labels) */
body.sidebar-collapsed .sidebar .nav-link[href]:hover::after {
    content: attr(href);
    position: absolute;
    left: calc(100% + 8px);
    top: 50%;
    transform: translateY(-50%);
    background: var(--bg-elevated);
    color: var(--text-primary);
    border: 1px solid var(--border-default);
    border-radius: 8px;
    padding: 5px 10px;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: var(--shadow-md);
    z-index: 1100;
    pointer-events: none;
    /* Strip the "#/" prefix visually using a CSS counter trick wouldn't work
       across browsers; rely on the JS-rendered link.text via a data attr is
       not present on the link, so this fallback shows "#/dashboard" etc.
       We hide this in favor of the richer flyout for groups below. */
    display: none; /* keep disabled — group flyout handles labeling */
}

/* Flyout panel: when sidebar is collapsed, hovering a group reveals its
   items as a floating menu to the right of the rail. Pure CSS — no JS. */
body.sidebar-collapsed .sidebar .sidebar-group-items {
    position: absolute;
    left: var(--sidebar-width-collapsed, 64px);
    top: auto;
    margin-top: -8px;
    width: var(--shell-flyout-width);
    max-height: none;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(-6px);
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: var(--shell-radius-md);
    box-shadow: var(--shadow-lg);
    padding: 8px !important;
    z-index: 1090;
    transition: opacity var(--shell-transition),
                transform var(--shell-transition),
                visibility 0s linear var(--shell-transition);
}
body.sidebar-collapsed .sidebar .sidebar-heading:hover + .sidebar-group-items,
body.sidebar-collapsed .sidebar .sidebar-group-items:hover {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(0);
    transition: opacity var(--shell-transition),
                transform var(--shell-transition),
                visibility 0s linear 0s;
}
body.sidebar-collapsed .sidebar .sidebar-group-items .nav-link {
    justify-content: flex-start;
    padding: 8px 10px !important;
    font-size: 0.85rem;
    color: var(--text-primary) !important;
    border-radius: 8px;
}
body.sidebar-collapsed .sidebar .sidebar-group-items .nav-link > span,
body.sidebar-collapsed .sidebar .sidebar-group-items .nav-link .badge {
    display: inline-flex;
}
body.sidebar-collapsed .sidebar .sidebar-group-items .nav-link i {
    color: var(--brand-primary);
    opacity: 0.9;
    width: 20px;
}
body.sidebar-collapsed .sidebar .sidebar-group-items .nav-link:hover {
    background: var(--bg-hover) !important;
    color: var(--text-primary) !important;
}
body.sidebar-collapsed .sidebar .sidebar-group-items .nav-link.active {
    background: var(--brand-primary-subtle) !important;
    color: var(--brand-primary) !important;
}
body.sidebar-collapsed .sidebar .sidebar-group-items .nav-link.active::before {
    display: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   MAIN CONTENT
═══════════════════════════════════════════════════════════════════════════ */
.main-content {
    background: var(--bg-page);
    transition: padding var(--shell-transition-slow),
                margin var(--shell-transition-slow);
}

/* Custom scrollbars (sidebar + main) */
.sidebar,
.main-content {
    scrollbar-width: thin;
    scrollbar-color: var(--border-default) transparent;
}
.sidebar::-webkit-scrollbar,
.main-content::-webkit-scrollbar { width: 8px; }
.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.10);
    border-radius: 4px;
}
.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.20);
}
.main-content::-webkit-scrollbar-thumb {
    background: var(--border-default);
    border-radius: 4px;
}
.main-content::-webkit-scrollbar-thumb:hover {
    background: var(--border-strong);
}

/* ═══════════════════════════════════════════════════════════════════════════
   SIDEBAR OVERLAY (mobile)
═══════════════════════════════════════════════════════════════════════════ */
.sidebar-overlay {
    background: var(--bg-overlay) !important;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    transition: opacity var(--shell-transition);
}

/* ═══════════════════════════════════════════════════════════════════════════
   NOTIFICATION PANEL (header bell dropdown)
═══════════════════════════════════════════════════════════════════════════ */
.notification-panel {
    background: var(--bg-elevated) !important;
    border: 1px solid var(--border-default) !important;
    border-radius: var(--shell-radius-md) !important;
    box-shadow: var(--shadow-lg) !important;
    overflow: hidden;
    animation: shellPanelIn var(--shell-transition);
}

@keyframes shellPanelIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.notification-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-default);
    background: var(--bg-surface);
}

.notification-panel .notif-tabs {
    display: inline-flex;
    background: var(--bg-sunken);
    border: 1px solid var(--border-default);
    border-radius: var(--shell-radius-pill);
    padding: 3px;
    gap: 2px;
}
.notification-panel .notif-tab {
    background: transparent;
    border: none;
    padding: 5px 12px;
    border-radius: var(--shell-radius-pill);
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--shell-transition),
                color var(--shell-transition);
}
.notification-panel .notif-tab:hover { color: var(--text-primary); }
.notification-panel .notif-tab.active {
    background: var(--bg-elevated);
    color: var(--brand-primary);
    box-shadow: var(--shadow-xs);
}

.notification-panel .notification-panel-header .btn-link {
    color: var(--text-secondary) !important;
    text-decoration: none;
    border-radius: 8px;
    padding: 4px 8px;
    transition: background var(--shell-transition),
                color var(--shell-transition);
}
.notification-panel .notification-panel-header .btn-link:hover {
    background: var(--bg-hover);
    color: var(--text-primary) !important;
}

.notification-list {
    max-height: 420px;
    overflow-y: auto;
    padding: 4px;
    background: var(--bg-elevated);
}
.notification-list::-webkit-scrollbar { width: 6px; }
.notification-list::-webkit-scrollbar-thumb {
    background: var(--border-default);
    border-radius: 3px;
}

/* Individual notification item — soft hover lift */
.notification-list .notification-item,
.notification-list a,
.notification-list > .list-group-item {
    border-radius: var(--shell-radius-sm);
    border: 1px solid transparent !important;
    margin: 2px 0;
    padding: 10px 12px;
    background: transparent !important;
    color: var(--text-primary);
    transition: background var(--shell-transition),
                border-color var(--shell-transition),
                transform var(--shell-transition);
}
.notification-list .notification-item:hover,
.notification-list a:hover,
.notification-list > .list-group-item:hover {
    background: var(--bg-hover) !important;
    border-color: var(--border-default) !important;
    transform: translateX(2px);
}

/* ═══════════════════════════════════════════════════════════════════════════
   GLOBAL SEARCH OVERLAY (Ctrl+K)
═══════════════════════════════════════════════════════════════════════════ */
.global-search-overlay {
    background: var(--bg-overlay) !important;
    backdrop-filter: blur(6px) saturate(120%);
    -webkit-backdrop-filter: blur(6px) saturate(120%);
    animation: shellOverlayFade var(--shell-transition);
}
@keyframes shellOverlayFade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.global-search-dialog {
    background: var(--bg-elevated) !important;
    border: 1px solid var(--border-default) !important;
    border-radius: var(--shell-radius-lg) !important;
    box-shadow: var(--shadow-xl) !important;
    animation: shellDialogIn var(--shell-transition);
    overflow: hidden;
}
@keyframes shellDialogIn {
    from { opacity: 0; transform: translateY(-8px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.global-search-input-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-default);
    background: var(--bg-surface);
}
.global-search-input-wrapper i {
    font-size: 1.15rem;
    color: var(--text-secondary);
}
.global-search-input-wrapper input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-size: 1rem;
    color: var(--text-primary);
    font-family: inherit;
}
.global-search-input-wrapper input::placeholder { color: var(--text-muted); }
.global-search-input-wrapper kbd {
    background: var(--bg-sunken);
    border: 1px solid var(--border-default);
    color: var(--text-secondary);
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 6px;
}

.global-search-results {
    max-height: 60vh;
    overflow-y: auto;
    padding: 8px;
    background: var(--bg-elevated);
}

.search-empty-state {
    padding: 32px 20px;
    text-align: center;
    color: var(--text-muted);
}
.search-shortcut-hint {
    font-size: 0.78rem;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.search-shortcut-hint kbd {
    background: var(--bg-sunken);
    border: 1px solid var(--border-default);
    color: var(--text-secondary);
    font-size: 0.7rem;
    padding: 1px 6px;
    border-radius: 6px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SESSION IDLE WARNING TOAST
═══════════════════════════════════════════════════════════════════════════ */
.session-idle-warning {
    background: var(--bg-elevated) !important;
    border: 1px solid var(--color-amber-400) !important;
    border-left-width: 4px !important;
    border-radius: var(--shell-radius-md) !important;
    box-shadow: var(--shadow-lg) !important;
    color: var(--text-primary) !important;
    padding: 12px 16px !important;
    animation: shellPanelIn var(--shell-transition);
}
.session-idle-warning .btn {
    border-radius: var(--shell-radius-sm);
    font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════════════════════
   THEME TOGGLE — sun/moon icon transition
═══════════════════════════════════════════════════════════════════════════ */
#theme-toggle-btn i {
    transition: transform var(--shell-transition-slow),
                opacity var(--shell-transition);
}
#theme-toggle-btn:hover i { transform: rotate(15deg); }

/* ═══════════════════════════════════════════════════════════════════════════
   REDUCED MOTION
═══════════════════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
    .header,
    .sidebar,
    .sidebar .nav-link,
    .sidebar .sidebar-group-items,
    .sidebar .sidebar-chevron,
    .header .sidebar-toggle-btn,
    .header #notification-bell-btn,
    .header #theme-toggle-btn,
    .header #header-portal-qr-btn,
    .header .btn-search-global,
    .header .dropdown-toggle,
    .header .dropdown-menu .dropdown-item,
    .notification-panel,
    .notification-list .notification-item,
    .global-search-overlay,
    .global-search-dialog {
        animation: none !important;
        transition: none !important;
    }
    .header #notification-bell-btn .notification-badge { animation: none !important; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   PRINT — keep shell out of print output (existing .no-print already hides
   header/sidebar; this just ensures main-content prints clean)
═══════════════════════════════════════════════════════════════════════════ */
@media print {
    .main-content { background: #fff !important; }
}
