/* Starikov Journal — панель владельца, редакторы, статистика */
.topbar{position:sticky;top:0;z-index:20;border-bottom:1px solid var(--line);background:rgba(8,8,12,.72);backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px)}
.topbar .wrap{height:64px;display:flex;align-items:center;gap:22px}
.topbar .brand .logo{width:120px;height:30px}
.topbar .k.mode{color:var(--ac)}
.topbar nav{display:flex;gap:2px;margin-left:8px}
.topbar nav a{padding:8px 14px;border-radius:999px;font-size:13px;font-weight:600;color:var(--mute)}
.topbar nav a:hover{color:var(--ink);background:rgba(255,255,255,.05)}
.topbar nav a.on{color:var(--ink);background:rgba(255,255,255,.07)}
.topbar form{margin-left:auto}
.page{padding-top:40px;padding-bottom:80px;display:grid;gap:28px}
#editor,#dashboard{display:grid;gap:22px}
.page-head{display:flex;justify-content:space-between;align-items:flex-end;gap:24px;flex-wrap:wrap}
.page-head h1{font-size:clamp(28px,3.4vw,40px)}
.page-head .sub{color:var(--mute);margin-top:8px;font-size:14.5px}
.actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.crumb{font-family:var(--fm);font-size:12px;letter-spacing:.06em;color:var(--mute);display:inline-flex;gap:8px;align-items:center}
.crumb:hover{color:var(--ink)}
#status,#save-status{font-size:14px;color:var(--mute);min-height:1.5em;display:flex;align-items:center;gap:10px}
#status:empty,#save-status:empty{display:none}
#status::before,#save-status::before{content:"";width:6px;height:6px;border-radius:50%;background:var(--ac);flex-shrink:0}
#save-status.error,#status.error{color:var(--err)}#save-status.error::before,#status.error::before{background:var(--err)}
/* Панель: список материалов */
.panel{padding:0;overflow:hidden}
.panel .ph{display:grid;grid-template-columns:110px 1fr 200px 260px;gap:20px;padding:14px 24px;border-bottom:1px solid var(--line)}
.entry-row{display:grid;grid-template-columns:110px 1fr 200px 260px;gap:20px;align-items:center;padding:18px 24px;border-bottom:1px solid var(--line);transition:background .2s}
.entry-row:last-child{border-bottom:0}
.entry-row:hover{background:rgba(255,255,255,.025)}
.entry-row h2{font-size:17px;font-weight:500;letter-spacing:-.015em;line-height:1.25;text-wrap:pretty}
.entry-row h2 a:hover{color:var(--ac)}
.entry-row .flags{display:flex;gap:8px;flex-wrap:wrap;margin-top:6px}
.entry-row .flags .k{font-size:10px;color:var(--warn)}
.entry-row .actions{justify-content:flex-end}
.badge{display:inline-flex;align-items:center;gap:8px;font-family:var(--fm);font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:var(--mute);padding:6px 10px;border:1px solid var(--line);border-radius:4px;white-space:nowrap}
.badge.poll{color:var(--ink);border-color:var(--line2)}
.state{display:inline-flex;align-items:center;gap:9px;font-size:13px;font-weight:600;color:var(--mute);white-space:nowrap}
.state::before{content:"";width:8px;height:8px;border-radius:50%;background:var(--dim);box-shadow:0 0 0 3px rgba(255,255,255,.04)}
.state.published::before{background:var(--ok)}.state.hidden::before{background:var(--warn)}.state.closed::before{background:var(--err)}
.state.published{color:var(--ink)}
.foot-note{font-size:13px;color:var(--dim);display:flex;gap:16px;flex-wrap:wrap}
/* Редактор */
.editor{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:28px;align-items:start}
.editor-side{position:sticky;top:88px;display:grid;gap:14px}
.editor-actions{padding:18px;display:grid;gap:8px}
.editor-actions button,.editor-actions a.btn{width:100%;justify-content:space-between;min-width:0;overflow:hidden;text-overflow:ellipsis}
.editor-actions .ar{font-size:11px;opacity:.6}
.editor-actions .k{padding:4px 4px 8px}
.editor-actions .line-sep{height:1px;background:var(--line);margin:6px 0}
#entry-status{display:inline-flex;align-items:center;gap:9px;font-size:13px;font-weight:600;color:var(--mute)}
#entry-status::before{content:"";width:8px;height:8px;border-radius:50%;background:var(--dim)}
#entry-status.published::before{background:var(--ok)}#entry-status.hidden::before{background:var(--warn)}
.editor-main{display:grid;gap:22px;min-width:0}
fieldset{border:0;padding:0;margin:0;min-width:0;display:grid;gap:22px}
fieldset:disabled .field{opacity:.6}
.field{padding:24px;display:grid;gap:18px}
.field h2{font-size:20px;display:flex;align-items:baseline;gap:14px}
.field h2 .k{font-weight:400}
.field .grid2{display:grid;grid-template-columns:1fr 1fr;gap:18px}
.field .help{font-size:13px;color:var(--dim);line-height:1.5}
#title{font-family:var(--fd);font-weight:500;font-size:22px;letter-spacing:-.02em;min-height:58px}
.file-label{display:grid;gap:8px}
.cover-preview,.option-preview{width:100%;max-height:280px;object-fit:contain;background:#000;border:1px solid var(--line);border-radius:var(--r)}
.cover-row{display:grid;grid-template-columns:1fr 320px;gap:18px;align-items:start}
.cover-row .cover-preview{max-height:200px}
.rich-toolbar{position:sticky;top:80px;z-index:5;display:flex;gap:4px;flex-wrap:wrap;padding:6px;border-radius:999px;border:1px solid var(--line);background:rgba(13,13,19,.85);backdrop-filter:blur(16px)}
.rich-toolbar button{min-height:36px;padding:0 13px;font-size:13px;border-color:transparent;background:transparent;color:var(--mute);font-weight:500}
.rich-toolbar button:hover:not(:disabled){background:rgba(255,255,255,.07);color:var(--ink);border-color:transparent}
.rich-toolbar button strong,.rich-toolbar button em{color:inherit}
.rich-toolbar .file-label{display:inline-flex;align-items:center;min-height:36px;padding:0 6px 0 13px;font-size:13px;font-weight:500;color:var(--mute);gap:0}
.rich-toolbar .file-label input{width:0;height:0;opacity:0;position:absolute}
.rich-toolbar .file-label span{cursor:pointer}.rich-toolbar .file-label:hover{color:var(--ink)}
.rich-editor{min-height:520px;padding:32px 36px;border:1px solid var(--line);border-radius:var(--r);background:rgba(0,0,0,.28);overflow-wrap:anywhere;font-size:17px;line-height:1.7;color:#D6D6DF}
.rich-editor:focus{outline:0;border-color:var(--ac)}
.rich-editor>*+*{margin-top:1em}
.rich-editor h2{font-size:26px;color:var(--ink);margin-top:1.6em}.rich-editor h3{color:var(--ink);font-size:20px}
.rich-editor b,.rich-editor strong{color:var(--ink)}
.rich-editor a{color:var(--ac);text-decoration:underline}
.rich-editor ul,.rich-editor ol{padding-left:26px}
.rich-editor img{max-width:100%;height:auto;border-radius:var(--r);border:1px solid var(--line)}
.rich-editor blockquote{border-left:2px solid var(--ac);padding-left:20px;color:var(--ink)}
.rich-editor:empty::before{content:"Начните писать…";color:var(--dim)}
/* Конструктор опроса */
.stages-head{display:flex;justify-content:space-between;align-items:center;gap:14px;flex-wrap:wrap}
.stages-head h2{font-size:20px;display:flex;gap:12px;align-items:baseline}
.stages-head .count{font-family:var(--fm);font-size:12px;color:var(--ac);letter-spacing:.06em}
#stages{display:grid;gap:14px}
#stages:empty{display:none}
.stage-editor{padding:0;overflow:hidden}
.stage-editor .toolbar{display:flex;align-items:center;gap:10px;padding:14px 16px 14px 20px;border-bottom:1px solid var(--line);background:rgba(255,255,255,.02)}
.stage-editor .toolbar h3{font-size:15px;display:flex;align-items:center;gap:14px;flex:1;min-width:0}
.stage-editor .toolbar h3 .n{font-family:var(--fm);font-size:12px;color:var(--ac);letter-spacing:.06em;flex-shrink:0}
.stage-editor .toolbar h3 .q{font-family:var(--fb);font-weight:500;font-size:14px;color:var(--mute);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;letter-spacing:0}
.stage-editor .toolbar .thumbs{display:none;gap:4px}
.stage-editor .toolbar .thumbs img{width:44px;height:32px;object-fit:cover;border-radius:3px;border:1px solid var(--line);background:#000}
.stage-editor .toolbar button{min-height:34px;padding:0 12px;font-size:12.5px}
.stage-editor .stage-body{padding:20px;display:grid;gap:18px}
.stage-editor .stage-body>label{display:grid}
.stage-editor .pair{display:grid;grid-template-columns:1fr 1fr;gap:18px}
.stage-editor.collapsed .stage-body{display:none}
.stage-editor.collapsed .toolbar{border-bottom:0}
.stage-editor.collapsed .toolbar .thumbs{display:flex}
.option-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}
.option-editor{display:grid;gap:14px;padding:16px;border:1px solid var(--line);border-radius:var(--r);background:rgba(0,0,0,.18)}
.option-editor h4{display:flex;align-items:center;gap:10px;color:var(--mute);font-family:var(--fm);font-weight:500;font-size:11px;letter-spacing:.14em;text-transform:uppercase}
.option-editor h4::before{content:"";width:6px;height:6px;background:var(--line2);border-radius:1px}
.option-editor .option-preview{max-height:220px;aspect-ratio:4/3}
.option-editor .option-preview[hidden]+label::before{content:"Картинка не добавлена";display:grid;place-items:center;aspect-ratio:4/3;border:1px dashed var(--line2);border-radius:var(--r);font-family:var(--fm);font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:var(--dim);margin-bottom:6px}
.option-editor .video-field .help{font-weight:400}
.option-editor.has-video h4::after{content:"видео";font-size:10px;color:var(--ac);border:1px solid var(--ac-soft);padding:2px 6px;border-radius:3px;margin-left:auto}
.option-editor .secret{border-top:1px dashed var(--line);padding-top:14px;display:grid;gap:12px}
.option-editor .secret>.k{color:var(--warn)}
/* Предпросмотр опроса для владельца */
.pv-stage{padding:24px;display:grid;gap:18px}
.pv-stage h2{font-size:20px;display:grid;grid-template-columns:auto 1fr;gap:14px;align-items:baseline}
.pv-stage h2 .n{font-family:var(--fm);font-size:12px;color:var(--ac);letter-spacing:.06em}
.pv-stage .choice{opacity:1;transform:none;animation:none;padding:0}
.pv-stage .choice-frame::before{display:none}.pv-stage .choice-frame img{position:static;opacity:1;aspect-ratio:4/3}
.pv-stage .choice .secret{display:flex;gap:10px;align-items:center;font-size:13px;color:var(--mute)}
.pv-stage .choice .secret .k{color:var(--warn)}
.pv-stage .choice-frame.none{display:grid;place-items:center;font-family:var(--fm);font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:var(--dim)}
/* Статистика */
.stat-bar{display:flex;gap:12px;align-items:center;flex-wrap:wrap}
.stat-bar label{display:flex;align-items:center;gap:12px;font-family:var(--fm);font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:var(--dim)}
.stat-bar select{width:auto;min-width:260px}
.kpis{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px}
.kpi{padding:20px 22px;display:grid;gap:10px}
.kpi dt{font-family:var(--fm);font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:var(--dim)}
.kpi dd{font-family:var(--fd);font-weight:700;font-size:38px;letter-spacing:-.04em;line-height:1}
.kpi.hi dd{color:var(--ac)}
.table-wrap{overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.18) transparent}
table{width:100%;border-collapse:collapse;font-size:14px}
th,td{padding:14px 16px;text-align:left;border-bottom:1px solid var(--line);vertical-align:middle}
thead th{font-family:var(--fm);font-weight:500;font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:var(--dim);border-bottom-color:var(--line2)}
tbody tr:last-child td,tbody tr:last-child th{border-bottom:0}
tbody th{font-weight:500}
td.num{font-family:var(--fm);font-size:13px;white-space:nowrap}
td.pct{white-space:nowrap;min-width:180px}
td.pct .v{display:flex;align-items:center;gap:12px}
td.pct progress{width:110px;height:4px}
td.pct b{font-family:var(--fm);font-weight:500;font-size:13px;min-width:44px;text-align:right}
.table-wrap.glass{padding:4px 8px}
.stage-stats{padding:24px;display:grid;gap:16px}
.stage-stats .sh{display:flex;justify-content:space-between;gap:20px;align-items:baseline;flex-wrap:wrap}
.stage-stats .sh h2{font-size:20px;display:flex;gap:14px;align-items:baseline}
.stage-stats .sh h2 .n{font-family:var(--fm);font-size:12px;color:var(--ac);letter-spacing:.06em}
.stage-stats .q{color:var(--mute);font-size:14.5px}
.opt{display:flex;align-items:center;gap:14px}
.thumbnail{width:96px;height:68px;object-fit:contain;background:#000;border:1px solid var(--line);border-radius:4px;flex-shrink:0}
.opt .lbl{font-weight:500}
.opt .lbl small{display:block;font-family:var(--fm);font-size:11px;color:var(--dim);letter-spacing:.08em;margin-top:4px}
.section-k{display:grid;gap:6px}
.section-k h2{font-size:22px}.section-k p{color:var(--mute);font-size:14px}
@media (max-width:1100px){.kpis{grid-template-columns:repeat(3,minmax(0,1fr))}.editor{grid-template-columns:1fr}.editor-side{position:static}.editor-actions{grid-template-columns:repeat(auto-fill,minmax(180px,1fr))}.editor-actions .k,.editor-actions .line-sep{grid-column:1/-1}.panel .ph{display:none}.entry-row{grid-template-columns:auto 1fr;gap:10px 18px;align-items:start}.entry-row .badge{margin-top:2px}.entry-row .state,.entry-row .actions{grid-column:2}.entry-row .actions{justify-content:flex-start}}
@media (max-width:860px){.cover-row{grid-template-columns:1fr}}
@media (max-width:720px){.topbar .wrap{height:auto;min-height:60px;flex-wrap:wrap;padding-top:10px;padding-bottom:10px}.topbar nav{order:3;width:100%;margin-left:0;overflow-x:auto}.topbar form{margin-left:auto}.page{padding-top:24px;padding-bottom:60px;gap:20px}.field{padding:18px}.field .grid2,.option-grid,.stage-editor .pair{grid-template-columns:1fr}.rich-editor{padding:18px;min-height:360px}.rich-toolbar{border-radius:14px}.kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.kpi dd{font-size:30px}.stage-editor .toolbar{flex-wrap:wrap}.stage-editor .toolbar h3{width:100%}.editor-actions{grid-template-columns:1fr}}
