:root {
    --bg: #f4f8fd;
    --surface: rgba(255, 255, 255, 0.86);
    --text: #071a33;
    --muted: #66748a;
    --navy: #061b3d;
    --blue: #1588f2;
    --blue-2: #1da1ff;
    --border: rgba(7, 26, 51, 0.10);
    --shadow: 0 32px 90px rgba(6, 27, 61, 0.16);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 50% 15%, rgba(29, 161, 255, 0.18), transparent 28%),
        radial-gradient(circle at 10% 90%, rgba(21, 136, 242, 0.14), transparent 30%),
        linear-gradient(135deg, #ffffff 0%, #f6faff 52%, #eaf4ff 100%);
}

.construction-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px;
}

.hero-card {
    width: min(960px, 100%);
    min-height: 560px;
    display: grid;
    place-items: center;
    gap: 36px;
    padding: clamp(32px, 6vw, 76px);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 36px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    text-align: center;
    overflow: hidden;
    position: relative;
}

.hero-card::before {
    content: "";
    position: absolute;
    inset: -40%;
    background:
        radial-gradient(circle at 45% 35%, rgba(29, 161, 255, 0.18), transparent 22%),
        radial-gradient(circle at 55% 45%, rgba(6, 27, 61, 0.10), transparent 26%);
    pointer-events: none;
}

.brand-animation,
.construction-content {
    position: relative;
    z-index: 1;
}

.brand-animation {
    display: grid;
    justify-items: center;
    gap: 18px;
}

.brand-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(10px, 2vw, 18px);
}

.brand-word {
    font-size: clamp(2.5rem, 9vw, 6rem);
    font-weight: 850;
    line-height: 1;
    letter-spacing: -0.08em;
    opacity: 0;
    transform: translateY(12px);
}

.brand-word-left {
    color: var(--navy);
    animation: textFadeIn 700ms ease forwards 2750ms;
}

.brand-word-right {
    color: var(--blue);
    animation: textFadeIn 700ms ease forwards 3550ms;
}

.venueeye-mark {
    width: clamp(86px, 15vw, 150px);
    height: clamp(86px, 15vw, 150px);
    overflow: visible;
    filter: drop-shadow(0 0 24px rgba(21, 136, 242, 0.38));
    animation: markIntro 600ms cubic-bezier(.2,.9,.2,1) both;
}

.logo-v {
    transform-origin: center;
    animation: vGlow 3300ms ease-in-out both;
}

.eye-content {
    opacity: 1;
}

.pupil {
    transform-box: fill-box;
    transform-origin: center;
    animation: pupilLook 2600ms ease-in-out 2100ms both;
}

.eye-lid-top,
.eye-lid-bottom {
    /* The eyelids are animated by SVG path morphs in the template.
       This keeps the left and right endpoints anchored during the blink. */
}

.construction-content {
    max-width: 720px;
    opacity: 0;
    transform: translateY(16px);
    animation: contentFadeIn 700ms ease forwards 5200ms;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--blue);
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.82rem;
}

h1 {
    margin: 0;
    font-size: clamp(2rem, 6vw, 4.2rem);
    line-height: 0.95;
    letter-spacing: -0.07em;
}

.description {
    margin: 22px auto 0;
    max-width: 680px;
    color: var(--muted);
    font-size: clamp(1rem, 2vw, 1.16rem);
    line-height: 1.75;
}

.status-pill {
    width: fit-content;
    margin: 28px auto 0;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 1px solid rgba(21, 136, 242, 0.22);
    border-radius: 999px;
    background: rgba(21, 136, 242, 0.08);
    color: var(--navy);
    font-weight: 800;
    font-size: 0.92rem;
}

.pulse-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--blue);
    box-shadow: 0 0 0 rgba(21, 136, 242, 0.55);
    animation: pulseDot 1.6s ease-in-out infinite;
}

@keyframes markIntro {
    from {
        opacity: 0;
        transform: scale(.86) translateY(10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}


@keyframes pupilLook {
    0%, 100% {
        transform: translateX(0);
    }

    20%, 34% {
        transform: translateX(-16px);
    }

    52%, 66% {
        transform: translateX(16px);
    }

    82% {
        transform: translateX(0);
    }
}

@keyframes textFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes contentFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes vGlow {
    0%, 100% {
        filter: drop-shadow(0 0 0 rgba(21, 136, 242, 0));
    }

    50% {
        filter: drop-shadow(0 0 12px rgba(21, 136, 242, 0.7));
    }
}

@keyframes pulseDot {
    0% {
        box-shadow: 0 0 0 0 rgba(21, 136, 242, 0.55);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(21, 136, 242, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(21, 136, 242, 0);
    }
}

@media (max-width: 560px) {
    .auth-logo {
        width: min(300px, 94%);
        max-height: 100px;
    }


    .construction-page {
        padding: 18px;
    }

    .hero-card {
        border-radius: 28px;
        min-height: 520px;
    }

    .brand-row {
        gap: 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 1ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 1ms !important;
    }
}


/* =========================================================
   Authentication pages
========================================================= */

.auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px;
    background:
        radial-gradient(circle at 50% 15%, rgba(29, 161, 255, 0.18), transparent 28%),
        linear-gradient(135deg, #ffffff 0%, #f6faff 52%, #eaf4ff 100%);
}

.auth-card {
    width: min(460px, 100%);
    padding: 38px;
    border: 1px solid var(--border);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);

    text-align: center;
}

.auth-logo {
    width: min(360px, 92%);
    max-height: 120px;
    height: auto;
    display: block;
    margin: 0 auto 30px;
    object-fit: contain;
}

.auth-form {
    display: grid;
    gap: 16px;
    margin-top: 24px;
}

.auth-form label {
    display: grid;
    gap: 8px;
    color: var(--navy);
    font-weight: 750;
    text-align: left;
}

.auth-form input {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 13px 14px;
    font: inherit;
    color: var(--text);
    background: #ffffff;
    outline: none;
}

.auth-form input:focus {
    border-color: rgba(21, 136, 242, 0.45);
    box-shadow: 0 0 0 4px rgba(21, 136, 242, 0.12);
}

.auth-form button,
.empty-state button {
    border: 0;
    border-radius: 14px;
    padding: 13px 16px;
    color: #ffffff;
    font: inherit;
    font-weight: 850;
    cursor: pointer;
    background: linear-gradient(135deg, var(--blue), var(--blue-2));
    box-shadow: 0 14px 30px rgba(21, 136, 242, 0.25);
}

.auth-switch {
    margin: 22px 0 0;
    color: var(--muted);
    text-align: center;
}

.auth-switch a {
    color: var(--blue);
    font-weight: 850;
    text-decoration: none;
}

.flash-list {
    position: fixed;
    top: 22px;
    right: 22px;
    z-index: 9999;
    display: grid;
    gap: 12px;
    width: min(360px, calc(100vw - 32px));
    margin: 0;
    pointer-events: none;
}

.flash {
    padding: 14px 16px;
    border-radius: 16px;
    font-weight: 800;
    line-height: 1.35;
    text-align: left;
    border: 1px solid rgba(255, 255, 255, 0.58);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    pointer-events: auto;
    transform: translateX(120%);
    opacity: 0;
    animation: toast-slide-in 420ms cubic-bezier(.2,.9,.2,1) forwards;
}

.flash.is-leaving {
    animation: toast-slide-out 320ms ease forwards;
}

.flash-success {
    color: #0f5132;
    background: rgba(209, 231, 221, 0.92);
    border-color: rgba(25, 135, 84, 0.24);
}

.flash-error {
    color: #842029;
    background: rgba(248, 215, 218, 0.94);
    border-color: rgba(220, 53, 69, 0.24);
}

.flash-info,
.flash-message {
    color: #084298;
    background: rgba(207, 226, 255, 0.94);
    border-color: rgba(13, 110, 253, 0.22);
}

.flash-warning {
    color: #664d03;
    background: rgba(255, 243, 205, 0.95);
    border-color: rgba(255, 193, 7, 0.28);
}

@keyframes toast-slide-in {
    from {
        opacity: 0;
        transform: translateX(120%);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toast-slide-out {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(120%);
    }
}

@media (max-width: 640px) {
    .flash-list {
        top: 14px;
        right: 14px;
        left: 14px;
        width: auto;
    }
}

/* =========================================================
   Dashboard foundation
========================================================= */

.dashboard-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    background: var(--bg);
}

.dashboard-sidebar {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 28px;
    color: #ffffff;
    background: linear-gradient(180deg, #163761 0%, #10294a 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.08);

    align-items: stretch;
}

.dashboard-logo {
    width: min(230px, 100%);
    max-height: 76px;
    height: auto;
    display: block;
    margin: 0 auto 36px;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(29, 161, 255, 0.25));
}

.dashboard-sidebar nav {
    display: grid;
    gap: 8px;

    width: 100%;
}

.dashboard-sidebar a {
    color: rgba(255, 255, 255, 0.78);
    text-decoration: none;
    padding: 12px 14px;
    border-radius: 14px;
    font-weight: 700;
}

.dashboard-sidebar a.active {
    color: #ffffff;
    background: rgba(29, 161, 255, 0.18);
    border: 1px solid rgba(29, 161, 255, 0.25);
}

.dashboard-sidebar a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.logout-link {
    margin-top: auto;
}

.dashboard-content {
    padding: 34px;
}

.dashboard-header {
    margin-bottom: 28px;
}

.dashboard-header h1 {
    margin-bottom: 0;
}

.empty-state {
    max-width: 760px;
    padding: 34px;
    border: 1px solid var(--border);
    border-radius: 28px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.empty-state p {
    color: var(--muted);
    line-height: 1.7;
}

@media (max-width: 800px) {
    .dashboard-shell {
        grid-template-columns: 1fr;
    }

    .dashboard-sidebar {
        min-height: auto;
    }
}


/* =========================================================
   Auth validation feedback
========================================================= */

.field-feedback {
    min-height: 1.2em;
    display: block;
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 650;
    line-height: 1.45;
}

.field-feedback.is-success {
    color: #0f766e;
}

.field-feedback.is-error {
    color: #b42318;
}

.auth-form input.is-valid {
    border-color: rgba(15, 118, 110, 0.45);
    box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.10);
}

.auth-form input.is-invalid {
    border-color: rgba(180, 35, 24, 0.45);
    box-shadow: 0 0 0 4px rgba(180, 35, 24, 0.10);
}

.password-requirements {
    display: grid;
    gap: 6px;
    margin: 4px 0 0;
    padding: 0;
    list-style: none;
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 650;
}

.password-requirements li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.password-requirements li::before {
    content: "○";
    color: var(--muted);
    font-weight: 900;
}

.password-requirements li.is-valid {
    color: #0f766e;
}

.password-requirements li.is-valid::before {
    content: "✓";
    color: #0f766e;
}

.password-requirements li.is-invalid {
    color: #b42318;
}

/* =========================================================
   Dashboard loading animation
========================================================= */

.dashboard-splash {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    padding: 32px;
    background:
        radial-gradient(circle at 50% 15%, rgba(29, 161, 255, 0.18), transparent 28%),
        radial-gradient(circle at 10% 90%, rgba(21, 136, 242, 0.14), transparent 30%),
        linear-gradient(135deg, #ffffff 0%, #f6faff 52%, #eaf4ff 100%);
    transition: opacity 600ms ease, visibility 600ms ease;
}

.dashboard-splash.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.dashboard-loader-card {
    width: min(760px, 100%);
    min-height: 360px;
    display: grid;
    place-items: center;
    gap: 22px;
    padding: clamp(32px, 6vw, 70px);
    border: 1px solid var(--border);
    border-radius: 36px;
    background: var(--surface);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    text-align: center;
    overflow: hidden;
    position: relative;
}

.dashboard-loader-card::before {
    content: "";
    position: absolute;
    inset: -40%;
    background:
        radial-gradient(circle at 45% 35%, rgba(29, 161, 255, 0.18), transparent 22%),
        radial-gradient(circle at 55% 45%, rgba(6, 27, 61, 0.10), transparent 26%);
    pointer-events: none;
}

.dashboard-loader-card .brand-animation,
.dashboard-loader-card .loader-subtitle {
    position: relative;
    z-index: 1;
}

.dashboard-splash .brand-word-left {
    animation-delay: 2650ms;
}

.dashboard-splash .brand-word-right {
    animation-delay: 3450ms;
}

.dashboard-splash .logo-v {
    animation-duration: 2900ms;
}

.dashboard-splash .pupil {
    animation-delay: 2200ms;
}

.loader-subtitle {
    margin: 0;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.22em;
    font-size: 0.78rem;
    font-weight: 800;
    opacity: 0;
    transform: translateY(12px);
    animation: textFadeIn 700ms ease forwards 4300ms;
}

.dashboard-shell.dashboard-loading {
    opacity: 0;
    transform: translateY(12px);
}

.dashboard-shell.is-visible {
    animation: dashboardIn 650ms ease forwards;
}

@keyframes dashboardIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================================
   Useful dashboard widgets
========================================================= */

.dashboard-warning {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 22px;
    padding: 14px 16px;
    border: 1px solid rgba(255, 193, 7, 0.34);
    border-radius: 18px;
    color: #664d03;
    background: rgba(255, 243, 205, 0.86);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 22px;
}

.metric-card,
.dashboard-panel {
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 20px 54px rgba(6, 27, 61, 0.10);
    backdrop-filter: blur(18px);
}

.metric-card {
    display: grid;
    gap: 8px;
    min-height: 150px;
    padding: 22px;
    border-radius: 24px;
    position: relative;
    overflow: hidden;
}

.metric-card::after {
    content: "";
    position: absolute;
    width: 120px;
    height: 120px;
    right: -46px;
    bottom: -54px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(29, 161, 255, 0.22), transparent 68%);
}

.metric-label {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.metric-card strong {
    color: var(--navy);
    font-size: clamp(2rem, 4vw, 3.1rem);
    line-height: 1;
    letter-spacing: -0.06em;
}

.metric-note {
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 650;
}

.dashboard-panels {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(340px, 0.65fr);
    gap: 22px;
}

.dashboard-panel {
    min-width: 0;
    padding: 24px;
    border-radius: 28px;
}

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

.panel-header h2 {
    margin: 0;
    color: var(--navy);
    font-size: clamp(1.35rem, 2vw, 1.75rem);
    letter-spacing: -0.04em;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

.dashboard-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
}

.dashboard-table th,
.dashboard-table td {
    padding: 13px 12px;
    border-bottom: 1px solid rgba(7, 26, 51, 0.08);
    text-align: left;
    vertical-align: middle;
}

.dashboard-table th {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dashboard-table td {
    color: var(--text);
    font-weight: 650;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 82px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.status-granted {
    color: #0f5132;
    background: rgba(209, 231, 221, 0.95);
}

.status-denied {
    color: #842029;
    background: rgba(248, 215, 218, 0.95);
}

.status-error {
    color: #664d03;
    background: rgba(255, 243, 205, 0.95);
}

.status-warning {
    color: #664d03;
    background: rgba(255, 243, 205, 0.95);
}

.event-list {
    display: grid;
    gap: 12px;
}

.event-card {
    display: grid;
    gap: 12px;
    padding: 16px;
    border: 1px solid rgba(7, 26, 51, 0.08);
    border-radius: 18px;
    background: rgba(244, 248, 253, 0.72);
}

.event-card h3 {
    margin: 0 0 6px;
    color: var(--navy);
    font-size: 1rem;
}

.event-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.45;
    font-weight: 650;
}

.event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.event-meta span {
    padding: 7px 10px;
    border-radius: 999px;
    color: var(--navy);
    background: rgba(21, 136, 242, 0.10);
    font-size: 0.8rem;
    font-weight: 850;
}

.panel-empty {
    display: grid;
    place-items: start;
    min-height: 180px;
    padding: 22px;
    border: 1px dashed rgba(21, 136, 242, 0.28);
    border-radius: 20px;
    background: rgba(21, 136, 242, 0.06);
}

.panel-empty h3 {
    margin: 0 0 8px;
    color: var(--navy);
}

.panel-empty p {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

@media (max-width: 1180px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-panels {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .dashboard-content {
        padding: 22px;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-panel {
        padding: 18px;
    }
}

.dashboard-subtitle {
    margin-top: 0.35rem;
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.98rem;
}

.role-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.role-pill {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    padding: 0.4rem 0.75rem;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.82rem;
    font-weight: 700;
}

.role-pill.active {
    border-color: rgba(229, 0, 86, 0.55);
    background: rgba(229, 0, 86, 0.16);
    color: #fff;
    box-shadow: 0 0 22px rgba(229, 0, 86, 0.18);
}

/* =========================================================
   Role-specific dashboard panes
========================================================= */

.role-dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(340px, 0.65fr);
    gap: 22px;
    margin-bottom: 22px;
}

.role-dashboard-grid .pane-wide {
    grid-row: span 2;
}

.metric-card-primary {
    border-color: rgba(21, 136, 242, 0.24);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(232, 244, 255, 0.92));
}

.compact-table {
    min-width: 780px;
}

.status-info {
    color: #084298;
    background: rgba(207, 226, 255, 0.94);
}

.mini-list {
    display: grid;
    gap: 12px;
}

.mini-item {
    display: grid;
    gap: 10px;
    padding: 15px;
    border: 1px solid rgba(7, 26, 51, 0.08);
    border-radius: 18px;
    background: rgba(244, 248, 253, 0.72);
}

.mini-item strong {
    display: block;
    color: var(--navy);
    font-size: 0.98rem;
    line-height: 1.25;
}

.mini-item span,
.mini-reason {
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 650;
    line-height: 1.45;
}

.mini-reason {
    margin: 0;
}

.mini-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mini-stats span,
.danger-chip {
    width: fit-content;
    padding: 7px 10px;
    border-radius: 999px;
    color: var(--navy);
    background: rgba(21, 136, 242, 0.10);
    font-size: 0.78rem;
    font-weight: 850;
}

.danger-chip {
    color: #842029 !important;
    background: rgba(248, 215, 218, 0.95) !important;
}

.event-list-expanded .event-card {
    grid-template-columns: minmax(0, 1fr);
}

.manager-event-card {
    background: linear-gradient(135deg, rgba(244, 248, 253, 0.86), rgba(255, 255, 255, 0.92));
}

.supporting-panels {
    margin-top: 0;
}

@media (max-width: 1180px) {
    .role-dashboard-grid {
        grid-template-columns: 1fr;
    }

    .role-dashboard-grid .pane-wide {
        grid-row: auto;
    }
}

/* =========================================================
   Polished role dashboard redesign
========================================================= */
:root {
    --dashboard-bg: #f6f9fe;
    --panel-bg: rgba(255, 255, 255, 0.96);
    --soft-blue: rgba(21, 136, 242, 0.10);
    --soft-blue-strong: rgba(21, 136, 242, 0.18);
    --soft-pink: rgba(229, 0, 86, 0.12);
}

.dashboard-shell {
    background:
        radial-gradient(circle at 88% 8%, rgba(21, 136, 242, 0.13), transparent 25%),
        radial-gradient(circle at 24% 96%, rgba(229, 0, 86, 0.08), transparent 28%),
        var(--dashboard-bg);
}

.dashboard-sidebar {
    background: rgba(255, 255, 255, 0.92);
    color: var(--navy);
    border-right: 1px solid rgba(7, 26, 51, 0.08);
    box-shadow: 18px 0 48px rgba(6, 27, 61, 0.06);
}

.dashboard-sidebar a {
    color: #59677e;
}

.dashboard-sidebar a.active {
    color: var(--blue);
    background: rgba(21, 136, 242, 0.10);
    border: 1px solid rgba(21, 136, 242, 0.16);
}

.dashboard-sidebar a:hover {
    color: var(--navy);
    background: rgba(7, 26, 51, 0.055);
}

.dashboard-content {
    padding: clamp(24px, 3vw, 42px);
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    gap: 22px;
    align-items: flex-start;
    margin-bottom: 24px;
    padding: 24px 26px;
    border: 1px solid rgba(7, 26, 51, 0.07);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.76);
    box-shadow: 0 20px 56px rgba(6, 27, 61, 0.07);
    backdrop-filter: blur(18px);
}

.dashboard-header h1 {
    color: var(--navy);
    font-size: clamp(2rem, 4vw, 3.1rem);
    letter-spacing: -0.065em;
}

.dashboard-subtitle {
    color: var(--muted);
    max-width: 760px;
    line-height: 1.55;
}

.role-pill {
    border-color: rgba(21, 136, 242, 0.16);
    background: rgba(21, 136, 242, 0.07);
    color: #536176;
}

.role-pill.active {
    border-color: rgba(21, 136, 242, 0.30);
    background: rgba(21, 136, 242, 0.14);
    color: var(--blue);
    box-shadow: none;
}

.dashboard-grid {
    grid-template-columns: repeat(4, minmax(180px, 1fr));
}

.metric-card,
.dashboard-panel {
    background: var(--panel-bg);
    border-color: rgba(7, 26, 51, 0.075);
    box-shadow: 0 18px 52px rgba(6, 27, 61, 0.075);
}

.metric-card {
    min-height: 134px;
    border-radius: 24px;
}

.metric-card::after {
    background: radial-gradient(circle, rgba(21, 136, 242, 0.14), transparent 68%);
}

.metric-card strong {
    font-size: clamp(2rem, 3.2vw, 2.8rem);
}

.dashboard-chart-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(360px, 0.7fr);
    gap: 22px;
    margin-bottom: 22px;
}

.chart-panel {
    min-height: 320px;
}

.chart-panel-large {
    min-height: 340px;
}

.panel-subtitle {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 650;
}

.bar-chart {
    display: grid;
    grid-template-columns: repeat(7, minmax(38px, 1fr));
    align-items: end;
    gap: clamp(10px, 1.6vw, 20px);
    min-height: 220px;
    padding: 12px 4px 2px;
}

.compact-bars {
    min-height: 210px;
}

.bar-column {
    min-width: 0;
    display: grid;
    grid-template-rows: auto 1fr auto;
    align-items: end;
    gap: 8px;
    height: 100%;
}

.bar-value {
    min-height: 22px;
    color: var(--navy);
    font-size: clamp(0.7rem, 1vw, 0.84rem);
    font-weight: 850;
    text-align: center;
    white-space: nowrap;
}

.bar-track {
    width: 100%;
    min-height: 154px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(21, 136, 242, 0.045), rgba(21, 136, 242, 0.10));
    border: 1px solid rgba(21, 136, 242, 0.08);
}

.bar-fill {
    width: 100%;
    min-height: 8px;
    border-radius: 18px 18px 0 0;
    background: linear-gradient(180deg, var(--blue-2), var(--blue));
    box-shadow: 0 12px 26px rgba(21, 136, 242, 0.22);
}

.bar-fill.accent {
    background: linear-gradient(180deg, #31c7ff, var(--blue));
}

.bar-label {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
    text-align: center;
}

.role-dashboard-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
}

.dashboard-panel {
    border-radius: 26px;
}

.mini-item,
.event-card {
    background: #f8fbff;
    border-color: rgba(7, 26, 51, 0.07);
}

.event-card {
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.event-card:hover {
    transform: translateY(-2px);
    border-color: rgba(21, 136, 242, 0.20);
    box-shadow: 0 18px 40px rgba(6, 27, 61, 0.08);
}

.event-meta span,
.mini-stats span {
    background: rgba(21, 136, 242, 0.08);
}

.compact-empty {
    min-height: 170px;
}

@media (max-width: 1280px) {
    .dashboard-grid,
    .dashboard-chart-grid,
    .role-dashboard-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .dashboard-grid,
    .dashboard-chart-grid,
    .role-dashboard-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-header {
        padding: 20px;
    }

    .bar-chart {
        gap: 8px;
    }

    .bar-value {
        font-size: 0.68rem;
    }
}

.chart-canvas-wrap {
    position: relative;
    width: 100%;
    min-height: 255px;
    height: 255px;
    margin-top: 14px;
}

.chart-canvas-wrap-small {
    min-height: 235px;
    height: 235px;
}

.chart-canvas-wrap canvas {
    width: 100% !important;
    height: 100% !important;
}

.chart-library-missing {
    display: grid;
    min-height: 190px;
    place-items: center;
    padding: 22px;
    border-radius: 20px;
    background: rgba(21, 136, 242, 0.06);
    color: var(--muted);
    font-weight: 750;
    text-align: center;
}

/* =========================================================
   Event-scoped dashboard polish
========================================================= */
.dashboard-header-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    min-width: 220px;
}

.event-selector-open,
.page-btn {
    appearance: none;
    border: 1px solid rgba(21, 136, 242, 0.18);
    border-radius: 999px;
    padding: 0.78rem 1rem;
    color: var(--blue);
    background: rgba(21, 136, 242, 0.09);
    font-weight: 850;
    text-decoration: none;
    cursor: pointer;
    transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.event-selector-open:hover,
.page-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    background: rgba(21, 136, 242, 0.14);
    border-color: rgba(21, 136, 242, 0.30);
}

.event-selector-open.secondary {
    padding: 0.68rem 0.95rem;
}

.event-context-strip {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    margin-bottom: 22px;
    padding: 18px 20px;
    border: 1px solid rgba(7, 26, 51, 0.07);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 16px 42px rgba(6, 27, 61, 0.055);
}

.event-context-strip strong {
    display: block;
    margin-top: 4px;
    color: var(--navy);
    font-size: 1.08rem;
}

.scope-pill {
    color: var(--navy);
    background: rgba(7, 26, 51, 0.045);
}

.event-selector-modal {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 5000;
    display: none;
    place-items: center;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    padding: clamp(18px, 4vw, 48px);
    overflow: hidden;
}

.event-selector-modal.is-open {
    display: grid;
}

.event-selector-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(6, 27, 61, 0.58);
    backdrop-filter: blur(10px);
}

.event-selector-dialog {
    position: relative;
    z-index: 1;
    width: min(1120px, calc(100vw - 36px));
    max-height: min(780px, calc(100dvh - 36px));
    overflow: auto;
    overscroll-behavior: contain;
    padding: clamp(20px, 3vw, 32px);
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: 32px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 32px 90px rgba(6, 27, 61, 0.28);
}

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

.event-selector-header h2 {
    margin: 0;
    color: var(--navy);
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    letter-spacing: -0.055em;
}

.event-selector-header p {
    margin: 8px 0 0;
    color: var(--muted);
    font-weight: 650;
}

.event-selector-close {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 999px;
    color: var(--navy);
    background: rgba(7, 26, 51, 0.06);
    font-size: 1.45rem;
    font-weight: 850;
    cursor: pointer;
}

.event-tile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
    gap: 14px;
}

.event-select-tile {
    display: grid;
    gap: 10px;
    min-height: 186px;
    padding: 18px;
    border: 1px solid rgba(7, 26, 51, 0.08);
    border-radius: 22px;
    background: #f8fbff;
    color: inherit;
    text-decoration: none;
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.event-select-tile:hover,
.event-select-tile.active {
    transform: translateY(-2px);
    border-color: rgba(21, 136, 242, 0.28);
    background: #ffffff;
    box-shadow: 0 18px 46px rgba(6, 27, 61, 0.10);
}

.event-select-tile.active {
    outline: 3px solid rgba(21, 136, 242, 0.12);
}

.tile-kicker {
    color: var(--blue);
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.event-select-tile strong {
    color: var(--navy);
    font-size: 1.1rem;
    line-height: 1.25;
}

.event-select-tile p {
    margin: 0;
    color: var(--muted);
    font-weight: 650;
    line-height: 1.45;
}

.tile-mini-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: auto;
}

.tile-mini-stats span {
    padding: 6px 9px;
    border-radius: 999px;
    color: var(--navy);
    background: rgba(21, 136, 242, 0.08);
    font-size: 0.74rem;
    font-weight: 850;
}

.metric-card {
    grid-template-rows: auto auto auto 1fr;
    height: 100%;
}

.metric-trend {
    width: fit-content;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 900;
}

.trend-up {
    color: #0f5132;
    background: rgba(209, 231, 221, 0.95);
}

.trend-down {
    color: #842029;
    background: rgba(248, 215, 218, 0.95);
}

.trend-flat {
    color: #084298;
    background: rgba(207, 226, 255, 0.94);
}

.role-dashboard-grid,
.dashboard-panels,
.dashboard-chart-grid,
.dashboard-grid {
    align-items: stretch;
}

.role-dashboard-grid > .dashboard-panel,
.dashboard-panels > .dashboard-panel,
.dashboard-chart-grid > .dashboard-panel {
    height: 100%;
}

.mini-list,
.event-list {
    align-content: start;
}

.pagination-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(7, 26, 51, 0.07);
}

.page-status {
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 800;
}

.page-btn {
    padding: 0.55rem 0.85rem;
}

.page-btn:disabled {
    cursor: not-allowed;
    opacity: 0.42;
}

@media (max-width: 780px) {
    .dashboard-header {
        display: grid;
    }

    .dashboard-header-actions,
    .event-context-strip {
        justify-content: stretch;
    }

    .dashboard-header-actions > *,
    .event-context-strip .event-selector-open {
        width: 100%;
        text-align: center;
    }

    .event-context-strip {
        display: grid;
    }
}

/* =========================================================
   Event selector reliability patch
========================================================= */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.scope-switch-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}

.scope-select {
    min-width: min(360px, 100%);
    border: 1px solid rgba(21, 136, 242, 0.18);
    border-radius: 999px;
    padding: 0.74rem 2.4rem 0.74rem 1rem;
    color: var(--navy);
    background: #ffffff;
    font-weight: 800;
    box-shadow: 0 12px 28px rgba(6, 27, 61, 0.06);
}


.event-select-empty {
    cursor: default;
    border-style: dashed;
}

.event-select-empty:hover {
    transform: none;
    box-shadow: none;
}

@media (max-width: 760px) {
    .scope-switch-controls,
    .scope-select {
        width: 100%;
    }
}

/* =========================================================
   Uniform dashboard panes + functional pane pagination
========================================================= */
.dashboard-panel {
    display: flex;
    flex-direction: column;
}

.dashboard-panel > .paginated-list,
.dashboard-panel > .paginated-table,
.dashboard-panel > .event-list,
.dashboard-panel > .mini-list,
.dashboard-panel > .table-wrap {
    flex: 1 1 auto;
}

.manager-dashboard {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: stretch;
}

.manager-dashboard .dashboard-panel {
    min-height: 390px;
}

.manager-dashboard .operations-summary-panel {
    min-height: 300px;
}

.manager-dashboard .event-list-expanded .event-card,
.manager-dashboard .mini-item {
    min-height: 96px;
}

.is-page-hidden {
    display: none !important;
}

.pagination-controls {
    margin-top: auto;
}

.dashboard-summary-list {
    grid-template-rows: repeat(2, minmax(0, 1fr));
}

@media (max-width: 1180px) {
    .manager-dashboard {
        grid-template-columns: 1fr;
    }

    .manager-dashboard .dashboard-panel,
    .manager-dashboard .operations-summary-panel {
        min-height: auto;
    }
}


body.event-selector-open-body {
    overflow: hidden;
}

/* Managed event shortcut confirmation */
.event-shortcut-card {
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.event-shortcut-card:hover,
.event-shortcut-card:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(22, 136, 240, 0.28);
    box-shadow: 0 18px 38px rgba(6, 27, 61, 0.12);
    outline: none;
}

.event-confirm-modal {
    position: fixed;
    inset: 0;
    z-index: 9998;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.event-confirm-modal.is-open {
    display: flex;
}

.event-confirm-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(6, 27, 61, 0.42);
    backdrop-filter: blur(10px);
}

.event-confirm-dialog {
    position: relative;
    z-index: 1;
    width: min(460px, calc(100vw - 32px));
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(6, 27, 61, 0.08);
    box-shadow: 0 28px 90px rgba(6, 27, 61, 0.24);
    padding: 30px;
    animation: eventConfirmIn 180ms ease-out;
}

.event-confirm-dialog h2 {
    margin: 6px 0 10px;
    color: var(--navy);
    font-size: 1.7rem;
}

.event-confirm-copy {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.event-confirm-copy strong {
    color: var(--navy);
}

.event-confirm-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 999px;
    background: rgba(6, 27, 61, 0.06);
    color: var(--navy);
    font-size: 1.5rem;
    cursor: pointer;
}

.event-confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 26px;
}

.event-confirm-secondary,
.event-confirm-primary {
    border: 0;
    border-radius: 999px;
    padding: 12px 18px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.event-confirm-secondary {
    background: rgba(6, 27, 61, 0.07);
    color: var(--navy);
}

.event-confirm-primary {
    background: linear-gradient(135deg, var(--blue), var(--blue-2));
    color: #fff;
    box-shadow: 0 12px 28px rgba(22, 136, 240, 0.22);
}

@keyframes eventConfirmIn {
    from { opacity: 0; transform: translateY(12px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* =========================================================
   Company scoped dashboard/sidebar polish
========================================================= */
.dashboard-shell {
    align-items: start;
}

.dashboard-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    min-height: 100vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    z-index: 20;
}

.company-switcher {
    position: relative;
    display: grid;
    gap: 8px;
    margin: -10px 0 14px;
}

.company-switcher::before {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(21, 136, 242, 0.18), rgba(29, 161, 255, 0.06));
    pointer-events: none;
}

.company-scope-select {
    position: relative;
    width: 100%;
    min-width: 0;
    appearance: none;
    border: 1px solid rgba(21, 136, 242, 0.18);
    border-radius: 16px;
    padding: 0.9rem 2.45rem 0.9rem 1rem;
    color: var(--navy);
    background:
        linear-gradient(45deg, transparent 50%, var(--blue) 50%) right 1rem center / 7px 7px no-repeat,
        linear-gradient(135deg, var(--blue) 50%, transparent 50%) right 0.72rem center / 7px 7px no-repeat,
        linear-gradient(180deg, #ffffff 0%, #f6fbff 100%);
    font-weight: 950;
    letter-spacing: -0.01em;
    box-shadow: 0 14px 30px rgba(6, 27, 61, 0.08);
    cursor: pointer;
}

.company-scope-select:hover {
    border-color: rgba(21, 136, 242, 0.34);
    box-shadow: 0 18px 36px rgba(6, 27, 61, 0.11);
}

.sidebar-section-divider {
    width: 100%;
    height: 1px;
    margin: 0 0 22px;
    background: linear-gradient(90deg, transparent, rgba(7, 26, 51, 0.14), transparent);
}
.company-scope-select:focus-visible {
    outline: 3px solid rgba(21, 136, 242, 0.18);
    border-color: rgba(21, 136, 242, 0.34);
}

.dashboard-header-actions {
    align-self: flex-start;
    padding-top: 6px;
}

.event-selector-open {
    box-shadow: 0 12px 28px rgba(21, 136, 242, 0.12);
}

.health-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    flex: 1 1 auto;
}

.health-grid article {
    display: grid;
    gap: 8px;
    align-content: center;
    min-height: 132px;
    padding: 18px;
    border: 1px solid rgba(7, 26, 51, 0.07);
    border-radius: 20px;
    background: #f8fbff;
}

.health-grid span {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 850;
}

.health-grid strong {
    color: var(--navy);
    font-size: clamp(1.7rem, 3vw, 2.4rem);
    letter-spacing: -0.045em;
}

.health-grid small {
    color: #69778d;
    font-weight: 750;
}

@media (max-width: 800px) {
    .dashboard-sidebar {
        position: relative;
        height: auto;
        min-height: auto;
    }

    .company-switcher {
        margin-top: 0;
    }

    .health-grid {
        grid-template-columns: 1fr;
    }
}


/* Dashboard replacement panes */
.compact-health-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-dashboard,
.manager-dashboard {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-dashboard .dashboard-panel,
.manager-dashboard .dashboard-panel {
    min-height: 390px;
}

@media (max-width: 1180px) {
    .admin-dashboard,
    .manager-dashboard {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   VenueEye professional dashboard refinements
========================================================= */
.dashboard-shell {
    grid-template-columns: 296px minmax(0, 1fr);
}

.dashboard-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    min-height: 100vh;
    overflow-y: auto;
    padding: 22px 18px;
    background:
        radial-gradient(circle at 20% 0%, rgba(29, 161, 255, 0.20), transparent 32%),
        linear-gradient(180deg, #061b3d 0%, #071427 100%);
}

.dashboard-logo {
    width: min(210px, 92%);
    margin-bottom: 18px;
}

.company-switcher {
    position: relative;
    margin: 0 0 14px;
}

.company-scope-select,
.filter-select {
    width: 100%;
    appearance: none;
    color: #0f2747;
    font-weight: 800;
    border: 1px solid rgba(29, 161, 255, 0.22);
    border-radius: 16px;
    background: #ffffff;
    padding: 12px 42px 12px 14px;
    box-shadow: 0 14px 30px rgba(6, 27, 61, 0.10);
    background-image: linear-gradient(45deg, transparent 50%, #1688f0 50%), linear-gradient(135deg, #1688f0 50%, transparent 50%);
    background-position: calc(100% - 18px) 50%, calc(100% - 12px) 50%;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

.sidebar-section-divider {
    height: 1px;
    width: 100%;
    margin: 12px 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
}

.sidebar-nav {
    display: grid;
    gap: 7px;
    padding-bottom: 20px;
}

.sidebar-nav-group {
    display: grid;
    gap: 7px;
}

.dashboard-sidebar .nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: 14px;
    color: rgba(255, 255, 255, 0.74);
    font-size: 0.94rem;
    letter-spacing: -0.01em;
}

.dashboard-sidebar .nav-item span {
    width: 22px;
    text-align: center;
    filter: saturate(.9);
}

.dashboard-sidebar .nav-item.active {
    color: #ffffff;
    border-color: rgba(49, 199, 255, 0.34);
    background: linear-gradient(135deg, rgba(29, 161, 255, 0.26), rgba(255, 255, 255, 0.08));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.sidebar-user-area {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.sidebar-user-name {
    color: #ffffff;
    font-weight: 850;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-user-role {
    margin-top: 3px;
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.82rem;
    font-weight: 700;
}

.logout-link {
    display: flex;
    justify-content: center;
    margin-top: 14px;
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    gap: 22px;
    align-items: flex-start;
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: var(--shadow);
}

.dashboard-filterbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: end;
    gap: 10px;
    max-width: 680px;
}

.dashboard-filterbar label {
    min-width: 150px;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.dashboard-filterbar .filter-select {
    margin-top: 7px;
    color: var(--text);
    border-color: rgba(6, 27, 61, 0.12);
    box-shadow: none;
}

.event-selector-open.soft,
.event-selector-open.is-loading {
    background: #ffffff;
    color: var(--navy);
    border: 1px solid rgba(6, 27, 61, 0.12);
}

.last-updated {
    align-self: center;
    color: var(--muted);
    font-size: .82rem;
    font-weight: 750;
}

.module-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.module-grid .pane-wide {
    grid-column: 1 / -1;
}

.module-summary-grid,
.report-type-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.module-summary-grid article,
.report-type-grid span {
    padding: 18px;
    border: 1px solid rgba(6, 27, 61, 0.09);
    border-radius: 20px;
    background: linear-gradient(180deg, #ffffff, #f6f9fc);
}

.module-summary-grid span,
.module-summary-grid small {
    display: block;
    color: var(--muted);
    font-weight: 750;
}

.module-summary-grid strong {
    display: block;
    margin: 6px 0;
    color: var(--navy);
    font-size: clamp(1.5rem, 3vw, 2.4rem);
}

.placeholder-note {
    margin-top: 10px;
    font-weight: 800;
    color: var(--blue) !important;
}

.chart-card {
    min-height: 300px;
}

@media (max-width: 1020px) {
    .dashboard-shell { grid-template-columns: 1fr; }
    .dashboard-sidebar {
        position: relative;
        height: auto;
        min-height: 0;
        border-right: 0;
        border-bottom: 1px solid rgba(255,255,255,.12);
    }
    .dashboard-header { flex-direction: column; }
    .dashboard-filterbar { justify-content: flex-start; max-width: none; }
    .module-grid { grid-template-columns: 1fr; }
    .module-summary-grid,
    .report-type-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
    .dashboard-content { padding: 18px; }
    .dashboard-header { padding: 18px; border-radius: 22px; }
    .dashboard-filterbar label { min-width: 100%; }
    .module-summary-grid,
    .report-type-grid { grid-template-columns: 1fr; }
}

/* Dashboard management pages */
.management-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.management-form label {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.management-form input,
.management-form select,
.management-form textarea {
    width: 100%;
    border: 1px solid rgba(6, 27, 61, 0.12);
    border-radius: 12px;
    padding: 12px 14px;
    background: #ffffff;
    color: var(--navy);
    font: inherit;
    font-weight: 650;
    text-transform: none;
    letter-spacing: 0;
}

.management-form textarea,
.management-form .readonly-field,
.management-form button,
.management-form .placeholder-note {
    grid-column: 1 / -1;
}

.management-form button,
.button-link {
    width: fit-content;
    border: 0;
    border-radius: 12px;
    padding: 12px 18px;
    background: var(--blue);
    color: #ffffff;
    font-weight: 900;
    text-decoration: none;
    cursor: pointer;
}

.readonly-field {
    border: 1px solid rgba(6, 27, 61, 0.1);
    border-radius: 14px;
    padding: 14px;
    background: rgba(246, 249, 254, 0.8);
}

.readonly-field span,
.readonly-field small {
    display: block;
    color: var(--muted);
}

.field-error {
    color: #b42318;
    font-weight: 800;
    text-transform: none;
    letter-spacing: 0;
}

.table-action-link {
    color: var(--blue);
    font-weight: 900;
    text-decoration: none;
}

.pagination-summary {
    margin-top: 12px;
    color: var(--muted);
    font-weight: 700;
}

.module-summary-grid.stacked {
    grid-template-columns: 1fr;
}

.permission-denied-body {
    min-height: 100vh;
    background: var(--dashboard-bg, #f6f9fe);
}

.permission-denied-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.permission-denied-card {
    width: min(560px, 100%);
    border: 1px solid rgba(6, 27, 61, 0.1);
    border-radius: 18px;
    padding: 34px;
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(6, 27, 61, 0.12);
    text-align: center;
}

.permission-icon {
    width: 56px;
    height: 56px;
    margin: 18px auto;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: rgba(22, 136, 240, 0.12);
    color: var(--blue);
    font-size: 1.8rem;
    font-weight: 950;
}

.permission-role,
.permission-support {
    color: var(--muted);
    font-weight: 700;
}

.permission-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 22px 0;
    flex-wrap: wrap;
}

.permission-actions button {
    border: 1px solid rgba(6, 27, 61, 0.12);
    border-radius: 12px;
    padding: 12px 18px;
    background: #ffffff;
    color: var(--navy);
    font-weight: 900;
    cursor: pointer;
}

@media (max-width: 720px) {
    .management-form {
        grid-template-columns: 1fr;
    }
}

.inline-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; align-items: end; }
.dashboard-form textarea.filter-select { min-height: 88px; resize: vertical; }
.event-selector-open.danger, .danger { background: #ef4444 !important; color: #fff !important; border-color: rgba(239,68,68,.55) !important; }
.emergency-panel { border-color: rgba(239,68,68,.35) !important; box-shadow: 0 0 0 1px rgba(239,68,68,.12), 0 24px 70px rgba(127,29,29,.14); }
.row-actions { min-width: 230px; }
.row-actions summary { cursor: pointer; font-weight: 800; color: var(--accent, #7dd3fc); }
.row-actions form { display: grid; gap: 8px; margin: 10px 0; padding: 10px; border: 1px solid rgba(255,255,255,.08); border-radius: 14px; background: rgba(255,255,255,.03); }
.row-actions button { border: 0; border-radius: 10px; padding: 9px 10px; font-weight: 800; cursor: pointer; }
code { padding: 4px 8px; border-radius: 8px; background: rgba(255,255,255,.08); }

/* Boards realtime + manage menu polish */
.boards-hero-panel {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(22, 136, 240, 0.18);
    background:
        radial-gradient(circle at top right, rgba(49, 199, 255, 0.18), transparent 36%),
        linear-gradient(135deg, rgba(255,255,255,0.98), rgba(240,247,255,0.92));
}

.boards-hero-panel::after {
    content: "";
    position: absolute;
    inset: auto -80px -120px auto;
    width: 260px;
    height: 260px;
    border-radius: 999px;
    background: rgba(22, 136, 240, 0.08);
    pointer-events: none;
}

.board-summary-grid article {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(22, 136, 240, 0.12);
    box-shadow: 0 18px 45px rgba(6, 27, 61, 0.08);
}

.live-pill,
.socket-hint {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    margin-top: 8px;
    padding: 7px 11px;
    border-radius: 999px;
    background: rgba(22, 136, 240, 0.09);
    color: var(--blue);
    font-size: 12px;
    font-weight: 800;
}

.live-pill::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #f59e0b;
    box-shadow: 0 0 0 5px rgba(245, 158, 11, 0.12);
}

.live-pill.is-live::before {
    background: #22c55e;
    box-shadow: 0 0 0 5px rgba(34, 197, 94, 0.14);
}

.live-pill.is-offline::before {
    background: #ef4444;
    box-shadow: 0 0 0 5px rgba(239, 68, 68, 0.12);
}

.boards-manage-panel,
.boards-table-panel {
    border-color: rgba(22, 136, 240, 0.12);
}

.board-create-form label,
.board-action-card label,
.board-upload-field {
    font-size: 12px;
    font-weight: 800;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .04em;
}

.board-manage-menu {
    position: relative;
    min-width: 230px;
}

.board-manage-menu > summary {
    list-style: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 132px;
    padding: 10px 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--navy), var(--blue));
    color: #fff;
    font-weight: 900;
    box-shadow: 0 12px 30px rgba(22, 136, 240, 0.28);
}

.board-manage-menu > summary::-webkit-details-marker { display: none; }
.board-manage-menu[open] > summary b { transform: rotate(180deg); }
.board-manage-menu > summary b { transition: transform .18s ease; }

.board-manage-menu[open] {
    z-index: 30;
}

.board-manage-menu[open]::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(6, 27, 61, 0.06);
    pointer-events: none;
}

.board-action-card {
    display: grid;
    gap: 10px;
    margin-top: 12px;
    padding: 14px;
    border: 1px solid rgba(6, 27, 61, 0.10);
    border-radius: 18px;
    background: rgba(255,255,255,0.92);
    box-shadow: 0 16px 45px rgba(6, 27, 61, 0.12);
}

.board-content-card {
    background: linear-gradient(180deg, #fff, rgba(240,247,255,0.9));
}

.board-action-card button {
    border: 0;
    border-radius: 13px;
    padding: 10px 12px;
    color: #fff;
    background: var(--navy);
    font-weight: 900;
    cursor: pointer;
}

.board-action-card.compact button {
    background: rgba(22, 136, 240, 0.12);
    color: var(--blue);
}

.board-action-card.danger-zone button {
    background: rgba(239, 68, 68, 0.12);
    color: #dc2626;
}

.form-hint {
    color: var(--muted);
    font-weight: 700;
    line-height: 1.4;
}

.board-upload-field input[type="file"] {
    margin-top: 6px;
    padding: 10px;
    background: #fff;
}

[data-boards-dashboard].is-realtime-pulse {
    animation: boardsRealtimePulse .7s ease;
}

@keyframes boardsRealtimePulse {
    0% { box-shadow: 0 0 0 rgba(49, 199, 255, 0); }
    45% { box-shadow: 0 0 0 8px rgba(49, 199, 255, 0.12); }
    100% { box-shadow: 0 0 0 rgba(49, 199, 255, 0); }
}

.board-action-card .is-disabled,
.board-action-card input:disabled,
.board-action-card select:disabled,
.board-action-card textarea:disabled {
    opacity: .68;
    cursor: not-allowed;
}

.board-content-card [data-content-preset-select] {
    border-color: rgba(22, 136, 240, 0.32);
    box-shadow: 0 0 0 4px rgba(22, 136, 240, 0.06);
}

/* Board pairing flow: physical board shows a 6-digit code, dashboard claims it. */
.board-pair-panel {
    position: relative;
    overflow: hidden;
}
.board-pair-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 10% 0%, rgba(49, 199, 255, .16), transparent 32%),
        radial-gradient(circle at 92% 18%, rgba(6, 27, 61, .10), transparent 34%);
}
.board-pair-form {
    position: relative;
    display: grid;
    gap: 18px;
}
.pair-code-entry {
    display: grid;
    grid-template-columns: minmax(180px, 260px) minmax(220px, 1fr);
    gap: 16px;
    align-items: end;
}
.pair-code-input {
    font-size: 1.35rem;
    letter-spacing: .28em;
    font-weight: 900;
    text-align: center;
    font-variant-numeric: tabular-nums;
}
.board-pair-form .form-hint {
    margin: 0;
    color: var(--muted);
    font-size: .9rem;
}
@media (max-width: 760px) {
    .pair-code-entry { grid-template-columns: 1fr; }
}

/* =========================================================
   Scanner dashboard and dedicated scanner portal
========================================================= */
.scanner-summary-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.scanners-hero-panel {
    position: relative;
    overflow: hidden;
    border-color: rgba(22, 136, 240, 0.18);
    background:
        radial-gradient(circle at 92% 12%, rgba(34, 197, 94, 0.15), transparent 32%),
        linear-gradient(135deg, rgba(255,255,255,.98), rgba(240,247,255,.94));
}

.scanner-action-stack {
    display: grid;
    gap: 10px;
    min-width: 240px;
}

.scanner-action-stack form {
    display: grid;
    gap: 8px;
    padding: 10px;
    border: 1px solid rgba(6, 27, 61, .09);
    border-radius: 14px;
    background: rgba(246, 249, 254, .82);
}

.scanner-action-stack button {
    border: 0;
    border-radius: 10px;
    padding: 9px 10px;
    color: #fff;
    background: var(--navy);
    font-weight: 900;
    cursor: pointer;
}

.scanner-action-stack .danger-zone button {
    color: #dc2626;
    background: rgba(239, 68, 68, .12);
}

.scanner-feed-list,
.zone-monitor-list {
    display: grid;
    gap: 10px;
}

.scanner-feed-item,
.zone-monitor-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 13px 14px;
    border: 1px solid rgba(6, 27, 61, .08);
    border-radius: 16px;
    background: #f8fbff;
}

.scanner-feed-time {
    color: var(--muted);
    font-weight: 900;
    font-variant-numeric: tabular-nums;
}

.scanner-portal {
    min-height: 100vh;
    color: #fff;
    background: #061427;
}

.scanner-portal [hidden] {
    display: none !important;
}

.scanner-app {
    min-height: 100vh;
    background:
        radial-gradient(circle at top right, rgba(29, 161, 255, .22), transparent 36%),
        radial-gradient(circle at 10% 90%, rgba(21, 136, 242, 0.14), transparent 30%),
        linear-gradient(180deg, #061b3d 0%, #061427 100%);
}

.scanner-app::before {
    content: "";
    position: fixed;
    inset: -40%;
    pointer-events: none;
    background:
        radial-gradient(circle at 45% 35%, rgba(29, 161, 255, 0.18), transparent 22%),
        radial-gradient(circle at 55% 45%, rgba(6, 27, 61, 0.10), transparent 26%);
    animation: boardAmbient 4600ms ease-in-out infinite alternate;
}

.scanner-pairing,
.scanner-shell {
    min-height: 100vh;
    padding: max(18px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
    position: relative;
    z-index: 1;
}

.scanner-brand,
.scanner-topbar {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
}

.scanner-brand img {
    width: min(210px, 58vw);
    height: auto;
    filter: drop-shadow(0 8px 22px rgba(49, 199, 255, .25));
}

.scanner-brand span,
.scanner-topbar span {
    color: rgba(255,255,255,.72);
    font-weight: 800;
}

.pairing-card {
    width: min(680px, 100%);
    margin: 12vh auto 0;
    padding: clamp(28px, 6vw, 58px);
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 36px;
    background: rgba(255,255,255,.10);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    text-align: center;
    overflow: hidden;
    position: relative;
}

.pairing-card::before {
    content: "";
    position: absolute;
    inset: -40%;
    background:
        radial-gradient(circle at 45% 35%, rgba(29, 161, 255, 0.18), transparent 22%),
        radial-gradient(circle at 55% 45%, rgba(6, 27, 61, 0.10), transparent 26%);
    pointer-events: none;
}

.pairing-card > * {
    position: relative;
    z-index: 1;
}

.scanner-venueeye-mark {
    width: clamp(70px, 13vw, 128px);
    height: clamp(70px, 13vw, 128px);
    margin: 0 auto 12px;
    overflow: visible;
    filter: drop-shadow(0 0 24px rgba(21, 136, 242, 0.38));
    animation: markIntro 600ms cubic-bezier(.2,.9,.2,1) both;
}

.scanner-venueeye-mark .logo-v {
    transform-origin: center;
    animation: vGlow 3300ms ease-in-out both;
}

.scanner-venueeye-mark .pupil {
    transform-box: fill-box;
    transform-origin: center;
    animation: pupilLook 2600ms ease-in-out 2100ms both;
}

.pairing-card h1 {
    margin: 12px 0;
    color: #fff;
    font-size: clamp(4rem, 18vw, 8rem);
    letter-spacing: .16em;
    line-height: .95;
    font-variant-numeric: tabular-nums;
}

.pairing-card p {
    color: rgba(255,255,255,.74);
    font-weight: 750;
    line-height: 1.55;
}

.pairing-card button,
.scanner-topbar button,
.scanner-input-row button,
.settings-actions button,
.result-close,
.settings-card .panel-header button {
    border: 0;
    border-radius: 8px;
    padding: 12px 16px;
    color: #fff;
    background: linear-gradient(135deg, var(--blue), var(--blue-2));
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}

.scanner-topbar {
    min-height: 76px;
    padding: 14px 16px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 18px;
    background: rgba(255,255,255,.10);
    box-shadow: 0 20px 54px rgba(6, 27, 61, 0.14);
    backdrop-filter: blur(18px);
}

.scanner-topbar .scanner-venueeye-mark {
    width: 52px;
    height: 52px;
    display: inline-block;
    margin: 0 10px 0 0;
    vertical-align: middle;
}

.scanner-topbar strong {
    display: inline-block;
    font-size: clamp(1.1rem, 4vw, 1.6rem);
    vertical-align: middle;
}

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

.scanner-live-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 999px;
    background: rgba(239, 68, 68, .14);
}

.scanner-live-pill::before {
    content: "";
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: #ef4444;
}

.scanner-live-pill.is-online {
    background: rgba(34, 197, 94, .15);
}

.scanner-live-pill.is-online::before {
    background: #22c55e;
    box-shadow: 0 0 0 6px rgba(34, 197, 94, .12);
}

.scanner-main {
    display: grid;
    grid-template-rows: minmax(300px, 1fr) auto auto;
    gap: 16px;
    min-height: calc(100vh - 112px);
    padding-top: 16px;
}

.camera-panel {
    position: relative;
    min-height: min(68vh, 720px);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 18px;
    overflow: hidden;
    background: #020617;
}

.qr-reader,
.qr-reader video {
    width: 100% !important;
    height: 100% !important;
    min-height: min(68vh, 720px);
    object-fit: cover;
}

.qr-reader > div {
    border: 0 !important;
}

.scanner-crosshair {
    position: absolute;
    inset: 50% auto auto 50%;
    width: min(58vw, 360px);
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
    border: 3px solid rgba(255,255,255,.82);
    border-radius: 18px;
    box-shadow: 0 0 0 999px rgba(0,0,0,.18), inset 0 0 30px rgba(29, 161, 255, .18);
    pointer-events: none;
    transition: border-color 180ms ease, box-shadow 180ms ease;
}

.camera-fallback {
    position: absolute;
    inset: 0;
    display: grid;
    place-content: center;
    gap: 8px;
    text-align: center;
    color: rgba(255,255,255,.82);
    background:
        radial-gradient(circle at 50% 15%, rgba(29, 161, 255, 0.18), transparent 28%),
        #061427;
}

.scanner-input-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
}

.scanner-input-row input,
.scanner-settings input {
    width: 100%;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 8px;
    padding: 15px 16px;
    color: #fff;
    background: rgba(255,255,255,.08);
    font: inherit;
    font-weight: 800;
    outline: none;
}

.scanner-input-row input:focus,
.scanner-settings input:focus {
    border-color: rgba(49,199,255,.5);
    box-shadow: 0 0 0 4px rgba(49,199,255,.12);
}

.scanner-health-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.scanner-health-grid article {
    padding: 13px 14px;
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 8px;
    background: rgba(255,255,255,.06);
}

.scanner-health-grid span {
    display: block;
    color: rgba(255,255,255,.58);
    font-size: .76rem;
    font-weight: 900;
    text-transform: uppercase;
}

.scanner-health-grid strong {
    display: block;
    margin-top: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.scanner-result {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    gap: 22px;
    padding: max(24px, env(safe-area-inset-top));
    text-align: center;
    animation: dashboardIn 650ms ease forwards;
}

.scanner-result::before {
    content: "";
    position: absolute;
    inset: -30%;
    pointer-events: none;
    background:
        radial-gradient(circle at 50% 32%, rgba(255,255,255,.16), transparent 28%),
        linear-gradient(90deg, transparent, rgba(255,255,255,.12), transparent);
    animation: boardSweep 4600ms ease-in-out infinite;
}

.scanner-result > * {
    position: relative;
    z-index: 1;
}

.scanner-result.is-granted {
    background:
        radial-gradient(circle at 50% 18%, rgba(34, 197, 94, .28), transparent 32%),
        linear-gradient(180deg, #061b3d 0%, #064e3b 100%);
}
.scanner-result.is-denied {
    background:
        radial-gradient(circle at 50% 18%, rgba(229, 0, 86, .28), transparent 32%),
        linear-gradient(180deg, #061b3d 0%, #7f1d1d 100%);
}
.scanner-result.is-error {
    background:
        radial-gradient(circle at 50% 18%, rgba(245, 158, 11, .24), transparent 32%),
        linear-gradient(180deg, #061b3d 0%, #78350f 100%);
}

@keyframes boardAmbient {
    from {
        opacity: .72;
        transform: translateY(0);
    }

    to {
        opacity: 1;
        transform: translateY(12px);
    }
}

@keyframes boardSweep {
    0%, 100% {
        opacity: 0;
        transform: translateX(-38%);
    }

    45%, 55% {
        opacity: .42;
    }

    100% {
        transform: translateX(38%);
    }
}

.scanner-result h1 {
    color: #fff;
    font-size: clamp(4.2rem, 18vw, 10rem);
    letter-spacing: .04em;
}

.scanner-result p {
    color: rgba(255,255,255,.86);
    font-size: clamp(1.1rem, 4vw, 1.8rem);
    font-weight: 850;
}

.scanner-result dl {
    width: min(780px, 100%);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
}

.scanner-result dl div {
    padding: 14px;
    border-radius: 8px;
    background: rgba(255,255,255,.12);
}

.scanner-result dt {
    color: rgba(255,255,255,.65);
    font-size: .78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.scanner-result dd {
    margin: 5px 0 0;
    font-weight: 900;
}

.result-close {
    position: absolute;
    top: max(18px, env(safe-area-inset-top));
    right: max(18px, env(safe-area-inset-right));
    background: rgba(255,255,255,.16);
}

.scanner-settings {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(2, 6, 23, .76);
}

.settings-card {
    width: min(620px, 100%);
    display: grid;
    gap: 16px;
    padding: 24px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 8px;
    background: #0b1e38;
    box-shadow: 0 34px 90px rgba(0,0,0,.38);
}

.settings-card label {
    display: grid;
    gap: 8px;
    color: rgba(255,255,255,.7);
    font-weight: 900;
}

.settings-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.settings-actions [data-reset-device] {
    background: rgba(239,68,68,.18);
    color: #fecaca;
}

@media (max-width: 1120px) {
    .scanner-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
    .scanner-topbar { align-items: flex-start; flex-direction: column; }
    .scanner-topbar-actions { width: 100%; justify-content: space-between; }
    .scanner-input-row { grid-template-columns: 1fr; }
    .scanner-health-grid,
    .scanner-result dl { grid-template-columns: 1fr; }
    .scanner-summary-grid { grid-template-columns: 1fr; }
    .camera-panel,
    .qr-reader,
    .qr-reader video { min-height: 54vh; }
}

/* =========================================================
   Event assignment dashboard
========================================================= */
.event-assignment-grid {
    align-items: start;
}

.event-assignment-event-card {
    color: inherit;
    text-decoration: none;
}

.assignment-section .panel-header {
    align-items: center;
}

.assignment-search {
    width: min(280px, 100%);
}

.assignment-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.assignment-column-title {
    margin: 0 0 12px;
    color: var(--navy);
    font-size: 1rem;
}

.assignment-list {
    display: grid;
    gap: 10px;
}

.assignment-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 10px;
    align-items: center;
    padding: 13px 14px;
    border: 1px solid rgba(6, 27, 61, .08);
    border-radius: 16px;
    background: #f8fbff;
}

.assignment-item strong,
.assignment-item span {
    display: block;
    min-width: 0;
}

.assignment-item span {
    color: var(--muted);
    font-size: .88rem;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.assignment-item button,
.assignment-inline-form button {
    border: 0;
    border-radius: 10px;
    padding: 9px 11px;
    color: #fff;
    background: var(--navy);
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}

.assignment-item button:disabled {
    opacity: .55;
    cursor: not-allowed;
}

.assignment-item button.danger,
.assignment-item .danger {
    color: #dc2626;
    background: rgba(239, 68, 68, .12) !important;
}

.assignment-inline-form {
    display: flex;
    gap: 8px;
    align-items: center;
}

.assignment-inline-form .filter-select {
    min-width: 150px;
}

.panel-empty.compact {
    min-height: 120px;
}

.assignment-item.is-filtered {
    display: none;
}

@media (max-width: 980px) {
    .assignment-columns {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .assignment-section .panel-header,
    .assignment-item,
    .assignment-inline-form {
        align-items: stretch;
        grid-template-columns: 1fr;
    }

    .assignment-inline-form {
        display: grid;
    }
}

/* =========================================================
   Event editor and public event page
========================================================= */
.event-editor-page .module-grid {
    align-items: start;
}

.editor-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 22px;
}

.editor-tabs a {
    padding: 9px 12px;
    border: 1px solid rgba(21, 136, 242, 0.16);
    border-radius: 999px;
    color: var(--navy);
    background: rgba(255, 255, 255, .72);
    font-weight: 850;
    text-decoration: none;
}

.editor-tabs a:hover {
    color: var(--blue);
    background: rgba(21, 136, 242, 0.08);
}

.editor-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.editor-form-grid .form-wide,
.editor-form-grid button {
    grid-column: 1 / -1;
}

.checkbox-row {
    display: flex !important;
    gap: 8px !important;
    align-items: center;
    color: var(--text) !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
}

.checkbox-row input {
    width: auto;
}

.event-layout-create {
    margin-bottom: 18px;
}

.section-preview-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.event-section-card {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 14px;
    border: 1px solid rgba(6, 27, 61, .08);
    border-radius: 16px;
    background: #f8fbff;
}

.event-section-card strong,
.event-section-card span,
.event-section-card small {
    display: block;
}

.event-section-card span,
.event-section-card small {
    color: var(--muted);
    font-weight: 700;
}

.event-section-card.is-disabled {
    opacity: .62;
}

.public-event-page {
    min-height: 100vh;
    background: var(--bg);
}

.public-event-hero {
    min-height: 520px;
    display: grid;
    align-items: end;
    padding: clamp(32px, 7vw, 86px);
    color: #fff;
    background:
        linear-gradient(90deg, rgba(6,27,61,.88), rgba(6,27,61,.42)),
        radial-gradient(circle at 70% 20%, rgba(29,161,255,.28), transparent 32%),
        linear-gradient(135deg, #163761 0%, #10294a 100%);
    background-size: cover;
    background-position: center;
}

.public-event-hero h1 {
    color: #fff;
    max-width: 920px;
}

.public-event-hero .description {
    margin-left: 0;
    color: rgba(255,255,255,.84);
}

.public-event-hero-content {
    display: grid;
    gap: 18px;
    max-width: 980px;
}

.public-event-meta span {
    color: #fff;
    background: rgba(255,255,255,.14);
}

.public-event-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
    width: min(1180px, calc(100% - 40px));
    margin: -54px auto 0;
    padding-bottom: 48px;
}

.tickets-grid-public,
.public-media-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.tickets-grid-public button {
    border: 0;
    border-radius: 13px;
    padding: 11px 12px;
    color: #fff;
    background: var(--navy);
    font-weight: 900;
}

.public-media-grid img {
    width: 100%;
    border-radius: 16px;
    border: 1px solid rgba(6, 27, 61, .08);
}

@media (max-width: 860px) {
    .editor-form-grid,
    .section-preview-grid,
    .tickets-grid-public,
    .public-media-grid {
        grid-template-columns: 1fr;
    }
}
