:root {
  --primary: #2c4bff;
  --primary-d: #1d36d6;
  --primary-l: #eef1ff;
  --ink: #1f2430;
  --ink-2: #3d4352;
  --muted: #6b7183;
  --line: #e6e8ee;
  --bg: #f6f7fb;
  --card: #fff;
  --ok: #12a26b;
  --warn: #d97706;
  --danger: #e0334a;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, .12);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 14px/1.5 Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-decoration: none; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.01em; }
h1 { font-size: 22px; font-weight: 700; }
h3 { font-size: 15px; font-weight: 600; }
code { background: #f1f3f8; padding: 1px 5px; border-radius: 4px; font-size: 12px; }
.ic { flex-shrink: 0; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.warn { color: var(--warn); }
.grow { flex: 1; min-width: 0; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 0; }
.inline { display: inline-flex; gap: 6px; flex-wrap: wrap; margin: 0; }
.hidden { display: none !important; }
.pad { padding: 20px; }

/* Brand */
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; font-size: 18px; color: var(--ink); letter-spacing: -.02em; }
.logo-mark { width: 26px; height: 26px; border-radius: 7px; background: linear-gradient(135deg, var(--primary), #7b5cff); position: relative; display: inline-block; }
.logo-mark::before, .logo-mark::after { content: ""; position: absolute; left: 6px; right: 6px; height: 3px; border-radius: 2px; background: #fff; }
.logo-mark::before { top: 8px; }
.logo-mark::after { top: 15px; opacity: .7; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 8px; border: 1px solid transparent; font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; transition: .15s; color: var(--ink); background: none; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-d); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }
.btn-light { background: #fff; border-color: var(--line); color: var(--ink-2); }
.btn-light:hover { border-color: #c9cdd8; background: #fafbfd; }
.btn-ghost:hover { background: #eef0f5; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger-ghost { color: var(--danger); background: #fff; border-color: var(--line); }
.btn-danger-ghost:hover { background: #fff1f3; border-color: #f5c2ca; }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 7px; }
.btn-lg { height: 44px; padding: 0 20px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-icon { padding: 0; width: 36px; }
.btn-icon.btn-sm { width: 30px; }

/* Forms */
input, textarea, select { font: inherit; color: inherit; }
input:not([type=checkbox]):not([type=radio]):not([type=file]), textarea, .select {
  width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; outline: none; transition: .15s;
}
input:focus, textarea:focus, .select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-l); }
input:disabled { background: #f4f5f8; color: var(--muted); }
.select { width: auto; height: 36px; padding: 0 10px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack label { display: flex; flex-direction: column; gap: 6px; font-weight: 500; font-size: 13px; color: var(--ink-2); }

.alert { padding: 11px 14px; border-radius: 8px; margin-bottom: 16px; font-weight: 500; }
.alert-error { background: #fff1f3; color: #b4233a; border: 1px solid #fbd0d7; }
.alert-success { background: #ecfdf5; color: #0d7a52; border: 1px solid #c4f0dc; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: #1f2430; color: #fff; padding: 12px 18px; border-radius: 10px; z-index: 100; box-shadow: var(--shadow-lg); font-weight: 500; transition: .3s; max-width: 90vw; }
.toast-error { background: var(--danger); }
.toast.hide { opacity: 0; transform: translate(-50%, 12px); pointer-events: none; }
.chip { font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 99px; }
.chip-ok { background: #e6f7ef; color: var(--ok); }
.chip-warn { background: #fff4e5; color: var(--warn); }

/* Auth */
body.auth { background: radial-gradient(1200px 600px at 10% -10%, #e8ecff, transparent), radial-gradient(900px 500px at 110% 110%, #fde8f1, transparent), #f8f9fc; min-height: 100vh; }
.auth-wrap { max-width: 420px; margin: 0 auto; padding: 56px 20px; display: flex; flex-direction: column; align-items: center; gap: 28px; }
.auth-card { width: 100%; background: #fff; border-radius: 16px; padding: 32px; box-shadow: var(--shadow-lg); }
.auth-card h1 { font-size: 24px; }
.auth-card .sub { color: var(--muted); margin: 6px 0 22px; }
.auth-foot { text-align: center; margin: 20px 0 0; color: var(--muted); }

/* App shell */
.topbar { height: 60px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; padding: 0 20px; gap: 32px; position: sticky; top: 0; z-index: 20; }
.topnav { display: flex; gap: 4px; height: 100%; }
.topnav a { display: flex; align-items: center; gap: 8px; padding: 0 14px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; }
.topnav a:hover { color: var(--ink); }
.topnav a.on { color: var(--primary); border-color: var(--primary); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; }
.menu summary::-webkit-details-marker { display: none; }
.me { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, #ffb37b, #ff6f91); color: #fff; display: grid; place-items: center; font-weight: 700; }
.menu-pop { position: absolute; right: 0; top: 44px; width: 230px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; }
.menu-pop a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: var(--ink-2); font-weight: 500; }
.menu-pop a:hover { background: var(--bg); }
.menu-head { padding: 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; display: flex; flex-direction: column; }
.menu-head small { color: var(--muted); }

.shell { display: flex; min-height: calc(100vh - 60px); }
.sidebar { width: 252px; flex-shrink: 0; background: #fff; border-right: 1px solid var(--line); padding: 14px 10px; position: sticky; top: 60px; height: calc(100vh - 60px); overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.side-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 16px 10px 6px; }
.side-item { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; color: var(--ink-2); font-weight: 500; }
.side-item:hover { background: var(--bg); }
.side-item.on { background: var(--primary-l); color: var(--primary); }
.side-item.muted { color: var(--muted); }
.side-item .count { font-size: 12px; color: var(--muted); background: var(--bg); padding: 0 7px; border-radius: 99px; }
.side-item.on .count { background: #fff; }
.all-ch { width: 28px; height: 28px; border-radius: 8px; background: var(--bg); display: grid; place-items: center; color: var(--muted); }
.side-item.on .all-ch { background: #fff; color: var(--primary); }
.plan-card { margin-top: auto; background: var(--bg); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; }
.plan-card span { color: var(--muted); }
.plan-card .bar { height: 6px; background: #e1e4ec; border-radius: 9px; overflow: hidden; }
.plan-card .bar i { display: block; height: 100%; background: var(--primary); border-radius: 9px; }
.plan-card a { font-weight: 600; }
.main { flex: 1; min-width: 0; padding: 28px 36px 60px; max-width: 1180px; }

/* Avatars */
.avatar { --av: #8aa; position: relative; display: inline-grid; place-items: center; border-radius: 50%; background: var(--av); color: #fff; font-weight: 700; flex-shrink: 0; }
.avatar-xs { width: 20px; height: 20px; font-size: 10px; }
.avatar-sm { width: 28px; height: 28px; font-size: 12px; }
.avatar-md { width: 40px; height: 40px; font-size: 16px; }
.avatar-lg { width: 48px; height: 48px; font-size: 19px; }
.avatar.paused { filter: grayscale(1); opacity: .6; }
.net-badge { position: absolute; right: -3px; bottom: -3px; min-width: 15px; height: 15px; padding: 0 2px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 7.5px; font-weight: 800; border: 2px solid #fff; line-height: 1; }
.avatar-xs .net-badge { display: none; }
.avatar-lg .net-badge, .avatar-md .net-badge { min-width: 19px; height: 19px; font-size: 9px; }
.net-icon { display: inline-grid; place-items: center; border-radius: 12px; color: #fff; font-weight: 800; }

/* Page head & tabs */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.ph-title { display: flex; align-items: center; gap: 14px; }
.ph-title small { display: block; margin-top: 2px; }
.ph-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.tabs a { padding: 10px 14px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a span { font-size: 12px; background: #eceef4; color: var(--muted); padding: 1px 7px; border-radius: 99px; margin-left: 4px; }
.tabs a.on { color: var(--primary); border-color: var(--primary); }
.tabs a.on span { background: var(--primary-l); color: var(--primary); }
.seg { display: inline-flex; background: #eceef4; padding: 3px; border-radius: 9px; }
.seg a { padding: 5px 12px; border-radius: 7px; color: var(--muted); font-weight: 600; font-size: 13px; }
.seg a.on { background: #fff; color: var(--ink); box-shadow: var(--shadow); }

/* Cards & lists */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.card-head.pad { margin: 0; border-bottom: 1px solid var(--line); }
.list-row { display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: 0; }
.list-row b { display: block; }
.list-row .right { text-align: right; display: flex; flex-direction: column; }
.section-title { font-size: 16px; margin: 30px 0 14px; }

/* Empty */
.empty { text-align: center; padding: 60px 20px; background: #fff; border: 1px dashed #d5d9e3; border-radius: var(--radius); }
.empty.big { padding: 90px 20px; }
.empty-art { width: 72px; height: 72px; margin: 0 auto 16px; border-radius: 20px; background: var(--primary-l); color: var(--primary); display: grid; place-items: center; }
.empty h2 { font-size: 18px; }
.empty p { color: var(--muted); margin: 6px 0 18px; }

/* Queue */
.day-group { margin-bottom: 26px; }
.day-title { font-size: 15px; margin-bottom: 10px; display: flex; gap: 8px; align-items: baseline; }
.day-title span { color: var(--muted); font-weight: 500; font-size: 13.5px; }
.post-card { display: flex; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; box-shadow: var(--shadow); overflow: hidden; transition: .15s; }
.post-card:hover { border-color: #cfd4e0; }
.post-time { width: 100px; flex-shrink: 0; padding: 18px 14px; font-weight: 700; background: #fafbfd; border-right: 1px solid var(--line); font-size: 13px; }
.post-body { flex: 1; padding: 16px 18px; min-width: 0; }
.post-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.post-content { display: flex; gap: 14px; }
.post-content p { margin: 0; flex: 1; white-space: pre-line; word-break: break-word; color: var(--ink-2); }
.post-img { width: 96px; height: 96px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.post-stats { display: flex; gap: 18px; margin-top: 12px; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.post-stats span { display: inline-flex; align-items: center; gap: 5px; }
.post-actions { display: flex; gap: 6px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); flex-wrap: wrap; }

/* Composer */
.composer { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; align-items: start; }
.composer-main { padding: 20px; margin: 0; }
.ch-picker { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.ch-chip { cursor: pointer; position: relative; }
.ch-chip input { position: absolute; opacity: 0; }
.ch-chip .avatar { opacity: .35; filter: grayscale(.8); transition: .15s; outline: 2px solid transparent; outline-offset: 2px; }
.ch-chip input:checked + .avatar { opacity: 1; filter: none; outline-color: var(--primary); }
.ch-add { width: 40px; height: 40px; border-radius: 50%; border: 1.5px dashed #c7ccd8; display: grid; place-items: center; color: var(--muted); }
.editor { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.editor:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-l); }
.editor textarea { border: 0 !important; box-shadow: none !important; resize: vertical; padding: 14px; font-size: 15px; min-height: 180px; }
.media-row { display: flex; gap: 10px; padding: 0 14px 14px; align-items: center; flex-wrap: wrap; }
.media-drop { width: 88px; height: 88px; border: 1.5px dashed #c7ccd8; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--muted); cursor: pointer; font-size: 11.5px; font-weight: 600; transition: .15s; }
.media-drop:hover, .media-drop.drag { border-color: var(--primary); color: var(--primary); background: var(--primary-l); }
.media-thumb { position: relative; }
.media-thumb img, .media-new { width: 88px; height: 88px; object-fit: cover; border-radius: 10px; display: block; }
.media-thumb .rm { position: absolute; left: 4px; bottom: 4px; background: rgba(0, 0, 0, .65); color: #fff; font-size: 11px; padding: 2px 6px; border-radius: 6px; display: flex; gap: 4px; align-items: center; }
.editor-foot { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; border-top: 1px solid var(--line); background: #fafbfd; gap: 10px; flex-wrap: wrap; }
.emoji-bar { display: flex; gap: 2px; }
.emoji-bar button { border: 0; background: none; cursor: pointer; font-size: 16px; width: 30px; height: 30px; border-radius: 6px; font-weight: 700; color: var(--muted); }
.emoji-bar button:hover { background: #eceef4; }
.counters { display: flex; gap: 6px; flex-wrap: wrap; }
.counter { font-size: 11.5px; font-weight: 600; background: #eceef4; color: var(--muted); padding: 2px 8px; border-radius: 99px; }
.counter.over { background: #fff1f3; color: var(--danger); }
.schedule-box { margin-top: 18px; }
.schedule-box h4 { font-size: 13px; margin-bottom: 10px; }
.radio-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.radio-cards label { cursor: pointer; }
.radio-cards input { position: absolute; opacity: 0; }
.radio-cards span { display: flex; flex-direction: column; border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 12px; height: 100%; transition: .15s; }
.radio-cards small { color: var(--muted); font-size: 11.5px; }
.radio-cards input:checked + span { border-color: var(--primary); background: var(--primary-l); }
.radio-cards input:checked + span b { color: var(--primary); }
.custom-at { display: none; align-items: center; gap: 12px; margin-top: 12px; }
.custom-at.show { display: flex; }
.custom-at input { max-width: 260px; }
.composer-submit { display: flex; justify-content: flex-end; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.composer-preview { position: sticky; top: 84px; }
.composer-preview h4 { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 10px; }
.preview { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 12px; box-shadow: var(--shadow); }
.pv-head { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.pv-head b { display: block; font-size: 13.5px; }
.pv-head small { color: var(--muted); font-size: 12px; }
.preview p { margin: 0 0 10px; word-break: break-word; }
.preview img { width: 100%; border-radius: 8px; display: block; max-height: 300px; object-fit: cover; }
.preview .hl { color: var(--primary); }
.pv-actions { display: flex; gap: 22px; color: var(--muted); padding-top: 10px; margin-top: 10px; border-top: 1px solid var(--line); }

/* Calendar */
.cal-toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.cal-toolbar h2 { font-size: 18px; margin-left: 10px; }
.legend { margin-left: auto; display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12.5px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-left: 8px; }
.lg-scheduled { background: var(--primary); }
.lg-sent { background: var(--ok); }
.lg-failed { background: var(--danger); }
.calendar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: var(--line); gap: 1px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.cal-dow { background: #fafbfd; padding: 9px 10px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.cal-cell { background: #fff; min-height: 122px; padding: 6px; display: flex; flex-direction: column; gap: 3px; }
.calendar.week .cal-cell { min-height: 520px; }
.cal-cell.out { background: #fafbfd; }
.cal-cell.out .cal-date span { color: #b5bac6; }
.cal-date { display: flex; justify-content: space-between; align-items: center; padding: 2px 4px 4px; }
.cal-date span { font-weight: 600; font-size: 13px; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; }
.cal-cell.today .cal-date span { background: var(--primary); color: #fff; }
.cal-add { opacity: 0; color: var(--muted); width: 22px; height: 22px; display: grid; place-items: center; border-radius: 6px; }
.cal-cell:hover .cal-add { opacity: 1; }
.cal-add:hover { background: var(--primary-l); color: var(--primary); }
.cal-post { display: flex; align-items: center; gap: 5px; font-size: 11.5px; padding: 4px 6px; border-radius: 6px; color: var(--ink-2); border-left: 3px solid var(--primary); background: var(--primary-l); min-width: 0; }
.cal-post b { flex-shrink: 0; }
.cal-post.st-sent { border-color: var(--ok); background: #eaf8f1; }
.cal-post.st-failed { border-color: var(--danger); background: #fff1f3; }
.calendar.week .cal-post { flex-wrap: wrap; align-items: flex-start; }
.calendar.week .cal-post .ellipsis { white-space: normal; width: 100%; }
.cal-more { font-size: 11.5px; font-weight: 600; padding: 2px 6px; }

/* Channels */
.net-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.net-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 12px; display: flex; flex-direction: column; align-items: center; gap: 10px; cursor: pointer; font: inherit; transition: .15s; }
.net-card:hover { border-color: var(--primary); box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.net-card .muted { font-size: 12.5px; font-weight: 600; color: var(--primary); }
.modal { border: 0; border-radius: 16px; padding: 24px; width: min(460px, 92vw); box-shadow: var(--shadow-lg); }
.modal::backdrop { background: rgba(17, 22, 35, .45); }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.modal-head h3 { font-size: 18px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }

/* Schedule */
.add-slot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.add-slot b { margin-right: 6px; }
.add-slot input[type=time] { width: 140px; }
.slots-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.slot-col { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; min-height: 160px; }
.slot-col h4 { font-size: 13px; margin-bottom: 10px; }
.slot { display: flex; justify-content: space-between; align-items: center; background: var(--primary-l); color: var(--primary); font-weight: 600; font-size: 12.5px; padding: 6px 8px; border-radius: 7px; margin: 0 0 6px; }
.slot button { border: 0; background: none; color: inherit; cursor: pointer; opacity: .5; padding: 2px; display: grid; }
.slot button:hover { opacity: 1; }
.slot-actions { display: flex; gap: 10px; margin-top: 18px; }

/* Ideas kanban */
.kanban { display: grid; grid-template-columns: repeat(4, minmax(220px, 1fr)); gap: 14px; overflow-x: auto; align-items: start; }
.k-col { background: #eef0f5; border-radius: var(--radius); padding: 10px; min-height: 400px; transition: .15s; }
.k-col.over { background: var(--primary-l); outline: 2px dashed var(--primary); }
.k-col header { display: flex; align-items: center; gap: 8px; padding: 4px 4px 10px; }
.k-col header .count { font-size: 12px; background: #fff; padding: 0 8px; border-radius: 99px; color: var(--muted); }
.k-col header button { margin-left: auto; }
.k-list { display: flex; flex-direction: column; gap: 8px; min-height: 40px; }
.k-card { background: #fff; border-radius: 10px; padding: 12px; box-shadow: var(--shadow); cursor: grab; border: 1px solid transparent; }
.k-card:hover { border-color: #d5d9e3; }
.k-card.dragging { opacity: .4; }
.k-card img { width: 100%; height: 120px; object-fit: cover; border-radius: 7px; margin-bottom: 8px; display: block; }
.k-card p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.k-card footer { display: flex; align-items: center; gap: 6px; margin-top: 10px; }
.k-card footer small { margin-right: auto; }

/* Analytics */
.kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 20px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.kpi small { color: var(--muted); font-weight: 600; font-size: 12.5px; }
.kpi b { display: block; font-size: 26px; letter-spacing: -.02em; margin-top: 4px; }
.grid-2 { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }
.grid-2 + .grid-2 { grid-template-columns: 1fr 1fr; }
.chart { display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 3px; height: 200px; align-items: end; border-bottom: 1px solid var(--line); }
.chart .col { height: 100%; display: flex; align-items: flex-end; cursor: default; }
.chart .col i { display: block; width: 100%; min-height: 2px; background: linear-gradient(to top, var(--primary), #7b8cff); border-radius: 4px 4px 0 0; transition: .15s; }
.chart .col:hover i { background: var(--primary-d); }
.chart-axis { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; margin-top: 6px; }
.big-stat { font-size: 28px; font-weight: 800; margin: 0; color: var(--primary); letter-spacing: -.02em; }
.dow-bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; height: 120px; margin-top: 18px; }
.dow-bars div { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; height: 100%; }
.dow-bars i { width: 100%; background: #dfe4ff; border-radius: 4px; min-height: 3px; }
.dow-bars span { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 11px 20px; border-bottom: 1px solid var(--line); }
.table th { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.table tr:last-child td { border: 0; }
.cell-ch { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }

/* Settings */
.settings { max-width: 680px; }
.settings h3 { font-size: 16px; }
.plan-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.plan-opt { border: 1.5px solid var(--line); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; margin: 0; }
.plan-opt.on { border-color: var(--primary); background: var(--primary-l); }
.plan-opt .btn, .plan-opt .chip { margin-top: 8px; }
.price-sm { font-weight: 700; font-size: 18px; }
.danger-zone { border-color: #f6cdd4; }

@media (max-width: 1100px) {
  .composer { grid-template-columns: 1fr; }
  .composer-preview { position: static; }
  .kpis { grid-template-columns: repeat(3, 1fr); }
  .grid-2, .grid-2 + .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .sidebar { display: none; }
  .main { padding: 20px 16px 60px; }
  .topbar { gap: 12px; padding: 0 12px; }
  .topnav a { padding: 0 8px; font-size: 0; gap: 0; }
  .topnav a .ic { width: 20px; height: 20px; }
  .top-right .btn-primary { font-size: 0; gap: 0; width: 36px; padding: 0; }
  .radio-cards { grid-template-columns: 1fr 1fr; }
  .slots-grid { grid-template-columns: repeat(2, 1fr); }
  .kpis { grid-template-columns: 1fr 1fr; }
  .cal-cell { min-height: 80px; }
  .cal-post span, .cal-post b { display: none; }
  .post-time { width: 74px; padding: 14px 10px; }
  .plan-pick { grid-template-columns: 1fr; }
}
[hidden] { display: none !important; }
.k-card footer small { white-space: nowrap; }
.kanban { grid-template-columns: repeat(4, minmax(210px, 1fr)); }
.add-slot input[type=time] { width: 140px !important; }
.slot span { white-space: nowrap; }
.slot-col { padding: 10px; }

/* Attachments */
.att-grid { display: grid; gap: 4px; margin-top: 12px; border-radius: 10px; overflow: hidden; max-width: 460px; }
.att-grid.n1 { grid-template-columns: 1fr; }
.att-grid.n2 { grid-template-columns: 1fr 1fr; }
.att-grid.n3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.att-grid.n3 .att:first-child { grid-row: span 2; }
.att-grid.n4 { grid-template-columns: 1fr 1fr; }
.att { position: relative; background: #eef0f5; aspect-ratio: 4 / 3; min-height: 0; }
.att-grid.n1 .att { aspect-ratio: 16 / 10; }
.att-grid.n3 .att:first-child { aspect-ratio: auto; }
.att img, .att video { width: 100%; height: 100%; object-fit: cover; display: block; }
.att-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 34px; height: 34px; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; display: grid; place-items: center; font-size: 12px; pointer-events: none; }
.att-more { position: absolute; inset: 0; background: rgba(0, 0, 0, .5); color: #fff; font-size: 22px; font-weight: 700; display: grid; place-items: center; }
.preview .att-grid { max-width: none; margin: 0; }
.preview .att-grid img, .preview .att-grid video { max-height: none; border-radius: 0; }
.media-thumb { position: relative; width: 88px; height: 88px; border-radius: 10px; overflow: hidden; background: #eef0f5; }
.media-thumb img, .media-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 0; }
.media-thumb .att-play { width: 26px; height: 26px; font-size: 10px; }
.rm-x { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .65); color: #fff; cursor: pointer; display: grid; place-items: center; font-size: 11px; padding: 0; }
.rm-x:hover { background: var(--danger); }
.editor.drag { border-color: var(--primary); background: var(--primary-l); }
.drop-hint { font-size: 11.5px; color: var(--muted); padding: 0 14px 10px; }
.net-warnings { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.net-warnings div { font-size: 12.5px; font-weight: 500; padding: 7px 10px; border-radius: 8px; }
.net-warnings .warn { background: #fff1f3; color: #b4233a; }
.net-warnings .note { background: #fff8e6; color: #946200; }

/* Dated drafts */
.draft-only { display: none; }
.composer.is-draft .draft-only { display: flex; }
.composer.is-draft p.draft-only { display: block; }
.check { align-items: center; gap: 8px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.custom-at input:disabled { opacity: .45; }
.draft-note { margin: 10px 0 0; }
.draft-tag { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; background: #fff4e5; color: var(--warn); padding: 2px 7px; border-radius: 5px; }
.planned { display: block; margin-top: 6px; font-weight: 600; font-size: 12px; line-height: 1.35; }
.cal-post.st-draft { border-left-style: dashed; border-color: var(--warn); background: #fff8ec; }
.lg-draft { background: var(--warn); }

/* Connect screen */
.connect-card { text-align: center; }
.connect-card .stack { text-align: left; }
.connect-logos { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 18px; }
.logo-mark.big { width: 52px; height: 52px; border-radius: 14px; }
.logo-mark.big::before, .logo-mark.big::after { left: 13px; right: 13px; height: 5px; border-radius: 3px; }
.logo-mark.big::before { top: 17px; }
.logo-mark.big::after { top: 29px; }
.connect-logos .net-icon { border-radius: 14px; }
.connect-dots { display: flex; gap: 5px; }
.connect-dots i { width: 6px; height: 6px; border-radius: 50%; background: #c9cedb; animation: cdot 1.2s infinite; }
.connect-dots i:nth-child(2) { animation-delay: .2s; }
.connect-dots i:nth-child(3) { animation-delay: .4s; }
@keyframes cdot { 50% { background: var(--primary); transform: scale(1.3); } }
.type-pick { display: flex; flex-direction: column; gap: 8px; }
.type-pick label, .pill-pick label, .choice { cursor: pointer; }
.type-pick input, .pill-pick input, .choice input { position: absolute; opacity: 0; }
.type-pick span { display: block; border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 14px; font-weight: 600; color: var(--ink-2); transition: .15s; }
.type-pick input:checked + span { border-color: var(--primary); background: var(--primary-l); color: var(--primary); }
.at-input { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.at-input:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-l); }
.at-input span { padding-left: 12px; color: var(--muted); font-weight: 600; }
.at-input input { border: 0 !important; box-shadow: none !important; padding-left: 4px !important; }
.perm-list { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: 13px; text-align: left; }
.perm-list li { display: flex; gap: 8px; align-items: center; }
.perm-list .ic { color: var(--ok); }

/* Onboarding */
.ob-wrap { max-width: 760px; margin: 0 auto; padding: 24px 20px 60px; }
.ob-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; }
.ob-top form { margin: 0; }
.ob-steps { display: flex; gap: 8px; list-style: none; padding: 0; margin: 0 0 22px; }
.ob-steps li { flex: 1; display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--muted); padding-top: 10px; border-top: 3px solid #dde1ea; }
.ob-steps li span { width: 22px; height: 22px; border-radius: 50%; background: #dde1ea; display: grid; place-items: center; font-size: 11.5px; color: #fff; flex-shrink: 0; }
.ob-steps li.on { color: var(--primary); border-color: var(--primary); }
.ob-steps li.on span { background: var(--primary); }
.ob-steps li.done { color: var(--ok); border-color: var(--ok); }
.ob-steps li.done span { background: var(--ok); }
.ob-card { background: #fff; border-radius: 18px; padding: 36px; box-shadow: var(--shadow-lg); }
.ob-card h1 { font-size: 26px; }
.ob-card .sub { color: var(--muted); margin: 6px 0 24px; font-size: 15px; }
.q { font-size: 14px; margin-top: 6px; }
.choice-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.choice span { display: flex; flex-direction: column; gap: 2px; border: 1.5px solid var(--line); border-radius: 12px; padding: 14px; height: 100%; transition: .15s; }
.choice em { font-style: normal; font-size: 24px; margin-bottom: 4px; }
.choice small { color: var(--muted); font-size: 12px; font-weight: 500; }
.choice input:checked + span { border-color: var(--primary); background: var(--primary-l); }
.choice input:checked + span b { color: var(--primary); }
.choice.wide span { flex-direction: column; padding: 14px 16px; }
.rec { font-style: normal; font-size: 11px; font-weight: 700; color: var(--ok); background: #e6f7ef; padding: 2px 8px; border-radius: 99px; margin-left: 6px; }
.preset-list { display: flex; flex-direction: column; gap: 8px; }
.pill-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.pill-pick span { display: block; padding: 8px 14px; border: 1.5px solid var(--line); border-radius: 99px; font-weight: 600; font-size: 13px; color: var(--ink-2); transition: .15s; }
.pill-pick input:checked + span { border-color: var(--primary); background: var(--primary); color: #fff; }
.ob-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 26px; gap: 10px; }
.row-gap { display: flex; gap: 8px; }
.ob-nets { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.ob-net { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 10px; border: 1.5px solid var(--line); border-radius: 12px; color: var(--ink); transition: .15s; text-align: center; }
.ob-net b { font-size: 13px; }
.ob-net > span:last-child { font-size: 12px; font-weight: 600; color: var(--primary); }
.ob-net:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.ob-net.is-on { border-color: var(--ok); background: #f3fbf7; }
.ob-net.is-on > span:last-child { color: var(--ok); }
.ob-connected { display: flex; align-items: center; gap: 6px; margin-top: 18px; padding: 12px 14px; background: var(--bg); border-radius: 10px; }
.ob-connected > span:last-child { margin-left: 8px; color: var(--muted); font-size: 13px; }
.ob-card textarea { font-size: 15px; }

/* Getting started checklist */
.checklist { padding: 16px 20px; }
.cl-head { display: flex; align-items: center; gap: 20px; margin-bottom: 12px; }
.cl-head > div:first-child { display: flex; flex-direction: column; }
.cl-bar { flex: 1; height: 6px; background: #e8ebf2; border-radius: 9px; overflow: hidden; }
.cl-bar i { display: block; height: 100%; background: var(--ok); border-radius: 9px; }
.cl-items { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.cl-item { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink-2); font-weight: 600; font-size: 13px; }
.cl-item:hover { border-color: var(--primary); }
.cl-item.done { color: var(--muted); text-decoration: line-through; background: #fafbfd; }
.cl-check { width: 20px; height: 20px; border-radius: 50%; border: 2px solid #cdd2dc; display: grid; place-items: center; flex-shrink: 0; }
.cl-item.done .cl-check { background: var(--ok); border-color: var(--ok); color: #fff; }

/* Impersonation */
.imp-bar { background: #1f2430; color: #fff; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 8px 16px; font-size: 13px; flex-wrap: wrap; }
.imp-bar form { margin: 0; }
.imp-bar .btn { background: #fff; color: var(--ink); }

/* Admin */
body.admin { display: flex; min-height: 100vh; }
.a-side { width: 230px; flex-shrink: 0; background: #12141c; color: #b7bbc8; padding: 20px 12px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.a-side .brand { color: #fff; padding: 0 8px 22px; font-size: 17px; }
.a-badge { font-style: normal; font-size: 10.5px; font-weight: 700; background: var(--primary); color: #fff; padding: 2px 7px; border-radius: 5px; text-transform: uppercase; letter-spacing: .05em; }
.a-side nav { display: flex; flex-direction: column; gap: 2px; }
.a-side nav a, .a-foot a { display: flex; align-items: center; gap: 10px; color: #b7bbc8; padding: 9px 10px; border-radius: 8px; font-weight: 500; }
.a-side nav a:hover, .a-foot a:hover { background: #1d2030; color: #fff; }
.a-side nav a.on { background: #23273a; color: #fff; }
.a-foot { margin-top: auto; display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.a-foot small { padding: 8px 10px 0; color: #6f7487; overflow: hidden; text-overflow: ellipsis; }
.a-main { flex: 1; min-width: 0; padding: 28px 36px 60px; }
.kpi .delta { display: block; font-size: 12px; font-weight: 600; color: var(--ok); margin-top: 2px; }
.kpi .delta.muted { color: var(--muted); }
a.kpi { color: inherit; }
a.kpi:hover { border-color: var(--primary); }
.kpi-bad b { color: var(--danger); }
.small-kpis .kpi b { font-size: 20px; }
.kpis.three { grid-template-columns: repeat(3, 1fr); }
.plan-mix { display: flex !important; gap: 4px; flex-wrap: wrap; }
.pl { font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 6px; letter-spacing: 0; }
.pl-free { background: #eef0f5; color: var(--muted); }
.pl-essentials { background: var(--primary-l); color: var(--primary); }
.pl-team { background: #f1eaff; color: #7b3fe4; }
.chip-bad { background: #fff1f3; color: var(--danger); }
.chip-admin { background: #1f2430; color: #fff; }
.st-scheduled { background: var(--primary-l); color: var(--primary); }
.st-sent { background: #e6f7ef; color: var(--ok); }
.st-draft { background: #fff4e5; color: var(--warn); }
.st-failed { background: #fff1f3; color: var(--danger); }
.hbar { display: grid; grid-template-columns: 22px 120px 1fr 30px; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 13px; }
.hbar .net-icon { border-radius: 6px; }
.hbar div { height: 8px; background: #eef0f5; border-radius: 9px; overflow: hidden; }
.hbar i { display: block; height: 100%; border-radius: 9px; }
.hbar b { text-align: right; }
.u-cell { display: inline-flex; align-items: center; gap: 10px; color: inherit; }
.u-cell b { display: block; font-size: 13.5px; }
.u-cell small { color: var(--muted); font-size: 12px; }
.u-cell:hover b { color: var(--primary); }
.u-av { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, #ffb37b, #ff6f91); color: #fff; display: grid; place-items: center; font-weight: 700; flex-shrink: 0; }
.u-av.big { width: 52px; height: 52px; font-size: 20px; }
.filters { display: flex; gap: 10px; align-items: center; padding: 14px; flex-wrap: wrap; }
.filters input[name=q] { flex: 1; min-width: 200px; }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; }
.right-cell { text-align: right; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.post-cell { max-width: 360px; }
.back-link { display: inline-block; margin-bottom: 10px; font-weight: 600; font-size: 13px; }
.user-grid { grid-template-columns: 1.6fr 1fr; align-items: start; }
.facts { display: grid; grid-template-columns: 110px 1fr; gap: 8px; margin: 0; font-size: 13.5px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 500; }
.inline-form { display: flex; align-items: flex-end; gap: 8px; margin: 0; }
.inline-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; flex: 1; }
.inline-form .select { width: 100%; }
.card-head.pad a { font-weight: 600; }
.table td { vertical-align: middle; }

@media (max-width: 860px) {
  .choice-grid { grid-template-columns: 1fr 1fr; }
  .cl-items { grid-template-columns: 1fr 1fr; }
  .ob-card { padding: 24px 18px; }
  .ob-steps li { font-size: 0; gap: 0; }
  body.admin { flex-direction: column; }
  .a-side { width: 100%; height: auto; position: static; flex-direction: row; align-items: center; flex-wrap: wrap; padding: 12px; }
  .a-side .brand { padding: 0 12px 0 0; }
  .a-side nav { flex-direction: row; flex-wrap: wrap; }
  .a-foot { display: none; }
  .a-main { padding: 20px 14px; }
  .table { display: block; overflow-x: auto; }
}

/* Live connect */
.pick-list { display: flex; flex-direction: column; gap: 8px; }
.pick-row { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1.5px solid var(--line); border-radius: 10px; cursor: pointer; }
.pick-row:has(input:checked) { border-color: var(--primary); background: var(--primary-l); }
.pick-row b { display: block; }
.pick-row .net-icon { border-radius: 9px; }
.demo-note { background: #fff8e6; color: #946200; font-size: 12.5px; font-weight: 500; padding: 8px 12px; border-radius: 8px; margin: 0 0 10px; }
.chip-live { background: #e6f7ef; color: var(--ok); }
.chip-demo { background: #eef0f5; color: var(--muted); }
.live-tag { position: absolute; top: 8px; right: 8px; font-size: 10px; font-weight: 800; letter-spacing: .05em; background: var(--ok); color: #fff; padding: 2px 6px; border-radius: 5px; }
.net-card, .ob-net { position: relative; }
.post-error { margin-top: 10px; background: #fff1f3; color: #b4233a; border-radius: 8px; padding: 8px 10px; font-size: 12.5px; font-weight: 500; }
.setup-card { padding: 18px 20px; }
.setup-card ol { margin: 8px 0 0; padding-left: 20px; color: var(--ink-2); }
.setup-card li { margin-bottom: 4px; }
.setup-card code { user-select: all; }

/* Admin: integrations & edit pages */
.set-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 24px; margin-top: 14px; }
.set-row { display: flex; flex-direction: column; gap: 6px; }
.set-row > label:first-child { font-weight: 600; font-size: 13px; display: flex; align-items: center; gap: 8px; }
.src { font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: 5px; text-transform: uppercase; letter-spacing: .03em; }
.src-admin { background: var(--primary-l); color: var(--primary); }
.src-env { background: #e6f7ef; color: var(--ok); }
.src-default { background: #eef0f5; color: var(--muted); }
.clear-chk { font-size: 12px; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.switch { position: relative; width: 42px; height: 24px; display: inline-block; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #d5d9e3; border-radius: 99px; transition: .2s; cursor: pointer; }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: .2s; }
.switch input:checked + span { background: var(--primary); }
.switch input:checked + span::after { transform: translateX(18px); }
.sticky-save { position: sticky; bottom: 0; background: rgba(246, 247, 251, .95); backdrop-filter: blur(6px); padding: 12px 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 20px; }
.copy-code { font-size: 13.5px; padding: 6px 10px; display: inline-block; }
.ok-text { color: var(--ok); }
.row-link { color: inherit; }
.row-link:hover { background: #fafbfd; }
.mt { margin-top: 10px; }
@media (max-width: 860px) { .set-grid { grid-template-columns: 1fr; } }
.stack label.check, label.check { flex-direction: row; align-items: center; gap: 8px; }

/* Connect Claude */
.token-box { background: #ecfdf5; border: 1px solid #c4f0dc; border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.token-box code { font-size: 13px; word-break: break-all; background: #fff; }
.token-list { border: 1px solid var(--line); border-radius: 10px; }
.token-list .list-row { padding: 10px 14px; }
.howto summary { cursor: pointer; font-weight: 600; color: var(--primary); }
.howto pre { background: #1f2430; color: #e7e9f0; padding: 12px 14px; border-radius: 8px; font-size: 12px; overflow-x: auto; white-space: pre-wrap; word-break: break-all; cursor: copy; position: relative; }
.howto p { margin: 12px 0 6px; font-size: 13.5px; }
[data-copy].copied::after { content: "Copied ✓"; position: absolute; right: 8px; top: 6px; font-size: 11px; background: var(--ok); color: #fff; padding: 2px 6px; border-radius: 5px; }
code[data-copy] { cursor: copy; position: relative; }
.setup-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.int-status { grid-template-columns: repeat(4, 1fr); } .int-status .net-icon { border-radius: 4px; vertical-align: -3px; }

/* Bulk upload */
.bulk-grid { grid-template-columns: 1.2fr 1fr; align-items: start; }
.drop-zone { position: relative; border: 2px dashed #c7ccd8; border-radius: 14px; padding: 30px 20px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; color: var(--muted); cursor: pointer; transition: .15s; }
.drop-zone.big { padding: 44px 20px; }
.drop-zone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop-zone b { color: var(--ink); }
.drop-zone:hover, .drop-zone.drag { border-color: var(--primary); background: var(--primary-l); color: var(--primary); }
.bulk-thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.bulk-thumbs:empty { display: none; }
.table.fmt td { padding: 8px 10px; font-size: 12.5px; vertical-align: top; }
.table.fmt td:first-child { white-space: nowrap; }
.row-bad td { background: #fff8f8; }
.row-bad .chip-bad { white-space: normal; display: inline-block; max-width: 260px; }
.bulk-results h3 { margin-bottom: 6px; }
.bulk-results .post-error { margin-top: 6px; }

/* ZIP content pack */
.layout-ex { background: var(--bg); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.layout-ex pre { margin: 0; font-size: 11.5px; color: var(--ink-2); white-space: pre-wrap; }
.zip-settings { display: grid; grid-template-columns: 1fr 1.3fr; gap: 20px; margin-top: 8px; }
.when-opts { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; font-size: 13.5px; }
.when-opts label { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.when-opts input[type=number], .when-opts input[type=date], .when-opts input[type=time] { width: auto !important; padding: 4px 8px !important; }
.tiny-in { width: 64px !important; }
.time-row { margin-top: 4px; padding-top: 8px; border-top: 1px solid var(--line); }
.zip-posts { display: flex; flex-direction: column; gap: 10px; }
.zip-post { padding: 14px 16px; margin: 0; }
.zip-post:has(.zip-inc input:not(:checked)) { opacity: .5; }
.zip-inc { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; cursor: pointer; flex-wrap: wrap; }
.zip-body { display: grid; grid-template-columns: 300px 1fr; gap: 14px; }
.zip-media { display: flex; flex-direction: column; gap: 8px; }
.zip-media .select { width: 100%; }
.zip-thumbs { display: flex; flex-wrap: wrap; gap: 6px; }
.zip-thumbs img, .zip-thumbs .vid { width: 70px; height: 70px; object-fit: cover; border-radius: 8px; background: #eef0f5; position: relative; overflow: hidden; }
.zip-thumbs .vid video { width: 100%; height: 100%; object-fit: cover; }
.zip-body textarea { font-size: 13px; }
@media (max-width: 860px) { .zip-settings, .zip-body { grid-template-columns: 1fr; } }
.pick-note { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: #fff8e6; color: #946200; border-color: #f5e0a8; }

/* Teams */
.by-chip { font-size: 11px; font-weight: 600; background: #eef0f5; color: var(--muted); padding: 1px 7px; border-radius: 99px; }
.draft-tag.appr { background: #f1eaff; color: #7b3fe4; }
.appr-note { display: flex; align-items: center; gap: 6px; background: #f1eaff; color: #5b2bb5; padding: 8px 12px; border-radius: 8px; font-size: 13px; margin: 14px 0 0; }
.ws-badge { font-size: 12px; font-weight: 600; background: #f1eaff; color: #5b2bb5; padding: 4px 10px; border-radius: 99px; margin-left: -18px; }
.menu-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 8px 10px 4px; }
.ws-item { margin: 0; }
.ws-item button { width: 100%; display: flex; align-items: center; gap: 8px; padding: 7px 10px; border: 0; background: none; border-radius: 8px; cursor: pointer; font: inherit; color: var(--ink-2); text-align: left; }
.ws-item button:hover { background: var(--bg); }
.ws-item button.on { background: var(--primary-l); color: var(--primary); }
.ws-item small { color: var(--muted); font-size: 11px; }
.ws-dot { width: 22px; height: 22px; border-radius: 6px; background: linear-gradient(135deg, var(--primary), #7b5cff); color: #fff; display: grid; place-items: center; font-size: 11px; font-weight: 700; flex-shrink: 0; }
.facts.roles { grid-template-columns: 90px 1fr; }
.client-badge { width: 52px; height: 52px; border-radius: 14px; background: #1f2430; color: #fff; display: grid; place-items: center; font-size: 22px; font-weight: 800; }
.center { text-align: center; }
.wide-select { width: 100% !important; }
.oauth-box { background: var(--primary-l); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.oauth-box p { margin: 0; }
.oauth-box ul { margin: 4px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; color: var(--ink-2); }
.oauth-box code.copy-code { background: #fff; }

/* Developer app guides */
.guides .guide { border: 1px solid var(--line); border-radius: 10px; margin-top: 10px; }
.guides .guide summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 10px 14px; }
.guides .guide summary::-webkit-details-marker { display: none; }
.guides .guide summary b { flex: 1; }
.guides .guide summary .net-icon { border-radius: 7px; }
.guides .guide[open] summary { border-bottom: 1px solid var(--line); }
.guide-body { padding: 12px 16px 14px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.guide-body ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; color: var(--ink-2); }
.guide-values { border-collapse: collapse; width: 100%; font-size: 12.5px; }
.guide-values td { padding: 5px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.guide-values td:first-child { color: var(--muted); white-space: nowrap; width: 1%; }
.guide-values code { cursor: copy; word-break: break-all; position: relative; display: inline-block; }

/* Channel groups */
.groups-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; align-items: start; }
.group-card { margin: 0; padding: 14px 16px; border-top: 3px solid var(--gc, var(--primary)); }
.group-head { display: flex; align-items: center; gap: 8px; }
.group-head b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--gc, var(--primary)); flex-shrink: 0; }
.g-avatars { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.g-edit { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; }
.g-edit summary, .new-group summary { cursor: pointer; font-weight: 600; color: var(--primary); font-size: 13px; list-style: none; display: flex; align-items: center; gap: 6px; }
.g-edit summary::-webkit-details-marker, .new-group summary::-webkit-details-marker { display: none; }
.g-edit form, .new-group form { margin-top: 10px; }
.new-group { border-top-style: dashed; border-top-color: #c7ccd8; }
.g-channels { display: flex; flex-direction: column; gap: 2px; max-height: 240px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; padding: 6px; }
.g-ch { display: flex !important; flex-direction: row !important; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 6px; cursor: pointer; font-weight: 500; font-size: 13px; }
.g-ch:hover { background: var(--bg); }
.g-ch span { flex: 1; }
.color-pick { display: flex; gap: 6px; }
.color-pick input { position: absolute; opacity: 0; }
.color-pick span { width: 22px; height: 22px; border-radius: 50%; display: block; cursor: pointer; outline: 2px solid transparent; outline-offset: 2px; }
.color-pick input:checked + span { outline-color: var(--ink); }
.g-dot.big { width: 14px; height: 14px; display: inline-block; margin-right: 10px; vertical-align: 2px; }
.group-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 12px; }
.g-chip { display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--line); background: #fff; border-radius: 99px; padding: 4px 10px; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.g-chip small { color: var(--muted); font-weight: 600; }
.g-chip:hover { border-color: var(--gc); }
.g-chip.on { border-color: var(--gc); background: color-mix(in srgb, var(--gc) 12%, #fff); color: var(--ink); }

/* Plans (admin + settings) */
.pl { background: color-mix(in srgb, var(--pc, #64748b) 14%, #fff); color: var(--pc, #64748b); }
.plan-pick { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important; }
.plan-opt { border-top: 3px solid var(--pc, var(--line)) !important; }
.plans-admin { display: flex; flex-direction: column; gap: 12px; }
.plan-card { margin: 0; padding: 16px 18px; border-left: 4px solid var(--pc, var(--primary)); }
.pc-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.pc-head b { font-size: 16px; }
.pc-limits { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 6px; }
.pc-limits span { background: var(--bg); border-radius: 6px; padding: 3px 9px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.pc-edit, .new-plan { margin-top: 8px; }
.pc-edit summary, .new-plan summary { cursor: pointer; font-weight: 600; color: var(--primary); font-size: 13px; list-style: none; display: flex; gap: 6px; align-items: center; }
.pc-edit summary::-webkit-details-marker, .new-plan summary::-webkit-details-marker { display: none; }
.new-plan { border-left-style: dashed; border-left-color: #c7ccd8; }
.plan-form { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.plan-form label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 500; }
.pf-grid { display: grid; grid-template-columns: 2fr 1.4fr 1fr 1.4fr; gap: 12px; }
.pf-grid.three { grid-template-columns: repeat(3, 1fr); }
.lim { display: flex; flex-direction: column; gap: 4px; background: var(--bg); padding: 10px; border-radius: 8px; }
.lim input:disabled { opacity: .4; }
.pf-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px; }
.pf-color input { width: 56px !important; height: 36px; padding: 2px !important; }
@media (max-width: 860px) { .pf-grid, .pf-grid.three { grid-template-columns: 1fr; } }
