*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --forest: #142b1c;
    --forest-mid: #1c3a27;
    --forest-lit: #254d33;
    --forest-glow: #2e6040;
    --gold: #c89d64;
    --gold-lit: #ddb87a;
    --gold-dim: #a07840;
    --cream: #f9f5ee;
    --cream-dark: #f0eae0;
    --cream-mid: #e8dfd0;
    --white: #ffffff;
    --ink: #1a2820;
    --ink-mid: #3d5045;
    --ink-light: #6b7d70;
    --ink-faint: #9aaca0;
    --border: rgba(0, 0, 0, 0.08);
    --border-mid: rgba(0, 0, 0, 0.12);

    --green-bg: #e8f2ec;
    --green-tx: #1a5a2c;
    --amber-bg: #fbf0df;
    --amber-tx: #7a4800;
    --blue-bg: #e4eef8;
    --blue-tx: #1a3d78;
    --red-bg: #fdecec;
    --red-tx: #8b1a1a;

    --sidebar-w: 240px;
    --topbar-h: 64px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;

    --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);

    font-family: "DM Sans", system-ui, sans-serif;
}

html,
body {
    height: 100%;
    background: var(--cream);
    color: var(--ink);
    font-size: 14px;
    line-height: 1.6;
}

/* ── Portal shell ─────────────────────────────────────── */
.portal {
    display: flex;
    min-height: 100vh;
}

/* ════════════════════════════════════════════════════════
           SIDEBAR
        ════════════════════════════════════════════════════════ */
.sidebar {
    width: var(--sidebar-w);
    flex-shrink: 0;
    background: var(--forest);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Logo */
.sb-brand {
    padding: 22px 20px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    text-decoration: none;
}

.sb-brand-icon {
    width: auto;
    height: 58px;

    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sb-brand-icon img {
    width: auto;
    height: 58px;
}

.sb-brand-text {
}

.sb-brand-name {
    font-family: "DM Serif Display", serif;
    font-size: 15px;
    color: #fff;
    line-height: 1.1;
}

.sb-brand-sub {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.35);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* Nav groups */
.sb-group {
    padding: 20px 10px 4px;
}

.sb-group-label {
    font-size: 9px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.25);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 0 10px;
    margin-bottom: 4px;
}

.sb-link {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    font-size: 13px;
    font-weight: 400;
    transition:
        background 0.15s,
        color 0.15s;
    cursor: pointer;
    margin-bottom: 1px;
}

.sb-link:hover {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.88);
}

.sb-link.active {
    background: linear-gradient(135deg, var(--gold-dim), var(--gold));
    color: #fff;
    font-weight: 500;
}

.sb-link i {
    font-size: 16px;
    flex-shrink: 0;
    width: 18px;
    text-align: center;
}

.sb-link-label {
    flex: 1;
}

.sb-pill {
    background: rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.75);
    font-size: 10px;
    padding: 1px 7px;
    border-radius: 20px;
}

.sb-link.active .sb-pill {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}

/* Divider */
.sb-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
    margin: 8px 20px;
}

/* User footer */
.sb-footer {
    margin-top: auto;
    padding: 14px 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.sb-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.15s;
}

.sb-user:hover {
    background: rgba(255, 255, 255, 0.06);
}

.sb-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold-dim), var(--gold));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--forest);
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.sb-user-name {
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
}

.sb-user-role {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.35);
}

.sb-logout {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    color: rgba(255, 255, 255, 0.35);
    font-size: 12px;
    cursor: pointer;
    transition:
        color 0.15s,
        background 0.15s;
    text-decoration: none;
    margin-top: 2px;
}

.sb-logout:hover {
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.04);
}

.sb-logout i {
    font-size: 14px;
}

/* ════════════════════════════════════════════════════════
           MAIN PANEL
        ════════════════════════════════════════════════════════ */
.main-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* ── Topbar ──────────────────────────────────────────── */
.topbar {
    height: var(--topbar-h);
    background: var(--white);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 28px;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.topbar-breadcrumb {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--ink-light);
}

.topbar-breadcrumb i {
    font-size: 13px;
}

.topbar-breadcrumb strong {
    color: var(--ink);
    font-weight: 500;
}

.topbar-search {
    display: flex;
    align-items: center;
    gap: 8px;
    /* background: var(--cream); */
    /* border: 1px solid var(--border-mid); */
    /* border-radius: var(--radius-md); */
    padding: 7px 14px;
    font-size: 12px;
    color: var(--ink-light);
    min-width: 220px;
    cursor: text;
}

.topbar-search i {
    font-size: 14px;
    color: var(--ink-faint);
}

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

.tb-icon-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ink-light);
    cursor: pointer;
    position: relative;
    transition:
        background 0.15s,
        color 0.15s;
}

.tb-icon-btn:hover {
    background: var(--cream);
    color: var(--ink);
}

.tb-icon-btn i {
    font-size: 16px;
}

.tb-notif-dot {
    width: 7px;
    height: 7px;
    background: #e05050;
    border: 2px solid var(--white);
    border-radius: 50%;
    position: absolute;
    top: 5px;
    right: 5px;
}

.tb-date {
    font-size: 11px;
    color: var(--ink-faint);
    padding: 0 4px;
    white-space: nowrap;
}

.tb-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--forest);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid var(--cream-mid);
    transition: border-color 0.15s;
}

.tb-avatar:hover {
    border-color: var(--gold);
}

/* ── Content area ─────────────────────────────────────── */
.content {
    flex: 1;
    padding: 28px 28px 0;
}

.page-header {
    margin-bottom: 24px;
}

.page-title {
    font-family: "DM Serif Display", serif;
    font-size: 26px;
    font-weight: 400;
    color: var(--ink);
    margin-bottom: 3px;
}

.page-subtitle {
    font-size: 13px;
    color: var(--ink-faint);
}

/* Flash */
.flash {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-size: 13px;
}

.flash.success {
    background: var(--green-bg);
    color: var(--green-tx);
    border-left: 3px solid #2d7a45;
}

.flash.error {
    background: var(--red-bg);
    color: var(--red-tx);
    border-left: 3px solid #9b2020;
}

/* ── Stat Cards ───────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px 22px;
    position: relative;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
}

.stat-card::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.stat-card.green::after {
    background: linear-gradient(90deg, #2d6a4f, #52b788);
}

.stat-card.gold::after {
    background: linear-gradient(90deg, var(--gold-dim), var(--gold));
}

.stat-card.blue::after {
    background: linear-gradient(90deg, #1a5c96, #4a9dd4);
}

.stat-card.amber::after {
    background: linear-gradient(90deg, #b56a00, #e89830);
}

.stat-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.stat-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
}

.stat-icon.green {
    background: var(--green-bg);
    color: #2d6a4f;
}

.stat-icon.gold {
    background: var(--amber-bg);
    color: var(--gold-dim);
}

.stat-icon.blue {
    background: var(--blue-bg);
    color: var(--blue-tx);
}

.stat-icon.amber {
    background: #fff3dc;
    color: #b56a00;
}

.stat-trend {
    font-size: 11px;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: 20px;
}

.stat-trend.up {
    background: var(--green-bg);
    color: var(--green-tx);
}

.stat-trend.down {
    background: var(--red-bg);
    color: var(--red-tx);
}

.stat-trend.neu {
    background: var(--cream-dark);
    color: var(--ink-light);
}

.stat-value {
    font-size: 28px;
    font-weight: 600;
    color: var(--ink);
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 11px;
    color: var(--ink-faint);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* ── Charts row ───────────────────────────────────────── */
.charts-row {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 16px;
    margin-bottom: 24px;
}

.charts-row-2 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
}

.card:hover {
    box-shadow: var(--shadow-sm);
}

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

.card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
}

.card-subtitle {
    font-size: 11px;
    color: var(--ink-faint);
    margin-top: 2px;
}

.card-badge {
    font-size: 10px;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

.card-badge.green {
    background: var(--green-bg);
    color: var(--green-tx);
}

.card-badge.gold {
    background: var(--amber-bg);
    color: #7a4800;
}

.card-badge.blue {
    background: var(--blue-bg);
    color: var(--blue-tx);
}

/* Chart legend */
.chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 14px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--ink-light);
}

.legend-swatch {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    flex-shrink: 0;
}

/* Occupancy bars */
.occ-item {
    margin-bottom: 16px;
}

.occ-item:last-child {
    margin-bottom: 0;
}

.occ-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 5px;
}

.occ-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--ink);
}

.occ-count {
    font-size: 11px;
    color: var(--ink-light);
}

.occ-track {
    height: 6px;
    background: var(--cream-mid);
    border-radius: 4px;
    overflow: hidden;
}

.occ-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.occ-note {
    font-size: 10px;
    color: var(--ink-faint);
    margin-top: 3px;
}

/* Check-ins list */
.checkin-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.checkin-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 11px 0;
    border-bottom: 1px solid var(--cream-dark);
}

.checkin-item:last-child {
    border-bottom: none;
}

.ci-day-badge {
    width: 42px;
    text-align: center;
    flex-shrink: 0;
}

.ci-day-num {
    font-size: 20px;
    font-weight: 600;
    color: var(--ink);
    line-height: 1;
}

.ci-day-mo {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-faint);
}

.ci-divider {
    width: 1px;
    height: 36px;
    background: var(--cream-mid);
    flex-shrink: 0;
}

.ci-body {
    flex: 1;
    min-width: 0;
}

.ci-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ci-room {
    font-size: 11px;
    color: var(--ink-faint);
}

.ci-nights-pill {
    font-size: 10px;
    font-weight: 500;
    background: var(--cream-dark);
    color: var(--ink-light);
    border: 1px solid var(--cream-mid);
    padding: 2px 8px;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
}

.ci-today .ci-day-num {
    color: var(--gold-dim);
}

.ci-today .ci-day-mo {
    color: var(--gold-dim);
}

.ci-today .ci-nights-pill {
    background: var(--amber-bg);
    color: #7a4800;
    border-color: #ebd3a8;
}

/* Revenue mini stat */
.mini-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 18px;
}

.mini-stat {
    background: var(--cream);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
}

.mini-stat-val {
    font-size: 18px;
    font-weight: 600;
    color: var(--ink);
    line-height: 1;
}

.mini-stat-label {
    font-size: 10px;
    color: var(--ink-faint);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 2px;
}

/* ── Reservations Table ───────────────────────────────── */
.table-section {
    margin-bottom: 28px;
}

.table-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 22px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

.table-toolbar-left {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-input {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--cream);
    border: 1px solid var(--border-mid);
    border-radius: var(--radius-sm);
    padding: 7px 12px;
    font-size: 12px;
    color: var(--ink-light);
    min-width: 240px;
}

.filter-input i {
    color: var(--ink-faint);
    font-size: 14px;
}

.filter-input input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 12px;
    color: var(--ink);
    width: 100%;
    font-family: inherit;
}

.filter-input input::placeholder {
    color: var(--ink-faint);
}

.filter-select {
    appearance: none;
    background: var(--cream)
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' fill='none' stroke='%236B7D70' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
        no-repeat right 10px center;
    border: 1px solid var(--border-mid);
    border-radius: var(--radius-sm);
    padding: 7px 30px 7px 12px;
    font-size: 12px;
    color: var(--ink);
    cursor: pointer;
    font-family: inherit;
}

.filter-select:focus {
    outline: none;
    border-color: var(--gold);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--forest);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s;
    text-decoration: none;
}

.btn-primary:hover {
    background: var(--forest-lit);
}

.btn-primary i {
    font-size: 14px;
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: transparent;
    color: var(--ink-light);
    border: 1px solid var(--border-mid);
    border-radius: var(--radius-sm);
    padding: 7px 14px;
    font-size: 12px;
    cursor: pointer;
    font-family: inherit;
    transition:
        background 0.15s,
        color 0.15s;
    text-decoration: none;
}

.btn-ghost:hover {
    background: var(--cream);
    color: var(--ink);
}

/* Table */
.tbl-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead th {
    padding: 11px 16px;
    text-align: left;
    font-size: 10px;
    font-weight: 600;
    color: var(--ink-faint);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
    background: var(--cream);
}

thead th:first-child {
    border-radius: var(--radius-sm) 0 0 0;
}

thead th:last-child {
    border-radius: 0 var(--radius-sm) 0 0;
}

tbody tr {
    transition: background 0.1s;
}

tbody tr:hover td {
    background: #fdfaf6;
}

tbody td {
    padding: 13px 16px;
    border-bottom: 1px solid #f5f0e8;
    font-size: 12px;
    color: var(--ink);
    vertical-align: middle;
}

tbody tr:last-child td {
    border-bottom: none;
}

.td-ref {
    font-family: "Courier New", monospace;
    font-size: 11px;
    font-weight: 600;
    color: var(--gold-dim);
    white-space: nowrap;
}

.td-guest-name {
    font-weight: 500;
    font-size: 13px;
}

.td-guest-email {
    font-size: 11px;
    color: var(--ink-faint);
}

.td-guest-phone {
    font-size: 10px;
    color: var(--ink-faint);
}

.td-room {
    font-weight: 500;
    white-space: nowrap;
}

.td-date {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.td-total {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.td-actions {
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Status badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.status-badge::before {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 50%;
}

.badge-pending {
    background: var(--amber-bg);
    color: var(--amber-tx);
}

.badge-pending::before {
    background: var(--amber-tx);
}

.badge-confirmed {
    background: var(--green-bg);
    color: var(--green-tx);
}

.badge-confirmed::before {
    background: var(--green-tx);
}

.badge-cancelled {
    background: var(--red-bg);
    color: var(--red-tx);
}

.badge-cancelled::before {
    background: var(--red-tx);
}

.badge-completed {
    background: var(--blue-bg);
    color: var(--blue-tx);
}

.badge-completed::before {
    background: var(--blue-tx);
}

/* Action buttons */
.act-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: filter 0.15s;
}

.act-btn:hover {
    filter: brightness(0.92);
}

.act-btn i {
    font-size: 12px;
}

.act-confirm {
    background: var(--green-bg);
    color: var(--green-tx);
}

.act-cancel {
    background: var(--red-bg);
    color: var(--red-tx);
}

.act-view {
    background: var(--cream-dark);
    color: var(--ink-mid);
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 64px 32px;
    color: var(--ink-faint);
}

.empty-state i {
    font-size: 40px;
    display: block;
    margin-bottom: 14px;
    opacity: 0.4;
}

.empty-state h4 {
    font-size: 15px;
    color: var(--ink-light);
    margin-bottom: 4px;
}

.empty-state p {
    font-size: 12px;
}

/* Pagination */
.pagination-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 22px;
    border-top: 1px solid var(--border);
}

.pag-info {
    font-size: 12px;
    color: var(--ink-faint);
}

.pag-links {
    display: flex;
    gap: 4px;
}

.pag-link {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-mid);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--ink-light);
    cursor: pointer;
    background: var(--white);
    transition:
        background 0.15s,
        color 0.15s;
    text-decoration: none;
}

.pag-link:hover {
    background: var(--cream);
    color: var(--ink);
}

.pag-link.active {
    background: var(--forest);
    color: #fff;
    border-color: var(--forest);
}

/* ── Footer ───────────────────────────────────────────── */
.footer {
    background: var(--white);
    border-top: 1px solid var(--border);
    padding: 16px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-left {
    font-size: 11px;
    color: var(--ink-faint);
}

.footer-left strong {
    color: var(--ink-light);
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-link {
    font-size: 11px;
    color: var(--ink-faint);
    text-decoration: none;
    transition: color 0.15s;
}

.footer-link:hover {
    color: var(--ink);
}

.footer-version {
    font-size: 10px;
    color: var(--ink-faint);
    display: flex;
    align-items: center;
    gap: 6px;
}

.footer-version-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--green-tx);
}

/* ── Responsive helpers ───────────────────────────────── */
@media (max-width: 1280px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .charts-row {
        grid-template-columns: 1fr;
    }

    .charts-row-2 {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 900px) {
    .sidebar {
        width: 60px;
    }

    .sb-brand-text,
    .sb-link-label,
    .sb-pill,
    .sb-group-label,
    .sb-user-name,
    .sb-user-role,
    .sb-logout span {
        display: none;
    }

    .sb-link {
        justify-content: center;
        padding: 10px;
    }

    .sb-link i {
        width: auto;
    }

    .sb-user {
        justify-content: center;
    }

    .sb-brand {
        justify-content: center;
        padding: 16px 12px;
    }

    :root {
        --sidebar-w: 60px;
    }

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

    .charts-row-2 {
        grid-template-columns: 1fr;
    }
}

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

    .content {
        padding: 20px 16px 0;
    }

    .topbar {
        padding: 0 16px;
    }

    .footer {
        padding: 14px 16px;
    }
}

/* Form styles */
.form-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
    align-items: start;
}

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

.form-card {
    margin-bottom: 20px;
    padding: 24px;
}

.form-card:last-child {
    margin-bottom: 0;
}

.form-section-title {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-faint);
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0 0 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border, #e5e7eb);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-row-3 {
    grid-template-columns: 1fr 1fr 1fr;
}

@media (max-width: 600px) {
    .form-row,
    .form-row-3 {
        grid-template-columns: 1fr;
    }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 16px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-secondary, #374151);
}

.req {
    color: #ef4444;
}

.form-control {
    border: 1.5px solid var(--border, #e5e7eb);
    border-radius: 8px;
    padding: 9px 13px;
    font-size: 14px;
    color: var(--ink, #111827);
    background: var(--surface, #fff);
    transition:
        border-color 0.15s,
        box-shadow 0.15s;
    width: 100%;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent, #0ea5e9);
    box-shadow: 0 0 0 3px rgb(14 165 233 / 0.12);
}

.form-control.is-invalid {
    border-color: #ef4444;
}

textarea.form-control {
    resize: vertical;
}

.form-error {
    font-size: 12px;
    color: #ef4444;
    margin-top: 2px;
}

.form-hint {
    font-size: 12px;
    color: var(--ink-faint);
    margin-top: 3px;
}

/* Prefixed input */
.input-prefix-wrap {
    position: relative;
}

.input-prefix {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: var(--ink-faint);
    pointer-events: none;
}

.form-control.has-prefix {
    padding-left: 26px;
}

/* Toggle */
.toggle-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.toggle-input {
    display: none;
}

.toggle-track {
    width: 40px;
    height: 22px;
    border-radius: 99px;
    background: var(--border, #d1d5db);
    transition: background 0.2s;
    position: relative;
    flex-shrink: 0;
}

.toggle-track::after {
    content: "";
    position: absolute;
    left: 3px;
    top: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgb(0 0 0 / 0.25);
}

.toggle-input:checked + .toggle-track {
    background: #22c55e;
}

.toggle-input:checked + .toggle-track::after {
    transform: translateX(18px);
}

.toggle-text {
    font-size: 14px;
    font-weight: 500;
    color: var(--ink-secondary);
}

/* Dropzone */
.dropzone-wrap {
    border: 2px dashed var(--border, #d1d5db);
    border-radius: 10px;
    padding: 28px 16px;
    text-align: center;
    cursor: pointer;
    transition:
        border-color 0.2s,
        background 0.2s;
    color: var(--ink-faint);
}

.dropzone-wrap:hover,
.dropzone-wrap.drag-over {
    border-color: var(--accent, #0ea5e9);
    background: rgb(14 165 233 / 0.04);
}

.dropzone-wrap i {
    font-size: 28px;
    margin-bottom: 8px;
    display: block;
}

.dropzone-wrap p {
    margin: 4px 0;
    font-size: 13px;
}

.dropzone-link {
    color: var(--accent, #0ea5e9);
    font-weight: 600;
}

/* Image preview grid */
.image-preview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 12px;
}

.img-thumb {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 4/3;
}

.img-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.thumb-badge {
    position: absolute;
    bottom: 5px;
    left: 5px;
    background: rgb(0 0 0 / 0.6);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 2px 6px;
    border-radius: 4px;
}

/* Authentications  */
.login-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

/* ── Left decorative panel ── */
.login-panel {
    background: var(--surface-dark, #254d33);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 48px;
    overflow: hidden;
}

.login-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(
            ellipse 80% 60% at 30% 70%,
            rgba(2, 59, 5, 0.18) 0%,
            transparent 70%
        ),
        radial-gradient(
            ellipse 50% 50% at 80% 20%,
            rgba(2, 78, 45, 0.08) 0%,
            transparent 60%
        );
    pointer-events: none;
}

.login-panel-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.035;
    background-image: repeating-linear-gradient(
        45deg,
        var(--gold, #c89d64) 0,
        var(--gold, #c89d64) 1px,
        transparent 0,
        transparent 50%
    );
    background-size: 28px 28px;
}

.login-panel-logo {
    position: absolute;
    top: 40px;
    left: 48px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--gold, #c89d64);
}

.login-panel-logo .logo-mark {
    width: 36px;
    height: 36px;
    border: 1.5px solid var(--gold, #c89d64);
    border-radius: 8px;
    display: grid;
    place-items: center;
    font-size: 16px;
}

.login-panel-logo .logo-name {
    font-family: "DM Serif Display", serif;
    font-size: 18px;
    color: #f5ede0;
    line-height: 1.1;
}

.login-panel-logo .logo-name span {
    display: block;
    font-family: "DM Sans", sans-serif;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gold, #c89d64);
    margin-top: 1px;
}

.login-panel-quote {
    position: relative;
    z-index: 1;
}

.login-panel-quote blockquote {
    font-family: "DM Serif Display", serif;
    font-size: clamp(22px, 2.8vw, 32px);
    line-height: 1.35;
    color: #f5ede0;
    margin: 0 0 20px;
}

.login-panel-quote blockquote em {
    color: var(--gold, #c89d64);
    font-style: italic;
}

.login-panel-quote p {
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(245, 237, 224, 0.45);
    margin: 0;
}

/* ── Right form panel ── */
.login-form-panel {
    background: var(--bg, #faf8f4);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
}

.login-form-wrap {
    width: 100%;
    max-width: 400px;
}

.login-heading {
    margin-bottom: 32px;
}

.login-heading h1 {
    font-family: "DM Serif Display", serif;
    font-size: 28px;
    color: var(--ink, #2a2118);
    margin: 0 0 6px;
}

.login-heading p {
    font-size: 13px;
    color: var(--ink-faint, #8c7d6a);
    margin: 0;
}

.input-icon-wrap {
    position: relative;
}

.input-icon-wrap .form-input {
    padding-right: 40px;
}

.input-icon-wrap .toggle-pw {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--ink-faint, #8c7d6a);
    font-size: 14px;
    padding: 0;
    line-height: 1;
    transition: color 0.15s;
}

.input-icon-wrap .toggle-pw:hover {
    color: var(--gold, #c89d64);
}

/* Remember + forgot row */
.login-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    margin-top: -4px;
}

.login-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--ink-faint, #8c7d6a);
    cursor: pointer;
}

.login-remember input[type="checkbox"] {
    accent-color: var(--gold, #c89d64);
    width: 14px;
    height: 14px;
    cursor: pointer;
}

.login-forgot {
    font-size: 12px;
    color: var(--gold, #c89d64);
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: opacity 0.15s;
}

.login-forgot:hover {
    opacity: 0.75;
}

/* Flash / session status */
.flash.info {
    background: #f0f7f0;
    border: 1px solid #b8d4b8;
    color: #2a5a2a;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    display: flex;
    gap: 8px;
    align-items: flex-start;
    margin-bottom: 20px;
}

/* Responsive */
@media (max-width: 720px) {
    .login-shell {
        grid-template-columns: 1fr;
    }

    .login-panel {
        display: none;
    }

    .login-form-panel {
        padding: 32px 20px;
        align-items: flex-start;
        padding-top: 56px;
    }
}

/* Support ticket modal  */
.support-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(26, 21, 16, 0.55);
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 24px 0 72px 24px;
    /* sit just above the footer */
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.support-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
}

.support-modal {
    background: var(--surface, #fff);
    border: 1px solid var(--border-light, #e8e2d8);
    border-radius: 14px;
    width: 460px;
    max-width: calc(100vw - 48px);
    box-shadow: 0 8px 40px rgba(26, 21, 16, 0.18);
    transform: translateY(16px);
    transition: transform 0.22s ease;
    overflow: hidden;
}

.support-backdrop.is-open .support-modal {
    transform: translateY(0);
}

.support-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px 20px 0;
    background-color: var(--forest);
    color: var(--white);
}

.support-modal-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: "DM Serif Display", serif;
    font-size: 17px;
    color: var(--white);
    margin-bottom: 4px;
}

.support-modal-subtitle {
    font-size: 12px;
    color: var(--ink-faint, #8c7d6a);
    margin: 0 0 16px 42px;
}

.support-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--ink-faint, #8c7d6a);
    font-size: 16px;
    padding: 4px;
    border-radius: 6px;
    transition:
        color 0.15s,
        background 0.15s;
    flex-shrink: 0;
    margin-top: 2px;
}

.support-close:hover {
    color: var(--ink, #2a2118);
    background: var(--border-light, #e8e2d8);
}

/* form lives inside padded area */
#support-form,
#support-success {
    padding: 0 20px 0;
}

#support-success {
    margin: 0 20px 16px;
    border-radius: 8px;
    padding: 10px 14px;
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 13px;
}

.support-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 20px;
    border-top: 1px solid var(--border-light, #f0ece4);
    margin-top: 16px;
}

/* Priority chips */
.priority-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border: 1px solid var(--border-light, #e8e2d8);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ink-faint, #8c7d6a);
    cursor: pointer;
    transition:
        border-color 0.15s,
        color 0.15s,
        background 0.15s;
    user-select: none;
}

.priority-chip input[type="radio"] {
    display: none;
}

.priority-chip:has(input:checked) {
    border-color: var(--gold, #c89d64);
    color: var(--gold, #c89d64);
    background: rgba(200, 157, 100, 0.08);
}

.priority-chip[data-priority="high"]:has(input:checked) {
    border-color: #8b1a1a;
    color: #8b1a1a;
    background: rgba(139, 26, 26, 0.07);
}

/* ── Gallery grid ─────────────────────────────────── */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.gallery-card {
    background: var(--surface, #fff);
    border: 1px solid var(--border, #e8e0d5);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition:
        box-shadow 0.2s,
        transform 0.2s;
}

.gallery-card:hover {
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* Thumbnail */
.gallery-card-thumb {
    display: block;
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--surface-alt, #f5f1eb);
}

.gallery-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.gallery-card:hover .gallery-card-thumb img {
    transform: scale(1.04);
}

.gallery-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--ink-faint, #b0a898);
    font-size: 13px;
}

.gallery-card-placeholder i {
    font-size: 32px;
    opacity: 0.4;
}

/* Photo count badge */
.gallery-img-count {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 4px;
    backdrop-filter: blur(4px);
}

/* Card body */
.gallery-card-body {
    padding: 14px 16px 10px;
    flex: 1;
}

.gallery-card-meta {
    margin-bottom: 6px;
}

.gallery-card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--ink, #1a1410);
    margin: 0 0 6px;
    line-height: 1.3;
}

.gallery-card-title a {
    color: inherit;
    text-decoration: none;
}

.gallery-card-title a:hover {
    color: var(--accent, #2d6a4f);
}

.gallery-card-info {
    font-size: 12px;
    color: var(--ink-faint, #9e9485);
    display: flex;
    gap: 12px;
}

.gallery-card-info i {
    margin-right: 3px;
}

/* Type badge */
.gallery-type-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 4px;
}

.type-room {
    background: #e8f5ee;
    color: #2d6a4f;
}

.type-hall {
    background: #fef3e2;
    color: #7a4800;
}

.type-appartment {
    background: #e8f0fb;
    color: #1a5c96;
}

.type-bar {
    background: #f5ede8;
    color: #7b4f2e;
}

/* Card footer */
.gallery-card-footer {
    display: flex;
    gap: 6px;
    padding: 10px 16px 14px;
    border-top: 1px solid var(--border, #e8e0d5);
}

.gallery-card-footer .act-btn {
    flex: 1;
    justify-content: center;
    font-size: 12px;
}

/* ── Tour show layout ── */
.tour-show-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 24px;
    align-items: start;
}

@media (max-width: 960px) {
    .tour-show-layout {
        grid-template-columns: 1fr;
    }
}

.tour-show-main {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.tour-show-aside {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* ── Type / difficulty badges ── */
.tour-type-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.type-safari {
    background: #d1fae5;
    color: #065f46;
}

.type-cultural {
    background: #fef3c7;
    color: #7a4800;
}

.type-nature {
    background: #dcfce7;
    color: #166534;
}

.type-adventure {
    background: #fee2e2;
    color: #7f1d1d;
}

.type-day_trip {
    background: #dbeafe;
    color: #1e40af;
}

.type-multi_day {
    background: #ede9fe;
    color: #4c1d95;
}

.type-difficulty-easy {
    background: #d1fae5;
    color: #065f46;
}

.type-difficulty-moderate {
    background: #fef3c7;
    color: #7a4800;
}

.type-difficulty-challenging {
    background: #fee2e2;
    color: #7f1d1d;
}

/* ── Featured image ── */
.tour-featured-img {
    position: relative;
}

.tour-img-overlays {
    position: absolute;
    top: 14px;
    left: 14px;
    display: flex;
    gap: 8px;
}

.tour-badge-featured {
    background: #c89d64;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
}

.tour-badge-status {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
}

.tour-badge-status.active {
    background: #d1fae5;
    color: #065f46;
}

.tour-badge-status.inactive {
    background: #f3f4f6;
    color: #6b7280;
}

/* ── Gallery strip ── */
.tour-gallery-strip {
    display: flex;
    gap: 6px;
    padding: 10px;
    overflow-x: auto;
    background: #f9f9f9;
}

.tour-gallery-thumb {
    flex-shrink: 0;
    width: 80px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
}

.tour-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ── Detail cols ── */
.tour-detail-cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
}

.tour-detail-heading {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--ink-muted);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tour-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tour-list li {
    font-size: 13px;
    color: var(--ink);
    padding-left: 18px;
    position: relative;
    line-height: 1.5;
}

.tour-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--ink-faint);
}

.tour-list-check li::before {
    content: "✓";
    color: #2d6a4f;
    font-weight: 700;
}

.tour-list-cross li::before {
    content: "✗";
    color: #8b1a1a;
    font-weight: 700;
}

/* ── Itinerary ── */
.itinerary-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.itinerary-item {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-top: 1px solid var(--border, #eee);
}

.itinerary-item:first-child {
    border-top: none;
}

.itinerary-day-badge {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    background: var(--gold, #c89d64);
    color: #fff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    line-height: 1.2;
}

.itinerary-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 4px;
}

.itinerary-desc {
    font-size: 13px;
    color: var(--ink-muted);
    line-height: 1.6;
}

/* ── Quick facts ── */
.tour-facts {
    display: flex;
    flex-direction: column;
}

.tour-fact-row {
    display: grid;
    grid-template-columns: 20px 1fr auto;
    align-items: flex-start;
    gap: 8px;
    padding: 9px 0;
    border-top: 1px solid var(--border, #eee);
    font-size: 13px;
}

.tour-fact-row:first-child {
    border-top: none;
}

.tour-fact-icon {
    color: var(--ink-faint);
    font-size: 12px;
    margin-top: 1px;
}

.tour-fact-label {
    color: var(--ink-muted);
}

.tour-fact-val {
    font-weight: 600;
    color: var(--ink);
    text-align: right;
    max-width: 160px;
    word-break: break-word;
}
