:root {
    --ink-900: #1b2a41;
    --ink-700: #50627c;
    --ink-500: #7d8ca3;
    --sky-500: #1e88e5;
    --sea-700: #0d6b8f;
    --green-600: #1ea672;
    --gold-400: #f1b73f;
    --amber-500: #ffb23f;
    --surface-50: #f6f8fc;
    --surface-100: #edf1f7;
    --surface-200: #dde5ef;
    --white: #ffffff;
    --danger: #c95454;
    --shadow-soft: 0 18px 44px rgba(31, 52, 77, 0.08);
    --shadow-card: 0 10px 24px rgba(31, 52, 77, 0.06);
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    --font-heading: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    --font-accent: Georgia, "Times New Roman", serif;
}

* {
    box-sizing: border-box;
}

img,
svg,
video,
canvas {
    max-width: 100%;
}

input,
select,
textarea,
button {
    min-width: 0;
}

html {
    width: 100%;
    min-width: 320px;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    width: 100%;
    margin: 0;
    font-family: var(--font-body);
    color: var(--ink-900);
    overflow-x: hidden;
    background:
        radial-gradient(circle at top left, rgba(30, 136, 229, 0.11), transparent 26%),
        radial-gradient(circle at 86% 0%, rgba(241, 183, 63, 0.11), transparent 24%),
        linear-gradient(180deg, #f7f9fc 0%, #f1f5fa 100%);
}

h1,
h2,
h3,
h4,
h5 {
    font-family: var(--font-heading);
    letter-spacing: -0.02em;
}

a {
    text-decoration: none;
}

.public-body {
    min-height: 100vh;
    min-height: 100dvh;
}

.public-self-service-link,
.public-staff-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    margin-top: 1rem;
    color: var(--sea-700);
    font-size: 0.9rem;
    font-weight: 700;
}

.public-portal-body {
    background:
        linear-gradient(135deg, rgba(8, 32, 47, 0.84), rgba(8, 78, 83, 0.58)),
        url("../img/zanzibar-login-background.jpg") center / cover scroll no-repeat;
}

.public-portal-login {
    position: relative;
    isolation: isolate;
    background:
        linear-gradient(135deg, rgba(8, 32, 47, 0.82), rgba(8, 78, 83, 0.5)),
        url("../img/zanzibar-login-background.jpg") center / cover scroll no-repeat;
}

.public-portal-login::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(circle at 18% 12%, rgba(255, 196, 92, 0.2), transparent 26%),
        linear-gradient(180deg, rgba(3, 21, 31, 0.08), rgba(3, 21, 31, 0.4));
    pointer-events: none;
}

.public-portal-shell {
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    place-items: start center;
    padding:
        max(clamp(1rem, 3vw, 2.5rem), env(safe-area-inset-top))
        max(clamp(1rem, 3vw, 2.5rem), env(safe-area-inset-right))
        max(clamp(1rem, 3vw, 2.5rem), env(safe-area-inset-bottom))
        max(clamp(1rem, 3vw, 2.5rem), env(safe-area-inset-left));
}

.public-portal-login .public-portal-shell {
    place-items: center;
}

.public-auth-card {
    width: min(100%, 470px);
    min-width: 0;
    padding: clamp(1.25rem, 4vw, 2rem);
    border: 1px solid rgba(27, 42, 65, 0.08);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 28px 80px rgba(3, 26, 39, 0.3);
    backdrop-filter: blur(14px);
}

.public-auth-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.35rem;
}

.public-auth-brand > div,
.public-account-brand span,
.public-account-welcome > div,
.public-service-card > div,
.public-order-list article > div {
    min-width: 0;
}

.public-auth-brand img,
.public-account-brand img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    padding: 7px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow-card);
}

.public-auth-brand span,
.public-section-heading span,
.public-account-welcome > div > span,
.public-ticket-rates-card > span {
    display: block;
    color: var(--sea-700);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.public-auth-brand h1,
.public-account-welcome h1,
.public-section-heading h1,
.public-section-heading h2 {
    margin: 0.18rem 0 0;
    line-height: 1.08;
}

.public-auth-brand h1 {
    font-size: clamp(1.55rem, 5vw, 2rem);
}

.public-auth-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem;
    margin-bottom: 1.25rem;
    padding: 0.3rem;
    border-radius: 15px;
    background: #edf3f8;
}

.public-auth-switch a {
    padding: 0.72rem 0.85rem;
    border-radius: 12px;
    color: var(--ink-700);
    text-align: center;
    font-weight: 700;
}

.public-auth-switch a.active {
    color: #ffffff;
    background: linear-gradient(135deg, #1f8fc8, #0e6ba8);
    box-shadow: 0 8px 18px rgba(31, 143, 200, 0.22);
}

.public-auth-form {
    display: grid;
    gap: 1rem;
}

.public-auth-form .form-control,
.public-auth-form .input-group-text,
.public-auth-form .btn {
    min-height: 48px;
}

.public-verification-target {
    display: grid;
    justify-items: center;
    gap: 0.25rem;
    margin-bottom: 1rem;
    padding: 1rem;
    border: 1px solid rgba(14, 107, 168, 0.13);
    border-radius: 16px;
    color: var(--ink-700);
    text-align: center;
    background: #edf7fb;
}

.public-verification-target i {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    margin-bottom: 0.2rem;
    border-radius: 50%;
    color: #ffffff;
    font-size: 1.05rem;
    background: linear-gradient(135deg, #1f8fc8, #0e6ba8);
}

.public-verification-target strong {
    color: var(--ink-900);
    font-size: 1.05rem;
}

.public-code-input {
    font-size: clamp(1.25rem, 5vw, 1.7rem);
    font-weight: 800;
    letter-spacing: 0.38em;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.public-verification-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.8rem;
    font-size: 0.87rem;
}

.public-verification-actions form {
    margin: 0;
}

.public-verification-actions .btn-link,
.public-verification-actions a {
    min-height: auto;
    padding: 0;
    color: var(--sea-700);
    font-size: inherit;
    font-weight: 700;
}

.public-account-panel {
    width: min(100%, 1120px);
    min-width: 0;
    padding: clamp(1rem, 3vw, 1.6rem);
    border: 1px solid rgba(27, 42, 65, 0.08);
    border-radius: 30px;
    background: rgba(248, 251, 253, 0.96);
    box-shadow: 0 28px 80px rgba(31, 52, 77, 0.13);
}

.public-account-panel--narrow {
    width: min(100%, 980px);
}

.public-account-header,
.public-account-welcome,
.public-section-heading,
.public-account-user,
.public-account-brand {
    display: flex;
    align-items: center;
}

.public-account-header,
.public-account-welcome,
.public-section-heading {
    justify-content: space-between;
    gap: 1rem;
}

.public-account-header > *,
.public-account-welcome > *,
.public-section-heading > *,
.public-service-grid > *,
.public-ticket-layout > *,
.public-ticket-quantity-grid > * {
    min-width: 0;
}

.public-account-header {
    margin-bottom: 1.25rem;
    padding: 0.2rem 0.15rem;
    flex-wrap: wrap;
}

.public-account-brand {
    gap: 0.75rem;
    color: var(--ink-900);
    font-size: 1.05rem;
    font-weight: 800;
}

.public-account-brand span,
.public-account-user strong {
    min-width: 0;
    overflow-wrap: anywhere;
}

.public-account-brand img {
    width: 52px;
    height: 52px;
    border-radius: 15px;
}

.public-account-user {
    gap: 0.8rem;
    min-width: 0;
    max-width: 100%;
}

.public-account-user > div {
    display: grid;
    min-width: 0;
    text-align: right;
}

.public-account-user span {
    color: var(--ink-500);
    font-size: 0.82rem;
    overflow-wrap: anywhere;
}

.public-account-welcome {
    margin-bottom: 1rem;
    padding: clamp(1rem, 3vw, 1.4rem);
    border-radius: 22px;
    color: #ffffff;
    background:
        radial-gradient(circle at 88% 18%, rgba(255, 255, 255, 0.18), transparent 24%),
        linear-gradient(130deg, #0e6ba8, #149e9b 72%, #1ea672);
}

.public-account-welcome > div {
    flex: 1 1 280px;
}

.public-account-welcome > div > span {
    color: rgba(255, 255, 255, 0.72);
}

.public-account-welcome h1 {
    font-size: clamp(1.55rem, 4vw, 2.25rem);
}

.public-event-date {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.12);
    font-weight: 700;
    line-height: 1.35;
    max-width: 100%;
    overflow-wrap: anywhere;
    white-space: normal;
}

.public-service-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    align-items: stretch;
}

.public-service-card,
.public-ticket-purchase-card,
.public-ticket-rates-card,
.public-order-section {
    border: 1px solid rgba(27, 42, 65, 0.08);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--shadow-card);
}

.public-service-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
    padding: 1.25rem;
}

.public-service-card > .btn {
    align-self: flex-start;
    margin-top: auto;
    max-width: 100%;
    white-space: normal;
}

.public-service-card h2 {
    margin: 0.12rem 0 0;
    font-size: 1.35rem;
}

.public-service-card p {
    margin: 0;
    color: var(--ink-700);
}

.public-service-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    color: #ffffff;
    font-size: 1.25rem;
    background: linear-gradient(135deg, #1f8fc8, #0e6ba8);
}

.public-service-card--tickets .public-service-icon {
    background: linear-gradient(135deg, #f1b73f, #e88432);
}

.public-service-kicker {
    color: var(--ink-500);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.public-status-list {
    display: grid;
    gap: 0.55rem;
}

.public-status-list > div,
.public-ticket-rates-card > div {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    color: var(--ink-700);
    min-width: 0;
}

.public-status-list strong,
.public-ticket-rates-card strong {
    color: var(--ink-900);
    text-align: right;
    overflow-wrap: anywhere;
}

.public-order-section {
    margin-top: 1rem;
    padding: 1.15rem;
}

.public-section-heading h2,
.public-section-heading h1 {
    font-size: 1.35rem;
}

.public-order-list {
    display: grid;
    gap: 0.65rem;
    margin-top: 1rem;
}

.public-order-list article {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 0;
    border-top: 1px solid rgba(27, 42, 65, 0.08);
    min-width: 0;
}

.public-order-list article > div:first-child {
    display: grid;
    gap: 0.18rem;
    min-width: 0;
    overflow-wrap: anywhere;
}

.public-order-list article span,
.public-order-list article small {
    color: var(--ink-500);
}

.public-order-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.6rem;
    flex-wrap: wrap;
    min-width: 0;
}

.public-order-actions a:not(.btn) {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 700;
}

.public-ticket-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 250px;
    gap: 1rem;
}

.public-ticket-purchase-card,
.public-ticket-rates-card {
    padding: 1.2rem;
}

.public-ticket-rates-card {
    align-self: start;
    display: grid;
    gap: 0.55rem;
}

.public-ticket-rates-card > strong {
    text-align: left;
    font-size: 1.08rem;
}

.public-ticket-rates-card > small {
    color: var(--ink-500);
}

.public-ticket-quantity-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.public-ticket-quantity {
    display: grid;
    grid-template-columns: 1fr 86px;
    align-items: center;
    gap: 0.7rem;
    padding: 0.85rem;
    border: 1px solid var(--surface-200);
    border-radius: 16px;
    background: #f8fbfd;
}

.public-ticket-quantity span {
    display: grid;
}

.public-ticket-quantity small {
    color: var(--ink-500);
}

.public-ticket-quantity input {
    width: 100%;
    min-width: 0;
    text-align: center;
    font-weight: 800;
}

.public-ticket-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 1rem 0;
    padding: 1rem;
    border-radius: 16px;
    background: #eaf6f1;
    color: #0c6a4b;
}

.public-ticket-total strong {
    font-size: 1.15rem;
    text-align: right;
}

.public-empty-state {
    min-height: 130px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 0.5rem;
    color: var(--ink-500);
}

.public-empty-state i {
    font-size: 1.8rem;
}

.self-service-page {
    min-height: 100vh;
    min-height: 100dvh;
    background:
        linear-gradient(135deg, rgba(8, 32, 47, 0.84), rgba(8, 78, 83, 0.58)),
        url("../img/zanzibar-login-background.jpg") center / cover scroll no-repeat;
}

.self-service-page .self-service-wrapper {
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    place-items: start center;
    padding:
        max(clamp(1rem, 4vw, 2.5rem), env(safe-area-inset-top))
        max(clamp(1rem, 4vw, 2.5rem), env(safe-area-inset-right))
        max(clamp(1rem, 4vw, 2.5rem), env(safe-area-inset-bottom))
        max(clamp(1rem, 4vw, 2.5rem), env(safe-area-inset-left));
}

.self-service-page .self-service-card {
    width: min(100%, 540px);
    min-width: 0;
    margin: 0;
    padding: clamp(1.25rem, 4vw, 1.75rem);
    border: 1px solid rgba(17, 39, 59, 0.08);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 22px 60px rgba(23, 48, 66, 0.12);
}

.self-service-page .self-service-header {
    max-width: 380px;
    margin: 0 auto 1.25rem;
    text-align: center;
}

.self-service-page .self-service-logo {
    width: 76px !important;
    height: 76px !important;
    display: block;
    margin: 0 auto 0.85rem;
    padding: 8px;
    border-radius: 20px;
    background: #ffffff;
    object-fit: contain;
    box-shadow: 0 10px 24px rgba(23, 48, 66, 0.08);
}

.self-service-page .self-service-header h1 {
    margin: 0 0 0.4rem;
    font-size: clamp(1.65rem, 4vw, 2.1rem);
    line-height: 1.1;
    overflow-wrap: anywhere;
}

.self-service-page .self-service-header p {
    margin: 0 auto;
    color: #6d8495;
    font-size: 0.92rem;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.self-service-page .eyebrow {
    margin-bottom: 0.3rem;
    color: var(--sea-700);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.self-service-page form,
.self-service-page .summary-list {
    width: 100%;
    min-width: 0;
}

.self-service-page .form-control,
.self-service-page .form-select,
.self-service-page .btn {
    max-width: 100%;
    min-width: 0;
    min-height: 46px;
}

.self-service-page .input-group {
    width: 100%;
    min-width: 0;
    flex-wrap: nowrap;
}

.self-service-page .input-group > .form-control,
.self-service-page .input-group > .form-select {
    width: 1%;
    min-width: 0;
}

.self-service-page .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
}

.self-service-page .summary-row {
    grid-template-columns: minmax(108px, 36%) minmax(0, 1fr);
}

.self-service-page .summary-row > * {
    min-width: 0;
    overflow-wrap: anywhere;
}

.self-service-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    margin-top: 1rem;
}

.self-service-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: normal;
}

.self-service-actions > *,
.secure-close-form,
.secure-close-form .btn {
    width: 100%;
    min-width: 0;
}

.self-service-page .lipapay-payment-card {
    width: min(100%, 620px);
}

.lipapay-channel-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.lipapay-channel-option {
    position: relative;
    min-width: 0;
    cursor: pointer;
}

.lipapay-channel-option input {
    position: absolute;
    inset: 0 auto auto 0;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.lipapay-channel-option span {
    min-height: 86px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 0.45rem;
    padding: 0.9rem;
    border: 1px solid var(--surface-200);
    border-radius: 16px;
    color: var(--ink-700);
    text-align: center;
    background: #f8fbfd;
    transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.lipapay-channel-option i {
    color: var(--sea-700);
    font-size: 1.35rem;
}

.lipapay-channel-option input:checked + span {
    border-color: rgba(31, 143, 200, 0.72);
    color: var(--ink-900);
    background: #edf8fd;
    box-shadow: 0 0 0 3px rgba(31, 143, 200, 0.12);
}

.lipapay-channel-option input:focus-visible + span {
    outline: 3px solid rgba(31, 143, 200, 0.25);
    outline-offset: 2px;
}

.lipapay-request-panel {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.9rem;
    padding: 1rem;
    border: 1px solid rgba(14, 107, 168, 0.16);
    border-radius: 18px;
    color: var(--ink-700);
    background: #edf7fb;
}

.lipapay-request-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, #1f8fc8, #0e6ba8);
}

.lipapay-request-panel span,
.lipapay-request-panel strong {
    display: block;
    overflow-wrap: anywhere;
}

.lipapay-request-panel span {
    color: var(--ink-500);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.lipapay-request-panel strong {
    margin: 0.12rem 0 0.4rem;
    color: var(--ink-900);
    font-size: 1.18rem;
}

.lipapay-request-panel p {
    margin: 0;
    line-height: 1.5;
}

@media (max-width: 991.98px) {
    .public-ticket-layout {
        grid-template-columns: 1fr;
    }

    .public-ticket-rates-card {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
    }

    .public-ticket-rates-card > span,
    .public-ticket-rates-card > strong,
    .public-ticket-rates-card > small,
    .public-ticket-rates-card > hr {
        grid-column: 1 / -1;
    }
}

@media (max-width: 767.98px) {
    .main-content,
    .page-content,
    .section-card,
    .panel-card,
    .table-card,
    .login-card,
    .public-account-panel,
    .public-auth-card,
    .self-service-card {
        min-width: 0;
        max-width: 100%;
    }

    .toolbar,
    .page-actions,
    .form-actions {
        flex-wrap: wrap;
    }

    .toolbar > *,
    .page-actions > *,
    .form-actions > * {
        min-width: 0;
        max-width: 100%;
    }

    .table-responsive {
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .public-service-grid,
    .public-ticket-quantity-grid {
        grid-template-columns: 1fr;
    }

    .public-account-header,
    .public-account-welcome,
    .public-order-list article {
        align-items: flex-start;
    }

    .public-account-welcome,
    .public-order-list article {
        flex-direction: column;
    }

    .public-account-welcome > div {
        width: 100%;
        flex: 0 1 auto;
    }

    .public-order-actions {
        justify-content: flex-start;
    }

    .public-account-header {
        gap: 0.75rem;
    }

    .public-section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

}

@media (max-width: 575.98px) {
    .public-portal-shell {
        place-items: start center;
        padding: 0.75rem;
    }

    .public-auth-card,
    .public-account-panel {
        border-radius: 22px;
    }

    .public-auth-brand {
        flex-direction: column;
        gap: 0.7rem;
        text-align: center;
    }

    .public-auth-brand img {
        width: 60px;
        height: 60px;
    }

    .public-account-header {
        flex-direction: column;
        align-items: stretch;
    }

    .public-account-header > .btn,
    .public-account-user {
        width: 100%;
    }

    .public-account-user {
        justify-content: space-between;
    }

    .public-account-user > div {
        text-align: left;
    }

    .public-account-welcome {
        padding: 1rem;
    }

    .public-event-date {
        width: 100%;
    }

    .public-status-list > div,
    .public-ticket-rates-card > div,
    .public-ticket-total {
        align-items: flex-start;
    }

    .public-status-list > div {
        flex-direction: column;
        gap: 0.15rem;
    }

    .public-status-list strong {
        text-align: left;
    }

    .public-ticket-quantity {
        grid-template-columns: minmax(0, 1fr) 76px;
    }

    .public-ticket-rates-card {
        grid-template-columns: 1fr;
    }

    .self-service-page .self-service-wrapper {
        padding:
            max(0.75rem, env(safe-area-inset-top))
            max(0.75rem, env(safe-area-inset-right))
            max(0.75rem, env(safe-area-inset-bottom))
            max(0.75rem, env(safe-area-inset-left));
    }

    .self-service-page .self-service-card {
        margin: 0;
        padding: 1.15rem;
        border-radius: 22px;
    }

    .self-service-page .summary-row {
        grid-template-columns: 1fr;
        gap: 0.3rem;
    }

    .self-service-actions {
        grid-template-columns: 1fr;
    }

    .lipapay-channel-grid {
        grid-template-columns: 1fr;
    }

    .lipapay-channel-option span {
        min-height: 66px;
        grid-template-columns: auto minmax(0, 1fr);
        justify-items: start;
        text-align: left;
    }

    .lipapay-request-panel {
        grid-template-columns: 1fr;
    }

    .public-auth-form .form-control,
    .self-service-page .form-control,
    .self-service-page .form-select {
        font-size: 16px;
    }
}

@media (max-width: 359.98px) {
    .public-portal-shell,
    .self-service-page .self-service-wrapper {
        padding: 0.45rem;
    }

    .public-auth-card,
    .public-account-panel,
    .self-service-page .self-service-card {
        padding: 1rem;
        border-radius: 18px;
    }

    .public-auth-brand img,
    .self-service-page .self-service-logo {
        width: 56px !important;
        height: 56px !important;
        border-radius: 16px;
    }

    .public-ticket-quantity {
        grid-template-columns: 1fr;
    }

    .public-ticket-quantity input {
        text-align: left;
    }

    .public-order-actions .btn,
    .public-service-card > .btn {
        width: 100%;
    }
}

.app-shell {
    min-height: 100vh;
    display: flex;
    position: relative;
    overflow-x: clip;
}

.sidebar {
    width: 270px;
    background: rgba(255, 255, 255, 0.96);
    color: var(--ink-900);
    padding: 1.1rem;
    position: fixed;
    inset: 0 auto 0 0;
    overflow-y: auto;
    border-right: 1px solid rgba(27, 42, 65, 0.08);
    z-index: 1035;
    -webkit-overflow-scrolling: touch;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: transform 0.24s ease, box-shadow 0.24s ease, opacity 0.2s ease, visibility 0.2s ease;
}

.brand-card {
    display: flex;
    gap: 0.85rem;
    align-items: center;
    padding: 0.95rem;
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, #ffffff, #f8fbff);
    border: 1px solid rgba(27, 42, 65, 0.08);
    box-shadow: var(--shadow-card);
}

.brand-logo {
    width: 62px;
    height: 62px;
    object-fit: cover;
    border-radius: 16px;
    background: #f9fcff;
    padding: 6px;
}

.brand-kicker {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: rgba(255, 255, 255, 0.72);
}

.brand-card h1 {
    margin: 0;
    font-size: 1.15rem;
    color: #0d7a96;
}

.brand-card p {
    margin: 0.18rem 0 0;
    font-size: 0.82rem;
    color: var(--ink-700);
}

.brand-copy {
    min-width: 0;
}

.festival-mini {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, #f8fbff, #f1f6fb);
    border: 1px solid rgba(27, 42, 65, 0.08);
}

.festival-mini__label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--ink-500);
}

.festival-mini__title {
    margin-top: 0.4rem;
    font-weight: 700;
    line-height: 1.45;
}

.festival-mini__meta {
    display: grid;
    gap: 0.35rem;
    margin-top: 0.7rem;
    font-size: 0.83rem;
    color: var(--ink-700);
}

.menu {
    display: grid;
    gap: 1rem;
    margin-top: 1.15rem;
}

.menu-section {
    display: grid;
    gap: 0.48rem;
}

.menu-section-title {
    padding: 0 0.5rem;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--ink-500);
    font-weight: 700;
}

.menu-section-links {
    display: grid;
    gap: 0.26rem;
}

.menu-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--ink-700);
    padding: 0.82rem 0.95rem;
    border-radius: 14px;
    transition: 0.18s ease;
    font-weight: 500;
}

.menu-link:hover,
.menu-link.active {
    color: var(--white);
    background: linear-gradient(135deg, #1f8fc8, #0e6ba8);
    transform: translateX(3px);
    box-shadow: 0 10px 18px rgba(31, 143, 200, 0.24);
}

.menu-link i {
    font-size: 1rem;
    min-width: 1rem;
}

.menu-link-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.2rem;
    min-width: 1.2rem;
    flex: 0 0 1.2rem;
}

.menu-link-label {
    min-width: 0;
    flex: 1 1 auto;
}

.menu-link-badge {
    pointer-events: none;
}

.menu-link-icon .notification-badge {
    position: absolute;
    top: -8px;
    right: -11px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #ff7d4d !important;
    color: var(--white) !important;
    font-size: 0.65rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-shadow: 0 8px 16px rgba(255, 125, 77, 0.24);
    z-index: 1;
}

.tz-phone-group .input-group-text {
    min-width: 58px;
    justify-content: center;
    font-weight: 700;
    color: var(--ink-700);
    background: #f4f7fb;
}

.main-content {
    margin-left: 270px;
    width: calc(100% - 270px);
    padding: 1rem 1.15rem 1.35rem;
    min-width: 0;
    transition: margin-left 0.24s ease, width 0.24s ease, padding 0.24s ease;
}

.topbar {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    padding: 1rem 1.2rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(27, 42, 65, 0.08);
}

.offline-status-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.9rem;
    padding: 0.95rem 1.1rem;
    border-radius: 18px;
    background: rgba(255, 248, 225, 0.92);
    border: 1px solid rgba(241, 183, 63, 0.34);
    box-shadow: var(--shadow-card);
}

.offline-status-card strong {
    display: block;
    margin-bottom: 0.18rem;
}

.offline-status-card--offline {
    background: rgba(255, 245, 232, 0.98);
    border-color: rgba(255, 178, 63, 0.42);
}

.offline-status-card--queued {
    background: rgba(233, 245, 255, 0.98);
    border-color: rgba(30, 136, 229, 0.22);
}

.topbar h2 {
    margin: 0;
    font-size: 1.32rem;
}

.topbar-title {
    min-width: 170px;
}

.topbar-heading {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
}

.topbar-title h2 {
    overflow-wrap: anywhere;
}

.topbar-kicker {
    font-size: 0.78rem;
    color: var(--ink-500);
    margin-bottom: 0.12rem;
    font-weight: 700;
}

.topbar-controls {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.topbar-search {
    flex: 1 1 320px;
    max-width: 520px;
    position: relative;
}

.topbar-search i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ink-500);
}

.topbar-search .form-control {
    padding-left: 2.5rem;
    background: #f4f7fb;
    border-color: transparent;
}

.menu-search-popover {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    z-index: 1050;
    display: grid;
    gap: 0.2rem;
    padding: 0.45rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(17, 39, 59, 0.08);
    box-shadow: 0 18px 38px rgba(17, 39, 59, 0.12);
}

.menu-search-option {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    padding: 0.72rem 0.82rem;
    border-radius: 12px;
    color: var(--ink-900);
    transition: background 0.18s ease, transform 0.18s ease;
}

.menu-search-option:hover,
.menu-search-option:focus {
    background: #f3f8fc;
    transform: translateY(-1px);
}

.menu-search-option i {
    margin-top: 0.05rem;
    color: var(--sea-700);
}

.menu-search-option strong {
    display: block;
    font-size: 0.92rem;
    line-height: 1.35;
}

.menu-search-option small {
    display: block;
    color: var(--ink-500);
    font-size: 0.78rem;
    line-height: 1.35;
}

.sidebar-toggle,
.sidebar-backdrop {
    display: none;
}

.sidebar-toggle {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(17, 39, 59, 0.12);
    border-radius: 14px;
    background: #f4f7fb;
    color: var(--ink-900);
    box-shadow: 0 8px 18px rgba(17, 39, 59, 0.06);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.sidebar-toggle:hover {
    transform: translateY(-1px);
    border-color: rgba(17, 39, 59, 0.18);
    background: #ffffff;
    box-shadow: 0 12px 24px rgba(17, 39, 59, 0.1);
}

.sidebar-toggle-glyph {
    width: 20px;
    height: 20px;
    display: inline-flex;
}

.sidebar-toggle-glyph svg {
    width: 100%;
    height: 100%;
}

.sidebar-toggle-glyph .toggle-shell {
    fill: rgba(17, 39, 59, 0.06);
    stroke: rgba(17, 39, 59, 0.22);
    stroke-width: 1.25;
}

.sidebar-toggle-glyph .toggle-rail {
    fill: #0f8fb8;
}

.sidebar-toggle-glyph .toggle-line {
    fill: rgba(17, 39, 59, 0.7);
}

.sidebar-toggle[aria-expanded="true"] {
    background: linear-gradient(135deg, rgba(30, 168, 231, 0.14), rgba(13, 107, 143, 0.08));
    border-color: rgba(13, 107, 143, 0.28);
}

.sidebar-toggle[aria-expanded="true"] .toggle-shell {
    fill: rgba(30, 168, 231, 0.12);
    stroke: rgba(13, 107, 143, 0.34);
}

.sidebar-toggle[aria-expanded="true"] .toggle-rail {
    fill: #0d6b8f;
}

.sidebar-toggle[aria-expanded="true"] .toggle-line {
    fill: rgba(13, 107, 143, 0.78);
}

.icon-action {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    border: 1px solid rgba(17, 39, 59, 0.12);
    background: rgba(255, 255, 255, 0.92);
    color: var(--ink-700);
    box-shadow: 0 8px 18px rgba(17, 39, 59, 0.08);
    transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.icon-action:hover {
    transform: translateY(-1px);
    background: var(--surface-100);
    color: var(--ink-900);
}

.icon-action i {
    font-size: 1.05rem;
}

.collapsed-home-shortcut {
    display: none;
}

.broiler-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.5;
    box-shadow: none;
    text-decoration: none;
}

.broiler-action-btn i {
    font-size: 0.95rem;
    line-height: 1;
}

.compact-language-switch .btn {
    min-width: 42px;
    padding-inline: 0.65rem;
}

.language-dropdown-btn {
    min-width: 58px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.language-dropdown-menu {
    min-width: 180px;
    border-radius: 14px;
    border: 1px solid rgba(17, 39, 59, 0.08);
    box-shadow: 0 18px 34px rgba(31, 52, 77, 0.12);
    padding: 0.35rem;
}

.language-dropdown-menu .dropdown-item {
    border-radius: 10px;
    padding: 0.55rem 0.75rem;
    gap: 1rem;
}

.language-code {
    font-weight: 800;
    letter-spacing: 0.06em;
}

.language-name {
    font-size: 0.88rem;
    color: var(--ink-700);
}

.user-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    border-radius: 999px;
    background: #f4f7fb;
    padding: 0.35rem 0.6rem 0.35rem 0.38rem;
    color: var(--ink-700);
}

.user-chip small {
    display: block;
    color: var(--ink-500);
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1f8fc8, #0e6ba8);
    color: var(--white);
    font-size: 0.8rem;
    font-weight: 800;
}

.notification-chip {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #f4f7fb;
    border: 1px solid rgba(27, 42, 65, 0.07);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    color: var(--ink-700);
    text-decoration: none;
}

.notification-badge {
    position: absolute;
    top: -2px;
    right: -1px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #ff7d4d;
    color: var(--white);
    font-size: 0.65rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.content-panel {
    margin-top: 1rem;
    min-width: 0;
}

.hero-card,
.section-card,
.stat-card,
.timeline-card,
.table-card {
    background: var(--white);
    border: 1px solid rgba(17, 39, 59, 0.08);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
}

.section-card,
.table-card,
.timeline-card,
.panel-card,
.rail-card {
    content-visibility: auto;
    contain-intrinsic-size: 420px;
}

.hero-meta {
    display: flex;
    gap: 0.7rem;
    flex-wrap: wrap;
}

.hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border-radius: 999px;
    padding: 0.45rem 0.85rem;
    background: var(--surface-100);
    color: var(--ink-700);
    font-size: 0.86rem;
    box-shadow: 0 8px 18px rgba(31, 52, 77, 0.08);
}

.festival-profile-hero {
    display: flex;
    align-items: stretch;
    overflow: hidden;
}

.festival-profile-hero__content {
    padding: 1.4rem;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    display: grid;
    align-content: start;
    gap: 0.85rem;
}

.festival-profile-sidecard {
    background: linear-gradient(180deg, rgba(248, 251, 253, 0.96), rgba(241, 247, 250, 0.92));
}

.festival-profile-copy {
    margin: 0;
    max-width: 100%;
    color: var(--ink-700);
    line-height: 1.8;
    text-align: left;
    font-weight: 400;
    overflow-wrap: anywhere;
}

.festival-profile-hero__title {
    margin: 0;
    max-width: 100%;
    font-size: clamp(1.9rem, 1.3rem + 1.35vw, 2.55rem);
    line-height: 1.12;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.stat-card {
    padding: 1rem 1.05rem;
    position: relative;
    overflow: hidden;
    height: 100%;
    min-width: 0;
    display: grid;
    align-content: start;
    gap: 0.2rem;
}

.stat-card::after {
    content: "";
    position: absolute;
    right: -18px;
    top: -18px;
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: linear-gradient(145deg, rgba(30, 168, 231, 0.18), rgba(26, 154, 96, 0.08));
}

.stat-label {
    font-size: 0.84rem;
    color: #60778a;
    margin-bottom: 0.35rem;
    overflow-wrap: anywhere;
}

.stat-value {
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--ink-900);
    line-height: 1.05;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.stat-meta {
    margin-top: 0.45rem;
    color: #6a8193;
    font-size: 0.8rem;
    overflow-wrap: anywhere;
}

.section-card,
.table-card,
.timeline-card {
    padding: 1.1rem;
}

.section-title {
    margin: 0 0 0.95rem;
    font-size: 1.2rem;
}

.section-lead {
    margin-top: -0.45rem;
    color: #62798b;
    font-size: 0.9rem;
    text-align: justify;
    text-justify: inter-word;
}

.grid-tiles {
    display: grid;
    gap: 0.9rem;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.festival-profile-stat-grid {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.mini-tile {
    padding: 0.9rem;
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, #f8fbfd, #eef6f8);
    border: 1px solid rgba(17, 39, 59, 0.08);
}

.mini-tile h4 {
    font-size: 0.9rem;
    margin: 0;
    font-family: var(--font-heading);
}

.mini-tile p {
    margin: 0.25rem 0 0;
    font-size: 1.25rem;
    font-weight: 800;
}

.festival-profile-stat {
    display: grid;
    gap: 0.5rem;
    align-content: start;
    min-height: 100%;
}

.festival-profile-stat__label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--ink-700);
}

.festival-profile-stat__value {
    font-size: 1.9rem;
    font-weight: 800;
    color: var(--ink-900);
    line-height: 1;
}

.festival-profile-stat__meta {
    color: var(--ink-700);
    font-size: 0.85rem;
    line-height: 1.65;
    text-align: justify;
    text-justify: inter-word;
}

.festival-insight-card {
    display: grid;
    gap: 0.65rem;
    align-content: start;
    min-height: 100%;
}

.festival-insight-card__icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, rgba(30, 168, 231, 0.18), rgba(26, 154, 96, 0.12));
    color: var(--ink-900);
    font-size: 1.1rem;
}

.festival-insight-card p,
.festival-beneficiary-card p,
.festival-focus-card p,
.festival-profile-table td {
    text-align: justify;
    text-justify: inter-word;
}

.festival-insight-card p,
.festival-beneficiary-card p,
.festival-focus-card p,
.festival-profile-stat__meta {
    font-size: 0.92rem;
    font-weight: 400;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.festival-insight-card h4,
.festival-beneficiary-card h4,
.festival-focus-card h4,
.festival-profile-stat__label,
.summary-row span:first-child {
    font-weight: 700;
}

.festival-profile-table th,
.festival-profile-table td {
    vertical-align: top;
}

.festival-beneficiary-card {
    display: grid;
    gap: 0.55rem;
    min-height: 100%;
}

.festival-profile-table td {
    line-height: 1.65;
}

.table-responsive table {
    margin-bottom: 0;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 16px;
}

.management-table,
.table-responsive > .table,
.table-responsive table {
    min-width: 720px;
}

.table thead th {
    background: #f3f7fb;
    border-bottom-width: 1px;
    color: #5b6e87;
    font-size: 0.84rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.table tbody td {
    font-size: 0.9rem;
    vertical-align: middle;
}

.table tbody tr:hover {
    background: #fbfdff;
}

.badge-soft {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
}

.status-success {
    background: #ddf6e9;
    color: #166a43;
}

.status-info {
    background: #dff3fb;
    color: #0c688d;
}

.status-warning {
    background: #fbf1d6;
    color: #8b6418;
}

.status-danger {
    background: #fbe1e1;
    color: #a03e3e;
}

.status-primary {
    background: #e8ebff;
    color: #3f54b5;
}

.status-muted,
.status-neutral {
    background: #edf2f5;
    color: #546a79;
}

.form-label {
    font-size: 0.84rem;
    font-weight: 700;
    color: #3a5669;
    margin-bottom: 0.35rem;
}

.form-control,
.form-select,
.btn {
    border-radius: 12px;
}

.form-control,
.form-select {
    border-color: #d6e2e8;
    padding: 0.72rem 0.85rem;
    font-size: 0.92rem;
}

.form-select {
    padding-right: 2.9rem;
    background-position: right 0.9rem center;
    background-size: 16px 12px;
}

.btn {
    font-weight: 700;
    padding: 0.68rem 0.95rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--sky-500), var(--sea-700));
    border-color: transparent;
}

.btn-outline-primary {
    border-color: rgba(13, 107, 143, 0.35);
    color: var(--sea-700);
}

.toolbar {
    display: flex;
    justify-content: space-between;
    gap: 0.9rem;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.toolbar > * {
    min-width: 0;
}

.toolbar form {
    max-width: 100%;
}

.action-cell {
    width: 1%;
    white-space: nowrap;
    vertical-align: middle;
}

.table-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: nowrap;
}

.table-actions form {
    margin: 0;
}

.progress-shell {
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: #e8eff3;
    overflow: hidden;
}

.progress-shell span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--green-600), var(--sky-500));
}

.timeline-list {
    display: grid;
    gap: 0.85rem;
}

.timeline-item {
    padding: 0.95rem;
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, #fbfdfe, #f3f8fa);
    border: 1px solid rgba(17, 39, 59, 0.08);
}

.timeline-item strong {
    display: block;
    margin-bottom: 0.2rem;
}

.timeline-item p {
    margin: 0.2rem 0 0;
    color: #62798b;
    text-align: justify;
    text-justify: inter-word;
}

.note-strip {
    padding: 0.95rem 1rem;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(212, 173, 69, 0.14), rgba(30, 168, 231, 0.11));
    border: 1px solid rgba(17, 39, 59, 0.07);
    color: var(--ink-900);
    text-align: justify;
    text-justify: inter-word;
}

body.sidebar-collapsed .sidebar {
    transform: translateX(calc(-100% - 1rem));
    box-shadow: none;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

body.sidebar-collapsed .main-content {
    margin-left: 0;
    width: 100%;
}

body.sidebar-collapsed .collapsed-home-shortcut {
    display: inline-flex;
}

.helper-text,
.table tbody td,
.table tbody td div,
.table tbody td p {
    text-align: justify;
    text-justify: inter-word;
}

.empty-state {
    padding: 2rem;
    text-align: center;
    color: #688095;
}

.empty-state i {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.55rem;
    color: var(--sea-700);
}

.festival-focus-card {
    min-height: 100%;
}

.v2-dashboard {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 1rem;
}

.dashboard-main {
    min-width: 0;
}

.dashboard-rail {
    display: grid;
    gap: 1rem;
    align-content: start;
}

.countdown-banner,
.panel-card,
.rail-card {
    background: var(--white);
    border: 1px solid rgba(27, 42, 65, 0.08);
    border-radius: 20px;
    box-shadow: var(--shadow-card);
}

.countdown-banner {
    position: relative;
    overflow: hidden;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.35rem;
    margin-bottom: 1rem;
    background:
        linear-gradient(135deg, rgba(8, 120, 164, 0.96), rgba(15, 171, 154, 0.9)),
        linear-gradient(180deg, #1789b6, #1aa58f);
    color: var(--white);
}

.countdown-banner::after {
    content: "";
    position: absolute;
    inset: auto -55px -45px auto;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.26), transparent 64%);
    pointer-events: none;
}

.countdown-banner__content,
.countdown-banner__cta {
    position: relative;
    z-index: 1;
}

.countdown-banner__content {
    min-width: 0;
    max-width: 100%;
}

.countdown-banner__eyebrow {
    font-size: 1.55rem;
    font-weight: 800;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.countdown-banner__date {
    margin-top: 0.3rem;
    color: rgba(255, 255, 255, 0.85);
}

.countdown-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 90px));
    gap: 0.75rem;
    margin-top: 1rem;
}

.countdown-box {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    text-align: center;
    padding: 0.75rem 0.5rem;
    min-width: 0;
    overflow: hidden;
}

.countdown-box strong {
    display: block;
    font-size: 2rem;
    line-height: 1;
    overflow-wrap: anywhere;
}

.countdown-box span {
    display: block;
    margin-top: 0.28rem;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.86);
    overflow-wrap: anywhere;
}

.countdown-banner__foot {
    margin-top: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    padding-top: 0.55rem;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    font-weight: 600;
}

.countdown-banner__foot strong {
    font-weight: 800;
}

.btn-add-new {
    background: linear-gradient(135deg, #22c58b, #1ca86b);
    border: none;
    box-shadow: 0 12px 22px rgba(20, 140, 94, 0.22);
}

.summary-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.metric-summary-card {
    background: var(--white);
    border: 1px solid rgba(27, 42, 65, 0.08);
    border-radius: 18px;
    box-shadow: var(--shadow-card);
    padding: 1rem 1.05rem;
    min-width: 0;
    min-height: 100%;
    display: grid;
    align-content: start;
}

.metric-summary-card__label {
    color: var(--ink-700);
    font-size: 0.92rem;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.metric-summary-card__value {
    margin-top: 0.45rem;
    font-size: 2rem;
    font-weight: 800;
    color: var(--ink-900);
    line-height: 1.05;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.metric-summary-card__meta {
    margin-top: 0.45rem;
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    color: var(--ink-700);
    font-size: 0.88rem;
    flex-wrap: wrap;
    overflow-wrap: anywhere;
}

.quick-status-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.quick-status {
    color: var(--white);
    border-radius: 15px;
    padding: 0.95rem 1rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.55rem 1rem;
    align-items: start;
    box-shadow: var(--shadow-card);
    min-width: 0;
    overflow: hidden;
}

.quick-status span {
    font-weight: 700;
    overflow-wrap: anywhere;
}

.quick-status strong {
    font-size: 1.3rem;
    overflow-wrap: anywhere;
}

.quick-status--blue {
    background: linear-gradient(135deg, #2277b5, #1c8ec9);
}

.quick-status--green {
    background: linear-gradient(135deg, #1a9a60, #28b57b);
}

.quick-status--amber {
    background: linear-gradient(135deg, #f0a52d, #f6be52);
}

.panel-card {
    padding: 1rem 1.05rem;
}

.panel-card__header,
.rail-card__title {
    margin-bottom: 0.85rem;
}

.panel-card__header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

.panel-card__header > * {
    min-width: 0;
}

.panel-card__header h3,
.rail-card__title {
    margin: 0;
    font-size: 1.08rem;
    font-weight: 800;
}

.panel-card__header p {
    margin: 0.22rem 0 0;
    color: var(--ink-700);
    font-size: 0.9rem;
}

.management-table thead th {
    background: #f6f9fc;
}

.dashboard-bottom-grid {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 1rem;
}

.workflow-list {
    display: grid;
    gap: 0.75rem;
}

.workflow-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    padding: 0.9rem 0.95rem;
    border-radius: 15px;
    background: #f8fbff;
    border: 1px solid rgba(27, 42, 65, 0.07);
}

.workflow-row__actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.timeline-compact {
    display: grid;
    gap: 0.75rem;
}

.timeline-compact__item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.75rem;
    align-items: start;
    padding: 0.9rem 0.95rem;
    border-radius: 15px;
    background: #f9fbfd;
    border: 1px solid rgba(27, 42, 65, 0.07);
}

.timeline-compact__item time {
    font-size: 0.78rem;
    color: var(--ink-500);
    white-space: nowrap;
}

.timeline-compact__dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-top: 0.28rem;
    background: #8aa0b8;
}

.timeline-compact__dot--exhibitor {
    background: #1e88e5;
}

.timeline-compact__dot--payment {
    background: #22a06b;
}

.timeline-compact__dot--support {
    background: #ffb23f;
}

.timeline-compact__dot--task {
    background: #7d63ff;
}

.rail-card {
    padding: 1rem;
}

.rail-feed {
    display: grid;
    gap: 0.8rem;
}

.rail-feed__item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.7rem;
    align-items: start;
}

.rail-feed__item--stacked {
    grid-template-columns: 1fr auto;
}

.rail-feed__dot {
    width: 10px;
    height: 10px;
    margin-top: 0.35rem;
    border-radius: 50%;
    background: #c0cada;
}

.rail-feed__dot.is-good {
    background: #22a06b;
}

.rail-feed__dot.is-alert {
    background: #ffb23f;
}

.rail-feed__dot.is-info {
    background: #35a4d6;
}

.rail-feed__time {
    font-size: 0.74rem;
    color: var(--ink-500);
}

.booth-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

.booth-view-switch {
    display: flex;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.booth-filter-bar {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 220px)) minmax(260px, 1fr) auto;
    gap: 0.85rem;
    align-items: end;
}

.booth-filter-bar__search {
    min-width: 0;
}

.booth-filter-bar__actions {
    display: flex;
    justify-content: flex-end;
}

.booth-zone-grid {
    display: grid;
    gap: 1rem;
}

.booth-zone-card {
    background: var(--white);
    border: 1px solid rgba(27, 42, 65, 0.08);
    border-radius: 20px;
    box-shadow: var(--shadow-card);
    padding: 1rem;
}

.booth-zone-card__header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.booth-zone-card__header h3 {
    margin: 0;
    font-size: 1.05rem;
}

.booth-zone-card__header p {
    margin: 0.18rem 0 0;
    color: var(--ink-700);
    font-size: 0.88rem;
}

.booth-slot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.85rem;
}

.booth-slot-card {
    border-radius: 18px;
    padding: 0.9rem;
    border: 1px solid rgba(27, 42, 65, 0.08);
    background: #f8fbff;
    box-shadow: 0 10px 18px rgba(31, 52, 77, 0.05);
    display: grid;
    gap: 0.7rem;
}

.booth-slot-card--available {
    background: linear-gradient(180deg, #f5fff9, #ebfbf3);
}

.booth-slot-card--allocated {
    background: linear-gradient(180deg, #f3f9ff, #eaf5ff);
}

.booth-slot-card--reserved {
    background: linear-gradient(180deg, #fff8eb, #fff2d7);
}

.booth-slot-card--blocked,
.booth-slot-card--maintenance {
    background: linear-gradient(180deg, #fbf5f5, #f4eded);
}

.booth-slot-card__top,
.booth-slot-card__meta,
.booth-slot-card__foot {
    display: flex;
    justify-content: space-between;
    gap: 0.65rem;
    align-items: center;
    flex-wrap: wrap;
}

.booth-slot-card__body {
    color: var(--ink-900);
}

.booth-slot-card__body .text-muted {
    color: var(--ink-700) !important;
}

.login-page {
    min-height: 100dvh;
    position: relative;
    isolation: isolate;
    display: grid;
    place-items: center;
    padding: clamp(1rem, 3vw, 2.2rem);
    background:
        linear-gradient(120deg, rgba(5, 31, 44, 0.76), rgba(5, 64, 69, 0.4)),
        url("../img/zanzibar-login-background.jpg") center / cover fixed no-repeat;
}

.login-page::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(circle at 12% 8%, rgba(255, 196, 92, 0.18), transparent 25%),
        linear-gradient(180deg, rgba(2, 22, 33, 0.05), rgba(2, 22, 33, 0.28));
    pointer-events: none;
}

.login-page > .position-absolute {
    z-index: 5;
}

.login-page .language-dropdown-btn {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.58);
    background: rgba(6, 35, 49, 0.38);
    backdrop-filter: blur(10px);
}

.login-shell {
    width: min(1120px, 100%);
    min-height: min(690px, calc(100dvh - 4.5rem));
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.06fr 0.94fr;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 30px;
    background: #ffffff;
    box-shadow: 0 34px 90px rgba(2, 20, 30, 0.42);
    font-family: var(--font-body);
}

.login-shell h1,
.login-shell h2,
.login-shell h3,
.login-shell h4,
.login-shell h5 {
    font-family: var(--font-accent);
    letter-spacing: 0.2px;
}

.login-side {
    position: relative;
    overflow: hidden;
    padding: 3rem;
    color: var(--white);
    background:
        linear-gradient(145deg, rgba(4, 34, 48, 0.86), rgba(7, 84, 83, 0.55)),
        url("../img/zanzibar-login-background.jpg") center / cover no-repeat;
}

.login-side::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 12%, rgba(255, 201, 107, 0.17), transparent 24%),
        linear-gradient(180deg, rgba(3, 29, 42, 0.08), rgba(3, 29, 42, 0.5));
}

.login-brand {
    min-height: 100%;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 600px;
}

.login-brand img {
    width: 116px;
    border-radius: 24px;
    background: var(--white);
    padding: 8px;
    margin-bottom: 1.1rem;
}

.login-brand h1 {
    font-size: 2.8rem;
    margin-bottom: 0.5rem;
    color: var(--white);
}

.login-brand p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
}

.login-side .hero-meta {
    display: flex;
    gap: 0.7rem;
    flex-wrap: wrap;
}

.login-side .hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border-radius: 18px !important;
    padding: 0.55rem 0.95rem;
    background: #ffffff !important;
    color: #11273b !important;
    font-size: 0.86rem;
    font-weight: 500;
    box-shadow: none;
    border: none;
    min-height: 42px;
}

.login-side .hero-pill i {
    color: #11273b;
}

.login-main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1.5rem, 4vw, 3rem);
    background: rgba(255, 255, 255, 0.98);
}

.login-card {
    width: 100%;
    max-width: 460px;
    padding: clamp(1rem, 2vw, 1.5rem);
    border-radius: 24px;
    background: #ffffff;
    border: 1px solid rgba(17, 39, 59, 0.07);
    box-shadow: 0 18px 46px rgba(17, 39, 59, 0.08);
}

.login-card h3 {
    margin-bottom: 0.25rem;
}

.helper-text {
    font-size: 0.86rem;
    color: #6d8495;
}

.vortex-screen {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 30% 20%, #174865, #0b2435 58%, #06111a 100%);
    overflow: hidden;
}

.vortex-canvas {
    position: absolute;
    inset: 0;
}

.vortex-content {
    position: relative;
    z-index: 5;
    text-align: center;
    color: var(--white);
    padding: 1.5rem;
}

.vortex-logo {
    width: 112px;
    height: 112px;
    border-radius: 28px;
    background: var(--white);
    object-fit: cover;
    padding: 7px;
    box-shadow: 0 0 45px rgba(30, 168, 231, 0.4);
    animation: vortexLogo 1.1s ease-in-out infinite alternate;
}

.vortex-spinner {
    width: 112px;
    height: 112px;
    border: 4px solid rgba(255, 255, 255, 0.18);
    border-top-color: var(--sky-500);
    border-right-color: var(--gold-400);
    border-radius: 50%;
    margin: 1rem auto 0;
    animation: spin 1.2s linear infinite;
}

.summary-list {
    display: grid;
    gap: 0.75rem;
}

.summary-row {
    display: grid;
    grid-template-columns: minmax(118px, 34%) minmax(0, 1fr);
    align-items: start;
    gap: 0.7rem;
    padding: 0.72rem 0.85rem;
    border-radius: 14px;
    background: #f8fbfd;
    border: 1px solid rgba(17, 39, 59, 0.06);
}

.summary-row span:first-child {
    font-size: 0.83rem;
    font-weight: 700;
    color: var(--ink-500);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.summary-row span:last-child {
    font-weight: 500;
    line-height: 1.55;
    overflow-wrap: anywhere;
    text-align: left;
}

.festival-profile-summary-list .summary-row {
    grid-template-columns: minmax(132px, 30%) minmax(0, 1fr);
}

.festival-profile-summary-list .summary-row span:last-child {
    font-weight: 400;
    line-height: 1.65;
    text-align: justify;
    text-justify: inter-word;
}

.festival-profile-sidecard,
.festival-profile-sidecard .section-lead,
.festival-profile-sidecard .summary-row,
.festival-profile-sidecard .summary-row span:last-child {
    text-align: left;
}

.app-footer {
    margin-top: 1rem;
    padding: 1rem 0 0.25rem;
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    border-top: 1px solid rgba(17, 39, 59, 0.08);
    color: var(--ink-500);
    font-size: 0.84rem;
    text-align: center;
}

.app-footer a {
    color: var(--sea-700);
    font-weight: 700;
    text-decoration: none;
}

.app-footer a:hover,
.app-footer a:focus {
    text-decoration: underline;
}

.sms-setup-card,
.sms-setup-card .section-title,
.sms-setup-card .section-lead,
.sms-setup-card .summary-row,
.sms-setup-card .summary-row span:last-child {
    text-align: left;
}

.sms-setup-list .summary-row {
    grid-template-columns: 44px minmax(0, 1fr);
}

.sms-setup-list .summary-row span:first-child {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(30, 168, 231, 0.12);
    color: var(--sea-700);
    letter-spacing: 0;
}

@keyframes pulseSpin {
    from {
        transform: rotate(0deg) scale(1);
    }
    to {
        transform: rotate(360deg) scale(1.03);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes vortexLogo {
    from {
        transform: scale(0.98);
    }
    to {
        transform: scale(1.04);
    }
}

.ticket-counter-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.ticket-counter-card {
    border: 1px solid rgba(15, 77, 115, 0.12);
    border-radius: 1.2rem;
    padding: 1rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(242, 247, 251, 0.96));
}

.ticket-counter-card__heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.9rem;
}

.ticket-counter-control {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.75rem;
    align-items: center;
}

.ticket-counter-control .form-control {
    text-align: center;
    font-weight: 700;
}

.gate-scan-card {
    position: sticky;
    top: 1rem;
}

.gate-scan-input {
    min-height: 64px;
    border-width: 2px;
    font-size: 1.08rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.gate-scan-input:focus {
    border-color: #16835a;
    box-shadow: 0 0 0 0.25rem rgba(22, 131, 90, 0.14);
}

.gate-scan-result {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.9rem;
    align-items: center;
    min-height: 94px;
    margin-bottom: 1rem;
    padding: 1rem;
    border: 2px solid transparent;
    border-radius: 1.2rem;
    transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.gate-scan-result > i {
    font-size: 2rem;
}

.gate-scan-result strong {
    display: block;
    margin-bottom: 0.15rem;
    font-size: 1rem;
    letter-spacing: 0.04em;
}

.gate-scan-result small {
    display: block;
    margin-top: 0.25rem;
    opacity: 0.76;
}

.gate-scan-result--ready {
    color: #315369;
    background: #f0f6fa;
    border-color: #d5e5ee;
}

.gate-scan-result--success {
    color: #0d5c3e;
    background: #e4f6ed;
    border-color: #65ba91;
    transform: scale(1.01);
}

.gate-scan-result--failure {
    color: #9d2f24;
    background: #fff0ed;
    border-color: #e58b7e;
    transform: scale(1.01);
}

.gate-entry-new {
    animation: gateEntryReveal 420ms ease both;
}

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

.scan-camera-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    background: rgba(10, 18, 28, 0.74);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.scan-camera-modal__dialog {
    width: min(100%, 720px);
    background: #ffffff;
    border-radius: 1.4rem;
    padding: 1rem;
    box-shadow: 0 24px 60px rgba(15, 31, 47, 0.28);
}

.scan-camera-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.9rem;
}

.scan-camera-modal__header h4 {
    margin: 0;
    font-size: 1.05rem;
}

.scan-camera-modal__video {
    width: 100%;
    min-height: 260px;
    border-radius: 1rem;
    background: #0f1720;
    object-fit: cover;
}

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

    .sidebar {
        width: 250px;
    }

    .main-content {
        margin-left: 250px;
        width: calc(100% - 250px);
    }

    .gate-scan-card {
        position: static;
    }

    body.device-nav-mode.sidebar-open {
        overflow: hidden;
    }

    body.device-nav-mode .sidebar {
        width: min(84vw, 320px);
        max-width: 320px;
        transform: translateX(calc(-100% - 1rem));
        transition: transform 0.24s ease, box-shadow 0.24s ease;
        border-radius: 0 24px 24px 0;
        box-shadow: none;
    }

    body.device-nav-mode.sidebar-open .sidebar {
        transform: translateX(0);
        box-shadow: 0 24px 46px rgba(17, 39, 59, 0.22);
    }

    body.device-nav-mode .main-content {
        margin-left: 0;
        width: 100%;
        padding: 0.95rem;
    }

    body.device-nav-mode .sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        border: 0;
        padding: 0;
        background: rgba(10, 22, 35, 0.42);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.24s ease, visibility 0.24s ease;
        z-index: 1030;
    }

    body.device-nav-mode.sidebar-open .sidebar-backdrop {
        opacity: 1;
        visibility: visible;
    }

    body.device-nav-mode .sidebar-toggle {
        display: inline-flex;
    }

    body.device-nav-mode .collapsed-home-shortcut {
        display: none !important;
    }
}

@media (max-width: 992px) {
    .topbar {
        align-items: stretch;
        flex-wrap: wrap;
    }

    .topbar-heading {
        flex: 1 1 220px;
    }

    .topbar-title {
        min-width: 0;
    }

    .topbar-search {
        width: 100%;
        max-width: none;
        flex: 1 1 100%;
        order: 3;
    }

    .topbar-controls {
        flex: 0 1 auto;
        justify-content: flex-end;
        width: auto;
    }

    .summary-metrics,
    .quick-status-row,
    .dashboard-bottom-grid {
        grid-template-columns: 1fr;
    }

    .booth-filter-bar {
        grid-template-columns: 1fr 1fr;
    }

    .countdown-banner {
        flex-direction: column;
    }

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

    .panel-card__header,
    .workflow-row,
    .booth-toolbar,
    .booth-zone-card__header {
        flex-direction: column;
        align-items: stretch;
    }

    .workflow-row__actions {
        width: 100%;
    }

    .workflow-row__actions .btn,
    .booth-view-switch .btn {
        flex: 1 1 180px;
    }

    .timeline-compact__item {
        grid-template-columns: auto 1fr;
    }

    .timeline-compact__item time {
        grid-column: 2;
        margin-top: -0.25rem;
    }

    .rail-feed__item--stacked {
        grid-template-columns: 1fr;
    }

    .rail-feed__time {
        margin-left: 0;
    }

    .toolbar form.row.g-2 {
        width: 100%;
        margin: 0;
    }

    .toolbar form.row.g-2 > [class*="col-"],
    .toolbar form.row.g-2 > .col,
    .toolbar form.row.g-2 > .col-auto {
        width: 100%;
        flex: 0 0 100%;
    }

    .toolbar form.row.g-2 .form-control,
    .toolbar form.row.g-2 .form-select,
    .toolbar form.row.g-2 .btn {
        width: 100%;
    }

    .login-shell {
        grid-template-columns: 1fr;
        min-height: auto;
        margin: 3.25rem 0 0;
    }

    .login-side {
        min-height: 340px;
        padding: 2rem 1.4rem;
    }

    .login-brand h1 {
        font-size: clamp(2rem, 5vw, 2.5rem);
    }

    .user-chip {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .topbar {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        padding: 0.9rem;
    }

    .topbar-heading {
        width: 100%;
    }

    .topbar-title {
        flex: 1 1 auto;
    }

    .topbar-title h2 {
        overflow-wrap: normal;
        word-break: normal;
    }

    .topbar-search {
        order: initial;
    }

    .topbar-controls {
        display: grid;
        grid-template-columns: 42px 58px minmax(0, 1fr) 42px;
        width: 100%;
        gap: 0.55rem;
        justify-content: stretch;
    }

    .ticket-counter-grid {
        grid-template-columns: 1fr;
    }

    .compact-language-switch {
        order: initial;
    }

    .notification-chip {
        order: initial;
    }

    .user-chip {
        width: 100%;
        min-width: 0;
        overflow: hidden;
        order: initial;
        flex: initial;
        border-radius: 18px;
    }

    .user-chip > div {
        min-width: 0;
    }

    .user-chip strong,
    .user-chip small {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .topbar-controls > .icon-action {
        order: initial;
    }

    .countdown-banner,
    .panel-card,
    .rail-card,
    .table-card,
    .section-card,
    .hero-card,
    .timeline-card {
        border-radius: 18px;
    }

    .booth-slot-grid {
        grid-template-columns: 1fr;
    }

    .metric-summary-card__meta,
    .festival-mini__meta {
        gap: 0.5rem;
    }
}

@media (max-width: 576px) {
    .main-content,
    .login-side,
    .login-main {
        padding: 1rem;
    }

    .brand-card {
        padding: 0.8rem;
    }

    .brand-card h1 {
        font-size: 1rem;
    }

    .brand-card p {
        font-size: 0.76rem;
    }

    .topbar-controls {
        justify-content: stretch;
    }

    .topbar h2 {
        font-size: 1.08rem;
    }

    .topbar-kicker {
        font-size: 0.72rem;
    }

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

    .countdown-banner__foot {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.3rem;
    }

    .booth-filter-bar {
        grid-template-columns: 1fr;
    }

    .quick-status {
        padding: 0.85rem 0.9rem;
    }

    .timeline-compact__item {
        gap: 0.55rem;
        padding: 0.8rem;
    }

    .panel-card,
    .rail-card,
    .table-card {
        padding: 0.9rem;
    }

    .login-card {
        padding: 1.15rem;
        border-radius: 22px;
    }

    .login-page,
    .public-portal-body,
    .self-service-page {
        background-attachment: scroll;
    }

    .login-page {
        place-items: start center;
        padding: 0.65rem;
    }

    .login-shell {
        margin-top: 3.15rem;
        border-radius: 22px;
    }

    .login-side {
        min-height: auto;
        padding: 1.1rem 1rem;
    }

    .login-side .hero-pill {
        width: 100%;
        justify-content: flex-start;
        min-height: 36px;
        padding: 0.45rem 0.65rem;
        font-size: 0.77rem;
    }

    .login-brand img {
        width: 70px;
        margin-bottom: 0.65rem;
    }

    .login-brand h1 {
        font-size: 1.55rem;
        line-height: 1.08;
    }

    .login-brand p {
        display: none;
    }

    .login-side .hero-meta {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.45rem;
        margin-top: 0.8rem !important;
    }

    .login-side .hero-pill:last-child {
        grid-column: 1 / -1;
    }

    .public-verification-actions {
        align-items: stretch;
        flex-direction: column;
        text-align: center;
    }

    .management-table,
    .table-responsive > .table,
    .table-responsive table {
        min-width: 640px;
    }
}

/* Booth map -------------------------------------------------------------- */
/* The picker uses the tokens already defined above: no new greys, shadows or
   radii, and the same 0.16-0.24s easing as .menu-link and .icon-action. */

.booth-map {
    width: 100%;
    height: auto;
    display: block;
    font-family: inherit;
}

.tent-card {
    cursor: pointer;
    transition: opacity 0.18s ease, transform 0.18s ease;
    transform-box: fill-box;
    transform-origin: center;
}

.tent-card:hover rect,
.tent-card:focus-visible rect {
    opacity: 0.88;
}

.tent-card:focus-visible {
    outline: 2px solid #0f7da8;
    outline-offset: 2px;
}

.booth .booth-cell {
    fill: #ffffff;
    stroke: #1ea672;
    stroke-width: 0.12;
    transition: fill 0.16s ease, stroke 0.16s ease;
}

.booth .booth-code {
    fill: #12303f;
    pointer-events: none;
}

.booth:not(.is-locked) {
    cursor: pointer;
}

.booth:not(.is-locked):hover .booth-cell {
    fill: #eaf7f1;
}

.booth.is-selected .booth-cell {
    fill: #f7d089;
    stroke: #8b6418;
    stroke-width: 0.2;
}

.booth.is-allocated .booth-cell {
    fill: #edf2f5;
    stroke: #cfdae1;
}

.booth.is-allocated .booth-code,
.booth.is-reserved .booth-code {
    fill: #7d8ca3;
}

.booth.is-reserved .booth-cell {
    fill: #fbe1e1;
    stroke: #dda9a9;
}

.booth.is-locked {
    cursor: not-allowed;
}

.booth:focus-visible {
    outline: 2px solid #0f7da8;
    outline-offset: 1px;
}

.map-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    align-items: center;
    font-size: 0.82rem;
    color: #5a7683;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.legend-sw {
    display: inline-block;
    width: 0.85rem;
    height: 0.85rem;
    border-radius: 0.25rem;
    border: 1px solid rgba(18, 48, 63, 0.16);
    flex: none;
}

.zone-toggle {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.zone-chip {
    border: 1px solid transparent;
    background: color-mix(in srgb, var(--chip, #7d8ca3) 14%, #ffffff);
    color: #12303f;
    cursor: pointer;
    transition: opacity 0.16s ease, background 0.16s ease;
}

.zone-chip::before {
    content: "";
    display: inline-block;
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 50%;
    background: var(--chip, #7d8ca3);
    margin-right: 0.4rem;
    vertical-align: -1px;
}

.zone-chip.is-off {
    opacity: 0.42;
    background: #eef3f6;
}

.map-tip {
    position: fixed;
    z-index: 1080;
    max-width: 17rem;
    padding: 0.6rem 0.75rem;
    border-radius: 0.6rem;
    background: #12303f;
    color: #ffffff;
    font-size: 0.78rem;
    line-height: 1.45;
    pointer-events: none;
    box-shadow: 0 12px 28px rgba(18, 48, 63, 0.22);
}

.map-side {
    position: sticky;
    top: 1rem;
}

.fee-box {
    background: #f7fbfc;
    border: 1px solid #e2ecf0;
    border-radius: 0.6rem;
    padding: 0.65rem 0.8rem;
}

.fee-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.85rem;
    padding: 0.18rem 0;
}

.fee-row.fee-total {
    border-top: 1px solid #d9e7ec;
    margin-top: 0.35rem;
    padding-top: 0.45rem;
    font-weight: 700;
    color: #0f4d73;
}

/* The same page doubles as the printed allocation sheet. */
@media print {
    @page {
        size: A3 landscape;
        margin: 12mm;
    }

    .sidebar,
    .topbar,
    .app-footer,
    .zone-toggle,
    .map-tip,
    .map-side,
    .btn {
        display: none !important;
    }

    .booth-map {
        page-break-inside: avoid;
    }
}

/* Strategic tier badges: gold for the best pitches, muted for the rest. */
.badge-soft.tier-prime {
    background: #fbf1d8;
    color: #8b6418;
}

.badge-soft.tier-standard {
    background: #eef3f6;
    color: #50627c;
}

.badge-soft.tier-value {
    background: #e8eef4;
    color: #6b7f96;
}
