/* GoScale · identidade visual Digital Scale
   Fontes: Anton (títulos, caixa alta) e Archivo (texto).
   Cores da marca: preto, laranja #FF6B00 e amarelo #FFD400 (só em detalhes). */
@import url("https://fonts.googleapis.com/css2?family=Anton&family=Archivo:wght@400;500;600;700&display=swap");

/* ============ Tokens ============ */
:root {
  color-scheme: dark;
  /* Marca */
  --orange: #ff6b00;
  --orange-2: #ff8a00;
  --orange-deep: #7a3300;
  --yellow: #ffd400;
  --on-orange: #000000;
  /* Superfícies */
  --bg: #000000;
  --bg-2: #0e0c0a;
  --surface: #15120f;
  --surface-2: #1b1713;
  --surface-3: #221d18;
  --border: #2a221c;
  --border-strong: #3a2f27;
  /* Texto */
  --text: #f4f1ec;
  --text-2: #c9c2bb;
  --text-3: #a8a09a;
  --text-4: #6e655d;
  /* Ações */
  --primary: var(--orange);
  --primary-hover: var(--orange-2);
  --primary-soft: rgba(255, 107, 0, .12);
  --primary-ring: rgba(255, 107, 0, .35);
  --chart: #f26500; /* laranja da marca ajustado para gráfico em fundo escuro (validado) */
  /* Situações (sempre com texto/ícone, nunca só cor) */
  --ok: #4ade80;   --ok-bg: rgba(74, 222, 128, .12);
  --warn: var(--yellow); --warn-bg: rgba(255, 212, 0, .12);
  --bad: #f87171;  --bad-bg: rgba(248, 113, 113, .12);
  --info: var(--orange-2); --info-bg: rgba(255, 138, 0, .12);
  --gray-bg: rgba(168, 160, 154, .14);
  /* Conversas */
  --chat-bg: #0b0907;
  --bubble-cliente: #1f1a16;
  --bubble-ia: #3a1e08;
  --bubble-humano: #2a2410;
  /* Forma */
  --radius: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 2px 8px rgba(0, 0, 0, .45);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, .6);
  --sidebar: 260px;
  --display: "Anton", Impact, "Arial Narrow", sans-serif;
  --body: "Archivo", "Helvetica Neue", Arial, sans-serif;
  font-family: var(--body);
  color: var(--text);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--orange-2); text-decoration: none; }
a:hover { text-decoration: underline; }
::selection { background: var(--orange); color: var(--on-orange); }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hidden { display: none !important; }
.muted { color: var(--text-3); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.mono { font-variant-numeric: tabular-nums; }
.display { font-family: var(--display); text-transform: uppercase; letter-spacing: .01em; font-weight: 400; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 10px; border: 2px solid var(--bg-2); }
::-webkit-scrollbar-track { background: transparent; }

/* ============ Layout ============ */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar); background: var(--bg); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; z-index: 30; transition: transform .2s ease;
}
.content { flex: 1; margin-left: var(--sidebar); min-width: 0; display: flex; flex-direction: column; background: var(--bg-2); min-height: 100vh; }
.topbar {
  height: 64px; background: rgba(14, 12, 10, .85); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px; padding: 0 28px; position: sticky; top: 0; z-index: 20;
}
.topbar h1 { font-family: var(--display); text-transform: uppercase; font-weight: 400; font-size: 22px; letter-spacing: .01em; margin: 0; }
.topbar .spacer { flex: 1; }
.page { padding: 28px; max-width: 1240px; width: 100%; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h2 { font-family: var(--display); text-transform: uppercase; font-weight: 400; font-size: 30px !important; letter-spacing: .01em !important; line-height: 1.05; }
.page-head p { margin: 6px 0 0; color: var(--text-3); }
.menu-btn { display: none; }
.backdrop { display: none; }

@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .backdrop.open { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .6); z-index: 25; }
  .content { margin-left: 0; }
  .menu-btn { display: inline-flex; }
  .page { padding: 16px; }
  .topbar { padding: 0 12px; }
  .page-head h2 { font-size: 24px !important; }
}

/* ============ Marca ============ */
.brand { display: flex; align-items: center; gap: 10px; padding: 20px 20px 16px; }
.brand .logo { width: 36px; height: 36px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--border); display: grid; place-items: center; overflow: hidden; flex: none; }
.brand .logo img { width: 130%; height: 130%; object-fit: contain; }
.brand .name { font-family: var(--display); text-transform: uppercase; font-size: 24px; line-height: 1; letter-spacing: .01em; color: var(--text); }
.brand .name em { font-style: normal; color: var(--orange); }
.brand .by { display: block; font-family: var(--body); text-transform: none; font-size: 11px; color: var(--text-4); letter-spacing: .02em; margin-top: 3px; }

/* ============ Sidebar ============ */
.ws { margin: 0 14px 12px; position: relative; }
.ws-btn {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--border);
  background: var(--surface); border-radius: var(--radius); cursor: pointer; text-align: left; color: var(--text);
}
.ws-btn:hover { border-color: var(--border-strong); background: var(--surface-2); }
.ws-avatar { width: 32px; height: 32px; border-radius: 8px; background: var(--primary-soft); color: var(--orange); display: grid; place-items: center; font-weight: 700; flex: none; }
.ws-name { font-weight: 600; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-sub { font-size: 12px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-menu {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 6px; z-index: 40; max-height: 60vh; overflow-y: auto;
}
.ws-item { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 8px; cursor: pointer; }
.ws-item:hover { background: var(--surface-3); }
.ws-item.active { background: var(--primary-soft); }
.ws-sep { height: 1px; background: var(--border); margin: 6px 0; }

.nav { padding: 4px 12px; flex: 1; overflow-y: auto; }
.nav-label { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--text-4); padding: 16px 10px 6px; font-weight: 700; }
.nav a {
  display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 8px; color: var(--text-3);
  font-weight: 500; margin-bottom: 2px; text-decoration: none; position: relative;
}
.nav a:hover { background: var(--surface); color: var(--text); }
.nav a.active { background: var(--primary-soft); color: var(--text); }
.nav a.active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--orange); }
.nav a.active svg { color: var(--orange); }
.side-foot { border-top: 1px solid var(--border); padding: 12px 14px; display: flex; align-items: center; gap: 10px; }
.user-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--orange); color: var(--on-orange); display: grid; place-items: center; font-weight: 700; flex: none; font-size: 13px; }
.side-foot .who { min-width: 0; flex: 1; }
.side-foot .who b { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-foot .who span { font-size: 12px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }

/* ============ Componentes ============ */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.card-head h2 { font-size: 15px; font-weight: 700; margin: 0; }
.card-head p { margin: 2px 0 0; color: var(--text-3); font-size: 13px; }
.card-body { padding: 20px; }
.card + .card, .grid-gap > * + * { margin-top: 16px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 16px;
  border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text); font-weight: 600;
  cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s, transform .08s;
}
.btn:hover { background: var(--surface-3); border-color: var(--text-4); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible, .input:focus, .ws-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--primary-ring); border-color: var(--orange); }
.btn-primary { background: var(--orange); border-color: var(--orange); color: var(--on-orange); }
.btn-primary:hover { background: var(--orange-2); border-color: var(--orange-2); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--surface-2); border-color: transparent; }
.btn-danger { color: var(--bad); }
.btn-danger:hover { background: var(--bad-bg); border-color: rgba(248, 113, 113, .4); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn-icon { width: 38px; padding: 0; }
.btn-sm.btn-icon { width: 32px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn .i { width: 16px; height: 16px; }

.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; color: var(--text-2); }
.field .hint { font-size: 12px; color: var(--text-3); margin-top: 5px; }
.hint { font-size: 12px; color: var(--text-3); margin-top: 5px; }
.field.error .input { border-color: var(--bad); }
.field .err { font-size: 12px; color: var(--bad); margin-top: 4px; }
.input {
  width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: 10px;
  background: var(--bg-2); color: var(--text); transition: border-color .12s, box-shadow .12s;
}
.input::placeholder { color: var(--text-4); }
.input[type="date"] { color-scheme: dark; }
textarea.input { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; }
select.input { padding-right: 30px; }
select.input option { background: var(--surface); }
.input-prefix { position: relative; }
.input-prefix span { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-3); font-size: 13px; }
.input-prefix .input { padding-left: 36px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

.badge { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.badge.info { background: var(--info-bg); color: var(--info); }
.badge.gray { background: var(--gray-bg); color: var(--text-2); }

.switch { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; user-select: none; font-weight: 600; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track { width: 40px; height: 22px; border-radius: 999px; background: var(--border-strong); position: relative; transition: background .15s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--text); transition: transform .15s; }
.switch input:checked + .track { background: var(--orange); }
.switch input:checked + .track::after { transform: translateX(18px); background: var(--on-orange); }
.switch input:focus-visible + .track { box-shadow: 0 0 0 3px var(--primary-ring); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 20px; overflow-x: auto; }
.tabs button { background: none; border: 0; padding: 10px 14px; color: var(--text-3); font-weight: 600; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button:hover { color: var(--text); }
.tabs button.active { color: var(--text); border-bottom-color: var(--orange); }

table.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-4); padding: 10px 16px; background: var(--bg-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr[style*="pointer"]:hover td { background: var(--surface-2); }
.table-wrap { overflow-x: auto; }
.table .actions { text-align: right; white-space: nowrap; }

.empty { text-align: center; padding: 44px 20px; color: var(--text-3); }
.empty .ico { width: 48px; height: 48px; border-radius: 14px; background: var(--primary-soft); display: grid; place-items: center; margin: 0 auto 12px; color: var(--orange); }
.empty b { display: block; color: var(--text); font-size: 15px; margin-bottom: 2px; }

.alert { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius); border: 1px solid; margin-bottom: 16px; color: var(--text); }
.alert svg { margin-top: 1px; }
.alert.warn { background: var(--warn-bg); border-color: rgba(255, 212, 0, .35); }
.alert.warn svg { color: var(--yellow); }
.alert.bad { background: var(--bad-bg); border-color: rgba(248, 113, 113, .4); }
.alert.bad svg { color: var(--bad); }
.alert.info { background: var(--info-bg); border-color: rgba(255, 138, 0, .35); }
.alert.info svg { color: var(--orange-2); }
.alert .grow { flex: 1; }

/* ============ Início ============ */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin-bottom: 16px; }
.stat { padding: 18px 20px; position: relative; overflow: hidden; }
.stat::after { content: ""; position: absolute; right: -30px; top: -30px; width: 90px; height: 90px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 107, 0, .14), transparent 70%); }
.stat .label { color: var(--text-3); font-size: 12.5px; font-weight: 600; display: flex; align-items: center; gap: 7px; }
.stat .label svg { color: var(--orange); }
.stat .value { font-family: var(--display); font-weight: 400; font-size: 38px; line-height: 1.1; margin-top: 8px; font-variant-numeric: tabular-nums; }
.stat .sub { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.two-col { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; }
@media (max-width: 1000px) { .two-col { grid-template-columns: 1fr; } }

.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--border); }
.checklist li:last-child { border-bottom: 0; }
.checklist .dot { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--border-strong); display: grid; place-items: center; flex: none; }
.checklist .dot svg { width: 14px; height: 14px; }
.checklist li.done .dot { background: var(--orange); border-color: var(--orange); color: var(--on-orange); }
.checklist li.done .t { color: var(--text-4); text-decoration: line-through; }
.checklist .t { flex: 1; font-weight: 600; }
.progress { height: 8px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.progress > div { height: 100%; background: linear-gradient(90deg, var(--orange), var(--orange-2)); border-radius: 999px; }
.progress.warn > div { background: var(--yellow); }

.chart { position: relative; }
.chart svg { display: block; width: 100%; height: 190px; overflow: visible; }
.chart .bar { fill: var(--chart); }
.chart .bar-hit { fill: transparent; }
.chart .bar.hover { fill: var(--orange-2); }
.chart .axis { fill: var(--text-4); font-size: 11px; font-family: var(--body); }
.chart .grid { stroke: var(--border); stroke-width: 1; }
.tooltip { position: absolute; pointer-events: none; background: var(--text); color: var(--bg); font-size: 12px; font-weight: 600; padding: 6px 9px; border-radius: 6px; white-space: nowrap; transform: translate(-50%, -100%); margin-top: -8px; }

.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--border); }
.list-row:last-child { border-bottom: 0; }
.list-row[style*="pointer"]:hover { background: var(--surface-2); }
.date-chip { width: 48px; text-align: center; border: 1px solid var(--border-strong); border-radius: 10px; padding: 4px 0; flex: none; background: var(--bg-2); }
.date-chip b { display: block; font-family: var(--display); font-weight: 400; font-size: 20px; line-height: 1.1; }
.date-chip span { font-size: 10.5px; text-transform: uppercase; color: var(--orange); font-weight: 700; letter-spacing: .04em; }

/* ============ Conversas ============ */
.inbox { display: grid; grid-template-columns: 340px minmax(0, 1fr); height: calc(100vh - 64px - 56px); min-height: 480px; overflow: hidden; }
.inbox-list { border-right: 1px solid var(--border); display: flex; flex-direction: column; min-height: 0; }
.inbox-search { padding: 12px; border-bottom: 1px solid var(--border); }
.inbox-items { overflow-y: auto; flex: 1; }
.conv { display: flex; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--border); cursor: pointer; }
.conv:hover { background: var(--surface-2); }
.conv.active { background: var(--primary-soft); box-shadow: inset 3px 0 0 var(--orange); }
.conv-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--surface-3); color: var(--text-2); display: grid; place-items: center; font-weight: 700; flex: none; font-size: 13px; }
.conv-main { min-width: 0; flex: 1; }
.conv-top { display: flex; justify-content: space-between; gap: 8px; }
.conv-top b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-prev { color: var(--text-3); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-tags { display: flex; gap: 4px; margin-top: 5px; flex-wrap: wrap; }
.chat-pane { display: flex; flex-direction: column; min-height: 0; }
.chat-head { padding: 12px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.chat-head .grow { flex: 1; min-width: 160px; }
.chat-body { flex: 1; overflow-y: auto; padding: 18px; background: var(--chat-bg); display: flex; flex-direction: column; gap: 6px; }
.bubble { max-width: min(560px, 78%); padding: 8px 12px 6px; border-radius: 12px; white-space: pre-wrap; word-wrap: break-word; font-size: 14px; }
.bubble.cliente { background: var(--bubble-cliente); align-self: flex-start; border-top-left-radius: 3px; }
.bubble.ia { background: var(--bubble-ia); align-self: flex-end; border-top-right-radius: 3px; border: 1px solid rgba(255, 107, 0, .25); }
.bubble.humano { background: var(--bubble-humano); align-self: flex-end; border-top-right-radius: 3px; border: 1px solid rgba(255, 212, 0, .2); }
.bubble .meta { font-size: 11px; color: var(--text-3); margin-top: 3px; text-align: right; }
.day-sep { align-self: center; background: var(--surface-2); color: var(--text-3); font-size: 12px; padding: 3px 12px; border-radius: 999px; margin: 8px 0; }
.chat-empty { flex: 1; display: grid; place-items: center; color: var(--text-3); }
@media (max-width: 900px) {
  .inbox { grid-template-columns: 1fr; height: auto; }
  .inbox.showing-chat .inbox-list { display: none; }
  .inbox:not(.showing-chat) .chat-pane { display: none; }
  .chat-body { min-height: 60vh; }
}

/* ============ Agenda ============ */
.cal-head { display: flex; align-items: center; gap: 8px; }
.cal-head h3 { margin: 0; font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: 20px; min-width: 190px; text-align: center; letter-spacing: .02em; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal .dow { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-4); text-align: center; padding-bottom: 4px; }
.cal .day {
  min-height: 80px; border: 1px solid var(--border); border-radius: 10px; padding: 7px 8px; background: var(--bg-2); color: var(--text);
  cursor: pointer; display: flex; flex-direction: column; gap: 4px; text-align: left; font-size: 12px; transition: border-color .12s, background .12s;
}
.cal .day:hover { border-color: var(--orange); background: var(--surface-2); }
.cal .day.out { background: transparent; border-color: transparent; cursor: default; }
.cal .day.past { opacity: .4; cursor: default; }
.cal .day.past:hover { border-color: var(--border); background: var(--bg-2); }
.cal .day.today { border-color: var(--orange); }
.cal .day.today .n { background: var(--orange); color: var(--on-orange); border-radius: 6px; padding: 0 6px; }
.cal .day .n { font-weight: 700; align-self: flex-start; }
.cal .tag { border-radius: 5px; padding: 2px 6px; font-size: 11px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal .tag.conf { background: var(--ok-bg); color: var(--ok); }
.cal .tag.pre { background: var(--warn-bg); color: var(--warn); }
.cal .tag.bloq { background: var(--gray-bg); color: var(--text-2); }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--text-3); margin-top: 14px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
@media (max-width: 640px) { .cal .day { min-height: 54px; padding: 4px; } .cal .tag { font-size: 0; height: 6px; padding: 0; } }

/* ============ Configurações ============ */
.rows .row { display: grid; gap: 10px; align-items: start; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 10px; background: var(--bg-2); }
.rows .row .field { margin-bottom: 0; }
.rows .row .rm { align-self: center; margin-top: 18px; }
.days-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.day-price { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; background: var(--bg-2); }
.day-price label { font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); display: block; margin-bottom: 6px; }
.thumb { width: 64px; height: 48px; border-radius: 6px; object-fit: cover; border: 1px solid var(--border); background: var(--surface-3); }
.savebar {
  position: sticky; bottom: 0; margin: 20px -28px -28px; padding: 12px 28px; background: rgba(14, 12, 10, .92);
  backdrop-filter: blur(8px); border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: flex-end; gap: 12px; z-index: 10;
}
@media (max-width: 900px) { .savebar { margin: 20px -16px -16px; padding: 12px 16px; } }

/* ============ WhatsApp ============ */
.wa-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: center; }
@media (max-width: 800px) { .wa-grid { grid-template-columns: 1fr; } }
.qr-box { width: 280px; height: 280px; border: 1px solid var(--border-strong); border-radius: var(--radius-lg); display: grid; place-items: center; background: var(--bg-2); margin: 0 auto; overflow: hidden; }
.qr-box img { width: 100%; height: 100%; image-rendering: pixelated; background: #ffffff; padding: 10px; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0 0 18px; }
.steps li { counter-increment: s; display: flex; gap: 12px; margin-bottom: 14px; }
.steps li::before { content: counter(s); width: 28px; height: 28px; border-radius: 50%; background: var(--orange); color: var(--on-orange); font-family: var(--display); display: grid; place-items: center; flex: none; font-size: 14px; }
.status-big { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--radius); background: var(--bg-2); border: 1px solid var(--border); margin-bottom: 20px; }
.status-big .ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; }

/* ============ Modal / Toast ============ */
.modal-bg { position: fixed; inset: 0; background: rgba(0, 0, 0, .7); display: grid; place-items: center; z-index: 50; padding: 16px; backdrop-filter: blur(2px); }
.modal { background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto; }
.modal-head { padding: 20px 22px 0; }
.modal-head h3 { margin: 0; font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: 22px; letter-spacing: .01em; }
.modal-head p { margin: 6px 0 0; color: var(--text-3); }
.modal-body { padding: 16px 22px; }
.modal-foot { padding: 14px 22px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; background: var(--bg-2); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.secret { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 20px; letter-spacing: .08em; background: var(--bg-2); border: 1px dashed var(--orange); color: var(--orange-2); border-radius: 10px; padding: 14px; text-align: center; user-select: all; }

#toasts { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 60; }
.toast { background: var(--text); color: var(--bg); font-weight: 600; padding: 11px 14px; border-radius: var(--radius); box-shadow: var(--shadow-lg); max-width: 380px; display: flex; gap: 10px; align-items: flex-start; animation: up .18s ease; }
.toast svg { color: var(--orange); }
.toast.err { background: var(--bad); color: #1a0505; }
.toast.err svg { color: #1a0505; }
@keyframes up { from { transform: translateY(8px); opacity: 0; } }

/* ============ Login ============ */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; background: var(--bg); }
.auth-side {
  position: relative; overflow: hidden; padding: 48px; display: flex; flex-direction: column; justify-content: space-between;
  background: radial-gradient(900px 500px at 20% 110%, rgba(255, 107, 0, .35), transparent 60%), radial-gradient(500px 300px at 90% 0%, rgba(255, 212, 0, .10), transparent 70%), var(--bg);
  border-right: 1px solid var(--border);
}
.auth-side h2 { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: clamp(40px, 4.6vw, 68px); line-height: .95; letter-spacing: .005em; margin: 0 0 18px; max-width: 560px; }
.auth-side h2 em { font-style: normal; color: var(--orange); }
.auth-side p { color: var(--text-3); max-width: 440px; font-size: 16px; }
.auth-side ul { padding: 0; list-style: none; margin: 26px 0 0; }
.auth-side li { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; color: var(--text-2); }
.auth-side li svg { color: var(--orange); }
.auth-rocket { position: absolute; right: -40px; bottom: 40px; width: 300px; opacity: .9; pointer-events: none; }
.auth-main { display: grid; place-items: center; padding: 32px; background: var(--bg-2); }
.auth-form { width: 100%; max-width: 380px; }
.auth-form h1 { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: 34px; line-height: 1; margin: 0 0 8px; letter-spacing: .01em; }
.auth-form .btn-primary { width: 100%; height: 44px; font-size: 15px; }
@media (max-width: 900px) { .auth { grid-template-columns: 1fr; } .auth-side { display: none; } }

.skeleton { background: linear-gradient(90deg, var(--surface) 25%, var(--surface-3) 37%, var(--surface) 63%); background-size: 400% 100%; animation: sk 1.2s ease infinite; border-radius: 8px; }
@keyframes sk { from { background-position: 100% 50%; } to { background-position: 0 50%; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
