*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --green: #1a2e1f;
    --green-mid: #233828;
    --green-accent: #2d7a4f;
    --green-bright: #4caf78;
    --cream: #f2efe8;
    --cream-dark: #e8e4db;
    --text-dark: #1a1a1a;
    --text-muted: #7a7a6e;
    --text-light: #adadad;
    --white: #ffffff;
    --red: #c0392b;
    --red-light: rgba(192, 57, 43, 0.08);
}

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--cream);
    color: var(--text-dark);
    min-height: 100vh;
    display: flex;
}

/* ── SIDEBAR ── */
.sidebar {
    width: 260px;
    min-height: 100vh;
    background: var(--green);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 200;
    padding: 0 0 32px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.sidebar-brand {
    padding: 32px 28px 28px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.brand-name {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 22px;
    color: var(--white);
    letter-spacing: 0.01em;
    line-height: 1.1;
    text-decoration: none;
    display: block;
}

.brand-name span {
    color: var(--green-bright);
}

.brand-sub {
    font-size: 9px;
    letter-spacing: 0.22em;
    color: rgba(255, 255, 255, 0.35);
    text-transform: uppercase;
    margin-top: 4px;
}

.sidebar-nav {
    padding: 24px 16px;
    flex: 1;
    overflow-y: auto;
}

.nav-label {
    font-size: 9px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.3);
    padding: 0 12px;
    margin: 20px 0 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: 8px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    margin-bottom: 2px;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.9);
}

.nav-item.active {
    background: rgba(76, 175, 120, 0.15);
    color: var(--green-bright);
    font-weight: 500;
}

.nav-item .icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.nav-item.danger {
    color: rgba(192, 57, 43, 0.7);
}

.nav-item.danger:hover {
    background: rgba(192, 57, 43, 0.15);
    color: #e74c3c;
}

.sidebar-user {
    margin: 0 16px;
    padding: 14px 16px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--green-accent), var(--green-bright));
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Cormorant Garamond', serif;
    font-size: 16px;
    color: white;
    font-weight: 600;
    flex-shrink: 0;
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-size: 13px;
    font-weight: 500;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-email {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── MAIN ── */
.main {
    margin-left: 260px;
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.topbar {
    background: var(--cream);
    border-bottom: 1px solid var(--cream-dark);
    padding: 20px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 150;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-menu-btn {
    display: none;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 1px solid var(--cream-dark);
    background: var(--white);
    color: var(--green);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.topbar-menu-btn:active {
    transform: scale(0.96);
}

.page-eyebrow {
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--green-accent);
    display: flex;
    align-items: center;
    gap: 8px;
}

.page-eyebrow::before {
    content: '';
    display: block;
    width: 24px;
    height: 1px;
    background: var(--green-accent);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.badge {
    background: var(--green);
    color: var(--green-bright);
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: 500;
}

.content {
    padding: 40px;
}

.page-header {
    margin-bottom: 36px;
}

.page-title {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 42px;
    font-weight: 400;
    color: var(--green);
    line-height: 1.1;
    margin-bottom: 6px;
}

.page-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 300;
}

/* ── STAT CARDS ── */
.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--white);
    border-radius: 14px;
    padding: 28px;
    border: 1px solid var(--cream-dark);
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
}

.stat-card.green {
    background: var(--green);
    border-color: var(--green);
}

.stat-card::after {
    content: '';
    position: absolute;
    bottom: -20px;
    right: -20px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.03);
}

.stat-card.green::after {
    background: rgba(255, 255, 255, 0.04);
}

.stat-label {
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.stat-card.green .stat-label {
    color: rgba(255, 255, 255, 0.5);
}

.stat-value {
    font-family: 'Cormorant Garamond', serif;
    font-size: 36px;
    font-weight: 500;
    color: var(--green);
    line-height: 1;
}

.stat-card.green .stat-value {
    color: var(--green-bright);
}

.stat-change {
    font-size: 12px;
    color: var(--green-accent);
    margin-top: 8px;
    font-weight: 500;
}

.stat-card.green .stat-change {
    color: rgba(255, 255, 255, 0.5);
}

/* ── GRID ── */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.card {
    background: var(--white);
    border-radius: 14px;
    border: 1px solid var(--cream-dark);
    overflow: hidden;
}

.card-header {
    padding: 24px 28px 20px;
    border-bottom: 1px solid var(--cream-dark);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 20px;
    font-weight: 500;
    color: var(--green);
}

.card-link {
    font-size: 12px;
    color: var(--green-accent);
    text-decoration: none;
    letter-spacing: 0.05em;
    font-weight: 500;
}

.card-link:hover {
    text-decoration: underline;
}

/* ── BOOKING ITEM ── */
.booking-item {
    padding: 20px 28px;
    border-bottom: 1px solid var(--cream-dark);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: background 0.15s;
}

.booking-item:last-child {
    border-bottom: none;
}

.booking-item:hover {
    background: var(--cream);
}

.booking-img {
    width: 52px;
    height: 52px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--green), var(--green-accent));
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.booking-info {
    flex: 1;
    min-width: 0;
}

.booking-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 17px;
    font-weight: 500;
    color: var(--green);
    margin-bottom: 2px;
}

.booking-dates {
    font-size: 12px;
    color: var(--text-muted);
}

.booking-status {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 20px;
    flex-shrink: 0;
}

.status-active {
    background: rgba(76, 175, 120, 0.12);
    color: var(--green-accent);
}

.status-upcoming {
    background: rgba(26, 46, 31, 0.08);
    color: var(--green);
}

.status-past,
.status-completed,
.status-cancelled {
    background: var(--cream-dark);
    color: var(--text-muted);
}

/* ── CHECK-IN CARD ── */
.checkin-card {
    background: var(--green);
    border-radius: 14px;
    padding: 32px;
    color: white;
    position: relative;
    overflow: hidden;
    margin-bottom: 24px;
}

.checkin-card::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(76, 175, 120, 0.1);
}

.checkin-card::after {
    content: '';
    position: absolute;
    bottom: -60px;
    right: 60px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(76, 175, 120, 0.06);
}

.checkin-eyebrow {
    font-size: 9px;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--green-bright);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkin-eyebrow::before {
    content: '';
    display: block;
    width: 20px;
    height: 1px;
    background: var(--green-bright);
}

.checkin-title {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 28px;
    font-weight: 400;
    margin-bottom: 6px;
}

.checkin-sub {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 28px;
    font-weight: 300;
}

.checkin-code-wrap {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.code-label {
    font-size: 10px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 4px;
}

.code-value {
    font-family: 'Cormorant Garamond', serif;
    font-size: 32px;
    font-weight: 500;
    letter-spacing: 0.12em;
    color: var(--green-bright);
}

.code-btn {
    background: rgba(76, 175, 120, 0.2);
    border: none;
    border-radius: 8px;
    padding: 10px 18px;
    color: var(--green-bright);
    font-size: 12px;
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    cursor: pointer;
    letter-spacing: 0.05em;
    transition: background 0.2s;
}

.code-btn:hover {
    background: rgba(76, 175, 120, 0.3);
}

.checkin-meta {
    display: flex;
    gap: 28px;
    position: relative;
    z-index: 1;
}

.meta-label {
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.35);
    margin-bottom: 2px;
}

.meta-value {
    font-size: 14px;
    color: white;
    font-weight: 400;
}

/* ── QUICK ACTIONS ── */
.actions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 20px 28px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 10px;
    background: var(--cream);
    border: 1px solid var(--cream-dark);
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    color: var(--text-dark);
}

.action-btn:hover {
    background: var(--green);
    border-color: var(--green);
    color: white;
}

.action-btn:hover .action-icon {
    background: rgba(255, 255, 255, 0.1);
}

.action-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    transition: background 0.2s;
}

.action-text {
    font-size: 13px;
    font-weight: 500;
}

/* ── MODALS ── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.modal-overlay.open {
    display: flex;
}

.modal-panel {
    background: var(--white);
    border-radius: 16px;
    width: 440px;
    max-width: 92vw;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.18);
}

.modal-head {
    padding: 28px 28px 20px;
    border-bottom: 1px solid var(--cream-dark);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-head h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 22px;
    font-weight: 500;
    color: var(--green);
}

.modal-close-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px 8px;
    border-radius: 6px;
}

.modal-close-btn:hover {
    background: var(--cream);
}

.modal-body {
    padding: 28px;
}

.modal-label {
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 6px;
    display: block;
}

.modal-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--cream-dark);
    border-radius: 10px;
    font-size: 14px;
    font-family: 'DM Sans', sans-serif;
    background: var(--cream);
    color: var(--text-dark);
    margin-bottom: 16px;
    outline: none;
    transition: border 0.2s;
}

.modal-input:focus {
    border-color: var(--green-accent);
}

/* Password toggle in modals (eye → 🙈 → 🙊) */
.modal-body .field-wrap {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}
.modal-body .field-wrap .modal-input {
    margin-bottom: 0;
    padding-right: 44px;
    flex: 1;
}
.modal-body .password-toggle {
    position: absolute;
    right: 10px;
    width: 36px;
    min-width: 36px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    transition: background 0.2s, color 0.2s, transform 0.15s ease;
    overflow: hidden;
}
.modal-body .password-toggle:active {
    transform: scale(0.95);
}
.modal-body .password-toggle:hover {
    background: var(--green-soft);
    color: var(--green-accent);
}
.modal-body .password-toggle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}
.modal-body .password-toggle .password-toggle-icon svg {
    display: block;
    flex-shrink: 0;
}

.modal-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--green);
    color: white;
    margin-top: 4px;
}

.modal-btn:hover {
    background: var(--green-mid);
}

.modal-btn.danger {
    background: var(--red);
}

.modal-btn.danger:hover {
    background: #a93226;
}

.modal-btn.outline {
    background: none;
    border: 1px solid var(--cream-dark);
    color: var(--text-dark);
}

.modal-btn.outline:hover {
    border-color: var(--red);
    color: var(--red);
}

.modal-msg {
    font-size: 13px;
    padding: 8px 0;
    min-height: 20px;
    text-align: center;
}

.modal-msg.error {
    color: var(--red);
}

.modal-msg.success {
    color: var(--green-accent);
}

.modal-divider {
    border: none;
    border-top: 1px solid var(--cream-dark);
    margin: 24px 0;
}

.danger-zone {
    background: var(--red-light);
    border: 1px solid rgba(192, 57, 43, 0.15);
    border-radius: 12px;
    padding: 20px;
    margin-top: 8px;
}

.danger-zone h4 {
    font-size: 14px;
    color: var(--red);
    font-weight: 500;
    margin-bottom: 4px;
}

.danger-zone p {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.twofa-status {
    padding: 14px 18px;
    border-radius: 10px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.twofa-status.enabled {
    background: rgba(76, 175, 120, 0.1);
    color: var(--green-accent);
}

.twofa-status.disabled {
    background: var(--cream);
    color: var(--text-muted);
}

/* ── TOAST ── */
.toast {
    position: fixed;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--green);
    color: white;
    padding: 12px 28px;
    border-radius: 10px;
    font-size: 14px;
    z-index: 999;
    transition: bottom 0.3s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.toast.show {
    bottom: 32px;
}

/* ── MOBILE SIDEBAR OVERLAY ── */
.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 180;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

body.sidebar-open .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-card {
    animation: fadeUp 0.4s ease both;
}

.stat-card:nth-child(1) {
    animation-delay: 0.05s;
}

.stat-card:nth-child(2) {
    animation-delay: 0.1s;
}

.stat-card:nth-child(3) {
    animation-delay: 0.15s;
}

.checkin-card {
    animation: fadeUp 0.4s 0.2s ease both;
}

.card {
    animation: fadeUp 0.4s 0.25s ease both;
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
    .sidebar {
        transform: translateX(-100%);
        box-shadow: none;
    }

    body.sidebar-open .sidebar {
        transform: translateX(0);
        box-shadow: 0 0 40px rgba(0, 0, 0, 0.4);
    }

    .main {
        margin-left: 0;
    }

    .topbar-menu-btn {
        display: inline-flex;
    }

    .stats-row {
        grid-template-columns: 1fr;
    }

    .grid-2 {
        grid-template-columns: 1fr;
    }

    .content {
        padding: 20px;
    }

    .topbar {
        padding: 16px 20px;
    }

    .page-title {
        font-size: 32px;
    }
}

