html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.loading-progress {
    position: absolute;
    display: block;
    width: 8rem;
    height: 8rem;
    inset: 20vh 0 auto 0;
    margin: 0 auto 0 auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

code {
    color: #c02d76;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

:root {
    --app-background: #f4f6f8;
    --app-surface: #ffffff;
    --app-border: #dfe4e8;
    --app-text: #1d2733;
    --app-muted: #647180;
    --app-primary: #176b5b;
    --app-primary-hover: #105447;
    --app-soft-primary: #e7f4f0;
    --app-radius: 14px;
    --app-shadow: 0 8px 24px rgba(29, 39, 51, 0.08);
}

html,
body {
    background: var(--app-background);
    color: var(--app-text);
}

.page-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 2rem;
}

    .page-heading h1 {
        margin: 0.2rem 0 0.6rem;
        font-size: clamp(2rem, 5vw, 3rem);
        line-height: 1.1;
    }

.eyebrow {
    margin: 0;
    color: var(--app-primary);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.lead {
    max-width: 720px;
    margin: 0;
    color: var(--app-muted);
    font-size: 1.08rem;
    line-height: 1.6;
}

.content-card {
    padding: 1.5rem;
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    box-shadow: var(--app-shadow);
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-bottom: 1.5rem;
}

.filter-button {
    padding: 0.55rem 1rem;
    background: var(--app-surface);
    color: var(--app-text);
    border: 1px solid var(--app-border);
    border-radius: 999px;
    font-weight: 600;
}

    .filter-button:hover,
    .filter-button.active {
        background: var(--app-soft-primary);
        color: var(--app-primary);
        border-color: var(--app-primary);
    }

.empty-state {
    padding: clamp(2rem, 8vw, 5rem);
    text-align: center;
    background: var(--app-surface);
    border: 1px dashed var(--app-border);
    border-radius: var(--app-radius);
}

.empty-state-icon {
    margin-bottom: 1rem;
    font-size: 3rem;
}

.empty-state h2 {
    margin-bottom: 0.6rem;
}

.empty-state p {
    margin: 0 auto 1.5rem;
    color: var(--app-muted);
}

.btn-primary {
    background-color: var(--app-primary);
    border-color: var(--app-primary);
}

    .btn-primary:hover,
    .btn-primary:focus {
        background-color: var(--app-primary-hover);
        border-color: var(--app-primary-hover);
    }

.food-request-text {
    white-space: pre-line;
}

@media (max-width: 700px) {
    .page-heading {
        flex-direction: column;
    }

        .page-heading .btn {
            width: 100%;
        }
}

.deadline-countdown {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    font-size: 0.92rem;
    font-weight: 600;
}

.deadline-open {
    background: #e7f4f0;
    color: #176b5b;
}

.deadline-closing-soon {
    background: #fff3cd;
    color: #664d03;
}

.deadline-closed {
    background: #e9ecef;
    color: #495057;
}

.deadline-status {
    font-weight: 700;
}

.deadline-time {
    white-space: nowrap;
}

.deadline-separator {
    opacity: 0.65;
}

/* Order cards */

.order-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
    overflow: hidden;
}

.order-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
}

.order-card-heading {
    min-width: 0;
}

    .order-card-heading .eyebrow {
        margin-bottom: 0.25rem;
    }

    .order-card-heading h2,
    .order-card-heading h3 {
        margin: 0;
        overflow-wrap: anywhere;
    }

.order-card-organiser {
    margin: 0;
    color: var(--app-muted);
    font-size: 0.95rem;
}

    .order-card-organiser strong {
        color: var(--app-text);
        font-weight: 650;
    }

/* The most important, frequently scanned order information. */

.order-card-key-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.order-card-key-fact {
    min-width: 0;
    padding: 0.85rem 0.9rem;
    background: #f8fafb;
    border: 1px solid var(--app-border);
    border-radius: 0.75rem;
}

.order-card-key-fact--deadline {
    grid-column: 1 / -1;
    background: var(--app-soft-primary);
    border-color: #b9ddd4;
}

.order-card-key-label {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--app-muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    line-height: 1.25;
    text-transform: uppercase;
}

.order-card-key-value {
    display: block;
    color: var(--app-text);
    font-size: 1.08rem;
    font-weight: 700;
    line-height: 1.3;
}

.order-card-key-supporting {
    display: block;
    margin-top: 0.25rem;
    color: var(--app-muted);
    font-size: 0.84rem;
    line-height: 1.4;
}

.order-card-key-fact .deadline-countdown {
    margin-top: 0.15rem;
}

/* Less important details remain semantic but use a compact layout. */

.order-card-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    margin: 0;
    border-top: 1px solid var(--app-border);
}

.order-card-detail {
    min-width: 0;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--app-border);
}

    .order-card-detail:nth-child(odd) {
        padding-right: 0.75rem;
    }

    .order-card-detail:nth-child(even) {
        padding-left: 0.75rem;
    }

    .order-card-detail dt {
        margin: 0 0 0.2rem;
        color: var(--app-muted);
        font-size: 0.78rem;
        font-weight: 600;
    }

    .order-card-detail dd {
        margin: 0;
        color: var(--app-text);
        font-weight: 650;
        overflow-wrap: anywhere;
    }

.order-card-arrival {
    margin: 0;
    border-radius: 0.75rem;
}

.order-card-supporting-content {
    display: grid;
    gap: 0.65rem;
}

    .order-card-supporting-content p {
        margin: 0;
    }

.order-card-notes {
    padding: 0.8rem 0.9rem;
    background: #f8fafb;
    border-left: 3px solid var(--app-border);
    border-radius: 0 0.6rem 0.6rem 0;
    color: var(--app-muted);
    line-height: 1.5;
    white-space: pre-line;
}

.order-card-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.order-card-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: auto;
    padding-top: 0.25rem;
}

    .order-card-footer .btn {
        min-width: 8rem;
    }

/* Completed and cancelled history cards */

.history-order-card {
    position: relative;
    border-left-width: 4px;
}

.history-order-card--completed {
    border-left-color: #198754;
    background: linear-gradient( 135deg, rgba(25, 135, 84, 0.055), var(--app-surface) 42% );
}

.history-order-card--cancelled {
    border-left-color: #b02a37;
    background: linear-gradient( 135deg, rgba(176, 42, 55, 0.045), var(--app-surface) 42% );
}

.history-card-status {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.history-card-status-icon {
    display: inline-grid;
    place-items: center;
    width: 1.35rem;
    height: 1.35rem;
    flex: 0 0 auto;
    border-radius: 50%;
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1;
}

.history-order-card--completed .history-card-status-icon {
    background: #d1e7dd;
    color: #0f5132;
}

.history-order-card--cancelled .history-card-status-icon {
    background: #f8d7da;
    color: #842029;
}

.history-card-outcome {
    padding: 0.85rem 0.9rem;
    border-radius: 0.75rem;
}

.history-order-card--completed .history-card-outcome {
    background: #eaf7f0;
    color: #145c37;
}

.history-order-card--cancelled .history-card-outcome {
    background: #f8f1f2;
    color: #6c343a;
}

/* Realtime is primary; manual Refresh is a quiet fallback. */

.page-refresh {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    width: auto;
    padding: 0.35rem 0.55rem;
    color: var(--app-muted);
    border: 0;
    border-radius: 0.5rem;
    background: transparent;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
}

    .page-refresh:hover,
    .page-refresh:focus-visible {
        color: var(--app-primary);
        background: var(--app-soft-primary);
    }

    .page-refresh:disabled {
        color: var(--app-muted);
        background: transparent;
        opacity: 0.65;
    }

/* Loading placeholders */

.order-card-skeleton-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
    gap: 1.5rem;
}

.order-card-skeleton {
    display: grid;
    gap: 1rem;
    min-height: 20rem;
}

.skeleton-line,
.skeleton-block {
    position: relative;
    overflow: hidden;
    background: #e7ebee;
    border-radius: 0.4rem;
}

    .skeleton-line::after,
    .skeleton-block::after {
        position: absolute;
        inset: 0;
        background: linear-gradient( 90deg, transparent, rgba(255, 255, 255, 0.72), transparent );
        content: "";
        transform: translateX(-100%);
        animation: order-card-skeleton-shimmer 1.4s ease-in-out infinite;
    }

.skeleton-line {
    width: 100%;
    height: 0.85rem;
}

.skeleton-line--eyebrow {
    width: 28%;
    height: 0.65rem;
}

.skeleton-line--title {
    width: 62%;
    height: 1.5rem;
}

.skeleton-line--short {
    width: 42%;
}

.skeleton-line--medium {
    width: 68%;
}

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

.skeleton-block {
    min-height: 4.6rem;
}

.skeleton-block--wide {
    grid-column: 1 / -1;
    min-height: 5.25rem;
}

.skeleton-action {
    width: 8rem;
    height: 2.35rem;
    margin-top: auto;
    margin-left: auto;
}

@keyframes order-card-skeleton-shimmer {
    100% {
        transform: translateX(100%);
    }
}

/* Order-card responsive behaviour */

@media (max-width: 575.98px) {
    .order-card-key-facts,
    .order-card-details,
    .skeleton-facts {
        grid-template-columns: 1fr;
    }

    .order-card-key-fact--deadline,
    .skeleton-block--wide {
        grid-column: auto;
    }

    .order-card-detail:nth-child(odd),
    .order-card-detail:nth-child(even) {
        padding-right: 0;
        padding-left: 0;
    }

    .order-card-footer {
        align-items: stretch;
        flex-direction: column;
    }

        .order-card-footer .btn {
            width: 100%;
        }
}

@media (max-width: 700px) {
    .page-heading .page-refresh {
        align-self: flex-start;
        width: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .skeleton-line::after,
    .skeleton-block::after {
        animation: none;
    }
}

.order-activity-list {
    display: flex;
    flex-direction: column;
}

.order-activity-item {
    position: relative;
    display: grid;
    grid-template-columns: 16px 1fr;
    gap: 0.75rem;
    padding: 0 0 1.25rem;
}

    .order-activity-item:last-child {
        padding-bottom: 0;
    }

    .order-activity-item:not(:last-child)::before {
        position: absolute;
        top: 14px;
        bottom: 0;
        left: 5px;
        width: 2px;
        background: var(--app-border);
        content: "";
    }

.order-activity-marker {
    position: relative;
    z-index: 1;
    width: 12px;
    height: 12px;
    margin-top: 0.3rem;
    background: var(--app-primary);
    border: 2px solid var(--app-surface);
    border-radius: 50%;
    box-shadow: 0 0 0 1px var(--app-border);
}

.notification-centre {
    position: relative;
}

    .notification-centre > summary {
        list-style: none;
    }

        .notification-centre > summary::-webkit-details-marker {
            display: none;
        }

.notification-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.15rem;
}

    .notification-button:hover {
        background: var(--app-soft-primary);
        border-color: var(--app-primary);
    }

    .notification-button:focus-visible {
        outline: 3px solid #258cfb;
        outline-offset: 3px;
    }

    .notification-centre[open] .notification-button {
        background: var(--app-soft-primary);
        border-color: var(--app-primary);
    }

.notification-count {
    position: absolute;
    top: -0.35rem;
    right: -0.35rem;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 0.3rem;
    background: #dc3545;
    color: #fff;
    border: 2px solid var(--app-background);
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1rem;
    text-align: center;
}

.notification-panel {
    position: absolute;
    top: calc(100% + 0.75rem);
    right: 0;
    z-index: 1050;
    display: flex;
    width: min(390px, calc(100vw - 2rem));
    max-height: min(680px, calc(100dvh - 6rem));
    overflow: hidden;
    flex-direction: column;
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    box-shadow: var(--app-shadow);
}

.notification-header,
.notification-footer {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1rem;
}

.notification-header {
    border-bottom: 1px solid var(--app-border);
}

.notification-footer {
    border-top: 1px solid var(--app-border);
}

.notification-list {
    min-height: 0;
    max-height: 430px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.notification-group-title {
    position: sticky;
    top: 0;
    z-index: 1;
    margin: 0;
    padding: 0.5rem 1rem;
    background: #f7f9fa;
    color: var(--app-muted);
    border-bottom: 1px solid var(--app-border);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.notification-item {
    position: relative;
    display: grid;
    width: 100%;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.75rem;
    align-items: start;
    padding: 0.9rem 1rem;
    background: var(--app-surface);
    color: var(--app-text);
    border: 0;
    border-bottom: 1px solid var(--app-border);
    text-align: left;
}

    .notification-item:hover {
        background: #f7f9fa;
    }

    .notification-item:focus-visible {
        z-index: 2;
        outline: 3px solid #258cfb;
        outline-offset: -3px;
    }

.notification-item-unread {
    background: var(--app-soft-primary);
}

.notification-item-icon {
    display: inline-flex;
    width: 2rem;
    height: 2rem;
    align-items: center;
    justify-content: center;
    background: var(--app-surface);
    color: var(--app-primary);
    border: 1px solid var(--app-border);
    border-radius: 50%;
    font-size: 0.95rem;
}

.notification-item-content {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 0.2rem;
}

.notification-item-title {
    display: -webkit-box;
    overflow: hidden;
    font-weight: 700;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.notification-item-message {
    display: -webkit-box;
    overflow: hidden;
    font-size: 0.92rem;
    line-height: 1.4;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.notification-item-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem 0.75rem;
    margin-top: 0.2rem;
}

.notification-item-time {
    color: var(--app-muted);
    font-size: 0.78rem;
}

.notification-item-open {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--app-primary);
    font-size: 0.8rem;
    font-weight: 700;
}

.notification-unread-marker {
    width: 0.65rem;
    height: 0.65rem;
    margin-top: 0.35rem;
    background: var(--app-primary);
    border: 2px solid var(--app-surface);
    border-radius: 50%;
    box-shadow: 0 0 0 1px var(--app-primary);
}

.notification-empty {
    padding: 2rem 1rem;
    color: var(--app-muted);
    text-align: center;
}

.notification-skeleton {
    padding: 0.25rem 0;
}

.notification-skeleton-item {
    display: grid;
    grid-template-columns: 2rem minmax(0, 1fr);
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    border-bottom: 1px solid var(--app-border);
}

.notification-skeleton-icon,
.notification-skeleton-line {
    background: linear-gradient( 90deg, #edf0f2 25%, #f7f9fa 50%, #edf0f2 75% );
    background-size: 200% 100%;
    animation: notification-skeleton-shimmer 1.4s ease-in-out infinite;
}

.notification-skeleton-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
}

.notification-skeleton-content {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 0.45rem;
}

.notification-skeleton-line {
    width: 100%;
    height: 0.7rem;
    border-radius: 999px;
}

.notification-skeleton-title {
    width: 58%;
    height: 0.85rem;
}

.notification-skeleton-short {
    width: 35%;
}

@keyframes notification-skeleton-shimmer {
    from {
        background-position: 200% 0;
    }

    to {
        background-position: -200% 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .notification-skeleton-icon,
    .notification-skeleton-line {
        animation: none;
    }
}

@media (max-width: 640.98px) {
    .notification-panel {
        position: fixed;
        top: calc(4rem + env(safe-area-inset-top));
        right: max(0.75rem, env(safe-area-inset-right));
        bottom: max(0.75rem, env(safe-area-inset-bottom));
        left: max(0.75rem, env(safe-area-inset-left));
        width: auto;
        max-height: none;
    }

    .notification-header,
    .notification-footer {
        flex-wrap: wrap;
        gap: 0.5rem 0.75rem;
    }

    .notification-list {
        flex: 1 1 auto;
        max-height: none;
    }

    .notification-item {
        padding: 0.85rem 0.8rem;
    }

    .notification-footer > * {
        max-width: 100%;
    }
}

/* Existing final styles remain above this point. */

.auth-page {
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background: linear-gradient( 135deg, #f7f9fa 0%, #eef4f2 100% );
}

.auth-card {
    width: min(100%, 460px);
    padding: 2rem;
    background: var(--app-surface, #fff);
    border: 1px solid var(--app-border, #dee2e6);
    border-radius: var(--app-radius, 0.75rem);
    box-shadow: var( --app-shadow, 0 0.5rem 2rem rgba(0, 0, 0, 0.08) );
}

.auth-captcha {
    min-height: 70px;
}

.auth-privacy-link {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.9rem;
}

.privacy-page {
    min-height: 100vh;
    padding: clamp(1rem, 4vw, 3rem);
    background: linear-gradient(135deg, #f7f9fa 0%, #eef4f2 100%);
}

.privacy-card {
    width: min(100%, 780px);
    margin: 0 auto;
    padding: clamp(1.25rem, 4vw, 3rem);
    background: var(--app-surface, #fff);
    border: 1px solid var(--app-border, #dee2e6);
    border-radius: var(--app-radius, 0.75rem);
    box-shadow: var(--app-shadow, 0 0.5rem 2rem rgba(0, 0, 0, 0.08));
}

.privacy-card h2 {
    margin-top: 2rem;
    font-size: 1.25rem;
}

.privacy-card li + li {
    margin-top: 0.45rem;
}

.privacy-updated {
    color: var(--app-muted, #647180);
    font-size: 0.9rem;
}

.privacy-return {
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--app-border, #dee2e6);
}

.auth-code-input {
    min-height: 3.75rem;
    padding: 0.75rem 1rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: clamp(1.35rem, 5vw, 1.75rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.45rem;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

    .auth-code-input::placeholder {
        color: var(--app-muted);
        opacity: 0.45;
    }

    .auth-code-input:disabled {
        cursor: not-allowed;
    }

/* Invite-only authentication states */

.auth-spinner {
    width: 2rem;
    height: 2rem;
    margin: 0 auto 1rem;
    border: 0.2rem solid var(--app-border);
    border-top-color: var(--app-primary);
    border-radius: 50%;
    animation: auth-spinner-rotate 0.8s linear infinite;
}

@keyframes auth-spinner-rotate {
    to {
        transform: rotate(360deg);
    }
}

.invite-card h1 {
    margin-top: 0.35rem;
    margin-bottom: 1rem;
}

.invite-icon {
    display: grid;
    width: 3.5rem;
    height: 3.5rem;
    margin: 0 auto 1rem;
    place-items: center;
    background: var(--app-soft-primary);
    color: var(--app-primary);
    border-radius: 50%;
    font-size: 1.65rem;
    font-weight: 700;
}

.invite-email {
    margin: 1.25rem 0;
    padding: 0.8rem 1rem;
    overflow-wrap: anywhere;
    background: var(--app-background);
    border: 1px solid var(--app-border);
    border-radius: 0.65rem;
    font-weight: 700;
}

/* Eight-digit sign-in code */

.otp-input-shell {
    position: relative;
    width: 100%;
    margin-bottom: 0.25rem;
}

.otp-native-input {
    position: absolute;
    inset: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    opacity: 0.01;
    cursor: text;
}

    .otp-native-input:disabled {
        cursor: not-allowed;
    }

.otp-boxes {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 0.4rem;
    width: 100%;
}

.otp-box {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    height: 3.5rem;
    border: 1px solid #ced4da;
    border-radius: 0.5rem;
    background-color: #ffffff;
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out, background-color 0.15s ease-in-out;
}

.otp-box-filled {
    background-color: #f8f9fa;
}

.otp-input-shell:focus-within .otp-box-current {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.2);
}

.otp-native-input:disabled + .otp-boxes .otp-box {
    background-color: #e9ecef;
    opacity: 0.75;
}

@media (max-width: 480px) {
    .otp-boxes {
        gap: 0.2rem;
    }

    .otp-box {
        height: 3rem;
        font-size: 1.25rem;
        border-radius: 0.375rem;
    }
}

/* Sign-in code countdown */

.auth-code-status {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.auth-code-expiry {
    font-size: 0.92rem;
}

    .auth-code-expiry strong {
        font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
        font-size: 1rem;
        font-variant-numeric: tabular-nums;
    }

.auth-code-expired {
    font-weight: 700;
}

.auth-code-input:disabled {
    background-color: #f1f3f5;
    color: var(--app-muted);
}
