/* ConfGraphics — интерфейс пульта и справочников. Тёмная тема, акцент фиолетовый (#b46bff). */
:root {
  --bg: #0a0a11; --bg2: #0f0f18; --panel: #14141f; --panel2: #1b1b29; --panel3: #23233a;
  --line: rgba(255, 255, 255, .075); --line2: rgba(255, 255, 255, .14);
  --text: #eeedf7; --muted: #9b99b3; --dim: #6c6a85;
  --accent: #b46bff; --accent2: #8b5cff; --accent-soft: rgba(180, 107, 255, .14);
  --ok: #2ee59d; --warn: #ffb547; --danger: #ff4d6d; --onair: #ff2d55;
  --radius: 14px; --radius-sm: 10px;
  --font: 'Manrope', 'Segoe UI', system-ui, sans-serif;
  --font-d: 'Unbounded', 'Manrope', sans-serif;
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, .6);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.45;
  -webkit-font-smoothing: antialiased; font-weight: 500; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -.01em; }
h1 { font-family: var(--font-d); font-weight: 600; font-size: 26px; }
h2 { font-size: 18px; }
h3 { font-size: 15px; }
small, .muted { color: var(--muted); }
.dim { color: var(--dim); }
img { max-width: 100%; }
::selection { background: rgba(180, 107, 255, .35); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── каркас ─────────────────────────────────────────────────────────── */
.app { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; background: var(--bg2); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 20px 14px; }
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 22px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-mark { width: 36px; height: 36px; border-radius: 11px; background: linear-gradient(135deg, var(--accent), #5b8cff); display: grid; place-items: center; box-shadow: 0 8px 24px -6px rgba(180, 107, 255, .6); }
.brand-mark svg { width: 20px; height: 20px; }
.brand b { font-family: var(--font-d); font-weight: 600; font-size: 16px; letter-spacing: -.01em; display: block; }
.brand small { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px; color: var(--muted); font-weight: 600; }
.nav a svg { width: 18px; height: 18px; flex: none; opacity: .85; }
.nav a:hover { background: var(--panel); color: var(--text); text-decoration: none; }
.nav a.on { background: var(--accent-soft); color: #fff; box-shadow: inset 2px 0 0 var(--accent); }
.nav-sep { height: 1px; background: var(--line); margin: 12px 8px; }
.nav-label { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); padding: 6px 12px 4px; }
.side-foot { margin-top: auto; padding: 12px 8px 0; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.avatar-sm { width: 34px; height: 34px; border-radius: 50%; background: var(--panel3); display: grid; place-items: center; font-weight: 800; font-size: 13px; color: var(--accent); flex: none; }
.side-foot .who { min-width: 0; flex: 1; }
.side-foot .who b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-foot .who small { font-size: 11px; }
.main { min-width: 0; padding: 28px 34px 60px; }
.topbar { display: none; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head .crumbs { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.page-head .crumbs a { color: var(--muted); }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── кнопки ─────────────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 10px;
  border: 1px solid var(--line2); background: var(--panel2); color: var(--text); font: inherit; font-weight: 700; font-size: 14px; cursor: pointer;
  transition: background .15s, border-color .15s, transform .08s, box-shadow .15s; white-space: nowrap; text-decoration: none; }
.btn:hover { background: var(--panel3); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn svg { width: 17px; height: 17px; }
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent2)); border-color: transparent; color: #fff; box-shadow: 0 8px 24px -10px rgba(180, 107, 255, .8); }
.btn-primary:hover { background: linear-gradient(135deg, #c184ff, #9a6eff); }
.btn-ghost { background: transparent; }
.btn-danger { background: rgba(255, 77, 109, .12); border-color: rgba(255, 77, 109, .35); color: #ff8aa0; }
.btn-danger:hover { background: rgba(255, 77, 109, .22); }
.btn-sm { height: 32px; padding: 0 11px; font-size: 13px; border-radius: 8px; }
.btn-xs { height: 26px; padding: 0 8px; font-size: 12px; border-radius: 7px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.icon-btn { width: 32px; padding: 0; }

/* ── карточки, сетки, таблицы ───────────────────────────────────────── */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card + .card { margin-top: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-side { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); padding: 10px 12px; border-bottom: 1px solid var(--line); }
.table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: rgba(255, 255, 255, .015); }
.table-wrap { overflow-x: auto; }
.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 700;
  background: var(--panel3); color: var(--muted); white-space: nowrap; }
.badge-accent { background: var(--accent-soft); color: #d4b0ff; }
.badge-ok { background: rgba(46, 229, 157, .12); color: var(--ok); }
.badge-warn { background: rgba(255, 181, 71, .12); color: var(--warn); }
.badge-danger { background: rgba(255, 77, 109, .14); color: #ff8aa0; }
.badge-live { background: var(--onair); color: #fff; }
.swatch { display: inline-block; width: 16px; height: 16px; border-radius: 5px; vertical-align: -3px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2); }
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty svg { width: 42px; height: 42px; opacity: .4; margin-bottom: 8px; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 8px 16px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }

/* ── табы ───────────────────────────────────────────────────────────── */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 22px; overflow-x: auto; scrollbar-width: none; }
.tabs a { padding: 11px 16px; color: var(--muted); font-weight: 700; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.on { color: #fff; border-bottom-color: var(--accent); }
.tabs .count { font-size: 12px; color: var(--dim); margin-left: 4px; }

/* ── формы ──────────────────────────────────────────────────────────── */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.field { display: flex; flex-direction: column; gap: 7px; grid-column: 1 / -1; }
.field.half { grid-column: auto; }
.field label, .lbl { font-size: 13px; font-weight: 700; color: var(--muted); }
.field .help { font-size: 12px; color: var(--dim); }
.req { color: var(--accent); }
input[type=text], input[type=password], input[type=number], input[type=date], input[type=datetime-local], input[type=search],
input[type=url], select, textarea, .input {
  width: 100%; height: 42px; padding: 0 13px; border-radius: 10px; border: 1px solid var(--line2); background: var(--bg2); color: var(--text);
  font: inherit; font-weight: 600; transition: border-color .15s, box-shadow .15s; }
textarea { height: auto; min-height: 96px; padding: 11px 13px; resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(180, 107, 255, .2); }
input::placeholder, textarea::placeholder { color: var(--dim); }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 18px, calc(100% - 13px) 18px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
input[type=color] { width: 54px; height: 42px; padding: 3px; border-radius: 10px; border: 1px solid var(--line2); background: var(--bg2); cursor: pointer; }
.color-row { display: flex; gap: 10px; align-items: center; }
.color-row input[type=text] { font-family: ui-monospace, monospace; text-transform: lowercase; }
.check { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.img-field { display: flex; align-items: center; gap: 14px; }
.img-prev { width: 72px; height: 72px; border-radius: 12px; background: var(--bg2) center/contain no-repeat; border: 1px solid var(--line); flex: none; display: grid; place-items: center; overflow: hidden; }
.img-prev.light { background-color: #fff; }
.img-prev img { max-width: 100%; max-height: 100%; }
.img-field .stack { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
input[type=file] { font: inherit; font-size: 13px; color: var(--muted); }
input[type=file]::file-selector-button { font: inherit; font-weight: 700; margin-right: 10px; height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line2); background: var(--panel2); color: var(--text); cursor: pointer; }
.form-actions { display: flex; gap: 10px; align-items: center; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.form-actions .spacer { flex: 1; }

/* ── флэши ──────────────────────────────────────────────────────────── */
.flashes { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.flash { padding: 12px 16px; border-radius: 12px; border: 1px solid var(--line2); background: var(--panel); font-weight: 600; display: flex; gap: 10px; align-items: center; }
.flash-success { border-color: rgba(46, 229, 157, .35); background: rgba(46, 229, 157, .08); }
.flash-error { border-color: rgba(255, 77, 109, .4); background: rgba(255, 77, 109, .08); }
.flash-info { border-color: rgba(180, 107, 255, .35); background: var(--accent-soft); }

/* ── дашборд / мероприятия ──────────────────────────────────────────── */
.hero { position: relative; overflow: hidden; border-radius: 20px; padding: 28px 30px; border: 1px solid var(--line);
  background: radial-gradient(600px 240px at 0% 0%, rgba(180, 107, 255, .25), transparent 70%), radial-gradient(500px 240px at 100% 100%, rgba(91, 140, 255, .16), transparent 70%), var(--panel); margin-bottom: 22px; }
.hero h1 { font-size: 30px; }
.hero p { color: var(--muted); margin: 8px 0 0; max-width: 720px; }
.ev-card { display: flex; flex-direction: column; gap: 14px; position: relative; overflow: hidden; }
.ev-card::before { content: ''; position: absolute; left: 0; top: 0; right: 0; height: 4px; background: linear-gradient(90deg, var(--c1, var(--accent)), var(--c2, #5b8cff)); }
.ev-head { display: flex; gap: 14px; align-items: center; }
.ev-logo { width: 56px; height: 56px; border-radius: 14px; background: linear-gradient(135deg, var(--c1, var(--accent)), var(--c2, #5b8cff)); display: grid; place-items: center; flex: none; overflow: hidden; padding: 6px; }
.ev-logo img { max-height: 100%; }
.ev-head h2 { font-size: 17px; }
.ev-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.hall-row { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--bg2); border: 1px solid var(--line); flex-wrap: wrap; }
.hall-row .name { flex: 1; min-width: 140px; }
.hall-row .name b { display: block; }
.hall-row .name small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hall-list { display: flex; flex-direction: column; gap: 8px; }

/* спикеры */
.sp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.sp-card { display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); color: var(--text); transition: border-color .15s, transform .15s; }
.sp-card:hover { border-color: rgba(180, 107, 255, .45); text-decoration: none; transform: translateY(-1px); }
.sp-photo { width: 62px; height: 62px; border-radius: 50%; flex: none; overflow: hidden; background: var(--panel3); display: grid; place-items: center; font-weight: 800; color: var(--accent); }
.sp-photo img { width: 100%; height: 100%; object-fit: cover; }
.sp-card .txt { min-width: 0; flex: 1; }
.sp-card b { display: block; }
.sp-card small { display: block; line-height: 1.35; margin-top: 2px; }
.sp-card .co { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.co-logo { height: 26px; padding: 3px 8px; background: #fff; border-radius: 6px; }
.co-logo img { height: 100%; display: block; }

/* программа */
.day { margin-bottom: 26px; }
.day-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.day-head h2 { font-family: var(--font-d); font-weight: 600; font-size: 18px; }
.sess { display: grid; grid-template-columns: 110px 1fr auto; gap: 16px; align-items: center; padding: 14px 16px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); margin-bottom: 8px; }
.sess:hover { border-color: var(--line2); }
.sess .t { font-weight: 800; font-size: 17px; font-variant-numeric: tabular-nums; }
.sess .t small { display: block; font-weight: 600; font-size: 13px; }
.sess .ti b { display: block; font-size: 15px; }
.sess .ppl { display: flex; align-items: center; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.av-stack { display: flex; padding-left: 8px; }
.av-stack span { width: 28px; height: 28px; border-radius: 50%; margin-left: -8px; box-shadow: 0 0 0 2px var(--panel); overflow: hidden; background: var(--panel3); display: block; }
.av-stack img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sess.k-break { background: transparent; border-style: dashed; }

/* люди в сессии (форма) */
.people { display: flex; flex-direction: column; gap: 8px; }
.person { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--bg2); border: 1px solid var(--line); flex-wrap: wrap; }
.person .sp-photo { width: 42px; height: 42px; }
.person .txt { flex: 1; min-width: 160px; }
.person select { width: 190px; height: 34px; }
.person form { display: inline-flex; gap: 6px; }
.add-person { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.add-person select:first-child { flex: 1; min-width: 200px; }
.add-person select { width: auto; }

/* партнёры */
.spn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.spn { padding: 14px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); color: var(--text); display: flex; flex-direction: column; gap: 10px; }
.spn:hover { border-color: rgba(180, 107, 255, .45); text-decoration: none; }
.spn .logo { height: 90px; background: #fff; border-radius: 10px; display: grid; place-items: center; padding: 14px; }
.spn .logo img { max-height: 62px; }

/* ── вход ───────────────────────────────────────────────────────────── */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(800px 400px at 15% 10%, rgba(180, 107, 255, .22), transparent 70%), radial-gradient(700px 400px at 90% 90%, rgba(91, 140, 255, .16), transparent 70%), var(--bg); }
.auth-box { width: 100%; max-width: 400px; }
.auth-box .card { padding: 30px; box-shadow: var(--shadow); }
.auth-box .brand { justify-content: center; padding-bottom: 26px; }
.auth-box h1 { font-size: 22px; text-align: center; margin-bottom: 4px; }
.auth-box p.muted { text-align: center; margin: 0 0 22px; }
.stack-16 { display: flex; flex-direction: column; gap: 16px; }

/* тосты */
#toasts { position: fixed; right: 18px; bottom: 18px; z-index: 100; display: flex; flex-direction: column; gap: 8px; }
.toast { padding: 11px 16px; border-radius: 12px; background: var(--panel2); border: 1px solid var(--line2); font-weight: 700; box-shadow: var(--shadow); transition: opacity .4s, transform .4s; max-width: 360px; }
.toast-error { border-color: rgba(255, 77, 109, .5); background: #2a1220; }
.toast-ok { border-color: rgba(46, 229, 157, .4); }
.toast.hide { opacity: 0; transform: translateY(8px); }

[data-copy] { cursor: copy; }

/* ── мобильная раскладка ────────────────────────────────────────────── */
@media (max-width: 960px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 50; left: 0; top: 0; width: 260px; transform: translateX(-100%); transition: transform .25s ease; box-shadow: var(--shadow); }
  body.nav-open .side { transform: none; }
  .topbar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--bg2); position: sticky; top: 0; z-index: 40; }
  .topbar .brand { padding: 0; }
  .main { padding: 20px 16px 50px; }
  .grid-2, .grid-3, .grid-side, .form-grid { grid-template-columns: 1fr; }
  .field.half { grid-column: 1 / -1; }
  .sess { grid-template-columns: 70px 1fr; }
  .sess .acts { grid-column: 1 / -1; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 8px; }
  h1 { font-size: 22px; }
}
