/* ============================================================ tokens */
:root {
  --brand: #0f766e; --brand-600: #0d6b64; --brand-700: #115e59; --brand-50: #f0fdfa; --brand-100: #ccfbf1;
  --accent: #f59e0b;
  --bg: #f5f7f8; --surface: #ffffff; --surface-2: #f8fafc;
  --line: #e5e9ee; --line-2: #eef1f4;
  --text: #0f172a; --text-2: #475569; --muted: #64748b; --faint: #94a3b8;
  --ok: #15803d; --ok-bg: #dcfce7; --warn: #b45309; --warn-bg: #fef3c7; --info: #1d4ed8; --info-bg: #dbeafe;
  --danger: #dc2626; --danger-bg: #fee2e2; --muted-bg: #f1f5f9;
  --r-sm: 8px; --r: 12px; --r-lg: 16px; --r-xl: 22px;
  --sh-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --sh: 0 1px 3px rgba(15, 23, 42, .06), 0 6px 16px rgba(15, 23, 42, .05);
  --sh-lg: 0 10px 40px rgba(15, 23, 42, .16);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --sidebar: 256px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 14.5px; line-height: 1.5; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
body.no-scroll { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: 26px; font-weight: 800; } h2 { font-size: 20px; font-weight: 700; } h3 { font-size: 16px; font-weight: 700; }
p { margin: 0; }
.muted { color: var(--muted); } .small { font-size: 12.5px; } .strong { font-weight: 600; } .nowrap { white-space: nowrap; }
.right { text-align: right; } .center { text-align: center; }
.ic { width: 18px; height: 18px; flex: none; }
.ic.sm { width: 15px; height: 15px; } .ic.lg { width: 34px; height: 34px; } .ic.xl { width: 48px; height: 48px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
[hidden] { display: none !important; }

/* ============================================================ loading */
.boot, .loading-block { display: grid; place-items: center; min-height: 60vh; }
.loading-block { min-height: 240px; }
.spinner { width: 34px; height: 34px; border: 3px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: linear-gradient(90deg, #eef1f4 25%, #f7f9fa 50%, #eef1f4 75%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: var(--r); }
@keyframes sk { to { background-position: -200% 0; } }

/* ============================================================ buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); font: 600 14px/1 var(--font); cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, box-shadow .15s, transform .05s; text-decoration: none !important; }
.btn:hover { background: var(--surface-2); border-color: #d5dbe2; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn:focus-visible, .icon-btn:focus-visible { outline: 3px solid var(--brand-100); outline-offset: 1px; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 1px 2px rgba(15, 118, 110, .3); }
.btn-primary:hover { background: var(--brand-600); border-color: var(--brand-600); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; border-color: #b91c1c; }
.btn-ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn-ok:hover { background: #166534; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--muted-bg); border-color: transparent; }
.btn-soft { background: var(--brand-50); border-color: var(--brand-100); color: var(--brand-700); }
.btn-soft:hover { background: var(--brand-100); border-color: var(--brand-100); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; gap: 6px; }
.btn-sm .ic { width: 15px; height: 15px; }
.btn-lg { height: 48px; padding: 0 22px; font-size: 15px; border-radius: 12px; }
.btn-block { width: 100%; }
.btn.loading { position: relative; color: transparent !important; }
.btn.loading::after { content: ''; position: absolute; width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.5); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.btn:not(.btn-primary):not(.btn-danger):not(.btn-ok).loading::after { border-color: var(--line); border-top-color: var(--brand); }
.icon-btn { width: 38px; height: 38px; border-radius: 10px; border: 0; background: transparent; color: var(--text-2); display: inline-grid; place-items: center; cursor: pointer; position: relative; }
.icon-btn:hover { background: var(--muted-bg); color: var(--text); }
.link { background: none; border: 0; padding: 0; color: var(--brand); font: inherit; font-weight: 600; cursor: pointer; }
.link:hover { text-decoration: underline; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ============================================================ forms */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.hint { font-size: 12px; color: var(--muted); }
input, select, textarea { width: 100%; height: 42px; padding: 0 12px; border: 1px solid #d6dce3; border-radius: 10px; background: #fff; color: var(--text);
  font: 400 14.5px var(--font); transition: border-color .15s, box-shadow .15s; }
textarea { height: auto; padding: 10px 12px; resize: vertical; min-height: 84px; line-height: 1.45; }
select { appearance: none; padding-right: 34px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 11px center; cursor: pointer; }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(15, 118, 110, .14); }
input[readonly] { background: var(--surface-2); }
input.invalid, textarea.invalid { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(220, 38, 38, .12); }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; accent-color: var(--brand); margin: 0; cursor: pointer; flex: none; }
input[type=file] { height: auto; padding: 8px; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: 14px; padding: 4px 0; }
.check input { margin-top: 2px; }
.pass-wrap { position: relative; }
.pass-wrap input { padding-right: 44px; }
.pass-eye { position: absolute; right: 4px; top: 4px; width: 34px; height: 34px; border: 0; background: none; color: var(--muted); cursor: pointer; display: grid; place-items: center; border-radius: 8px; }
.pass-eye:hover { background: var(--muted-bg); }
.form-error { background: var(--danger-bg); color: #991b1b; padding: 10px 12px; border-radius: 10px; font-size: 13.5px; font-weight: 500; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span2 { grid-column: span 2; } .span-all { grid-column: 1 / -1; }
.input-group { display: flex; } .input-group > * { border-radius: 0; } .input-group > :first-child { border-radius: 10px 0 0 10px; } .input-group > :last-child { border-radius: 0 10px 10px 0; margin-left: -1px; }
.seg { display: inline-flex; background: var(--muted-bg); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button, .seg label { border: 0; background: none; padding: 7px 14px; border-radius: 8px; font: 600 13px var(--font); color: var(--text-2); cursor: pointer; display: flex; align-items: center; gap: 6px; }
.seg input { display: none; }
.seg .on, .seg input:checked + span { background: #fff; color: var(--text); box-shadow: var(--sh-sm); }
.seg label span { padding: 0; }
.seg label:has(input:checked) { background: #fff; color: var(--text); box-shadow: var(--sh-sm); }
.section-title { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 6px 0 -2px; }

/* ============================================================ cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-sm); }
.card-pad { padding: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line-2); }
.card-head h3 { font-size: 15px; }
.card-body { padding: 16px 20px; }
.card + .card { margin-top: 16px; }

/* ============================================================ badges */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; line-height: 1.4; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.badge-ok { background: var(--ok-bg); color: var(--ok); } .badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-info { background: var(--info-bg); color: var(--info); } .badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-muted { background: var(--muted-bg); color: var(--muted); }
.chip { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .02em; background: var(--muted-bg); color: var(--text-2); }
.chip-b2b { background: #ede9fe; color: #6d28d9; } .chip-b2c { background: var(--brand-50); color: var(--brand-700); } .chip-direct { background: #fff7ed; color: #c2410c; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: var(--muted-bg); font-size: 13px; color: var(--text-2); }
.pill .ic { width: 15px; height: 15px; }

/* ============================================================ tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 11px 14px; background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr.click { cursor: pointer; }
.table tr.click:hover td { background: #f8fbfb; }
.table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table tfoot td { font-weight: 700; background: var(--surface-2); border-top: 1px solid var(--line); }
.cell-main { font-weight: 600; } .cell-sub { font-size: 12.5px; color: var(--muted); }

/* ============================================================ modal */
.modal-wrap { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 5vh 16px; overflow-y: auto; opacity: 0; transition: opacity .2s; backdrop-filter: blur(2px); }
.modal-wrap.show { opacity: 1; }
.modal { background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--sh-lg); width: 100%; max-width: 560px; transform: translateY(10px) scale(.99); transition: transform .2s; margin: auto 0; }
.modal-wrap.show .modal { transform: none; }
.modal-sm { max-width: 420px; } .modal-lg { max-width: 820px; } .modal-xl { max-width: 1080px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px 0; }
.modal-head h3 { font-size: 18px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.modal-body { padding: 18px 22px 22px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--line-2); background: var(--surface-2); border-radius: 0 0 var(--r-xl) var(--r-xl); flex-wrap: wrap; }
.confirm-text { color: var(--text-2); margin-bottom: 12px; }

/* ============================================================ toast */
#toasts { position: fixed; top: 16px; right: 16px; z-index: 200; display: flex; flex-direction: column; gap: 8px; max-width: calc(100vw - 32px); }
.toast { display: flex; gap: 10px; align-items: flex-start; background: #0f172a; color: #fff; padding: 12px 16px; border-radius: 12px; box-shadow: var(--sh-lg); font-size: 14px; font-weight: 500; max-width: 380px; transform: translateX(20px); opacity: 0; transition: all .25s; }
.toast.show { transform: none; opacity: 1; }
.toast .ic { margin-top: 1px; }
.toast-success .ic { color: #4ade80; } .toast-error { background: #7f1d1d; } .toast-error .ic { color: #fca5a5; } .toast-info .ic { color: #93c5fd; }

/* ============================================================ empty */
.empty { text-align: center; padding: 48px 20px; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty .ic { color: var(--faint); margin-bottom: 4px; }
.empty h3 { color: var(--text); }
.empty .btn { margin-top: 10px; }

/* ============================================================ logo */
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; color: var(--text); text-decoration: none !important; letter-spacing: -.01em; }
.logo-mark { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, #14b8a6, var(--brand-700)); color: #fff; display: grid; place-items: center; box-shadow: 0 4px 12px rgba(15, 118, 110, .3); flex: none; }
.logo-mark .ic { width: 19px; height: 19px; }

/* ============================================================ auth page */
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(1200px 500px at 10% -10%, #ccfbf1 0%, transparent 60%), radial-gradient(900px 500px at 110% 110%, #e0f2fe 0%, transparent 55%), var(--bg); }
.auth-card { width: 100%; max-width: 420px; background: #fff; border-radius: 24px; box-shadow: var(--sh-lg); padding: 32px; }
.auth-card h1 { font-size: 23px; margin-top: 22px; }
.auth-card > p { margin: 6px 0 22px; }
.auth-logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; }
.auth-foot { margin-top: 18px; text-align: center; font-size: 13.5px; color: var(--muted); }

/* ============================================================ backoffice layout */
.shell { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar); background: #0b1f1e; color: #cbd5d4; position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column; z-index: 50; transition: transform .25s; }
.sidebar .logo { color: #fff; padding: 20px 20px 18px; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 4px 12px 16px; }
.nav-group { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #5f7a78; padding: 16px 10px 6px; }
.nav-item { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 9px; color: #b9c9c7; font-weight: 500; font-size: 14px; cursor: pointer; border: 0; background: none; width: 100%; text-align: left; font-family: inherit; position: relative; }
.nav-item:hover { background: rgba(255, 255, 255, .06); color: #fff; text-decoration: none; }
.nav-item.active { background: rgba(20, 184, 166, .16); color: #fff; }
.nav-item.active::before { content: ''; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: #2dd4bf; }
.nav-item .ic { width: 18px; height: 18px; opacity: .9; }
.nav-count { margin-left: auto; background: var(--accent); color: #1f1300; font-size: 11px; font-weight: 800; padding: 1px 7px; border-radius: 99px; }
.sidebar-foot { padding: 14px; border-top: 1px solid rgba(255, 255, 255, .07); }
.me-box { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, #2dd4bf, #0f766e); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.me-name { color: #fff; font-weight: 600; font-size: 13.5px; line-height: 1.3; }
.me-role { font-size: 12px; color: #7f9a98; }
.me-box .icon-btn { color: #9fb3b1; margin-left: auto; }
.me-box .icon-btn:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.control-mode .sidebar { background: #16112b; }
.control-mode .nav-item.active { background: rgba(167, 139, 250, .18); }
.control-mode .nav-item.active::before { background: #a78bfa; }
.control-mode .logo-mark { background: linear-gradient(135deg, #a78bfa, #6d28d9); box-shadow: 0 4px 12px rgba(109, 40, 217, .35); }
.control-mode .nav-group { color: #6f6892; }
.control-tag { margin: 0 20px 6px; display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; color: #c4b5fd; background: rgba(167, 139, 250, .14); padding: 5px 10px; border-radius: 8px; align-self: flex-start; }

.main-col { flex: 1; margin-left: var(--sidebar); min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 40; height: 64px; background: rgba(245, 247, 248, .85); backdrop-filter: saturate(1.4) blur(10px); display: flex; align-items: center; gap: 12px; padding: 0 28px; border-bottom: 1px solid transparent; }
.topbar.scrolled { border-bottom-color: var(--line); }
.topbar h1 { font-size: 19px; font-weight: 700; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .menu-btn { display: none; }
#main { padding: 8px 28px 40px; flex: 1; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head p { margin-top: 4px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.toolbar .search { position: relative; flex: 1; min-width: 200px; max-width: 360px; }
.toolbar .search .ic { position: absolute; left: 12px; top: 12px; color: var(--faint); }
.toolbar .search input { padding-left: 38px; }
.toolbar select, .toolbar input[type=date] { width: auto; min-width: 150px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { border: 0; background: none; padding: 10px 14px; font: 600 14px var(--font); color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: flex; gap: 7px; align-items: center; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--brand); border-bottom-color: var(--brand); }
.tab .cnt { background: var(--muted-bg); color: var(--text-2); border-radius: 99px; padding: 0 7px; font-size: 12px; }
.tab.active .cnt { background: var(--brand-50); color: var(--brand); }
.backdrop { display: none; }

/* ============================================================ stats */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 18px; display: flex; gap: 14px; align-items: flex-start; box-shadow: var(--sh-sm); }
.stat-ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--brand-50); color: var(--brand); }
.stat-ic.warn { background: var(--warn-bg); color: var(--warn); } .stat-ic.info { background: var(--info-bg); color: var(--info); }
.stat-ic.ok { background: var(--ok-bg); color: var(--ok); } .stat-ic.violet { background: #ede9fe; color: #6d28d9; } .stat-ic.danger { background: var(--danger-bg); color: var(--danger); }
.stat-label { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.stat-value { font-size: 22px; font-weight: 800; letter-spacing: -.02em; line-height: 1.25; margin-top: 2px; font-variant-numeric: tabular-nums; }
.stat-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.stat.clickable { cursor: pointer; transition: box-shadow .15s, border-color .15s; }
.stat.clickable:hover { border-color: #cfd8df; box-shadow: var(--sh); }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.alert { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-radius: 12px; background: var(--warn-bg); color: #78350f; margin-bottom: 16px; font-weight: 500; flex-wrap: wrap; }
.alert .btn { margin-left: auto; }
.alert-info { background: var(--info-bg); color: #1e3a8a; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--line-2); cursor: pointer; }
.list-row:last-child { border-bottom: 0; }
.list-row:hover { background: #f8fbfb; }
.list-row .grow { flex: 1; min-width: 0; }
.date-box { width: 46px; flex: none; text-align: center; border-radius: 10px; background: var(--brand-50); color: var(--brand-700); padding: 5px 0; line-height: 1.1; }
.date-box b { display: block; font-size: 17px; } .date-box span { font-size: 11px; font-weight: 600; text-transform: uppercase; }
.bar { height: 8px; background: var(--muted-bg); border-radius: 99px; overflow: hidden; min-width: 80px; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, #14b8a6, var(--brand)); border-radius: 99px; }

/* ============================================================ chessboard calendar */
.board-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff; box-shadow: var(--sh-sm); }
.board { display: grid; min-width: max-content; }
.board-cell { height: 50px; border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); position: relative; }
.board-head { height: 54px; background: var(--surface-2); display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 11px; color: var(--muted); font-weight: 600; position: sticky; top: 0; }
.board-head b { font-size: 14px; color: var(--text); }
.board-head.we { background: #fdf6ec; } .board-head.today { background: var(--brand); color: #d5f5f0; } .board-head.today b { color: #fff; }
.board-apt { position: sticky; left: 0; z-index: 3; background: #fff; padding: 6px 12px; display: flex; flex-direction: column; justify-content: center; border-right: 1px solid var(--line); min-width: 210px; max-width: 210px; cursor: pointer; }
.board-apt b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.board-apt span { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.board-corner { position: sticky; left: 0; top: 0; z-index: 4; background: var(--surface-2); border-right: 1px solid var(--line); display: flex; align-items: center; padding: 0 12px; font-size: 12px; font-weight: 700; color: var(--muted); }
.board-day.we { background: #fffbf5; } .board-day.today { background: #f0fdfa; }
.board-day.free { cursor: cell; } .board-day.free:hover { background: var(--brand-50); }
.board-bar { position: relative; align-self: center; margin: 0 3px; height: 34px; border-radius: 8px; z-index: 2; padding: 0 9px; display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: #fff; overflow: hidden; white-space: nowrap; cursor: pointer; box-shadow: 0 1px 2px rgba(0,0,0,.12); transition: filter .15s; }
.board-bar:hover { filter: brightness(1.08); }
.board-bar.st-pending { background: repeating-linear-gradient(45deg, #f59e0b, #f59e0b 8px, #fbbf24 8px, #fbbf24 16px); color: #422006; }
.board-bar.st-confirmed { background: #2563eb; } .board-bar.st-checked_in { background: #16a34a; } .board-bar.st-completed { background: #94a3b8; }
.board-bar.blk { background: repeating-linear-gradient(-45deg, #e2e8f0, #e2e8f0 6px, #cbd5e1 6px, #cbd5e1 12px); color: #334155; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin-top: 12px; }
.legend i { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; margin-right: 6px; }

/* ============================================================ apartments cards */
.apt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.apt-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; display: flex; flex-direction: column; cursor: pointer; transition: box-shadow .2s, transform .2s; box-shadow: var(--sh-sm); }
.apt-card:hover { box-shadow: var(--sh); transform: translateY(-2px); }
.apt-photo { aspect-ratio: 16 / 10; background: #e7ecef center / cover no-repeat; position: relative; display: grid; place-items: center; color: var(--faint); }
.apt-photo .badge, .apt-photo .tag { position: absolute; top: 12px; left: 12px; }
.apt-photo .tag { background: rgba(15, 23, 42, .72); color: #fff; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 99px; backdrop-filter: blur(4px); }
.apt-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.apt-title { font-weight: 700; font-size: 15.5px; line-height: 1.3; }
.apt-meta { display: flex; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.apt-meta span { display: inline-flex; gap: 5px; align-items: center; }
.apt-meta .ic { width: 15px; height: 15px; }
.apt-price { margin-top: auto; padding-top: 10px; border-top: 1px dashed var(--line); display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.apt-price b { font-size: 18px; font-weight: 800; letter-spacing: -.01em; }

/* ============================================================ gallery */
.gallery-main { position: relative; aspect-ratio: 16 / 10; border-radius: var(--r-lg); overflow: hidden; background: #e7ecef; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.gallery-main.noimg { display: grid; place-items: center; color: var(--faint); }
.gal-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .92); display: grid; place-items: center; cursor: pointer; box-shadow: var(--sh); }
.gal-arrow.l { left: 12px; } .gal-arrow.r { right: 12px; }
.gal-count { position: absolute; right: 12px; bottom: 12px; background: rgba(15, 23, 42, .7); color: #fff; font-size: 12px; padding: 3px 10px; border-radius: 99px; }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding-bottom: 4px; }
.gallery-thumbs img { width: 92px; height: 64px; object-fit: cover; border-radius: 10px; cursor: pointer; opacity: .65; border: 2px solid transparent; flex: none; }
.gallery-thumbs img.active { opacity: 1; border-color: var(--brand); }
.lightbox { position: fixed; inset: 0; background: rgba(0, 0, 0, .92); z-index: 300; display: grid; place-items: center; }
.lightbox img { max-width: 94vw; max-height: 88vh; border-radius: 8px; }
.lb-close, .lb-arr { position: absolute; border: 0; background: rgba(255, 255, 255, .12); color: #fff; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; }
.lb-close { top: 18px; right: 18px; } .lb-arr.l { left: 18px; top: 50%; } .lb-arr.r { right: 18px; top: 50%; }

/* ============================================================ range calendar */
.rcal { user-select: none; }
.rcal-nav { display: flex; justify-content: space-between; align-items: center; margin-bottom: -30px; position: relative; z-index: 1; }
.rcal-months { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }
.rcal-title { text-align: center; font-weight: 700; height: 38px; line-height: 38px; }
.rcal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.rcal-wd { text-align: center; font-size: 11.5px; color: var(--muted); font-weight: 600; padding: 4px 0; }
.rcal-day { aspect-ratio: 1; border: 0; background: none; border-radius: 9px; font: 500 13.5px var(--font); color: var(--text); cursor: pointer; position: relative; min-height: 32px; }
.rcal-day:hover:not(:disabled) { background: var(--brand-50); }
.rcal-day.today { box-shadow: inset 0 0 0 1.5px var(--brand-100); font-weight: 700; }
.rcal-day.past { color: #cbd5e1; cursor: default; }
.rcal-day.busy { color: #b0b8c3; text-decoration: line-through; background: repeating-linear-gradient(-45deg, #f1f5f9, #f1f5f9 4px, #e7ecf1 4px, #e7ecf1 8px); }
.rcal-day.inrange { background: var(--brand-50); border-radius: 0; color: var(--brand-700); }
.rcal-day.sel { background: var(--brand); color: #fff; font-weight: 700; text-decoration: none; }
.rcal-day.start { border-radius: 9px 3px 3px 9px; } .rcal-day.end { border-radius: 3px 9px 9px 3px; } .rcal-day.start.end { border-radius: 9px; }
.rcal-legend { display: flex; gap: 14px; margin-top: 10px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.rcal-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; border: 1px solid var(--line); }
.lg-busy { background: repeating-linear-gradient(-45deg, #f1f5f9, #f1f5f9 3px, #dde3ea 3px, #dde3ea 6px); } .lg-sel { background: var(--brand); border-color: var(--brand) !important; }

/* ============================================================ bell */
.bell { position: relative; }
.bell-dot { position: absolute; top: 3px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--danger); color: #fff; font-size: 10.5px; font-weight: 800; display: grid; place-items: center; border: 2px solid var(--bg); }
.bell-pop { position: absolute; right: 0; top: 46px; width: 360px; max-width: calc(100vw - 24px); background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--sh-lg); z-index: 60; overflow: hidden; }
.bell-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line-2); font-size: 14px; }
.bell-list { max-height: 420px; overflow-y: auto; }
.bell-item { padding: 12px 16px; border-bottom: 1px solid var(--line-2); cursor: pointer; }
.bell-item:hover { background: var(--surface-2); }
.bell-item.unread { background: #f0fdfa; } .bell-item.unread .bell-t::before { content: ''; display: inline-block; width: 7px; height: 7px; background: var(--brand); border-radius: 50%; margin-right: 7px; vertical-align: 1px; }
.bell-t { font-weight: 600; font-size: 13.5px; } .bell-b { font-size: 13px; color: var(--text-2); margin-top: 2px; } .bell-d { font-size: 11.5px; color: var(--faint); margin-top: 4px; }
.bell-empty { padding: 32px; text-align: center; color: var(--muted); font-size: 13.5px; }

/* ============================================================ detail blocks */
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 9px 14px; font-size: 14px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-weight: 500; min-width: 0; overflow-wrap: anywhere; }
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.info-tile { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 14px; }
.info-tile .l { font-size: 12px; color: var(--muted); } .info-tile .v { font-weight: 700; font-size: 15px; margin-top: 2px; }
.money-box { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.money-box > div { padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line-2); }
.money-box .l { font-size: 12px; color: var(--muted); } .money-box .v { font-size: 16px; overflow-wrap: anywhere; font-weight: 800; margin-top: 2px; }
.money-box .due .v { color: var(--danger); } .money-box .paid .v { color: var(--ok); }
.timeline { position: relative; padding-left: 20px; }
.timeline::before { content: ''; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.tl-item { position: relative; padding-bottom: 12px; font-size: 13.5px; }
.tl-item::before { content: ''; position: absolute; left: -19px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2px solid var(--brand); }
.tl-item .d { font-size: 12px; color: var(--muted); }
.amen-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px 16px; }
.amen-list div { display: flex; gap: 8px; align-items: center; font-size: 14px; } .amen-list .ic { color: var(--brand); width: 16px; }
.amen-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px 14px; }
.diff { width: 100%; font-size: 12.5px; border-collapse: collapse; margin-top: 8px; }
.diff td { padding: 5px 8px; border: 1px solid var(--line-2); vertical-align: top; overflow-wrap: anywhere; }
.diff .old { background: #fef2f2; color: #991b1b; } .diff .new { background: #f0fdf4; color: #166534; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.photo-item { position: relative; border-radius: 12px; overflow: hidden; aspect-ratio: 4 / 3; background: #eef1f4; }
.photo-item img { width: 100%; height: 100%; object-fit: cover; }
.photo-item .ops { position: absolute; inset: auto 0 0 0; display: flex; justify-content: space-between; padding: 6px; background: linear-gradient(transparent, rgba(0,0,0,.55)); }
.photo-item .ops button { width: 30px; height: 30px; border-radius: 8px; border: 0; background: rgba(255,255,255,.92); display: grid; place-items: center; cursor: pointer; }
.photo-item .ops button:hover { background: #fff; } .photo-item .ops .del { color: var(--danger); }
.photo-item .cover { position: absolute; top: 8px; left: 8px; background: var(--brand); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 6px; }
.dropzone { border: 2px dashed #cfd8df; border-radius: 14px; padding: 26px; text-align: center; color: var(--muted); cursor: pointer; transition: all .15s; background: var(--surface-2); }
.dropzone:hover, .dropzone.over { border-color: var(--brand); background: var(--brand-50); color: var(--brand-700); }
.dropzone .ic { width: 30px; height: 30px; margin: 0 auto 6px; }
.perm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 18px; }
.quote-rows { font-size: 13.5px; }
.quote-rows .row { display: flex; justify-content: space-between; padding: 5px 0; border-bottom: 1px dashed var(--line-2); gap: 10px; }
.quote-rows .row.total { border: 0; font-weight: 800; font-size: 16px; padding-top: 10px; }
.season-tag { font-size: 11px; background: #fff7ed; color: #c2410c; padding: 1px 6px; border-radius: 5px; margin-left: 6px; font-weight: 600; }

/* ============================================================ cabinet (client/agent) */
.cab-top { position: sticky; top: 0; z-index: 40; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.cab-top-in { max-width: 1240px; margin: 0 auto; height: 66px; display: flex; align-items: center; gap: 18px; padding: 0 24px; }
.cab-nav { display: flex; gap: 4px; margin-left: 18px; }
.cab-nav button { border: 0; background: none; font: 600 14px var(--font); color: var(--text-2); padding: 9px 14px; border-radius: 10px; cursor: pointer; display: flex; gap: 8px; align-items: center; }
.cab-nav button:hover { background: var(--muted-bg); color: var(--text); }
.cab-nav button.active { background: var(--brand-50); color: var(--brand-700); }
.cab-right { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.user-menu { position: relative; }
.user-btn { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 3px 10px 3px 3px; cursor: pointer; font: 600 13.5px var(--font); color: var(--text); }
.user-btn .avatar { width: 30px; height: 30px; font-size: 12px; }
.dropdown { position: absolute; right: 0; top: 48px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--sh-lg); min-width: 230px; padding: 6px; z-index: 60; }
.dropdown .dd-head { padding: 10px 12px; border-bottom: 1px solid var(--line-2); margin-bottom: 4px; }
.dropdown button { display: flex; gap: 10px; align-items: center; width: 100%; border: 0; background: none; padding: 9px 12px; border-radius: 9px; font: 500 14px var(--font); color: var(--text); cursor: pointer; text-align: left; }
.dropdown button:hover { background: var(--muted-bg); }
.dropdown button.danger { color: var(--danger); }
.cab-main { max-width: 1240px; margin: 0 auto; padding: 26px 24px 90px; }
.agent-banner { display: inline-flex; align-items: center; gap: 6px; background: #ede9fe; color: #6d28d9; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 99px; }
.search-panel { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 16px; box-shadow: var(--sh); display: grid; grid-template-columns: 1.2fr 1.2fr .8fr .9fr .9fr auto; gap: 12px; align-items: end; margin-bottom: 24px; }
.search-hero { background: linear-gradient(135deg, #0f766e 0%, #115e59 60%, #134e4a 100%); color: #fff; border-radius: 24px; padding: 28px 28px 70px; margin-bottom: -46px; position: relative; overflow: hidden; }
.search-hero::after { content: ''; position: absolute; right: -60px; top: -80px; width: 320px; height: 320px; border-radius: 50%; background: rgba(255,255,255,.07); }
.search-hero h1 { font-size: 26px; } .search-hero p { color: #b5ece4; margin-top: 6px; }
.search-wrap { padding: 0 16px; position: relative; z-index: 2; }
.apt-layout { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 28px; align-items: start; }
.book-card { position: sticky; top: 86px; }
.book-card .price-big { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-weight: 600; cursor: pointer; border: 0; background: none; font-family: inherit; font-size: 14px; padding: 6px 0; margin-bottom: 12px; }
.back-link:hover { color: var(--brand); }
.booking-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px; display: grid; grid-template-columns: 120px 1fr auto; gap: 16px; align-items: center; cursor: pointer; box-shadow: var(--sh-sm); transition: box-shadow .15s; }
.booking-card:hover { box-shadow: var(--sh); }
.booking-card .ph { width: 120px; height: 86px; border-radius: 12px; background: #e7ecef center/cover; }
.booking-card + .booking-card { margin-top: 12px; }
.bottom-nav { display: none; }

/* ============================================================ landing */
.l-header { position: fixed; top: 0; left: 0; right: 0; z-index: 50; transition: background .2s, box-shadow .2s; }
.l-header.solid { background: rgba(255, 255, 255, .94); backdrop-filter: blur(10px); box-shadow: 0 1px 0 var(--line); }
.l-header-in { max-width: 1200px; margin: 0 auto; height: 72px; display: flex; align-items: center; gap: 24px; padding: 0 24px; }
.l-nav { display: flex; gap: 4px; margin-left: auto; }
.l-nav button { border: 0; background: none; font: 500 14.5px var(--font); color: var(--text-2); padding: 8px 12px; border-radius: 9px; cursor: pointer; }
.l-nav button:hover { color: var(--text); background: rgba(15, 23, 42, .04); }
.l-actions { display: flex; gap: 8px; }
.l-burger { display: none; }
.hero { position: relative; padding: 140px 24px 90px; overflow: hidden; background: radial-gradient(900px 480px at 85% 10%, #ccfbf1 0%, transparent 60%), radial-gradient(700px 400px at 0% 100%, #e0f2fe 0%, transparent 60%), #f8fbfb; }
.hero-in { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); padding: 6px 12px 6px 6px; border-radius: 99px; font-size: 13px; font-weight: 600; color: var(--text-2); box-shadow: var(--sh-sm); }
.eyebrow i { background: var(--brand); color: #fff; font-style: normal; padding: 2px 9px; border-radius: 99px; font-size: 12px; }
.hero h1 { font-size: 54px; line-height: 1.06; letter-spacing: -.035em; margin: 20px 0 18px; font-weight: 800; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, #0d9488, #0f766e); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { font-size: 18px; color: var(--text-2); max-width: 540px; line-height: 1.6; }
.hero-cta { display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap; }
.hero-trust { display: flex; gap: 22px; margin-top: 36px; flex-wrap: wrap; color: var(--text-2); font-size: 14px; font-weight: 500; }
.hero-trust span { display: flex; gap: 8px; align-items: center; } .hero-trust .ic { color: var(--brand); }
.hero-visual { position: relative; height: 480px; }
.hv-card { position: absolute; border-radius: 22px; overflow: hidden; box-shadow: 0 24px 60px rgba(15, 23, 42, .18); background: #dfe7ea center/cover; }
.hv-1 { inset: 0 70px 60px 0; } .hv-2 { width: 230px; height: 190px; right: 0; bottom: 0; border: 6px solid #fff; }
.hv-float { position: absolute; left: -24px; bottom: 30px; background: #fff; border-radius: 16px; padding: 14px 16px; box-shadow: var(--sh-lg); display: flex; gap: 12px; align-items: center; font-size: 13.5px; }
.hv-float .stat-ic { width: 40px; height: 40px; }
.hv-float b { display: block; font-size: 15px; }
.hv-ph { display: grid; place-items: center; background: linear-gradient(135deg, #14b8a6, #0f766e); color: rgba(255,255,255,.5); }
.l-section { padding: 90px 24px; }
.l-section.alt { background: #fff; }
.l-in { max-width: 1200px; margin: 0 auto; }
.l-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.l-head .kicker { color: var(--brand); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .1em; }
.l-head h2 { font-size: 36px; letter-spacing: -.03em; margin: 10px 0 12px; font-weight: 800; }
.l-head p { color: var(--text-2); font-size: 16.5px; }
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.feature { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 24px; }
.l-section.alt .feature { background: var(--surface-2); }
.feature .stat-ic { width: 48px; height: 48px; border-radius: 14px; margin-bottom: 16px; }
.feature h3 { font-size: 17px; margin-bottom: 6px; } .feature p { color: var(--text-2); font-size: 14.5px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: step; }
.step { position: relative; padding: 28px; border-radius: 20px; background: #fff; border: 1px solid var(--line); }
.step::before { counter-increment: step; content: counter(step); width: 40px; height: 40px; border-radius: 12px; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 800; margin-bottom: 16px; }
.step h3 { font-size: 18px; margin-bottom: 6px; } .step p { color: var(--text-2); }
.teaser .apt-card { cursor: default; } .teaser .apt-card:hover { transform: none; }
.lock-note { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 13px; }
.b2b-box { background: linear-gradient(135deg, #1e1b4b 0%, #312e81 55%, #4c1d95 100%); color: #fff; border-radius: 28px; padding: 56px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; position: relative; overflow: hidden; }
.b2b-box::after { content: ''; position: absolute; right: -100px; bottom: -140px; width: 380px; height: 380px; border-radius: 50%; background: rgba(255,255,255,.06); }
.b2b-box h2 { font-size: 34px; letter-spacing: -.03em; margin: 12px 0 14px; } .b2b-box p { color: #c7d2fe; font-size: 16px; }
.b2b-list { display: grid; gap: 12px; position: relative; z-index: 1; }
.b2b-list div { display: flex; gap: 12px; align-items: center; background: rgba(255,255,255,.08); padding: 14px 16px; border-radius: 14px; font-weight: 500; }
.b2b-list .ic { color: #a5b4fc; }
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.contact-card { display: flex; gap: 14px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 20px; }
.contact-card .l { font-size: 13px; color: var(--muted); } .contact-card .v { font-weight: 700; font-size: 15.5px; overflow-wrap: anywhere; }
.l-footer { background: #0b1f1e; color: #8fa9a6; padding: 36px 24px; font-size: 14px; }
.l-footer .l-in { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.l-footer .logo { color: #fff; }
.l-mobile-menu { position: fixed; inset: 72px 0 auto 0; background: #fff; box-shadow: var(--sh-lg); padding: 12px 16px 18px; z-index: 49; display: flex; flex-direction: column; gap: 4px; }
.l-mobile-menu button:not(.btn) { border: 0; background: none; text-align: left; padding: 12px; font: 600 15px var(--font); border-radius: 10px; color: var(--text); }
.l-mobile-menu .btn { margin-top: 6px; }
.reg-type { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.reg-type label { border: 1.5px solid var(--line); border-radius: 14px; padding: 12px 14px; cursor: pointer; display: flex; gap: 10px; align-items: center; font-weight: 600; transition: all .15s; }
.reg-type label:has(input:checked) { border-color: var(--brand); background: var(--brand-50); color: var(--brand-700); }
.reg-type input { display: none; }
.reg-type small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
.success-box { text-align: center; padding: 10px 0; }
.success-box .stat-ic { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 16px; background: var(--ok-bg); color: var(--ok); }
.success-box .stat-ic .ic { width: 30px; height: 30px; }
.success-box h3 { font-size: 20px; margin-bottom: 8px; } .success-box p { color: var(--text-2); }

/* ============================================================ responsive */
@media (max-width: 1100px) {
  .dash-grid, .apt-layout { grid-template-columns: 1fr; }
  .book-card { position: static; }
  .search-panel { grid-template-columns: 1fr 1fr 1fr; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .hero-in { grid-template-columns: 1fr; } .hero-visual { height: 380px; }
  .b2b-box { grid-template-columns: 1fr; padding: 36px; }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--sh-lg); }
  .shell.nav-open .sidebar { transform: none; }
  .shell.nav-open .backdrop { display: block; position: fixed; inset: 0; background: rgba(15, 23, 42, .4); z-index: 45; }
  .main-col { margin-left: 0; }
  .topbar { padding: 0 16px; }
  .topbar .menu-btn { display: inline-grid; }
  #main { padding: 8px 16px 32px; }
  .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cab-nav { display: none; }
  .bottom-nav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; background: #fff; border-top: 1px solid var(--line); z-index: 40; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); }
  .bottom-nav button { flex: 1; border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 3px; font: 600 11px var(--font); color: var(--muted); padding: 6px 0; border-radius: 10px; cursor: pointer; }
  .bottom-nav button.active { color: var(--brand); }
  .l-nav, .l-actions .btn-ghost { display: none; }
  .l-burger { display: inline-grid; }
  .l-actions { margin-left: auto; }
  .contact-grid, .steps { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 14px; }
  h1 { font-size: 22px; }
  .g2, .g3, .g4, .perm-grid { grid-template-columns: 1fr; }
  .span2 { grid-column: auto; }
  .kv { grid-template-columns: 1fr; gap: 2px; } .kv dd { margin-bottom: 8px; }
  .money-box { grid-template-columns: 1fr 1fr; }
  .search-panel { grid-template-columns: 1fr 1fr; padding: 14px; }
  .search-panel .sp-btn { grid-column: 1 / -1; }
  .search-hero { padding: 22px 20px 64px; } .search-hero h1 { font-size: 22px; }
  .search-wrap { padding: 0 8px; }
  .cab-main { padding: 18px 16px 90px; } .cab-top-in { padding: 0 16px; gap: 10px; }
  .user-btn span.nm { display: none; } .user-btn { padding: 3px; }
  .booking-card { grid-template-columns: 76px 1fr; } .booking-card .ph { width: 76px; height: 64px; } .booking-card .bc-right { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; }
  .modal-wrap { padding: 0; align-items: flex-end; }
  .modal { border-radius: 20px 20px 0 0; max-width: none !important; margin: 0; }
  .modal-foot { border-radius: 0; }
  .modal-head, .modal-body { padding-left: 16px; padding-right: 16px; }
  .hero { padding: 110px 16px 60px; } .hero h1 { font-size: 36px; } .hero .lead { font-size: 16px; }
  .hero-visual { height: 280px; } .hv-2 { width: 150px; height: 120px; } .hv-1 { inset: 0 30px 40px 0; } .hv-float { left: 8px; bottom: 8px; }
  .l-section { padding: 60px 16px; } .l-head h2, .b2b-box h2 { font-size: 27px; }
  .features { grid-template-columns: 1fr; }
  .b2b-box { padding: 28px 22px; border-radius: 22px; }
  .l-header-in { padding: 0 16px; }
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 12px; flex-direction: column; gap: 8px; } .stat-ic { width: 36px; height: 36px; } .stat-value { font-size: 18px; }
  .toolbar .search { max-width: none; min-width: 100%; }
  .toolbar select, .toolbar input[type=date] { flex: 1; min-width: 0; }
  .auth-card { padding: 24px 20px; }
  .page-head .btn-row { width: 100%; }
}
@media print {
  .sidebar, .topbar, .toolbar, .btn { display: none !important; }
  .main-col { margin: 0; }
}

/* ============================================================ скрыть все полосы прокрутки (прокрутка работает) */
html, body, * { scrollbar-width: none; -ms-overflow-style: none; }
html::-webkit-scrollbar, body::-webkit-scrollbar, *::-webkit-scrollbar { display: none; width: 0; height: 0; background: transparent; }

/* ============================================================ PWA и мобильная версия */
html { -webkit-tap-highlight-color: transparent; }
button, a, .btn, .nav-item, .tab, label.check { touch-action: manipulation; }
html.standalone body { overscroll-behavior-y: none; }
html.standalone .l-header, html.standalone .cab-top { padding-top: env(safe-area-inset-top); }
.install-item { display: none !important; }
body.can-install .install-item, html.ios-install .install-item { display: flex !important; }
html.standalone .install-item { display: none !important; }
.sidebar-foot .install-item { margin-bottom: 8px; color: #7fe3d6; }
.control-mode .sidebar-foot .install-item { color: #c4b5fd; }
.install-sheet { position: fixed; left: 12px; right: 12px; bottom: calc(74px + env(safe-area-inset-bottom)); z-index: 90; background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--sh-lg);
  padding: 12px 8px 12px 12px; display: flex; gap: 12px; align-items: center; transform: translateY(24px); opacity: 0; transition: transform .25s, opacity .25s; max-width: 520px; margin: 0 auto; }
.install-sheet.show { transform: none; opacity: 1; }
.install-sheet img { width: 48px; height: 48px; border-radius: 12px; flex: none; }
.install-sheet .grow { flex: 1; min-width: 0; }
.install-sheet b { display: block; font-size: 14.5px; }
.install-sheet span { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.install-btns { display: flex; align-items: center; gap: 2px; }
.install-steps ol { padding-left: 22px; margin: 0 0 14px; display: grid; gap: 10px; line-height: 1.45; }
.install-app-ic img { width: 64px; height: 64px; border-radius: 16px; margin: 0 auto 16px; }
.ios-share { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; background: var(--info-bg); color: var(--info); vertical-align: -6px; }
#netBanner { position: fixed; top: 0; left: 0; right: 0; z-index: 250; background: #7f1d1d; color: #fff; font-size: 13px; font-weight: 600;
  padding: calc(7px + env(safe-area-inset-top)) 12px 7px; display: flex; gap: 8px; justify-content: center; align-items: center; text-align: center; }
.toast-action { align-items: center; } .toast-action .btn { margin-left: 6px; height: 30px; flex: none; }
.bottom-nav button { position: relative; }
.bottom-nav .nav-count { position: absolute; top: 1px; left: 50%; margin-left: 5px; font-size: 10px; padding: 0 5px; line-height: 16px; }
.board { --aptw: 210px; --dayw: 48px; }
.m-book-bar { display: none; }

@media (max-width: 1100px) {
  .m-book-bar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 39; background: rgba(255,255,255,.97); backdrop-filter: blur(8px); border-top: 1px solid var(--line);
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); align-items: center; justify-content: space-between; gap: 12px; box-shadow: 0 -6px 20px rgba(15,23,42,.07); transition: transform .22s; }
  .m-book-bar.hide { transform: translateY(130%); }
  .m-book-bar b { font-size: 18px; }
}
@media (max-width: 900px) {
  .m-book-bar { bottom: calc(60px + env(safe-area-inset-bottom)); padding-bottom: 10px; }
  .shell .bo-bottom { display: flex; z-index: 44; }
  .topbar .menu-btn { display: none; }
  .topbar { min-height: 58px; height: auto; padding-top: env(safe-area-inset-top); }
  .topbar h1 { font-size: 18px; }
  .topbar [data-newb] { width: 40px; padding: 0; } .topbar [data-newb] span { display: none; }
  #main { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  .cab-top { padding-top: env(safe-area-inset-top); }
  .cab-top-in { height: 60px; }
  #toasts { top: auto; bottom: calc(76px + env(safe-area-inset-bottom)); left: 12px; right: 12px; align-items: stretch; }
  .toast { max-width: none; transform: translateY(12px); }
  .board { --aptw: 132px; --dayw: 44px; }
  .board-apt { min-width: 132px; max-width: 132px; padding: 6px 10px; }
  .board-bar { font-size: 11px; padding: 0 6px; }
  .sidebar { padding-top: env(safe-area-inset-top); }
  .apt-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
}
@media (max-width: 640px) {
  input, select, textarea { font-size: 16px; }
  .btn { height: 44px; } .btn-sm { height: 38px; padding: 0 12px; } .btn-lg { height: 50px; }
  .icon-btn { width: 42px; height: 42px; }
  .page-head { margin-bottom: 14px; }
  .toolbar { gap: 8px; }
  .tabs { margin-left: -16px; margin-right: -16px; padding: 0 12px; }
  .modal { max-height: 94vh; max-height: 94dvh; display: flex; flex-direction: column; }
  .modal::before { content: ''; width: 40px; height: 4px; border-radius: 4px; background: #d6dce3; margin: 8px auto 0; flex: none; }
  .modal-head { padding-top: 10px; }
  .modal-head h3 { font-size: 17px; }
  .modal-body { overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
  .modal-foot { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
  .modal-foot .btn { flex: 1; }
  .modal-body > .btn-row .btn { flex: 1 1 auto; }
  .book-card { scroll-margin-top: 70px; }

  /* таблицы превращаются в карточки */
  .table.cards thead { display: none; }
  .table.cards, .table.cards tbody, .table.cards tfoot, .table.cards tr, .table.cards td { display: block; width: 100%; }
  .table.cards tr { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; margin-bottom: 10px; box-shadow: var(--sh-sm); }
  .table.cards tr.click:hover td { background: none; }
  .table.cards tr.click:active { background: #f3f8f8; }
  .table.cards td { border: 0; padding: 4px 0; display: flex; justify-content: space-between; align-items: baseline; gap: 14px; text-align: right; background: none; }
  .table.cards td::before { content: attr(data-label); color: var(--muted); font-size: 12px; font-weight: 600; text-align: left; flex: none; max-width: 42%; }
  .table.cards td:first-child { display: block; text-align: left; font-size: 15px; padding-bottom: 8px; margin-bottom: 4px; border-bottom: 1px solid var(--line-2); }
  .table.cards td:first-child::before, .table.cards td[data-label=""]::before, .table.cards td[colspan]::before { display: none; }
  .table.cards td[data-label=""] { justify-content: flex-end; }
  .table.cards td:empty { display: none; }
  .table.cards td[colspan] { display: block; text-align: center; }
  .table.cards .num { text-align: right; }
  .table.cards tfoot tr { background: var(--brand-50); border-color: var(--brand-100); }
  .table.cards tfoot td { background: none; border: 0; }
  .card:has(> .table-wrap > .table.cards) { background: transparent; border: 0; box-shadow: none; }
  .card:has(> .table-wrap > .table.cards) > .card-head { padding: 4px 2px 12px; border: 0; }
  .card > .table-wrap:has(> .table.cards) { overflow: visible; }
  .table.cards tr[style*="opacity"] { opacity: .6; }
}
@media (max-width: 640px) {
  .toolbar > select, .toolbar > input[type=date], .toolbar > .seg { flex: 1 1 calc(50% - 4px); min-width: 0; width: auto; }
  .toolbar > .seg { flex-basis: 100%; }
  .toolbar > .seg button { flex: 1; justify-content: center; }
  .toolbar > .search { flex: 1 1 100%; }
  .toolbar > a.btn, .toolbar > .btn, .toolbar > .btn-row { flex: 1 1 auto; margin-left: 0 !important; }
  .table.cards td { flex-wrap: wrap; justify-content: flex-end; align-items: center; column-gap: 8px; row-gap: 2px; }
  .table.cards td::before { margin-right: auto; }
  .table.cards td > .cell-sub { flex-basis: 100%; text-align: right; }
  .table.cards td:first-child, .table.cards td[colspan] { display: block; text-align: left; }
  .table.cards td:first-child > * { text-align: left; }
  .table.cards td[data-label=""] { display: flex; justify-content: flex-end; gap: 6px; flex-wrap: wrap; }
  .money-box { grid-template-columns: 1fr !important; gap: 6px; }
  .money-box > div { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 14px; }
  .money-box .v { margin: 0; font-size: 16px; }
}
