@import url('https://fonts.googleapis.com/css2?family=Geist:wght@400..800&display=swap');

:root {
  font-family: 'Geist', 'Segoe UI', sans-serif;
  color: #f1f2ee;
  background: var(--bg);
  font-synthesis: none;
  color-scheme: dark;
  --bg: #111311;
  --sidebar: #161816;
  --surface: #1b1d1b;
  --surface-raised: #242724;
  --surface-hover: #2d312c;
  --line: #343833;
  --line-soft: #292c28;
  --muted: #b4b8ae;
  --dim: #989d93;
  --lime: #bde58a;
  --lime-soft: #283223;
  --amber: #f4c17c;
  --red: #ffa199;
  --radius: 12px;
  --mono: 'Geist', 'Segoe UI', sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 320px; min-height: 100vh; font-size: 1rem; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, .button { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
button:disabled[aria-busy='true'] { cursor: wait; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
small { font-size: .8rem; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.number { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.stack { display: grid; gap: 18px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.full { width: 100%; }
.boot { display: flex; align-items: center; justify-content: center; gap: 14px; min-height: 100vh; color: var(--muted); }
.boot .brand-icon { animation: boot 1.35s ease-in-out infinite alternate; }
@keyframes boot { to { opacity: .4; transform: scale(.92); } }

.shell { min-height: 100vh; display: grid; grid-template-columns: 232px minmax(0,1fr); }
.sidebar { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; padding: 22px 17px 16px; border-right: 1px solid var(--line); background: var(--sidebar); }
.brand { display: flex; align-items: center; gap: 11px; padding: 3px 8px; width: fit-content; }
.brand strong { font-size: 1.26rem; line-height: 1.15; letter-spacing: -.035em; font-weight: 720; }
.brand-icon { flex: 0 0 auto; display: block; width: 42px; height: 42px; object-fit: cover; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); }
.navigation { display: grid; gap: 4px; margin-top: 32px; }
.navigation a { display: flex; align-items: center; gap: 12px; border: 1px solid transparent; border-radius: 8px; min-height: 44px; padding: 0 12px; color: var(--muted); font-size: .9rem; font-weight: 560; transition: color .15s, background .15s; }
.navigation a:hover { color: #fff; background: var(--surface-raised); }
.navigation a[aria-current='page'] { color: var(--lime); background: var(--lime-soft); border-color: #3b4833; }
.navigation .nav-compact { display: none; }
.nav-icon { font-size: 1.18rem; width: 22px; text-align: center; line-height: 1; color: inherit; }
.nav-rule { border-top: 1px solid var(--line); margin: 12px 6px; }
.sidebar-bottom { margin-top: auto; display: grid; gap: 12px; }
.workspace-clock, .workspace-user { display: flex; align-items: center; gap: 10px; padding: 9px 8px; }
.workspace-clock { color: var(--muted); }
.workspace-clock > div { display: grid; gap: 3px; line-height: 1.2; }
.workspace-clock strong { font-family: var(--mono); color: #ecefe8; font-size: .96rem; }
.workspace-clock div span { font-size: .72rem; }
.clock-icon { font-size: 1.4rem; line-height: 1; }
.workspace-user { border-top: 1px solid var(--line); min-width: 0; }
.user-name { font-size: .89rem; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.main-shell { min-width: 0; }
.main { max-width: 1460px; margin: 0 auto; padding: 32px 34px 48px; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 26px; flex-wrap: wrap; }
.page-heading h1, .login h1 { font-weight: 660; letter-spacing: -.035em; font-size: clamp(1.65rem, 2.8vw, 2.25rem); line-height: 1.15; }
.page-actions, .page-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.page-tools:empty { display:none; }
@keyframes assemble { from { opacity: .35; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 13px; color: #f0f2eb; background: var(--surface-raised); white-space: nowrap; font-weight: 620; font-size: .88rem; transition: background .15s, border-color .15s, color .15s; }
.button:hover:not(:disabled) { background: var(--surface-hover); border-color: #414641; }
.button.primary { color: #11170b; border-color: var(--lime); background: var(--lime); }
.button.primary:hover:not(:disabled) { background: #ceeda6; border-color: #ceeda6; }
.button.danger { background: #2a211f; border-color: #50302c; color: var(--red); }
.button.danger:hover:not(:disabled) { background: #3a2623; border-color: #74504a; }
.button.ghost { background: transparent; }
.button.small { min-height: 33px; padding: 6px 9px; font-size: .81rem; }
.button.icon-button { width: 34px; min-width: 34px; min-height: 34px; padding: 0; font-size: 1.17rem; }
.button.text { min-height: 0; padding: 0; border: none; color: var(--lime); background: transparent; }
.button.text:hover:not(:disabled) { background: transparent; color: #e5ffb4; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; }
.panel.pad { padding: 20px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.panel-head h2, .panel h2 { font-size: 1.04rem; font-weight: 650; letter-spacing: -.015em; }
.panel-head p { margin-top: 5px; color: var(--muted); font-size: .87rem; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.section-title h2 { font-size: 1.12rem; font-weight: 650; letter-spacing: -.02em; }
.metric-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.metric { padding: 16px 17px; min-height: 106px; }
.metric-label { color: var(--muted); font-size: .86rem; font-weight: 550; }
.metric-value { font-family: var(--mono); font-size: clamp(1.62rem, 3vw, 2.1rem); font-weight: 660; letter-spacing: -.035em; line-height: 1; margin: 10px 0 6px; }
.metric small { color: var(--dim); font-size: .77rem; }
.overview-grid { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(280px,1fr); gap: 16px; }
.account-list, .item-list { display: grid; }
.account-row, .list-row { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 12px 16px; }
.account-row + .account-row, .list-row + .list-row { border-top: 1px solid var(--line-soft); }
.account-main, .list-main { min-width: 0; flex: 1; }
.account-main strong, .list-main strong { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .94rem; }
.account-main small, .list-main small { display: block; margin-top: 3px; color: var(--muted); }
.account-row .pill, .list-row .pill { flex-shrink: 0; }
.pill { min-height: 24px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; background: var(--surface-raised); color: #c9cdc5; border: 1px solid var(--line); border-radius: 6px; padding: 3px 7px; font-size: .76rem; font-weight: 580; white-space: nowrap; }
.pill.green { background: var(--lime-soft); border-color: #3b4833; color: var(--lime); }
.pill.blue { background: #232b37; border-color: #34465e; color: #bad4ff; }
.pill.amber { background: #352d24; border-color: #5c4630; color: var(--amber); }
.pill.red { background: #352421; border-color: #613a35; color: var(--red); }
.pill::before { content: ''; display: inline-block; background: currentColor; width: 5px; height: 5px; border-radius: 50%; }
.tiktok { --platform: #8edbd6; --platform-bg: #213231; }
.instagram { --platform: #e9b2d8; --platform-bg: #362737; }
.youtube { --platform: #f2a4aa; --platform-bg: #382627; }
.vk { --platform: #a8caff; --platform-bg: #273345; }
.brand-badge { display:inline-grid; place-items:center; flex-shrink:0; width:37px; height:37px; border-radius:8px; background:var(--platform-bg,var(--surface-raised)); color:var(--platform,#e1e5dc); font-size:1.12rem; }
.brand-badge svg { width:21px; height:21px; fill:currentColor; }
.brand-badge.mini { width:23px; height:23px; border-radius:6px; }
.brand-badge.mini svg { width:14px; height:14px; }
.thumb { width: 57px; height: 39px; flex: 0 0 57px; border-radius: 7px; display: grid; place-items: center; background: var(--surface-raised); color: var(--muted); overflow: hidden; }
.thumb video, .thumb img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.thumb.large { width: 112px; height: 145px; flex-basis: 112px; font-size: 1.6rem; }
.empty { min-height: 170px; display: grid; align-content: center; justify-items: center; text-align: center; padding: 22px 18px; }
.empty.tight { min-height: 108px; }
.empty-icon { border: 1px solid var(--line); background: var(--surface-raised); color: var(--muted); border-radius: 10px; width: 37px; height: 37px; display: grid; place-items: center; margin-bottom: 10px; font-size: 1.16rem; }
.empty strong { font-weight: 640; font-size: .94rem; }
.empty p { max-width: min(420px,100%); margin: 6px auto 0; color: var(--muted); font-size: .87rem; line-height: 1.45; }
.empty .button { margin-top: 13px; }
.message { background: #232b20; border: 1px solid #394633; border-radius: 9px; padding: 10px 12px; font-size: .87rem; color: #d3e8c1; line-height: 1.5; overflow-wrap: anywhere; }
.message.error { background: #30211f; border-color: #553630; color: var(--red); }
.message.notice { background: #2b271d; border-color: #4f442c; color: #f0d2a2; }
.skeleton { width: 100%; height: 130px; border-radius: var(--radius); background: linear-gradient(105deg, #1b1e1d 20%, #262a28 45%, #1b1e1d 70%); background-size: 220% 100%; animation: loading 1.5s infinite linear; border: 1px solid var(--line); }
@keyframes loading { to { background-position: -220% 0; } }

.field { display: grid; gap: 7px; font-size: .88rem; font-weight: 600; min-width: 0; color: #daddd7; }
.field small, .input-hint { color: var(--muted); font-weight: 500; line-height: 1.4; }
input:not([type='checkbox']), select, textarea { min-width: 0; width: 100%; border: 1px solid #41463f; border-radius: 8px; min-height: 41px; padding: 8px 10px; color: #edf0e9; background: var(--bg); }
input::placeholder, textarea::placeholder { color: var(--dim); }
input:not([type='checkbox']):focus, select:focus, textarea:focus { border-color: var(--lime); outline: 1px solid var(--lime); outline-offset: 0; }
input[type='checkbox'] { accent-color: var(--lime); width: 16px; height: 16px; margin: 0; flex-shrink: 0; }
input[type='file']::file-selector-button { border: 0; background: #353a34; padding: 6px 8px; margin-right: 8px; cursor: pointer; border-radius: 6px; color: #f0f1ed; }
select { appearance: none; padding-right: 30px; background-image: linear-gradient(45deg, transparent 50%, #acb1aa 50%),linear-gradient(135deg,#acb1aa 50%,transparent 50%); background-position: calc(100% - 16px) 52%,calc(100% - 11px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
.fields-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.form-row { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
.form-row .field { flex: 1 1 145px; }
.form-row.compact .field { flex-basis: 115px; }
.checkbox-label { display: flex; gap: 10px; align-items: center; font-size: .9rem; }
.toggle { display: inline-flex; gap: 2px; padding: 3px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; }
.toggle button { border: 0; border-radius: 6px; min-height: 31px; white-space: nowrap; padding: 5px 10px; background: transparent; color: var(--muted); font-size: .86rem; font-weight: 580; }
.toggle button[aria-pressed='true'] { background: var(--lime-soft); color: var(--lime); }
.toggle button:hover { color: #fff; }

.calendar-toolbar { display:flex; justify-content:space-between; align-items:center; gap:10px; padding:14px; flex-wrap:wrap; }
.calendar-toolbar strong { font-size:.94rem; letter-spacing:-.02em; }
.week-nav { gap:6px; }
.week-filter[aria-pressed='true'] { color:var(--lime); background:#283322; border-color:#435332; }
.schedule-week { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:6px; padding:0 14px 14px; }
.button.schedule-day { display:grid; grid-template-columns:1fr auto; justify-items:start; align-items:center; gap:5px 7px; min-width:0; min-height:67px; padding:9px 11px; color:var(--muted); background:var(--bg); text-align:left; font-size:.8rem; }
.schedule-day b { grid-column:1; grid-row:2; color:#edeeea; font:750 1.35rem/1 var(--mono); }
.schedule-day-count { grid-column:2; grid-row:2; font:650 .78rem var(--mono); }
.button.schedule-day.today b { color:var(--lime); }
.button.schedule-day[aria-pressed='true'], .button.schedule-day[aria-pressed='true']:hover { color:var(--lime); background:var(--lime-soft); border-color:#6b874b; }
.schedule-list { min-width:0; }
.video-list { display:grid; gap:8px; min-width:0; }
.video-list.in-panel { padding:10px; }
.video-card { min-width:0; border:1px solid var(--line); border-radius:var(--radius); background:var(--surface); transition:border-color .15s; }
.video-card:hover, .video-card[open] { border-color:#50574d; }
.video-lead { width:100%; display:grid; grid-template-columns:62px minmax(0,1fr) 30px; align-items:center; gap:14px; min-height:104px; padding:11px 15px; border:0; border-radius:calc(var(--radius) - 1px); text-align:left; color:inherit; cursor:pointer; list-style:none; }
.video-lead::-webkit-details-marker { display:none; }
.video-card[open] .video-lead { border-radius:calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0; }
.video-lead:hover { background:var(--surface-raised); }
.video-poster { width:62px; height:78px; position:relative; display:grid; place-items:center; overflow:hidden; border-radius:8px; border:1px solid var(--line); background:var(--surface-raised); color:var(--muted); font-size:1.25rem; }
.video-poster-image { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.video-info { display:grid; justify-items:start; gap:5px; min-width:0; }
.video-info time { font:520 .8rem var(--mono); color:var(--muted); font-variant-numeric:tabular-nums; }
.video-info strong { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; overflow-wrap:anywhere; font-size:1rem; line-height:1.28; }
.video-platforms { display:flex; flex-wrap:wrap; gap:5px; }
.video-platform { display:inline-flex; align-items:center; gap:5px; padding:2px 6px 2px 2px; border-radius:6px; border:1px solid var(--line); color:var(--muted); background:var(--surface); font-size:.76rem; font-weight:550; white-space:nowrap; }
.video-platform-dot { width:5px; height:5px; border-radius:50%; background:#9aa099; }
.video-platform-dot.published { background:var(--lime); }
.video-platform-dot.scheduled, .video-platform-dot.queued, .video-platform-dot.pending { background:#90bbff; }
.video-platform-dot.failed { background:var(--red); }
.video-platform-dot.unknown, .video-platform-dot.processing, .video-platform-dot.publishing, .video-platform-dot.uploaded, .video-platform-dot.paused { background:var(--amber); }
.video-arrow { display:grid; place-items:center; width:30px; height:30px; color:var(--muted); font-size:1.35rem; transition:transform .15s,color .15s; }
.video-card[open] .video-arrow { transform:rotate(90deg); }
.video-lead:hover .video-arrow { color:#f1f2ee; }
.video-expansion { padding:11px; display:grid; gap:10px; border-top:1px solid var(--line); }
.video-expansion > .row:empty { display:none; }
.video-expansion .target-list { grid-template-columns:repeat(2,minmax(0,1fr)); }
.filter-select { width: auto; min-width: 128px; }

.compose-grid { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(285px,1fr); gap: 16px; align-items: start; }
.compose-side { display: grid; gap: 13px; }
.dropzone { display: grid; place-items: center; text-align: center; min-height: 146px; gap: 5px; border: 1px dashed #5a6556; background: var(--surface); border-radius: var(--radius); color: inherit; cursor: pointer; padding: 20px; transition: background .15s,border-color .15s; }
.dropzone:hover, .dropzone.dragging, .dropzone:focus-within { border-color: var(--lime); background: var(--lime-soft); }
.dropzone input { position: absolute; width: 1px !important; height: 1px; min-height: 0 !important; opacity: 0; pointer-events: none; }
.dropzone b { font-size: 1rem; }
.dropzone small { color: var(--muted); }
.dropzone .upload-symbol { font-family: var(--mono); font-size: 1.75rem; line-height: 1; color: var(--lime); }
.upload-choices { margin-top: 10px; }
.compose-items { display: grid; gap: 12px; }
.compose-item { padding: 15px; display: grid; gap: 13px; }
.compose-item-head { display: flex; gap: 13px; min-width: 0; align-items: start; }
.compose-item-head > div:not(.thumb) { flex: 1; min-width: 0; display: grid; gap: 8px; }
.compose-item-name { min-width: 0; overflow-wrap: anywhere; display: block; }
.compose-item-head .button { flex-shrink: 0; }
.destination { border-top: 1px solid var(--line); padding-top: 10px; display: grid; gap: 9px; }
.destination .brand-badge { margin-right: 1px; }
.destination summary { cursor: pointer; color: #d8ded5; font-weight: 730; font-size: .91rem; display: flex; align-items: center; gap: 7px; list-style: none; }
.destination summary::-webkit-details-marker { display: none; }
.destination summary::before { content: '›'; display: inline-block; margin: 0 2px; color: var(--muted); font-size: 1.25rem; transform-origin: 50% 50%; }
.destination[open] summary::before { transform: rotate(90deg); }
.destination .fields-grid { padding: 10px 0 2px; }
.cover-status { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.account-pick { display: flex; gap: 8px; align-items: center; padding: 8px; border-radius: 8px; min-width: 0; background: #222625; }
.account-pick.disabled { opacity: .78; }
.account-pick > div { min-width: 0; flex: 1; display: grid; gap: 2px; }
.account-pick b { display: block; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; font-size: .87rem; }
.account-pick small { color: var(--muted); }
.accounts-pick { display: grid; gap: 7px; }
.submit-panel { display: grid; gap: 10px; padding: 14px; }
.submit-panel strong { font-size: .9rem; }
.submit-panel small { color: var(--muted); }

.analytics-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.analytics-slot { display:grid; min-width:0; }
.analytics-grid:has(> :only-child) { grid-template-columns:minmax(0,1fr); }
.analytics-account { display:grid; align-content:start; gap:14px; padding:16px; }
.analytics-head h2 { max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.analytics-identity { display:flex; align-items:center; gap:10px; min-width:0; }
.analytics-account > .toggle { justify-self:start; }
.analytics-metrics { --plot-accent:var(--platform,var(--lime)); display:grid; gap:9px; min-width:0; }
.analytics-values { display:grid; grid-auto-flow:column; grid-auto-columns:minmax(0,1fr); gap:6px; }
.analytics-value { min-width:0; display:grid; text-align:left; justify-items:start; gap:4px; padding:9px 10px; background:var(--bg); color:#edf0ec; border:1px solid var(--line); border-radius:8px; }
.analytics-value small, .analytics-extra small { min-width:0; color:var(--muted); font-weight:550; overflow-wrap:anywhere; }
.analytics-value strong { font:650 clamp(1.06rem,2vw,1.58rem)/1 var(--mono); letter-spacing:-.03em; overflow-wrap:anywhere; }
button.analytics-value:hover, button.analytics-extra:hover { border-color:color-mix(in srgb,var(--plot-accent) 56%,#28332d); }
.analytics-value[aria-pressed='true'] { background:color-mix(in srgb,var(--plot-accent) 9%,#161a17); border-color:color-mix(in srgb,var(--plot-accent) 40%,#2a352d); }
.analytics-value[aria-pressed='true'] small, .analytics-extra[aria-pressed='true'] small { color:var(--plot-accent); }
.analytics-plot { min-width:0; }
.metric-plot { position:relative; height:182px; border:1px solid var(--line); border-radius:8px; background:var(--bg); }
.metric-plot.single-point { height:112px; }
.metric-plot canvas { position:absolute; inset:0; display:block; width:100%; height:100%; }
.plot-tooltip { position:absolute; z-index:1; transform:translate(-50%,-100%); pointer-events:none; display:grid; justify-items:start; gap:2px; min-width:60px; padding:5px 9px; white-space:nowrap; border-radius:8px; border:1px solid #50574d; background:var(--surface-raised); }
.plot-tooltip strong { color:var(--plot-accent); font:730 .94rem var(--mono); }
.plot-tooltip small { font-size:.69rem; color:#dce3dc; }
.analytics-scope { display:flex; justify-content:space-between; gap:8px; padding:5px 2px 0; color:var(--dim); font-size:.73rem; }
.analytics-secondary { display:flex; flex-wrap:wrap; gap:5px; }
.analytics-extra { display:inline-flex; align-items:center; gap:5px; color:#edf0ec; border:1px solid var(--line); border-radius:6px; background:var(--bg); padding:4px 6px; }
.analytics-extra strong { font:680 .76rem var(--mono); }
.analytics-extra small { font-size:.72rem; }
.analytics-values.compact .analytics-value { padding:6px; }
.analytics-values.compact strong { font-size:1rem; }
.analytics-unavailable { color:var(--muted); font-size:.86rem; }
.settings-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; align-items: start; }
.settings-form { padding: 12px 16px; display: grid; gap: 9px; background: #171a18; border-bottom: 1px solid var(--line); }
.settings-row { padding: 10px 14px; display: flex; justify-content: space-between; align-items: center; gap: 8px; min-width: 0; }
.settings-row + .settings-row { border-top: 1px solid var(--line-soft); }
.settings-row strong { overflow-wrap: anywhere; font-size: .9rem; }
.settings-row small { display: block; margin-top: 3px; color: var(--muted); }
.copy-box { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px; border: 1px solid #526638; background: #252e1e; border-radius: 8px; }
.copy-box code { max-width: 100%; overflow-wrap: anywhere; color: #e8f5da; }

.login { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 20px; }
.login-panel { padding: 32px; width: min(400px,100%); background: var(--surface); border-radius: var(--radius); border: 1px solid var(--line); }
.login-brand { padding: 0; }
.login h1 { margin-bottom: 20px; }
.login form { display: grid; gap: 15px; }
.login form .primary { margin-top: 6px; }
.dialog { max-width: min(660px,calc(100vw - 24px)); width: 100%; max-height: calc(100dvh - 32px); background: var(--surface); border: 1px solid #50574d; border-radius: var(--radius); padding: 0; color: inherit; }
.dialog[open] { animation: assemble .18s ease-out both; }
.dialog::backdrop { background: #080b09ae; }
.dialog-head { border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; }
.dialog-head h2 { font-size: 1.19rem; letter-spacing: -.03em; overflow-wrap: anywhere; }
#dialog-content { padding: 16px; }
.dialog-post { display: grid; gap: 10px; }
.dialog-post video { max-height: 290px; max-width: 100%; display: block; margin: auto; border-radius: 10px; background: #000; }
.target-list { display: grid; gap: 7px; }
.target-detail { min-width:0; border:1px solid var(--line); display:grid; align-content:start; gap:8px; padding:10px; border-radius:8px; background:var(--bg); }
.target-body { display:flex; align-items:center; gap:10px; min-width:0; }
.target-cover { flex:0 0 43px; width:43px; height:62px; overflow:hidden; border-radius:6px; background:var(--surface-raised); border:1px solid var(--line); }
.target-cover-image { width:100%; height:100%; display:block; object-fit:cover; pointer-events:none; }
.target-summary { display:grid; justify-items:start; gap:7px; min-width:0; }
.target-identity { display:flex; align-items:center; gap:8px; min-width:0; }
.target-identity > div { display:grid; gap:2px; min-width:0; }
.target-identity strong, .target-identity small { overflow-wrap:anywhere; }
.target-publication { display:grid; gap:7px; }
.publication-metrics { display:grid; gap:5px; min-width:0; }
.publication-metrics[aria-busy='true'] .analytics-value strong { opacity:.66; }
.target-publication.repeat { border-top:1px solid #ffffff20; padding-top:7px; }
.target-publication .stack:empty, .target-publication .target-actions:empty { display:none; }
.target-actions:empty, .target-detail > .stack:empty { display:none; }
.project-reschedule { padding:10px 3px 1px; }
.target-detail .button { font-size: .8rem; }
.modal-media { max-height: 52dvh; overflow: auto; }
.modal-media button.list-row { width: 100%; text-align: left; background: none; border: 0; color: #f0f3ef; }
.modal-media button.list-row:hover { background: #31372f; }
.toasts { position: fixed; z-index: 20; right: 16px; bottom: 14px; display: grid; gap: 7px; width: min(370px, calc(100vw - 32px)); pointer-events: none; }
.toast { padding: 12px 15px; border-radius: 10px; background: #293625; color: #e6f5df; border: 1px solid #59734d; box-shadow: 0 6px 24px #0007; font-size: .89rem; line-height: 1.4; animation: assemble .18s ease-out both; }
.toast.error { background: #372520; border-color: #6b3b33; color: #ffd0c9; }

@media (max-width: 1120px) {
  .shell { grid-template-columns: 190px minmax(0,1fr); }
  .main { padding: 25px 21px 42px; }
  .overview-grid { grid-template-columns: 1fr; }
  .metric { padding: 13px; }
}
@media (max-width: 880px) {
  .shell { grid-template-columns: 67px minmax(0,1fr); }
  .sidebar { padding: 18px 8px 10px; align-items: stretch; }
  .sidebar .brand { margin: 0 auto; padding: 0; }
  .sidebar .brand strong, .navigation .nav-label, .workspace-clock > div, .user-name { display: none; }
  .navigation a { padding: 0; justify-content: center; }
  .sidebar-bottom > div { padding: 8px 0; justify-content: center; }
  .metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .settings-grid { grid-template-columns: 1fr; }
}
@media (max-width: 690px) {
  .main { padding: 20px 12px 35px; }
  .page-heading { align-items:center; flex-wrap:wrap; gap:9px; margin-bottom:17px; }
  .compose-grid, .analytics-grid { grid-template-columns: 1fr; }
  .compose-side { grid-row: 1; }
  .video-expansion .target-list { grid-template-columns:1fr; }
  .video-lead { gap:9px; }
  .compose-item-head .thumb.large { width: 60px; flex-basis: 60px; height: 84px; }
}
@media (max-width: 460px) {
  .shell { display: flex; flex-direction: column; }
  .sidebar { position: static; height: auto; flex-direction: row; align-items: center; justify-content: space-between; gap: 8px; border: 0; border-bottom: 1px solid var(--line); padding: 8px; }
  .sidebar .brand { margin: 0; }
  .sidebar .brand-icon { height: 34px; width: 34px; }
  .sidebar .navigation { grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 0; gap: 1px; }
  .navigation a { min-height: 44px; flex-direction: column; gap: 3px; font-size: .66rem; text-align: center; }
  .nav-icon { font-size: 1.03rem; }
  .navigation .nav-label, .navigation .nav-compact { display: inline; }
  .navigation .nav-label:has(+ .nav-compact) { display: none; }
  .navigation .nav-rule, .sidebar .workspace-clock { display: none; }
  .sidebar-bottom { margin: 0; }
  .sidebar .workspace-user { padding: 0; border: 0; }
  .page-actions .button { min-height:33px; }
  .calendar-toolbar { padding:9px; }
  .calendar-toolbar strong { font-size:.78rem; }
  .schedule-week { padding:0 8px 9px; gap:3px; }
  .button.schedule-day { grid-template-columns:1fr; justify-items:center; min-height:63px; gap:2px; padding:4px 2px; }
  .schedule-day b { font-size:1.13rem; }
  .schedule-day-count { grid-column:1; grid-row:3; }
  .video-lead { grid-template-columns:41px minmax(0,1fr) 21px; padding:8px; gap:7px; }
  .video-poster { width:41px; height:61px; }
  .video-arrow { width:21px; height:25px; }
  .video-platform { font-size:.69rem; gap:3px; padding-right:4px; }
  .video-platform .brand-badge.mini { width:19px; height:19px; }
  .metric { padding: 10px; min-height: 88px; }
  .analytics-account { padding:12px; }
  .analytics-value { padding:8px 6px; }
  .fields-grid { grid-template-columns: 1fr; }
  .login-panel { padding: 25px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

.cover-controls { gap: 6px; }
.cover-controls .button { justify-self: start; }
.settings-hints { display: grid; gap: 9px; border-top: 1px solid var(--line); padding: 12px 14px; font-size: .85rem; }
.settings-hints > div { display: grid; gap: 3px; }
.settings-hints code { color: #d4ecd1; font-size: .8rem; }
.settings-hints small { color: var(--muted); }
