:root {
    --ink: #1c1915;
    --ink-soft: #5c564c;
    --forest: #1f4d3a;
    --forest-deep: #143528;
    --forest-mid: #2f6a50;
    --gold: #a9782f;
    --gold-soft: #f3e6cf;
    --sand: #f3eee6;
    --paper: #fbf8f3;
    --line: #e3dacd;
    --white: #fffcf8;
    --danger: #8d3b32;
    --warn: #8a5a12;
    --ok: #1f6b45;
    --shadow: 0 18px 40px rgba(28, 25, 21, 0.06);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    color: var(--ink);
    background: var(--sand);
    font-family: "Outfit", sans-serif;
    font-size: 15.5px;
    line-height: 1.5;
}

h1, h2, h3, h4, .serif { font-family: "Fraunces", serif; font-weight: 560; letter-spacing: -0.02em; }
a { color: var(--forest); }
button, input, select, textarea { font-family: inherit; }

.guest-nav, .guest-footer, .hero, .section { width: min(1120px, calc(100% - 32px)); margin-inline: auto; }
.guest-nav { display: flex; align-items: center; justify-content: space-between; padding: 22px 0; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 650; letter-spacing: -0.03em; }
.brand-mark { width: 34px; height: 34px; border-radius: 9px; background: var(--forest-deep); display: grid; grid-template-columns: 1fr 1fr; gap: 3px; padding: 7px; }
.brand-mark span { background: #e7c27a; border-radius: 1px; }
.brand-mark span:nth-child(2) { background: transparent; box-shadow: inset 0 0 0 1.5px #e7c27a; }
.brand-mark span:nth-child(3) { background: #8fb59a; }

.btn-primary { --bs-btn-bg: var(--forest); --bs-btn-border-color: var(--forest); --bs-btn-hover-bg: var(--forest-deep); --bs-btn-hover-border-color: var(--forest-deep); --bs-btn-active-bg: var(--forest-deep); --bs-btn-color: #fff; --bs-btn-hover-color: #fff; }
.btn-gold { background: var(--gold); border: 1px solid var(--gold); color: white; }
.btn-gold:hover { background: #8d6424; color: white; }
.btn, .form-control, .form-select { border-radius: 10px; }
.form-control, .form-select { border-color: #d9d0c3; background: white; }
.form-control:focus, .form-select:focus { border-color: var(--forest-mid); box-shadow: 0 0 0 3px rgba(31, 77, 58, 0.12); }

.hero { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; padding: 28px 0 64px; }
.kicker { color: var(--gold); font-weight: 650; letter-spacing: 0.14em; text-transform: uppercase; font-size: 12px; }
.hero h1 { font-size: clamp(42px, 6vw, 68px); line-height: 0.98; margin: 10px 0 16px; }
.lede { font-size: 18px; color: var(--ink-soft); max-width: 46ch; }
.hero-actions { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; }

.ledger { background: var(--forest-deep); color: #f6f1e7; border-radius: 22px; padding: 22px; box-shadow: var(--shadow); }
.ledger header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 16px; }
.ledger header strong { font-family: "Fraunces", serif; font-size: 22px; }
.ledger header span { color: #d9c7a2; font-size: 13px; }
.plot-mosaic { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.plot-tile { border-radius: 8px; min-height: 64px; padding: 8px; display: flex; flex-direction: column; justify-content: space-between; font-size: 12px; }
.plot-tile b { font-size: 13px; }
.tile-free { background: #f6f1e7; color: var(--forest-deep); }
.tile-booked { background: #e7c27a; color: #3d2c0d; }
.tile-sold { background: #315845; color: #f6f1e7; }
.tile-hold { background: transparent; color: #d7cbb8; box-shadow: inset 0 0 0 1px #6d6254; }
.legend { display: flex; gap: 14px; margin-top: 14px; font-size: 12px; color: #d7cbb8; }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 99px; margin-right: 5px; }
.dot-free { background: #f6f1e7; } .dot-booked { background: #e7c27a; } .dot-sold { background: #8fb59a; }

.band { background: white; border-block: 1px solid var(--line); }
.section { padding: 72px 0; }
.section h2 { font-size: 36px; margin-bottom: 8px; }
.steps, .role-grid, .feature-grid { display: grid; gap: 16px; margin-top: 28px; }
.steps { grid-template-columns: repeat(3, 1fr); }
.role-grid, .feature-grid { grid-template-columns: repeat(3, 1fr); }
.card-plain { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 20px; height: 100%; }
.card-plain .num { font-family: "Fraunces", serif; color: var(--gold); font-size: 28px; }
.feature-grid { grid-template-columns: repeat(3, 1fr); }
.feature-grid article { background: white; border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
.feature-grid i { color: var(--forest); font-size: 20px; }
.guest-footer { padding: 28px 0 40px; color: var(--ink-soft); display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }

.login-shell { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.login-aside { background: var(--forest-deep); color: #f6f1e7; padding: 36px; display: flex; flex-direction: column; justify-content: space-between; }
.login-aside h1 { font-size: 48px; line-height: 1; color: white; }
.login-panel { display: grid; place-items: center; padding: 32px 20px; background: var(--sand); }
.login-card { width: min(420px, 100%); background: white; border: 1px solid var(--line); border-radius: 18px; padding: 28px; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 260px 1fr; }
.sidebar { background: var(--forest-deep); color: #f4efe6; padding: 22px 16px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.sidebar .brand { color: white; margin-bottom: 26px; }
.sidebar nav { display: flex; flex-direction: column; gap: 4px; }
.sidebar a { color: #e6dfd3; text-decoration: none; border-radius: 10px; padding: 10px 12px; display: flex; gap: 10px; align-items: center; }
.sidebar a.active, .sidebar a:hover { background: rgba(255, 255, 255, 0.08); color: white; }
.sidebar a.active { box-shadow: inset 3px 0 0 #e7c27a; }
.sidebar .logout { margin-top: auto; }
.scrim { display: none; }
.main { min-width: 0; }
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 18px 28px; border-bottom: 1px solid var(--line); background: rgba(243, 238, 230, 0.9); position: sticky; top: 0; z-index: 10; backdrop-filter: blur(8px); }
.topbar h1 { font-size: 26px; margin: 0; }
.who { display: flex; align-items: center; gap: 10px; }
.role-pill { background: var(--gold-soft); color: #6d4d16; border-radius: 99px; padding: 3px 10px; font-size: 12px; font-weight: 650; }
.menu-btn { display: none; }
.content { padding: 24px 28px 48px; }
.page-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-end; margin-bottom: 18px; }
.page-head h1 { font-size: 32px; margin: 0; }
.page-head p, .muted { color: var(--ink-soft); margin: 4px 0 0; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.stat-card, .panel { background: var(--white); border: 1px solid var(--line); border-radius: 16px; }
.stat-card { padding: 16px 16px 14px; }
.stat-label { color: var(--ink-soft); font-size: 13px; }
.stat-value { font-family: "Fraunces", serif; font-size: 28px; line-height: 1.15; margin-top: 4px; }
.panel { padding: 18px; margin-bottom: 16px; }
.panel h2 { font-size: 22px; margin: 0 0 12px; }
.split { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 16px; }
.split-even { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.table-plot { margin: 0; }
.table-plot th { font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-soft); font-weight: 650; border-bottom-color: var(--line); }
.table-plot td { vertical-align: middle; border-color: #efe8dc; }
.status { display: inline-flex; align-items: center; border-radius: 99px; padding: 2px 9px; font-size: 12px; font-weight: 650; background: #eeeae3; color: #4d473f; }
.status-ok { background: #e5f3eb; color: var(--ok); }
.status-booked { background: #f8efda; color: #7a5610; }
.status-sold { background: #e7eef8; color: #234e78; }
.status-warn { background: #f8efda; color: var(--warn); }
.status-danger { background: #f8e6e3; color: var(--danger); }
.status-muted { background: #eeeae3; color: #6b645b; }

.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.filter-bar .form-control, .filter-bar .form-select { width: auto; min-width: 140px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.tabs a { text-decoration: none; color: var(--ink); background: white; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; }
.tabs a.active { background: var(--forest-deep); color: white; border-color: var(--forest-deep); }
.empty { padding: 28px 8px; text-align: center; }
.empty h2 { font-size: 26px; }
.progress { height: 8px; background: #efe8dc; }
.progress-bar { background: var(--forest); }
.alert { border: 0; border-radius: 12px; }
.mini-note { font-size: 13px; color: var(--ink-soft); }
.kv { display: grid; grid-template-columns: 160px 1fr; gap: 6px 12px; }
.kv dt { color: var(--ink-soft); }
.receipt { width: min(820px, 100%); margin: 24px auto; background: white; border: 1px solid var(--line); border-radius: 18px; padding: 32px; }
.receipt-top { display: flex; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); padding-bottom: 16px; margin-bottom: 16px; }
.error-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.error-card { width: min(460px, 100%); background: white; border-radius: 18px; padding: 28px; border: 1px solid var(--line); }

@media (max-width: 991px) {
    .hero, .steps, .role-grid, .feature-grid, .login-shell, .split, .split-even, .stat-grid { grid-template-columns: 1fr; }
    .login-aside { display: none; }
    .app-shell { grid-template-columns: 1fr; }
    .sidebar { position: fixed; z-index: 30; transform: translateX(-105%); transition: transform .2s ease; width: 260px; }
    body.nav-open .sidebar { transform: none; }
    body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(20, 16, 12, 0.45); z-index: 20; }
    .menu-btn { display: inline-flex; }
    .content, .topbar { padding-left: 16px; padding-right: 16px; }
    .stat-grid { grid-template-columns: 1fr 1fr; }
    .kv { grid-template-columns: 1fr; }
}

@media print {
    .no-print, .sidebar, .topbar, .scrim { display: none !important; }
    .app-shell { display: block; }
    body, .content, .receipt { background: white; }
    .content { padding: 0; }
    .receipt { border: 0; margin: 0; width: 100%; }
}
