:root {
    --type-body: 1rem;
    --type-small: 0.875rem;
    --type-h1: 2rem;
    --type-h2: 1.5rem;
    --type-h3: 1.25rem;
    --type-line-height: 1.5;
    --type-heading-line-height: 1.25;
    --type-body-weight: 400;
    --type-emphasis-weight: 600;
    --type-heading-weight: 700;
    --focus-ring-color: #0b5ed7;
    --focus-ring-shadow: rgba(11, 94, 215, 0.3);
}

body {
    font-size: var(--type-body);
    line-height: var(--type-line-height);
    font-weight: var(--type-body-weight);
}

h1,
.type-h1 {
    font-size: var(--type-h1);
    line-height: var(--type-heading-line-height);
    font-weight: var(--type-heading-weight);
}

h2,
.type-h2 {
    font-size: var(--type-h2);
    line-height: var(--type-heading-line-height);
    font-weight: var(--type-heading-weight);
}

h3,
.type-h3 {
    font-size: var(--type-h3);
    line-height: var(--type-heading-line-height);
    font-weight: var(--type-heading-weight);
}

small,
.small {
    font-size: var(--type-small);
    line-height: 1.4;
}

.type-body {
    font-size: var(--type-body);
    line-height: var(--type-line-height);
    font-weight: var(--type-body-weight);
}

.bg-arc {
    background-color: rgb(230, 49, 46)
}

.app-navbar-wrap {
    padding: 0.6rem 0.2rem 0;
}

.app-navbar {
    background: linear-gradient(135deg, #ffffff 0%, #f3f8ff 100%);
    border: 1px solid #d7e5f5;
    border-radius: 14px;
    box-shadow: 0 10px 22px rgba(10, 49, 98, 0.08);
    padding: 0.6rem 0.75rem;
}

.app-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: #1b2838;
}

.app-brand:hover,
.app-brand:focus {
    color: #102338;
}

.app-brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: #1d6fd2;
    border: 1px solid #1457a8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 0.95rem;
}

.app-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.app-brand-title {
    font-size: 1rem;
    font-weight: 700;
    color: #2a1e1e;
}

.app-brand-subtitle {
    font-size: 0.76rem;
    color: #5d6f84;
}

.app-navbar .navbar-toggler {
    border: 1px solid #b9cfe8;
    border-radius: 10px;
    background: #fff;
}

.app-navbar .navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(29, 111, 210, 0.25);
}

.app-nav-links {
    margin-top: 0.7rem;
    gap: 0.45rem;
}

.app-nav-link {
    border: 1px solid #c9d8ea;
    border-radius: 999px;
    color: #223243;
    padding: 0.35rem 0.85rem !important;
    font-weight: 600;
    background: #ffffff;
    transition: all 0.15s ease-in-out;
}

.app-nav-link:hover,
.app-nav-link:focus {
    color: #173450;
    border-color: #98bbdf;
    background: #eff6ff;
}

.app-nav-link.is-active {
    background: #1d6fd2;
    border-color: #1457a8;
    color: #ffffff;
}

.app-nav-link-logout {
    border-color: #e3a6ad;
    color: #7f2830;
    background: #fff8f8;
}

.app-nav-link-logout:hover,
.app-nav-link-logout:focus {
    border-color: #d99197;
    color: #651d24;
    background: #ffeef0;
}

.app-user-pill {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem 0.6rem;
    border: 1px solid #d4e2f2;
    border-radius: 999px;
    background: #f6faff;
    padding: 0.32rem 0.72rem;
}

.app-user-name {
    font-weight: 700;
    color: #1f2d3d;
}

.app-user-level-badge {
    font-size: 0.76rem;
    border: 1px solid #b8ccea;
    color: #1e4e82;
    border-radius: 999px;
    padding: 0.08rem 0.42rem;
    font-weight: 600;
}

.app-user-airkey {
    font-size: 0.76rem;
    border: 1px solid #f2d18a;
    color: #7a4f01;
    background: #fff8e8;
    border-radius: 999px;
    padding: 0.08rem 0.42rem;
}

.app-navbar .navbar-collapse {
    margin-top: 0.65rem;
    padding-top: 0.7rem;
    border-top: 1px solid #dce8f5;
}

.app-nav-links .nav-item {
    width: 100%;
}

.app-nav-links .app-nav-link {
    display: inline-flex;
    justify-content: center;
    width: 100%;
}

.app-nav-links .app-user-pill {
    width: 100%;
    justify-content: center;
}

.auth-layout {
    background: linear-gradient(180deg, #f4f8fd 0%, #eef3f9 100%);
}

.auth-container {
    padding-top: 0.9rem;
    padding-bottom: 1rem;
}

.auth-content {
    max-width: 700px;
}

.auth-shell {
    max-width: 560px;
}

.auth-brand-link {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    text-decoration: none;
    margin-bottom: 0.95rem;
}

.auth-brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #1d6fd2;
    border: 1px solid #1457a8;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.auth-brand-title {
    color: #1d2e42;
    font-weight: 700;
    line-height: 1.1;
}

.auth-brand-subtitle {
    color: #5e6f82;
    font-size: 0.86rem;
}

.auth-card {
    background: #ffffff;
    border: 1px solid #d8e4f2;
    border-radius: 14px;
    padding: 1rem;
}

.auth-card-head {
    margin-bottom: 0.85rem;
}

.auth-card-title {
    font-size: 1.25rem;
    margin-bottom: 0.2rem;
    color: #1d2e42;
}

.auth-card-subtitle {
    margin: 0;
    color: #607489;
    font-size: 0.92rem;
}

.auth-help {
    margin-top: 0.6rem;
    color: #607489;
    font-size: 0.88rem;
}

.auth-form-actions {
    margin-top: 0.9rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
}

.auth-link-secondary {
    font-size: 0.9rem;
}

.app-footer-wrap {
    padding: 0 0.75rem 0.9rem;
}

.app-footer {
    border: 1px solid #d7e5f5;
    background: linear-gradient(135deg, #ffffff 0%, #f4f9ff 100%);
    border-radius: 12px;
    text-align: center;
    padding: 0.85rem 0.9rem;
}

.app-footer-line {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.42rem;
    font-weight: 700;
    color: #23384d;
}

.app-footer-line i {
    color: #1d6fd2;
}

.app-footer-sep {
    color: #90a3b5;
    font-weight: 600;
}

@media (min-width: 992px) {
    .app-navbar-wrap {
        padding-top: 0.8rem;
    }

    .app-navbar .navbar-collapse {
        margin-top: 0;
        padding-top: 0;
        border-top: 0;
    }

    .app-nav-links {
        margin-top: 0;
        gap: 0;
    }

    .app-nav-links .nav-item {
        width: auto;
    }

    .app-nav-links .app-nav-link {
        width: auto;
    }

    .app-nav-links .app-user-pill {
        width: auto;
    }

    .app-footer-wrap {
        padding-bottom: 1.1rem;
    }
}

@media (max-width: 576px) {
    .auth-card {
        padding: 0.85rem;
    }

    .auth-brand-title {
        font-size: 0.98rem;
    }

    .auth-brand-subtitle {
        font-size: 0.8rem;
    }
}

.home-page .home-section {
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 14px;
    padding: 0.9rem;
}

.home-page .home-section-header {
    margin-bottom: 1.15rem;
}

.home-page .home-section-kicker {
    font-size: var(--type-small);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #4f5f70;
    font-weight: var(--type-emphasis-weight);
}

.home-page .home-section-title {
    font-size: var(--type-h2);
    line-height: var(--type-heading-line-height);
    font-weight: var(--type-heading-weight);
    color: #212529;
}

.home-page .home-section-subtitle {
    margin-top: 0.35rem;
    color: #4f5f70;
    font-size: var(--type-small);
}

.home-live-stack {
    display: grid;
    gap: 0.75rem;
}

.home-status-alert {
    border-width: 1px;
    border-radius: 12px;
}

.home-status-checkin {
    background: linear-gradient(135deg, #fff8e8 0%, #fff2c9 100%);
}

.home-status-open {
    background: linear-gradient(135deg, #ebf8ef 0%, #dff4e7 100%);
}

.home-status-closed {
    background: linear-gradient(135deg, #fdecee 0%, #f9e1e4 100%);
}

.home-checkin-btn {
    min-width: 110px;
    font-weight: 700;
}

.home-page .alert:last-child {
    margin-bottom: 0;
}

.home-page .alert {
    font-size: var(--type-body);
    line-height: var(--type-line-height);
}

.home-page .alert.alert-success {
    color: #0f5132;
}

.home-page .alert.alert-warning {
    color: #664d03;
}

.home-page .alert .alert-heading {
    font-size: var(--type-h3);
    line-height: var(--type-heading-line-height);
    font-weight: var(--type-emphasis-weight);
}

.home-page .alert p {
    font-size: var(--type-body);
    line-height: var(--type-line-height);
}

.home-page .alert p.small,
.home-page .alert small {
    font-size: var(--type-small);
    line-height: 1.4;
}

@media (min-width: 768px) {
    .home-page .home-section {
        padding: 1.25rem 1.35rem;
    }

    .home-page .home-section-header {
        margin-bottom: 1.4rem;
    }
}

.slot-card {
    border-radius: 12px;
    transition: 0.2s ease-in-out;
    border: 1px solid #e9ecef;
    background-color: #ffffff;
    color: #212529;
}

.slot-card-content {
    gap: 0.75rem;
}

.slot-card-meta {
    min-width: 0;
}

.slot-card-time {
    font-size: 1rem;
    color: #1b2838;
}

.slot-card-action {
    display: flex;
    align-items: center;
}

.slot-card:hover {
    transform: translateY(-2px);
}

.slot-state-normal {
    border-color: #e9ecef;
    background-color: #ffffff;
    color: #212529;
}

.slot-state-reserved {
    border-color: #9fd8ae;
    background-color: #eaf8ef;
    color: #155724;
}

.slot-state-pending {
    border-color: #f2d18a;
    background-color: #fff8e8;
    color: #7a4f01;
}

.slot-state-closed {
    border-color: #f1aeb5;
    background-color: #fdecee;
    color: #842029;
}

.slot-state-full {
    border-color: #d5d9de;
    background-color: #f6f7f8;
    color: #5f6770;
}

.status-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.18rem 0.5rem;
    border-radius: 999px;
    font-size: var(--type-small);
    font-weight: var(--type-emphasis-weight);
    line-height: 1;
    border: 1px solid transparent;
}

.badge-airkey {
    background: #e9f7ff;
    border-color: #8ed0f8;
    color: #0a4d75;
}

.badge-reserved {
    background: #eaf8ef;
    border-color: #9fd8ae;
    color: #155724;
}

.badge-checkin {
    background: #f3efff;
    border-color: #cfc1ff;
    color: #4a347f;
}

.badge-noshow {
    background: #fdecee;
    border-color: #f1aeb5;
    color: #842029;
}

.badge-pending {
    background: #fff8e8;
    border-color: #f2d18a;
    color: #7a4f01;
}

.badge-full,
.badge-neutral,
.badge-closed {
    background: #f6f7f8;
    border-color: #d5d9de;
    color: #5f6770;
}

.btn-pending-confirm {
    background-color: #fff7e8;
    border: 1px solid #f0ad4e;
    color: #8a5a00;
}

.btn-pending-confirm:hover,
.btn-pending-confirm:focus {
    background-color: #ffe7be;
    border-color: #e19b30;
    color: #6c4700;
}

.slot .timer {
    font-size: var(--type-h3);
    line-height: var(--type-heading-line-height);
    font-weight: var(--type-heading-weight);
    color: #d9534f;
}

.slot .day-header {
    font-size: var(--type-body);
    line-height: var(--type-line-height);
    font-weight: var(--type-emphasis-weight);
}

.modal-slot-reservation #countdown {
    font-size: var(--type-h3);
    line-height: var(--type-heading-line-height);
    font-weight: var(--type-heading-weight);
    color: #d9534f;
}

.modal-slot-reservation .modal-title {
    font-size: var(--type-h3);
    line-height: var(--type-heading-line-height);
    font-weight: var(--type-heading-weight);
}

.modal-slot-reservation .modal-body {
    font-size: var(--type-body);
    line-height: var(--type-line-height);
}

.modal-slot-reservation .modal-body h6 {
    font-size: var(--type-body);
    line-height: var(--type-line-height);
    font-weight: var(--type-emphasis-weight);
}

.modal-slot-reservation .modal-body p.small,
.modal-slot-reservation .modal-body small {
    font-size: var(--type-small);
    line-height: 1.4;
}

.kpi-card-title {
    font-size: var(--type-h3);
    line-height: var(--type-heading-line-height);
    font-weight: var(--type-emphasis-weight);
}

.kpi-card-value {
    font-size: var(--type-h1);
    line-height: var(--type-heading-line-height);
    font-weight: var(--type-heading-weight);
}

.kpi-card-caption {
    font-size: var(--type-small);
    line-height: 1.4;
}

.kpi-state-reserved {
    background-color: #eaf8ef;
    border: 1px solid #9fd8ae !important;
    color: #155724;
}

.kpi-state-pending {
    background-color: #fff8e8;
    border: 1px solid #f2d18a !important;
    color: #7a4f01;
}

.kpi-state-closed {
    background-color: #fdecee;
    border: 1px solid #f1aeb5 !important;
    color: #842029;
}

.kpi-state-reserved .kpi-card-title,
.kpi-state-reserved .kpi-card-value,
.kpi-state-reserved .kpi-card-caption,
.kpi-state-pending .kpi-card-title,
.kpi-state-pending .kpi-card-value,
.kpi-state-pending .kpi-card-caption,
.kpi-state-closed .kpi-card-title,
.kpi-state-closed .kpi-card-value,
.kpi-state-closed .kpi-card-caption {
    color: inherit;
}

.reservation-collapse-toggle {
    font-size: var(--type-h3);
    line-height: var(--type-heading-line-height);
    font-weight: var(--type-emphasis-weight);
    padding: 0.9rem 1rem;
    border: 0;
    background: #f8f9fa;
    color: #212529;
    text-align: left;
    box-shadow: none;
}

.reservation-section-card {
    border: 1px solid #e9ecef;
    border-radius: 12px;
    overflow: hidden;
}

.reservation-section-card .card-header {
    background: transparent;
    border-bottom: 1px solid #e9ecef;
}

.reservation-collapse-toggle:hover {
    background: #eef2f5;
}

.reservation-collapse-toggle:active,
.reservation-collapse-toggle:focus,
.reservation-collapse-toggle[aria-expanded="true"] {
    background: #e7f1ff;
    color: #212529;
    box-shadow: none;
}

.reservation-collapse-toggle .reservation-toggle-icon {
    transition: transform 0.2s ease-in-out;
}

.reservation-collapse-toggle[aria-expanded="true"] .reservation-toggle-icon {
    transform: rotate(180deg);
}

.reservation-collapse-toggle.collapsed .reservation-toggle-icon {
    transform: rotate(0deg);
}

.reservation-section-card .card-body {
    padding: 1rem;
}

.js-reservation-filter {
    border: 1px solid #d5d9de;
    background: #f6f7f8;
    color: #5f6770;
}

.js-reservation-filter:hover,
.js-reservation-filter:focus {
    border-color: #9fd8ae;
    background: #f3fbf6;
    color: #155724;
}

.js-reservation-filter.is-active {
    border-color: #9ec5fe;
    background: #e7f1ff;
    color: #0a58ca;
}

.btn:focus-visible,
a:focus-visible,
.accordion-button:focus-visible,
[role="button"]:focus-visible {
    outline: 3px solid var(--focus-ring-color);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px var(--focus-ring-shadow);
}

.reservation-modal-day {
    font-size: var(--type-small);
    font-weight: 600;
}

.reservation-modal-time {
    font-size: var(--type-h3);
    line-height: var(--type-heading-line-height);
    font-weight: 600;
}

.app-toast-container {
    width: min(92vw, 380px);
}

.app-toast {
    border-radius: 10px;
    margin-bottom: 0.5rem;
    border: 1px solid #d5d9de !important;
    background: #f6f7f8;
    color: #5f6770;
}

.app-toast .toast-body {
    font-size: var(--type-body);
    line-height: 1.35;
}

.app-toast-tone-success {
    border-color: #9fd8ae !important;
    background: #eaf8ef;
    color: #155724;
}

.app-toast-tone-warning {
    border-color: #f2d18a !important;
    background: #fff8e8;
    color: #7a4f01;
}

.app-toast-tone-danger {
    border-color: #f1aeb5 !important;
    background: #fdecee;
    color: #842029;
}

.app-toast-tone-info,
.app-toast-tone-primary,
.app-toast-tone-secondary,
.app-toast-tone-dark,
.app-toast-tone-light {
    border-color: #d5d9de !important;
    background: #f6f7f8;
    color: #5f6770;
}

@media (max-width: 576px) {
    .app-toast-container {
        top: auto !important;
        right: auto !important;
        left: 50% !important;
        bottom: 0.8rem;
        transform: translateX(-50%);
        width: min(94vw, 420px);
        padding: 0.5rem !important;
    }

    .slot-card-content {
        flex-direction: column;
        align-items: stretch !important;
    }

    .slot-card-action {
        width: 100%;
    }

    .slot-card-action .btn {
        width: 100%;
    }
}
