/* 90% width container for users, branches, and similar pages */
.wide-90 {
    width: 90vw;
    max-width: 1440px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    box-sizing: border-box;
}
@media (max-width: 900px) {
    .wide-90 {
        width: 98vw;
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
}
/* Wider admin container for more filled admin pages */
.admin-container-fluid {
    width: 100%;
    max-width: 1320px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 2vw;
    padding-right: 2vw;
    box-sizing: border-box;
}
@media (max-width: 1400px) {
    .admin-container-fluid {
        max-width: 100vw;
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
}
@media (max-width: 576px) {
    .admin-container-fluid {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
}
/* Flexible landing container for full-width sections with readable max width */
.landing-container-fluid {
    width: 100%;
    max-width: 1440px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 2.5vw;
    padding-right: 2.5vw;
    box-sizing: border-box;
}
@media (max-width: 1200px) {
    .landing-container-fluid {
        max-width: 100vw;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}
@media (max-width: 576px) {
    .landing-container-fluid {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
}
/* ============================================================
   app-main.css — EasyQueue page styles (non-auth)
   Merged from: admin, admin-counters, admin-settings,
   all-counters-display, branches, counter-display, dashboard,
   display, feedback, kiosk, landing, maintenance, queue-detail,
   super-admin, tenant-admin, trend-report, users
   ============================================================ */

/* ── CSS custom properties (overridden by /branding.css per tenant) ── */
:root {
    --eq-primary: #3b82f6;
    --brand-color: #3b82f6;
}

/* ── admin ── */
.badge-running { background: #d1fae5; color: #065f46; }
.badge-stopped { background: #f3f4f6; color: #6b7280; }
.status-pill { font-size: .8rem; padding: 4px 14px; border-radius: 20px; font-weight: 700; }
.counter-row td { vertical-align: middle; }

/* ── admin-counters ── */
.ticket-display {
    font-size: 7rem;
    font-weight: 800;
    letter-spacing: -3px;
    line-height: 1;
    color: var(--eq-primary);
}
.ticket-display.idle { color: #adb5bd; }
.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .65rem;
    font-size: 1.15rem;
    font-weight: 700;
    padding: 16px 32px;
    border-radius: 12px;
}
.btn-action svg { width: 1.15em; height: 1.15em; flex-shrink: 0; }
.next-badge {
    font-size: 1.1rem;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: 8px;
    background: #e9ecef;
    color: #495057;
}
.next-badge.first { background: #fff3cd; color: #856404; }
@media (max-width: 768px) {
    .ticket-display { font-size: 4rem; }
    .btn-action { width: 100%; font-size: 1.1rem; padding: 14px 20px; }
    #counterSelect { max-width: none !important; }
}

/* ── admin-settings ── */
.hidden { display: none !important; }
.action-cell { justify-content: center; }
.action-btn { min-width: 96px; }

/* ── all-counters-display ── */
body.page-all-counters {
    background: #f0f4f8;
    color: #1e293b;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
@media (max-width: 768px) {
    body.page-all-counters {
        height: auto;
        min-height: 100vh;
        overflow-x: hidden;
        overflow-y: auto;
    }
}

#header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .6rem 1.5rem;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.header-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding-right: 1.5rem;
}
.header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .75rem;
    flex: 1;
    min-width: 0;
    padding-left: 1.25rem;
    border-left: 1px solid #e2e8f0;
}
#header .brand { font-size: 1.2rem; font-weight: 800; color: var(--eq-primary); letter-spacing: .5px; }
#header .brand span { color: #1e293b; }
#clock { font-size: 1.3rem; font-weight: 700; color: #374151; font-variant-numeric: tabular-nums; }
.branch-switcher {
    display: none;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
    margin-left: auto;
}
.branch-switcher.show { display: flex; }
.branch-switcher label {
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #64748b;
    font-weight: 700;
}
.branch-switcher select {
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    padding: .35rem .9rem;
    font-weight: 600;
    color: #1e293b;
    background: #fff;
}

#grid {
    flex: 1;
    display: grid;
    gap: 1rem;
    padding: 1rem 1.5rem;
    overflow: hidden;
}
@media (max-width: 768px) {
    #grid {
        flex: none;
        overflow: visible;
        grid-template-columns: repeat(2, 1fr) !important;
        grid-auto-rows: auto;
        padding: .75rem;
        gap: .75rem;
    }
}

.counter-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    position: relative;
    overflow: hidden;
    transition: border-color .3s, box-shadow .2s, transform .15s;
    box-shadow: 0 1px 6px rgba(0,0,0,.06);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}
.counter-card:hover {
    border-color: #93c5fd;
    box-shadow: 0 4px 16px rgba(29,78,216,.15);
    transform: translateY(-2px);
}
.counter-card .open-link {
    position: absolute;
    top: 8px;
    right: 10px;
    font-size: .6rem;
    color: #93c5fd;
    opacity: 0;
    transition: opacity .2s;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.counter-card:hover .open-link { opacity: 1; }
.counter-card.flash { animation: cardFlash .8s ease; }
.counter-card .counter-card-img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: .4rem;
}
@keyframes cardFlash {
    0%,100% { border-color: #e2e8f0; }
    30%      { border-color: var(--eq-primary); box-shadow: 0 0 24px rgba(29,78,216,.2); }
}
.counter-card .counter-name {
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #64748b;
    margin-bottom: .3rem;
}
.counter-card .prefix-badge {
    background: color-mix(in srgb, var(--eq-primary) 12%, white);
    color: var(--eq-primary);
    font-size: .65rem;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 20px;
    letter-spacing: 1px;
    margin-bottom: .5rem;
}
.counter-card .ticket-label {
    font-size: .65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #94a3b8;
    margin-bottom: .2rem;
}
.counter-card .ticket-number {
    font-size: clamp(2.5rem, 8vw, 6rem);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -3px;
    color: #000000;
    transition: transform .2s, color .2s;
}
@media (max-width: 768px) {
    .counter-card .ticket-number { font-size: clamp(1.8rem, 10vw, 2.8rem); letter-spacing: -1px; }
    .counter-card { padding: .75rem .5rem; min-height: 0; }
    .counter-card .counter-name { font-size: .65rem; margin-bottom: .2rem; }
    .counter-card .prefix-badge { font-size: .6rem; padding: 2px 8px; margin-bottom: .3rem; }
    .counter-card .ticket-label { font-size: .55rem; }
    .counter-card .stats-row { gap: .75rem; margin-top: .4rem; }
    .counter-card .stat-val { font-size: .9rem; }
    .counter-card .stat-lbl { font-size: .55rem; }
    .idle-badge { font-size: .55rem; margin-top: .25rem; }
}
.counter-card .ticket-number.idle { color: #cbd5e1; }
.counter-card .ticket-number.pulse { animation: numPulse .4s ease; }
@keyframes numPulse {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.18); color: #000000; }
    100% { transform: scale(1); }
}
.counter-card .stats-row { display: flex; gap: 1.2rem; margin-top: .6rem; }
.counter-card .stat-item { text-align: center; }
.counter-card .stat-val  { font-size: 1.1rem; font-weight: 800; }
.counter-card .stat-lbl  { font-size: .6rem; color: #94a3b8; text-transform: uppercase; letter-spacing: .5px; }
.stat-waiting { color: #d97706; }
.stat-served  { color: #059669; }
.idle-badge {
    font-size: .65rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: .4rem;
}

#ticker {
    flex-shrink: 0;
    background: #fff;
    border-top: 1px solid #e2e8f0;
    padding: .35rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    overflow: hidden;
}
#ticker .ticker-label {
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #94a3b8;
    white-space: nowrap;
}
#ticker-items { display: flex; gap: .75rem; overflow: hidden; flex: 1; }
.ticker-item {
    background: color-mix(in srgb, var(--eq-primary) 12%, white);
    border: 1px solid color-mix(in srgb, var(--eq-primary) 35%, white);
    border-radius: 6px;
    padding: 2px 12px;
    font-size: .75rem;
    font-weight: 700;
    color: var(--eq-primary);
    white-space: nowrap;
}

#loading {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #94a3b8;
}

#nav-links {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
    max-width: min(100%, 720px);
    margin-left: auto;
}
.nav-btn {
    padding: 6px 12px;
    font-size: 0.75rem;
    background: color-mix(in srgb, var(--eq-primary) 12%, white);
    border: 1px solid color-mix(in srgb, var(--eq-primary) 35%, white);
    color: var(--eq-primary);
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}
.nav-btn:hover { background: #bfdbfe; border-color: #93c5fd; color: #0d1b3d; }
.nav-btn.active { background: var(--eq-primary); border-color: var(--eq-primary); color: #fff; }

@media (max-width: 900px) {
    #header { flex-wrap: wrap; gap: .75rem; }
    .header-main, .header-actions { width: 100%; }
    .header-main { padding-right: 0; }
    .header-actions {
        flex-direction: column;
        align-items: stretch;
        padding-left: 0;
        border-left: 0;
        padding-top: .35rem;
        border-top: 1px solid #e2e8f0;
    }
    .branch-switcher { width: 100%; justify-content: flex-start; }
    .branch-switcher select { min-width: 220px; max-width: 100%; }
    #nav-links { max-width: 100%; justify-content: flex-start; margin-left: 0; }
    #clock { align-self: flex-start; }
}

/* ── branches ── */
.action-cell { justify-content: flex-end; }

/* ── counter-display ── */
body.page-counter-display {
    background: radial-gradient(circle at top, #eef2ff 0%, #f8fafc 50%, #e2e8f0 100%);
    color: #111827;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.monitor-shell {
    width: min(100%, 1120px);
    margin: 0 auto;
    padding: 1rem 1rem 1.5rem;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .6rem 1.5rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 22px;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.topbar-main { display: flex; align-items: center; gap: 10px; min-width: 0; }
.topbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .75rem;
    flex: 1;
    min-width: 0;
}
.brand { display: flex; align-items: center; gap: 10px; font-size: 1.2rem; font-weight: 800; color: var(--eq-primary); letter-spacing: .5px; }
.brand span { color: #1e293b; }

.monitor-stage {
    position: relative;
    margin-top: 1rem;
    background: rgba(255,255,255,.88);
    border: 1px solid rgba(226,232,240,.95);
    border-radius: 28px;
    padding: 1.4rem;
    box-shadow: 0 18px 38px rgba(15, 23, 42, .08);
}

.realtime-dot {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: #ef4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, .15);
}
.realtime-dot.connected { background: #22c55e; box-shadow: 0 0 0 4px rgba(34, 197, 94, .15); }
.realtime-dot.connecting,
.realtime-dot.disconnected { background: #ef4444; box-shadow: 0 0 0 4px rgba(239, 68, 68, .15); }
.sr-only-status { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }

.counter-header { text-align: center; padding: .4rem 1rem 0; }
.counter-prefix-badge {
    display: inline-block;
    font-size: .92rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #475569;
    padding: 4px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 30px;
    margin-bottom: 8px;
    background: #fff;
}
.counter-profile-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
    border: 3px solid rgba(30, 41, 59, .15);
    box-shadow: 0 8px 20px rgba(15, 23, 42, .12);
    display: block;
    margin: .4rem auto .75rem;
}
.counter-name { font-size: clamp(1.5rem, 4vw, 2.1rem); font-weight: 800; color: #0f172a; letter-spacing: .02em; }

.main-stage {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1rem 1rem 1.2rem;
}

.serving-label {
    font-size: .82rem;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 12px;
}

.ticket-number {
    font-size: clamp(4.5rem, 18vw, 10rem);
    font-weight: 900;
    letter-spacing: -.08em;
    line-height: 1;
    color: #020617;
    transition: color .3s ease;
    user-select: none;
}
.ticket-number.idle { color: #cbd5e1; text-shadow: none; }
.ticket-number.flash { animation: flashIn .6s ease-out; }
@keyframes flashIn {
    0%   { transform: scale(1.15); color: #000000; }
    100% { transform: scale(1); }
}

.status-chip {
    margin-top: 16px;
    font-size: .84rem;
    font-weight: 700;
    letter-spacing: .12em;
    padding: 6px 24px;
    border-radius: 30px;
    text-transform: uppercase;
}
.status-chip.serving { background: rgba(16,185,129,.1); color: #059669; border: 1px solid #059669; }
.status-chip.idle    { background: rgba(0,0,0,.04); color: #9ca3af; border: 1px solid #e5e7eb; }

.stats-bar {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .85rem;
    margin-top: .5rem;
}
.stat-item { text-align: center; background: #fff; border: 1px solid #e2e8f0; border-radius: 18px; padding: .95rem .8rem; }
.stat-value { font-size: clamp(1.55rem, 4vw, 2.15rem); font-weight: 800; color: #0f172a; line-height: 1; }
.stat-value.waiting { color: #d97706; }
.stat-value.served  { color: #059669; }
.stat-label { font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: #6b7280; margin-top: 6px; }

.next-strip { display: flex; justify-content: center; align-items: center; gap: 10px; padding: .85rem 0 0; flex-wrap: wrap; }
.next-label { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: #64748b; margin-right: 4px; }
.next-ticket {
    font-size: .95rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 999px;
    background: #e2e8f0;
    color: #374151;
    border: 1px solid #cbd5e1;
}

@media (max-width: 768px) {
    .monitor-shell { padding: .75rem; }
    .topbar { flex-direction: column; align-items: stretch; gap: .75rem; }
    .topbar-actions { flex-direction: column; align-items: stretch; }
    #nav-links { margin-left: 0; justify-content: flex-start; max-width: 100%; }
    .branch-switcher { width: 100%; }
    .counter-profile-img { width: 88px; height: 88px; margin-bottom: .55rem; }
    .stats-bar { grid-template-columns: 1fr; }
}

/* ── dashboard ── */
.counter-card { border-radius: 16px; border: none; transition: transform .15s; }
.counter-card:hover { transform: translateY(-3px); }
.ticket-display { font-size: 5rem; font-weight: 800; letter-spacing: -2px; line-height: 1; }
.ticket-display.idle { color: #adb5bd; }
.ticket-display.active { color: var(--eq-primary); }
.stat-pill { font-size: .78rem; padding: 4px 12px; border-radius: 20px; font-weight: 600; }
.progress-thin { height: 6px; border-radius: 4px; }
.dash-container { max-width: 1100px; margin: 0 auto; }
.hourly-chart { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.hourly-chart > div { min-width: 500px; }
@media (max-width: 768px) {
    .ticket-display { font-size: 3.5rem; }
    .stat-row { flex-direction: column; gap: .5rem; }
    .stat-row .vr { display: none; }
}
@media (max-width: 576px) {
    .ticket-display { font-size: 2.5rem; }
}

/* ── display ── */
body.page-display { background: radial-gradient(circle at top, #1f2937 0%, #0f172a 55%, #020617 100%); color: #fff; }
.display-shell { width: min(100%, 760px); }
.display-card { position: relative; background: rgba(15, 23, 42, .76); border: 1px solid rgba(255,255,255,.1); border-radius: 28px; padding: 1.25rem; box-shadow: 0 20px 50px rgba(2, 6, 23, .35); backdrop-filter: blur(14px); }
.brand-wrap { text-align:center; margin-bottom:1rem; }
.brand-name { font-size:clamp(1.5rem, 4vw, 2.1rem); font-weight:800; letter-spacing:.02em; }
.branch-name { font-size:1rem; opacity:.72; margin-top:.2rem; }
.status-dot { position:absolute; top:1rem; right:1rem; width:12px; height:12px; border-radius:999px; background:#ef4444; box-shadow:0 0 0 4px rgba(239,68,68,.18); }
.status-dot.connected { background:#22c55e; box-shadow:0 0 0 4px rgba(34,197,94,.18); }
.status-dot.connecting,
.status-dot.disconnected { background:#ef4444; box-shadow:0 0 0 4px rgba(239,68,68,.18); }
.number { font-size: clamp(4rem, 18vw, 7rem); font-weight: 900; line-height: 1; margin: .55rem 0 .35rem; letter-spacing: -.06em; }
.loket { font-size: clamp(1.15rem, 4vw, 1.8rem); color: rgba(255,255,255,.7); font-weight:700; }
.footer-note { margin-top: 1rem; color: rgba(255,255,255,.5); font-size: .85rem; }

/* ── feedback ── */
.star-text { color: #f59e0b; font-weight: 700; }
.stat-card { border-radius: 12px; border: none; }

/* ── kiosk ── */
body.page-kiosk {
    background: var(--eq-primary);
    color: white;
    text-align: center;
    overflow-x: hidden;
}
.kiosk-shell { width:min(100%, 980px); }
#btnRow { display:flex; flex-wrap:wrap; justify-content:center; gap:1rem; width:min(100%, 960px); }
.btn-loket { font-size:clamp(1.5rem, 6vw, 3rem); padding:1.5rem 1rem; margin:0; width:min(100%, 300px); }
.btn-auto { font-size:clamp(2rem, 7vw, 3.5rem); padding:1.25rem 1.5rem; width:min(100%, 420px); }
.ticket-card { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18); border-radius: 24px; padding: 1.35rem 1.5rem; backdrop-filter: blur(8px); box-shadow: 0 16px 40px rgba(15, 23, 42, .22); }
.ticket-label-text { display:block; font-size:clamp(1rem, 3vw, 1.35rem); font-weight:700; opacity:.9; }
.ticket-number-display { display:block; font-size:clamp(3.4rem, 14vw, 6rem); font-weight:900; letter-spacing:.04em; line-height:1; margin-top:.35rem; text-shadow:0 6px 18px rgba(0,0,0,.18); }
.ticket-wait-info { display:block; font-size:clamp(.95rem, 2.5vw, 1.15rem); font-weight:600; opacity:.88; margin-top:.85rem; }
.kiosk-label { font-size:.85rem; opacity:.7; margin-bottom:4px; }
.kiosk-qr-card { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18); border-radius: 20px; padding: 1rem 1.25rem; margin: 1.1rem auto 0; width: min(100%, 320px); backdrop-filter: blur(8px); display:none; }
.kiosk-qr-card.show { display:block; }
.kiosk-qr-label { font-size: .82rem; letter-spacing: .04em; text-transform: uppercase; opacity: .8; margin-bottom: .75rem; }
#kioskQrCode { display: flex; justify-content: center; min-height: 140px; align-items: center; }
#kioskQrCode img, #kioskQrCode canvas { background: white; padding: 8px; border-radius: 12px; }
.kiosk-public-link { display: block; margin-top: .8rem; font-size: .8rem; color: rgba(255,255,255,.92); text-decoration: none; word-break: break-all; }
.lang-switcher { position: absolute; top: 10px; right: 10px; width: 120px; }
.result-modal .modal-dialog { max-width:min(92vw, 760px); }
.result-modal .modal-content { border-radius:20px; overflow:hidden; border:0; background:#fff; box-shadow:0 20px 48px rgba(15, 23, 42, .2); }
.result-modal .modal-header { background:var(--eq-primary) !important; padding:1.2rem 1.4rem; }
.result-modal .modal-body { padding:1.25rem !important; background:#fff; }
.result-modal .ticket-card { background: linear-gradient(135deg, var(--eq-primary) 0%, color-mix(in srgb, var(--eq-primary) 80%, black) 100%); border: 0; border-radius: 24px; box-shadow: none; padding:1.6rem 1.2rem; }
.result-modal .kiosk-qr-card { background: color-mix(in srgb, var(--eq-primary) 8%, white); border: 1px solid color-mix(in srgb, var(--eq-primary) 30%, white); border-radius: 22px; box-shadow: none; width:100%; max-width:none; }
.result-modal .kiosk-qr-label { color: color-mix(in srgb, var(--eq-primary) 65%, black); opacity: 1; }
.result-modal .kiosk-public-link { color: var(--eq-primary); }
.ticket-result-layout { display:grid; grid-template-columns:minmax(0, 1.35fr) minmax(240px, .95fr); gap:1rem; align-items:stretch; }
.ticket-result-meta { display:flex; flex-direction:column; gap:1rem; }
.auto-close-note { margin-top: .25rem; font-size: .82rem; opacity: .82; color: #6b7280; }
.result-actions { display:flex; justify-content:center; padding:0 1.25rem 1.25rem; }
.result-actions .btn { min-width:160px; }
@media (max-width: 576px) {
    body.page-kiosk { justify-content:flex-start !important; }
    h1 { font-size:1.75rem; }
    .result-modal .modal-dialog { max-width:calc(100vw - 1rem); margin:.5rem auto; }
    .result-modal .modal-content { border-radius:24px; }
    .ticket-result-layout { grid-template-columns:1fr; }
    .result-modal .ticket-card { padding:1.3rem 1rem; }
    .result-modal .modal-header { padding:1rem 1.1rem; }
    .result-actions { padding:0 1rem 1rem; }
    .result-actions .btn { width:100%; }
}

/* ── landing ── */
:root {
    --brand: var(--eq-primary, #3b82f6);
    --accent: #ff9f00;
    --landing-blue-900: #072c9f;
    --landing-blue-800: #0d46cb;
    --landing-blue-700: #1d64ff;
    --landing-text-primary: #0f172a;
    --landing-text-secondary: #475569;
    --landing-btn-min-height: 44px;
    --landing-btn-font-size: .95rem;
}
body.page-landing {
    font-size: 16px;
    line-height: 1.55;
    color: var(--landing-text-primary);
    background:
        radial-gradient(circle at 10% -10%, rgba(29, 100, 255, .18) 0%, rgba(29, 100, 255, 0) 42%),
        linear-gradient(180deg, #edf4ff 0%, #ffffff 24%);
}
body.page-landing p,
body.page-landing li,
body.page-landing .text-muted {
    font-size: 1rem;
    line-height: 1.6;
}
body.page-landing .btn {
    min-height: var(--landing-btn-min-height);
    padding: .55rem 1.05rem;
    font-size: var(--landing-btn-font-size);
    font-weight: 600;
}
body.page-landing .form-control,
body.page-landing .form-select {
    min-height: 44px;
    font-size: .95rem;
}
body.page-landing textarea.form-control {
    min-height: 120px;
}

.landing-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: linear-gradient(90deg, var(--landing-blue-900) 0%, var(--landing-blue-800) 48%, var(--landing-blue-700) 100%);
    box-shadow: 0 12px 28px rgba(7, 44, 159, .35);
    border-bottom: 1px solid rgba(255,255,255,.15);
}

.hero {
    background: linear-gradient(140deg, #031f7a 0%, var(--landing-blue-800) 42%, var(--landing-blue-700) 100%);
    color: #fff; padding: 5rem 1rem 4rem; text-align: center;
    position: relative; overflow: hidden;
}
.hero-top-offset {
    padding-top: 7rem;
}
.hero::after {
    content: ''; position: absolute; bottom: -2px; left: 0; right: 0; height: 60px;
    background: #fff; clip-path: ellipse(55% 100% at 50% 100%);
}
.hero h1 { font-size: 3rem; font-weight: 800; letter-spacing: -1px; }
.hero h1 span { color: #86efac; }
.hero p.lead { font-size: 1.25rem; opacity: .9; max-width: 600px; margin: 1rem auto 2rem; }
.hero .btn-hero { min-height: 50px; padding: .7rem 2rem; font-size: 1.02rem; font-weight: 700; border-radius: 50px; }
.hero-badge {
    display: inline-flex; align-items: center; gap: .5rem; border-radius: 999px;
    background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18);
    padding: .45rem 1rem; font-size: .95rem; font-weight: 600;
}
.hero-stats { margin-top: 2.5rem; }
.hero-stat-card {
    background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.12);
    border-radius: 18px; padding: 1.25rem; height: 100%; backdrop-filter: blur(10px);
}
.hero-stat-card strong { display: block; font-size: 1.05rem; }

.section-block { padding: 5rem 1rem; }
.section-soft { background: #f8fafc; }
.section-title { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; letter-spacing: -.03em; color: #0f172a; display: block; }
.section-copy { color: #64748b; max-width: 720px; margin: 0 auto; }
.features { padding: 4rem 1rem; }
.feature-card, .workflow-card, .platform-card, .sector-card {
    border: 1px solid #e2e8f0; border-radius: 20px; background: #fff; padding: 1.5rem;
    height: 100%; box-shadow: 0 10px 30px rgba(15, 23, 42, .05);
}
.feature-icon {
    width: 56px; height: 56px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; margin-bottom: 1rem;
}
.feature-icon.blue   { background: #dbeafe; }
.feature-icon.green  { background: #dcfce7; }
.feature-icon.purple { background: #e0e7ff; }
.feature-icon.amber  { background: #fef3c7; }
.feature-icon.cyan   { background: #cffafe; }
.feature-icon.rose   { background: #ffe4e6; }
.feature-icon.slate  { background: #e2e8f0; }
.feature-icon.teal   { background: #ccfbf1; }
.workflow-step {
    width: 42px; height: 42px; border-radius: 999px; display: inline-flex; align-items: center;
    justify-content: center; background: color-mix(in srgb, var(--eq-primary) 12%, white); color: var(--eq-primary); font-weight: 800; margin-bottom: 1rem;
}
.platform-card ul { padding-left: 1.1rem; margin-bottom: 0; color: #475569; }
.platform-card li + li { margin-top: .55rem; }
.sector-card { text-align: center; }
.sector-icon { font-size: 2rem; margin-bottom: .75rem; }

.pricing { padding: 4rem 1rem; background: #f8fafc; }
.pricing h2 { font-weight: 800; }
.pricing .text-muted { font-size: .98rem; }
.price-card {
    border: 1px solid #e2e8f0; border-radius: 16px; background: #fff;
    padding: 2rem; text-align: center; transition: transform .2s, box-shadow .2s;
    height: 100%; display: flex; flex-direction: column;
}
.price-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,.1); }
.price-card.popular { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand); }
.price-card .plan-name { font-size: 1.3rem; font-weight: 700; color: #1e293b; }
.price-card .limits { color: #64748b; font-size: .95rem; flex-grow: 1; }
.price-card .limits li { padding: .35rem 0; }
.popular-badge {
    background: var(--brand); color: #fff; font-size: .75rem; font-weight: 700;
    padding: 3px 14px; border-radius: 20px; display: inline-block; margin-bottom: .5rem;
}

.footer { background: #0f172a; color: #94a3b8; padding: 2rem 1rem; text-align: center; font-size: .9rem; }
.footer a { color: #93c5fd; text-decoration: underline; }

.feedback-section {
    background: #fff;
}
.feedback-container {
    max-width: 800px;
}
.feedback-form-card,
.request-modal-content {
    border-radius: 16px;
}
.star-rating {
    cursor: pointer;
    font-size: 2rem;
    line-height: 1;
}

.landing-cta {
    padding: 4rem 1rem;
    text-align: center;
    background: linear-gradient(135deg, #0d1b3d, #1d4ed8);
    color: #fff;
}
.landing-cta .lead {
    font-size: 1.1rem;
}
.cta-button {
    min-height: 50px;
    min-width: 220px;
}

.lang-switcher { width: 140px; }
.landing-nav-actions { flex-wrap: wrap; justify-content: flex-end; }
.landing-nav-links { display: flex; gap: .5rem; flex-wrap: wrap; }
.landing-nav-links .btn {
    min-height: 38px;
    padding: .45rem .85rem;
    border-radius: 999px;
    border-color: rgba(255,255,255,.55);
    background: rgba(255,255,255,.08);
    backdrop-filter: blur(4px);
}
.landing-nav-links .btn:hover {
    background: rgba(255,255,255,.18);
    border-color: rgba(255,255,255,.8);
}
#navGuest .btn-light,
#navUser .btn-light {
    background: #ffffff;
    color: var(--landing-blue-900) !important;
}
.navbar-toggler { border-color: rgba(255,255,255,.45); }
.navbar-toggler:focus { box-shadow: 0 0 0 .2rem rgba(255,255,255,.25); }
.landing-nav-panel { width: 100%; }

@media (max-width: 768px) {
    body.page-landing {
        font-size: 15px;
    }
    .section-block,
    .features,
    .pricing,
    .landing-cta,
    .feedback-section {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
    .hero-top-offset {
        padding-top: 6.25rem;
    }
    .hero h1 { font-size: 2rem; }
    .hero p.lead { font-size: 1rem; }
    .hero .btn-hero {
        width: min(100%, 320px);
    }
    .landing-nav-panel {
        margin-top: .85rem; padding: .9rem;
        background: linear-gradient(180deg, rgba(7, 44, 159, .86) 0%, rgba(13, 70, 203, .82) 100%);
        border: 1px solid rgba(255,255,255,.24);
        border-radius: 16px;
    }
    .landing-nav-actions { width: 100%; justify-content: center; }
    .landing-nav-links { justify-content: center; width: 100%; }
    .landing-nav-links .btn, #navGuest .btn, #navUser .btn { width: 100%; }
    #navGuest, #navUser { width: 100%; justify-content: center; flex-direction: column; }
}

@media (max-width: 576px) {
    .section-title {
        font-size: 1.45rem;
    }
    .landing-cta .lead,
    .section-copy {
        font-size: .95rem;
    }
    .cta-button {
        width: 100%;
        max-width: 320px;
    }
    .star-rating {
        font-size: 1.75rem;
    }
}

/* ── maintenance ── */
body.page-maintenance {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: linear-gradient(135deg, #0d1b3d 0%, var(--eq-primary) 45%, var(--eq-primary) 100%);
}
.maintenance-card {
    width: min(100%, 720px);
    background: rgba(255,255,255,.98);
    border: 0;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, .25);
}
.brand-logo { width: 80px; height: 80px; object-fit: contain; border-radius: 20px; }
.maintenance-badge {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--eq-primary) 12%, white);
    color: var(--eq-primary);
    padding: .5rem .9rem;
    font-weight: 700;
    font-size: .95rem;
}

/* ── queue-detail ── */
body.page-queue-detail { background: linear-gradient(180deg, #eef2ff 0%, #f8fafc 100%); color: #0f172a; }
.detail-card { max-width: 720px; border-radius: 22px; border: 0; overflow: hidden; position: relative; }
.detail-card .card-body { padding: 1.25rem; }
.ticket-no { font-size: clamp(2.6rem, 13vw, 4.5rem); font-weight: 800; letter-spacing: -0.06em; line-height: 1; }
.meta-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: #64748b; }
.meta-value { font-size: .95rem; font-weight: 600; color: #0f172a; }
.live-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.live-card { border: 1px solid #e2e8f0; border-radius: 16px; background: #fff; padding: .9rem 1rem; min-width: 0; }
.live-value { font-size: clamp(1.15rem, 4vw, 1.7rem); font-weight: 800; line-height: 1.1; margin-top: .35rem; }
.meta-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem 1rem; }
.meta-item { border-top: 1px solid #e2e8f0; padding-top: .7rem; min-width: 0; }
.status-strip { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; margin-bottom: 1rem; padding-right: 1.25rem; }
.status-stack { display: flex; flex-direction: column; gap: .45rem; }
.alert-one-ahead { max-width: 860px; border-radius: 18px; border: 0; }
@media (max-width: 576px) {
    body.page-queue-detail { padding: .75rem; }
    .live-grid { grid-template-columns: 1fr; }
    .meta-grid { grid-template-columns: 1fr; }
    .status-strip { padding-right: 1rem; }
}

/* ── super-admin ── */
.stat-box { background: #fff; border: 1px solid #e5e7eb; }
.stat-num { color: #1d4ed8; }
.stat-label { font-size: 0.85rem; color: #6b7280; margin-top: 0.5rem; }
.badge-active { background: #dcfce7; color: #166534; }
.badge-inactive { background: #fee2e2; color: #991b1b; }
.badge-active, .badge-inactive, .plan-badge, .menu-summary-badge, .menu-option-badge, #appVersionBadge {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    white-space: nowrap;
    flex-shrink: 0;
}
.plan-badge { font-weight: 600; padding: 4px 10px; border-radius: 20px; }
.btn-sm { padding: 4px 8px; font-size: 0.85rem; }
.table-hover tbody tr:hover { background: #f9fafb; }
.menu-role-card { border: 1px solid #e5e7eb; border-radius: 14px; overflow: hidden; background: #fff; }
.menu-role-card .card-header { background: #f8fafc; border-bottom: 1px solid #e5e7eb; }
.menu-permission-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .75rem; }
.menu-option { border: 1px solid #e5e7eb; border-radius: 12px; padding: .85rem 1rem; background: #fff; min-height: 100%; }
.menu-option .form-check { margin: 0; }
.menu-option .form-check-input { cursor: pointer; }
.menu-option .form-check-label { cursor: pointer; width: 100%; }
.menu-option-title { display: flex; align-items: center; justify-content: space-between; gap: .75rem; font-weight: 700; color: #1f2937; flex-wrap: wrap; }
.menu-option-desc { margin-top: .35rem; color: #6b7280; font-size: .9rem; line-height: 1.4; }
.menu-summary-badge { font-weight: 600; }
.super-admin-alerts { position: sticky; top: 1rem; z-index: 1030; }
.pager-bar { border-top: 1px solid #e5e7eb; background: #fff; }
.action-btn-group { display: flex; flex-wrap: wrap; gap: .35rem; }
.action-btn { min-width: 84px; }

/* ── tenant-admin ── */
.stat-card { border-radius: 16px; border: none; }
.usage-bar { height: 8px; border-radius: 4px; }

/* ── trend-report ── */
.chart-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.chart-wrap > div { min-width: 320px; }
.bar-col { display:flex; flex-direction:column; align-items:center; flex:1; min-width:0; }

/* ── users ── */
.action-btn { min-width: 98px; }
.action-btn-wide { min-width: 132px; }

/* ── swipe gestures (admin-counters mobile) ── */
#swipeZone {
    position: relative;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}
.swipe-flash-right {
    animation: swipeFlashRight .35s ease-out forwards;
}
.swipe-flash-left {
    animation: swipeFlashLeft .35s ease-out forwards;
}
.swipe-flash-up {
    animation: swipeFlashUp .35s ease-out forwards;
}
@keyframes swipeFlashRight {
    0%   { background: transparent; transform: translateX(0); }
    40%  { background: rgba(34, 197, 94, .18); transform: translateX(12px); }
    100% { background: transparent; transform: translateX(0); }
}
@keyframes swipeFlashLeft {
    0%   { background: transparent; transform: translateX(0); }
    40%  { background: rgba(239, 68, 68, .18); transform: translateX(-12px); }
    100% { background: transparent; transform: translateX(0); }
}
@keyframes swipeFlashUp {
    0%   { background: transparent; transform: translateY(0); }
    40%  { background: rgba(250, 204, 21, .18); transform: translateY(-10px); }
    100% { background: transparent; transform: translateY(0); }
}
/* Swipe hint arrows (visible only on mobile) */
.swipe-hint-arrows {
    display: none;
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}
@media (max-width: 768px) {
    .swipe-hint-arrows { display: flex; justify-content: space-between; align-items: center; padding: 0 12px; }
}
.swipe-hint-arrow {
    font-size: 1.6rem;
    opacity: .22;
    animation: hintPulse 2.5s ease-in-out infinite;
}
.swipe-hint-arrow.up { position: absolute; top: -28px; left: 50%; transform: translateX(-50%); }
@keyframes hintPulse {
    0%,100% { opacity: .22; }
    50%      { opacity: .55; }
}
