:root {
  --ink: #16211d;
  --muted: #68736e;
  --line: #e3e8e5;
  --paper: #ffffff;
  --canvas: #f4f6f4;
  --forest: #16382c;
  --forest-2: #245341;
  --sage: #dfeae3;
  --gold: #c89445;
  --coral: #c86652;
  --blue: #507ea1;
  --shadow: 0 14px 40px rgba(28, 49, 41, .08);
}

* { box-sizing: border-box; }
html { background: var(--canvas); }
body { margin: 0; color: var(--ink); background: var(--canvas); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, select { font: inherit; }
button { cursor: pointer; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 250px 1fr; }
.app-shell.app-hidden { display: none; }
.auth-screen { min-height: 100vh; padding: 24px; display: grid; place-items: center; background: radial-gradient(circle at 88% 12%, #dce8df 0, transparent 28%), linear-gradient(135deg, #edf2ee, #faf7f0); }
.auth-screen[hidden] { display: none; }
.auth-layout { width: min(1080px, 100%); display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(360px, .75fr); align-items: stretch; border: 1px solid rgba(255,255,255,.8); border-radius: 30px; background: rgba(255,255,255,.74); box-shadow: 0 30px 90px rgba(22,56,44,.16); overflow: hidden; backdrop-filter: blur(14px); }
.promo-panel { position: relative; isolation: isolate; min-height: 610px; padding: clamp(34px, 5vw, 62px); overflow: hidden; color: white; background: var(--forest); display: flex; flex-direction: column; }
.promo-panel::before, .promo-panel::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; }
.promo-panel::before { width: 430px; height: 430px; top: -240px; right: -130px; background: rgba(210,232,217,.14); }
.promo-panel::after { width: 320px; height: 320px; right: -120px; bottom: -160px; border: 70px solid rgba(240,224,189,.1); }
.promo-brand { display: flex; align-items: center; gap: 12px; }
.promo-brand strong, .promo-brand span { display: block; }
.promo-brand strong { font-size: 15px; }
.promo-brand span { margin-top: 3px; color: rgba(255,255,255,.58); font-size: 11px; }
.promo-copy { max-width: 580px; margin-top: auto; padding-top: 55px; }
.promo-copy .eyebrow { color: #e2bd79; }
.promo-copy h1 { margin: 12px 0 16px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(38px, 5vw, 58px); font-weight: 500; line-height: 1.02; letter-spacing: -.025em; }
.promo-copy > p:last-child { max-width: 530px; margin: 0; color: rgba(255,255,255,.7); font-size: 14px; line-height: 1.7; }
.promo-features { margin-top: 34px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.promo-features > div { min-width: 0; padding: 14px; border: 1px solid rgba(255,255,255,.1); border-radius: 14px; background: rgba(255,255,255,.07); }
.promo-features span { width: 30px; height: 30px; margin-bottom: 11px; border-radius: 9px; display: grid; place-items: center; color: var(--forest); background: #f0e0bd; font-weight: 800; }
.promo-features strong, .promo-features small { display: block; }
.promo-features strong { font-size: 11px; }
.promo-features small { margin-top: 5px; color: rgba(255,255,255,.52); font-size: 9px; line-height: 1.45; }
.promo-showcase { margin-top: 18px; padding: 16px 18px; border-radius: 15px; color: var(--ink); background: rgba(255,255,255,.92); display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 5px 25px; box-shadow: 0 15px 35px rgba(0,0,0,.15); }
.promo-showcase small, .promo-showcase span { color: var(--muted); font-size: 9px; }
.promo-showcase strong { display: block; margin-top: 2px; font-family: Georgia, serif; font-size: 26px; font-weight: 500; }
.promo-showcase > span { grid-column: 1 / -1; }
.promo-bars { height: 40px; display: flex; align-items: flex-end; gap: 5px; }
.promo-bars i { flex: 1; border-radius: 4px 4px 2px 2px; background: #b8d0bf; }
.promo-bars i:nth-child(1) { height: 45%; } .promo-bars i:nth-child(2) { height: 70%; } .promo-bars i:nth-child(3) { height: 56%; } .promo-bars i:nth-child(4) { height: 88%; background: var(--forest); } .promo-bars i:nth-child(5) { height: 76%; }
.auth-card { width: 100%; padding: clamp(30px, 4vw, 50px); background: rgba(255,255,255,.96); display: flex; flex-direction: column; justify-content: center; }
.auth-brand { display: flex; align-items: center; gap: 12px; padding-bottom: 25px; border-bottom: 1px solid var(--line); }
.auth-brand strong, .auth-brand span { display: block; }
.auth-brand span { margin-top: 3px; color: var(--muted); font-size: 11px; }
.auth-copy { margin: 0 0 28px; }
.auth-copy h2 { margin: 7px 0 9px; font-family: Georgia, serif; font-size: 32px; font-weight: 500; }
.auth-copy > p:last-child { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.auth-card form { display: grid; gap: 15px; }
.password-field { position: relative; display: block; }
.password-field input { padding-right: 48px; }
.password-toggle { position: absolute; top: 50%; right: 5px; width: 38px; height: 38px; transform: translateY(-50%); border: 0; border-radius: 9px; padding: 9px; color: var(--muted); background: transparent; display: grid; place-items: center; }
.password-toggle:hover { color: var(--forest); background: var(--sage); }
.password-toggle:focus-visible { outline: 2px solid var(--forest-2); outline-offset: 1px; }
.password-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.password-toggle.is-visible { color: var(--forest); background: #edf2ee; }
.auth-submit { width: 100%; margin-top: 2px; }
.demo-hint { margin: 18px 0 0; color: var(--muted); font-size: 10px; text-align: center; }
.forgot-button { justify-self: end; margin-top: -7px; border: 0; padding: 0; color: var(--forest-2); background: transparent; font-size: 11px; font-weight: 700; }
.modal-copy { margin: 0 0 17px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.auth-message { margin-top: 14px; padding: 12px; border-radius: 10px; color: #31664e; background: #e3f0e8; font-size: 11px; line-height: 1.55; }
.auth-message a { color: var(--forest); font-weight: 800; }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 28px 20px; background: var(--forest); color: #fff; display: flex; flex-direction: column; z-index: 20; }
.brand { display: flex; gap: 12px; align-items: center; padding: 0 8px 28px; border-bottom: 1px solid rgba(255,255,255,.12); }
.brand-mark { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: #f0e0bd; color: var(--forest); font-family: Georgia, serif; font-weight: 800; }
.brand strong, .sidebar-footer strong { display: block; font-size: 14px; }
.brand span, .sidebar-footer span { display: block; margin-top: 3px; color: rgba(255,255,255,.58); font-size: 11px; }
.nav { display: grid; gap: 7px; margin-top: 28px; }
.nav-item { width: 100%; border: 0; border-radius: 12px; padding: 12px 14px; background: transparent; color: rgba(255,255,255,.68); display: flex; align-items: center; gap: 13px; text-align: left; }
.nav-item[hidden] { display: none !important; }
.nav-item span { width: 20px; text-align: center; font-size: 19px; }
.nav-item:hover, .nav-item.active { background: rgba(255,255,255,.1); color: #fff; }
.sidebar-footer { margin-top: auto; display: flex; align-items: center; gap: 11px; padding: 16px 8px 0; border-top: 1px solid rgba(255,255,255,.12); }
.sidebar-user { min-width: 0; flex: 1; }
.logout-button { width: 30px; height: 30px; flex: 0 0 30px; border: 0; border-radius: 9px; color: rgba(255,255,255,.65); background: rgba(255,255,255,.08); }
.logout-button:hover { color: white; background: rgba(255,255,255,.15); }
.user-avatar { width: 36px; height: 36px; border-radius: 50%; background: #c89445; display: grid; place-items: center; font-size: 12px; font-weight: 800; }

.main { min-width: 0; padding: 30px clamp(20px, 3vw, 44px) 48px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 30px; }
.topbar h1 { margin: 4px 0 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(25px, 3vw, 34px); font-weight: 500; }
.eyebrow { margin: 0; color: var(--muted); font-size: 11px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.demo-notice { margin: -12px 0 18px; padding: 11px 14px; border: 1px solid #ead7ae; border-radius: 12px; color: #654c1f; background: #fff8e7; display: flex; align-items: center; gap: 10px; font-size: 11px; }
.demo-notice[hidden] { display: none; }
.demo-notice strong { white-space: nowrap; }
.demo-notice span { color: #826a3c; }
.icon-button { position: relative; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: var(--paper); display: inline-grid; place-items: center; }
.icon-button:hover { background: #edf1ee; }
.notification-dot { position: absolute; right: 9px; top: 8px; width: 6px; height: 6px; border-radius: 50%; background: var(--coral); }
.primary-button, .secondary-button, .wide-button { min-height: 42px; border-radius: 11px; padding: 0 17px; border: 0; font-weight: 700; }
.primary-button { color: #fff; background: var(--forest); box-shadow: 0 7px 18px rgba(22,56,44,.18); }
.primary-button:hover { background: var(--forest-2); }
.secondary-button, .wide-button { color: var(--forest); background: var(--paper); border: 1px solid var(--line); }
.wide-button { width: 100%; margin-top: 20px; }
.text-button { border: 0; padding: 5px; color: var(--forest-2); background: transparent; font-size: 12px; font-weight: 700; }
.menu-button { display: none; }

.view { display: none; animation: fade .22s ease; }
.view.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat-card, .panel { border: 1px solid var(--line); border-radius: 18px; background: var(--paper); box-shadow: var(--shadow); }
.stat-card { min-height: 158px; padding: 21px; display: flex; flex-direction: column; }
.stat-card strong { margin: 18px 0 6px; font-family: Georgia, serif; font-size: 31px; font-weight: 500; }
.stat-card small { margin-top: auto; color: var(--muted); font-size: 11px; }
.stat-card .positive { color: #3e795f; }
.stat-label { color: var(--muted); font-size: 12px; display: flex; justify-content: space-between; align-items: center; }
.accent-card { color: #fff; background: var(--forest); border-color: var(--forest); }
.accent-card .stat-label, .accent-card small { color: rgba(255,255,255,.67); }
.soft-icon { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: #edf2ee; color: var(--forest-2); font-weight: 800; }
.progress { height: 4px; border-radius: 4px; background: rgba(255,255,255,.16); overflow: hidden; }
.progress i { display: block; height: 100%; width: 75%; background: #e3bd79; border-radius: inherit; }

.dashboard-grid { margin-top: 17px; display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, .8fr); gap: 17px; }
.panel { padding: 23px; }
.panel-heading, .view-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.panel h2, .view-heading h2, .modal h2, .placeholder-view h2 { margin: 4px 0 0; font-family: Georgia, serif; font-size: 22px; font-weight: 500; }
.activity-list { margin-top: 16px; }
.activity-item { display: grid; grid-template-columns: 46px 1fr auto; align-items: center; gap: 13px; padding: 14px 0; border-top: 1px solid var(--line); }
.guest-avatar { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; color: var(--forest); background: var(--sage); font-weight: 800; font-size: 12px; }
.activity-item strong { display: block; font-size: 13px; }
.activity-item small { color: var(--muted); font-size: 11px; }
.time-block { text-align: right; }
.time-block strong { font-family: Georgia, serif; font-size: 17px; }
.status-tag { display: inline-flex; align-items: center; border-radius: 99px; padding: 5px 9px; font-size: 10px; font-weight: 750; white-space: nowrap; }
.status-confirmed { color: #31664e; background: #e3f0e8; }
.status-pending { color: #896421; background: #f7edd8; }
.status-checked-in { color: #3d647f; background: #e3edf4; }
.status-cancelled { color: #974f42; background: #f5e4e0; }

.donut-row { display: flex; align-items: center; gap: 24px; margin-top: 24px; }
.donut { width: 118px; height: 118px; flex: 0 0 118px; border-radius: 50%; display: grid; place-content: center; text-align: center; background: conic-gradient(var(--forest) 0 75%, #dfe5e1 75%); position: relative; }
.donut::before { content: ""; position: absolute; inset: 13px; border-radius: 50%; background: white; }
.donut span, .donut small { position: relative; z-index: 1; }
.donut span { font-family: Georgia, serif; font-size: 29px; }
.donut small { color: var(--muted); font-size: 10px; }
.legend { min-width: 0; display: grid; gap: 11px; flex: 1; }
.legend-row { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; }
.legend-row i { width: 8px; height: 8px; border-radius: 50%; }
.legend-row strong { margin-left: auto; color: var(--ink); }
.upcoming-panel { margin-top: 17px; }
.segmented { display: flex; padding: 3px; border-radius: 10px; background: var(--canvas); }
.segmented button { border: 0; border-radius: 8px; padding: 7px 11px; color: var(--muted); background: transparent; font-size: 11px; }
.segmented button.active { color: var(--ink); background: white; box-shadow: 0 2px 8px rgba(0,0,0,.06); }

.table-wrap { margin-top: 16px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th { padding: 11px 12px; color: var(--muted); background: #f7f8f7; font-size: 10px; text-align: left; text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }
td { padding: 14px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
.guest-cell { display: flex; align-items: center; gap: 9px; }
.guest-cell .guest-avatar { width: 31px; height: 31px; border-radius: 9px; }
.view-heading { margin-bottom: 18px; }
.date-controls { display: flex; align-items: center; gap: 10px; }
.date-controls strong { min-width: 150px; text-align: center; font-size: 13px; }
.calendar-panel { padding: 0; overflow: hidden; }
.calendar-swipe-hint { display: none; }
.calendar-scroll { overflow-x: auto; }
.calendar-grid { min-width: 900px; display: grid; grid-template-columns: 145px repeat(14, minmax(54px, 1fr)); position: relative; isolation: isolate; }
.calendar-cell { min-height: 0; padding: 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 10px; }
.calendar-head { min-height: 58px; display: grid; place-content: center; text-align: center; color: var(--muted); background: #f8f9f8; }
.calendar-head.today { color: white; background: var(--forest); }
.calendar-head.weekend:not(.today), .calendar-day-cell.weekend { background: #f7f5ef; }
.calendar-day-cell.today-column { background: #f0f5f1; }
.room-cell { position: sticky; left: 0; z-index: 3; background: white; display: flex; flex-direction: column; justify-content: center; }
.room-cell strong { font-size: 12px; }
.room-cell small { color: var(--muted); }
.booking-bar { align-self: center; z-index: 2; height: 32px; margin: 8px 3px; padding: 7px 10px; border: 0; border-radius: 8px; overflow: hidden; color: var(--forest); background: #cfe2d5; font-size: 10px; font-weight: 750; text-align: left; white-space: nowrap; cursor: pointer; display: flex; align-items: center; gap: 6px; }
.booking-guest { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.booking-time { flex: 0 0 auto; opacity: .7; font-size: 9px; font-weight: 650; }
.booking-bar:hover { filter: brightness(.96); box-shadow: 0 4px 10px rgba(22,56,44,.12); }
.booking-bar:disabled { cursor: default; opacity: 1; }
.booking-bar:disabled:hover { filter: none; box-shadow: none; }
.booking-bar.pending { color: #76571f; background: #f1dfb9; }
.booking-bar.checked-in { color: #355c76; background: #d6e6f0; }
.search { height: 42px; width: min(280px, 45vw); border: 1px solid var(--line); border-radius: 11px; padding: 0 12px; display: flex; align-items: center; gap: 8px; background: white; }
.search input { width: 100%; border: 0; outline: 0; background: transparent; }
.filter-row { display: flex; gap: 8px; margin-bottom: 14px; overflow-x: auto; }
.chip { border: 1px solid var(--line); border-radius: 99px; padding: 8px 13px; background: white; color: var(--muted); font-size: 11px; white-space: nowrap; }
.chip.active { color: white; background: var(--forest); border-color: var(--forest); }
.placeholder-view { min-height: 60vh; place-content: center; text-align: center; }
.placeholder-view.active { display: grid; }
.placeholder-view p { max-width: 420px; color: var(--muted); line-height: 1.6; }
.placeholder-icon { margin: 0 auto 10px; width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: var(--sage); color: var(--forest); font-size: 27px; }
.row-action { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 9px; color: var(--forest); background: white; }
.row-action:hover { background: var(--sage); }
.settings-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 17px; margin-bottom: 17px; }
.account-security-panel { margin-bottom: 17px; }
.account-email { color: var(--muted); font-size: 11px; }
.security-form { max-width: 660px; margin-top: 20px; }
.security-actions { margin-top: 2px; display: flex; justify-content: flex-end; }
.hotel-profile-row { display: flex; align-items: center; gap: 15px; margin-top: 18px; }
.hotel-badge { width: 58px; height: 58px; border-radius: 17px; display: grid; place-items: center; color: var(--forest); background: #f0e0bd; font-family: Georgia, serif; font-weight: 800; }
.hotel-profile h2 { margin: 0; }
.hotel-profile p, .role-help p, .owner-only-note { color: var(--muted); font-size: 12px; line-height: 1.55; }
.hotel-contact-list { display: grid; gap: 5px; margin-top: 18px; padding-top: 15px; border-top: 1px solid var(--line); }
.hotel-contact-list p { margin: 0; }
.role-help > p:not(.eyebrow) { margin: 14px 0 0; }
.role-help strong { color: var(--ink); }
.staff-panel { margin-top: 0; }
.staff-status { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; }
.staff-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #4f8c69; }
.staff-status.inactive { color: var(--muted); }
.staff-status.inactive::before { background: #aeb6b1; }
.staff-actions { display: flex; justify-content: flex-end; gap: 7px; }
.small-button { border: 1px solid var(--line); border-radius: 8px; padding: 6px 9px; color: var(--forest); background: white; font-size: 10px; font-weight: 700; }
.small-button.danger { color: var(--coral); }
.inline-select { min-width: 135px; height: 32px; border: 1px solid var(--line); border-radius: 8px; padding: 0 8px; color: var(--ink); background: white; font-size: 11px; }
.compact-modal { max-width: 540px; }
.room-stats { margin-bottom: 17px; }
.room-stats .stat-card { min-height: 132px; }
.room-stats .stat-card strong { margin-top: 14px; }
.rooms-management-panel { padding-top: 8px; }
.report-controls { display: flex; align-items: center; gap: 9px; }
.period-select { height: 42px; border: 1px solid var(--line); border-radius: 11px; padding: 0 12px; color: var(--ink); background: white; }
.report-stats { margin-bottom: 17px; }
.report-chart-panel { margin-bottom: 17px; }
.report-period-label { color: var(--muted); font-size: 11px; }
.chart-scroll { margin-top: 25px; overflow-x: auto; }
.report-chart { min-width: 760px; height: 245px; padding: 10px 5px 28px; display: flex; align-items: flex-end; gap: 5px; border-bottom: 1px solid var(--line); background: repeating-linear-gradient(to bottom, transparent 0, transparent 53px, #edf0ee 54px); }
.chart-column { min-width: 14px; flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; }
.chart-bar { width: min(24px, 78%); min-height: 2px; border-radius: 6px 6px 2px 2px; background: color-mix(in srgb, var(--forest) var(--occupancy), #cbd7cf); transition: .2s ease; }
.chart-column:hover .chart-bar { filter: brightness(.9); }
.chart-column small { position: absolute; bottom: -23px; color: var(--muted); font-size: 8px; white-space: nowrap; }
.chart-tooltip { display: none; position: absolute; bottom: calc(var(--height) + 10px); z-index: 4; width: max-content; padding: 7px 9px; border-radius: 8px; color: white; background: var(--forest); font-size: 9px; line-height: 1.5; box-shadow: var(--shadow); }
.chart-column:hover .chart-tooltip { display: block; }
.chart-legend { display: flex; gap: 18px; margin-top: 17px; color: var(--muted); font-size: 10px; }
.chart-legend span { display: flex; align-items: center; gap: 6px; }
.chart-legend i { width: 9px; height: 9px; border-radius: 3px; background: var(--forest); }
.chart-legend i.light { background: #cbd7cf; }
.report-table-panel { padding-top: 20px; }
.platform-stats { margin-bottom: 17px; }
.platform-panel { padding-top: 8px; }
.form-section-title { margin: 20px 0 13px; padding-bottom: 8px; border-bottom: 1px solid var(--line); color: var(--forest); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.form-section-title:first-of-type { margin-top: 0; }
.object-owner-summary { margin-top: 18px; padding: 14px; border-radius: 11px; background: var(--canvas); display: grid; gap: 3px; }
.object-owner-summary span, .object-owner-summary small { color: var(--muted); font-size: 10px; }
.object-owner-summary strong { font-size: 12px; }
.split-actions { justify-content: space-between; }
.split-actions > div { display: flex; gap: 10px; }
.danger-button { min-height: 42px; border: 1px solid #e7c4bc; border-radius: 11px; padding: 0 15px; color: #a44f3f; background: #fff8f6; font-weight: 700; }
.danger-button:hover { background: #f9e8e4; }
.guest-heading-actions { display: flex; align-items: center; gap: 9px; }
.guest-heading-actions .search { width: 260px; }
.guest-stats { margin-bottom: 17px; }
.guests-panel { padding-top: 8px; }
.guest-history-summary { margin-top: 17px; padding: 13px; border-radius: 10px; color: var(--muted); background: var(--canvas); font-size: 11px; line-height: 1.55; }

.modal-backdrop { position: fixed; inset: 0; z-index: 50; padding: 20px; display: grid; place-items: center; background: rgba(10,25,19,.55); backdrop-filter: blur(5px); }
.modal-backdrop[hidden] { display: none; }
.modal { width: min(620px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; padding: 25px; border-radius: 19px; background: white; box-shadow: 0 24px 70px rgba(0,0,0,.22); }
.modal-header { display: flex; justify-content: space-between; align-items: start; margin-bottom: 22px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.field { display: grid; gap: 7px; color: var(--muted); font-size: 11px; font-weight: 700; }
.field.full { grid-column: 1 / -1; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; color: var(--ink); outline: none; background: white; }
.field input, .field select { height: 44px; }
.field textarea { padding-top: 11px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--forest-2); box-shadow: 0 0 0 3px rgba(36,83,65,.1); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.form-error { min-height: 18px; margin-top: 10px; color: var(--coral); font-size: 12px; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 80; padding: 13px 18px; border-radius: 11px; color: white; background: var(--forest); box-shadow: var(--shadow); transform: translateY(100px); opacity: 0; transition: .25s ease; }
.toast.show { transform: translateY(0); opacity: 1; }

@media (max-width: 1050px) {
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  body { overflow-x: hidden; }
  .auth-screen { padding: 0; place-items: start center; }
  .auth-layout { min-height: 100dvh; grid-template-columns: 1fr; align-content: start; border: 0; border-radius: 0; background: transparent; box-shadow: none; overflow: visible; backdrop-filter: none; }
  .promo-panel { min-height: 0; padding: max(22px, env(safe-area-inset-top)) 20px 42px; border-radius: 0 0 26px 26px; }
  .promo-copy { margin-top: 30px; padding: 0; }
  .promo-copy h1 { margin: 9px 0 10px; font-size: clamp(29px, 9vw, 38px); line-height: 1.06; }
  .promo-copy > p:last-child { font-size: 12px; line-height: 1.55; }
  .promo-features { margin-top: 22px; gap: 7px; }
  .promo-features > div { padding: 10px; border-radius: 11px; }
  .promo-features span { width: 25px; height: 25px; margin-bottom: 8px; font-size: 11px; }
  .promo-features strong { font-size: 9px; line-height: 1.3; }
  .promo-features small { display: none; }
  .promo-showcase { display: none; }
  .auth-card { position: relative; z-index: 2; width: calc(100% - 24px); margin: -18px 12px 24px; padding: 24px 20px; border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 18px 45px rgba(22,56,44,.14); }
  .auth-copy { margin-bottom: 22px; }
  .auth-copy h2 { font-size: 28px; }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; transform: translateX(-105%); width: min(84vw, 310px); height: 100dvh; padding: max(22px, env(safe-area-inset-top)) 18px max(20px, env(safe-area-inset-bottom)); transition: transform .22s ease; box-shadow: 24px 0 70px rgba(0,0,0,.3); }
  .sidebar.open { transform: translateX(0); }
  .main { padding: 0 12px calc(28px + env(safe-area-inset-bottom)); }
  .menu-button { display: inline-grid; flex: 0 0 auto; }
  .topbar { position: sticky; top: 0; z-index: 12; min-height: 68px; margin: 0 -12px 18px; padding: max(10px, env(safe-area-inset-top)) 12px 10px; align-items: center; gap: 11px; background: rgba(244,246,244,.94); backdrop-filter: blur(14px); border-bottom: 1px solid rgba(227,232,229,.8); }
  .topbar > div:nth-child(2) { min-width: 0; flex: 1; }
  .topbar h1 { overflow: hidden; margin: 0; font-size: 23px; text-overflow: ellipsis; white-space: nowrap; }
  .topbar .eyebrow { display: none; }
  .topbar .icon-button, .topbar .primary-button { min-width: 46px; width: 46px; height: 46px; border-radius: 14px; }
  .topbar-actions .icon-button, .install-button { display: none; }
  .topbar-actions .primary-button { padding: 0; font-size: 0; }
  .topbar-actions .primary-button span { margin: 0; font-size: 0; }
  .topbar-actions .primary-button::after { content: "+"; font-size: 28px; font-weight: 500; }
  .demo-notice { margin: -8px 0 14px; align-items: flex-start; flex-direction: column; gap: 3px; }
  .primary-button, .secondary-button, .wide-button { min-height: 46px; padding: 0 14px; }
  .stats-grid { gap: 10px; }
  .stat-card { min-width: 0; min-height: 126px; padding: 15px; border-radius: 15px; }
  .stat-card strong { overflow-wrap: anywhere; margin-top: 13px; font-size: clamp(22px, 7vw, 27px); }
  .stat-card small { line-height: 1.35; }
  .panel { padding: 15px; border-radius: 16px; }
  .panel h2, .view-heading h2 { font-size: 20px; }
  .panel-heading { align-items: flex-start; }
  .rooms-panel { min-width: 0; }
  .upcoming-panel .panel-heading { align-items: flex-start; }
  .view-heading { align-items: flex-start; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
  .view-heading > .primary-button { width: 100%; }
  .view-heading .search { width: 100%; }
  .settings-grid { grid-template-columns: 1fr; }
  .account-security-panel .panel-heading { display: block; }
  .account-email { display: block; margin-top: 6px; }
  .security-actions .primary-button { width: 100%; }
  .report-heading { display: block; }
  .report-controls { width: 100%; margin-top: 14px; flex-wrap: wrap; }
  .report-controls > * { flex: 1 1 145px; }
  .guest-heading-actions { width: 100%; margin-top: 13px; }
  .guest-heading-actions .search { width: 100%; }
  .guest-heading-actions { flex-wrap: wrap; }
  .guest-heading-actions .primary-button { width: 100%; }
  .activity-item { grid-template-columns: 40px 1fr auto; }
  .activity-item .status-tag { display: none; }
  .donut-row { gap: 15px; }

  #calendarView .view-heading > div:first-child { display: none; }
  #calendarView .view-heading { margin-bottom: 10px; }
  .calendar-swipe-hint { display: block; margin: 0 2px 9px; color: var(--muted); font-size: 10px; }
  .date-controls { width: 100%; gap: 8px; }
  .date-controls strong { min-width: 0; flex: 1; padding: 0 6px; font-size: 12px; }
  .date-controls .icon-button { width: 46px; height: 42px; flex: 0 0 46px; }
  .calendar-panel { margin: 0 -4px; padding: 0; border-radius: 15px; }
  .calendar-scroll { max-height: calc(100dvh - 150px); overflow: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
  .calendar-grid.mobile-calendar-grid { width: 100%; min-width: 490px; grid-template-columns: 70px repeat(7, minmax(60px, 1fr)); }
  .calendar-cell { padding: 6px; font-size: 9px; }
  .calendar-head { position: sticky; top: 0; z-index: 5; min-height: 52px; box-shadow: 0 1px 0 var(--line); }
  .calendar-head.room-cell { left: 0; z-index: 7; }
  .room-cell { padding: 6px 8px; box-shadow: 1px 0 0 var(--line); }
  .room-cell strong { font-size: 12px; }
  .room-cell small { overflow: hidden; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
  .booking-bar { height: 44px; margin: 6px 2px; padding: 5px 7px; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; border-radius: 8px; font-size: 9px; line-height: 1.1; }
  .booking-guest { width: 100%; }
  .booking-time { font-size: 8.5px; }

  .table-wrap { margin-top: 12px; overflow: visible; }
  .table-wrap table, .table-wrap tbody { display: block; width: 100%; }
  .table-wrap thead { display: none; }
  .table-wrap tbody { display: grid; gap: 10px; }
  .table-wrap tbody tr { display: block; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: white; }
  .table-wrap td { min-height: 42px; padding: 10px 12px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line); white-space: normal; text-align: right; }
  .table-wrap td:last-child { border-bottom: 0; }
  .table-wrap td::before { flex: 0 0 auto; color: var(--muted); font-size: 9px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
  .table-wrap td[colspan] { justify-content: center; text-align: center; }
  .table-wrap td[colspan]::before { display: none; }
  .table-wrap .guest-cell { justify-content: flex-end; text-align: left; }
  .table-wrap .inline-select { max-width: 175px; }
  .table-wrap .staff-actions { flex-wrap: wrap; }
  #upcomingTable td:nth-child(1)::before, #bookingsTable td:nth-child(1)::before, #guestsTable td:nth-child(1)::before { content: "Гость"; }
  #upcomingTable td:nth-child(2)::before, #bookingsTable td:nth-child(3)::before, #roomsTable td:nth-child(1)::before { content: "Номер"; }
  #upcomingTable td:nth-child(3)::before, #bookingsTable td:nth-child(4)::before { content: "Гостей"; }
  #upcomingTable td:nth-child(4)::before { content: "Период"; }
  #upcomingTable td:nth-child(5)::before, #bookingsTable td:nth-child(7)::before, #guestsTable td:nth-child(6)::before { content: "Сумма"; }
  #upcomingTable td:nth-child(6)::before, #bookingsTable td:nth-child(8)::before { content: "Статус"; }
  #bookingsTable td:nth-child(2)::before { content: "Контакт"; }
  #bookingsTable td:nth-child(5)::before { content: "Заезд"; }
  #bookingsTable td:nth-child(6)::before { content: "Выезд"; }
  #roomsTable td:nth-child(2)::before { content: "Категория"; }
  #roomsTable td:nth-child(3)::before { content: "Вместимость"; }
  #roomsTable td:nth-child(4)::before { content: "Цена"; }
  #roomsTable td:nth-child(5)::before, #staffTable td:nth-child(5)::before { content: "Состояние"; }
  #reportTable td:nth-child(1)::before { content: "Дата"; }
  #reportTable td:nth-child(2)::before { content: "Занято"; }
  #reportTable td:nth-child(3)::before { content: "Загрузка"; }
  #reportTable td:nth-child(4)::before { content: "Выручка"; }
  #platformHotelsTable td:nth-child(1)::before { content: "Объект"; }
  #platformHotelsTable td:nth-child(2)::before { content: "Адрес"; }
  #platformHotelsTable td:nth-child(3)::before { content: "Владелец"; }
  #platformHotelsTable td:nth-child(4)::before { content: "Аккаунт"; }
  #platformHotelsTable td:nth-child(5)::before { content: "Статус"; }
  #platformHotelsTable td:nth-child(6)::before { content: "Номера"; }
  #platformHotelsTable td:nth-child(7)::before { content: "Создан"; }
  #guestsTable td:nth-child(2)::before { content: "Телефон"; }
  #guestsTable td:nth-child(3)::before { content: "Почта"; }
  #guestsTable td:nth-child(4)::before { content: "Визиты"; }
  #guestsTable td:nth-child(5)::before { content: "Последний выезд"; }
  #staffTable td:nth-child(1)::before { content: "Сотрудник"; }
  #staffTable td:nth-child(2)::before { content: "Логин"; }
  #staffTable td:nth-child(3)::before { content: "Почта"; }
  #staffTable td:nth-child(4)::before { content: "Роль"; }

  .modal-backdrop { padding: 0; place-items: end center; }
  .modal { width: 100%; max-height: 92dvh; padding: 20px 16px calc(16px + env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0; }
  .modal-header { margin-bottom: 18px; }
  .field input, .field select { height: 48px; }
  .form-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .modal-actions { position: sticky; bottom: calc(-16px - env(safe-area-inset-bottom)); margin: 18px -16px calc(-16px - env(safe-area-inset-bottom)); padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: white; border-top: 1px solid var(--line); }
  .modal-actions > button { flex: 1; }
  .toast { right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); left: 12px; text-align: center; }
}
@media (max-width: 760px) and (orientation: landscape) {
  .calendar-grid.mobile-calendar-grid { min-width: 500px; grid-template-columns: 64px repeat(7, minmax(60px, 1fr)); }
  .room-cell { padding-inline: 6px; }
}
@media (max-width: 380px) {
  .stats-grid { grid-template-columns: 1fr; }
  .stat-card { min-height: 112px; }
  .activity-item { grid-template-columns: 36px 1fr auto; gap: 9px; }
  .time-block strong { font-size: 15px; }
}
