/* ==========================================================================
   MEANOK HOTEL MANAGEMENT SYSTEM (MEANOK HMS) — Executive Portal Design v2.5
   Owner: MEANOK NOVACORE LTD | Reference Visual Architecture:
   Midnight Navy Sidebar, Pure White 64px Header, Ice-Mist Canvas (#edf2f9),
   Jewel-Gradient KPI Tiles, Live SVG Charts, Persistent License Status Bar
   ========================================================================== */

:root {
    --navy-950: #05132f;
    --navy-900: #081d45;
    --navy-800: #0f2c63;
    --navy-700: #17408b;
    --blue-600: #1677ff;
    --blue-500: #1d86ff;
    --cyan-600: #1677ff;
    --cyan-500: #0ea5e9;
    --cyan-400: #38bdf8;
    --cyan-100: #e0f2fe;
    --cyan-50: #f0f7ff;
    --bg-canvas: #edf2f9;
    --surface: #ffffff;
    --surface-subtle: #f6f9fd;
    --border: #e2eaf4;
    --border-strong: #cddae9;
    --text-main: #0f1f3d;
    --text-secondary: #334a6e;
    --text-muted: #647896;
    --success: #16a34a;
    --success-bg: #dcfce7;
    --warning: #f59e0b;
    --warning-bg: #fef3c7;
    --danger: #ef4444;
    --danger-bg: #fee2e2;
    --purple: #7c3aed;
    --purple-bg: #ede9fe;
    --pink: #ec4899;
    --orange: #f97316;
    --sidebar-w: 258px;
    --topbar-h: 64px;
    --statusbar-h: 40px;
    --radius-xl: 18px;
    --radius-lg: 15px;
    --radius-md: 11px;
    --radius-sm: 8px;
    --shadow-xs: 0 1px 3px rgba(15, 31, 61, 0.04);
    --shadow-sm: 0 2px 12px rgba(15, 39, 78, 0.055);
    --shadow-md: 0 8px 26px rgba(15, 39, 78, 0.09);
    --shadow-lg: 0 16px 42px rgba(15, 39, 78, 0.14);
    --shadow-glow: 0 6px 20px rgba(22, 119, 255, 0.34);
    --transition: all 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="dark"] {
    --bg-canvas: #071225;
    --surface: #0e1e38;
    --surface-subtle: #132746;
    --border: #1e375e;
    --border-strong: #2a4876;
    --text-main: #eef5ff;
    --text-secondary: #cbd9ee;
    --text-muted: #8ea7c7;
    --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.28);
    --shadow-md: 0 8px 28px rgba(0, 0, 0, 0.38);
}

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
    background: var(--bg-canvas);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    transition: background 0.25s ease, color 0.25s ease;
}

/* Animations */
@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes shimmerBg {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.55); }
    50% { box-shadow: 0 0 0 7px rgba(22, 163, 74, 0); }
}
@keyframes pulseOverdue {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5); }
    50% { box-shadow: 0 0 0 11px rgba(239, 68, 68, 0); }
}
@keyframes floatSlow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}
@keyframes cardScan {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(220%); }
}

.animate-in { animation: fadeSlideUp 0.36s cubic-bezier(0.22, 1, 0.36, 1) both; }
.stagger-1 { animation-delay: 0.03s; }
.stagger-2 { animation-delay: 0.07s; }
.stagger-3 { animation-delay: 0.11s; }
.stagger-4 { animation-delay: 0.15s; }
.stagger-5 { animation-delay: 0.19s; }

/* ==========================================================================
   APP SHELL — MIDNIGHT NAVY SIDEBAR + WHITE TOPBAR + PERSISTENT STATUS BAR
   ========================================================================== */
.hms-shell { display: flex; min-height: 100vh; }

.hms-sidebar {
    width: var(--sidebar-w);
    background: linear-gradient(180deg, var(--navy-900) 0%, #07183a 62%, var(--navy-950) 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: var(--statusbar-h);
    z-index: 50;
    transition: var(--transition);
    box-shadow: 4px 0 24px rgba(5, 19, 47, 0.18);
}

.hms-brand {
    height: var(--topbar-h);
    padding: 0 16px;
    display: flex;
    align-items: center;
    gap: 11px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}
.hms-brand img {
    width: 38px; height: 38px;
    border-radius: 50%;
    object-fit: cover;
    background: #fff;
    border: 2px solid rgba(56, 189, 248, 0.75);
    box-shadow: 0 0 14px rgba(14, 165, 233, 0.35);
    flex-shrink: 0;
}
.hms-brand-text { min-width: 0; }
.hms-brand-text strong {
    display: block; font-size: 14.5px; font-weight: 800; letter-spacing: 0.3px;
    color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hms-brand-text span {
    display: block; font-size: 9.5px; color: #7dd3fc; text-transform: uppercase;
    letter-spacing: 0.75px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.hms-nav { flex: 1; overflow-y: auto; padding: 10px 10px 16px; }
.hms-nav::-webkit-scrollbar { width: 4px; }
.hms-nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.16); border-radius: 4px; }

.hms-nav-section {
    font-size: 10px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 1px; color: rgba(147, 197, 253, 0.48);
    padding: 12px 12px 5px;
}

.hms-nav a, .hms-nav-group-btn {
    width: 100%;
    display: flex; align-items: center; gap: 11px;
    padding: 9px 13px; margin-bottom: 2px;
    color: rgba(236, 244, 255, 0.86);
    text-decoration: none; border-radius: 10px;
    font-size: 13.5px; font-weight: 500;
    transition: var(--transition);
    border: none; background: transparent; cursor: pointer; text-align: left;
    font-family: inherit;
}
.hms-nav a svg, .hms-nav-group-btn svg.nav-ico {
    width: 18px; height: 18px; flex-shrink: 0;
    stroke: currentColor; fill: none; stroke-width: 1.85;
    stroke-linecap: round; stroke-linejoin: round; opacity: 0.92;
}
.hms-nav a:hover, .hms-nav-group-btn:hover {
    background: rgba(255, 255, 255, 0.09);
    color: #fff;
}
.hms-nav a.active {
    background: linear-gradient(90deg, var(--cyan-600) 0%, var(--cyan-500) 100%);
    color: #fff; font-weight: 600;
    box-shadow: 0 5px 16px rgba(22, 119, 255, 0.44);
}
.hms-nav a.active svg { opacity: 1; }

.hms-nav-group-btn .nav-chev {
    margin-left: auto; width: 15px; height: 15px; opacity: 0.65;
    transition: transform 0.2s ease;
    stroke: currentColor; fill: none; stroke-width: 2;
}
.hms-nav-group.open > .hms-nav-group-btn .nav-chev { transform: rotate(180deg); opacity: 1; }
.hms-nav-sub {
    display: none;
    padding: 2px 0 4px 16px;
    margin-left: 14px;
    border-left: 1px solid rgba(147, 197, 253, 0.18);
}
.hms-nav-group.open > .hms-nav-sub { display: block; }
.hms-nav-sub a { padding: 7px 11px; font-size: 12.8px; color: rgba(219, 234, 254, 0.78); }
.hms-nav-sub a.active { background: rgba(22, 119, 255, 0.32); box-shadow: none; color: #fff; }

.hms-sidebar-footer { display: none; }

/* Main Column */
.hms-main {
    flex: 1;
    margin-left: var(--sidebar-w);
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding-bottom: var(--statusbar-h);
}

/* Pure White 64px Top Header Bar */
.hms-topbar {
    height: var(--topbar-h);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; position: sticky; top: 0; z-index: 40;
    box-shadow: 0 1px 4px rgba(15, 31, 61, 0.03);
}
.hms-topbar-left { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; }
.topbar-icon-btn {
    width: 38px; height: 38px; border-radius: 10px;
    border: 1px solid transparent; background: transparent;
    color: var(--text-secondary); cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    position: relative; transition: var(--transition); text-decoration: none;
}
.topbar-icon-btn:hover { background: var(--surface-subtle); border-color: var(--border); color: var(--cyan-600); }
.topbar-icon-btn svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

.topbar-search {
    position: relative; width: 100%; max-width: 420px;
}
.topbar-search svg {
    position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
    width: 16px; height: 16px; stroke: var(--text-muted); fill: none; stroke-width: 2; pointer-events: none;
}
.topbar-search input {
    width: 100%; height: 38px; padding: 0 46px 0 38px;
    border-radius: 10px; border: 1px solid var(--border);
    background: var(--bg-canvas); color: var(--text-main);
    font-size: 13.2px; transition: var(--transition); font-family: inherit;
}
.topbar-search input:focus {
    outline: none; background: var(--surface); border-color: var(--cyan-500);
    box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.14);
}
.topbar-search kbd {
    position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
    font-size: 10.5px; font-weight: 700; color: var(--text-muted);
    background: var(--surface); border: 1px solid var(--border);
    padding: 1px 6px; border-radius: 5px; pointer-events: none;
}

.hms-topbar-right { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.notif-badge {
    position: absolute; top: 4px; right: 4px;
    min-width: 17px; height: 17px; padding: 0 4px;
    border-radius: 999px; background: #ef4444; color: #fff;
    font-size: 10px; font-weight: 800; display: flex; align-items: center; justify-content: center;
    border: 2px solid var(--surface);
}

.topbar-profile-wrap { position: relative; margin-left: 6px; padding-left: 12px; border-left: 1px solid var(--border); }
.topbar-profile-btn {
    display: flex; align-items: center; gap: 10px;
    background: transparent; border: none; cursor: pointer; padding: 4px 6px; border-radius: 10px;
    transition: var(--transition); text-align: left; font-family: inherit;
}
.topbar-profile-btn:hover { background: var(--surface-subtle); }
.profile-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: linear-gradient(135deg, var(--navy-800), var(--cyan-600));
    color: #fff; font-weight: 800; font-size: 13.5px;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(22, 119, 255, 0.25);
}
.profile-meta strong { display: block; font-size: 13px; color: var(--text-main); line-height: 1.2; }
.profile-meta span { display: block; font-size: 11px; color: var(--text-muted); }

.profile-dropdown {
    position: absolute; right: 0; top: calc(100% + 8px); width: 235px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 14px; box-shadow: var(--shadow-lg); padding: 8px;
    display: none; z-index: 80;
}
.profile-dropdown.open { display: block; animation: fadeSlideUp 0.18s ease; }
.profile-dropdown a, .profile-dropdown button.drop-item {
    width: 100%; display: flex; align-items: center; gap: 9px;
    padding: 9px 11px; border-radius: 9px; text-decoration: none;
    color: var(--text-main); font-size: 13px; font-weight: 600;
    border: none; background: transparent; cursor: pointer; text-align: left; font-family: inherit;
}
.profile-dropdown a:hover, .profile-dropdown button.drop-item:hover { background: var(--bg-canvas); color: var(--cyan-600); }
.profile-dropdown .drop-divider { height: 1px; background: var(--border); margin: 6px 0; }

/* Main Content Area */
.hms-content { padding: 20px 24px 28px; flex: 1; }

/* Reference Page Welcome / Title Header Strip */
.page-header-bar {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 14px; margin-bottom: 18px;
}
.page-header-bar h1 {
    margin: 0; font-size: 24px; font-weight: 800; color: var(--text-main); letter-spacing: -0.35px;
    display: flex; align-items: center; gap: 8px;
}
.page-header-bar p { margin: 2px 0 0; font-size: 13.5px; color: var(--text-muted); }
.header-pills { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.header-pill {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 13px; padding: 9px 15px;
    display: flex; align-items: center; gap: 11px;
    box-shadow: var(--shadow-xs);
}
.header-pill-ico {
    width: 34px; height: 34px; border-radius: 9px;
    background: var(--cyan-50); color: var(--cyan-600);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.header-pill-ico svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 1.9; }
.header-pill strong { display: block; font-size: 13px; color: var(--text-main); line-height: 1.25; }
.header-pill span { display: block; font-size: 11.5px; color: var(--text-muted); }

/* Persistent Bottom Enterprise Status Bar */
.hms-statusbar {
    position: fixed; left: 0; right: 0; bottom: 0;
    height: var(--statusbar-h);
    display: flex; z-index: 60;
    border-top: 1px solid var(--border);
    background: var(--surface);
    font-size: 12px;
}
.statusbar-left {
    width: var(--sidebar-w);
    background: var(--navy-950);
    color: rgba(226, 238, 255, 0.78);
    display: flex; align-items: center; padding: 0 16px; gap: 8px;
    font-size: 11.5px; font-weight: 600; flex-shrink: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.statusbar-right {
    flex: 1; display: flex; align-items: center; justify-content: flex-end;
    padding: 0 24px; gap: 18px; color: var(--text-secondary); font-weight: 600;
    overflow-x: auto; white-space: nowrap;
}
.statusbar-sep { color: var(--border-strong); }
.status-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-right: 5px; }
.status-dot-green { background: #16a34a; box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.2); }
.status-dot-amber { background: #f59e0b; box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.22); }
.status-dot-red { background: #ef4444; box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.22); }

/* Support Banner */
.support-banner {
    background: linear-gradient(90deg, #991b1b, #dc2626);
    color: #fff; padding: 9px 24px;
    display: flex; align-items: center; justify-content: space-between;
    font-size: 13px; font-weight: 600;
}

/* ==========================================================================
   GRIDS, CARDS & JEWEL-ICON KPI TILES (REFERENCE SCREENSHOT STYLE)
   ========================================================================== */
.grid-5 { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-bottom: 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-bottom: 18px; }
.grid-chart-row { display: grid; grid-template-columns: 1.65fr 1fr; gap: 18px; margin-bottom: 18px; }
.grid-ops-row { display: grid; grid-template-columns: 1fr 1.32fr 1fr; gap: 18px; margin-bottom: 18px; }
.grid-pos { display: grid; grid-template-columns: 1.45fr 1fr; gap: 18px; margin-bottom: 18px; }

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    margin-bottom: 18px;
}
.grid-2 > .card, .grid-3 > .card, .grid-chart-row > .card, .grid-ops-row > .card, .grid-pos > .card { margin-bottom: 0; }
.card:hover { box-shadow: var(--shadow-md); }

.card-header {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; margin-bottom: 15px; padding-bottom: 11px;
    border-bottom: 1px solid var(--border);
}
.card-header h2, .card-header h3 {
    margin: 0; font-size: 15.5px; font-weight: 700; color: var(--text-main);
    display: flex; align-items: center; gap: 8px;
}
.card-header .view-all-link {
    font-size: 12.5px; font-weight: 700; color: var(--cyan-600); text-decoration: none;
}
.card-header .view-all-link:hover { text-decoration: underline; }

/* Vibrant Jewel KPI Cards matching Reference Screenshot */
.kpi-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px 16px 14px;
    display: flex; align-items: flex-start; gap: 13px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    min-width: 0;
}
.kpi-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: #c5daf7; }

.kpi-icon {
    width: 48px; height: 48px; border-radius: 13px;
    display: flex; align-items: center; justify-content: center;
    font-size: 21px; flex-shrink: 0; color: #fff;
    box-shadow: 0 6px 14px rgba(15, 31, 61, 0.14);
}
.kpi-icon svg { width: 23px; height: 23px; stroke: #fff; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.kpi-blue   { background: linear-gradient(135deg, #2584ff 0%, #0d62e6 100%); box-shadow: 0 6px 14px rgba(22, 119, 255, 0.28); }
.kpi-purple { background: linear-gradient(135deg, #9333ea 0%, #6d28d9 100%); box-shadow: 0 6px 14px rgba(124, 58, 237, 0.28); }
.kpi-green  { background: linear-gradient(135deg, #22c55e 0%, #15803d 100%); box-shadow: 0 6px 14px rgba(22, 163, 74, 0.26); }
.kpi-orange, .kpi-amber { background: linear-gradient(135deg, #fb923c 0%, #ea580c 100%); box-shadow: 0 6px 14px rgba(249, 115, 22, 0.28); }
.kpi-pink   { background: linear-gradient(135deg, #f43f5e 0%, #db2777 100%); box-shadow: 0 6px 14px rgba(236, 72, 153, 0.28); }

.kpi-body { flex: 1; min-width: 0; }
.kpi-label { font-size: 12px; color: var(--text-muted); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-value { font-size: 22px; font-weight: 800; color: var(--text-main); line-height: 1.18; margin: 2px 0; letter-spacing: -0.4px; }
.kpi-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 6px; }
.kpi-sub { font-size: 11px; color: var(--text-muted); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trend-pill {
    display: inline-flex; align-items: center; gap: 2px;
    padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap;
}
.trend-up { background: #dcfce7; color: #15803d; }
.trend-info { background: #e0f2fe; color: #0369a1; }
.trend-warn { background: #fef3c7; color: #b45309; }
.trend-down { background: #fee2e2; color: #b91c1c; }

/* Activity Timeline (Today's Activities) */
.activity-timeline { display: flex; flex-direction: column; gap: 0; position: relative; }
.activity-item {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 9px 0; position: relative;
}
.activity-item:not(:last-child)::before {
    content: ""; position: absolute; left: 15px; top: 38px; bottom: -2px;
    width: 2px; background: var(--border);
}
.activity-ico {
    width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; font-size: 13px; color: #fff;
    position: relative; z-index: 1;
}
.activity-ico.act-green  { background: #22c55e; }
.activity-ico.act-blue   { background: #1d86ff; }
.activity-ico.act-purple { background: #8b5cf6; }
.activity-ico.act-orange { background: #f97316; }
.activity-body { flex: 1; min-width: 0; }
.activity-title { font-size: 13px; font-weight: 700; color: var(--text-main); line-height: 1.3; }
.activity-meta { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }

/* Pending Task Checklist */
.task-list { display: flex; flex-direction: column; gap: 8px; }
.task-row {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 9px 10px; border-radius: 10px; background: var(--surface-subtle);
    border: 1px solid var(--border); transition: var(--transition);
}
.task-row:hover { border-color: #c5daf7; background: var(--cyan-50); }
.task-left { display: flex; align-items: center; gap: 9px; min-width: 0; font-size: 13px; font-weight: 600; color: var(--text-main); }
.task-box { width: 16px; height: 16px; border-radius: 5px; border: 2px solid #94a3b8; flex-shrink: 0; }

/* Donut Chart Legend */
.donut-wrap { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; padding: 6px 4px; }
.donut-legend { flex: 1; min-width: 175px; display: flex; flex-direction: column; gap: 11px; }
.donut-legend-row { display: flex; align-items: center; justify-content: space-between; font-size: 13px; }
.donut-legend-left { display: flex; align-items: center; gap: 8px; color: var(--text-secondary); font-weight: 600; }
.legend-swatch { width: 11px; height: 11px; border-radius: 3px; flex-shrink: 0; }
.donut-legend-vals { display: flex; align-items: center; gap: 12px; }
.donut-legend-vals strong { color: var(--text-main); font-size: 13.5px; }
.donut-legend-vals span { color: var(--text-muted); font-size: 12px; width: 42px; text-align: right; }

/* Hero Banner (Preserved cleanly for Super Admin & Accent Modules) */
.hero-banner {
    background: linear-gradient(125deg, var(--navy-900) 0%, #0f3274 52%, var(--cyan-600) 100%);
    color: #fff; border-radius: var(--radius-xl);
    padding: 20px 24px; margin-bottom: 18px;
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px;
    box-shadow: var(--shadow-md); position: relative; overflow: hidden;
}
.hero-banner::after {
    content: ""; position: absolute; top: -55px; right: -55px; width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.25) 0%, transparent 70%); pointer-events: none;
}

/* RFID Visual Keycard Widget */
.rfid-card-visual {
    background: linear-gradient(135deg, #081d45 0%, #1677ff 58%, #0ea5e9 100%);
    color: #fff; border-radius: 15px; padding: 18px 20px;
    position: relative; overflow: hidden;
    box-shadow: 0 10px 26px rgba(22, 119, 255, 0.28); margin-bottom: 14px;
}
.rfid-card-visual::after {
    content: ""; position: absolute; top: 0; bottom: 0; width: 45%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.16), transparent);
    animation: cardScan 4.5s infinite;
}

/* Soft Modern Pill Badges */
.badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3.5px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap;
}
.badge-online, .badge-active, .badge-success, .badge-paid, .badge-inspected, .badge-clean, .badge-available, .badge-ready, .badge-delivered, .badge-encoded_active, .badge-pushed_to_lock, .badge-received, .badge-resolved, .badge-confirmed {
    background: #dcfce7; color: #15803d;
}
.badge-warning, .badge-preparing, .badge-dirty, .badge-pending, .badge-grace, .badge-demo, .badge-submitted, .badge-dispatched, .badge-queued_for_encoder, .badge-urgent, .badge-medium {
    background: #fef3c7; color: #b45309;
}
.badge-danger, .badge-overdue, .badge-expired, .badge-voided, .badge-cancelled, .badge-out_of_order, .badge-failed, .badge-revoked, .badge-lost_blacklisted, .badge-critical, .badge-high {
    background: #fee2e2; color: #b91c1c;
}
.badge-info, .badge-checked_in, .badge-occupied, .badge-kitchen, .badge-open, .badge-low, .badge-normal {
    background: #dbeafe; color: #1d4ed8;
}
.badge-purple, .badge-bar { background: #ede9fe; color: #6d28d9; }
.dot-live { width: 8px; height: 8px; border-radius: 50%; background: var(--success); display: inline-block; animation: pulseGlow 2s infinite; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    padding: 8.5px 15px; border-radius: 10px; font-size: 13px; font-weight: 600;
    border: 1px solid transparent; cursor: pointer; text-decoration: none;
    transition: var(--transition); font-family: inherit;
}
.btn-primary { background: linear-gradient(135deg, var(--cyan-600), var(--cyan-500)); color: #fff; box-shadow: 0 4px 12px rgba(22, 119, 255, 0.25); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow-glow); }
.btn-navy { background: var(--navy-900); color: #fff; }
.btn-navy:hover { background: var(--navy-800); transform: translateY(-1px); }
.btn-outline { background: var(--surface); border-color: var(--border-strong); color: var(--text-main); }
.btn-outline:hover { border-color: var(--cyan-600); color: var(--cyan-600); background: var(--cyan-50); }
.btn-success { background: var(--success); color: #fff; }
.btn-warning { background: var(--warning); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: 5.5px 11px; font-size: 12px; border-radius: 8px; }

/* Forms */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(185px, 1fr)); gap: 13px; }
.form-group { display: flex; flex-direction: column; gap: 5px; margin-bottom: 10px; }
.form-group label { font-size: 12px; font-weight: 700; color: var(--text-secondary); }
.form-control {
    padding: 9px 12px; border: 1px solid var(--border-strong); border-radius: 10px;
    font-size: 13.5px; color: var(--text-main); background: var(--surface);
    transition: var(--transition); width: 100%; font-family: inherit;
}
.form-control:focus { outline: none; border-color: var(--cyan-600); box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.15); }

/* Clean Tables matching Screenshot */
.table-wrap { overflow-x: auto; }
table.hms-table { width: 100%; border-collapse: collapse; font-size: 13.2px; }
table.hms-table th {
    text-align: left; padding: 10px 12px;
    background: var(--surface-subtle); color: var(--text-muted);
    font-weight: 700; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.4px;
    border-bottom: 1px solid var(--border);
}
table.hms-table td { padding: 11px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.hms-table tr:last-child td { border-bottom: none; }
table.hms-table tr:hover td { background: color-mix(in srgb, var(--cyan-50) 55%, var(--surface)); }
.ref-link { color: var(--cyan-600); font-weight: 700; text-decoration: none; }
.ref-link:hover { text-decoration: underline; }
.text-muted { color: var(--text-muted); }

/* Alerts */
.alert { padding: 11px 16px; border-radius: 12px; margin-bottom: 16px; font-size: 13.2px; font-weight: 600; display: flex; align-items: center; justify-content: space-between; gap: 12px; animation: fadeSlideUp 0.25s ease; }
.alert-success { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.alert-danger { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.alert-warning { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }
.alert-info { background: #e0f2fe; color: #075985; border: 1px solid #7dd3fc; }

/* Room Map & Tape Chart */
.room-map { display: grid; grid-template-columns: repeat(auto-fill, minmax(162px, 1fr)); gap: 13px; }
.room-tile { border-radius: 13px; padding: 14px; border: 1px solid var(--border); background: var(--surface); transition: var(--transition); }
.room-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.room-tile.status-available { border-left: 4px solid #16a34a; }
.room-tile.status-occupied { border-left: 4px solid #1677ff; }
.room-tile.status-dirty { border-left: 4px solid #f59e0b; }
.room-tile.status-out_of_order, .room-tile.status-out_of_service { border-left: 4px solid #94a3b8; }

.tape-cell { padding: 7px 6px; border-radius: 7px; font-size: 11px; font-weight: 700; text-align: center; }
.tape-free { background: var(--surface-subtle); color: var(--text-muted); }
.tape-reserved { background: #dbeafe; color: #1d4ed8; }
.tape-occupied { background: linear-gradient(135deg, #1677ff, #0ea5e9); color: #fff; }

/* KDS & POS */
.kds-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 16px; }
.kds-ticket { background: var(--surface); border-radius: 15px; border: 2px solid var(--border); overflow: hidden; box-shadow: var(--shadow-sm); transition: var(--transition); }
.kds-ticket.urgency-warning { border-color: var(--warning); }
.kds-ticket.urgency-overdue { border-color: var(--danger); animation: pulseOverdue 2s infinite; }
.kds-ticket-head { background: var(--navy-900); color: #fff; padding: 13px 16px; display: flex; justify-content: space-between; align-items: center; }
.kds-ticket.urgency-overdue .kds-ticket-head { background: #b91c1c; }
.kds-timer { font-family: Consolas, monospace; font-size: 17px; font-weight: 800; padding: 4px 10px; border-radius: 8px; background: rgba(255, 255, 255, 0.16); }

.pos-menu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.pos-item-card { background: var(--surface); border: 1px solid var(--border); border-radius: 13px; padding: 13px; cursor: pointer; transition: var(--transition); text-align: left; }
.pos-item-card:hover { border-color: var(--cyan-600); transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* Chat Feed for Inter-Departmental Inventory Hub */
.chat-feed { max-height: 360px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 4px; }
.chat-msg { background: var(--surface-subtle); border: 1px solid var(--border); border-radius: 12px; padding: 11px 14px; font-size: 13px; }
.chat-msg.type-alert { border-left: 4px solid var(--warning); }
.chat-msg.type-dispatch { border-left: 4px solid var(--cyan-600); }
.chat-msg.type-approval { border-left: 4px solid var(--success); }

/* Login Screen & 6-Digit PIN Touch Keypad */
.auth-body {
    min-height: 100vh;
    background: linear-gradient(135deg, #04112b 0%, #081d45 45%, #0d4ea6 85%, #0ea5e9 100%);
    background-size: 200% 200%;
    animation: shimmerBg 16s ease infinite;
    display: flex; align-items: center; justify-content: center; padding: 24px;
}
.auth-card {
    width: 100%; max-width: 500px;
    background: rgba(255, 255, 255, 0.98); color: #0f1f3d;
    border-radius: 22px; padding: 32px;
    box-shadow: 0 28px 72px rgba(0, 0, 0, 0.42);
    animation: fadeSlideUp 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.auth-logo {
    width: 96px; height: 96px; border-radius: 50%; object-fit: cover;
    display: block; margin: 0 auto 12px; border: 3px solid var(--cyan-500);
    box-shadow: 0 12px 28px rgba(22, 119, 255, 0.3);
    animation: floatSlow 4s ease-in-out infinite;
}
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; background: #edf2f9; padding: 5px; border-radius: 12px; margin-bottom: 18px; }
.auth-tab { border: none; background: transparent; padding: 9px; border-radius: 9px; font-weight: 700; font-size: 13px; color: #556b88; cursor: pointer; transition: var(--transition); }
.auth-tab.active { background: #fff; color: #081d45; box-shadow: 0 3px 10px rgba(8, 29, 69, 0.1); }
.pin-dots { display: flex; justify-content: center; gap: 10px; margin: 12px 0 16px; }
.pin-dot { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #1677ff; transition: var(--transition); }
.pin-dot.filled { background: #1677ff; transform: scale(1.15); box-shadow: 0 0 10px rgba(22, 119, 255, 0.45); }
.pin-keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-width: 260px; margin: 0 auto 14px; }
.pin-key { padding: 12px; font-size: 18px; font-weight: 700; border-radius: 12px; border: 1px solid #d8e4f2; background: #f8fbff; color: #081d45; cursor: pointer; transition: var(--transition); }
.pin-key:hover { background: #e0f2fe; border-color: #1677ff; }

/* Modals & Command Palette */
.hms-modal-backdrop { position: fixed; inset: 0; background: rgba(5, 19, 47, 0.58); backdrop-filter: blur(5px); display: none; align-items: center; justify-content: center; z-index: 120; padding: 16px; }
.hms-modal-backdrop.open { display: flex; }
.hms-modal { background: var(--surface); border-radius: 18px; width: 100%; max-width: 490px; padding: 22px; box-shadow: 0 26px 68px rgba(0, 0, 0, 0.34); animation: fadeSlideUp 0.22s ease; }

/* Mobile Dock */
.mobile-dock {
    display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 70;
    background: var(--surface); border-top: 1px solid var(--border);
    padding: 7px 6px; justify-content: space-around; box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.08);
}
.mobile-dock a { display: flex; flex-direction: column; align-items: center; font-size: 11px; font-weight: 700; color: var(--text-muted); text-decoration: none; gap: 2px; }
.mobile-dock a.active { color: var(--cyan-600); }

/* Responsive Breakpoints */
@media (max-width: 1320px) {
    .grid-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .grid-ops-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 1100px) {
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-chart-row, .grid-ops-row, .grid-3, .grid-2, .grid-pos { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
    .hms-sidebar { transform: translateX(-100%); bottom: 0; z-index: 90; }
    .hms-sidebar.open { transform: translateX(0); }
    .hms-main { margin-left: 0; padding-bottom: 66px; }
    .hms-statusbar { display: none; }
    .mobile-dock { display: flex; }
    .hms-content { padding: 14px; }
    .grid-5, .grid-4 { grid-template-columns: 1fr; }
    .topbar-search { max-width: 190px; }
    .profile-meta { display: none; }
}
