:root {
    color-scheme: light;
    --shell: #f2f0ed;
    --shell-gold: #fbf1c9;
    --card: #fff;
    --ink: #1b1b1b;
    --muted: #77736f;
    --line: #eeece7;
    --yellow: #ffd84d;
    --yellow-soft: #fff4c2;
    --dark: #2a2a2a;
    --green-bg: #d6f0dc;
    --green: #1b8a3a;
    --red: #b3261e;
    font-family: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--shell);
    font-synthesis: none;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    background: linear-gradient(118deg, var(--shell) 0%, var(--shell) 55%, var(--shell-gold) 100%);
}
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
.app-shell { width: min(1600px, 100%); min-height: 100vh; margin: 0 auto; padding: 22px clamp(16px, 2vw, 30px) 16px; }

.topbar { display: flex; align-items: center; gap: 16px; min-width: 0; }
.brand { display: inline-flex; align-items: center; flex: 0 0 auto; text-decoration: none; white-space: nowrap; }
.brand img { display: block; width: clamp(112px, 11vw, 145px); height: 38px; object-fit: contain; object-position: left center; }
.main-nav { display: flex; align-items: center; flex: 1 1 auto; gap: 3px; min-width: 0; overflow-x: auto; padding: 4px; border-radius: 999px; background: #fff; scrollbar-width: none; }
.main-nav::-webkit-scrollbar { display: none; }
.nav-link { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; padding: 8px 11px; border-radius: 999px; color: var(--ink); text-decoration: none; font-size: 12px; font-weight: 500; white-space: nowrap; }
.nav-link.is-active { color: #fff; background: var(--dark); }
.nav-link.is-active svg { color: var(--yellow); }
.top-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.icon-button, .avatar { display: grid; width: 34px; height: 34px; place-items: center; padding: 0; border: 1px solid #c9c4b9; border-radius: 50%; background: transparent; text-decoration: none; color: var(--ink); }
.avatar { border: 0; color: var(--yellow); background: var(--dark); font-size: 12px; font-weight: 600; }

.page-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: 17px 0 12px; }
.page-heading h1 { margin: 0; font-size: clamp(27px, 3.4vw, 35px); line-height: 1.08; font-weight: 500; letter-spacing: -.7px; }
.eyebrow { display: none; margin: 0 0 4px; color: var(--muted); font-size: 10px; letter-spacing: .13em; }
.demo-badge { padding: 4px 10px; border: 1px solid #f1cf4a; border-radius: 999px; background: var(--yellow-soft); font-size: 10px; }

.dashboard-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 12px; }
.stat-grid { display: grid; grid-column: 1 / 10; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stat-card { position: relative; display: flex; min-height: 102px; flex-direction: column; justify-content: space-between; padding: 11px 12px 9px; overflow: hidden; border-radius: 17px; }
.stat-grid > .stat-card { text-decoration: none; }
.stat-yellow { color: var(--ink); background: var(--yellow); }
.stat-dark { color: #fff; background: var(--dark); }
.stat-top, .stat-foot { display: flex; align-items: center; justify-content: space-between; gap: 5px; font-size: 11px; }
.stat-top { padding-right: 18px; }
.stat-card strong { margin-top: 5px; font-size: clamp(20px, 2vw, 25px); line-height: 1; letter-spacing: -.4px; }
.stat-foot { margin-top: 6px; font-size: 9px; opacity: .78; }
.round-arrow { position: absolute; top: 5px; right: 5px; display: grid; width: 27px; height: 27px; place-items: center; border: 1px solid #e8e5df; border-radius: 50%; background: rgba(255,255,255,.92); color: var(--ink); }
.stat-top .round-arrow { top: 5px; right: 5px; }
.growth { padding: 2px 7px; border-radius: 999px; background: #fff; color: var(--green); font-size: 9px; font-weight: 600; }

.panel { position: relative; min-width: 0; padding: 14px; border-radius: 19px; background: var(--card); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 24px; margin-bottom: 8px; }
.panel-heading h2, .coming-soon h2 { margin: 0; font-size: 13px; font-weight: 500; letter-spacing: -.1px; }
.panel-heading > .round-arrow { position: static; flex: 0 0 auto; margin: -6px -6px 0 0; }
.destinations { grid-column: 10 / 13; grid-row: 1 / 3; }
.destination-row { display: flex; align-items: center; gap: 8px; min-height: 33px; }
.destination-icon { display: grid; width: 27px; height: 27px; flex: 0 0 auto; place-items: center; border: 1px solid #efd34c; border-radius: 8px; background: #fff5c9; color: #7a5f00; }
.destination-name { min-width: 0; flex: 1; font-size: 10px; line-height: 1.1; }
.destination-name small { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; }
.trend { padding: 3px 7px; border-radius: 99px; background: var(--green-bg); color: var(--green); font-size: 8px; }
.earnings { grid-column: 1 / 7; min-height: 255px; }
.legend { color: var(--muted); font-size: 9px; white-space: nowrap; }
.legend i { display: inline-block; width: 6px; height: 6px; margin-left: 5px; border-radius: 50%; background: #999; vertical-align: 1px; }
.legend i:nth-of-type(2) { background: var(--dark); }
.legend i:nth-of-type(3) { background: var(--yellow); }
.chart-wrap { display: flex; height: 205px; align-items: stretch; gap: 7px; padding: 6px 0 0; }
.chart-ylabels { display: flex; width: 43px; flex: 0 0 auto; flex-direction: column; justify-content: space-between; padding: 0 0 4px; color: var(--muted); font-size: 10px; text-align: right; }
.revenue-chart { width: 100%; height: 100%; overflow: visible; }
.chart-grid { fill: none; stroke: #dcdad6; stroke-dasharray: 3 6; stroke-width: 1; }
.line-year, .line-month, .line-week { fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-width: 3; }
.line-year { stroke: var(--yellow); }
.line-month { stroke: var(--dark); }
.line-week { stroke: #aaa; }
.chart-dot { fill: var(--dark); stroke: #fff; stroke-width: 2; }
.chart-month-labels { fill: var(--muted); font: 10px "Outfit", sans-serif; text-anchor: middle; }
.chart-total { color: var(--muted); font-size: 10px; white-space: nowrap; }
.chart-label { stroke: none; }
.year-label { fill: var(--yellow); }
.month-label { fill: var(--dark); }
.week-label { fill: #bdbdbd; }
.chart-label-text { fill: #fff; font: 600 14px "Outfit", sans-serif; text-anchor: middle; }
.dark-text { fill: var(--ink); }
.latest-bookings { grid-column: 7 / 10; min-height: 255px; }
.package-overview { grid-column: 1 / 10; }
.retention { grid-column: 10 / 13; }
.table-scroll { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 10px; }
th { padding: 7px 8px; background: #fbf3cf; color: var(--muted); font-size: 9px; font-weight: 500; text-align: left; white-space: nowrap; }
th:first-child { border-radius: 8px 0 0 8px; }
th:last-child { border-radius: 0 8px 8px 0; }
td { padding: 8px; border-bottom: 1px solid #f0efec; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
.align-right { text-align: right; }
.package-name { display: inline-flex; align-items: center; gap: 7px; font-weight: 500; }
.package-name .destination-icon { width: 23px; height: 23px; border-radius: 50%; }
.status-pill { display: inline-block; padding: 4px 10px; border-radius: 999px; background: var(--green-bg); color: var(--green); font-size: 9px; }
.status-pill.is-off { background: #e8e8e8; color: #555; }
.table-action, .small-link { padding: 0; border: 0; background: none; color: var(--muted); text-decoration: underline; font-size: 10px; cursor: pointer; }
.invoice-admin { width: min(760px, calc(100% - 32px)); margin: 36px auto; }
.invoice-admin-card { margin-top: 16px; padding: clamp(20px, 4vw, 36px); }
.invoice-admin-card h1 { margin: 7px 0; color: var(--ink); font-size: clamp(25px, 5vw, 36px); }
.invoice-admin-summary { display: flex; justify-content: space-between; gap: 16px; margin: 24px 0; padding: 16px; border-radius: 12px; background: var(--shell); }
.invoice-admin-notice { color: var(--muted); line-height: 1.6; }
.invoice-admin-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 18px 0; }
.invoice-email-button { background: var(--yellow); color: var(--ink); }
.invoice-admin-url { display: grid; gap: 8px; margin-top: 24px; color: var(--muted); font-size: 12px; }
.invoice-admin-url input { width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); }
.small-link { text-decoration: none; }
.bottom-link { display: inline-block; margin: 8px 0 0; text-decoration: underline; }
.row-actions { display: flex; align-items: center; gap: 10px; }
.row-actions form { margin: 0; }
.danger-action { color: var(--red); }
.empty-state { margin: 20px 0; color: var(--muted); font-size: 13px; text-align: center; }
.metric-line { display: flex; justify-content: space-between; margin: 5px 0; font-size: 10px; }
.metric-line strong { font-weight: 500; }
.progress { height: 10px; margin: 6px 0 10px; overflow: hidden; border-radius: 99px; background: repeating-linear-gradient(115deg,#c4c4c4 0 4px,transparent 4px 8px); }
.progress i { display: block; height: 100%; border-radius: inherit; background: var(--yellow); }
.page-footer { display: flex; justify-content: space-between; margin-top: 16px; padding: 0 2px; color: var(--muted); font-size: 10px; }
.page-footer a { text-decoration: none; }
.booking-filters { display: flex; align-items: center; gap: 9px; margin: 0 0 15px; }
.booking-filters label { display: block; }
.booking-filters input, .booking-filters select { min-height: 37px; padding: 8px 11px; border: 1px solid #e4e1da; border-radius: 10px; background: #fff; font-size: 12px; }
.filter-search { flex: 1; }
.filter-search input { width: 100%; }
.booking-filters select { min-width: 132px; }
.booking-filters .primary-button { min-height: 37px; }
.inline-status { margin: 0; }
.booking-status { max-width: 142px; min-height: 29px; padding: 5px 8px; border: 0; border-radius: 99px; background: #e8e8e8; color: #555; font-size: 10px; }
.booking-status.status-Penawaran { background: var(--yellow-soft); color: #665000; }
.booking-status.status-Terkonfirmasi { background: var(--green-bg); color: var(--green); }
.booking-status.status-Selesai { background: var(--dark); color: #fff; }
.booking-status.status-Batal { background: #fbdcd8; color: var(--red); }
.table-subline { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%); }
.revenue-layout, .analytics-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.revenue-stats { grid-column: 1 / -1; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.analytics-layout { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.analytics-row { margin: 15px 0; }
.analytics-label { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 6px; font-size: 12px; }
.analytics-label strong { font-weight: 500; }
.booking-code { margin: -11px 0 20px; color: var(--muted); font-size: 12px; }
.payment-entry, .payment-history { margin-top: 23px; padding-top: 19px; border-top: 1px solid var(--line); }
.payment-entry h2, .payment-history h2 { margin: 0 0 6px; font-size: 16px; font-weight: 500; }
.payment-entry > p { margin: 0 0 15px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.field-help { color: var(--muted); font-size: 10px; font-weight: 400; }
.payment-history .table-scroll { margin-top: 12px; }

.package-management { padding: clamp(18px, 3vw, 28px); }
.package-management .panel-heading { margin-bottom: 18px; }
.package-management .panel-heading h2 { font-size: 20px; }
.panel-description { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.package-management table { font-size: 13px; }
.package-management th { padding: 11px 12px; font-size: 11px; }
.package-management td { padding: 13px 12px; }
.primary-button { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 9px 17px; border: 0; border-radius: 999px; background: var(--yellow); color: var(--ink); text-decoration: none; font-size: 12px; font-weight: 600; cursor: pointer; }
.coming-soon { display: flex; min-height: 250px; flex-direction: column; align-items: flex-start; justify-content: center; gap: 13px; padding: clamp(22px, 5vw, 50px); }
.coming-soon .destination-icon { width: 44px; height: 44px; border-radius: 14px; }
.coming-soon h2 { font-size: 22px; }
.coming-soon p { max-width: 520px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }

.auth-page { display: grid; min-height: 100vh; place-items: center; padding: 24px; }
.auth-card { display: grid; width: min(920px, 100%); min-height: 530px; grid-template-columns: 1fr 1fr; overflow: hidden; border-radius: 28px; background: var(--card); box-shadow: 0 24px 75px rgba(42, 35, 20, .13); }
.auth-aside { position: relative; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; padding: clamp(28px, 5vw, 54px); background: linear-gradient(145deg, #2a2a2a 0%, #242424 58%, #4c421b 100%); color: #fff; }
.auth-aside::before, .auth-aside::after { position: absolute; width: 310px; height: 310px; border-radius: 50%; background: rgba(255,216,77,.11); content: ""; }
.auth-aside::before { top: -150px; right: -140px; }
.auth-aside::after { right: -140px; bottom: -210px; width: 390px; height: 390px; }
.auth-brand { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; color: #fff; font-size: 18px; font-weight: 600; text-decoration: none; }
.auth-brand img { display: block; width: min(195px, 100%); height: 52px; object-fit: contain; object-position: left center; }
.auth-message { position: relative; z-index: 1; max-width: 370px; }
.auth-message .auth-kicker { color: var(--yellow); font-size: 11px; font-weight: 600; letter-spacing: .14em; }
.auth-message h1 { margin: 12px 0; font-size: clamp(32px, 4vw, 46px); font-weight: 500; line-height: 1.06; letter-spacing: -1.2px; }
.auth-message p { margin: 0; color: rgba(255,255,255,.72); font-size: 14px; line-height: 1.7; }
.auth-aside footer { position: relative; z-index: 1; color: rgba(255,255,255,.55); font-size: 11px; }
.auth-form-side { display: flex; align-items: center; justify-content: center; padding: clamp(28px, 5vw, 58px); }
.auth-form { width: min(360px, 100%); }
.auth-form h2 { margin: 0 0 8px; font-size: 28px; font-weight: 500; letter-spacing: -.5px; }
.auth-subtitle { margin: 0 0 28px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.field { display: flex; flex-direction: column; gap: 7px; margin: 0 0 17px; color: #45413d; font-size: 12px; font-weight: 500; }
.field input, .field textarea, .field select { width: 100%; min-height: 45px; padding: 11px 13px; border: 1px solid #e4e1da; border-radius: 11px; outline: none; background: #fff; color: var(--ink); font-size: 14px; }
.field textarea { min-height: 105px; resize: vertical; }
.field input[type="file"] { min-height: auto; padding: 10px; }
.current-image { align-items: flex-start; color: var(--muted); font-size: 12px; }
.current-image img { display: block; width: min(320px, 100%); max-height: 190px; border: 1px solid var(--line); border-radius: 12px; object-fit: cover; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: #d5b62e; box-shadow: 0 0 0 3px rgba(255,216,77,.2); }
.auth-submit { width: 100%; min-height: 46px; margin-top: 5px; border: 0; border-radius: 11px; background: var(--dark); color: #fff; font-size: 13px; font-weight: 600; cursor: pointer; }
.auth-submit:hover { background: #414141; }
.auth-back { margin: 22px 0 0; text-align: center; font-size: 12px; }
.auth-back a { color: var(--muted); text-decoration: none; }
.auth-back a:hover { color: var(--ink); text-decoration: underline; }
.auth-error { margin: 0 0 17px; padding: 11px 13px; border: 1px solid #f0c8c4; border-radius: 10px; background: #fff0ee; color: #a32119; font-size: 12px; }
.form-card { width: min(660px, 100%); padding: clamp(22px, 4vw, 36px); border-radius: 22px; background: var(--card); box-shadow: 0 16px 50px rgba(42,35,20,.08); }
.form-card h1 { margin: 0 0 22px; font-size: 25px; font-weight: 500; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.form-grid .wide { grid-column: 1 / -1; }
.form-check { display: flex; align-items: center; gap: 8px; margin: 3px 0 20px; color: var(--muted); font-size: 13px; }
.form-actions { display: flex; align-items: center; gap: 15px; }
.back-link { color: var(--muted); font-size: 12px; }
.admin-modal { width: min(760px, calc(100vw - 28px)); max-width: 760px; max-height: min(90vh, 900px); padding: 0; overflow: hidden; border: 0; border-radius: 22px; background: var(--shell); color: var(--ink); box-shadow: 0 28px 90px rgba(25, 22, 17, .32); }
.admin-modal::backdrop { background: rgba(20, 19, 17, .58); backdrop-filter: blur(3px); }
.admin-modal-header { position: sticky; z-index: 1; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 17px 22px; border-bottom: 1px solid var(--line); background: var(--card); }
.admin-modal-header h2 { margin: 0; font-size: 18px; font-weight: 500; }
.admin-modal-close { display: grid; width: 34px; height: 34px; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--ink); font-size: 24px; line-height: 1; cursor: pointer; }
.admin-modal-content { max-height: calc(min(90vh, 900px) - 68px); padding: 18px; overflow-y: auto; }
.admin-modal-content .form-card { width: 100%; padding: clamp(17px, 3vw, 28px); box-shadow: none; }
.admin-modal-content .form-card h1 { font-size: 20px; }
.admin-modal-content .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.admin-modal-content .form-grid .wide { grid-column: 1 / -1; }
.admin-modal-content button:disabled { cursor: wait; opacity: .65; }
.modal-loading { margin: 20px; color: var(--muted); text-align: center; }
body:has(.admin-modal[open]) { overflow: hidden; }

@media (min-width: 1400px) {
    .app-shell { padding-top: 26px; }
    .dashboard-grid { gap: 14px; }
    .stat-grid { gap: 14px; }
    .stat-card { min-height: 110px; }
    .panel { padding: 16px; }
}
@media (max-width: 980px) {
    .topbar { flex-wrap: wrap; }
    .main-nav { order: 3; flex-basis: 100%; }
    .top-actions { margin-left: auto; }
    .stat-grid { grid-column: 1 / -1; }
    .earnings, .latest-bookings, .destinations, .package-overview, .retention { grid-column: 1 / -1; grid-row: auto; }
    .destinations { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 14px; }
    .destinations .panel-heading { grid-column: 1 / -1; }
    .revenue-stats { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
    .app-shell { padding: 13px 12px; }
    .brand img { width: 120px; height: 32px; }
    .topbar { gap: 10px; }
    .main-nav { gap: 2px; }
    .nav-link { padding: 8px 9px; font-size: 11px; }
    .nav-link svg { width: 14px; height: 14px; }
    .top-actions { gap: 5px; }
    .icon-button, .avatar { width: 31px; height: 31px; }
    .page-heading { align-items: flex-start; flex-direction: column; gap: 7px; }
    .page-heading h1 { font-size: 29px; }
    .demo-badge { font-size: 9px; }
    .dashboard-grid { gap: 9px; }
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
    .stat-card { min-height: 100px; }
    .panel { padding: 12px; border-radius: 16px; }
    .earnings { min-height: 220px; }
    .chart-wrap { height: 175px; }
    .legend { font-size: 8px; }
    .destinations { grid-template-columns: 1fr; }
    .booking-filters { align-items: stretch; flex-direction: column; }
    .booking-filters select { width: 100%; }
    .analytics-layout { grid-template-columns: 1fr; }
    .revenue-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .package-management { padding: 16px 12px; }
    .package-management .panel-heading { align-items: flex-start; }
    .package-management .panel-heading h2 { font-size: 17px; }
    .package-management th, .package-management td { padding: 10px 8px; }
    .auth-page { padding: 14px; }
    .auth-card { min-height: 0; grid-template-columns: 1fr; border-radius: 22px; }
    .auth-aside { min-height: 205px; padding: 23px; }
    .auth-message { margin-top: 22px; }
    .auth-message h1 { margin: 7px 0; font-size: 29px; }
    .auth-message p, .auth-aside footer { display: none; }
    .auth-form-side { padding: 26px 23px 30px; }
    .auth-subtitle { margin-bottom: 21px; }
    .form-grid { grid-template-columns: 1fr; }
    .form-grid .wide { grid-column: auto; }
    .admin-modal { width: calc(100vw - 16px); max-height: 94vh; border-radius: 17px; }
    .admin-modal-header { padding: 13px 16px; }
    .admin-modal-content { max-height: calc(94vh - 60px); padding: 9px; }
    .admin-modal-content .form-grid { grid-template-columns: 1fr; }
    .admin-modal-content .form-grid .wide { grid-column: auto; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; }
}
