/* =========================================================
   KUTAMIZ — кабинет организатора
   ========================================================= */
body { background: #F4EEE3; --bg:#FBF7F1; --bg-2:#F0E9DC; --white:#FFFFFF; --surface:#FFFFFF; --ink:#14181F; --ink-2:#3B4048; --muted:#7C7A74; --line:rgba(20,24,31,.1); --line-2:rgba(20,24,31,.06); --accent:#0F4C3A; --gold:#B6884C; --gold-2:#D9B475; --anor:#8E2A3A; --shadow-lg: 0 30px 70px rgba(20,24,31,.18); --font-display: "Cormorant Garamond", Georgia, serif; }
.dash-top .logo, .dash-top .logo .mark { color: #FBF7F1; }
.dash-top .logo .mark { color: #D9B475; }
.dash-top .back { color: rgba(251,247,241,.7); }
.btn-primary { --btn-bg: #0F4C3A; --btn-fg: #fff; border-radius: 999px; } .btn-gold { --btn-bg: #B6884C; --btn-fg: #fff; border-radius: 999px; } .btn-ghost { --btn-bg: transparent; --btn-fg: #14181F; border-color: rgba(20,24,31,.14); border-radius: 999px; } .btn-ghost:hover { --btn-bg: #14181F; --btn-fg: #FBF7F1; } .btn-tg { --btn-bg: #2AABEE; --btn-fg: #fff; border-radius: 999px; }
.chip { border-radius: 999px; background: #fff; color: #3B4048; border-color: rgba(20,24,31,.14); } .chip.active { background: #14181F; color: #FBF7F1; border-color: #14181F; }
.field input, .field select { background: #FBF7F1; color: #14181F; border-color: rgba(20,24,31,.14); border-radius: 12px; }
.toast { background: #14181F; color: #FBF7F1; border-radius: 14px; }
.dash-top { background: var(--ink); color: var(--bg); }
.dash-top .bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.dash-top .logo { color: var(--bg); font-size: 20px; }
.dash-top .lang-switch { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); }
.dash-top .lang-switch button { color: rgba(251,247,241,.6); }
.dash-top .lang-switch button.active { background: var(--gold); color: #fff; }
.dash-top .back { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: rgba(251,247,241,.7); }
.dash-top .back:hover { color: var(--bg); }
.dash-top .back svg { width: 16px; height: 16px; }

.dash-hero { background: var(--ink); color: var(--bg); padding: 22px 0 84px; position: relative; overflow: hidden; }
.dash-hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(900px 400px at 90% 50%, rgba(217,180,117,.14), transparent 60%), radial-gradient(700px 400px at 0% 100%, rgba(15,76,58,.2), transparent 60%); }
.dash-hero .container { position: relative; }
.dash-hero .row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.dash-hero .lbl { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: rgba(251,247,241,.5); }
.dash-hero h1 { font-size: clamp(30px, 4vw, 50px); margin-top: 8px; line-height: 1.05; }
.dash-hero h1 em { font-style: italic; color: var(--gold-2); }
.dash-hero .meta { display: flex; gap: 8px 18px; flex-wrap: wrap; color: rgba(251,247,241,.65); margin-top: 10px; font-size: 14px; }
.dash-hero .meta span::before { content: "✦"; color: var(--gold); margin-right: 8px; font-size: 11px; }
.dash-hero .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.dash-hero .btn-light { --btn-bg: rgba(255,255,255,.1); --btn-fg: var(--bg); border-color: rgba(255,255,255,.14); }
.dash-hero .btn-light:hover { --btn-bg: var(--bg); --btn-fg: var(--ink); }
.event-select { position: relative; display: inline-block; margin-top: 6px; }
.event-select select { appearance: none; -webkit-appearance: none; background: rgba(255,255,255,.08); color: var(--bg); border: 1px solid rgba(255,255,255,.14); border-radius: 12px; padding: 10px 40px 10px 14px; font-size: 14px; max-width: 100%; }
.event-select::after { content: ""; position: absolute; right: 16px; top: 50%; width: 8px; height: 8px; border-right: 1.5px solid var(--gold-2); border-bottom: 1.5px solid var(--gold-2); transform: translateY(-70%) rotate(45deg); pointer-events: none; }

.dash-content { margin-top: -56px; position: relative; padding-bottom: 70px; }
.demo-note { display: flex; gap: 12px; align-items: flex-start; background: #FFF8E6; border: 1px solid #F0DDA8; border-radius: 14px; padding: 12px 16px; font-size: 13px; color: #6b5423; margin-bottom: 16px; }
.demo-note svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.demo-note button { margin-left: auto; color: #8a6325; font-size: 12px; text-decoration: underline; white-space: nowrap; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stat { background: var(--white); border: 1px solid var(--line); border-radius: 18px; padding: 18px 20px; position: relative; overflow: hidden; }
.stat .l { font-size: 12px; color: var(--muted); }
.stat .v { font-family: var(--font-display); font-size: 44px; line-height: 1; margin-top: 8px; font-variant-numeric: lining-nums; font-feature-settings: "lnum" 1; }
.stat .d { font-size: 12px; color: var(--muted); margin-top: 6px; }
.stat.go .v { color: var(--accent); } .stat.no .v { color: var(--anor); } .stat.open .v { color: #8a6325; }
.stat .bar { height: 5px; border-radius: 4px; background: var(--bg-2); margin-top: 10px; overflow: hidden; }
.stat .bar i { display: block; height: 100%; background: var(--accent); }
.stat.no .bar i { background: var(--anor); } .stat.open .bar i { background: var(--gold); } .stat.new .bar i { background: #9aa0a6; }

.funnel { margin-top: 12px; background: var(--white); border: 1px solid var(--line); border-radius: 18px; padding: 16px 20px; }
.funnel .head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.funnel .head b { font-size: 13px; font-weight: 600; }
.funnel .live { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--accent); }
.funnel .live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.4); opacity: .5; } }
.funnel .track { display: flex; height: 14px; border-radius: 8px; overflow: hidden; background: var(--bg-2); margin-top: 12px; }
.funnel .track i { display: block; height: 100%; transition: width .6s var(--ease); }
.funnel .legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.funnel .legend span::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 6px; background: var(--c); vertical-align: middle; }

.toolbar { margin-top: 18px; background: var(--white); border: 1px solid var(--line); border-radius: 18px; padding: 12px 14px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.search { flex: 1; min-width: 220px; display: flex; align-items: center; gap: 10px; padding: 9px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); }
.search:focus-within { border-color: var(--ink); }
.search input { border: 0; outline: 0; background: transparent; width: 100%; font-size: 14px; }
.search svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
.toolbar .chips { display: flex; gap: 6px; flex-wrap: wrap; }
.toolbar .tools { display: flex; gap: 6px; margin-left: auto; flex-wrap: wrap; }
.icon-btn { width: 36px; height: 36px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--bg); color: var(--ink-2); border: 1px solid transparent; transition: background .2s, color .2s; }
.icon-btn:hover { background: var(--ink); color: var(--bg); }
.icon-btn svg { width: 15px; height: 15px; }
.icon-btn.danger:hover { background: var(--anor); }

.table-wrap { margin-top: 12px; background: var(--white); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
table.guests { width: 100%; border-collapse: collapse; font-size: 14px; }
table.guests th { text-align: left; padding: 14px 18px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 500; background: var(--bg); border-bottom: 1px solid var(--line); white-space: nowrap; }
table.guests td { padding: 13px 18px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.guests tr:last-child td { border-bottom: 0; }
table.guests tbody tr:hover { background: var(--bg); }
.gcell { display: flex; align-items: center; gap: 12px; }
.ava { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: 14px; color: #fff; flex: none; }
.gcell .n { font-weight: 500; }
.gcell .s { font-size: 12px; color: var(--muted); margin-top: 1px; }
.gcell .w { font-size: 12px; color: var(--accent); margin-top: 3px; font-style: italic; max-width: 320px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.confirmed { background: rgba(15,76,58,.12); color: var(--accent); }
.pill.declined { background: rgba(142,42,58,.12); color: var(--anor); }
.pill.viewed { background: rgba(182,136,76,.18); color: #8a6325; }
.pill.viewed::before { animation: pulse 1.6s ease-in-out infinite; }
.pill.new { background: rgba(140,132,114,.15); color: #6B6F69; }
.ph { white-space: nowrap; color: var(--ink-2); }
.ph.none { color: var(--muted); }
.when { white-space: nowrap; color: var(--muted); font-size: 13px; }
.row-actions { display: flex; gap: 4px; justify-content: flex-end; }
.empty-row td { text-align: center; padding: 50px 20px; color: var(--muted); }
.table-foot { padding: 12px 18px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

.shared-card { margin-top: 16px; background: var(--white); border: 1px solid var(--line); border-radius: 18px; padding: 18px 20px; display: grid; grid-template-columns: 1fr auto; gap: 12px 20px; align-items: center; }
.shared-card b { font-family: var(--font-display); font-size: 22px; font-weight: 500; }
.shared-card .url { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12px; color: var(--ink-2); background: var(--bg); padding: 8px 12px; border-radius: 8px; word-break: break-all; margin-top: 8px; }
.shared-card .hint { font-size: 12px; color: var(--muted); margin-top: 6px; }
.shared-card .btns { display: flex; gap: 8px; flex-wrap: wrap; }

/* Модалки */
.modal-bg { position: fixed; inset: 0; z-index: 90; background: rgba(20,24,31,.5); display: grid; place-items: center; padding: 20px; opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s; }
.modal-bg.open { opacity: 1; visibility: visible; }
.modal { width: min(100%, 460px); background: var(--white); border-radius: 22px; padding: 26px; box-shadow: var(--shadow-lg); transform: translateY(12px); transition: transform .3s var(--ease-out); }
.modal-bg.open .modal { transform: none; }
.modal h3 { font-size: 26px; }
.modal .fields { margin-top: 16px; }
.modal .btns { display: flex; gap: 8px; margin-top: 18px; justify-content: flex-end; }
.qr-box { display: grid; place-items: center; margin-top: 16px; }
.qr-box canvas { border-radius: 12px; border: 1px solid var(--line); padding: 10px; background: #fff; }
.qr-box .who { margin-top: 12px; font-family: var(--font-display); font-size: 22px; text-align: center; }
.qr-box .url { font-size: 12px; color: var(--muted); word-break: break-all; text-align: center; margin-top: 4px; }

@media (max-width: 900px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .shared-card { grid-template-columns: 1fr; }
  table.guests thead { display: none; }
  table.guests, table.guests tbody, table.guests tr, table.guests td { display: block; }
  table.guests tr { padding: 10px 0; border-bottom: 1px solid var(--line-2); }
  table.guests td { padding: 5px 16px; border: 0; }
  table.guests td[data-l]::before { content: attr(data-l); display: inline-block; width: 84px; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
  table.guests td.gc::before { display: none; }
  .row-actions { justify-content: flex-start; padding-left: 16px; }
  .dash-hero .row { align-items: flex-start; }
}
@media (max-width: 560px) {
  .stats { grid-template-columns: 1fr 1fr; gap: 8px; }
  .stat { padding: 14px; } .stat .v { font-size: 34px; }
  .toolbar .tools { margin-left: 0; }
}
@media print {
  .dash-top, .dash-hero .actions, .demo-note, .toolbar, .row-actions, .shared-card, .modal-bg, .funnel .live, .lang-switch, .event-select::after { display: none !important; }
  body { background: #fff; }
  .dash-hero { background: #fff; color: #000; padding: 0; }
  .dash-hero::before { display: none; }
  .dash-hero h1 em, .dash-hero .lbl, .dash-hero .meta { color: #000; }
  .dash-content { margin-top: 16px; }
  .stat, .funnel, .table-wrap { border-color: #ccc; break-inside: avoid; }
  table.guests td, table.guests th { padding: 8px 10px; }
}
