/*
  VOICE   calm, premium, hospitable — a concierge desk, not a spreadsheet
  IDEA    the hotel's front desk at dawn: a violet sky greeting, then the day's cards laid out on the desk
  PICTURE indigo-to-violet hero band with the greeting; white rounded cards rise over it (ref: "reference colors")
  COLOUR  indigo night #1B1446 → violet #5B4BF5, white cards, ink #15131F, green/red only for trends
  TYPE    SF Pro Display / Inter for UI, Instrument Serif italic for the guest's name
  LAYOUT  light sidebar with rounded items and counts (ref: "reference shapes"), widget grid from "reference logic"
*/
:root {
  color-scheme: light;
  --chart-soft: #DCD9E8;
  --chart-track: #EFEDF6;
  --chart-future: #ECEAF4;
  --violet-50: #F3F1FF;
  --violet-100: #E7E3FF;
  --violet-200: #CFC8FF;
  --violet-400: #8A7CFF;
  --violet-500: #6C5CFF;
  --violet-600: #5B4BF5;
  --violet-700: #4535D6;
  --indigo-900: #16113D;
  --indigo-800: #1F1757;
  --accent: var(--violet-600);
  --accent-strong: var(--violet-700);
  --accent-soft: var(--violet-50);

  --bg: #F4F3F9;
  --surface: #FFFFFF;
  --surface-2: #FAFAFD;
  --ink: #15131F;
  --ink-2: #3B384B;
  --muted: #6B687C;
  --line: #E8E6F0;
  --line-2: #F0EEF6;

  --green: #108A4A;
  --green-bg: #E3F6EB;
  --red: #D63B40;
  --red-bg: #FDECEC;
  --amber: #A15C00;
  --amber-bg: #FFF2DB;
  --blue: #2563EB;
  --blue-bg: #E6EEFF;

  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-card: 0 1px 2px rgba(22, 17, 61, .04), 0 8px 24px -12px rgba(22, 17, 61, .12);
  --shadow-pop: 0 18px 50px -18px rgba(22, 17, 61, .35);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Helvetica Neue", Arial, sans-serif;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sidebar-w: 264px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; min-width: 0; }
html, body { height: 100%; }
body {
  margin: 0;
  font: 15px/1.5 var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.dec { color: var(--muted); font-weight: 500; }
svg.ic { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- App shell ---------- */
.app { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }

.sidebar {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 14px;
  padding: 18px 14px 14px;
  background: #F7F6FB;
  border-right: 1px solid var(--line);
  overflow-y: auto;
  z-index: 40;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px; }
.brand img { width: 32px; height: 32px; }
.brand-name { font-size: 19px; font-weight: 700; letter-spacing: -.02em; }
.brand-name em { font-family: inherit; font-style: normal; font-weight: inherit; font-size: inherit; letter-spacing: inherit; color: var(--accent); }
.brand-hotel { margin-left: auto; font-size: 11px; color: var(--muted); max-width: 90px; text-align: right; line-height: 1.2; }

.quick {
  display: flex; align-items: center; gap: 8px;
  height: 42px; padding: 0 10px 0 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md);
  color: var(--muted);
}
.quick input { border: 0; outline: 0; background: transparent; width: 100%; font-size: 14px; color: var(--ink); }
.quick kbd { font: 11px var(--font); color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; background: var(--surface-2); }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-label { font-size: 11.5px; font-weight: 600; color: var(--muted); padding: 14px 12px 6px; }
.nav a {
  display: flex; align-items: center; gap: 12px;
  min-height: 40px; padding: 0 12px;
  border-radius: 12px; color: var(--ink-2); font-weight: 500;
  transition: background .18s var(--ease), color .18s var(--ease);
}
.nav a:hover { background: rgba(91, 75, 245, .06); text-decoration: none; }
.nav a .ic { color: var(--muted); }
.nav a.active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(22,17,61,.06), 0 4px 14px -8px rgba(22,17,61,.18); }
.nav a.active .ic { color: var(--accent); }
.nav .count { margin-left: auto; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.nav .pill-soon { margin-left: auto; font-size: 10.5px; font-weight: 600; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 2px 8px; }
.nav .pill-alert { margin-left: auto; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--red); color: #fff; font-size: 11.5px; font-weight: 600; display: grid; place-items: center; }

.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.occ-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 12px 14px; }
.occ-card .row { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); }
.occ-card .row b { color: var(--ink); font-weight: 600; }
.meter { height: 6px; border-radius: 999px; background: var(--line-2); margin: 10px 0 8px; overflow: hidden; }
.meter > i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--violet-400), var(--accent)); }
.occ-card small { font-size: 11.5px; color: var(--muted); }
.user {
  display: flex; align-items: center; gap: 10px; padding: 10px 8px;
  border-top: 1px solid var(--line);
}
.avatar {
  width: 36px; height: 36px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-size: 13px; font-weight: 600;
  background: var(--violet-100); color: var(--accent-strong);
}
.avatar.sm { width: 30px; height: 30px; font-size: 11.5px; }
.user .who { line-height: 1.25; }
.user .who b { display: block; font-size: 14px; font-weight: 600; }
.user .who span { font-size: 12px; color: var(--muted); }

/* ---------- Main + topbar ---------- */
.main { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 12px;
  height: 64px; padding: 0 clamp(16px, 3vw, 32px);
  background: rgba(244, 243, 249, .82);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar.on-hero { background: transparent; border-color: transparent; color: #fff; backdrop-filter: none; -webkit-backdrop-filter: none; position: absolute; left: 0; right: 0; }
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.crumbs b { color: var(--ink); font-weight: 600; }
.topbar.on-hero .crumbs, .topbar.on-hero .crumbs b { color: #fff; }
.topbar.on-hero .crumbs { color: rgba(255,255,255,.72); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; position: relative;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
  transition: transform .15s var(--ease), background .15s;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn:active { transform: scale(.96); }
.topbar.on-hero .icon-btn { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.2); color: #fff; }
.topbar.on-hero .icon-btn:hover { background: rgba(255,255,255,.2); }
.icon-btn .dot { position: absolute; top: 9px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: #FF5A7A; box-shadow: 0 0 0 2px var(--surface); }
.menu-btn { display: none; }

/* ---------- Buttons, inputs, badges ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font-weight: 600; font-size: 14px; white-space: nowrap;
  transition: transform .15s var(--ease), background .15s, box-shadow .15s;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 8px 20px -10px var(--accent); }
.btn.primary:hover { background: var(--accent-strong); }
.btn.dark { background: #121019; border-color: #121019; color: #fff; }
.btn.dark:hover { background: #24212F; }
.btn.white { background: #fff; border-color: #fff; color: var(--ink); }
.btn.ghost { background: transparent; }
.btn.sm { height: 36px; padding: 0 14px; font-size: 13px; }
.btn.danger { color: var(--red); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field .hint { font-size: 12px; color: var(--muted); }
.field .err { font-size: 12px; color: var(--red); }
.input, .select {
  height: 44px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: var(--radius-md);
  background: var(--surface); font-size: 16px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus { border-color: var(--violet-400); box-shadow: 0 0 0 4px rgba(108, 92, 255, .14); }
.input[aria-invalid="true"] { border-color: var(--red); }
.select { appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B687C' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }

.filter {
  display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px 0 14px;
  border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); font-size: 13.5px; color: var(--muted);
  position: relative;
}
.filter select { border: 0; outline: 0; background: transparent; font-weight: 600; color: var(--ink); font-size: 13.5px; appearance: none; padding-right: 16px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%236B687C' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right center; }
.filter:focus-within { border-color: var(--violet-400); box-shadow: 0 0 0 4px rgba(108, 92, 255, .12); }
.search-box { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); color: var(--muted); flex: 1 1 260px; max-width: 320px; }
.search-box input { border: 0; outline: 0; background: transparent; width: 100%; font-size: 14px; color: var(--ink); }
.search-box:focus-within { border-color: var(--violet-400); box-shadow: 0 0 0 4px rgba(108, 92, 255, .12); }

.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 8px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.green { background: var(--green-bg); color: var(--green); }
.badge.red { background: var(--red-bg); color: var(--red); }
.badge.amber { background: var(--amber-bg); color: var(--amber); }
.badge.violet { background: var(--accent-soft); color: var(--accent-strong); }
.badge.blue { background: var(--blue-bg); color: var(--blue); }
.badge.gray { background: var(--line-2); color: var(--muted); }
.trend { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.trend.up { background: var(--green-bg); color: var(--green); }
.trend.down { background: var(--red-bg); color: var(--red); }
.trend .ic { width: 13px; height: 13px; stroke-width: 2.4; }

/* ---------- Page layout ---------- */
.page { padding: 28px clamp(16px, 3vw, 32px) 48px; max-width: 1480px; width: 100%; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { margin: 0; font-size: clamp(26px, 3vw, 32px); line-height: 1.1; letter-spacing: -.025em; text-wrap: balance; }
.page-head p { margin: 6px 0 0; color: var(--muted); font-size: 14.5px; }
.page-head .actions { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }

.card {
  background: var(--surface); border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card); border: 1px solid rgba(232, 230, 240, .7);
  padding: 22px 22px 20px; position: relative;
}
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-head h3 { margin: 0; font-size: 15px; font-weight: 600; color: var(--ink-2); letter-spacing: -.005em; }
.card-head .sub { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.card-head .tools { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.card-icon { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); color: var(--ink-2); }
.big { font-size: clamp(28px, 2.6vw, 36px); font-weight: 600; letter-spacing: -.03em; line-height: 1.05; font-variant-numeric: tabular-nums; white-space: nowrap; }
.big.xl { font-size: clamp(32px, 3.4vw, 44px); }
.kpi-foot { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }

.tabs { display: inline-flex; gap: 4px; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; margin-bottom: 18px; flex-wrap: wrap; }
.tabs button { height: 36px; padding: 0 16px; border-radius: 999px; border: 0; background: transparent; font-weight: 600; font-size: 13.5px; color: var(--muted); }
.tabs button[aria-selected="true"] { background: #121019; color: #fff; }
.seg { display: inline-flex; gap: 2px; padding: 3px; background: var(--line-2); border-radius: 999px; }
.seg button { height: 30px; padding: 0 12px; border: 0; border-radius: 999px; background: transparent; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(22,17,61,.12); }

/* ---------- Tables (Arcline style) ---------- */
.table-card { padding: 0; overflow: hidden; }
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
.t th { text-align: left; font-size: 13px; font-weight: 500; color: var(--muted); padding: 14px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.t th button { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.t th button:focus-visible { outline: 2px solid var(--accent); }
.t td { padding: 14px 16px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.t tbody tr { transition: background .12s; }
.t tbody tr:hover { background: #FBFAFF; }
.t tbody tr:last-child td { border-bottom: 0; }
.t .r { text-align: right; }
.t .strong { font-weight: 600; color: var(--ink); }
.t .muted { color: var(--muted); font-size: 13px; }
.t .person { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.t .amt-in { color: var(--green); font-weight: 600; }
.t .amt-out { color: var(--ink); font-weight: 600; }
.t.compact th, .t.compact td { padding: 10px 12px; font-size: 13.5px; }
.t.compact th { background: transparent; font-size: 12px; }
.row-btn { width: 32px; height: 32px; border-radius: 8px; border: 0; background: transparent; color: var(--muted); display: inline-grid; place-items: center; }
.row-btn:hover { background: var(--line-2); color: var(--ink); }
.table-foot { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--muted); flex-wrap: wrap; }
.pager { margin-left: auto; display: flex; gap: 6px; }
.pager button { min-width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; font-weight: 600; color: var(--ink-2); }
.pager button[aria-current="page"] { background: var(--line-2); border-color: var(--line-2); }
.pager button:disabled { opacity: .4; cursor: default; }
.empty { padding: 28px 16px; text-align: center; color: var(--muted); font-size: 14px; }
.empty .ic { width: 28px; height: 28px; color: var(--violet-400); display: block; margin: 0 auto 8px; }

/* ---------- Dashboard hero ---------- */
.hero {
  position: relative; color: #fff;
  padding: 96px clamp(16px, 3vw, 32px) 120px;
  background:
    radial-gradient(900px 420px at 78% 10%, rgba(140, 124, 255, .55), transparent 60%),
    radial-gradient(700px 380px at 10% 100%, rgba(108, 92, 255, .55), transparent 65%),
    linear-gradient(180deg, var(--indigo-900) 0%, var(--indigo-800) 45%, var(--violet-600) 100%);
  overflow: hidden;
}
.hero::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px); background-size: 120px 120px; mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent); pointer-events: none; }
.hero-inner { position: relative; z-index: 1; max-width: 1480px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 32px; align-items: center; }
.hero .date { font-size: 13.5px; color: rgba(255,255,255,.72); margin: 0 0 10px; }
.hero h1 { margin: 0; font-size: clamp(38px, 5vw, 64px); line-height: 1.02; letter-spacing: -.035em; font-weight: 600; text-wrap: balance; }
.hero h1 em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; color: #E8E4FF; }
.hero .hero-actions { display: flex; gap: 10px; margin-top: 26px; flex-wrap: wrap; }
.ask {
  display: flex; align-items: center; gap: 10px; margin-top: 16px; max-width: 440px; height: 46px; padding: 0 6px 0 16px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); border-radius: 999px;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.ask input { flex: 1; border: 0; outline: 0; background: transparent; color: #fff; font-size: 15px; }
.ask input::placeholder { color: rgba(255,255,255,.62); }
.ask button { width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255,255,255,.9); color: var(--accent); display: grid; place-items: center; }
.brief {
  justify-self: end; width: 100%; max-width: 440px;
  background: linear-gradient(180deg, rgba(23, 18, 58, .92), rgba(16, 12, 40, .94));
  border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius-xl);
  padding: 20px; box-shadow: var(--shadow-pop);
}
.brief-top { display: flex; align-items: center; gap: 8px; font-size: 13px; color: rgba(255,255,255,.8); }
.brief-top .stamp { margin-left: auto; font-size: 11.5px; color: rgba(255,255,255,.6); background: rgba(255,255,255,.08); border-radius: 999px; padding: 4px 10px; }
.brief-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; margin: 18px 0 12px; background: linear-gradient(135deg, var(--violet-400), var(--violet-700)); box-shadow: 0 8px 24px -6px rgba(108, 92, 255, .8); }
.brief h2 { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.brief h2 em { font-family: var(--serif); font-weight: 400; font-size: 25px; }
.brief p { margin: 6px 0 14px; font-size: 13.5px; color: rgba(255,255,255,.68); }
.brief-stats { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.brief-stats span { font-size: 12.5px; padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.04); white-space: nowrap; }
.brief-stats b { font-weight: 700; }
.brief .btn { width: 100%; }

.dash { position: relative; z-index: 2; margin-top: -84px; padding-top: 0; }
.dash-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; color: #fff; flex-wrap: wrap; }
.dash-bar .title { font-size: 14px; font-weight: 600; color: rgba(255,255,255,.88); }
.dash-bar .btn { margin-left: auto; }
.dash-bar .btn + .btn { margin-left: 0; }

/* ---------- Widget grid ---------- */
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.w { grid-column: span 3; display: flex; flex-direction: column; transition: box-shadow .2s var(--ease), transform .2s var(--ease), opacity .2s; }
.w.s3 { grid-column: span 3; }
.w.s4 { grid-column: span 4; }
.w.s6 { grid-column: span 6; }
.w.s8 { grid-column: span 8; }
.w.s12 { grid-column: span 12; }
.w .w-body { flex: 1; display: flex; flex-direction: column; }
.w.collapsed .w-body { display: none; }
.w.collapsed .card-head { margin-bottom: 0; }
.w-tool { width: 30px; height: 30px; border-radius: 8px; border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; }
.w-tool:hover { background: var(--line-2); color: var(--ink); }
.w-tool .ic { width: 16px; height: 16px; }
.w-handle { cursor: grab; display: none; }
.editing .w-handle { display: grid; }
.editing .w { outline: 2px dashed var(--violet-200); outline-offset: 3px; }
.w.dragging { opacity: .45; }
.w.drop-target { box-shadow: 0 0 0 3px var(--accent), var(--shadow-card); }

.kpi { padding: 20px 20px 18px; }
.kpi .card-head { margin-bottom: 18px; }

/* charts */
.fig { position: relative; width: 100%; min-height: 220px; flex: 1; }
.fig > svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.fig.tall { min-height: 280px; }
.fig.short { min-height: 140px; }
.chart-axis { font-size: 11px; fill: var(--muted); font-family: var(--font); }
.chart-grid { stroke: var(--line-2); stroke-width: 1; }
.tip {
  position: absolute; pointer-events: none; z-index: 5;
  background: #121019; color: #fff; border-radius: 12px; padding: 8px 12px;
  font-size: 12px; white-space: nowrap; transform: translate(-50%, calc(-100% - 12px));
  box-shadow: var(--shadow-pop); opacity: 0; transition: opacity .12s;
}
.tip b { display: block; font-size: 16px; letter-spacing: -.01em; }
.tip .tchip { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 6px; background: var(--violet-500); font-size: 11px; font-weight: 600; }
.tip.show { opacity: 1; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--muted); }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.donut-wrap { display: grid; grid-template-columns: minmax(0, 150px) minmax(0, 1fr); gap: 18px; align-items: center; }
.donut-wrap .fig { min-height: 150px; aspect-ratio: 1; }
.bars-h { display: flex; flex-direction: column; gap: 12px; }
.bars-h .bh-row { display: grid; grid-template-columns: minmax(0, 120px) minmax(0, 1fr) auto; gap: 12px; align-items: center; font-size: 13.5px; }
.bars-h .bh-track { height: 10px; border-radius: 999px; background: var(--line-2); overflow: hidden; }
.bars-h .bh-track i { display: block; height: 100%; border-radius: inherit; }
.bars-h .bh-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); }

.list { display: flex; flex-direction: column; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-2); font-size: 14px; }
.list-row:last-child { border-bottom: 0; }
.list-row .meta { line-height: 1.3; }
.list-row .meta b { display: block; font-weight: 600; font-size: 14px; }
.list-row .meta span { font-size: 12.5px; color: var(--muted); }
.list-row .end { margin-left: auto; text-align: right; display: flex; align-items: center; gap: 10px; }
.w-link { margin-top: auto; padding-top: 12px; font-size: 13px; font-weight: 600; }

/* ---------- Drawer / modal / toast ---------- */
.scrim { position: fixed; inset: 0; background: rgba(15, 12, 35, .42); z-index: 80; opacity: 0; pointer-events: none; transition: opacity .2s; }
.scrim.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100%); z-index: 90;
  background: var(--surface); box-shadow: var(--shadow-pop);
  transform: translateX(100%); transition: transform .28s var(--ease);
  display: flex; flex-direction: column;
}
.drawer.open { transform: none; }
.drawer-head { display: flex; align-items: center; gap: 10px; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { margin: 0; font-size: 18px; letter-spacing: -.01em; }
.drawer-head .icon-btn { margin-left: auto; }
.drawer-body { padding: 20px 22px; overflow-y: auto; display: flex; flex-direction: column; gap: 22px; flex: 1; }
.drawer-foot { padding: 16px 22px; border-top: 1px solid var(--line); display: flex; gap: 10px; }
.drawer h4 { margin: 0 0 10px; font-size: 13px; color: var(--muted); font-weight: 600; }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch { width: 44px; height: 44px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line); position: relative; }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--ink); }
.wlist { display: flex; flex-direction: column; gap: 6px; }
.wl-item { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 4px 6px 4px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.wl-item .name { flex: 1; font-size: 14px; font-weight: 500; }
.wl-item .name small { display: block; font-size: 12px; color: var(--muted); font-weight: 400; }
.wl-item.off .name { color: var(--muted); }
.switch { position: relative; display: inline-block; vertical-align: middle; width: 44px; height: 26px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: #D7D4E3; transition: background .2s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s var(--ease); }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.modal {
  position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; padding: 16px;
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.modal.open { opacity: 1; pointer-events: auto; }
.modal-box { width: min(560px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; background: var(--surface); border-radius: var(--radius-xl); box-shadow: var(--shadow-pop); transform: translateY(12px) scale(.98); transition: transform .25s var(--ease); }
.modal.open .modal-box { transform: none; }
.modal-head { display: flex; align-items: center; padding: 20px 22px 0; }
.modal-head h2 { margin: 0; font-size: 19px; letter-spacing: -.01em; }
.modal-head .icon-btn { margin-left: auto; }
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; padding: 18px 22px; }
.form-grid .full { grid-column: 1 / -1; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 0 22px 22px; }

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 120; transform: translate(-50%, 20px);
  display: flex; align-items: center; gap: 14px; padding: 12px 12px 12px 18px;
  background: #121019; color: #fff; border-radius: 14px; box-shadow: var(--shadow-pop);
  font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .25s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast button { height: 32px; padding: 0 12px; border-radius: 8px; border: 0; background: rgba(255,255,255,.12); color: #fff; font-weight: 600; font-size: 13px; }

.menu { position: absolute; z-index: 60; min-width: 180px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-pop); }
.menu button { display: flex; width: 100%; align-items: center; gap: 10px; height: 38px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; font-size: 13.5px; text-align: left; }
.menu button:hover { background: var(--line-2); }
.menu button.danger { color: var(--red); }

/* ---------- Coming soon ---------- */
.soon { display: grid; place-items: center; text-align: center; min-height: 60vh; }
.soon .card { max-width: 520px; padding: 40px 32px; }
.soon .brief-icon { margin: 0 auto 16px; color: #fff; }
.soon h1 { margin: 0 0 8px; font-size: 28px; letter-spacing: -.02em; }
.soon p { margin: 0 0 20px; color: var(--muted); }
.soon ul { text-align: left; margin: 0 auto 24px; padding: 0; list-style: none; display: grid; gap: 8px; max-width: 360px; }
.soon li { display: flex; gap: 10px; align-items: center; font-size: 14px; color: var(--ink-2); }
.soon li .ic { color: var(--accent); }

.sample-note { font-size: 12px; color: var(--muted); margin-top: 18px; }

/* ---------- Responsive ---------- */
@media (max-width: 1280px) {
  .w.s3 { grid-column: span 6; }
  .w.s4 { grid-column: span 6; }
  .w.s8 { grid-column: span 12; }
}
@media (max-width: 1024px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; z-index: 85; width: var(--sidebar-w); transform: translateX(-100%); transition: transform .28s var(--ease); box-shadow: var(--shadow-pop); }
  .sidebar.open { transform: none; }
  .menu-btn { display: grid; }
  .hero-inner { grid-template-columns: minmax(0, 1fr); }
  .brief { justify-self: start; }
  .w.s6 { grid-column: span 12; }
}
@media (max-width: 680px) {
  .w, .w.s3, .w.s4, .w.s6, .w.s8 { grid-column: span 12; }
  .hero { padding-top: 84px; padding-bottom: 104px; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .donut-wrap { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .donut-wrap .fig { width: 160px; }
  .search-box { max-width: none; }
  .page-head .actions { margin-left: 0; }
  .bars-h .bh-row { grid-template-columns: minmax(0, 90px) minmax(0, 1fr) auto; }
  /* stacked tables */
  .stack thead { display: none; }
  .stack tr { display: grid; padding: 10px 16px; border-bottom: 1px solid var(--line-2); }
  .stack td { display: flow-root; border: 0; padding: 4px 0 4px 8.5em; text-align: left !important; }
  .stack td::before { content: attr(data-l); float: left; width: 8em; margin-left: -8.5em; color: var(--muted); font-size: 12.5px; }
  .stack td:empty { display: none; }
  .stack tbody tr:last-child td { border-bottom: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- Aggiunte ---------- */
.main { position: relative; }
.btn.glass { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.28); color: #fff; }
.btn.glass:hover { background: rgba(255,255,255,.2); }
.w-width { display: none !important; }
.editing .w-width { display: grid !important; }
.dash-bar .title { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.dash-bar .title .ic { width: 16px; height: 16px; }
.t td .ic { width: 16px; height: 16px; vertical-align: -3px; color: var(--muted); }
.wt { display: inline-flex; align-items: center; gap: 2px; }
.kpi .card-head { padding-right: 0; }
.kpi .wt { position: absolute; top: 18px; right: 16px; padding: 2px; background: var(--surface); border-radius: 10px; box-shadow: 0 0 0 1px var(--line); opacity: 0; transition: opacity .15s; }
.kpi:hover .wt, .kpi:focus-within .wt, .editing .kpi .wt { opacity: 1; }
@media (hover: none) { .kpi .wt { position: static; opacity: 1; box-shadow: none; } }

/* ---------- Portali ---------- */
.portal .card-head { align-items: flex-start; }
.portal .card-icon { width: 40px; height: 40px; flex: none; }
.pinfo { margin: 0 0 14px; display: grid; gap: 10px; }
.pinfo > div { display: grid; grid-template-columns: minmax(0, 110px) minmax(0, 1fr); gap: 10px; font-size: 13.5px; }
.pinfo dt { color: var(--muted); }
.pinfo dd { margin: 0; color: var(--ink-2); }
.pstate { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--green-bg); color: var(--green); margin-bottom: 14px; }
.pstate.due { background: var(--amber-bg); color: var(--amber); }
.pstate div { line-height: 1.35; }
.pstate b { display: block; font-size: 14px; color: var(--ink); }
.pstate span { font-size: 12.5px; color: var(--ink-2); }
.pactions { margin-top: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.btn:disabled { opacity: .45; cursor: default; transform: none; }

.auto-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.auto-row div { line-height: 1.35; flex: 1; }
.auto-row b { display: block; font-size: 14px; }
.auto-row span { font-size: 12.5px; color: var(--muted); }

/* ---------- Planner ---------- */
.planner { --pl-room: 168px; --pl-day: 52px; }
.pl-nav { display: flex; align-items: center; gap: 6px; }
.pl-tools { gap: 12px; }
.pl-label { font-size: 13px; color: var(--muted); font-weight: 500; }
.pl-tools .seg { flex-wrap: wrap; }
.pl-tools .seg button { display: inline-flex; align-items: center; gap: 6px; }
.seg .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.pl-legend { margin-left: auto; }
.pl-card { padding: 0; overflow: hidden; }
.pl-scroll { overflow-x: auto; max-height: 72vh; overflow-y: auto; }
.pl-row { display: grid; width: 100%; border-bottom: 1px solid var(--line-2); }
.pl-room { position: sticky; left: 0; z-index: 3; background: var(--surface); padding: 0 14px; display: flex; flex-direction: column; justify-content: center; border-right: 1px solid var(--line); font-size: 13.5px; font-weight: 500; min-height: 44px; }
.pl-room b { font-size: 13.5px; font-weight: 600; }
.pl-room span { font-size: 11.5px; color: var(--muted); font-weight: 500; }
.pl-head { position: sticky; top: 0; z-index: 5; background: var(--surface-2); }
.pl-head .pl-room, .pl-corner { background: var(--surface-2); color: var(--muted); font-size: 12px; z-index: 6; }
.pl-day { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 8px 0; font-size: 11px; color: var(--muted); border-left: 1px solid var(--line-2); text-transform: capitalize; }
.pl-day b { font-size: 15px; color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.pl-day.today { background: var(--accent); color: rgba(255,255,255,.85); }
.pl-day.today b { color: #fff; }
.pl-cell { border: 0; border-left: 1px solid var(--line-2); background: transparent; min-height: 44px; padding: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; font-size: 11px; }
.we { background-color: #FAF9FD; }
.pl-cell.today { background-color: var(--accent-soft); }
.pl-occ .pl-cell { position: relative; min-height: 34px; }
.pl-occ .pl-room { min-height: 34px; }
.pl-occ-bar { position: absolute; left: 8px; right: 8px; bottom: 6px; height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.pl-occ-bar::after { content: ""; position: absolute; inset: 0; width: var(--o); background: var(--accent); border-radius: inherit; }
.pl-occ small { margin-bottom: 8px; color: var(--ink-2); font-weight: 600; }
.pl-type { background: var(--surface-2); }
.pl-type .pl-room { background: var(--surface-2); }
.pl-type .pl-cell b { font-size: 12px; color: var(--ink); font-weight: 600; }
.pl-type .pl-cell small { color: var(--muted); font-size: 10.5px; }
.pl-type .pl-cell small.full { color: var(--red); font-weight: 600; }
.pl-roomrow .pl-room { font-weight: 500; color: var(--ink-2); }
.pl-free { cursor: pointer; transition: background .12s; }
.pl-free:hover { background-color: rgba(108, 92, 255, .08); }
.pl-bar {
  z-index: 2; margin: 6px 3px; min-width: 0; border: 0; border-radius: 9px; padding: 0 8px; text-align: left;
  background: color-mix(in srgb, var(--c) 15%, var(--surface)); box-shadow: inset 3px 0 0 var(--c);
  display: flex; flex-direction: column; justify-content: center; overflow: hidden; line-height: 1.15; color: var(--ink);
  transition: transform .12s var(--ease), box-shadow .12s;
}
.pl-bar:hover { transform: translateY(-1px); box-shadow: inset 3px 0 0 var(--c), 0 6px 16px -8px rgba(22,17,61,.35); }
.pl-bar b { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-bar span { font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-bar.in { background: color-mix(in srgb, var(--c) 28%, var(--surface)); box-shadow: inset 3px 0 0 var(--c), inset 0 0 0 1.5px var(--ink); }
.pl-bar.past { opacity: .5; }
.pl-bar.cut-l { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: 0; }
.pl-bar.cut-r { border-top-right-radius: 0; border-bottom-right-radius: 0; margin-right: 0; }
.mk-input { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: var(--muted); }
.mk-input input { width: 64px; height: 38px; border: 1px solid var(--line); border-radius: 10px; padding: 0 8px; text-align: right; font-size: 16px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.mk-input input:focus { outline: none; border-color: var(--violet-400); box-shadow: 0 0 0 4px rgba(108, 92, 255, .14); }
.bk-price { margin: 18px 22px 20px; padding: 6px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-2); }
.bk-line { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 14px; color: var(--ink-2); }
.bk-line b { font-weight: 600; color: var(--ink); }
.bk-line.strong b { font-size: 15px; }
.bk-line.total { border-bottom: 0; }
.bk-line.total span { font-weight: 600; color: var(--ink); }
.bk-line.total b { font-size: 20px; letter-spacing: -.02em; }
.bk-diff { display: flex; gap: 8px; align-items: flex-start; margin: 0 -16px -6px; padding: 12px 16px; border-radius: 0 0 16px 16px; font-size: 13px; font-weight: 500; }
.bk-diff.ok { background: var(--green-bg); color: var(--green); }
.bk-diff.ko { background: var(--red-bg); color: var(--red); }
@media (max-width: 680px) { .planner { --pl-room: 110px; --pl-day: 46px; } .pl-legend { margin-left: 0; } }

.linkish { all: unset; display: block; cursor: pointer; font-weight: 600; font-size: 14px; color: var(--ink); }
.linkish:hover { color: var(--accent); text-decoration: underline; }
.linkish:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.empty-line { padding: 14px 0; color: var(--muted); font-size: 13.5px; }

/* ---------- Scheda prenotazione ---------- */
.bk-panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100%); z-index: 92; background: #F3F2FA; box-shadow: var(--shadow-pop); transform: translateX(100%); transition: transform .3s var(--ease); display: flex; flex-direction: column; }
.bk-panel.open { transform: none; }
.bk-scroll { overflow-y: auto; height: 100%; padding-bottom: 32px; }
.bk-top { display: flex; align-items: center; gap: 16px; padding: 22px 22px 70px; color: #fff; background: radial-gradient(500px 220px at 90% 0%, rgba(140,124,255,.6), transparent 60%), linear-gradient(160deg, var(--indigo-900), var(--violet-600)); }
.bk-top h2 { margin: 0; font-size: 22px; letter-spacing: -.02em; }
.bk-top span { font-size: 14px; color: rgba(255,255,255,.78); }
.bk-top.plain { background: transparent; color: var(--ink); padding: 18px 22px 10px; position: sticky; top: 0; z-index: 4; background: rgba(243,242,250,.92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.bk-top.plain h2 { font-size: 19px; }
.icon-btn.glassy { background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.25); color: #fff; }
.bk-summary { margin: -52px 18px 0; background: var(--surface); border-radius: var(--radius-xl); box-shadow: var(--shadow-card); padding: 18px 20px; position: relative; z-index: 2; }
.bk-sum-head { display: flex; align-items: center; gap: 12px; }
.bk-sum-head b { font-size: 16px; }
.ch-logo { width: 38px; height: 38px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: var(--c); background: color-mix(in srgb, var(--c) 14%, var(--surface)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--c) 30%, var(--surface)); }
.bk-sum-room { margin: 10px 0 8px; color: var(--muted); font-size: 14px; }
.bk-sum-foot { display: flex; align-items: center; gap: 16px; color: var(--ink-2); font-size: 14px; }
.bk-sum-foot span { display: inline-flex; align-items: center; gap: 5px; }
.bk-sum-foot .ic { width: 16px; height: 16px; color: var(--muted); }
.bk-sum-foot b { margin-left: auto; font-size: 18px; color: var(--accent); letter-spacing: -.01em; }
.bk-tabs { margin: 18px 18px 6px; display: flex; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
.bk-tabs button { flex: none; }
.tab-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--red); margin-left: 4px; vertical-align: 2px; }
.bk-body { padding: 8px 18px 0; display: flex; flex-direction: column; gap: 14px; }
.bk-card { padding: 16px 18px; }
.bk-card h4 { margin: 0 0 8px; font-size: 14px; color: var(--muted); font-weight: 600; }
.bk-card hr { border: 0; border-top: 1px solid var(--line); margin: 8px 0; }
.kv { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 9px 0; font-size: 14.5px; }
.kv > span { color: var(--muted); }
.kv > b { font-weight: 600; text-align: right; display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.linkish.inline { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; color: var(--accent); }
.linkish.inline:hover { background: var(--accent-soft); text-decoration: none; }
.price-edit { display: flex; gap: 6px; align-items: center; }
.price-edit .input { width: 120px; height: 38px; text-align: right; }
.pill-label { align-self: flex-start; background: #121019; color: #fff; font-weight: 600; font-size: 13.5px; border-radius: 999px; padding: 7px 16px; }
.btn.wide { width: 100%; height: 48px; }
.btn.soft { background: var(--accent-soft); border-color: transparent; color: var(--accent-strong); }
.btn.ok { color: var(--green); }
.btn.ko { color: var(--red); }
.lbl { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.note-box { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-md); font-size: 14.5px; background: var(--surface); }
.textarea { height: auto; min-height: 120px; padding: 12px 14px; resize: vertical; line-height: 1.5; }
.bk-row-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.bk-row-head h3 { margin: 0; font-size: 17px; }
.guest-card { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; border: 1px solid rgba(232,230,240,.7); padding: 14px 16px; cursor: pointer; transition: transform .12s var(--ease), box-shadow .12s; }
.guest-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-pop); }
.g-av { position: relative; flex: none; }
.g-av .avatar { width: 46px; height: 46px; font-size: 15px; border-radius: 14px; }
.g-in { position: absolute; left: -8px; bottom: -4px; width: 22px; height: 22px; border-radius: 6px; background: var(--green); color: #fff; display: grid; place-items: center; }
.g-in .ic { width: 13px; height: 13px; stroke-width: 2.4; }
.g-meta { flex: 1; line-height: 1.35; }
.g-meta b { display: block; font-size: 15px; }
.g-meta span { font-size: 13px; color: var(--muted); }
.bk-hint { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--muted); margin: 4px 0 0; }
.bk-hint .ic { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.bk-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }
.bk-actions.col { grid-template-columns: 1fr; }
.g-top { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.g-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 16px; text-align: left; border: 1px solid rgba(232,230,240,.7); color: var(--ink); position: relative; cursor: pointer; font: inherit; }
.g-tile:hover { text-decoration: none; box-shadow: var(--shadow-pop); }
.g-tile .badge { position: absolute; top: 16px; right: 14px; }
.g-tile b { font-size: 15px; margin-top: 10px; }
.g-tile > span:last-child { font-size: 13px; color: var(--muted); }
.tile-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.miss-box { display: flex; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--red-bg); color: var(--red); font-size: 13px; }
.miss-box b { display: block; color: var(--ink); font-size: 14px; }
.miss-box span { color: var(--ink-2); }
.form-stack { display: flex; flex-direction: column; gap: 12px; }
.form-stack .hint { font-size: 12.5px; color: var(--muted); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.radios { display: flex; gap: 22px; padding: 6px 0; }
.radio { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; cursor: pointer; min-height: 32px; }
.radio input { width: 20px; height: 20px; accent-color: var(--accent); margin: 0; }
.bk-line { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px dashed var(--line); font-size: 14.5px; }
.bk-line > span:first-child { flex: 1; color: var(--ink-2); }
.bk-line small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.bk-line b { font-weight: 600; }
.bk-line.total { border-bottom: 0; font-size: 16px; }
.bk-line.total span { color: var(--ink); font-weight: 600; }
.bk-line.total b { font-size: 20px; letter-spacing: -.02em; }
details.nights summary { list-style: none; cursor: pointer; }
details.nights summary::-webkit-details-marker { display: none; }
details.nights summary .bk-line > span:first-child::after { content: " ▾"; color: var(--muted); font-size: 11px; }
details.nights[open] summary .bk-line > span:first-child::after { content: " ▴"; }
.night { display: flex; justify-content: space-between; padding: 6px 12px; font-size: 13px; color: var(--muted); background: var(--surface-2); }
.night:first-of-type { border-radius: 10px 10px 0 0; } .night:last-child { border-radius: 0 0 10px 10px; margin-bottom: 8px; }
.saldo { display: flex; align-items: center; justify-content: space-between; margin: 12px 0 4px; padding: 14px 16px; border-radius: 14px; font-weight: 600; }
.saldo b { font-size: 20px; letter-spacing: -.02em; }
.saldo.due { background: var(--amber-bg); color: var(--amber); }
.saldo.ok { background: var(--green-bg); color: var(--green); }
.pay-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 10px; align-items: end; margin-top: 12px; }
.pay-form .err { grid-column: 1 / -1; font-size: 12px; color: var(--red); }
.doc-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); font-size: 13.5px; font-weight: 600; }
.chip:hover { border-color: var(--violet-200); background: var(--accent-soft); }
.chip span { color: var(--muted); font-weight: 500; }
.chip .ic { width: 15px; height: 15px; color: var(--accent); }
.stepper { display: inline-flex; align-items: center; gap: 4px; }
.stepper b { min-width: 22px; text-align: center; }
.doc-rows td { font-size: 13.5px; }
.doc-tot { margin-top: 10px; display: grid; gap: 4px; justify-items: end; font-size: 13.5px; }
.doc-tot div { display: flex; gap: 18px; min-width: 240px; justify-content: space-between; color: var(--muted); }
.doc-tot b { color: var(--ink); }
.doc-tot .grand { font-size: 16px; color: var(--ink); border-top: 1px solid var(--line); padding-top: 8px; margin-top: 4px; }
.doc-tot .grand span { color: var(--ink); font-weight: 600; }
.doc-sheet { background: #fff; border-radius: 16px; padding: 24px; box-shadow: var(--shadow-card); }
.doc-head { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.doc-head > div { display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--muted); }
.doc-head b { font-size: 16px; color: var(--ink); }
.doc-head img { margin-bottom: 6px; }
.doc-head .r { text-align: right; align-items: flex-end; }
.doc-party { display: flex; flex-direction: column; gap: 2px; padding: 16px 0; font-size: 13px; color: var(--muted); }
.doc-party b { font-size: 15px; color: var(--ink); }
.doc-foot { margin: 18px 0 0; font-size: 12px; color: var(--muted); }
@media (max-width: 520px) { .pay-form { grid-template-columns: 1fr; } .bk-top { padding: 16px 16px 64px; } .bk-body { padding: 8px 12px 0; } .bk-summary { margin: -48px 12px 0; } .bk-tabs { margin: 16px 12px 4px; } }
@media print {
  body * { visibility: hidden !important; }
  .doc-sheet, .doc-sheet * { visibility: visible !important; }
  .doc-sheet { position: fixed; inset: 0; box-shadow: none; border-radius: 0; padding: 32px; }
}

/* ---------- Modifica / cancellazione prenotazione ---------- */
.bk-more { margin-left: auto; position: relative; }
.bk-menu { right: 0; top: 48px; min-width: 230px; color: var(--ink); }
.bk-menu[hidden] { display: none; }
.btn.danger-solid { background: var(--red); border-color: var(--red); color: #fff; }
.btn.danger-solid:hover { background: #B92F34; }
.status-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.status-opt { position: relative; cursor: pointer; }
.status-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.status-opt .badge { height: 36px; padding: 0 14px; font-size: 13px; border-radius: 999px; opacity: .6; transition: opacity .15s, box-shadow .15s; }
.status-opt input:checked + .badge { opacity: 1; box-shadow: 0 0 0 2px currentColor; }
.status-opt input:focus-visible + .badge { outline: 2px solid var(--accent); outline-offset: 2px; }
.form-stack .err { font-size: 12.5px; color: var(--red); margin-top: -6px; }
.cancel-card { text-align: center; padding: 24px 20px; }
.cancel-card h3 { margin: 10px 0 6px; font-size: 18px; }
.cancel-card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.cancel-ic { width: 52px; height: 52px; border-radius: 16px; display: inline-grid; place-items: center; background: var(--red-bg); color: var(--red); }
.pl-bar.noshow { background: repeating-linear-gradient(135deg, #fff 0 6px, #FDECEC 6px 12px); box-shadow: inset 3px 0 0 var(--red); }
.pl-bar.noshow b { text-decoration: line-through; color: var(--red); }

/* ---------- Vikey / prezzo bloccato ---------- */
.sec-title { margin: 6px 0 14px; font-size: 18px; letter-spacing: -.01em; }
.vk-logo { background: #111827 !important; color: #fff !important; border: 0 !important; font-weight: 700; font-size: 16px; width: 40px !important; height: 40px !important; }
.vk-map { height: 38px; font-size: 14px; }
.vk-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--green); }
.vk-chip .ic { width: 14px; height: 14px; }
.lock { display: inline-grid; place-items: center; width: 32px; height: 32px; color: var(--muted); }
.lock .ic { width: 16px; height: 16px; }

/* ---------- Integrazioni ---------- */
.app-logo { color: #fff !important; border: 0 !important; font-weight: 700; font-size: 14px; width: 40px !important; height: 40px !important; flex: none; }
.ev-set { border: 0; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 6px 16px; }
.ev-set legend { font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; padding: 0; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; min-height: 32px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }

/* ---------- Planner: modalità modifica ---------- */
.pl-editbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 18px; margin-bottom: 12px; border-radius: var(--radius-lg); background: #121019; color: #fff; position: sticky; top: 72px; z-index: 20; box-shadow: var(--shadow-pop); }
.pl-editbar > .ic { color: var(--violet-400); }
.pl-editbar > div:nth-child(2) { flex: 1 1 280px; line-height: 1.35; }
.pl-editbar b { display: block; font-size: 14.5px; }
.pl-editbar span { font-size: 12.5px; color: rgba(255,255,255,.7); }
.pl-editbar-act { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pl-editbar-act .badge { color: #fff; background: rgba(255,255,255,.12); }
.pl-editbar-act .badge.amber { background: #F2A93B; color: #121019; }
.pl-editbar .btn:not(.primary) { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.2); color: #fff; }
.editing-pl { box-shadow: 0 0 0 2px var(--accent), var(--shadow-card); }
.editing-pl .pl-free { cursor: cell; touch-action: none; }
.editing-pl .pl-bar { cursor: grab; touch-action: none; }
.pl-scroll.dragging { user-select: none; -webkit-user-select: none; }
.pl-scroll.dragging .pl-bar { pointer-events: none; }
.pl-scroll.dragging, .pl-scroll.dragging * { cursor: grabbing !important; }
.pl-free.drop-ok { background: color-mix(in srgb, var(--accent) 24%, var(--surface)) !important; }
.pl-free.drop-bad { background: var(--red-bg) !important; }
.pl-bar.pending { outline: 2px dashed var(--accent); outline-offset: -2px; }
.pl-bar.lifted { opacity: .35; }
.rv-list { list-style: none; margin: 14px 22px 16px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.rv-list li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; }
.rv-list li div { line-height: 1.4; font-size: 13.5px; color: var(--muted); }
.rv-list li div > b { display: block; color: var(--ink); font-size: 14px; }
.rv-list li div span b { color: var(--ink); }
.nb-quote { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-radius: 14px; background: var(--accent-soft); font-size: 14px; color: var(--ink-2); }
.nb-quote b { font-size: 18px; color: var(--accent-strong); }
.form-grid .err { font-size: 12.5px; color: var(--red); }

/* ---------- Prenotazioni / Ospiti ---------- */
.tab-count { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 4px; border-radius: 999px; background: var(--line-2); color: var(--muted); font-size: 11.5px; line-height: 18px; text-align: center; }
.tabs button[aria-selected="true"] .tab-count { background: rgba(255,255,255,.18); color: #fff; }
.rsv-row { cursor: pointer; }
.rsv-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.rsv-row.is-cancelled td { color: var(--muted); }
.rsv-row.is-cancelled b { text-decoration: line-through; }
.g-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.g-stats div { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; }
.g-stats span { font-size: 12px; color: var(--muted); }
.g-stats b { font-size: 18px; letter-spacing: -.01em; }
.tabs { max-width: 100%; }
@media (max-width: 680px) {
  .w.kpi { grid-column: span 6; padding: 16px; }
  .w.kpi .card-head { margin-bottom: 10px; }
  .w.kpi .card-head h3 { font-size: 13px; }
  .w.kpi .card-icon { display: none; }
  .w.kpi .big { font-size: 24px; }
  .w.kpi .kpi-foot { margin-top: 8px; font-size: 12px; }
}
@media (max-width: 520px) { .crumbs > span { display: none; } }
@media (max-width: 680px) { .tabs { display: flex; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; } .tabs button { flex: none; } }

/* ---------- Messaggi automatici ---------- */
.auto-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 380px); gap: 16px; align-items: start; }
.auto-list { display: flex; flex-direction: column; gap: 12px; }
.auto-card { padding: 16px 18px; }
.auto-card.off { opacity: .62; }
.auto-head { display: flex; align-items: center; gap: 12px; }
.auto-ic { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.auto-meta { flex: 1; line-height: 1.35; }
.auto-meta b { display: block; font-size: 15px; }
.auto-meta span { font-size: 12.5px; color: var(--muted); }
.auto-preview { margin: 12px 0; padding: 10px 14px; border-radius: 12px; background: var(--surface-2); color: var(--ink-2); font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.auto-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.re-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 300px); }
.re-preview { padding: 18px 22px; background: var(--surface-2); border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.phone { flex: 1; min-height: 260px; border-radius: 22px; padding: 16px 12px; background: linear-gradient(180deg, #EDEBF6, #F7F6FB); border: 1px solid var(--line); }
.var-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.var-chips .chip { min-height: 32px; padding: 0 10px; font-size: 12px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 500; }
@media (max-width: 1100px) { .auto-layout { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) { .re-grid { grid-template-columns: minmax(0, 1fr); } .re-preview { border-left: 0; border-top: 1px solid var(--line); } }

/* ---------- Chat ---------- */
.chat { padding: 0; overflow: hidden; display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); height: min(74vh, 760px); min-height: 520px; }
.chat-list { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.chat-list-head { padding: 14px; display: flex; flex-direction: column; gap: 10px; border-bottom: 1px solid var(--line); }
.chat-fil { width: 100%; justify-content: space-between; }
.chat-fil button { flex: 1; padding: 0 6px; }
.chat-items { overflow-y: auto; flex: 1; }
.chat-item { all: unset; box-sizing: border-box; width: 100%; display: flex; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line-2); cursor: pointer; }
.chat-item:hover { background: #FBFAFF; }
.chat-item.active { background: var(--accent-soft); }
.chat-item:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.ci-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ci-top { display: flex; justify-content: space-between; gap: 8px; }
.ci-top b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ci-top time { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.ci-last { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; gap: 4px; align-items: center; }
.ci-last .ic { width: 13px; height: 13px; color: var(--accent); flex: none; }
.chat-item.unread .ci-top b, .chat-item.unread .ci-last { color: var(--ink); font-weight: 700; }
.ci-tags { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.ci-tags .badge { height: 20px; font-size: 11px; padding: 0 8px; }
.ci-dot { margin-left: auto; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.chat-thread { display: flex; flex-direction: column; min-height: 0; background: #FAF9FD; }
.empty-thread { display: grid; place-items: center; }
.empty-thread b { color: var(--ink); }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--surface); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.ch-meta { flex: 1; line-height: 1.3; min-width: 160px; }
.ch-meta b { display: block; font-size: 15px; }
.ch-meta span { font-size: 12.5px; color: var(--muted); }
.chat-back { display: none; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.day-sep { text-align: center; margin: 6px 0; }
.day-sep span { font-size: 11.5px; color: var(--muted); background: var(--surface); border: 1px solid var(--line); padding: 3px 10px; border-radius: 999px; }
.msg { display: flex; flex-direction: column; max-width: min(78%, 520px); }
.msg.in { align-self: flex-start; }
.msg.out { align-self: flex-end; align-items: flex-end; }
.bubble { padding: 10px 14px; border-radius: 16px; font-size: 14.5px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.in .bubble { background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.msg.out .bubble, .bubble.out { background: var(--accent); color: #fff; border-bottom-right-radius: 6px; }
.msg.auto .bubble { background: var(--surface); color: var(--ink); border: 1.5px dashed var(--violet-200); }
.msg-meta { display: flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.msg-meta .ic { width: 12px; height: 12px; color: var(--accent); }
.composer { border-top: 1px solid var(--line); background: var(--surface); padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 8px; }
.quick { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.quick .chip { flex: none; min-height: 32px; font-size: 12.5px; }
.comp-row { display: flex; gap: 8px; align-items: flex-end; }
.comp-via { width: auto; max-width: 170px; flex: none; height: 44px; font-size: 13px; }
.comp-text { flex: 1; height: 44px; min-height: 44px; max-height: 140px; padding: 11px 14px; resize: vertical; line-height: 1.4; font-size: 15px; }
.comp-send { width: 44px; padding: 0; flex: none; height: 44px; }
@media (max-width: 860px) {
  .chat { grid-template-columns: minmax(0, 1fr); height: auto; min-height: 70vh; }
  .chat.has-sel .chat-list { display: none; }
  .chat:not(.has-sel) .chat-thread { display: none; }
  .chat-back { display: grid; }
  .chat-thread { height: 76vh; }
  .comp-via { max-width: 110px; }
}
.chat-list-head .search-box { flex: none; }
.field[hidden] { display: none; }

/* ---------- Unità abitative ---------- */
.type-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.type-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.type-photo { position: relative; aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--violet-100), var(--violet-200)) center / cover no-repeat; display: grid; place-items: center; color: var(--accent); }
.type-photo .ic { width: 40px; height: 40px; stroke-width: 1.4; }
.type-photo.sm { width: 160px; aspect-ratio: 4 / 3; border-radius: 14px; flex: none; }
.type-price { position: absolute; left: 12px; bottom: 12px; background: rgba(18,16,25,.82); color: #fff; font-size: 12.5px; padding: 5px 10px; border-radius: 999px; }
.type-price b { font-size: 14px; }
.type-body { padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.type-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.type-title h3 { margin: 0; font-size: 17px; letter-spacing: -.01em; }
.type-desc { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.45; }
.type-facts { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--ink-2); }
.type-facts span { display: inline-flex; align-items: center; gap: 6px; }
.type-facts .ic { width: 15px; height: 15px; color: var(--muted); }
.am-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.am-chips span { font-size: 12px; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); }
.type-foot { margin-top: auto; display: flex; justify-content: flex-end; }
.photo-row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.photo-field label.btn { cursor: pointer; }
.pl-roomrow.out .pl-free { background-image: repeating-linear-gradient(135deg, transparent 0 6px, rgba(214,59,64,.08) 6px 12px); cursor: not-allowed; }
.out-tag { display: block; font-size: 10.5px; font-weight: 600; color: var(--red); }
.pl-free:not(.pastc):hover { background-color: rgba(108, 92, 255, .1); }
.pl-free:not(.pastc):hover::after { content: "+"; font-size: 18px; font-weight: 600; color: var(--accent); }
.pl-free.pastc { cursor: default; }
.pl-roomrow.out .pl-free:hover::after { content: none; }
.nb-avail { display: flex; gap: 8px; align-items: flex-start; padding: 10px 14px; border-radius: 12px; font-size: 13px; line-height: 1.45; }
.nb-avail .ic { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.nb-avail.ok { background: var(--green-bg); color: #0B5E33; }
.nb-avail.ko { background: var(--red-bg); color: #9B2226; }

/* ---------- Housekeeping ---------- */
.hk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.hk-card { padding: 16px; display: flex; flex-direction: column; gap: 10px; border-left: 4px solid transparent; }
.hk-card.prio3 { border-left-color: var(--red); }
.hk-card.prio2 { border-left-color: #F2A93B; }
.hk-card.prio1 { border-left-color: var(--violet-400); }
.hk-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.hk-top b { display: block; font-size: 16px; }
.hk-top span:not(.badge) { font-size: 12.5px; color: var(--muted); }
.hk-kind { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; font-size: 13.5px; color: var(--ink-2); }
.hk-issue { display: flex; gap: 6px; align-items: center; font-size: 12.5px; color: var(--red); background: var(--red-bg); border-radius: 10px; padding: 6px 10px; }
.hk-issue .ic { width: 14px; height: 14px; }
.hk-foot { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: auto; }
.hk-assign { height: 36px; font-size: 13px; flex: 1 1 140px; }
.hk-btns { display: flex; gap: 6px; }
.hk-at { font-size: 11.5px; color: var(--muted); }
.done-row { opacity: .55; }
/* ---------- Channel manager ---------- */
.ch-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.ch-card { padding: 16px 18px; }
.ch-card.off { opacity: .7; }
.ch-card .card-head h3 { font-size: 15px; }
.t.ari th, .t.ari td { padding: 6px 4px; }
.t.ari th.c { text-align: center; font-size: 11px; line-height: 1.2; }
.t.ari th.c b { display: block; font-size: 14px; color: var(--ink); }
.t.ari th.we { background: #F3F1FA; }
.ms-sel { height: 34px; font-size: 13px; width: 64px; padding: 0 22px 0 8px; background-position: right 8px center; }
.ari-cell { all: unset; box-sizing: border-box; width: 100%; min-width: 54px; display: flex; flex-direction: column; align-items: center; padding: 6px 2px; border-radius: 8px; cursor: pointer; background: var(--surface-2); border: 1px solid var(--line-2); }
.ari-cell:hover { border-color: var(--violet-200); }
.ari-cell:focus-visible { outline: 2px solid var(--accent); }
.ari-cell b { font-size: 12.5px; }
.ari-cell span { font-size: 10.5px; color: var(--muted); }
.ari-cell.full { background: #FFF6E6; }
.ari-cell.closed { background: repeating-linear-gradient(135deg, #fff 0 5px, var(--red-bg) 5px 10px); border-color: #F3C1C3; }
.ari-cell.closed b { color: var(--red); }
/* ---------- Booking engine ---------- */
.be-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 460px); gap: 18px; align-items: start; }
.be-preview { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 10px; }
.be-widget { background: #fff; border-radius: 22px; box-shadow: var(--shadow-pop); border: 1px solid var(--line); overflow: hidden; }
.be-head { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; padding: 16px 18px; color: #fff; background: linear-gradient(135deg, var(--indigo-800), var(--violet-600)); }
.be-head img { grid-row: span 2; }
.be-head b { font-size: 15px; }
.be-head span { font-size: 12px; opacity: .8; }
.be-search { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 16px 18px; align-items: end; }
.be-search .btn { grid-column: 1 / -1; }
.be-msg { margin: 0 18px 10px; font-size: 13px; padding: 8px 12px; border-radius: 10px; background: var(--surface-2); }
.be-msg.ko { background: var(--red-bg); color: #9B2226; }
.be-msg.ok { background: var(--green-bg); color: #0B5E33; }
.be-results { padding: 0 18px 16px; display: flex; flex-direction: column; gap: 10px; }
.be-room { display: flex; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: 14px; padding: 10px; }
.be-ph { width: 74px; height: 56px; flex: none; border-radius: 10px; background: linear-gradient(135deg, var(--violet-100), var(--violet-200)) center / cover; display: grid; place-items: center; color: var(--accent); }
.be-info { flex: 1; display: flex; flex-direction: column; gap: 2px; line-height: 1.3; }
.be-info b { font-size: 14px; }
.be-info > span { font-size: 12px; color: var(--muted); }
.be-price { font-size: 12.5px !important; color: var(--ink-2) !important; }
.be-price b { font-size: 15px; color: var(--accent-strong); }
.be-form { padding: 16px 18px; }
.be-sum { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 14px; background: var(--accent-soft); font-size: 13px; color: var(--ink-2); }
.be-sum b { font-size: 15px; color: var(--ink); }
pre.code { margin: 0 0 10px; padding: 12px 14px; border-radius: 12px; background: #121019; color: #E7E3FF; font-size: 12.5px; white-space: pre-wrap; word-break: break-all; }
.switch-label { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; }
.as-btn { border: 0; cursor: pointer; }
@media (max-width: 1100px) { .be-layout { grid-template-columns: minmax(0, 1fr); } .be-preview { position: static; } }
/* ---------- Impostazioni ---------- */
.set-form { max-width: 860px; }
.set-form .hint { font-size: 12px; color: var(--muted); }
@media (max-width: 680px) { .pay-form[data-uadd], .pay-form[data-promo-add] { grid-template-columns: 1fr !important; } }
.ch-card .g-stats b { font-size: 15px; white-space: nowrap; } .ch-card .g-stats div { padding: 8px 10px; min-width: 0; }

/* ---------- Smartphone ---------- */
.tabbar { display: none; }
.sidebar .quick[hidden] { display: none; }
button, a, .chip, select { touch-action: manipulation; }
@media (max-width: 1024px) {
  .tabbar {
    display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.4) blur(16px); -webkit-backdrop-filter: saturate(1.4) blur(16px);
    border-top: 1px solid var(--line); box-shadow: 0 -8px 24px -18px rgba(22, 17, 61, .3);
  }
  .tabbar a, .tabbar button {
    all: unset; box-sizing: border-box; position: relative; cursor: pointer;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    min-height: 52px; border-radius: 14px; color: var(--muted); font-size: 11px; font-weight: 600;
  }
  .tabbar .ic { width: 22px; height: 22px; }
  .tabbar [hidden] { display: none; }
  .tabbar a.active { color: var(--accent); background: var(--accent-soft); }
  .tabbar a:focus-visible, .tabbar button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
  .tb-badge { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--red); color: #fff; font-size: 10.5px; font-style: normal; line-height: 18px; text-align: center; }
  .main { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  .toast { bottom: calc(84px + env(safe-area-inset-bottom)); max-width: calc(100% - 24px); }
  .topbar { padding-top: env(safe-area-inset-top); height: calc(64px + env(safe-area-inset-top)); }
  .chat-thread { height: calc(100dvh - 240px); min-height: 420px; }
}
@media (max-width: 680px) {
  .page { padding: 18px 14px 32px; }
  .page-head { margin-bottom: 16px; }
  .page-head .actions { width: 100%; }
  .page-head .actions > .btn { flex: 1 1 auto; }
  input, select, textarea, .input, .select, .filter select, .search-box input, .comp-text { font-size: 16px !important; }
  table.t.compact { display: block; overflow-x: auto; white-space: nowrap; }
  .toolbar .filter { flex: 1 1 140px; }
  .toolbar .search-box { flex: 1 1 100%; }
  .modal { place-items: end center; padding: 0; }
  .modal-box { width: 100% !important; max-height: 92dvh; border-radius: 22px 22px 0 0; padding-bottom: env(safe-area-inset-bottom); }
  .card { border-radius: 20px; }
  .hero h1 { font-size: 40px; }
  .brief { padding: 16px; }
  .pl-editbar { top: calc(64px + env(safe-area-inset-top)); }
  .grid { gap: 12px; }
}
@media (max-width: 680px) {
  .modal-foot { position: sticky; bottom: 0; z-index: 2; background: var(--surface); padding-top: 12px; border-top: 1px solid var(--line-2); flex-wrap: wrap; }
  .modal-foot .btn { flex: 1 1 auto; }
}

/* ---------- Avvio / anteprime che bloccano gli script ---------- */
.boot-msg { position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center; padding: 24px; background: linear-gradient(160deg, #16113D, #5B4BF5); color: #fff; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; }
.js .boot-msg { display: none; }
.js.boot-fail .boot-msg { display: flex; }
.boot-box { max-width: 440px; }
.boot-box h1 { margin: 12px 0 8px; font-size: 28px; }
.boot-box p { margin: 0 0 12px; line-height: 1.5; color: rgba(255,255,255,.85); }
.boot-box ul { margin: 0 0 12px; padding-left: 18px; line-height: 1.5; }
.boot-box li { margin-bottom: 8px; }
.boot-err { font-size: 12px; opacity: .7; }
.preview-hint { position: fixed; left: 12px; right: 12px; top: calc(72px + env(safe-area-inset-top)); z-index: 75; display: flex; gap: 10px; align-items: flex-start; padding: 12px 12px 12px 16px; border-radius: 16px; background: #121019; color: #fff; font-size: 13.5px; line-height: 1.45; box-shadow: var(--shadow-pop); }
.preview-hint button { all: unset; cursor: pointer; flex: none; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 8px; background: rgba(255,255,255,.12); }

/* ---------- Modalità notte ---------- */
.theme-seg { display: flex; width: 100%; }
.theme-seg button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; }
.theme-seg .ic { width: 15px; height: 15px; }
@media screen {
  :root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #0E0C16; --surface: #181524; --surface-2: #201C2E;
    --ink: #F2F0F8; --ink-2: #D2CEE2; --muted: #9E99B5;
    --line: #2E2A41; --line-2: #252136;
    --accent-soft: rgba(124, 108, 255, .18);
    --green: #45D493; --green-bg: rgba(69, 212, 147, .14);
    --red: #FF7378; --red-bg: rgba(255, 115, 120, .14);
    --amber: #F5B04A; --amber-bg: rgba(245, 176, 74, .15);
    --blue: #86A8FF; --blue-bg: rgba(134, 168, 255, .15);
    --shadow-card: 0 1px 2px rgba(0, 0, 0, .45), 0 10px 28px -14px rgba(0, 0, 0, .7);
    --shadow-pop: 0 20px 50px -18px rgba(0, 0, 0, .8);
    --chart-soft: #3B3652; --chart-track: #2A2640; --chart-future: #232036;
  }
  [data-theme="dark"] .main a:not(.btn), [data-theme="dark"] .bk-panel a:not(.btn) { color: var(--violet-400); }
  [data-theme="dark"] .sidebar { background: #13111D; }
  [data-theme="dark"] .topbar { background: rgba(14, 12, 22, .82); }
  [data-theme="dark"] .card, [data-theme="dark"] .guest-card, [data-theme="dark"] .g-tile, [data-theme="dark"] .rsv-row { border-color: var(--line); }
  [data-theme="dark"] .t tbody tr:hover, [data-theme="dark"] .chat-item:hover { background: rgba(255, 255, 255, .035); }
  [data-theme="dark"] .switch span { background: #3B3652; }
  [data-theme="dark"] .we { background-color: rgba(255, 255, 255, .025); }
  [data-theme="dark"] .bk-panel, [data-theme="dark"] .chat-thread { background: var(--bg); }
  [data-theme="dark"] .bk-top.plain { background: rgba(14, 12, 22, .92); }
  [data-theme="dark"] .doc-sheet, [data-theme="dark"] .be-widget { background: var(--surface); }
  [data-theme="dark"] .pl-bar.noshow { background: repeating-linear-gradient(135deg, var(--surface) 0 6px, var(--red-bg) 6px 12px); }
  [data-theme="dark"] .phone { background: linear-gradient(180deg, var(--surface-2), var(--bg)); }
  [data-theme="dark"] .t.ari th.we { background: rgba(255, 255, 255, .03); }
  [data-theme="dark"] .ari-cell.full { background: var(--amber-bg); }
  [data-theme="dark"] .ari-cell.closed { background: repeating-linear-gradient(135deg, var(--surface) 0 5px, var(--red-bg) 5px 10px); border-color: rgba(255, 115, 120, .4); }
  [data-theme="dark"] .tabbar { background: rgba(24, 21, 36, .92); }
  [data-theme="dark"] .tabs button[aria-selected="true"] { background: var(--accent); }
  [data-theme="dark"] .pill-label { background: var(--surface-2); border: 1px solid var(--line); }
  [data-theme="dark"] .tip, [data-theme="dark"] .toast, [data-theme="dark"] .pl-editbar, [data-theme="dark"] .preview-hint { border: 1px solid rgba(255, 255, 255, .1); }
  [data-theme="dark"] .btn.soft, [data-theme="dark"] .badge.violet, [data-theme="dark"] .nb-quote b, [data-theme="dark"] .be-price b { color: var(--violet-400); }
  [data-theme="dark"] .nb-avail.ok, [data-theme="dark"] .be-msg.ok { color: var(--green); }
  [data-theme="dark"] .nb-avail.ko, [data-theme="dark"] .be-msg.ko { color: var(--red); }
  [data-theme="dark"] .btn.dark { background: var(--surface-2); border-color: var(--line); }
  [data-theme="dark"] .icon-btn .dot { box-shadow: 0 0 0 2px var(--surface); }
  [data-theme="dark"] .avatar { filter: saturate(.85) brightness(.9); }
  [data-theme="dark"] .type-photo:not([style*="background-image"]), [data-theme="dark"] .be-ph:not([style*="background-image"]) { background: linear-gradient(135deg, #2A2545, #3B3168); }
  [data-theme="dark"] .select, [data-theme="dark"] .filter select { color-scheme: dark; }
  [data-theme="dark"] .pl-day.today { color: rgba(255, 255, 255, .85); }
}

.btn.white { color: #15131F; }
.btn.white:hover { background: #F4F3F9; }
@media screen {
  [data-theme="dark"] .pl-day.today { background-color: var(--accent); }
  [data-theme="dark"] .pl-cell.today { background-color: rgba(124, 108, 255, .12); }
}

/* ---------- Versione smartphone sul computer (cornice) ---------- */
.phone-shell body > :not(.pshell) { display: none !important; }
.phone-shell body { min-height: 100vh; background: radial-gradient(1200px 600px at 50% -10%, #5B4BF5 0%, #2A2170 45%, #120E2E 100%); }
.pshell { min-height: 100vh; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 16px 16px 20px; color: #fff; }
.pshell-bar { width: min(100%, 720px); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pshell-bar b { font-size: 17px; letter-spacing: -.01em; margin-right: 10px; }
.pshell-bar span { font-size: 13px; opacity: .75; }
.pshell-btn { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; border: 1px solid rgba(255,255,255,.25); border-radius: 999px; background: rgba(255,255,255,.12); color: #fff; font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.pshell-btn:hover { background: rgba(255,255,255,.2); }
.pshell-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pshell-device { width: 414px; height: min(888px, calc(100vh - 120px)); min-height: 520px; padding: 12px; border-radius: 52px; background: #0B0915; box-shadow: 0 0 0 2px #2D2A3A, 0 30px 80px rgba(0,0,0,.5); }
.pshell-device iframe { display: block; width: 390px; height: 100%; border: 0; border-radius: 40px; background: #fff; }
.pshell-note { margin: 0; font-size: 12.5px; opacity: .7; text-align: center; }
@media (max-width: 460px) { .pshell-device { width: 100%; padding: 0; border-radius: 0; box-shadow: none; } .pshell-device iframe { width: 100%; border-radius: 0; } }

/* ---------------- Accesso ---------------- */
.auth-on .app, .auth-on .tabbar { display: none; }
.auth { position: fixed; inset: 0; z-index: 200; overflow-y: auto; display: flex; align-items: center; justify-content: center;
  padding: max(24px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom));
  background: radial-gradient(120% 80% at 20% 0%, var(--violet-500), transparent 60%), linear-gradient(160deg, var(--indigo-900), var(--violet-700)); }
.auth-card { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 14px; padding: 32px 28px;
  background: var(--surface); color: var(--ink); border-radius: 24px; box-shadow: 0 30px 80px -30px rgba(0,0,0,.55); }
.auth-brand { display: flex; align-items: center; gap: 10px; }
.auth-brand .brand-name { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.auth-card h1 { margin: 8px 0 0; font-family: "Instrument Serif", Georgia, serif; font-weight: 400; font-size: 34px; letter-spacing: -.01em; }
.auth-sub { margin: -6px 0 4px; font-size: 14px; color: var(--muted); line-height: 1.45; }
.auth-err { margin: 0; padding: 10px 12px; border-radius: 12px; font-size: 13.5px; background: var(--red-bg); color: var(--red); }
.auth-err[hidden] { display: none; }
.auth-help { margin: -4px 0 0; font-size: 12.5px; color: var(--muted); text-align: center; }
.mfa-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; font-size: 13.5px; line-height: 1.45; }
.mfa-qr { display: block; margin: 10px auto 6px; width: 180px; height: 180px; padding: 8px; background: #fff; border-radius: 12px; border: 1px solid var(--line); }
.mfa-secret { display: block; font-size: 12px; color: var(--muted); text-align: center; }
.mfa-secret code { display: inline-block; margin-top: 4px; font-size: 12.5px; letter-spacing: .04em; color: var(--ink); word-break: break-all; user-select: all; }
.mfa-code { font-size: 22px; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; }
.auth-card.mfa-enroll { max-width: 440px; }
.auth-sep { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
.auth-sep::before, .auth-sep::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.live-bar { display: flex; align-items: flex-start; gap: 8px; padding: 9px 12px; border-radius: 12px;
  font-size: 11.5px; word-break: break-word; line-height: 1.4; background: var(--accent-soft); color: var(--accent-strong); }
.live-bar .ic { width: 16px; height: 16px; flex: none; }
.user .who { min-width: 0; flex: 1; }
.user .who b, .user .who span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-out { width: 34px; height: 34px; flex: none; margin-left: auto; }
.user-out .ic { width: 17px; height: 17px; }
.user-pw { width: 34px; height: 34px; flex: none; margin-left: auto; }
.user-pw .ic { width: 17px; height: 17px; }
.user-pw + .user-out { margin-left: 2px; }
.cred-box { display: grid; gap: 10px; padding: 14px 16px; border-radius: 14px; background: var(--accent-soft); }
.cred-box div { display: grid; gap: 2px; }
.cred-box span { font-size: 12px; color: var(--muted); }
.cred-box b { font-size: 15px; word-break: break-all; }
.cred-pw { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 17px !important; letter-spacing: .04em; }
.u-acts { display: flex; align-items: center; justify-content: flex-end; gap: 6px; flex-wrap: wrap; }
.t tr.row-off td { opacity: .62; }
.t tr.row-off td:last-child { opacity: 1; }

/* ---------------- Prezzi dinamici ---------------- */
.dyn-mode-desc { margin: 0 0 12px; font-size: 13px; color: var(--muted); }
.dyn-note { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 14px; padding: 10px 12px; border-radius: 12px; font-size: 13px; background: var(--line-2); color: var(--ink-2); }
.dyn-note.ok { background: var(--green-bg); color: var(--green); }
.dyn-note .ic { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.dyn-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; font-size: 13.5px; }
.dyn-head .muted { font-size: 12px; }
.dyn-list { display: flex; flex-direction: column; }
.dyn-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line-2); }
.dyn-row:first-child { border-top: 0; }
.dyn-what { min-width: 0; line-height: 1.3; }
.dyn-what b { display: block; font-size: 13.5px; font-weight: 600; }
.dyn-what span { display: block; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dyn-price { text-align: right; font-size: 13.5px; white-space: nowrap; }
.dyn-price s { color: var(--muted); font-size: 12px; }
.dyn-price b.up { color: var(--green); }
.dyn-price b.down { color: var(--amber); }
.dyn-price small { display: block; font-size: 11px; color: var(--muted); }
.dyn-acts { display: flex; gap: 4px; }
.dyn-acts .icon-btn { width: 32px; height: 32px; }
.dyn-acts .icon-btn .ic { width: 15px; height: 15px; }
.dyn-acts .icon-btn.ok { background: var(--accent); border-color: var(--accent); color: #fff; }
.dyn-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.dyn-evs { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.dyn-evs .lbl { display: block; margin-bottom: 6px; font-size: 11.5px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--muted); }
.dyn-ev { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 6px 0; }
.dyn-ev.off { opacity: .5; }
.dyn-ev.off .badge { text-decoration: line-through; }
.dyn-ev-d { display: flex; flex-direction: column; align-items: center; padding: 4px 0; border-radius: 10px; background: var(--accent-soft); color: var(--accent-strong); font-size: 10.5px; text-transform: uppercase; line-height: 1.1; }
.dyn-ev-d b { font-size: 16px; }
.dyn-ev > div { min-width: 0; line-height: 1.3; }
.dyn-ev > div b { display: block; font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dyn-ev > div span { font-size: 12px; color: var(--muted); }
.modal-box.dyn-modal { width: min(640px, 100%); }
.dyn-modal .modal-body { padding: 14px 22px 16px; max-height: min(60vh, 560px); overflow-y: auto; }
.pl-cell b.dyn-up { color: var(--green); }
.pl-cell b.dyn-down { color: var(--amber); }
.dyn-seg { display: flex; width: 100%; margin-bottom: 8px; }
.dyn-seg button { flex: 1; }
.dyn-modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.dyn-mode-card { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px 16px; text-align: left; border: 1.5px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--ink); cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.dyn-mode-card:hover { border-color: var(--violet-200); }
.dyn-mode-card[aria-checked="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.dyn-mode-card b { font-size: 15px; }
.dyn-mode-card > span:last-child { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.dyn-mode-ic { display: grid; place-items: center; width: 30px; height: 30px; margin-bottom: 4px; border-radius: 10px; background: var(--line-2); color: var(--ink-2); }
.dyn-mode-card[aria-checked="true"] .dyn-mode-ic { background: var(--accent); color: #fff; }
.dyn-mode-ic .ic { width: 16px; height: 16px; }
.dyn-side { display: flex; flex-direction: column; }
.dyn-rules { padding-bottom: 18px; }
.dyn-rules-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.dyn-rules-grid .full { grid-column: 1 / -1; }
.dyn-rules .input { height: 40px; }
.dyn-steps { margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; gap: 6px; }
.dyn-steps legend { margin-bottom: 6px; padding: 0; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.dyn-step { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.dyn-step .input { width: 64px; height: 36px; padding: 0 8px; text-align: right; }
.dyn-rules-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
@media (max-width: 760px) { .dyn-modes { grid-template-columns: 1fr; } .dyn-rules-grid { grid-template-columns: 1fr; } }

/* ---------------- Alloggiati Web reale ---------------- */
.al-live { margin-bottom: 26px; padding-bottom: 20px; }
.al-live .card-head .tools { display: flex; align-items: center; gap: 8px; }
.al-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; margin-top: 6px; }
.al-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.al-form .btn { justify-self: start; }
.al-hint { margin: 8px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.al-facts { margin-top: 0; }
.al-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.al-msg { display: flex; align-items: flex-start; gap: 8px; margin: 4px 0 12px; padding: 10px 12px; border-radius: 12px; font-size: 13.5px; }
.al-msg.ok { background: var(--green-bg); color: var(--green); }
.al-msg.ko { background: var(--red-bg); color: var(--red); }
.al-msg .ic { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.al-log { margin-top: 16px; }
.al-demo-title { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 18px; letter-spacing: -.01em; }
@media (max-width: 900px) { .al-grid { grid-template-columns: 1fr; } }
.live-bar .sync-ko { color: var(--red); }
.linklike { padding: 0; border: 0; background: none; color: inherit; font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }
.setup-card { padding: 22px; max-width: 760px; }
.setup-steps { display: flex; flex-direction: column; gap: 12px; }
.setup-step { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; }
.setup-step > .ic { width: 22px; height: 22px; color: var(--accent); }
.setup-step b { display: block; font-size: 15px; }
.setup-step span { font-size: 13px; color: var(--muted); }
.code-hint.ok { color: var(--green); }
.al-bk h4 { display: flex; align-items: center; gap: 6px; }
.al-bk h4 .ic { width: 16px; height: 16px; color: #2557C7; }
.al-bk .al-acts { margin-top: 10px; }
.prop-sel { max-width: 240px; height: 32px; padding: 0 28px 0 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; font-weight: 600; }
.on-hero .prop-sel { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.25); }
.on-hero .prop-sel option { color: #15131F; }

/* ---------------- Configurazione iniziale (navigazione bloccata) ---------------- */
.setup-mode #tabbar, .setup-mode .quick, .setup-mode .occ-card { display: none !important; }
.setup-nav { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 12px; font-size: 14px; color: var(--ink-2); text-decoration: none; }
.setup-nav .sn-n { display: grid; place-items: center; width: 24px; height: 24px; flex: none; border-radius: 50%; font-style: normal; font-size: 12px; font-weight: 700; background: var(--line-2); color: var(--muted); }
.setup-nav .sn-n .ic { width: 14px; height: 14px; }
.setup-nav.now { background: var(--accent-soft); color: var(--accent-strong); font-weight: 600; }
.setup-nav.now .sn-n { background: var(--accent); color: #fff; }
.setup-nav.done .sn-n { background: var(--green-bg); color: var(--green); }
.setup-nav.locked { opacity: .55; }
.setup-note { display: flex; gap: 8px; margin: 12px 4px 0; font-size: 12px; color: var(--muted); line-height: 1.4; }
.setup-note .ic { width: 14px; height: 14px; flex: none; margin-top: 1px; }
.setup-banner { display: flex; align-items: center; gap: 18px; justify-content: space-between; margin: 0 0 18px; padding: 14px 16px; border-radius: 16px; background: var(--accent-soft); color: var(--accent-strong); }
.setup-banner b { display: block; font-size: 14px; }
.setup-banner span { display: block; font-size: 13px; line-height: 1.45; }
.setup-banner .btn { flex: none; }
.setup-bar { width: 200px; max-width: 100%; height: 8px; margin-top: 10px; border-radius: 999px; background: rgba(255,255,255,.7); overflow: hidden; }
.setup-bar i { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.setup-step.done { opacity: .7; }
.setup-step.done > .ic { color: var(--green); }
@media (max-width: 760px) { .setup-banner { flex-direction: column; align-items: stretch; } .setup-bar { width: 100%; } }

/* ---------------- Modelli di tipologia e camere in serie ---------------- */
.tpl-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.tpl-chip { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 9px 11px; text-align: left; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); cursor: pointer; }
.tpl-chip b { font-size: 13.5px; }
.tpl-chip span { font-size: 12px; color: var(--muted); }
.tpl-chip:hover { border-color: var(--violet-200); }
.tpl-chip[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ro-mode { display: flex; width: 100%; }
.ro-mode button { flex: 1; }
.ro-many { display: flex; flex-direction: column; gap: 10px; }
.ro-many[hidden] { display: none; }
.ro-many-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
#roPreview { margin: 0; font-size: 12.5px; color: var(--muted); }
@media (max-width: 560px) { .ro-many-grid { grid-template-columns: 1fr 1fr; } .ro-many-grid .field:first-child { grid-column: 1 / -1; } }

.secret-input { -webkit-text-security: disc; text-security: disc; font-family: inherit; letter-spacing: .08em; }
.env-tag { display: inline-block; margin-top: 4px; padding: 1px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; background: var(--amber-bg); color: var(--amber); }

/* Etichetta "DEV": compare solo fuori dalla produzione (classe impostata da js/supabase-config.js). */
html.env-prova body::after {
  content: 'DEV'; position: fixed; top: 5px; right: -33px; z-index: 2147483000;
  width: 100px; transform: rotate(45deg); text-align: center; pointer-events: none;
  background: #ea580c; color: #fff; font: 800 9.5px/16px system-ui, -apple-system, sans-serif; letter-spacing: .18em;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
html.env-prova .topbar { padding-right: 46px; }  /* lascia libero l'angolo per l'etichetta */
@media print { html.env-prova body::after { display: none; } }

/* Barra «dati modificati da un collega» (tempo reale) */
.remote-bar { position: fixed; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 180;
  display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 14px; border-radius: 999px; background: var(--ink); color: #fff;
  font-size: 13.5px; box-shadow: 0 10px 30px -10px rgba(0,0,0,.45); max-width: calc(100vw - 24px); }
.remote-bar .ic { width: 16px; height: 16px; flex: none; }
@media (min-width: 900px) { .remote-bar { bottom: 24px; } }


/* ---------- Elementi tondi e icone: non si deformano mai (v2.31) ----------
   In una riga stretta (es. la barra in alto su iPhone con un titolo lungo) il browser restringeva
   pulsanti rotondi, avatar e riquadri delle icone, che diventavano ovali. Ora mantengono la loro misura
   e a cedere spazio è il testo, che si accorcia con «…». */
.icon-btn, .card-icon, .avatar, .row-btn, .w-tool, .swatch, .brief-icon, .dyn-mode-ic, .user-pw, .user-out { flex-shrink: 0; }
svg.ic { flex-shrink: 0; min-width: 0; aspect-ratio: 1 / 1; }
.crumbs { min-width: 0; flex: 1 1 auto; overflow: hidden; white-space: nowrap; }
.crumbs b, .crumbs > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crumbs .prop-sel { min-width: 0; flex: 0 1 auto; }
.top-actions { flex: none; }
@media (max-width: 520px) {
  .top-actions { gap: 6px; }
  .help-btn { display: none; }            /* la Guida non ha ancora contenuti: sui telefoni si libera spazio */
}
@media (max-width: 520px) {
  /* Con più strutture il menu di scelta prende tutto lo spazio: il titolo della pagina si legge già sotto, in grande. */
  .crumbs:has(.prop-sel) > b, .crumbs:has(.prop-sel) > span[aria-hidden="true"] { display: none; }
  .crumbs .prop-sel { flex: 1 1 auto; max-width: 100%; }
}
/* Nomi utente ed email lunghi vanno a capo invece di uscire dal riquadro. */
.person > div { min-width: 0; }
.person .muted { overflow-wrap: anywhere; white-space: normal; }

/* ---------- Schermata di caricamento (apertura e ricarica della pagina) ----------
   Compare subito (è nell'HTML) e sparisce con una dissolvenza quando l'app è pronta (classe «ready»). */
.splash {
  position: fixed; inset: 0; z-index: 250; display: grid; place-items: center;
  background: radial-gradient(120% 90% at 50% 0%, #2E2382 0%, #16113D 60%, #0E0B27 100%); color: #fff;
  transition: opacity .38s ease, visibility 0s linear .38s;
}
.splash-in { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.splash-logo { width: 64px; height: 64px; border-radius: 18px; box-shadow: 0 14px 40px -10px rgba(108, 92, 255, .9); animation: splashPulse 1.4s ease-in-out infinite; }
.splash-name { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.splash-name em { font-family: 'Instrument Serif', Georgia, serif; font-style: italic; font-weight: 400; font-size: 1.12em; color: #C9C2FF; }
.splash-bar { position: relative; width: 140px; height: 4px; margin-top: 6px; border-radius: 999px; background: rgba(255, 255, 255, .14); overflow: hidden; }
.splash-bar i { position: absolute; top: 0; bottom: 0; left: -40%; width: 40%; border-radius: inherit; background: linear-gradient(90deg, #8E80FF, #fff); animation: splashSlide 1.1s cubic-bezier(.45, 0, .2, 1) infinite; }
@keyframes splashPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.07); } }
@keyframes splashSlide { 0% { left: -40%; } 100% { left: 100%; } }
html.ready .splash { opacity: 0; visibility: hidden; pointer-events: none; transition-delay: .15s, .53s; }
html.ready .splash .splash-in { transform: scale(.96); transition: transform .4s ease .15s; }
html.boot-fail .splash, html:not(.js) .splash, html.in-frame.ready .splash { display: none; }

/* Barra sottile in alto durante gli aggiornamenti dei dati (es. modifiche di un collega). */
.top-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 260; overflow: hidden; opacity: 0; transition: opacity .3s ease; pointer-events: none; }
.top-progress.on { opacity: 1; }
.top-progress i { position: absolute; top: 0; bottom: 0; left: -30%; width: 30%; background: linear-gradient(90deg, transparent, var(--accent), var(--violet-400)); animation: splashSlide 1s cubic-bezier(.45, 0, .2, 1) infinite; }
.top-progress.done i { left: 0; width: 100%; animation: none; transition: width .3s ease; }

@media (prefers-reduced-motion: reduce) {
  .splash-logo, .splash-bar i, .top-progress i { animation: none; }
  .splash-bar i { left: 0; width: 100%; opacity: .6; }
  .splash, html.ready .splash .splash-in { transition: opacity .2s ease, visibility 0s linear .2s; transform: none; }
}

/* Credenziali del nuovo utente: icona Copia accanto a ogni valore. */
.cred-box .cred-row { display: flex; align-items: center; gap: 10px; }
.cred-box .cred-row > div { flex: 1; min-width: 0; display: grid; gap: 2px; }
.cred-copy { color: var(--accent); background: var(--surface); }
.cred-copy.copied { color: var(--green); }
/* Strutture a cui può accedere un collaboratore. */
.prop-pick { border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px 12px; margin: 0; display: grid; gap: 2px; }
.prop-pick legend { padding: 0 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.prop-pick-list { display: grid; gap: 0; padding: 4px 0 0 26px; border-top: 1px dashed var(--line); margin-top: 4px; }
.prop-pick-list[hidden] { display: none; }
.u-props { font-size: 13px; }
.cred-hint { margin: 0 0 12px; font-size: 13.5px; line-height: 1.5; color: var(--ink-2); }
/* Messaggi «bk-hint»: testo continuo (prima ogni parte in grassetto o link finiva in una colonna a sé);
   l'eventuale icona iniziale resta a sinistra. */
.bk-hint { display: block; position: relative; line-height: 1.45; }
.bk-hint:has(> svg.ic:first-child) { padding-left: 24px; }
.bk-hint > svg.ic:first-child { position: absolute; left: 0; top: 1px; }

/* Ruolo nel riquadro utente del menu laterale e scheda «Il tuo profilo». */
.role-chip { display: inline-block; margin-top: 4px; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 600; letter-spacing: .01em; }
.role-chip[hidden] { display: none; }
.role-chip.big { font-size: 12.5px; padding: 3px 10px; margin-top: 6px; }
.user .who .role-chip { display: inline-block; width: auto; }
.pf-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.pf-head .avatar { width: 48px; height: 48px; font-size: 16px; }
.pf-head b { display: block; font-size: 17px; }
.pf-list { display: grid; gap: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.pf-row { display: flex; justify-content: space-between; gap: 14px; padding: 10px 14px; font-size: 13.5px; }
.pf-row + .pf-row { border-top: 1px solid var(--line); }
.pf-row span { color: var(--muted); flex: none; }
.pf-row b { text-align: right; font-weight: 600; overflow-wrap: anywhere; }
@media (max-width: 520px) { .modal-foot:has(#pfOut) { flex-wrap: wrap; } }

/* ---------- Tutte le strutture (panoramica) ---------- */
.ov-at { margin: -8px 0 14px; font-size: 12.5px; }
.ov-loading { padding: 40px 22px; display: grid; place-items: center; gap: 12px; text-align: center; }
.ov-loading .splash-bar { background: var(--line); }
.ov-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.ov-card { padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.ov-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.ov-name { min-width: 0; }
.ov-name b { display: block; font-size: 16px; overflow-wrap: anywhere; }
.ov-name span { font-size: 12.5px; color: var(--muted); }
.ov-occ-row { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; }
.ov-occ-row b { font-size: 20px; color: var(--ink); letter-spacing: -.01em; }
.ov-occ small { display: block; margin-top: 6px; font-size: 12px; color: var(--muted); }
.ov-meter { height: 8px; margin: 0; }
.ov-meter.hi i { background: var(--green); }
.ov-meter.mid i { background: var(--accent); }
.ov-meter.lo i { background: #F0A630; }
.ov-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ov-stats div:nth-child(4) { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: baseline; }
.ov-stats div { background: var(--surface-2); border-radius: 12px; padding: 8px 10px; display: flex; flex-direction: column; }
.ov-stats b { font-size: 17px; }
.ov-stats span { font-size: 11.5px; color: var(--muted); }
.ov-warn { margin: 0; display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--amber); background: var(--amber-bg); border-radius: 10px; padding: 7px 10px; }
.ov-warn .ic { width: 15px; height: 15px; }
.ov-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; height: 64px; align-items: end; }
.ov-week span { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 3px; }
.ov-week i { display: block; width: 100%; max-width: 22px; border-radius: 5px 5px 2px 2px; background: var(--violet-200); }
.ov-week span:first-child i { background: var(--accent); }
.ov-week em { font-style: normal; font-size: 10.5px; color: var(--muted); }
.ov-foot { margin-top: auto; display: flex; justify-content: flex-end; }

/* ---------- Planner unico di tutte le strutture ---------- */
.mp-toolbar { flex-wrap: wrap; gap: 10px; align-items: center; }
.mp-nav { display: flex; align-items: center; gap: 6px; }
.mp-nav .icon-btn { width: 36px; height: 36px; }
.mp-next .ic { transform: rotate(180deg); }
.mp-range { font-size: 13.5px; margin-left: 4px; white-space: nowrap; }
.mp-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 2px 0 12px; font-size: 12px; color: var(--muted); }
.mp-legend span { display: inline-flex; align-items: center; gap: 6px; }
.mp-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.mp-legend i.lg-in { background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--ink); }
.mp-card { padding: 0; overflow: hidden; }
.mp-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.mp { --cw: 46px; --rw: 168px; min-width: calc(var(--rw) + var(--cw) * var(--n)); }
.mp-head, .mp-row, .mp-prop { display: flex; }
.mp-room { position: sticky; left: 0; z-index: 4; flex: 0 0 var(--rw); width: var(--rw); padding: 6px 12px; background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.mp-room b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-room span { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-corner { font-size: 12px; color: var(--muted); font-weight: 600; }
.mp-head { border-bottom: 1px solid var(--line); }
.mp-days { display: grid; grid-template-columns: repeat(var(--n), var(--cw)); }
.mp-day { height: 46px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 10.5px; color: var(--muted); border-left: 1px solid var(--line-2); }
.mp-day b { font-size: 14px; color: var(--ink); }
.mp-day.we { background: var(--surface-2); }
.mp-day.today { background: var(--accent-soft); color: var(--accent); }
.mp-day.today b { color: var(--accent); }
.mp-prop { background: var(--surface-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.mp-prop .mp-room { background: var(--surface-2); }
.mp-pname b { font-size: 13.5px; }
.mp-pfill { flex: 1; }
.mp-row { border-bottom: 1px solid var(--line-2); }
.mp-cells { position: relative; display: grid; grid-template-columns: repeat(var(--n), var(--cw)); height: 40px; }
.mp-cells > i { border-left: 1px solid var(--line-2); }
.mp-cells > i.we { background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
.mp-cells > i.today { background: color-mix(in srgb, var(--accent-soft) 70%, transparent); }
.mp-row.oos .mp-cells { background: repeating-linear-gradient(135deg, transparent 0 8px, var(--line-2) 8px 10px); }
.mp-bar { position: absolute; top: 5px; bottom: 5px; margin-left: 2px; z-index: 2; border: 0; border-radius: 8px; padding: 0 8px; text-align: left; cursor: pointer;
  background: color-mix(in srgb, var(--c) 18%, var(--surface)); box-shadow: inset 3px 0 0 var(--c); color: var(--ink); display: flex; align-items: center; overflow: hidden; }
.mp-bar b { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-bar:hover, .mp-bar:focus-visible { box-shadow: inset 3px 0 0 var(--c), 0 0 0 2px var(--c); outline: none; }
.mp-bar.in { background: color-mix(in srgb, var(--c) 30%, var(--surface)); box-shadow: inset 3px 0 0 var(--c), inset 0 0 0 1.5px var(--ink); }
.mp-bar.ns { opacity: .5; text-decoration: line-through; }
.mp-bar.cut-l { border-top-left-radius: 0; border-bottom-left-radius: 0; box-shadow: none; }
.mp-bar.cut-r { border-top-right-radius: 0; border-bottom-right-radius: 0; }
@media (max-width: 680px) { .mp { --cw: 38px; --rw: 104px; } .mp-room { padding: 6px 8px; } }

/* ---------- Contabilità sommata di tutte le strutture ---------- */
.ova-bars { padding: 18px; margin-bottom: 18px; display: grid; gap: 10px; }
.ova-bars .card-head { margin-bottom: 4px; }
.ova-bar { display: grid; grid-template-columns: minmax(90px, 200px) 1fr auto; align-items: center; gap: 12px; font-size: 13px; }
.ova-bn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.ova-bt { height: 10px; border-radius: 999px; background: var(--line-2); overflow: hidden; }
.ova-bt i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--violet-400), var(--accent)); }
.ova-bar b { font-variant-numeric: tabular-nums; }
.ova-table td, .ova-table th { white-space: nowrap; }
.ova-table tr.ova-sub td { background: var(--surface-2); }
.ova-table tr.ova-tot td { background: var(--accent-soft); font-weight: 600; }
@media (max-width: 680px) { .ova-table td, .ova-table th { white-space: normal; } .ova-bar { grid-template-columns: 1fr auto; } .ova-bar .ova-bt { grid-column: 1 / -1; order: 3; } }
.ovb-more { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--line); font-size: 13px; }
