:root {
  --pine: #0c3737;
  --pine-2: #124b49;
  --teal: #1f8078;
  --teal-soft: #e5f2ef;
  --sand: #f5f1e9;
  --terracotta: #d5844f;
  --terracotta-soft: #fbede4;
  --ink: #1a2928;
  --muted: #6e7d7b;
  --line: #e5e9e7;
  --surface: #ffffff;
  --canvas: #f4f6f4;
  --danger: #b94a48;
  --danger-soft: #fbeaea;
  --shadow: 0 12px 35px rgba(24, 51, 48, .08);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { color-scheme: light; }
body { margin: 0; min-width: 320px; color: var(--ink); background: var(--canvas); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }
.icon-sprite { width: 0; height: 0; position: absolute; overflow: hidden; }
.muted { color: var(--muted); }
.eyebrow { margin: 0 0 6px; color: var(--teal); font-size: 11px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.plain-button { border: 0; background: transparent; cursor: pointer; }
.form-error { min-height: 20px; margin: 6px 0 0; color: var(--danger); font-size: 13px; font-weight: 600; }

.login-view { min-height: 100dvh; display: grid; place-items: center; padding: 24px; background: var(--pine); position: relative; overflow: hidden; }
.login-atmosphere { position: absolute; inset: 0; pointer-events: none; }
.login-atmosphere::before { content: ""; position: absolute; inset: -15%; background: radial-gradient(circle at 75% 20%, rgba(61, 155, 142, .25), transparent 30%), radial-gradient(circle at 20% 80%, rgba(213, 132, 79, .2), transparent 26%); }
.login-atmosphere span { position: absolute; display: block; border: 1px solid rgba(255,255,255,.08); border-radius: 50%; }
.login-atmosphere span:nth-child(1) { width: 440px; height: 440px; right: -140px; top: -90px; }
.login-atmosphere span:nth-child(2) { width: 220px; height: 220px; right: 120px; top: 130px; }
.login-atmosphere span:nth-child(3) { width: 520px; height: 520px; left: -250px; bottom: -260px; }
.login-card { position: relative; width: min(100%, 460px); background: rgba(255,255,255,.98); border-radius: 28px; padding: 38px 42px 30px; box-shadow: 0 35px 90px rgba(0,0,0,.28); }
.login-brand { display: flex; align-items: center; justify-content: space-between; min-height: 54px; padding: 0 18px; margin: -38px -42px 34px; background: var(--pine-2); border-radius: 28px 28px 0 0; }
.login-brand img { width: 168px; height: auto; }
.login-brand span { color: rgba(255,255,255,.68); font-size: 11px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.login-copy h1 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-weight: 500; font-size: clamp(31px, 5vw, 41px); line-height: 1.08; letter-spacing: -.035em; }
.login-copy > p:last-child { margin: 14px 0 28px; color: var(--muted); line-height: 1.55; }
.login-form { display: grid; gap: 16px; }
.login-form label, .form-grid label { display: grid; gap: 7px; color: #526361; font-size: 12px; font-weight: 750; }
.login-form input, .form-grid input, .form-grid select, .form-grid textarea, .page-toolbar input, .page-toolbar select { width: 100%; min-height: 46px; border: 1px solid #dce3e0; border-radius: 11px; padding: 0 13px; color: var(--ink); background: #fff; outline: none; transition: border-color .18s, box-shadow .18s; }
.login-form input:focus, .form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus, .page-toolbar input:focus, .page-toolbar select:focus { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(31,128,120,.11); }
.password-wrap { position: relative; display: block; }
.password-wrap input { padding-right: 70px; }
.password-wrap button { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--teal); font-size: 12px; font-weight: 800; }
.button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 11px; padding: 0 16px; cursor: pointer; font-weight: 750; font-size: 13px; white-space: nowrap; transition: transform .15s, box-shadow .15s, background .15s; }
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button svg { width: 17px; height: 17px; fill: currentColor; }
.button-primary { background: var(--teal); color: white; box-shadow: 0 8px 18px rgba(31,128,120,.18); }
.button-primary:hover { background: #176f69; }
.button-quiet { background: #fff; border-color: var(--line); color: #40514f; }
.button-quiet:hover { background: #f7f9f8; }
.button-danger { background: var(--danger-soft); border-color: #f2cece; color: var(--danger); }
.button-wide { width: 100%; min-height: 50px; justify-content: space-between; padding: 0 18px; margin-top: 2px; }
.button-small { min-height: 36px; padding: 0 12px; font-size: 12px; }
.login-foot { margin: 23px 0 0; color: #93a09e; text-align: center; font-size: 11px; }

.app-view { min-height: 100dvh; display: grid; grid-template-columns: 252px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100dvh; z-index: 10; display: flex; flex-direction: column; color: white; background: var(--pine); padding: 26px 18px 20px; }
.sidebar-brand { display: grid; gap: 9px; padding: 4px 12px 34px; }
.sidebar-brand img { width: 183px; max-width: 100%; height: auto; }
.sidebar-brand span { color: rgba(255,255,255,.5); font-size: 10px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; }
.side-nav { display: grid; gap: 6px; }
.nav-item { border: 0; background: transparent; cursor: pointer; }
.side-nav .nav-item { min-height: 48px; display: flex; align-items: center; gap: 13px; border-radius: 11px; padding: 0 13px; color: rgba(255,255,255,.65); font-weight: 650; font-size: 13px; text-align: left; }
.nav-item svg { width: 20px; height: 20px; fill: currentColor; flex: 0 0 auto; }
.side-nav .nav-item:hover { color: white; background: rgba(255,255,255,.06); }
.side-nav .nav-item.active { color: white; background: rgba(255,255,255,.12); }
.sidebar-bottom { margin-top: auto; }
.mini-property { display: flex; align-items: center; gap: 11px; margin: 0 5px 13px; padding: 13px 8px; border-top: 1px solid rgba(255,255,255,.1); border-bottom: 1px solid rgba(255,255,255,.1); }
.mini-property img { width: 25px; height: 25px; object-fit: contain; image-rendering: auto; }
.mini-property span { display: grid; gap: 3px; }
.mini-property strong { font-size: 12px; }
.mini-property small { color: rgba(255,255,255,.5); font-size: 10px; }
.logout-button { width: 100%; min-height: 42px; display: flex; align-items: center; gap: 12px; border: 0; border-radius: 10px; padding: 0 13px; color: rgba(255,255,255,.55); background: transparent; cursor: pointer; font-size: 12px; }
.logout-button:hover { color: white; background: rgba(255,255,255,.06); }
.logout-button svg { width: 18px; height: 18px; }

.main-content { min-width: 0; }
.topbar { height: 92px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 clamp(22px, 4vw, 54px); border-bottom: 1px solid var(--line); background: rgba(244,246,244,.94); backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 8; }
.topbar-date { margin: 0 0 2px; color: var(--muted); font-size: 11px; font-weight: 650; text-transform: capitalize; }
.topbar h1 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-weight: 500; font-size: 25px; letter-spacing: -.02em; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.avatar { width: 38px; height: 38px; display: grid; place-items: center; margin-left: 4px; border-radius: 50%; color: white; background: var(--pine); font-size: 13px; font-weight: 800; }
.mobile-settings-button, .mobile-logout-button { display: none; }
.pages { padding: 32px clamp(22px, 4vw, 54px) 55px; }
.page { display: none; animation: pageIn .22s ease-out; }
.page.active { display: block; }
@keyframes pageIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.welcome-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 25px; }
.welcome-row h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(28px, 4vw, 40px); line-height: 1.1; font-weight: 500; letter-spacing: -.035em; }
.welcome-row .muted { margin: 8px 0 0; font-size: 14px; }
.room-pills { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.room-pill { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 999px; padding: 8px 11px; background: #fff; font-size: 11px; font-weight: 700; }
.room-pill i { width: 8px; height: 8px; border-radius: 50%; }
.room-pill small { color: var(--muted); font-weight: 600; }
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; margin-bottom: 18px; }
.kpi-card { min-width: 0; position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); padding: 19px 20px; background: var(--surface); box-shadow: 0 7px 24px rgba(23,55,51,.035); }
.kpi-card::after { content: ""; position: absolute; right: -18px; top: -25px; width: 75px; height: 75px; border-radius: 50%; background: var(--teal-soft); opacity: .75; }
.kpi-card.expense::after { background: var(--terracotta-soft); }
.kpi-label { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 11px; font-weight: 750; }
.kpi-icon { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 9px; color: var(--teal); background: var(--teal-soft); position: relative; z-index: 1; }
.expense .kpi-icon { color: var(--terracotta); background: var(--terracotta-soft); }
.kpi-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.kpi-value { margin: 10px 0 2px; overflow: hidden; text-overflow: ellipsis; font-size: clamp(22px, 2.4vw, 31px); font-weight: 720; letter-spacing: -.035em; }
.kpi-note { margin: 0; color: #94a09e; font-size: 10px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(260px, .75fr); gap: 18px; margin-top: 18px; }
.dashboard-grid.lower-grid { grid-template-columns: 1fr 1fr; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.panel-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 22px 0; }
.panel-header h3, .settings-card h3 { margin: 0; font-size: 16px; letter-spacing: -.015em; }
.segmented { display: flex; padding: 3px; border-radius: 9px; background: #f0f3f1; }
.segmented button { min-height: 28px; border: 0; border-radius: 7px; padding: 0 9px; color: var(--muted); background: transparent; cursor: pointer; font-size: 10px; font-weight: 750; }
.segmented button.active { color: var(--ink); background: white; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.cash-chart { min-height: 230px; padding: 16px 16px 0; }
.cash-chart svg { width: 100%; height: 220px; display: block; overflow: visible; }
.cash-chart .grid-line { stroke: #e9edeb; stroke-width: 1; }
.cash-chart .axis-label { fill: #8b9795; font-size: 9px; }
.cash-chart .bar { transition: opacity .15s, transform .15s; transform-box: fill-box; transform-origin: bottom; }
.cash-chart .bar:hover { opacity: .78; transform: scaleY(1.03); }
.chart-legend { display: flex; gap: 18px; padding: 3px 22px 20px; color: var(--muted); font-size: 10px; font-weight: 700; }
.chart-legend span { display: flex; align-items: center; gap: 6px; }
.chart-legend i { width: 8px; height: 8px; border-radius: 2px; }
.income-dot { background: var(--teal); }
.expense-dot { background: var(--terracotta); }
.occupancy-content { min-height: 265px; display: grid; place-items: center; align-content: center; gap: 18px; padding: 12px 22px 24px; }
.donut { --value: 0; width: 148px; height: 148px; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--teal) calc(var(--value) * 1%), #edf1ef 0); position: relative; }
.donut::after { content: ""; width: 108px; height: 108px; border-radius: 50%; background: #fff; }
.donut-label { position: absolute; z-index: 1; display: grid; place-items: center; }
.donut-label strong { font-size: 30px; letter-spacing: -.04em; }
.donut-label span { color: var(--muted); font-size: 10px; }
.occupancy-meta { width: 100%; display: flex; justify-content: space-around; gap: 12px; padding-top: 16px; border-top: 1px solid var(--line); text-align: center; }
.occupancy-meta strong { display: block; font-size: 14px; }
.occupancy-meta span { color: var(--muted); font-size: 9px; }
.text-button { border: 0; padding: 3px 0; color: var(--teal); background: transparent; cursor: pointer; font-size: 11px; font-weight: 800; }
.stack-list { padding: 10px 12px 13px; }
.stack-item { min-height: 58px; display: flex; align-items: center; gap: 12px; border-radius: 11px; padding: 9px 10px; cursor: default; }
.stack-item.clickable { cursor: pointer; }
.stack-item:hover { background: #f7f9f8; }
.date-tile { width: 38px; min-width: 38px; height: 40px; display: grid; place-items: center; align-content: center; border-radius: 9px; color: var(--pine); background: var(--teal-soft); line-height: 1; }
.date-tile strong { font-size: 14px; }
.date-tile span { margin-top: 3px; font-size: 8px; font-weight: 800; text-transform: uppercase; }
.stack-body { min-width: 0; flex: 1; }
.stack-body strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.stack-body span { display: block; margin-top: 3px; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.stack-aside { text-align: right; font-size: 11px; font-weight: 750; }
.stack-aside small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; font-weight: 600; }
.empty-state { min-height: 150px; display: grid; place-items: center; align-content: center; gap: 7px; color: var(--muted); text-align: center; padding: 25px; }
.empty-state .empty-mark { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; color: var(--teal); background: var(--teal-soft); font-size: 20px; }
.empty-state strong { color: var(--ink); font-size: 12px; }
.empty-state span { font-size: 10px; }

.page-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.calendar-toolbar { min-height: 45px; }
.month-switch { display: flex; align-items: center; gap: 8px; }
.month-switch h2 { min-width: 190px; margin: 0 7px; font-family: Georgia, "Times New Roman", serif; font-weight: 500; font-size: 24px; text-transform: capitalize; }
.icon-button { width: 38px; height: 38px; display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: #fff; cursor: pointer; font-size: 22px; }
.icon-button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; }
.room-legend { display: flex; align-items: center; gap: 13px; color: var(--muted); font-size: 10px; font-weight: 700; }
.room-legend span { display: flex; align-items: center; gap: 6px; }
.room-legend i { width: 9px; height: 9px; border-radius: 3px; }
.calendar-panel { overflow: hidden; box-shadow: none; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(92px, 1fr)); min-width: 700px; }
.calendar-head { min-height: 38px; display: grid; place-items: center; border-bottom: 1px solid var(--line); color: var(--muted); background: #fafbfa; font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.calendar-day { min-height: 112px; display: flex; flex-direction: column; gap: 5px; border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 8px; color: var(--ink); background: white; cursor: pointer; text-align: left; }
.calendar-day:nth-child(7n) { border-right: 0; }
.calendar-day:hover { background: #fbfcfb; }
.calendar-day.outside { background: #fafbfa; color: #adb6b4; }
.calendar-day.today { box-shadow: inset 0 0 0 2px var(--teal); }
.day-number { width: 25px; height: 25px; display: grid; place-items: center; border: 0; border-radius: 50%; padding: 0; color: inherit; background: transparent; cursor: pointer; font-size: 11px; font-weight: 750; }
.today .day-number { color: white; background: var(--teal); }
.booking-chip { width: 100%; min-height: 22px; display: block; overflow: hidden; border: 0; border-left: 3px solid var(--room-color); border-radius: 5px; padding: 4px 6px; color: #354744; background: color-mix(in srgb, var(--room-color) 12%, white); text-overflow: ellipsis; white-space: nowrap; cursor: pointer; text-align: left; font-size: 9px; font-weight: 750; }
.booking-chip.pending { opacity: .65; border-left-style: dashed; }
.booking-chip.cancelled { opacity: .4; text-decoration: line-through; }

.search-box { position: relative; width: min(380px, 100%); }
.search-box svg { position: absolute; left: 13px; top: 50%; width: 17px; height: 17px; transform: translateY(-50%); fill: none; stroke: var(--muted); }
.search-box input { padding-left: 40px; }
.filters { display: flex; gap: 9px; }
.page-toolbar select { width: auto; min-width: 145px; }
.table-panel { overflow: hidden; box-shadow: none; }
.table-title { align-items: center; padding-bottom: 16px; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 11px 14px; color: var(--muted); background: #fafbfa; font-size: 9px; font-weight: 800; letter-spacing: .07em; text-align: left; text-transform: uppercase; }
td { border-bottom: 1px solid #edf0ef; padding: 13px 14px; font-size: 11px; vertical-align: middle; }
tbody tr { cursor: pointer; }
tbody tr:hover { background: #fbfcfb; }
.guest-cell strong { display: block; margin-bottom: 3px; font-size: 12px; }
.guest-cell span { color: var(--muted); font-size: 9px; }
.room-cell { display: flex; align-items: center; gap: 7px; }
.room-cell i { width: 8px; height: 8px; border-radius: 3px; background: var(--room-color); }
.status-badge { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 5px 8px; font-size: 9px; font-weight: 800; }
.status-badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-confirmed { color: #196b61; background: #e5f3ef; }
.status-pending { color: #a66b29; background: #fbf1df; }
.status-cancelled { color: #8b5553; background: #f5e9e8; }
.row-arrow { color: #a0aaa8; font-size: 19px; }

.finance-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.finance-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, .65fr); gap: 18px; }
.finance-list-panel { overflow: hidden; box-shadow: none; }
.embedded-toolbar { justify-content: flex-start; margin: 15px 18px 4px; }
.embedded-toolbar .search-box { flex: 1; }
.embedded-toolbar select { min-width: 110px; }
.export-button { flex: 0 0 auto; }
.transaction-list { padding: 4px 10px 12px; }
.transaction-item { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 11px; border-bottom: 1px solid #edf0ef; border-radius: 9px; padding: 12px 9px; cursor: pointer; }
.transaction-item:hover { background: #fafbfa; }
.tx-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; color: #1d7068; background: var(--teal-soft); font-size: 18px; font-weight: 600; }
.expense-row .tx-icon { color: #b66c3e; background: var(--terracotta-soft); }
.tx-body { min-width: 0; }
.tx-body strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.tx-body span { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
.tx-amount { text-align: right; color: #196b61; font-size: 12px; font-weight: 800; }
.expense-row .tx-amount { color: #b66c3e; }
.tx-amount small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; font-weight: 600; }
.category-panel { min-height: 380px; box-shadow: none; }
#category-chart { display: grid; place-items: center; gap: 22px; padding: 30px 22px; }
.category-donut { width: 160px; height: 160px; display: grid; place-items: center; border-radius: 50%; position: relative; }
.category-donut::after { content: ""; width: 104px; height: 104px; border-radius: 50%; background: white; }
.category-donut span { position: absolute; z-index: 1; display: grid; gap: 3px; text-align: center; }
.category-donut strong { font-size: 18px; }
.category-donut small { color: var(--muted); font-size: 9px; }
.category-legend { width: 100%; display: grid; gap: 9px; }
.category-legend div { display: grid; grid-template-columns: 8px 1fr auto; align-items: center; gap: 8px; font-size: 10px; }
.category-legend i { width: 8px; height: 8px; border-radius: 3px; }
.category-legend span { color: var(--muted); }
.category-legend strong { font-size: 10px; }

.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.settings-card { min-height: 210px; display: grid; grid-template-columns: 45px 1fr; align-content: start; gap: 17px; padding: 24px; box-shadow: none; }
.settings-card .muted { max-width: 480px; margin: 10px 0 16px; line-height: 1.6; font-size: 11px; }
.settings-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; color: var(--teal); background: var(--teal-soft); }
.settings-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; }
.settings-icon img { max-width: 24px; max-height: 24px; }
.settings-rooms { display: grid; gap: 8px; margin-top: 15px; }
.settings-room { display: grid; grid-template-columns: 9px 1fr auto; align-items: center; gap: 9px; border-radius: 9px; padding: 9px 11px; background: #f7f9f8; font-size: 11px; }
.settings-room i { width: 9px; height: 9px; border-radius: 3px; }
.settings-room span { color: var(--muted); font-size: 9px; }
.security-badge { display: inline-flex; border-radius: 999px; padding: 6px 9px; color: #196b61; background: var(--teal-soft); font-size: 9px; font-weight: 800; }

.mobile-nav { display: none; }
.modal { width: min(720px, calc(100% - 28px)); max-height: calc(100dvh - 30px); overflow: auto; border: 0; border-radius: 20px; padding: 0; color: var(--ink); background: white; box-shadow: 0 28px 80px rgba(0,0,0,.28); }
.modal::backdrop, .confirm-dialog::backdrop { background: rgba(10,35,34,.64); backdrop-filter: blur(3px); }
.modal form { padding: 24px; }
.modal-small { width: min(570px, calc(100% - 28px)); }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 21px; }
.modal-header h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-weight: 500; font-size: 25px; }
.modal-close { width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 9px; color: var(--muted); background: #f3f5f4; cursor: pointer; font-size: 22px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.form-grid .span-2 { grid-column: span 2; }
.form-grid textarea { min-height: 80px; padding-top: 11px; resize: vertical; }
.money-label { position: relative; }
.money-label input { padding-right: 32px; }
.money-label > span { position: absolute; right: 13px; bottom: 14px; color: var(--muted); }
.modal-actions { display: grid; grid-template-columns: auto 1fr auto auto; gap: 9px; align-items: center; margin-top: 20px; padding-top: 17px; border-top: 1px solid var(--line); }
.type-selector { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 17px; padding: 4px; border-radius: 11px; background: #f0f3f1; }
.type-selector input { position: absolute; opacity: 0; }
.type-selector span { min-height: 36px; display: grid; place-items: center; border-radius: 8px; color: var(--muted); cursor: pointer; font-size: 12px; font-weight: 800; }
.type-selector input:checked + span { color: var(--teal); background: white; box-shadow: 0 2px 8px rgba(0,0,0,.07); }
.type-selector label:last-child input:checked + span { color: var(--terracotta); }
.confirm-dialog { width: min(390px, calc(100% - 28px)); border: 0; border-radius: 18px; padding: 0; text-align: center; }
.confirm-dialog form { padding: 27px; }
.confirm-icon { width: 44px; height: 44px; display: grid; place-items: center; margin: 0 auto 13px; border-radius: 50%; color: var(--danger); background: var(--danger-soft); font-weight: 900; }
.confirm-dialog h3 { margin: 0; font-size: 18px; }
.confirm-dialog p { margin: 10px 0 22px; color: var(--muted); line-height: 1.5; font-size: 12px; }
.confirm-dialog form > div:last-child { display: flex; justify-content: center; gap: 9px; }
.toast-region { position: fixed; right: 18px; bottom: 18px; z-index: 100; display: grid; gap: 8px; pointer-events: none; }
.toast { min-width: 250px; max-width: 370px; display: flex; align-items: center; gap: 10px; border: 1px solid #dfe6e3; border-radius: 12px; padding: 12px 14px; color: var(--ink); background: white; box-shadow: 0 14px 35px rgba(20,48,45,.18); font-size: 11px; font-weight: 700; animation: toastIn .2s ease-out; }
.toast::before { content: "✓"; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--teal); font-size: 10px; }
.toast.error::before { content: "!"; background: var(--danger); }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 1100px) {
  .app-view { grid-template-columns: 210px minmax(0, 1fr); }
  .sidebar { padding-inline: 12px; }
  .sidebar-brand { padding-inline: 9px; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .occupancy-content { min-height: auto; grid-template-columns: auto 1fr; }
  .finance-layout { grid-template-columns: 1fr; }
  .category-panel { min-height: auto; }
  #category-chart { grid-template-columns: auto 1fr; }
}

@media (max-width: 780px) {
  body { padding-bottom: env(safe-area-inset-bottom); }
  .app-view { display: block; }
  .sidebar { display: none; }
  .topbar { height: 76px; padding: 0 16px; }
  .topbar h1 { font-size: 21px; }
  .topbar-date { font-size: 9px; }
  .topbar-actions { gap: 6px; }
  .topbar-actions .button-primary { width: 40px; min-height: 40px; padding: 0; border-radius: 50%; }
  .topbar-actions .button-primary span, .hide-mobile, .avatar { display: none; }
  .mobile-settings-button { width: 40px; height: 40px; display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--pine); background: white; }
  .mobile-settings-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; }
  .pages { padding: 22px 14px 94px; }
  .welcome-row { display: block; }
  .welcome-row h2 { font-size: 30px; }
  .room-pills { justify-content: flex-start; margin-top: 16px; }
  .kpi-grid { gap: 10px; }
  .kpi-card { padding: 15px; }
  .kpi-value { font-size: 23px; }
  .dashboard-grid, .dashboard-grid.lower-grid { grid-template-columns: 1fr; gap: 12px; }
  .panel-header { padding: 18px 16px 0; }
  .cash-chart { padding-inline: 8px; }
  .cash-chart svg { height: 190px; }
  .occupancy-content { grid-template-columns: 1fr; }
  .mobile-nav { position: fixed; left: 9px; right: 9px; bottom: max(9px, env(safe-area-inset-bottom)); z-index: 20; height: 66px; display: grid; grid-template-columns: 1fr 1fr 62px 1fr 1fr; align-items: center; border: 1px solid rgba(255,255,255,.13); border-radius: 18px; padding: 5px 8px; color: rgba(255,255,255,.6); background: rgba(12,55,55,.97); box-shadow: 0 16px 35px rgba(10,35,34,.25); backdrop-filter: blur(12px); }
  .mobile-nav .nav-item { height: 54px; display: grid; place-items: center; align-content: center; gap: 3px; color: inherit; }
  .mobile-nav .nav-item.active { color: white; }
  .mobile-nav .nav-item svg { width: 19px; height: 19px; }
  .mobile-nav .nav-item span { font-size: 8px; font-weight: 700; }
  .mobile-create { width: 51px; height: 51px; display: grid; place-items: center; align-self: end; margin: 0 auto 16px; border: 4px solid var(--canvas); border-radius: 50%; color: white; background: var(--terracotta); box-shadow: 0 7px 16px rgba(213,132,79,.35); }
  .mobile-create svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; }
  .page-toolbar { align-items: stretch; flex-direction: column; }
  .calendar-toolbar { gap: 14px; }
  .month-switch { flex-wrap: wrap; }
  .month-switch h2 { min-width: 145px; flex: 1; font-size: 21px; }
  .room-legend { justify-content: flex-start; }
  .calendar-panel { overflow: hidden; }
  .calendar-grid { min-width: 100%; grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .calendar-day { min-height: 84px; gap: 3px; padding: 5px 3px; }
  .calendar-head { min-height: 34px; font-size: 8px; }
  .day-number { width: 22px; height: 22px; font-size: 10px; }
  .booking-chip { min-height: 17px; border-left-width: 2px; padding: 3px 2px; font-size: 0; text-align: center; }
  .booking-chip::after { content: attr(data-room); font-size: 7px; }
  .filters { width: 100%; }
  .filters select { flex: 1; min-width: 0; }
  .table-scroll { overflow: visible; }
  table, thead, tbody, tr, th, td { display: block; }
  thead { display: none; }
  tbody { padding: 6px 10px 12px; }
  tbody tr { display: grid; grid-template-columns: 1fr auto; gap: 8px 14px; border-bottom: 1px solid var(--line); border-radius: 11px; padding: 12px 7px; }
  tbody tr:hover { background: #fafbfa; }
  td { border: 0; padding: 0; }
  td:nth-child(1), td:nth-child(2), td:nth-child(3) { grid-column: 1; }
  td:nth-child(4) { display: none; }
  td:nth-child(5), td:nth-child(6) { grid-column: 2; grid-row: 1; text-align: right; }
  td:nth-child(5) { grid-row: 2; }
  td:nth-child(7) { display: none; }
  .embedded-toolbar { flex-direction: row; flex-wrap: wrap; }
  .embedded-toolbar .search-box { width: 100%; flex-basis: 100%; }
  .settings-grid { grid-template-columns: 1fr; }
  .settings-card { min-height: auto; padding: 20px; }
  .mobile-logout-button { display: inline-flex; margin-top: 15px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: span 1; }
  .modal { width: 100%; max-height: 92dvh; margin: auto 0 0; border-radius: 21px 21px 0 0; }
  .modal form { padding: 20px 16px max(20px, env(safe-area-inset-bottom)); }
  .modal-actions { grid-template-columns: 1fr 1fr; }
  .modal-actions > span { display: none; }
  .modal-actions .button-danger { grid-column: span 2; order: 3; }
  .toast-region { left: 12px; right: 12px; bottom: 86px; }
  .toast { min-width: 0; max-width: none; }
}

@media (max-width: 480px) {
  .login-view { padding: 12px; }
  .login-card { padding: 32px 24px 24px; border-radius: 22px; }
  .login-brand { margin: -32px -24px 28px; padding: 0 14px; border-radius: 22px 22px 0 0; }
  .login-brand img { width: 148px; }
  .login-brand span { font-size: 9px; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .kpi-note { display: none; }
  .kpi-icon { width: 28px; height: 28px; }
  .finance-kpis { grid-template-columns: 1fr; }
  #category-chart { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
