:root {
    --bg: #f5f7f6;
    --surface: #ffffff;
    --surface-2: #eef4f1;
    --text: #16221e;
    --muted: #66756f;
    --line: #dce5e1;
    --green: #158765;
    --green-2: #0f6e56;
    --red: #c84444;
    --amber: #b46b09;
    --blue: #1f6fb2;
    --shadow: 0 18px 45px rgba(21, 45, 37, .10);
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea {
    font: inherit;
    border-radius: 8px;
}
button, .btn { cursor: pointer; }

::view-transition-group(*),
::view-transition-old(*),
::view-transition-new(*) {
    animation-duration: .25s;
    animation-timing-function: cubic-bezier(.19, 1, .22, 1);
}

.nav {
    height: 64px;
    padding: 0 clamp(16px, 5vw, 64px);
    background: rgba(255,255,255,.94);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    backdrop-filter: blur(16px);
}
.brand {
    display: inline-flex;
    gap: 10px;
    align-items: center;
    font-weight: 800;
    letter-spacing: 0;
}
.brand-mark {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    color: #fff;
    background: var(--green);
    border-radius: 8px;
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 14px;
}
.nav-links a { padding: 9px 11px; border-radius: 8px; }
.nav-links a:hover, .nav-links .active { color: var(--green-2); background: #e3f5ef; }

.btn {
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    padding: 10px 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
}
.btn-primary {
    background: var(--green);
    border-color: var(--green);
    color: #fff;
}
.btn-danger { background: #fff1f1; border-color: #f4c7c7; color: #9b2626; }
.btn-muted { color: var(--muted); background: var(--surface-2); }
.btn:disabled, .disabled { opacity: .55; cursor: not-allowed; }

.hero {
    padding: 42px clamp(16px, 5vw, 64px) 24px;
    background:
        linear-gradient(90deg, rgba(245,247,246,.96) 0%, rgba(245,247,246,.82) 48%, rgba(245,247,246,.18) 100%),
        url("https://images.unsplash.com/photo-1560448204-e02f11c3d0e2?auto=format&fit=crop&w=1800&q=82") center/cover;
    min-height: 430px;
    display: grid;
    align-items: end;
}
.hero-inner { max-width: 1040px; width: 100%; margin: 0 auto; }
.hero-copy { max-width: 650px; }
.eyebrow {
    color: var(--green-2);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}
h1, h2, h3, p { margin-top: 0; }
.hero h1 {
    font-size: clamp(34px, 6vw, 64px);
    line-height: 1.02;
    margin: 12px 0 14px;
}
.hero p { color: var(--muted); font-size: 17px; line-height: 1.7; max-width: 560px; }
.hero-actions, .actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.container {
    width: min(1100px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0 48px;
}
.stats-bar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: -46px auto 28px;
}
.stat-mini, .card, .panel, .history-item, .success-box {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}
.stat-mini { padding: 16px; }
.stat-mini strong { display: block; font-size: 28px; }
.stat-mini span { color: var(--muted); font-size: 13px; }

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 16px;
    margin-bottom: 16px;
}
.section-head h2 { margin-bottom: 5px; font-size: 24px; }
.section-head p { color: var(--muted); margin-bottom: 0; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
    border: 1px solid var(--line);
    padding: 8px 12px;
    background: var(--surface);
    color: var(--muted);
    border-radius: 999px;
    font-size: 13px;
}
.chip.active { background: #e1f5ee; color: var(--green-2); border-color: #b8e4d5; }

.room-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}
.room-card { overflow: hidden; }
.room-card img { height: 190px; width: 100%; object-fit: cover; }
.room-body { padding: 16px; }
.room-top, .row-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}
.room-code { font-weight: 800; }
.room-type { color: var(--muted); font-size: 13px; margin: 3px 0 12px; }
.price { color: var(--green-2); font-size: 21px; font-weight: 800; }
.price small { color: var(--muted); font-size: 12px; font-weight: 600; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0 16px; }
.tags span {
    background: var(--surface-2);
    border-radius: 6px;
    padding: 5px 7px;
    color: var(--muted);
    font-size: 12px;
}
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 12px;
    font-weight: 800;
}
.badge-ok { background: #e1f5ee; color: #085041; }
.badge-full { background: #fcebeb; color: #8d2929; }
.badge-wait { background: #faeeda; color: #744607; }
.badge-blue { background: #e6f1fb; color: #124e86; }

.detail-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 18px;
}
.detail-image {
    height: 340px;
    border-radius: 8px;
    object-fit: cover;
    width: 100%;
}
.panel { padding: 18px; }
.facility-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
.facility-item {
    border: 1px solid var(--line);
    background: #fbfcfc;
    padding: 11px;
    border-radius: 8px;
    color: var(--muted);
}
.form-grid { display: grid; gap: 12px; }
.form-grid label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; }
.form-grid input, .form-grid select, .form-grid textarea, .toolbar select {
    width: 100%;
    border: 1px solid var(--line);
    padding: 11px 12px;
    background: #fff;
    color: var(--text);
}
.form-grid textarea { min-height: 82px; resize: vertical; }
.total-box {
    background: var(--surface-2);
    border-radius: 8px;
    padding: 13px;
}
.total-box div { display: flex; justify-content: space-between; margin-bottom: 7px; color: var(--muted); }
.total-box strong { color: var(--green-2); font-size: 18px; }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 18px; }
.step {
    padding: 11px;
    border-radius: 8px;
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--muted);
    font-weight: 700;
    font-size: 13px;
}
.step.done, .step.active { color: var(--green-2); background: #e1f5ee; border-color: #b8e4d5; }
.payment-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
.method {
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 8px;
    padding: 14px;
    text-align: left;
}
.method.selected { outline: 2px solid var(--green); background: #effaf6; }
.method strong { display: block; margin-bottom: 4px; }
.method span { color: var(--muted); font-size: 12px; }

.history-list { display: grid; gap: 12px; }
.history-item { padding: 16px; }
.history-meta {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    padding: 12px 0;
    margin: 12px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}
.history-meta span { display: block; color: var(--muted); font-size: 12px; }
.history-meta strong { font-size: 13px; }

.success-box {
    text-align: center;
    padding: 34px;
    max-width: 720px;
    margin: 0 auto;
}
.success-icon {
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #dff6ee;
    color: var(--green-2);
    margin: 0 auto 16px;
    font-size: 30px;
}
.receipt {
    text-align: left;
    background: #f6f8f7;
    border-radius: 8px;
    padding: 16px;
    margin: 18px 0;
}
.receipt .line {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    margin-bottom: 9px;
}
.receipt .line:last-child {
    border-top: 1px solid var(--line);
    padding-top: 10px;
    color: var(--text);
    font-weight: 800;
}

.admin-shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.sidebar {
    background: #10251f;
    color: #dceae5;
    padding: 22px;
    position: sticky;
    top: 0;
    height: 100vh;
}
.sidebar .brand { margin-bottom: 24px; }
.sidebar nav { display: grid; gap: 6px; }
.sidebar a { padding: 11px 12px; border-radius: 8px; color: #b8cbc4; }
.sidebar a:hover, .sidebar .active { background: rgba(255,255,255,.08); color: #fff; }
.admin-main { padding: 24px; min-width: 0; }
.admin-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}
.admin-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 14px;
}
.admin-stats article, .admin-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
}
.admin-stats span { color: var(--muted); font-size: 13px; }
.admin-stats strong { display: block; font-size: 25px; margin: 8px 0; }
.admin-grid { display: grid; gap: 14px; margin-bottom: 14px; }
.admin-grid.two { grid-template-columns: 1.2fr .8fr; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td {
    padding: 12px 10px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
}
th { color: var(--muted); font-size: 12px; text-transform: uppercase; }
.inline-form { display: inline-flex; margin-right: 6px; }
.notice {
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid #b8e4d5;
    background: #e1f5ee;
    color: #085041;
    margin-bottom: 14px;
}
.error {
    border-color: #f4c7c7;
    background: #fff1f1;
    color: #8d2929;
}
canvas { width: 100% !important; max-height: 270px; }

@media (max-width: 860px) {
    .nav { height: auto; min-height: 64px; align-items: flex-start; flex-direction: column; padding-top: 12px; padding-bottom: 12px; gap: 8px; }
    .nav-links { overflow-x: auto; width: 100%; }
    .stats-bar, .room-grid, .detail-layout, .admin-grid.two, .admin-stats { grid-template-columns: 1fr; }
    .stats-bar { margin-top: 14px; }
    .history-meta, .payment-grid, .facility-grid, .steps { grid-template-columns: 1fr 1fr; }
    .admin-shell { grid-template-columns: 1fr; }
    .sidebar { position: static; height: auto; }
}

@media (max-width: 540px) {
    .hero { min-height: 360px; }
    .history-meta, .payment-grid, .facility-grid, .steps { grid-template-columns: 1fr; }
    .section-head, .admin-top, .row-between { align-items: flex-start; flex-direction: column; }
    .success-box { padding: 22px; }
}
