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

:root {
    --blue-900: #0d1f4e;
    --blue-800: #1f3c88;
    --blue-700: #2552b0;
    --blue-600: #2563eb;
    --blue-100: #dbeafe;
    --blue-50:  #eff6ff;

    --gold-700: #a88000;
    --gold-600: #c9a800;
    --gold-400: #e3cf57;
    --gold-100: #fef9c3;
    --gold-50:  #fffde7;

    --slate-900: #0f172a;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-500: #64748b;
    --slate-400: #94a3b8;
    --slate-300: #cbd5e1;
    --slate-200: #e2e8f0;
    --slate-100: #f1f5f9;
    --slate-50:  #f8fafc;
    --white:     #ffffff;

    --green-700: #15803d;
    --green-600: #16a34a;
    --green-100: #dcfce7;
    --green-50:  #f0fdf4;
    --orange-600: #ea580c;
    --orange-100: #ffedd5;
    --orange-50:  #fff7ed;
    --red-600:   #dc2626;
    --red-100:   #fee2e2;
    --red-50:    #fef2f2;

    --sidebar-w: 220px;
    --nav-h: 64px;
    --topbar-h: 60px;

    --radius-xs: 6px;
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --shadow-xs: 0 1px 3px rgba(15,23,42,.06), 0 1px 2px rgba(15,23,42,.04);
    --shadow-sm: 0 2px 8px rgba(15,23,42,.07), 0 1px 3px rgba(15,23,42,.05);
    --shadow-md: 0 6px 24px rgba(15,23,42,.10), 0 2px 6px rgba(15,23,42,.05);
    --shadow-lg: 0 16px 48px rgba(15,23,42,.14), 0 4px 12px rgba(15,23,42,.06);

    --border: var(--slate-200);

    --font: 'Plus Jakarta Sans', 'Segoe UI', Arial, sans-serif;
}

html, body {
    min-height: 100%;
    font-family: var(--font);
    background: var(--slate-100);
    color: var(--slate-900);
    -webkit-font-smoothing: antialiased;
}

svg {
    outline: none;
    fill: none;
}

.login-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    font-family: var(--font);
    transition: opacity .5s ease, transform .5s ease;
    overflow: hidden;
}

.login-overlay.dismissed {
    opacity: 0;
    transform: translateY(-16px);
    pointer-events: none;
}

.login-left {
    width: 46%;
    min-width: 360px;
    background: var(--blue-900);
    background-image:
        radial-gradient(ellipse at 0% 0%, rgba(37,82,176,.9) 0%, transparent 60%),
        radial-gradient(ellipse at 100% 100%, rgba(31,60,136,.8) 0%, transparent 55%),
        radial-gradient(ellipse at 60% 40%, rgba(13,31,78,.6) 0%, transparent 50%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px 56px 44px;
    position: relative;
    overflow: hidden;
}

.login-left::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(255,255,255,.04) 1px, transparent 1px);
    background-size: 24px 24px;
    pointer-events: none;
    z-index: 0;
}

.login-left::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url('../assets/logo.png') no-repeat center center;
    background-size: 72%;
    opacity: 0.04;
    pointer-events: none;
    z-index: 0;
}

.login-left-top { position: relative; z-index: 1; }

.login-brand-row {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 56px;
    position: relative;
}

.login-brand-name {
    font-size: 22px;
    font-weight: 800;
    color: var(--white);
    letter-spacing: -.3px;
    line-height: 1;
}

.login-brand-name span { color: var(--gold-400); }

.login-brand-sub {
    font-size: 12px;
    color: rgba(255,255,255,.4);
    margin-top: 4px;
    font-weight: 500;
}

.login-hero {
    position: relative;
    margin-bottom: 44px;
}

.login-hero h2 {
    font-size: 44px;
    font-weight: 800;
    color: var(--white);
    line-height: 1.12;
    letter-spacing: -.8px;
    margin-bottom: 16px;
}

.hero-accent { color: var(--gold-400); }

.login-hero p {
    font-size: 14px;
    color: rgba(255,255,255,.5);
    line-height: 1.8;
    max-width: 310px;
}

.login-features {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    z-index: 1;
}

.login-feat {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: var(--radius-md);
    transition: background .2s, border-color .2s;
}

.login-feat:hover {
    background: rgba(255,255,255,.08);
    border-color: rgba(255,255,255,.14);
}

.feat-icon {
    width: 34px;
    height: 34px;
    background: rgba(227,207,87,.12);
    border: 1px solid rgba(227,207,87,.2);
    border-radius: var(--radius-xs);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.feat-icon svg { width: 16px; height: 16px; stroke: var(--gold-400); }

.login-feat span {
    font-size: 13px;
    color: rgba(255,255,255,.72);
    font-weight: 500;
    line-height: 1.5;
}

.login-foot {
    font-size: 11px;
    color: rgba(255,255,255,.18);
    letter-spacing: .3px;
    position: relative;
    z-index: 1;
}

.login-right {
    flex: 1;
    background: var(--slate-100);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 40px;
    overflow: hidden;
    position: relative;
}

.login-right::before {
    content: '';
    position: absolute;
    top: -120px;
    right: -120px;
    width: 380px;
    height: 380px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(37,99,235,.06) 0%, transparent 70%);
    pointer-events: none;
}

.login-right::after {
    content: '';
    position: absolute;
    bottom: -100px;
    left: -100px;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(201,168,0,.07) 0%, transparent 70%);
    pointer-events: none;
}

.login-card {
    width: 100%;
    max-width: 460px;
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 40px 40px 36px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--slate-200);
    position: relative;
    z-index: 1;
}

.login-card-head { margin-bottom: 28px; }

.login-card-head h2 {
    font-size: 26px;
    font-weight: 800;
    color: var(--blue-800);
    margin-bottom: 6px;
    letter-spacing: -.3px;
}

.login-card-head p { font-size: 13px; color: var(--slate-500); line-height: 1.6; }

.user-type-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 26px;
}

.user-type-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 14px 8px;
    border: 1.5px solid var(--slate-200);
    border-radius: var(--radius-md);
    cursor: pointer;
    background: var(--slate-50);
    transition: all .18s;
    user-select: none;
}

.user-type-btn:hover {
    border-color: var(--blue-600);
    background: var(--blue-50);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.user-type-btn.active {
    border-color: var(--blue-800);
    background: var(--blue-50);
    box-shadow: 0 0 0 3px rgba(31,60,136,.1);
}

.utb-icon {
    width: 34px;
    height: 34px;
    background: var(--blue-100);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .18s, transform .18s;
}

.user-type-btn:hover .utb-icon { transform: scale(1.08); }
.user-type-btn.active .utb-icon { background: var(--blue-800); }
.utb-icon svg { width: 15px; height: 15px; stroke: var(--blue-600); transition: stroke .18s; }
.user-type-btn.active .utb-icon svg { stroke: var(--white); }

.user-type-btn span {
    font-size: 11px;
    font-weight: 700;
    color: var(--slate-500);
    letter-spacing: .2px;
    transition: color .18s;
}

.user-type-btn.active span { color: var(--blue-800); }
.user-type-btn:hover span { color: var(--blue-700); }

.login-fields { display: flex; flex-direction: column; gap: 4px; }
.login-field { margin-bottom: 14px; }

.login-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .9px;
    color: var(--slate-500);
    margin-bottom: 8px;
}

.login-input-wrap { position: relative; }

.input-field-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    stroke: var(--slate-400);
    pointer-events: none;
}

.login-input {
    width: 100%;
    padding: 14px 16px 14px 44px;
    border: 1.5px solid var(--slate-200);
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--blue-800);
    background: var(--slate-50);
    font-family: var(--font);
    outline: none;
    transition: border-color .2s, box-shadow .2s, background .2s;
}

.login-input::placeholder {
    letter-spacing: 0;
    font-weight: 400;
    color: var(--slate-400);
    font-size: 13px;
}

.login-input:focus {
    border-color: var(--blue-600);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(37,99,235,.1);
}

.login-input.error { border-color: var(--red-600); box-shadow: 0 0 0 4px rgba(220,38,38,.08); }
.name-input { letter-spacing: 0 !important; font-size: 15px !important; font-weight: 500 !important; }

.login-error {
    color: var(--red-600);
    font-size: 12px;
    font-weight: 500;
    min-height: 16px;
    padding-left: 2px;
    margin-top: 2px;
}

.login-btn {
    width: 100%;
    padding: 15px;
    background: var(--blue-800);
    border: none;
    border-radius: var(--radius-sm);
    color: var(--white);
    font-size: 15px;
    font-weight: 700;
    font-family: var(--font);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all .2s;
    box-shadow: 0 4px 20px rgba(31,60,136,.3);
    margin-top: 6px;
}

.login-btn svg { width: 18px; height: 18px; stroke: var(--white); transition: transform .2s; }

.login-btn:hover {
    background: var(--blue-700);
    box-shadow: 0 6px 24px rgba(31,60,136,.4);
    transform: translateY(-1px);
}

.login-btn:hover svg { transform: translateX(4px); }
.login-btn:active { transform: translateY(0); }

.login-hint {
    text-align: center;
    font-size: 11px;
    color: var(--slate-400);
    margin-top: 12px;
}

.app-shell {
    display: flex;
    min-height: 100vh;
    transition: opacity .4s ease;
}

.app-shell.locked {
    pointer-events: none;
    user-select: none;
    opacity: 0;
}

.app-shell.unlocked {
    pointer-events: all;
    opacity: 1;
}

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-w);
    background: var(--blue-800);
    display: flex;
    flex-direction: column;
    z-index: 200;
    transition: transform .28s ease;
    overflow: hidden;
}

.sidebar-top {
    display: flex;
    flex-direction: column;
    padding: 20px 12px;
    flex: 1;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 10px 20px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    margin-bottom: 16px;
}

.sidebar-brand-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.sidebar-brand-icon img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.sidebar-brand-text { line-height: 1.2; }

.sidebar-brand-name {
    font-size: 15px;
    font-weight: 800;
    color: var(--white);
    letter-spacing: -.2px;
}

.sidebar-brand-name span { color: var(--gold-400); }

.sidebar-brand-sub {
    font-size: 10px;
    color: rgba(255,255,255,.35);
    font-weight: 500;
    margin-top: 2px;
}

.sidebar.collapsed .sidebar-brand-text { display: none; }
.sidebar.collapsed .sidebar-brand { justify-content: center; padding: 4px 0 20px; }

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,.55);
    text-decoration: none;
    white-space: nowrap;
    transition: background .18s, color .18s;
    margin-bottom: 2px;
}

.nav-link svg {
    width: 18px;
    height: 18px;
    stroke: rgba(255,255,255,.5);
    flex-shrink: 0;
    transition: stroke .18s;
}

.nav-link:hover { background: rgba(255,255,255,.08); color: rgba(255,255,255,.9); }
.nav-link:hover svg { stroke: rgba(255,255,255,.9); }
.nav-link.active { background: rgba(255,255,255,.13); color: var(--white); }
.nav-link.active svg { stroke: var(--gold-400); }

.sidebar.collapsed .nav-link span { display: none; }
.sidebar.collapsed .nav-link { justify-content: center; padding: 11px; }
.sidebar.collapsed { width: 60px; }
.sidebar.collapsed .sidebar-logo { width: 32px; height: 32px; }

@media (max-width: 700px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-lg); }
}

.topbar {
    position: fixed;
    left: var(--sidebar-w);
    right: 0;
    top: 0;
    height: var(--topbar-h);
    background: var(--white);
    border-bottom: 1px solid var(--slate-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 100;
    transition: left .28s ease;
}

.sidebar.collapsed ~ .main .topbar,
.main.expanded .topbar { left: 60px; }

@media (max-width: 700px) { .topbar { left: 0; padding: 0 16px; } }

.topbar-left { display: flex; align-items: center; gap: 10px; }

.menu-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-xs);
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--slate-600);
    transition: background .18s;
}

.menu-btn svg { width: 18px; height: 18px; stroke: var(--slate-600); }
.menu-btn:hover { background: var(--slate-100); }

.topbar-brand { display: flex; align-items: center; gap: 10px; }

.brand-logo { width: 30px; height: 30px; object-fit: contain; }

.topbar-brand h2 {
    font-size: 17px;
    font-weight: 800;
    color: var(--blue-800);
    letter-spacing: -.2px;
}

.user {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
}

.user-avatar-wrap {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--blue-100);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--blue-200, #bfdbfe);
}

.user-avatar-wrap svg { width: 16px; height: 16px; stroke: var(--blue-700); }

#userLabel {
    font-size: 13px;
    font-weight: 600;
    color: var(--slate-700);
    max-width: 160px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-logout {
    padding: 6px 14px;
    border: 1.5px solid var(--slate-200);
    border-radius: 30px;
    background: transparent;
    color: var(--slate-500);
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: all .18s;
    white-space: nowrap;
}

.btn-logout:hover { border-color: var(--red-600); color: var(--red-600); background: var(--red-50); }

.main {
    margin-left: var(--sidebar-w);
    padding-top: calc(var(--topbar-h) + 24px);
    padding-bottom: 40px;
    padding-left: 28px;
    padding-right: 28px;
    min-height: 100vh;
    width: 100%;
    transition: margin-left .28s ease;
}

.main.expanded { margin-left: 60px; }

@media (max-width: 700px) {
    .main {
        margin-left: 0;
        padding-left: 16px;
        padding-right: 16px;
        padding-bottom: calc(var(--nav-h) + 20px);
    }
}

.view { display: none; }
.view.active { display: block; }

.status-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    background: var(--blue-800);
    border-radius: var(--radius-sm);
    margin-bottom: 18px;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,.85);
}

.status-banner-divider {
    color: rgba(255,255,255,.3);
    font-weight: 300;
    font-size: 16px;
    margin: 0 4px;
}

.status-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4ade80;
    flex-shrink: 0;
    box-shadow: 0 0 0 3px rgba(74,222,128,.2);
    animation: liveBlip 2s infinite;
}

@keyframes liveBlip {
    0%, 100% { box-shadow: 0 0 0 3px rgba(74,222,128,.2); }
    50%       { box-shadow: 0 0 0 6px rgba(74,222,128,.08); }
}

.home-banner {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-bottom: 18px;
    background: var(--blue-900);
    line-height: 0;
}

.home-banner-img-wrap { width: 100%; }

.home-banner-img {
    width: 100%;
    height: auto;
    max-height: 360px;
    display: block;
    object-fit: cover;
    object-position: center;
}

.home-banner::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to top, rgba(10,20,60,.88) 0%, rgba(10,20,60,.5) 30%, rgba(10,20,60,.1) 55%, transparent 75%),
        linear-gradient(to right, rgba(10,20,60,.4) 0%, transparent 40%);
    pointer-events: none;
    z-index: 1;
}

.home-banner-chips {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px 22px;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 0;
}

.home-banner-chip {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 0 20px;
}

.home-banner-chip:first-child { padding-left: 0; }

.hbc-label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .9px;
    text-transform: uppercase;
    color: rgba(255,255,255,.65);
    text-shadow: 0 1px 4px rgba(0,0,0,.5);
}

.hbc-val {
    font-size: 16px;
    font-weight: 800;
    line-height: 1;
    color: var(--white);
    text-shadow: 0 1px 4px rgba(0,0,0,.4);
}

.home-banner-chip-divider {
    width: 1px;
    background: rgba(255,255,255,.15);
    height: 34px;
    align-self: center;
    flex-shrink: 0;
}

#congestionText {
    font-size: 16px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    text-shadow: 0 1px 6px rgba(0,0,0,.6) !important;
    display: block;
}

#congestionText.open   { color: #4ade80 !important; }
#congestionText.break  { color: var(--gold-400) !important; }
#congestionText.closed { color: #f87171 !important; }

.dept-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.dept-card {
    background: var(--white);
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xs);
    transition: box-shadow .2s, transform .2s, border-color .2s;
    display: flex;
    flex-direction: column;
    padding: 0;
}

.dept-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--slate-300); }

.dept-card-inner {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px 0;
    margin-bottom: 0;
}

.dept-icon {
    width: 46px;
    height: 46px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.dept-icon svg { width: 30px; height: 30px; }
.dept-icon img { width: 32px; height: 32px; object-fit: contain; }
.cashier-icon  { background: var(--gold-50); border: 1px solid var(--gold-100); }
.registrar-icon { background: var(--blue-50); border: 1px solid var(--blue-100); }

.dept-details { flex: 1; }

.dept-details h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--blue-800);
    margin-bottom: 5px;
}

.dept-meta-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.dept-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 20px;
    letter-spacing: .3px;
}

.dept-status::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dept-status.open   { background: var(--green-100); color: var(--green-700); }
.dept-status.open::before { background: var(--green-600); }
.dept-status.break  { background: var(--orange-100); color: var(--orange-600); }
.dept-status.break::before { background: var(--orange-600); }
.dept-status.closed { background: var(--red-100); color: var(--red-600); }
.dept-status.closed::before { background: var(--red-600); }

.dept-queue { font-size: 12px; color: var(--slate-500); font-weight: 500; }

.dept-queue-stat {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px 14px;
    border-top: 1px solid var(--slate-100);
    margin-top: 14px;
}

.dept-queue-num {
    font-size: 30px;
    font-weight: 900;
    color: var(--blue-800);
    line-height: 1;
    min-width: 38px;
}

.dept-queue-stat-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dept-queue-stat-info span {
    font-size: 10px;
    font-weight: 700;
    color: var(--slate-400);
    text-transform: uppercase;
    letter-spacing: .5px;
}

.dept-queue-stat-info strong {
    font-size: 12px;
    font-weight: 600;
    color: var(--slate-600);
}

.btn-reserve {
    display: block;
    width: calc(100% - 28px);
    margin: 0 14px 14px;
    padding: 13px;
    background: var(--blue-800);
    border: none;
    border-radius: var(--radius-sm);
    color: var(--white);
    font-size: 13px;
    font-weight: 700;
    font-family: var(--font);
    cursor: pointer;
    letter-spacing: .4px;
    text-align: center;
    transition: opacity .2s, transform .2s, background .2s;
    box-shadow: 0 3px 12px rgba(31,60,136,.2);
}

.btn-reserve:hover:not(:disabled) {
    background: var(--blue-700);
    box-shadow: 0 6px 20px rgba(31,60,136,.3);
    transform: translateY(-1px);
}

.btn-reserve:disabled {
    background: var(--slate-300);
    color: var(--slate-500);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 1;
}

.home-notice-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 14px;
}

.home-notice-card {
    background: var(--white);
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-md);
    padding: 15px 17px;
    box-shadow: var(--shadow-xs);
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.home-notice-icon {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.home-notice-icon svg { width: 15px; height: 15px; }

.home-notice-icon.info-icon { background: var(--blue-50); border: 1px solid var(--blue-100); }
.home-notice-icon.info-icon svg { stroke: var(--blue-700); }

.home-notice-icon.gold-icon { background: var(--gold-50); border: 1px solid var(--gold-100); }
.home-notice-icon.gold-icon svg { stroke: var(--gold-700); }

.home-notice-text h4 {
    font-size: 13px;
    font-weight: 700;
    color: var(--slate-900);
    margin-bottom: 3px;
}

.home-notice-text p {
    font-size: 12px;
    color: var(--slate-500);
    line-height: 1.6;
}

.status-text { font-size: 14px; font-weight: 800; }
.status-text.open   { color: var(--green-600); }
.status-text.break  { color: var(--orange-600); }
.status-text.closed { color: var(--red-600); }

.page-card {
    background: var(--white);
    padding: 32px 36px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
    border: 1px solid var(--slate-200);
    max-width: 700px;
}

.page-card h2 {
    font-size: 22px;
    font-weight: 800;
    color: var(--blue-800);
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--slate-200);
}

.page-card p {
    font-size: 14px;
    line-height: 1.75;
    margin-bottom: 12px;
    color: var(--slate-700);
}

.subtle { color: var(--slate-500); font-size: 13px; }

.about-list {
    list-style: none;
    padding: 0;
    margin: 16px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.about-list li {
    padding: 11px 16px;
    border-radius: var(--radius-sm);
    background: var(--gold-50);
    color: var(--slate-700);
    font-size: 14px;
    font-weight: 500;
    border-left: 3px solid var(--gold-400);
}

.info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    margin-bottom: 8px;
    background: var(--slate-50);
    border-radius: var(--radius-sm);
    border: 1px solid var(--slate-200);
    font-size: 14px;
}

.info span { color: var(--slate-500); font-weight: 500; }
.info b { color: var(--blue-800); font-weight: 700; }

.btn-ghost {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px;
    background: var(--red-50);
    border: 1.5px solid rgba(220,38,38,.2);
    border-radius: var(--radius-sm);
    color: var(--red-600);
    font-size: 14px;
    font-weight: 700;
    font-family: var(--font);
    cursor: pointer;
    margin-top: 8px;
    transition: border-color .18s, background .18s;
}

.btn-ghost svg { width: 16px; height: 16px; stroke: currentColor; }
.btn-ghost:hover { border-color: var(--red-600); background: var(--red-100); }

.btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px;
    background: var(--blue-800);
    border: none;
    border-radius: var(--radius-sm);
    color: var(--white);
    font-size: 14px;
    font-weight: 700;
    font-family: var(--font);
    cursor: pointer;
    transition: opacity .2s, transform .2s;
    box-shadow: 0 3px 12px rgba(31,60,136,.2);
}

.btn-primary svg { width: 17px; height: 17px; stroke: var(--white); flex-shrink: 0; transition: transform .2s; }
.btn-primary:hover { opacity: .9; transform: translateY(-1px); }
.btn-primary:hover svg { transform: translateX(3px); }
.btn-primary:disabled { opacity: .45; pointer-events: none; transform: none; }

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
    background: var(--slate-50);
    font-size: 14px;
    gap: 12px;
    transition: border-color .18s;
}

.history-item:hover { border-color: var(--slate-300); }
.history-item strong { color: var(--blue-800); font-weight: 700; }
.open   { color: var(--green-600); font-weight: 700; font-size: 12px; }
.break  { color: var(--orange-600); font-weight: 700; font-size: 12px; }
.closed { color: var(--red-600); font-weight: 700; font-size: 12px; }

.active-res-banner {
    background: var(--white);
    border: 2px solid var(--gold-400);
    border-radius: var(--radius-lg);
    padding: 20px 22px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.active-res-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    font-size: 15px;
    color: var(--blue-800);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--slate-200);
}

.active-res-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.active-res-info { width: 100%; }

.active-res-info p {
    font-size: 14px;
    margin-bottom: 10px;
    line-height: 1.6;
    color: var(--slate-700);
}

.active-res-info p strong { color: var(--blue-800); }

.banner-qr {
    background: var(--slate-50);
    padding: 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--slate-200);
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 180px;
}

.btn-cancel-res {
    background: var(--red-50);
    color: var(--red-600);
    border: 1.5px solid rgba(220,38,38,.25);
    border-radius: var(--radius-sm);
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--font);
    width: auto;
    transition: background .18s;
}

.btn-cancel-res:hover { background: var(--red-100); }

.tracking-card {
    margin-top: 14px;
    padding: 14px 16px;
    background: var(--blue-50);
    border: 1.5px solid var(--blue-100);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.tracking-label { font-size: 13px; font-weight: 700; color: var(--blue-800); }
.tracking-actions { display: flex; gap: 8px; align-items: center; }

.btn-track {
    background: var(--blue-800);
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    font-family: var(--font);
    transition: opacity .2s;
}

.btn-track:hover { opacity: .88; }

.btn-copy-link {
    background: var(--white);
    border: 1.5px solid var(--blue-100);
    color: var(--blue-700);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    font-family: var(--font);
    transition: background .18s, border-color .18s;
}

.btn-copy-link:hover { background: var(--blue-50); border-color: var(--blue-600); }

.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,.72);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal-overlay.active { display: flex; }

.modal {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 28px 26px 26px;
    width: 100%;
    max-width: 460px;
    max-height: 92vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: modalIn .22s ease;
}

@keyframes modalIn {
    from { transform: scale(.95) translateY(10px); opacity: 0; }
    to   { transform: scale(1) translateY(0); opacity: 1; }
}

.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 18px;
}

.modal-dept-chip {
    display: inline-block;
    background: var(--gold-50);
    color: var(--gold-700);
    border: 1px solid var(--gold-400);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.2px;
    padding: 4px 10px;
    border-radius: 20px;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.modal-header h2 { font-size: 20px; font-weight: 800; color: var(--blue-800); }

.modal-close-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--slate-100);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-left: 12px;
    transition: background .18s;
}

.modal-close-btn svg { width: 14px; height: 14px; stroke: var(--slate-500); }
.modal-close-btn:hover { background: var(--slate-200); }

.step-track {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 22px;
}

.step-pip {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--slate-200);
    flex-shrink: 0;
    transition: background .25s, width .25s, border-radius .25s;
}

.step-pip.done { background: var(--blue-800); }
.step-pip.active { background: var(--gold-400); width: 24px; border-radius: 5px; }
.step-line { flex: 1; height: 1.5px; background: var(--slate-200); }

.modal-step { display: none; }
.modal-step.active { display: block; }

.step-section-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--slate-600);
    margin-bottom: 14px;
}

.reason-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }

.reason-item {
    padding: 13px 16px;
    border: 1.5px solid var(--slate-200);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--slate-700);
    transition: all .18s;
}

.reason-item:hover { border-color: var(--blue-600); background: var(--blue-50); color: var(--blue-800); }
.reason-item.selected { border-color: var(--blue-700); background: var(--blue-50); color: var(--blue-800); }

.reason-category-header {
    padding: 7px 14px 4px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--blue-800);
    background: var(--blue-50);
    border-radius: var(--radius-xs);
    margin-top: 4px;
}

.docs-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }

.docs-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--gold-50);
    border: 1.5px solid var(--gold-100);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    color: var(--slate-700);
}

.docs-item-icon { font-size: 18px; flex-shrink: 0; }

.confirm-icon-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.confirm-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--green-100);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: popIn .4s cubic-bezier(.17,.67,.35,1.4) both;
}

.confirm-icon svg { width: 28px; height: 28px; stroke: var(--green-600); }

@keyframes popIn {
    from { transform: scale(0); opacity: 0; }
    80%  { transform: scale(1.1); }
    to   { transform: scale(1); opacity: 1; }
}

.confirm-title {
    text-align: center;
    font-size: 20px;
    font-weight: 800;
    color: var(--blue-800);
    margin-bottom: 6px;
}

.confirm-summary { text-align: center; margin-bottom: 14px; }

.qr-center {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 12px 0;
    background: var(--white);
    border-radius: var(--radius-sm);
    padding: 10px;
    border: 1px solid var(--slate-200);
}

.qr-center > div { display: flex !important; justify-content: center !important; }
.qr-center canvas { display: none !important; }
.qr-center img { display: block !important; margin: 0 auto !important; max-width: 100% !important; }
.qr-hint { text-align: center; font-size: 12px; color: var(--slate-400); margin-bottom: 12px; }

.qr-warning {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: var(--gold-50);
    border: 1px solid var(--gold-400);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    font-size: 12px;
    line-height: 1.6;
    color: var(--slate-700);
}

.qr-warning svg { width: 16px; height: 16px; stroke: var(--gold-700); flex-shrink: 0; margin-top: 1px; }

.error-msg { color: var(--red-600); font-size: 12px; min-height: 16px; font-weight: 500; margin-bottom: 4px; }

.modal-input {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--slate-200);
    border-radius: var(--radius-sm);
    font-size: 15px;
    background: var(--slate-50);
    color: var(--slate-900);
    font-family: var(--font);
    margin-bottom: 12px;
    transition: border-color .2s;
    outline: none;
}

.modal-input:focus { border-color: var(--blue-600); }

.cal-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 16px;
    border: 1.5px solid var(--slate-200);
    border-radius: var(--radius-sm);
    background: var(--slate-50);
    cursor: pointer;
    user-select: none;
    transition: border-color .2s, box-shadow .2s, background .2s;
    margin-bottom: 10px;
}

.cal-trigger:hover { border-color: var(--blue-600); background: var(--white); }

.cal-trigger--open {
    border-color: var(--blue-600);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(37,99,235,.1);
}

.cal-trigger-icon { width: 18px; height: 18px; stroke: var(--slate-400); flex-shrink: 0; }

.cal-trigger-text {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: var(--slate-400);
}

.cal-trigger-text--filled { color: var(--blue-800); font-weight: 700; }

.cal-trigger-arrow {
    width: 16px;
    height: 16px;
    stroke: var(--slate-400);
    flex-shrink: 0;
    transition: transform .2s;
}

.cal-panel {
    background: var(--white);
    border: 1.5px solid var(--slate-200);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-md);
    animation: calDrop .18s ease;
}

@keyframes calDrop {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.cal-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.cal-nav-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-xs);
    background: transparent;
    border: 1px solid var(--slate-200);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .18s, border-color .18s;
}

.cal-nav-btn svg { width: 16px; height: 16px; stroke: var(--slate-500); }
.cal-nav-btn:hover { background: var(--slate-100); border-color: var(--slate-300); }

.cal-month-label { font-size: 15px; font-weight: 800; color: var(--blue-800); }

.cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    margin-bottom: 8px;
    gap: 2px;
}

.cal-weekdays span {
    font-size: 11px;
    font-weight: 700;
    color: var(--slate-400);
    letter-spacing: .5px;
    padding: 4px 0;
    text-transform: uppercase;
}

.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }

.cal-day {
    aspect-ratio: 1;
    width: 100%;
    border: none;
    border-radius: var(--radius-xs);
    background: transparent;
    font-size: 13px;
    font-weight: 500;
    color: var(--slate-700);
    cursor: pointer;
    font-family: var(--font);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s, color .15s;
}

.cal-day:hover:not(:disabled):not(.cal-day-selected) {
    background: var(--blue-50);
    color: var(--blue-700);
}

.cal-day-blank { background: transparent; cursor: default; }
.cal-day-disabled { color: var(--slate-300); cursor: not-allowed; }

.cal-day-today {
    background: var(--gold-50);
    color: var(--gold-700);
    font-weight: 700;
    border: 1.5px solid var(--gold-400);
}

.cal-day-selected {
    background: var(--blue-800) !important;
    color: var(--white) !important;
    font-weight: 700;
}

.cal-day-weekend {
    color: var(--red-600) !important;
    opacity: 0.35;
}

.bottom-nav { display: none; }

@media (max-width: 700px) {
    .bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: var(--nav-h);
        background: var(--white);
        border-top: 1px solid var(--slate-200);
        box-shadow: 0 -4px 20px rgba(15,23,42,.07);
        z-index: 200;
        justify-content: space-around;
        align-items: center;
        padding: 0 8px;
    }
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    flex: 1;
    padding: 8px 4px;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    transition: background .15s;
}

.bottom-nav-item svg {
    width: 22px;
    height: 22px;
    stroke: var(--slate-400);
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: stroke .15s;
}

.bottom-nav-item span {
    font-size: 10px;
    font-weight: 600;
    color: var(--slate-400);
    transition: color .15s;
}

.bottom-nav-item.active svg { stroke: var(--blue-800); }
.bottom-nav-item.active span { color: var(--blue-800); }
.bottom-nav-item:active { background: var(--slate-100); }

.toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: var(--blue-800);
    color: var(--white);
    padding: 11px 24px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    z-index: 9999;
    box-shadow: var(--shadow-md);
    transition: transform .3s ease, opacity .3s ease;
    opacity: 0;
    pointer-events: none;
    white-space: nowrap;
    font-family: var(--font);
}

.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast.success { background: var(--green-600); }
.toast.error   { background: var(--red-600); }
.toast.warning { background: #d97706; }

@media (max-width: 700px) {
    .toast { bottom: calc(var(--nav-h) + 14px); }
}

@media (max-width: 1100px) {
    .dept-row { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 700px) {
    .dept-row { grid-template-columns: 1fr; }
    .home-banner-chips { padding: 12px 16px; }
    .home-banner-chip { padding: 0 14px; }
    .home-banner-chip:first-child { padding-left: 0; }
    .hbc-val { font-size: 14px; }
    .home-notice-row { grid-template-columns: 1fr; }
    .home-banner-chip-divider { display: none; }
}

.login-mobile-header { display: none; }

@media (max-width: 700px) {
    .login-overlay {
        flex-direction: column;
        overflow-y: auto;
    }

    .login-left { display: none; }

    .login-right {
        flex: 1;
        width: 100%;
        min-height: 100dvh;
        padding: 0;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        background: var(--slate-100);
    }

    .login-right::before,
    .login-right::after { display: none; }

    .login-card {
        max-width: 100%;
        width: 100%;
        padding: 0;
        border-radius: 0;
        box-shadow: none;
        border: none;
        background: transparent;
        display: flex;
        flex-direction: column;
        flex: 1;
    }

    .login-mobile-header {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 20px 22px 18px;
        background: var(--blue-800);
        border-bottom: 3px solid var(--gold-400);
        flex-shrink: 0;
    }

    .login-mobile-logo-wrap {
        width: 38px;
        height: 38px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }

    .login-mobile-logo-wrap img { width: 38px; height: 38px; object-fit: contain; }

    .login-mobile-brand {
        font-size: 18px;
        font-weight: 800;
        color: var(--white);
        letter-spacing: -.2px;
        line-height: 1.2;
    }

    .login-mobile-sub { font-size: 11px; color: rgba(255,255,255,.5); margin-top: 1px; }

    .login-card-head { padding: 24px 22px 0; margin-bottom: 18px; }
    .login-card-head h2 { font-size: 20px; }

    .user-type-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
        padding: 0 22px;
        margin-bottom: 18px;
    }

    .user-type-btn { padding: 10px 6px; }
    .utb-icon { width: 28px; height: 28px; }
    .utb-icon svg { width: 13px; height: 13px; }
    .user-type-btn span { font-size: 10px; }

    .login-fields { padding: 0 22px 28px; }
    .login-field { margin-bottom: 14px; }
    .login-btn { padding: 15px; font-size: 15px; }
    .login-hint { margin-top: 12px; }

    .page-card { padding: 20px 16px; border-radius: var(--radius-md); }
    .active-res-body { flex-direction: column; align-items: center; }
    .banner-qr { width: 160px; height: 160px; }

    .modal-overlay { align-items: flex-end; padding: 0; }

    .modal {
        border-radius: var(--radius-xl) var(--radius-xl) 0 0;
        max-width: 100%;
        max-height: 88vh;
        padding: 24px 20px 32px;
    }

    #userLabel { display: none; }
}

@media (max-width: 420px) {
    .user-type-btn { padding: 8px 3px; }
    .utb-icon { width: 26px; height: 26px; }
    .utb-icon svg { width: 12px; height: 12px; }
    .user-type-btn span { font-size: 9px; }
    .login-fields, .login-card-head { padding-left: 16px; padding-right: 16px; }
    .user-type-grid { padding-left: 16px; padding-right: 16px; }
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--slate-300); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--slate-400); }