/* Кабинет организатора Davra */
body { background: var(--paper); }
.owrap { max-width: 1280px; margin: 0 auto; padding: 0 28px; }
main.owrap { padding-top: 28px; padding-bottom: 56px; }

.onav { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--paper) 88%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.onav-in { display: flex; align-items: center; gap: 16px; height: 62px; }
.onav-sep { width: 1px; height: 22px; background: var(--line-2); }
.onav-title { font-size: 14px; color: var(--muted); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.onav-r { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 22px; min-width: 0; }
.card-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.card-h h2 { font-size: 17px; letter-spacing: -0.015em; display: flex; align-items: center; gap: 8px; }
.card-h p { font-size: 13px; margin-top: 4px; }
.ai-mark { font: 600 10px/1 var(--mono); letter-spacing: .06em; padding: 4px 5px; border-radius: 5px; background: var(--accent); color: var(--accent-ink); }

/* Шапка мероприятия */
.created { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 22px; border-color: var(--pos); background: var(--pos-soft); flex-wrap: wrap; }
.created b { font-size: 16px; }
.created p { font-size: 13.5px; margin-top: 2px; max-width: 70ch; }
.dhead { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 24px; }
.dhead h1 { font-size: clamp(28px, 3vw, 40px); letter-spacing: -0.035em; margin: 12px 0 6px; }
.dh-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag .live { width: 6px; height: 6px; border-radius: 50%; background: currentColor; margin-right: 6px; }
.dh-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Показатели */
.kpis-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: 18px; margin-bottom: 16px; overflow: hidden; }
.kpi { padding: 20px 20px 18px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.kpi + .kpi { border-left: 1px solid var(--line); }
.kpi-l { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.kpi b { font-size: 34px; font-weight: 500; letter-spacing: -0.045em; line-height: 1; }
.kpi b small { font-size: 15px; color: var(--muted); letter-spacing: 0; margin-left: 2px; }
.kpi-s { font-size: 12px; color: var(--faint); line-height: 1.35; }
.kpi.accent b { color: var(--accent); }

.dgrid { display: grid; gap: 16px; margin-bottom: 16px; }
.g-21 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.g-11 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-111 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Спрос и предложение */
.legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.seek { background: #2443d6; }
.offer { background: #d9772b; }
.sd-list { display: grid; gap: 4px; }
.sd-item { display: grid; grid-template-columns: minmax(0, 210px) minmax(0, 1fr); gap: 16px; align-items: center; padding: 7px 8px; margin: 0 -8px; border-radius: 8px; }
.sd-item:hover, .sd-item:focus-visible { background: var(--surface-2); }
.sd-name { font-size: 13.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sd-pair { display: grid; gap: 2px; }
.sd-b { display: flex; align-items: center; gap: 8px; }
.sd-b i { display: block; height: 11px; border-radius: 0 4px 4px 0; min-width: 2px; width: calc((100% - 34px) * var(--f)); flex: none; transition: width .5s var(--ease); }
.sd-b b { font-size: 11.5px; font-weight: 500; color: var(--muted); }

.ai-card { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.ai-card .muted { color: color-mix(in srgb, var(--paper) 65%, transparent); }
.ai-card .ai-mark { background: var(--paper); color: var(--ink); }
.ai-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 0; counter-reset: ai; }
.ai-list li { counter-increment: ai; position: relative; padding: 14px 0 14px 34px; font-size: 14px; line-height: 1.5; color: color-mix(in srgb, var(--paper) 82%, transparent); }
.ai-list li + li { border-top: 1px solid rgba(255, 255, 255, .1); }
.ai-list li::before { content: counter(ai, decimal-leading-zero); position: absolute; left: 0; top: 15px; font: 500 11px/1.4 var(--mono); color: #8ea0ff; }
.ai-list b { color: #fff; font-weight: 600; }

/* Столбики */
.vbars { display: flex; align-items: stretch; gap: 2px; height: 180px; }
.vb { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; border-radius: 6px; outline-offset: 2px; }
.vb-col { flex: 1; display: flex; align-items: flex-end; padding: 0 2px; border-bottom: 1px solid var(--line-2); }
.vb-col i { display: block; width: 100%; background: #2443d6; border-radius: 4px 4px 0 0; transition: height .5s var(--ease), background .15s; }
.vb:hover .vb-col i, .vb:focus-visible .vb-col i { background: #1b36b4; }
.vb-l { font-size: 10.5px; color: var(--faint); text-align: center; white-space: nowrap; overflow: hidden; }
.hbars { display: grid; gap: 10px; }
.hb { display: grid; grid-template-columns: minmax(0, 132px) minmax(0, 1fr) 28px; gap: 12px; align-items: center; font-size: 13.5px; border-radius: 6px; }
.hb-l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); }
.hb-track { height: 10px; }
.hb-track i { display: block; height: 100%; background: #2443d6; border-radius: 0 4px 4px 0; min-width: 2px; }
.hb b { font-size: 12.5px; font-weight: 500; text-align: right; color: var(--ink-2); }
.top-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); }
.top-list li { min-width: 0; }
.top-list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.top-list li + li { border-top: 1px solid var(--line); }
.rank { font-size: 11.5px; color: var(--faint); width: 14px; }
.tl-who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tl-who b { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-who span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-n { font-size: 14px; font-weight: 500; }

/* Итоги и регистрация */
.summary { margin: 0 0 16px; padding: 16px 18px; border-left: 2px solid var(--accent); background: var(--surface-2); border-radius: 0 12px 12px 0; font-size: 14.5px; line-height: 1.65; color: var(--ink-2); }
.share-in { display: flex; gap: 20px; align-items: center; }
.qr { width: 172px; height: 172px; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: #fff; flex: none; display: grid; place-items: center; }
.qr img, .qr canvas { width: 152px !important; height: 152px !important; }
.share-r { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.link { display: block; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); font-size: 12.5px; overflow-wrap: anywhere; color: var(--ink-2); }
.share-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.bc { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.bc h3 { font-size: 15px; }
.bc p { font-size: 13px; }
.bc textarea { width: 100%; padding: 11px 13px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); font-size: 14.5px; resize: vertical; min-height: 76px; }
.bc textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.bc textarea:disabled { background: var(--surface-2); }
.bc-demo { color: var(--warn) !important; }

/* Таблица участников */
.table-card { padding: 22px 0 6px; }
.table-card .card-h { padding: 0 22px; align-items: center; }
.osearch { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 10px; min-width: min(320px, 100%); }
.osearch svg { width: 16px; color: var(--faint); flex: none; }
.osearch input { border: 0; background: none; outline: none; flex: 1; min-width: 0; font-size: 14px; }
.osearch:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.table-wrap { overflow-x: auto; }
.ptable { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 860px; }
.ptable th { text-align: left; font: 500 11px/1.2 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.ptable td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; color: var(--ink-2); }
.ptable tr:last-child td { border-bottom: 0; }
.ptable tbody tr:hover td { background: var(--surface-2); }
.ptable th:first-child, .ptable td:first-child { padding-left: 22px; }
.ptable .r { text-align: right; }
.pcell { display: flex; align-items: center; gap: 10px; min-width: 220px; }
.pcell b { display: block; font-weight: 600; color: var(--ink); }
.pcell small { display: block; color: var(--muted); font-size: 12px; }
.empty-t { padding: 24px 22px; }
.updated { font-size: 11.5px; text-align: right; margin-top: 12px; }

/* Создание мероприятия */
.new-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 520px); gap: 64px; align-items: start; padding: 32px 0 56px; }
.new-intro h1 { font-size: clamp(34px, 4vw, 54px); letter-spacing: -0.04em; line-height: 1.02; margin: 16px 0 18px; max-width: 13ch; }
.new-intro .lead { font-size: 17px; line-height: 1.55; color: var(--muted); max-width: 40ch; }
.new-steps { list-style: none; margin: 36px 0 0; padding: 0; border-top: 1px solid var(--line); }
.new-steps li { display: flex; gap: 16px; padding: 15px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.new-steps .mono { color: var(--accent); font-size: 12px; padding-top: 3px; }
.new-form { display: flex; flex-direction: column; gap: 16px; padding: 28px; box-shadow: var(--shadow); }
.ofield { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.ofield > span { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.ofield input { height: 46px; padding: 0 13px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); font-size: 15.5px; width: 100%; min-width: 0; -webkit-appearance: none; appearance: none; }
.ofield input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ofield-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ocheck { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); cursor: pointer; }
.ocheck input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--ink); flex: none; }
.ocheck span { display: flex; flex-direction: column; gap: 2px; }
.ocheck b { font-weight: 600; font-size: 14.5px; }
.ocheck small { font-size: 12.5px; color: var(--muted); }
.form-err { color: var(--neg); font-size: 13.5px; }
.mine { padding: 8px 0; }
.sec-row h2 { font-size: 22px; }
.sec-row p { font-size: 13.5px; margin-top: 4px; }
.mine-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.mine-card { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; text-decoration: none; transition: border-color .15s, box-shadow .2s; }
.mine-card:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.mine-card b { font: 600 17px/1.25 var(--display); letter-spacing: -0.015em; }
.mine-card .muted { font-size: 13.5px; }

.ostate { min-height: 60vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; }
.ostate h2 { font-size: 24px; }
.ostate p { max-width: 46ch; }
.ospin { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--ink); animation: ospin .8s linear infinite; }
@keyframes ospin { to { transform: rotate(360deg); } }

.tip { position: fixed; z-index: 80; pointer-events: none; padding: 7px 10px; border-radius: 8px; background: var(--ink); color: var(--paper); font: 500 12.5px/1.3 var(--font); white-space: nowrap; box-shadow: 0 8px 20px -8px rgba(0, 0, 0, .4); }
.tip[hidden] { display: none; }
.otoast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 10px); opacity: 0; pointer-events: none; padding: 11px 16px; border-radius: 12px; background: var(--ink); color: var(--paper); font-size: 14px; font-weight: 500; transition: opacity .2s, transform .25s var(--ease); z-index: 90; }
.otoast.show { opacity: 1; transform: translate(-50%, 0); }

/* Планшет */
@media (max-width: 1100px) {
  .kpis-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kpi:nth-child(4) { border-left: 0; }
  .kpi:nth-child(n+4) { border-top: 1px solid var(--line); }
  .g-21 { grid-template-columns: minmax(0, 1fr); }
  .g-111 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-111 > :last-child { grid-column: 1 / -1; }
  .new-grid { grid-template-columns: 1fr; gap: 36px; }
  .new-intro h1 { max-width: 18ch; }
  .mine-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) { .g-11 { grid-template-columns: minmax(0, 1fr); } }

/* Телефон */
@media (max-width: 640px) {
  .owrap { padding: 0 16px; }
  main.owrap { padding-top: 20px; }
  .onav-in { gap: 10px; height: 56px; }
  .onav-sep, .onav-title { display: none; }
  #nav-new { display: none; }
  .kpis-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi:nth-child(n) { border-left: 0; border-top: 1px solid var(--line); }
  .kpi:nth-child(-n+2) { border-top: 0; }
  .kpi:nth-child(2n) { border-left: 1px solid var(--line); }
  .kpi { padding: 16px; }
  .kpi b { font-size: 28px; }
  .g-111 { grid-template-columns: minmax(0, 1fr); }
  .card { padding: 18px; border-radius: 16px; }
  .sd-item { grid-template-columns: 1fr; gap: 6px; }
  .vbars { height: 150px; }
  .vb-l { font-size: 9px; }
  .hb { grid-template-columns: minmax(0, 110px) minmax(0, 1fr) 24px; }
  .share-in { flex-direction: column; align-items: flex-start; }
  .dh-actions { width: 100%; }
  .dh-actions .btn { flex: 1; }
  .table-card { padding-top: 18px; }
  .table-card .card-h { padding: 0 18px; }
  .ptable th:first-child, .ptable td:first-child { padding-left: 18px; }
  .ofield-row { grid-template-columns: 1fr; }
  .new-form { padding: 20px; }
  .mine-grid { grid-template-columns: 1fr; }
}
