/* Кабинет продвижения — бело-синяя палитра, как у основного приложения. */
.studio {
  --bg: #F5F8FC; --card: #FFFFFF; --text: #0F172A; --hint: #64748B; --border: #E2E8F0;
  --blue: #2563EB; --blue-d: #1D4ED8; --blue-l: #EEF4FF; --ring: #93C5FD;
  --ok: #15803D; --ok-bg: #EEFBF1; --warn: #B45309; --warn-bg: #FEF6E7; --bad: #DC2626; --bad-bg: #FEF0EF;
  --shadow: 0 1px 2px rgba(15,23,42,.05), 0 1px 1px rgba(15,23,42,.03);
  --r: 14px;
}
.studio, .studio * { box-sizing: border-box; }
.studio { -webkit-text-size-adjust: 100%; }
.studio { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent; }
.studio :focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.studio a { color: var(--blue); }
.studio .wrap { max-width: 1120px; margin: 0 auto; padding: 16px 16px 48px; }

/* шапка + вкладки соцсетей */
.studio .top { position: sticky; top: 0; z-index: 10; background: var(--card); border-bottom: 1px solid var(--border); }
.studio .top-in { max-width: 1120px; margin: 0 auto; padding: 0 16px; display: flex; align-items: center; gap: 12px; }
.studio .brand { text-decoration: none; font-weight: 600; white-space: nowrap; padding: 14px 0; color: var(--hint); }
.studio .nets { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; flex: 1; }
.studio .nets::-webkit-scrollbar { display: none; }
.studio .net { border: 0; background: none; font: inherit; padding: 14px 12px; min-height: 48px; color: var(--hint); cursor: pointer;
  border-bottom: 3px solid transparent; white-space: nowrap; transition: color .15s, border-color .15s; }
.studio .net:hover { color: var(--text); }
.studio .net[aria-selected="true"] { color: var(--blue); border-bottom-color: var(--blue); font-weight: 600; }
.studio .net .soon { font-size: 11px; color: var(--hint); margin-left: 4px; font-weight: 400; }

.studio h1 { font-size: 22px; margin: 8px 0 4px; }
.studio h2 { font-size: 16px; margin: 0 0 10px; }
.studio .sub { color: var(--hint); margin: 0 0 16px; }
.studio .muted { color: var(--hint); }
.studio .loading, .studio .empty { color: var(--hint); padding: 32px 0; text-align: center; }

/* кнопки */
.studio .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--card); color: var(--text); font: inherit; cursor: pointer; text-decoration: none;
  transition: background .15s, border-color .15s; }
.studio .btn:hover { background: var(--blue-l); border-color: var(--ring); }
.studio .btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.studio .btn.primary:hover { background: var(--blue-d); }
.studio .btn:disabled { opacity: .5; cursor: default; }

/* сетка карточек аккаунтов */
.studio .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.studio .acc { background: var(--card); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px;
  display: flex; flex-direction: column; gap: 10px; text-align: left; font: inherit; color: inherit; cursor: pointer;
  transition: box-shadow .2s, border-color .2s, transform .2s; }
.studio .acc:hover { border-color: var(--ring); box-shadow: 0 6px 18px rgba(37,99,235,.12); transform: translateY(-1px); }
.studio .acc-head { display: flex; gap: 12px; align-items: center; }
.studio .ava { width: 56px; height: 56px; border-radius: 50%; flex: none; background: var(--blue-l); color: var(--blue); font-weight: 700; font-size: 20px;
  display: flex; align-items: center; justify-content: center; overflow: hidden; }
.studio .ava { position: relative; }
.studio .ava img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.studio .ava.lg { width: 84px; height: 84px; font-size: 30px; }
.studio .acc-name { font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.studio .acc-nick { color: var(--hint); font-size: 13px; }
.studio .bio { font-size: 14px; color: #334155; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; min-height: 21px; }
.studio .bio.empty-bio { color: var(--hint); font-style: italic; }
.studio .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.studio .chip { font-size: 12px; padding: 3px 9px; border-radius: 999px; background: var(--blue-l); color: var(--blue-d); white-space: nowrap; }
.studio .chip.ok { background: var(--ok-bg); color: var(--ok); } .studio .chip.warn { background: var(--warn-bg); color: var(--warn); } .studio .chip.bad { background: var(--bad-bg); color: var(--bad); }
.studio .acc-foot { display: flex; justify-content: space-between; color: var(--hint); font-size: 13px; border-top: 1px solid var(--border); padding-top: 10px; margin-top: auto; }
.studio .acc-foot b { color: var(--text); }

/* кабинет */
.studio .crumb { display: inline-block; margin: 4px 0 12px; text-decoration: none; }
.studio .head { display: flex; gap: 16px; align-items: center; margin-bottom: 8px; }
.studio .head .bio { -webkit-line-clamp: 4; max-width: 640px; }
.studio .head-actions { margin-left: auto; display: flex; gap: 8px; }
.studio .tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--border); margin: 12px 0 16px; scrollbar-width: none; }
.studio .tabs::-webkit-scrollbar { display: none; }
.studio .tab { border: 0; background: none; font: inherit; padding: 10px 14px; min-height: 44px; cursor: pointer; color: var(--hint); border-bottom: 3px solid transparent; white-space: nowrap; }
.studio .tab[aria-selected="true"] { color: var(--blue); border-bottom-color: var(--blue); font-weight: 600; }
.studio .tab.off { opacity: .55; cursor: default; }

.studio .card { background: var(--card); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px; margin-bottom: 14px; }
.studio .kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 14px; }
.studio .kpi { background: var(--card); border: 1px solid var(--border); border-radius: var(--r); padding: 14px; box-shadow: var(--shadow); }
.studio .kpi .v { font-size: 26px; font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; }
.studio .kpi .l { color: var(--hint); font-size: 13px; }
.studio .two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 800px) { .studio .two { grid-template-columns: 1fr; } .studio .head { flex-wrap: wrap; } .studio .head-actions { margin-left: 0; width: 100%; } }

.studio .notice { border-radius: var(--r); padding: 14px 16px; margin-bottom: 14px; background: var(--warn-bg); color: #7C2D12; border: 1px solid #FCD9A6; }
.studio .notice b { display: block; margin-bottom: 4px; }
.studio .notice ol { margin: 6px 0 0 18px; padding: 0; }
.studio .tips { margin: 0; padding-left: 20px; } .studio .tips li { margin: 6px 0; }

/* график просмотров */
.studio .bars { display: flex; align-items: flex-end; gap: 4px; height: 150px; padding-top: 8px; }
.studio .bar { flex: 1; min-width: 6px; background: var(--blue); border-radius: 4px 4px 0 0; position: relative; min-height: 2px; opacity: .85; transition: opacity .15s; }
.studio .bar:hover, .studio .bar:focus { opacity: 1; outline: none; }
.studio .bar[data-tip]:hover::after, .studio .bar[data-tip]:focus::after { content: attr(data-tip); position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%);
  background: var(--text); color: #fff; font-size: 12px; padding: 3px 7px; border-radius: 6px; white-space: nowrap; margin-bottom: 4px; z-index: 3; }
.studio .axis { display: flex; justify-content: space-between; color: var(--hint); font-size: 12px; margin-top: 4px; }

/* тепловая карта */
.studio .heat { display: grid; grid-template-columns: 28px repeat(24, 1fr); gap: 2px; font-size: 10px; color: var(--hint); }
.studio .heat .c { aspect-ratio: 1; border-radius: 3px; background: #F1F5F9; min-height: 10px; }
.studio .heat .hl { display: flex; align-items: center; justify-content: center; }
.studio .heat-wrap { overflow-x: auto; } .studio .heat { min-width: 520px; }
.studio .legend { display: flex; align-items: center; gap: 6px; color: var(--hint); font-size: 12px; margin-top: 8px; }
.studio .legend i { display: inline-block; width: 14px; height: 10px; border-radius: 2px; }

/* горизонтальные полосы */
.studio .hb { display: grid; grid-template-columns: 110px 1fr 70px; gap: 8px; align-items: center; margin: 7px 0; font-size: 14px; }
.studio .hb .t { height: 10px; background: #EEF2F7; border-radius: 5px; overflow: hidden; }
.studio .hb .t i { display: block; height: 100%; background: var(--blue); border-radius: 5px; }
.studio .hb .n { text-align: right; font-variant-numeric: tabular-nums; }
.studio .lift.up { color: var(--ok); } .studio .lift.down { color: var(--bad); }

/* таблица постов */
.studio .tools { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; align-items: center; }
.studio select, .studio input[type=search] { font: inherit; min-height: 40px; border: 1px solid var(--border); border-radius: 10px; padding: 0 10px; background: var(--card); color: var(--text); }
.studio .tbl-wrap { overflow-x: auto; }
.studio table { width: 100%; border-collapse: collapse; font-size: 14px; }
.studio th, .studio td { text-align: right; padding: 10px 8px; border-bottom: 1px solid var(--border); font-variant-numeric: tabular-nums; white-space: nowrap; }
.studio th:first-child, .studio td:first-child { text-align: left; white-space: normal; min-width: 220px; max-width: 420px; }
.studio th { color: var(--hint); font-weight: 500; font-size: 13px; cursor: pointer; user-select: none; position: sticky; top: 0; background: var(--card); }
.studio th[aria-sort] { color: var(--blue); }
.studio td a { text-decoration: none; }
.studio .ptxt { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.studio .pdate { color: var(--hint); font-size: 12px; }
.studio .mini-btn { font-size: 12px; }
@media (max-width: 600px) { .studio .hb { grid-template-columns: 90px 1fr 60px; } }

.studio .toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--text); color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 30; max-width: 90vw; }
@media (prefers-reduced-motion: reduce) { .studio, .studio * { transition: none !important; } }

/* комментарии */
.studio .comment { padding: 14px 16px; }
.studio .cm-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; margin-bottom: 4px; }
.studio .cm-head > a:first-child { font-weight: 600; text-decoration: none; }
.studio .cm-text { white-space: pre-wrap; overflow-wrap: anywhere; margin: 4px 0 6px; }
.studio .cm-our { background: var(--ok-bg); color: var(--ok); border-radius: 10px; padding: 8px 10px; margin: 6px 0; font-size: 14px; }
.studio .comment .tools { margin: 10px 0 0; }
.studio .reply-form { margin-top: 10px; }
.studio .reply-form[hidden] { display: none; }
.studio .reply-form textarea { width: 100%; font: inherit; border: 1px solid var(--border); border-radius: 10px; padding: 10px; resize: vertical; margin: 8px 0 0; }
.studio .chip.tpl { border: 0; cursor: pointer; font: inherit; font-size: 12px; min-height: 30px; }
.studio .chip.tpl:hover { background: #DCE8FF; }

/* автоответы */
.studio .notice.info { background: var(--blue-l); border-color: #C7DBFF; color: #1E3A8A; }
.studio .fld { display: flex; flex-direction: column; gap: 4px; margin: 10px 0; }
.studio .fld .fl { font-size: 13px; color: var(--hint); }
.studio .fld .fh { font-size: 12px; }
.studio .fld input, .studio .fld select, .studio .fld textarea, .studio .draft textarea { font: inherit; width: 100%; border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; background: var(--card); color: var(--text); min-height: 40px; }
.studio .fld textarea, .studio .draft textarea { resize: vertical; }
.studio .draft textarea { margin: 6px 0; }
.studio .fgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0 12px; }
.studio .chk { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; cursor: pointer; }
.studio .chk input { width: 20px; height: 20px; }
.studio .rule { border: 1px solid var(--border); border-radius: 12px; padding: 12px; margin-bottom: 12px; }
.studio .rule .tools { margin-bottom: 0; }
.studio .draft { border-top: 1px solid var(--border); padding: 12px 0; }
.studio .logrow { border-top: 1px solid var(--border); padding: 10px 0; font-size: 14px; display: grid; gap: 2px; }
.studio .logrow .chip { justify-self: start; }

.studio .draft-tag { background: var(--blue-l); color: #1E3A8A; border-radius: 10px; padding: 8px 10px; margin: 8px 0; font-size: 13px; }

.studio .chip.gray { background: #F1F5F9; color: #475569; }
.studio .notice.info { background: var(--blue-l); border-color: #C7DBFF; color: #1E3A8A; }
