:root {
  color-scheme: light;
  --page: #f7f8fc;
  --surface: #ffffff;
  --surface-soft: #fafbfe;
  --surface-violet: #f4f0ff;
  --text: #171a2b;
  --text-soft: #3d4664;
  --muted: #76809b;
  --muted-2: #9ba3b7;
  --line: #e5e8f1;
  --line-strong: #d9deea;
  --primary: #6338df;
  --primary-dark: #4f28c9;
  --primary-soft: #f1ecff;
  --primary-line: #d8ccff;
  --blue: #4e7df1;
  --blue-soft: #eaf1ff;
  --green: #24965f;
  --green-soft: #e7f8ef;
  --amber: #bd7621;
  --amber-soft: #fff5e6;
  --red: #d64c5d;
  --red-soft: #fff0f2;
  --sidebar-width: 228px;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 17px;
  --shadow-sm: 0 1px 2px rgba(29, 36, 59, .03), 0 6px 22px rgba(37, 43, 70, .035);
  --shadow: 0 16px 44px rgba(43, 39, 82, .09);
  --font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--page); scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; color: var(--text); background: var(--page); font-family: var(--font); font-size: 14px; -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }
svg { display: block; }
.icon { width: 18px; height: 18px; display: inline-grid; place-items: center; flex: 0 0 auto; }
.icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 3px solid rgba(99, 56, 223, .2); outline-offset: 2px; }

.button { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line-strong); border-radius: 9px; padding: 9px 15px; background: var(--surface); color: var(--text-soft); font-weight: 650; cursor: pointer; box-shadow: 0 1px 2px rgba(25, 30, 54, .04); transition: border-color .16s ease, background .16s ease, color .16s ease, transform .16s ease, box-shadow .16s ease; }
.button:hover { border-color: #c9cfe0; background: #fafaff; transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button.primary { color: #fff; border-color: var(--primary); background: linear-gradient(145deg, #7042e7, #5c31d8); box-shadow: 0 7px 18px rgba(88, 49, 209, .2); }
.button.primary:hover { background: linear-gradient(145deg, #7a4bec, #552bcf); box-shadow: 0 9px 24px rgba(88, 49, 209, .25); }
.button.secondary { background: var(--surface); }
.button.danger { color: var(--red); border-color: #f1c5cc; background: var(--red-soft); box-shadow: none; }
.button.small { min-height: 34px; padding: 7px 11px; font-size: 12px; }
.button.wide { width: 100%; }
.button:disabled { opacity: .55; cursor: wait; transform: none; box-shadow: none; }
.icon-button { width: 38px; height: 38px; display: inline-grid; place-items: center; flex: 0 0 auto; padding: 0; border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; transition: .16s ease; }
.icon-button:hover { color: var(--primary); border-color: var(--line); background: var(--surface-soft); }
.text-button { display: inline-flex; align-items: center; gap: 5px; padding: 5px 0; border: 0; background: transparent; color: var(--primary); font-size: 12px; font-weight: 650; cursor: pointer; }
.text-button .icon { width: 15px; height: 15px; transition: transform .16s ease; }
.text-button:hover .icon { transform: translateX(2px); }

input, textarea, select { width: 100%; border: 1px solid var(--line-strong); border-radius: 8px; outline: 0; padding: 10px 12px; color: var(--text); background: var(--surface); transition: border-color .16s ease, box-shadow .16s ease; }
input::placeholder, textarea::placeholder { color: #aab1c2; }
input:focus, textarea:focus, select:focus { border-color: #a992f0; box-shadow: 0 0 0 3px rgba(99, 56, 223, .09); }
textarea { min-height: 90px; resize: vertical; line-height: 1.5; }
.field { display: block; min-width: 0; }
.field > span:first-child { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 7px; color: var(--text-soft); font-size: 12px; font-weight: 650; }
.field .hint { color: var(--muted-2); font-weight: 500; }
.form-error { min-height: 18px; margin: 7px 0 0; color: var(--red); font-size: 12px; }

.login-view { position: relative; min-height: 100vh; display: grid; place-items: center; overflow: hidden; padding: 28px; background: linear-gradient(145deg, #fbfaff 0%, #f6f3ff 48%, #f8f9fd 100%); }
.login-view::before { content: ""; position: absolute; inset: 0; opacity: .34; background-image: linear-gradient(#ded8f6 1px, transparent 1px), linear-gradient(90deg, #ded8f6 1px, transparent 1px); background-size: 42px 42px; mask-image: radial-gradient(circle at center, black, transparent 68%); }
.login-orb { position: absolute; border-radius: 50%; filter: blur(1px); opacity: .6; }
.login-orb-a { width: 430px; height: 430px; top: -190px; right: 4%; background: radial-gradient(circle at 36% 38%, #d4c4ff, transparent 65%); }
.login-orb-b { width: 370px; height: 370px; left: 5%; bottom: -180px; background: radial-gradient(circle at 55% 42%, #cde1ff, transparent 65%); }
.login-card { position: relative; z-index: 1; width: min(430px, 100%); padding: 38px; border: 1px solid rgba(222, 217, 239, .92); border-radius: 20px; background: rgba(255, 255, 255, .9); box-shadow: 0 26px 80px rgba(53, 42, 95, .14); backdrop-filter: blur(14px); }
.login-brand { display: flex; align-items: center; gap: 9px; margin-bottom: 37px; color: var(--primary); font-size: 22px; font-weight: 800; letter-spacing: -.045em; }
.brand-mark { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 10px; color: #fff; background: linear-gradient(145deg, #7550ed, #5530d1); box-shadow: 0 7px 18px rgba(86, 45, 206, .22); }
.brand-mark svg { width: 27px; height: 27px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.login-kicker { margin: 0 0 9px; color: var(--primary); font-size: 11px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.login-card h1 { margin: 0; font-size: 31px; line-height: 1.18; letter-spacing: -.04em; }
.login-copy { margin: 11px 0 26px; color: var(--muted); line-height: 1.6; }
.login-form { display: grid; gap: 5px; }
.password-control { position: relative; display: block; }
.password-control input { padding-right: 44px; }
.field-icon-button { position: absolute; top: 50%; right: 4px; width: 37px; height: 37px; display: grid; place-items: center; transform: translateY(-50%); border: 0; border-radius: 7px; background: transparent; color: var(--muted); cursor: pointer; }
.login-form .button { margin-top: 8px; }
.login-foot { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 24px 0 0; color: var(--muted); font-size: 11px; }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; z-index: 50; inset: 0 auto 0 0; width: var(--sidebar-width); display: flex; flex-direction: column; border-right: 1px solid var(--line); padding: 24px 18px 17px; background: rgba(255, 255, 255, .98); }
.brand { height: 45px; display: flex; align-items: flex-start; gap: 8px; padding: 1px 11px 0; color: var(--primary); }
.brand-word { font-size: 22px; line-height: 34px; font-weight: 820; letter-spacing: -.055em; }
.brand-cat { width: 30px; height: 30px; color: var(--primary); }
.brand-cat svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nav { display: grid; gap: 6px; margin-top: 26px; }
.nav-item { width: 100%; min-height: 43px; display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 12px; border: 0; border-radius: 9px; padding: 9px 12px; color: #60708f; background: transparent; text-align: left; cursor: pointer; transition: .15s ease; }
.nav-item > span:nth-child(2) { font-size: 13px; font-weight: 590; }
.nav-item:hover { color: var(--primary); background: #f8f6ff; }
.nav-item.active { color: var(--primary); background: var(--primary-soft); }
.nav-item.active > span:nth-child(2) { font-weight: 700; }
.nav-badge { min-width: 22px; padding: 2px 6px; border-radius: 10px; color: var(--primary); background: #e7defe; font-size: 10px; font-weight: 750; text-align: center; }
.nav-badge.error { color: var(--red); background: var(--red-soft); }
.sidebar-user { display: grid; grid-template-columns: 39px 1fr 35px; align-items: center; gap: 10px; margin-top: auto; padding: 16px 2px 1px; border-top: 1px solid var(--line); }
.user-avatar { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: linear-gradient(145deg, #322c4f, #6d5c99); font-weight: 750; box-shadow: inset 0 0 0 3px #edeafb; }
.user-meta { min-width: 0; }
.user-meta strong, .user-meta small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-meta strong { font-size: 12px; }
.user-meta small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.sidebar-scrim { position: fixed; z-index: 45; inset: 0; background: rgba(25, 25, 45, .32); backdrop-filter: blur(2px); }

.main { min-width: 0; margin-left: var(--sidebar-width); padding: 0 30px 54px; }
.topbar { min-height: 89px; display: flex; align-items: center; gap: 18px; border-bottom: 1px solid var(--line); margin-bottom: 25px; background: rgba(247, 248, 252, .94); }
.page-heading { margin-right: auto; }
.page-heading h1 { margin: 0; font-size: 22px; line-height: 1.25; letter-spacing: -.03em; }
.page-heading p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.search-box, .compact-search { display: flex; align-items: center; gap: 9px; color: var(--muted); }
.search-box { width: 230px; height: 40px; border: 1px solid var(--line-strong); border-radius: 9px; padding: 0 10px; background: var(--surface); }
.search-box input, .compact-search input { min-width: 0; height: auto; border: 0; padding: 0; background: transparent; box-shadow: none; }
.search-box input:focus, .compact-search input:focus { box-shadow: none; }
.search-box kbd { min-width: 20px; height: 20px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 5px; color: var(--muted-2); background: var(--surface-soft); font-family: inherit; font-size: 10px; }
.top-icon { border-color: var(--line-strong); background: var(--surface); }
.notification-dot { position: absolute; width: 8px; height: 8px; margin: -20px 0 0 18px; border: 2px solid white; border-radius: 50%; background: var(--red); }
.mobile-menu { display: none; }
.progress-bar { position: fixed; z-index: 80; top: 0; left: var(--sidebar-width); right: 0; height: 3px; opacity: 0; transform: scaleX(.1); transform-origin: left; background: linear-gradient(90deg, var(--primary), #a27cff); transition: opacity .2s, transform .4s; }
.progress-bar.active { opacity: 1; transform: scaleX(.78); }
.progress-bar.done { opacity: 0; transform: scaleX(1); }

.view { display: none; max-width: 1450px; margin: 0 auto; animation: view-in .18s ease; }
.view.active { display: block; }
@keyframes view-in { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
.section-title-row { min-height: 45px; display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 17px; }
.section-title-row h2 { margin: 0; font-size: 19px; letter-spacing: -.02em; }
.section-title-row p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.scanner-chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border: 1px solid #d9f0e4; border-radius: 18px; color: var(--green); background: #f4fbf7; font-size: 11px; font-weight: 650; }
.status-dot { width: 7px; height: 7px; display: inline-block; border-radius: 50%; background: var(--muted-2); }
.status-dot.online { background: #32ad72; box-shadow: 0 0 0 4px rgba(50, 173, 114, .1); }
.status-dot.warning { background: #d69230; box-shadow: 0 0 0 4px rgba(214, 146, 48, .1); }
.status-dot.error { background: var(--red); box-shadow: 0 0 0 4px rgba(214, 76, 93, .1); }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.panel-head { min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 17px 18px; border-bottom: 1px solid var(--line); }
.panel-head > div:first-child { display: flex; align-items: center; gap: 11px; }
.panel-head h3 { margin: 0; font-size: 14px; letter-spacing: -.01em; }
.panel-head p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.section-icon, .metric-icon { display: grid; place-items: center; border-radius: 9px; color: var(--primary); background: var(--primary-soft); }
.section-icon { width: 34px; height: 34px; }
.section-icon.soft { color: #526a9f; background: #f0f4fc; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 17px; }
.metric-card { min-height: 94px; display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 11px; padding: 16px; }
.metric-card .metric-icon { width: 42px; height: 42px; }
.metric-icon.violet { color: var(--primary); background: var(--primary-soft); }
.metric-icon.blue { color: var(--blue); background: var(--blue-soft); }
.metric-icon.green { color: var(--green); background: var(--green-soft); }
.metric-icon.amber { color: var(--amber); background: var(--amber-soft); }
.metric-icon.red { color: var(--red); background: var(--red-soft); }
.metric-copy strong { display: block; font-size: 22px; line-height: 1; letter-spacing: -.04em; }
.metric-copy span { display: block; margin-top: 7px; color: var(--muted); font-size: 11px; }
.metric-trend { align-self: start; padding: 3px 6px; border-radius: 6px; color: var(--green); background: var(--green-soft); font-size: 9px; font-weight: 700; }

.channel-grid { display: grid; grid-template-columns: repeat(5, minmax(190px, 1fr)); gap: 10px; margin-bottom: 17px; }
.channel-card { min-width: 0; overflow: hidden; transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.channel-card:hover { transform: translateY(-2px); border-color: #d9d3ed; box-shadow: 0 13px 30px rgba(49, 41, 86, .09); }
.channel-banner { position: relative; height: 73px; overflow: hidden; cursor: pointer; background: linear-gradient(130deg, var(--banner-a), var(--banner-b)); }
.channel-banner::before, .channel-banner::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .26); filter: blur(.2px); }
.channel-banner::before { width: 105px; height: 105px; top: -68px; right: -10px; }
.channel-banner::after { width: 82px; height: 82px; left: 20px; bottom: -62px; }
.channel-banner .banner-lines { position: absolute; inset: 0; opacity: .35; background-image: linear-gradient(115deg, transparent 46%, rgba(255, 255, 255, .55) 47%, transparent 48%), linear-gradient(20deg, transparent 54%, rgba(255, 255, 255, .35) 55%, transparent 56%); background-size: 60px 80px, 85px 55px; }
.channel-banner.has-image .banner-lines { opacity: .12; }
.banner-edit { position: absolute; z-index: 2; top: 8px; right: 8px; width: 25px; height: 25px; border: 0; border-radius: 50%; display: grid; place-items: center; color: #596078; background: rgba(255, 255, 255, .9); cursor: pointer; }
.banner-edit .icon { width: 13px; height: 13px; }
.channel-body { position: relative; padding: 0 12px 9px; }
.channel-identity { display: grid; grid-template-columns: 42px minmax(0, 1fr); align-items: center; gap: 9px; margin-top: -15px; }
.channel-avatar, .mini-avatar { display: grid; place-items: center; overflow: hidden; border-radius: 50%; color: #fff; background: linear-gradient(145deg, var(--avatar-a), var(--avatar-b)); font-weight: 750; }
.channel-avatar { position: relative; z-index: 2; width: 42px; height: 42px; border: 3px solid #fff; box-shadow: 0 2px 8px rgba(35, 37, 63, .12); font-size: 13px; }
.channel-avatar img, .mini-avatar img { width: 100%; height: 100%; object-fit: cover; }
.channel-name { min-width: 0; padding-top: 17px; }
.channel-name strong, .channel-name small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.channel-name strong { font-size: 12px; }
.channel-name small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.channel-id { margin: 11px 0 8px; color: #79839c; font-size: 10px; }
.channel-state-line { min-height: 25px; display: flex; align-items: center; justify-content: space-between; gap: 7px; }
.status-pill { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; padding: 4px 7px; border-radius: 6px; color: #64708a; background: #f1f3f8; font-size: 9px; font-weight: 670; white-space: nowrap; }
.status-pill.success { color: var(--green); background: var(--green-soft); }
.status-pill.warning { color: var(--amber); background: var(--amber-soft); }
.status-pill.error { color: var(--red); background: var(--red-soft); }
.autopost-mini { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 9px; }
.switch { position: relative; flex: 0 0 auto; width: 33px; height: 19px; display: inline-block; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch i { position: absolute; inset: 0; border-radius: 12px; background: #d9ddeb; cursor: pointer; transition: .18s ease; }
.switch i::after { content: ""; position: absolute; width: 15px; height: 15px; left: 2px; top: 2px; border-radius: 50%; background: white; box-shadow: 0 1px 3px rgba(30, 35, 55, .18); transition: transform .18s ease; }
.switch input:checked + i { background: var(--primary); }
.switch input:checked + i::after { transform: translateX(14px); }
.channel-footer { display: grid; grid-template-columns: 1fr 1fr 32px; align-items: center; min-height: 37px; border-top: 1px solid var(--line); }
.channel-footer button { min-width: 0; height: 37px; display: flex; align-items: center; justify-content: center; gap: 5px; border: 0; border-right: 1px solid var(--line); padding: 0 7px; color: #6d7893; background: transparent; font-size: 9px; cursor: pointer; }
.channel-footer button:last-child { border-right: 0; }
.channel-footer button:hover { color: var(--primary); background: #fbfaff; }
.channel-footer .icon { width: 14px; height: 14px; }
.count-bubble { min-width: 17px; padding: 2px 5px; border-radius: 9px; color: var(--primary); background: var(--primary-soft); font-size: 8px; font-weight: 750; }

.broadcast-panel { margin-bottom: 17px; overflow: hidden; }
.broadcast-form { padding: 16px; }
.broadcast-grid { display: grid; grid-template-columns: minmax(230px, 1.1fr) minmax(190px, .76fr) minmax(290px, 1.25fr) minmax(210px, .78fr); gap: 14px; align-items: stretch; }
.composer-step { min-width: 0; display: flex; flex-direction: column; }
.step-label { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; color: var(--text-soft); font-size: 10px; font-weight: 720; }
.step-label b { width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; color: var(--primary); background: var(--primary-soft); font-size: 9px; }
.caption-wrap { position: relative; flex: 1; }
.caption-wrap textarea { height: 104px; min-height: 104px; padding-bottom: 25px; }
.char-count { position: absolute; right: 9px; bottom: 8px; color: var(--muted-2); font-size: 9px; }
.broadcast-drop { flex: 1; min-height: 104px; display: grid; place-items: center; border: 1px dashed #cdd3e4; border-radius: 9px; padding: 10px; color: #75809b; background: var(--surface-soft); text-align: center; cursor: pointer; transition: .16s ease; }
.broadcast-drop:hover, .broadcast-drop.dragging { border-color: #a58eea; color: var(--primary); background: #faf8ff; }
.broadcast-drop input { display: none; }
.drop-content { display: grid; justify-items: center; gap: 5px; }
.drop-content .icon { width: 24px; height: 24px; color: #8e80c6; }
.drop-content strong { font-size: 10px; }
.drop-content small { color: var(--muted-2); font-size: 9px; }
.broadcast-files { display: flex; align-items: center; gap: 5px; min-height: 25px; margin-top: 6px; overflow: hidden; }
.file-mini { position: relative; width: 25px; height: 25px; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); background: #f2f4f8; font-size: 8px; }
.file-mini img { width: 100%; height: 100%; object-fit: cover; }
.file-overflow { color: var(--primary); font-size: 10px; font-weight: 700; }
.album-warning { min-height: 25px; display: flex; align-items: center; gap: 5px; margin-top: 6px; color: var(--amber); font-size: 9px; line-height: 1.35; }
.album-warning .icon { width: 13px; height: 13px; }
.recipient-tools { display: flex; justify-content: space-between; gap: 12px; margin: -1px 0 7px; }
.recipient-tools button { border: 0; padding: 0; color: var(--primary); background: transparent; font-size: 9px; font-weight: 650; cursor: pointer; }
.recipient-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; max-height: 115px; overflow: auto; padding-right: 3px; }
.recipient-chip { min-width: 0; display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 7px; padding: 5px 7px; color: #5f6a83; background: #fff; cursor: pointer; }
.recipient-chip:has(input:checked) { border-color: #ab94ef; color: var(--primary); background: #faf8ff; box-shadow: inset 0 0 0 1px #e5dcff; }
.recipient-chip input { width: 13px; height: 13px; accent-color: var(--primary); }
.recipient-chip span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 9px; font-weight: 600; }
.mini-avatar { width: 20px; height: 20px; font-size: 7px; }
.broadcast-action { border-left: 1px solid var(--line); padding-left: 14px; }
.compact-field { margin-bottom: 8px; }
.compact-field > span:first-child { margin-bottom: 5px; font-size: 9px; }
.compact-field input { padding: 7px 9px; font-size: 10px; }
.send-modes { display: flex; gap: 5px; margin: auto 0 8px; }
.send-modes label { flex: 1; }
.send-modes input { display: none; }
.send-modes span { min-height: 30px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); background: #fff; font-size: 9px; cursor: pointer; }
.send-modes input:checked + span { border-color: var(--primary-line); color: var(--primary); background: var(--primary-soft); font-weight: 680; }
.schedule-input { margin-bottom: 8px; }
.broadcast-action .button { min-height: 37px; font-size: 10px; }
.composer-disclaimer { margin: 8px 0 0; color: var(--muted-2); font-size: 8px; line-height: 1.4; text-align: center; }
.recent-panel { margin-bottom: 18px; overflow: hidden; }
.event-list { padding: 3px 18px 9px; }
.event-item { display: grid; grid-template-columns: 31px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid #f0f1f5; }
.event-item:last-child { border-bottom: 0; }
.event-type { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 8px; color: var(--blue); background: var(--blue-soft); }
.event-type.success { color: var(--green); background: var(--green-soft); }
.event-type.warning { color: var(--amber); background: var(--amber-soft); }
.event-type.error { color: var(--red); background: var(--red-soft); }
.event-type .icon { width: 15px; height: 15px; }
.event-copy { min-width: 0; }
.event-copy strong, .event-copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.event-copy strong { font-size: 11px; }
.event-copy span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.event-time { color: var(--muted-2); font-size: 9px; white-space: nowrap; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 12px; padding: 10px 12px; }
.compact-search { width: min(370px, 100%); height: 34px; padding: 0 7px; }
.segmented { display: flex; align-items: center; gap: 3px; padding: 3px; border-radius: 8px; background: #f2f4f8; }
.segmented button { min-height: 28px; border: 0; border-radius: 6px; padding: 5px 10px; color: var(--muted); background: transparent; font-size: 10px; font-weight: 620; cursor: pointer; }
.segmented button.active { color: var(--text); background: white; box-shadow: 0 1px 4px rgba(34, 40, 64, .09); }
.channel-directory { display: grid; gap: 8px; }
.directory-row { display: grid; grid-template-columns: minmax(230px, 1.2fr) minmax(220px, .9fr) repeat(3, 90px) 120px 38px; align-items: center; gap: 13px; padding: 12px 14px; cursor: pointer; transition: .15s ease; }
.directory-row:hover { border-color: #d9d2ed; box-shadow: 0 8px 20px rgba(46, 42, 74, .06); }
.directory-channel { display: flex; align-items: center; gap: 10px; min-width: 0; }
.directory-channel .channel-avatar { width: 39px; height: 39px; border-width: 2px; flex: 0 0 auto; }
.directory-channel strong, .directory-channel small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.directory-channel strong { font-size: 12px; }
.directory-channel small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.directory-path { min-width: 0; color: var(--muted); }
.directory-path code { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: "Cascadia Mono", Consolas, monospace; font-size: 9px; }
.directory-path small { display: block; margin-top: 3px; font-size: 9px; }
.directory-stat { text-align: center; }
.directory-stat strong, .directory-stat span { display: block; }
.directory-stat strong { font-size: 13px; }
.directory-stat span { margin-top: 3px; color: var(--muted); font-size: 9px; }

.table-panel { overflow: hidden; }
.table-scroll { overflow: auto; }
.data-table { width: 100%; border-collapse: collapse; text-align: left; }
.data-table th { height: 42px; padding: 9px 13px; color: #8992aa; background: var(--surface-soft); font-size: 9px; font-weight: 700; letter-spacing: .035em; text-transform: uppercase; white-space: nowrap; }
.data-table td { height: 58px; padding: 10px 13px; border-top: 1px solid var(--line); color: var(--text-soft); font-size: 10px; vertical-align: middle; }
.data-table tbody tr:hover { background: #fcfbff; }
.table-channel { display: flex; align-items: center; gap: 8px; min-width: 155px; }
.table-channel .mini-avatar { width: 30px; height: 30px; font-size: 9px; }
.table-channel strong, .table-channel span { display: block; }
.table-channel span { margin-top: 2px; color: var(--muted); font-size: 9px; }
.path-cell { max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #69758f; font-family: "Cascadia Mono", Consolas, monospace; font-size: 9px; }
.schedule-text { display: inline-flex; align-items: center; gap: 5px; color: var(--text-soft); }
.schedule-text .icon { width: 14px; height: 14px; color: var(--muted); }
.row-actions { display: flex; justify-content: flex-end; gap: 2px; }

.broadcast-history { padding: 5px 18px 12px; }
.broadcast-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto auto; align-items: center; gap: 11px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.broadcast-row:last-child { border-bottom: 0; }
.broadcast-row .event-type { width: 36px; height: 36px; }
.broadcast-copy { min-width: 0; }
.broadcast-copy strong, .broadcast-copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.broadcast-copy strong { font-size: 11px; }
.broadcast-copy span { margin-top: 4px; color: var(--muted); font-size: 9px; }
.broadcast-targets { color: var(--muted); font-size: 9px; white-space: nowrap; }

.schedule-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 13px; }
.schedule-summary article { display: flex; align-items: center; gap: 11px; padding: 15px; }
.schedule-summary .metric-icon { width: 40px; height: 40px; }
.schedule-summary strong, .schedule-summary span { display: block; }
.schedule-summary strong { font-size: 18px; letter-spacing: -.03em; }
.schedule-summary span { margin-top: 4px; color: var(--muted); font-size: 10px; }
.schedule-board { display: grid; gap: 9px; }
.schedule-day { overflow: hidden; }
.schedule-day-head { display: flex; align-items: center; justify-content: space-between; padding: 13px 15px; border-bottom: 1px solid var(--line); background: var(--surface-soft); }
.schedule-day-head strong { font-size: 11px; }
.schedule-day-head span { color: var(--muted); font-size: 9px; }
.schedule-runs { display: grid; }
.schedule-run { display: grid; grid-template-columns: 72px minmax(190px, 1fr) minmax(170px, 1fr) auto; align-items: center; gap: 13px; padding: 11px 15px; border-bottom: 1px solid var(--line); }
.schedule-run:last-child { border-bottom: 0; }
.run-time { color: var(--primary); font-size: 12px; font-weight: 750; }

.log-table td:first-child { white-space: nowrap; }
.level-label { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; }
.level-label::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--blue); }
.level-label.success { color: var(--green); }.level-label.success::before { background: var(--green); }
.level-label.warning { color: var(--amber); }.level-label.warning::before { background: var(--amber); }
.level-label.error { color: var(--red); }.level-label.error::before { background: var(--red); }
.pagination { min-height: 45px; display: flex; align-items: center; justify-content: center; gap: 5px; padding: 8px; border-top: 1px solid var(--line); }
.pagination button { min-width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); background: white; font-size: 10px; cursor: pointer; }
.pagination button.active { border-color: var(--primary); color: white; background: var(--primary); }
.pagination button:disabled { opacity: .45; cursor: default; }

.settings-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.settings-section { overflow: hidden; }
.settings-section > .button { margin: 0 18px 18px; }
.info-callout { display: flex; align-items: flex-start; gap: 10px; margin: 15px 18px; border: 1px solid #ddd4fb; border-radius: 9px; padding: 12px; color: #5e5680; background: #faf8ff; line-height: 1.55; }
.info-callout .icon { margin-top: 1px; color: var(--primary); }
.info-callout p { margin: 0; font-size: 10px; }
.info-callout.compact { margin: 13px 0 0; }
.settings-list { margin: 0; padding: 0 18px 17px; }
.settings-list div { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.banner-manager { display: grid; gap: 11px; }
.banner-manager-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.banner-manager-head strong, .banner-manager-head small { display: block; }
.banner-manager-head strong { font-size: 12px; }
.banner-manager-head small { margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.banner-manager-actions { display: flex; flex: 0 0 auto; gap: 7px; }
.banner-manager-actions label.button { cursor: pointer; }
.banner-preview { height: 168px; display: grid; place-items: center; overflow: hidden; border: 1px dashed var(--line-strong); border-radius: 10px; color: var(--muted); background: linear-gradient(135deg, #eee9ff, #eef5ff); }
.banner-preview span { display: flex; align-items: center; gap: 7px; font-size: 10px; }
.banner-preview img { width: 100%; height: 100%; object-fit: cover; }
.banner-preview.has-image { border-style: solid; }
.settings-list div:last-child { border-bottom: 0; }
.settings-list dt { color: var(--muted); font-size: 10px; }
.settings-list dd { margin: 0; color: var(--text-soft); font-size: 10px; font-weight: 650; text-align: right; }

.empty-state { min-height: 145px; display: grid; place-items: center; align-content: center; gap: 6px; border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 25px; color: var(--muted); text-align: center; }
.empty-state .empty-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; color: var(--primary); background: var(--primary-soft); }
.empty-state strong { color: var(--text-soft); font-size: 12px; }
.empty-state span { max-width: 420px; font-size: 10px; line-height: 1.5; }
.skeleton { position: relative; overflow: hidden; background: #eef0f5; }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.68), transparent); animation: shimmer 1.25s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }

.back-button { display: inline-flex; align-items: center; gap: 7px; border: 0; padding: 3px 0; margin-bottom: 12px; color: var(--muted); background: transparent; font-size: 11px; cursor: pointer; }
.back-button:hover { color: var(--primary); }
.back-button .icon { width: 15px; height: 15px; }
.channel-hero { position: relative; min-height: 148px; display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 20px; overflow: hidden; padding: 19px; margin-bottom: 11px; background: linear-gradient(110deg, #fff 0%, #fff 54%, var(--hero-a) 100%); }
.channel-hero::after { content: ""; position: absolute; width: 260px; height: 260px; top: -164px; right: 35px; border-radius: 50%; background: var(--hero-b); opacity: .24; }
.hero-channel { position: relative; z-index: 1; display: flex; align-items: center; gap: 13px; min-width: 0; }
.hero-channel .channel-avatar { width: 64px; height: 64px; border-width: 4px; font-size: 18px; }
.hero-channel h2 { margin: 0; font-size: 20px; letter-spacing: -.03em; }
.hero-channel p { margin: 4px 0 8px; color: var(--muted); font-size: 11px; }
.hero-actions { position: relative; z-index: 1; display: flex; gap: 8px; }
.channel-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 11px; }
.channel-metric { min-height: 77px; display: flex; align-items: center; gap: 10px; padding: 13px; }
.channel-metric .metric-icon { width: 36px; height: 36px; }
.channel-metric strong, .channel-metric span { display: block; }
.channel-metric strong { font-size: 18px; }
.channel-metric span { margin-top: 4px; color: var(--muted); font-size: 9px; }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 11px; align-items: start; }
.detail-main { min-width: 0; overflow: hidden; }
.detail-tabs { display: flex; gap: 3px; overflow: auto; padding: 10px 12px 0; border-bottom: 1px solid var(--line); }
.detail-tabs button { min-height: 38px; border: 0; border-bottom: 2px solid transparent; padding: 8px 11px; color: var(--muted); background: transparent; font-size: 10px; font-weight: 620; cursor: pointer; white-space: nowrap; }
.detail-tabs button.active { border-color: var(--primary); color: var(--primary); }
.tab-content { min-height: 390px; padding: 15px; }
.detail-side { display: grid; gap: 11px; }
.side-card { overflow: hidden; }
.side-card-head { display: flex; align-items: center; gap: 8px; padding: 13px; border-bottom: 1px solid var(--line); }
.side-card-head .icon { color: var(--primary); }
.side-card-head strong { font-size: 11px; }
.side-card-body { padding: 13px; }
.folder-path { display: block; overflow-wrap: anywhere; border: 1px solid var(--line); border-radius: 7px; padding: 9px; color: #5c6881; background: var(--surface-soft); font-family: "Cascadia Mono", Consolas, monospace; font-size: 9px; line-height: 1.5; }
.copy-row { display: flex; gap: 6px; margin-top: 8px; }
.copy-row .button { flex: 1; }
.scan-meta { display: grid; gap: 8px; margin-top: 12px; color: var(--muted); font-size: 9px; }
.scan-meta span { display: flex; justify-content: space-between; gap: 10px; }
.scan-meta b { color: var(--text-soft); font-weight: 600; }
.content-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 9px; margin-bottom: 12px; }
.content-toolbar .compact-search { max-width: 300px; }
.content-filters { display: flex; gap: 5px; }
.content-filters select { width: auto; min-width: 115px; padding: 7px 24px 7px 9px; font-size: 9px; }
.media-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.media-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: white; cursor: pointer; transition: .15s ease; }
.media-card:hover { border-color: #bba9ef; transform: translateY(-1px); box-shadow: 0 7px 18px rgba(44, 40, 75, .08); }
.media-preview { position: relative; aspect-ratio: 1 / 1; overflow: hidden; background: #f1f2f6; }
.media-preview img, .media-preview video { width: 100%; height: 100%; object-fit: cover; }
.media-kind { position: absolute; top: 6px; right: 6px; width: 23px; height: 23px; display: grid; place-items: center; border-radius: 6px; color: white; background: rgba(29, 31, 45, .62); backdrop-filter: blur(4px); }
.media-kind .icon { width: 13px; height: 13px; }
.media-order { position: absolute; left: 6px; bottom: 6px; padding: 3px 5px; border-radius: 5px; color: white; background: rgba(29, 31, 45, .62); font-size: 8px; }
.media-info { padding: 7px; }
.media-info strong, .media-info span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-info strong { font-size: 9px; }
.media-info span { margin-top: 4px; color: var(--muted); font-size: 8px; }
.tab-pagination { margin-top: 13px; border-top: 0; }
.settings-form { display: grid; gap: 14px; }
.settings-form .form-grid { gap: 11px; }
.settings-form textarea { min-height: 110px; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 4px; }
.switch-row { min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; }
.switch-row strong, .switch-row small { display: block; }
.switch-row strong { font-size: 10px; }
.switch-row small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.lane-list { display: grid; gap: 9px; margin-top: 12px; }
.lane-card { border: 1px solid var(--line); border-radius: 9px; padding: 12px; background: var(--surface-soft); }
.lane-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.lane-head strong { font-size: 10px; }
.lane-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.history-list, .error-list { display: grid; }
.history-row, .error-row { display: grid; grid-template-columns: 35px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.history-row:last-child, .error-row:last-child { border-bottom: 0; }
.history-copy strong, .history-copy span, .error-copy strong, .error-copy span { display: block; }
.history-copy strong, .error-copy strong { font-size: 10px; }
.history-copy span, .error-copy span { margin-top: 3px; color: var(--muted); font-size: 9px; }

.dialog { width: min(640px, calc(100vw - 28px)); max-height: calc(100vh - 28px); overflow: auto; border: 0; border-radius: 15px; padding: 0; color: var(--text); background: white; box-shadow: 0 28px 90px rgba(24, 20, 46, .24); }
.dialog::backdrop { background: rgba(25, 24, 42, .42); backdrop-filter: blur(3px); }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 19px 20px; border-bottom: 1px solid var(--line); }
.dialog-head h2 { margin: 0; font-size: 17px; }
.dialog-head p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.dialog-body { padding: 17px 20px; }
.form-grid { display: grid; gap: 13px; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dialog-body > .form-grid + .form-grid, .dialog-body > .field, .dialog-body > .form-grid + .path-preview { margin-top: 13px; }
.path-preview { display: flex; align-items: center; gap: 10px; border: 1px solid var(--primary-line); border-radius: 9px; padding: 10px 12px; color: var(--primary); background: var(--primary-soft); }
.path-preview > .icon { width: 20px; height: 20px; }
.path-preview div { min-width: 0; }
.path-preview small, .path-preview code { display: block; }
.path-preview small { margin-bottom: 4px; color: #786c9f; font-size: 9px; }
.path-preview code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: "Cascadia Mono", Consolas, monospace; font-size: 9px; }
.dialog-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 13px 20px; border-top: 1px solid var(--line); background: var(--surface-soft); }
.media-dialog { width: min(760px, calc(100vw - 28px)); }
.media-dialog-preview { min-height: 300px; max-height: 58vh; display: grid; place-items: center; overflow: hidden; background: #14151b; }
.media-dialog-preview img, .media-dialog-preview video { max-width: 100%; max-height: 58vh; object-fit: contain; }
.media-dialog-meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 13px 20px; }
.media-meta-item { min-width: 0; }
.media-meta-item span, .media-meta-item strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-meta-item span { color: var(--muted); font-size: 8px; text-transform: uppercase; }
.media-meta-item strong { margin-top: 4px; font-size: 9px; }

.toast-region { position: fixed; z-index: 100; right: 20px; bottom: 20px; display: grid; gap: 8px; width: min(350px, calc(100vw - 40px)); pointer-events: none; }
.toast { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 11px; color: var(--text-soft); background: rgba(255,255,255,.97); box-shadow: var(--shadow); animation: toast-in .2s ease; pointer-events: auto; }
.toast.removing { opacity: 0; transform: translateY(5px); transition: .2s ease; }
.toast-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; color: var(--green); background: var(--green-soft); }
.toast.error .toast-icon { color: var(--red); background: var(--red-soft); }
.toast.warning .toast-icon { color: var(--amber); background: var(--amber-soft); }
.toast strong, .toast span { display: block; }
.toast strong { font-size: 10px; }
.toast span { margin-top: 3px; color: var(--muted); font-size: 9px; }
.toast button { width: 24px; height: 24px; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 1320px) {
  .channel-grid { grid-template-columns: repeat(4, minmax(190px, 1fr)); }
  .broadcast-grid { grid-template-columns: 1fr .8fr 1fr; }
  .broadcast-action { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr 160px; gap: 8px; align-items: end; border-left: 0; border-top: 1px solid var(--line); padding: 12px 0 0; }
  .broadcast-action .send-modes { margin: 0; }
  .broadcast-action .schedule-input { margin: 0; }
  .broadcast-action .composer-disclaimer { display: none; }
}

@media (max-width: 1120px) {
  .main { padding-left: 22px; padding-right: 22px; }
  .channel-grid { grid-template-columns: repeat(3, minmax(190px, 1fr)); }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .directory-row { grid-template-columns: minmax(210px, 1.2fr) minmax(180px, 1fr) repeat(2, 70px) 105px 38px; }
  .directory-row .directory-stat:nth-of-type(3) { display: none; }
  .detail-layout { grid-template-columns: minmax(0, 1fr) 245px; }
  .media-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 920px) {
  :root { --sidebar-width: 205px; }
  .sidebar { padding-left: 13px; padding-right: 13px; }
  .main { padding-left: 18px; padding-right: 18px; }
  .search-box { width: 190px; }
  .top-actions .button span:last-child { display: none; }
  .channel-grid { grid-template-columns: repeat(2, minmax(190px, 1fr)); }
  .broadcast-grid { grid-template-columns: 1fr 1fr; }
  .broadcast-action { grid-column: auto; display: flex; border-left: 1px solid var(--line); border-top: 0; padding: 0 0 0 14px; }
  .broadcast-action .send-modes { margin: auto 0 8px; }
  .broadcast-action .schedule-input { margin-bottom: 8px; }
  .broadcast-action .composer-disclaimer { display: block; }
  .recipient-list { max-height: 115px; }
  .directory-row { grid-template-columns: 1fr 160px 70px 100px 38px; }
  .directory-row .directory-stat:nth-of-type(2), .directory-row .directory-stat:nth-of-type(3) { display: none; }
  .settings-layout { grid-template-columns: 1fr; }
  .detail-layout { grid-template-columns: 1fr; }
  .detail-side { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  :root { --sidebar-width: 244px; }
  .sidebar { transform: translateX(-105%); box-shadow: 18px 0 50px rgba(34, 30, 63, .15); transition: transform .22s ease; }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; padding: 0 14px 40px; }
  .topbar { position: sticky; z-index: 35; top: 0; min-height: 68px; margin: 0 -14px 18px; padding: 0 14px; background: rgba(247, 248, 252, .94); backdrop-filter: blur(12px); }
  .mobile-menu { display: grid; border-color: var(--line); background: white; }
  .page-heading h1 { font-size: 17px; }
  .page-heading p, .search-box, .top-icon { display: none; }
  .top-actions .button { width: 38px; min-height: 38px; padding: 0; }
  .progress-bar { left: 0; }
  .section-title-row { align-items: center; }
  .section-title-row > .button { min-width: 38px; padding: 9px; }
  .section-title-row > .button .icon + * { display: none; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .channel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .channel-card:nth-child(n+9) { display: none; }
  .broadcast-grid { grid-template-columns: 1fr; }
  .broadcast-action { border-left: 0; border-top: 1px solid var(--line); padding: 12px 0 0; }
  .recipient-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toolbar { align-items: stretch; flex-direction: column; }
  .compact-search { width: 100%; }
  .segmented { max-width: 100%; overflow: auto; }
  .directory-row { grid-template-columns: 1fr 74px 38px; }
  .directory-row .directory-path, .directory-row .directory-stat:nth-of-type(2), .directory-row .directory-stat:nth-of-type(3) { display: none; }
  .schedule-summary { grid-template-columns: 1fr; }
  .schedule-run { grid-template-columns: 55px 1fr auto; }
  .schedule-run > :nth-child(3) { display: none; }
  .channel-hero { grid-template-columns: 1fr; align-items: start; }
  .hero-actions { flex-wrap: wrap; }
  .channel-metrics { grid-template-columns: repeat(2, 1fr); }
  .media-grid { grid-template-columns: repeat(3, 1fr); }
  .content-toolbar { align-items: stretch; flex-direction: column; }
  .content-toolbar .compact-search { max-width: none; }
  .content-filters select { flex: 1; width: 100%; }
  .banner-manager-head { align-items: stretch; flex-direction: column; }
  .banner-manager-actions { width: 100%; }
  .banner-manager-actions .button { flex: 1; }
  .form-grid.two { grid-template-columns: 1fr; }
  .media-dialog-meta { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .login-view { padding: 14px; }
  .login-card { padding: 27px 20px; border-radius: 16px; }
  .login-brand { margin-bottom: 28px; }
  .scanner-chip { display: none; }
  .metric-card { min-height: 82px; grid-template-columns: 35px 1fr; padding: 12px; }
  .metric-card .metric-icon { width: 35px; height: 35px; }
  .metric-copy strong { font-size: 19px; }
  .metric-trend { display: none; }
  .channel-grid { grid-template-columns: 1fr; }
  .channel-card:nth-child(n+7) { display: none; }
  .panel-head { padding: 14px; }
  .dashboard-broadcast .panel-head .text-button { display: none; }
  .broadcast-form { padding: 13px; }
  .recipient-list { grid-template-columns: 1fr 1fr; }
  .event-list { padding: 2px 14px 8px; }
  .event-item { grid-template-columns: 30px minmax(0, 1fr); }
  .event-time { display: none; }
  .section-title-row h2 { font-size: 17px; }
  .channel-metrics { gap: 7px; }
  .media-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-side { grid-template-columns: 1fr; }
  .hero-channel { align-items: flex-start; }
  .hero-channel .channel-avatar { width: 52px; height: 52px; }
  .hero-actions .button { flex: 1; }
  .dialog-head, .dialog-body, .dialog-actions { padding-left: 15px; padding-right: 15px; }
  .dialog-actions .button { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
