:root {
  --black: #050505;
  --black-2: #0a0a0a;
  --black-3: #101010;
  --surface: rgba(18, 18, 18, 0.82);
  --surface-solid: #121212;
  --surface-high: #181818;
  --white: #f5f5f2;
  --muted: #929292;
  --muted-2: #626262;
  --line: rgba(255, 255, 255, 0.11);
  --line-strong: rgba(255, 255, 255, 0.2);
  --danger: #ff6b6b;
  --success: #d7ffd9;
  --radius: 14px;
  --sidebar: 264px;
  --ease: cubic-bezier(.2, .75, .2, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 76% -10%, rgba(255,255,255,.07), transparent 27rem),
    linear-gradient(135deg, #070707 0%, #0b0b0b 45%, #050505 100%);
  color: var(--white);
  font-family: Inter, "Segoe UI Variable", "Segoe UI", Arial, sans-serif;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 20;
  opacity: .025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
}

button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }

::selection { background: #fff; color: #050505; }

:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  padding: 10px 14px;
  transform: translateY(-160%);
  background: #fff;
  color: #000;
  border-radius: 8px;
}
.skip-link:focus { transform: none; }

.ambient { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.ambient span { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .08; animation: drift 18s ease-in-out infinite alternate; }
.ambient span:first-child { width: 420px; height: 420px; background: #fff; top: -220px; right: 8%; }
.ambient span:last-child { width: 260px; height: 260px; background: #aaa; bottom: -170px; left: 32%; animation-delay: -7s; }

@keyframes drift { to { transform: translate3d(70px, 50px, 0) scale(1.15); } }
@keyframes reveal { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 0%, 100% { transform: scale(.88); opacity: .45; } 50% { transform: scale(1.12); opacity: .12; } }
@keyframes scan { from { transform: translateX(-130%); } to { transform: translateX(160%); } }

.reveal { animation: reveal .65s var(--ease) both; }
.delay-1 { animation-delay: .08s; }
.delay-2 { animation-delay: .16s; }
.delay-3 { animation-delay: .24s; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  width: var(--sidebar);
  padding: 24px 18px 18px;
  border-right: 1px solid var(--line);
  background: rgba(7, 7, 7, .86);
  backdrop-filter: blur(22px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: linear-gradient(145deg, #fff, #bdbdbd);
  color: #070707;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: -.04em;
  box-shadow: 0 8px 26px rgba(255,255,255,.08);
}
.brand-mark.light { background: #f7f7f4; }
.brand-copy { display: grid; gap: 2px; }
.brand-copy b { font-size: 15px; letter-spacing: -.02em; }
.brand-copy small { color: var(--muted); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }

.nav { display: grid; gap: 5px; margin-top: 54px; }
.nav a {
  position: relative;
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  min-height: 45px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #8b8b8b;
  text-decoration: none;
  transition: .25s var(--ease);
}
.nav a::after {
  content: "";
  position: absolute;
  right: -19px;
  width: 2px;
  height: 0;
  background: #fff;
  transition: height .25s var(--ease);
}
.nav a:hover { color: #fff; background: rgba(255,255,255,.035); }
.nav a.active { color: #fff; border-color: var(--line); background: linear-gradient(100deg, rgba(255,255,255,.09), rgba(255,255,255,.025)); }
.nav a.active::after { height: 22px; }
.nav i { color: #575757; font-size: 9px; font-style: normal; letter-spacing: .08em; }
.nav a.active i { color: #aaa; }
.nav-divider { margin: 25px 12px 8px; color: #505050; font-size: 9px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }

.sidebar-foot { margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line); }
.account-link { display: flex; align-items: center; gap: 11px; padding: 8px; border-radius: 10px; text-decoration: none; transition: background .2s; }
.account-link:hover { background: rgba(255,255,255,.05); }
.account-link > span:last-child { display: grid; gap: 2px; min-width: 0; }
.account-link b { overflow: hidden; font-size: 13px; text-overflow: ellipsis; }
.account-link small { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.avatar { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 auto; border: 1px solid var(--line-strong); border-radius: 50%; background: #161616; color: #ddd; font-size: 12px; font-weight: 700; }
.avatar.large { width: 44px; height: 44px; }
.avatar.xlarge { width: 74px; height: 74px; font-size: 22px; }
.link-button { margin: 7px 0 0 53px; padding: 0; border: 0; background: none; color: #6f6f6f; cursor: pointer; font-size: 11px; text-decoration: underline; text-underline-offset: 3px; }
.link-button:hover { color: #fff; }

.mobile-header { display: none; }

.main {
  width: calc(100% - var(--sidebar));
  min-height: 100vh;
  margin-left: var(--sidebar);
  padding: 46px clamp(28px, 4vw, 70px) 80px;
}

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; max-width: 1440px; margin: 0 auto 35px; }
.page-head h1 { margin: 8px 0 10px; font-size: clamp(35px, 4vw, 58px); font-weight: 590; line-height: .98; letter-spacing: -.055em; }
.page-head p { max-width: 680px; margin: 0; color: var(--muted); line-height: 1.65; }
.eyebrow, .section-index, .form-index, .dialog-index { color: #777; font-size: 9px; font-weight: 750; letter-spacing: .2em; text-transform: uppercase; }
.eyebrow.light { color: rgba(255,255,255,.55); }

.head-count { display: grid; min-width: 110px; text-align: right; }
.head-count strong { font-size: 37px; font-weight: 450; letter-spacing: -.04em; }
.head-count span { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; }

.live-state { display: flex; align-items: center; gap: 12px; min-width: 168px; padding: 12px 15px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.025); }
.live-state > span { width: 8px; height: 8px; border-radius: 50%; background: #5c5c5c; box-shadow: 0 0 0 5px rgba(255,255,255,.04); }
.live-state.online > span { background: #f1f1ed; box-shadow: 0 0 18px rgba(255,255,255,.45); }
.live-state div { display: grid; gap: 2px; }
.live-state small { color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .1em; }
.live-state b { font-size: 13px; }

.notice { position: relative; z-index: 5; display: flex; justify-content: space-between; gap: 24px; max-width: 1440px; margin: 0 auto 22px; padding: 13px 15px; border: 1px solid var(--line-strong); border-radius: 10px; background: #171717; color: #e8e8e5; box-shadow: 0 16px 38px rgba(0,0,0,.22); animation: reveal .35s var(--ease) both; }
.notice.success { border-left: 2px solid #ecece8; }
.notice.error { border-left: 2px solid var(--danger); color: #ffd6d6; }
.notice.compact { display: block; margin: 20px 0 0; padding: 11px 12px; font-size: 12px; }
.notice button { padding: 0; border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 11px; text-decoration: underline; text-underline-offset: 3px; }

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(20,20,20,.91), rgba(12,12,12,.88));
  box-shadow: 0 24px 70px rgba(0,0,0,.2), inset 0 1px rgba(255,255,255,.025);
  backdrop-filter: blur(12px);
}
.panel h2 { margin: 7px 0 0; font-size: 21px; font-weight: 520; letter-spacing: -.03em; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.panel-head a, .text-action { padding: 0; border: 0; background: none; color: #a8a8a8; cursor: pointer; font-size: 11px; text-decoration: underline; text-underline-offset: 4px; }
.panel-head a:hover, .text-action:hover { color: #fff; }

.metrics { display: grid; grid-template-columns: 1.35fr repeat(3, 1fr); max-width: 1440px; margin: 0 auto 18px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: rgba(12,12,12,.78); }
.metric { position: relative; display: grid; min-height: 150px; padding: 22px 23px 19px; border-left: 1px solid var(--line); }
.metric:first-child { border-left: 0; }
.metric::before { content: ""; position: absolute; top: 0; left: 0; width: 0; height: 1px; background: #fff; transition: width .5s var(--ease); }
.metric:hover::before { width: 100%; }
.metric span { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .12em; }
.metric strong { align-self: center; font-size: clamp(34px, 4vw, 55px); font-weight: 390; letter-spacing: -.06em; }
.metric small { align-self: end; color: #606060; font-size: 10px; }
.metric.featured { background: linear-gradient(135deg, rgba(255,255,255,.1), rgba(255,255,255,.025)); }

.dashboard-grid { display: grid; grid-template-columns: 1.72fr .9fr; gap: 18px; max-width: 1440px; margin: 0 auto 18px; }
.dashboard-grid.lower { grid-template-columns: 1.2fr 1fr; }
.dashboard-grid > .panel { min-width: 0; padding: 25px; }
.range { padding: 6px 9px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .1em; }

.bar-chart { display: grid; grid-template-columns: repeat(7, 1fr); align-items: end; gap: clamp(8px, 2vw, 21px); height: 220px; padding-top: 32px; }
.bar-column { display: grid; grid-template-rows: 18px 1fr 18px; align-items: end; gap: 7px; height: 100%; text-align: center; }
.bar-column > span { color: #666; font-size: 9px; }
.bar-value { color: #aaa; font-size: 10px; opacity: 0; transition: opacity .2s; }
.bar-column:hover .bar-value { opacity: 1; }
.bar-track { position: relative; height: 100%; overflow: hidden; border-radius: 5px 5px 2px 2px; background: rgba(255,255,255,.035); }
.bar-fill { position: absolute; inset: auto 0 0; min-height: 3px; border-radius: inherit; background: linear-gradient(to top, #696969, #f2f2ee); box-shadow: 0 0 24px rgba(255,255,255,.12); transform-origin: bottom; animation: reveal .9s var(--ease) both; }
.bar-fill.level-0 { height: 2%; opacity: .3; }.bar-fill.level-1 { height: 10%; }.bar-fill.level-2 { height: 20%; }.bar-fill.level-3 { height: 30%; }.bar-fill.level-4 { height: 40%; }.bar-fill.level-5 { height: 50%; }.bar-fill.level-6 { height: 60%; }.bar-fill.level-7 { height: 70%; }.bar-fill.level-8 { height: 80%; }.bar-fill.level-9 { height: 90%; }.bar-fill.level-10 { height: 100%; }

.summary-list { margin: 24px 0 0; }
.summary-list div { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; border-top: 1px solid var(--line); }
.summary-list dt { color: #a0a0a0; }
.summary-list dd { margin: 0; font-size: 22px; font-weight: 440; letter-spacing: -.04em; }

.compact-list { margin-top: 20px; }
.compact-list > div { display: grid; grid-template-columns: 9px minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 13px 0; border-top: 1px solid var(--line); }
.compact-list > div > div { display: grid; gap: 3px; }
.compact-list b { font-size: 12px; }
.compact-list small { color: var(--muted-2); font-size: 9px; }
.status-dot { display: inline-block; width: 7px; height: 7px; border: 1px solid #737373; border-radius: 50%; background: #333; }
.status-dot.completed { background: #e8e8e4; border-color: #e8e8e4; }.status-dot.running { background: #aaa; animation: pulse 1.4s infinite; }.status-dot.failed { background: var(--danger); border-color: var(--danger); }.status-dot.cancelled { background: transparent; }.status-dot.queued { border-style: dashed; }
.status-label { color: #7d7d7d; font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }

.service-core { display: flex; align-items: center; gap: 18px; margin: 30px 0 26px; }
.service-core > div { display: grid; gap: 4px; }
.service-core strong { font-size: 24px; font-weight: 450; letter-spacing: -.04em; text-transform: capitalize; }
.service-core small { color: var(--muted); }
.pulse-ring { position: relative; display: grid; place-items: center; width: 48px; height: 48px; flex: 0 0 auto; border: 1px solid #454545; border-radius: 50%; }
.pulse-ring i { width: 9px; height: 9px; border-radius: 50%; background: #555; }
.pulse-ring.online { border-color: #8a8a8a; }
.pulse-ring.online i { background: #f2f2ed; box-shadow: 0 0 15px rgba(255,255,255,.65); }
.pulse-ring.online::before { content: ""; position: absolute; inset: -1px; border: 1px solid #999; border-radius: 50%; animation: pulse 2s ease-out infinite; }
.pulse-ring.large { width: 78px; height: 78px; }
.quick-actions, .system-actions { display: flex; flex-wrap: wrap; gap: 9px; }

.button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 43px;
  padding: 0 17px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 650;
  text-decoration: none;
  transition: transform .2s var(--ease), border-color .2s, background .2s, color .2s;
}
.button::after { content: ""; position: absolute; inset: 0; width: 45%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.18), transparent); transform: translateX(-130%) skewX(-15deg); }
.button:hover::after { animation: scan .65s var(--ease); }
.button:hover { transform: translateY(-1px); }
.button.primary { background: linear-gradient(135deg, #fff, #c9c9c6); color: #080808; border-color: #fff; box-shadow: 0 9px 24px rgba(255,255,255,.08); }
.button.secondary { background: rgba(255,255,255,.035); color: #e7e7e4; }
.button.secondary:hover { background: rgba(255,255,255,.08); border-color: #555; }
.button.danger { background: rgba(255,107,107,.06); color: #ffb1b1; border-color: rgba(255,107,107,.35); }
.button.wide { width: 100%; }
.button.small { min-height: 35px; padding: 0 12px; font-size: 10px; }
.button:disabled { cursor: not-allowed; opacity: .28; transform: none; }

.split-layout { display: grid; grid-template-columns: minmax(280px, .72fr) minmax(0, 1.7fr); align-items: start; gap: 18px; max-width: 1440px; margin: 0 auto; }
.form-panel, .list-panel { padding: 26px; }
.sticky-panel { position: sticky; top: 28px; }
.form-panel > p { line-height: 1.65; }
.muted { color: var(--muted); }
.stack-form { display: grid; gap: 17px; margin-top: 24px; }
.inline-form { display: flex; align-items: flex-start; gap: 12px; }
.inline-form .grow { flex: 1; }
.align-end { margin-top: 20px; }
.field { display: grid; gap: 7px; min-width: 0; }
.field > span:first-child { color: #8c8c8c; font-size: 10px; font-weight: 650; letter-spacing: .09em; text-transform: uppercase; }
.field input, .field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  outline: none;
  background: rgba(3,3,3,.58);
  color: #f1f1ee;
  transition: border .2s, background .2s, box-shadow .2s;
}
.field input { height: 45px; padding: 0 13px; }
.field textarea { min-height: 120px; padding: 13px; resize: vertical; line-height: 1.55; }
.field input::placeholder, .field textarea::placeholder { color: #444; }
.field input:focus, .field textarea:focus { border-color: #656565; background: #090909; box-shadow: 0 0 0 3px rgba(255,255,255,.035); }
.password-wrap { position: relative; display: block; }
.password-wrap input { padding-right: 75px; }
.password-wrap button { position: absolute; top: 0; right: 0; height: 100%; padding: 0 11px; border: 0; background: none; color: #777; cursor: pointer; font-size: 10px; text-decoration: underline; text-underline-offset: 3px; }
.form-line { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.form-line small { color: var(--muted-2); }
.form-help { display: grid; gap: 5px; margin-top: 24px; padding: 15px; border-left: 1px solid #737373; background: rgba(255,255,255,.025); }
.form-help b { font-size: 11px; }
.form-help span { color: var(--muted); font-size: 11px; line-height: 1.55; }

.record-list { margin-top: 20px; border-top: 1px solid var(--line); }
.record-list.inset { margin-top: 24px; }
.record-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 66px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.record-number { color: #4e4e4e; font-size: 9px; letter-spacing: .08em; }
.record-main { display: grid; gap: 4px; min-width: 0; }
.record-main b { font-size: 13px; font-weight: 590; }
.record-main small, .record-main a { overflow: hidden; color: #747474; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.record-main a:hover { color: #ddd; }
.record-main p { margin: 0; color: #b5b5b5; line-height: 1.55; overflow-wrap: anywhere; }
.danger-text { color: #b97979; }
.danger-text:hover { color: #ffabab; }
.empty-state { display: grid; place-items: center; gap: 6px; padding: 38px 15px; color: var(--muted); text-align: center; }
.empty-state b { color: #c4c4c1; font-size: 13px; }
.empty-state span { max-width: 320px; font-size: 11px; line-height: 1.5; }
.empty-state.large { min-height: 270px; }
.empty-inline { margin-top: 22px; padding: 18px 0 4px; border-top: 1px solid var(--line); color: #666; font-size: 11px; }

.anchor-nav { display: flex; gap: 7px; max-width: 1440px; margin: -12px auto 38px; }
.anchor-nav a { padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; color: #888; font-size: 10px; text-decoration: none; transition: .2s; }
.anchor-nav a:hover { border-color: #555; color: #fff; }
.content-section { display: grid; grid-template-columns: minmax(220px, .6fr) minmax(0, 1.6fr); gap: 30px; max-width: 1440px; margin: 0 auto 22px; padding-top: 10px; scroll-margin-top: 20px; }
.content-section > .panel { padding: 25px; }
.section-copy { padding: 20px 5px; }
.section-copy h2 { margin: 8px 0 9px; font-size: 23px; letter-spacing: -.035em; }
.section-copy p { margin: 0; color: var(--muted); line-height: 1.6; }

.broadcasts-layout { grid-template-columns: minmax(300px, .85fr) minmax(0, 1.45fr); }
.broadcast-list { margin-top: 16px; }
.broadcast-row { padding: 20px 0; border-top: 1px solid var(--line); }
.broadcast-top { display: grid; grid-template-columns: 8px 1fr auto; align-items: center; gap: 10px; }
.broadcast-row > p { display: -webkit-box; margin: 12px 0; overflow: hidden; color: #aaa; line-height: 1.55; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.broadcast-meta { display: flex; flex-wrap: wrap; gap: 7px 15px; margin-bottom: 11px; color: #646464; font-size: 9px; }
.inline-error { margin: 10px 0; padding: 9px 11px; border-left: 1px solid var(--danger); background: rgba(255,107,107,.04); color: #c98d8d; font-size: 10px; }

.admin-list { margin-top: 18px; }
.admin-row { padding: 22px 0; border-top: 1px solid var(--line); }
.admin-identity { display: flex; align-items: center; gap: 12px; }
.admin-identity > div { display: grid; gap: 3px; }
.admin-identity b { font-size: 14px; }
.admin-identity small { color: #737373; font-size: 10px; }
.admin-row dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 18px 0; }
.admin-row dl div { display: grid; gap: 4px; }
.admin-row dt { color: #5d5d5d; font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }
.admin-row dd { margin: 0; color: #aaa; font-size: 10px; }
.admin-actions { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.reset-form { display: flex; align-items: flex-end; gap: 7px; }
.reset-form .field { width: 210px; }
.reset-form .field input { height: 35px; }
.owner-lock { display: flex; align-items: center; gap: 8px; color: #666; font-size: 10px; }
.owner-lock span { width: 7px; height: 7px; border: 1px solid #777; border-radius: 50%; }

.system-grid { display: grid; grid-template-columns: 1.35fr .75fr; gap: 18px; max-width: 1440px; margin: 0 auto 18px; }
.system-grid > .panel { padding: 27px; }
.service-hero { display: flex; align-items: center; gap: 23px; margin: 28px 0; }
.service-hero h2 { margin: 0 0 7px; font-size: 27px; text-transform: capitalize; }
.service-hero p { margin: 0; color: var(--muted); line-height: 1.55; }
.system-facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; margin: 0 0 24px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--line); }
.system-facts div { display: grid; gap: 5px; min-width: 0; padding: 13px; background: #101010; }
.system-facts dt { color: #626262; font-size: 9px; text-transform: uppercase; letter-spacing: .1em; }
.system-facts dd { margin: 0; overflow: hidden; color: #bcbcb9; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.security-steps { display: grid; gap: 0; margin: 22px 0 0; padding: 0; list-style: none; }
.security-steps li { display: grid; grid-template-columns: 34px 1fr; gap: 10px; padding: 16px 0; border-top: 1px solid var(--line); }
.security-steps li > span { color: #555; font-size: 9px; }
.security-steps b { font-size: 12px; }
.security-steps p { margin: 5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.logs-panel { max-width: 1440px; margin: 0 auto; padding: 25px; }
.logs-panel pre { max-height: 440px; margin: 22px 0 0; padding: 18px; overflow: auto; border: 1px solid var(--line); border-radius: 9px; background: #050505; color: #a9a9a5; font: 10px/1.65 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; word-break: break-word; }

.table-panel { max-width: 1440px; margin: 0 auto; padding: 9px 22px 22px; }
.data-table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; text-align: left; }
.data-table th { padding: 17px 12px; border-bottom: 1px solid var(--line-strong); color: #626262; font-size: 9px; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.data-table td { max-width: 270px; padding: 15px 12px; border-bottom: 1px solid var(--line); color: #929292; font-size: 10px; line-height: 1.5; overflow-wrap: anywhere; }
.data-table td:first-child { white-space: nowrap; }
.data-table b { color: #c4c4c1; font-weight: 560; }
.data-table code { padding: 4px 6px; border-radius: 5px; background: #080808; color: #bbb; font-size: 9px; }

.account-layout { display: grid; grid-template-columns: minmax(250px, .65fr) minmax(0, 1.3fr); gap: 18px; max-width: 980px; margin: 0 auto; }
.account-layout > .panel { padding: 28px; }
.account-card { align-self: start; text-align: center; }
.account-card .avatar { margin: 8px auto 15px; }
.account-card h2 { margin: 0; font-size: 23px; }
.account-card > p { color: var(--muted); }
.account-card dl { margin: 25px 0 0; text-align: left; }
.account-card dl div { display: flex; justify-content: space-between; gap: 20px; padding: 12px 0; border-top: 1px solid var(--line); }
.account-card dt { color: #666; font-size: 10px; }.account-card dd { margin: 0; color: #aaa; font-size: 10px; }
.password-rules { margin-top: 23px; padding-top: 17px; border-top: 1px solid var(--line); }
.password-rules b { font-size: 10px; text-transform: uppercase; letter-spacing: .1em; }
.password-rules ul { margin: 9px 0 0; padding-left: 18px; color: var(--muted); font-size: 11px; line-height: 1.7; }

.error-page { display: grid; justify-items: start; max-width: 620px; margin: 18vh auto 0; padding: 35px; }
.error-page.public { min-height: 100vh; align-content: center; margin-top: 0; }
.error-code { color: #3d3d3d; font-size: 86px; font-weight: 250; line-height: 1; letter-spacing: -.07em; }
.error-page h1 { margin: 12px 0; font-size: 42px; letter-spacing: -.05em; }.error-page p { margin: 0 0 25px; color: var(--muted); line-height: 1.65; }

.login-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(390px, .65fr); min-height: 100vh; }
.login-story { position: relative; display: flex; flex-direction: column; justify-content: space-between; min-height: 100vh; padding: clamp(30px, 5vw, 70px); overflow: hidden; border-right: 1px solid rgba(255,255,255,.13); background: radial-gradient(circle at 70% 28%, rgba(255,255,255,.15), transparent 20rem), linear-gradient(145deg, #111, #030303 70%); }
.login-story::before { content: ""; position: absolute; inset: 0; opacity: .11; background-image: linear-gradient(rgba(255,255,255,.15) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.15) 1px, transparent 1px); background-size: 62px 62px; mask-image: linear-gradient(to bottom, transparent, #000 20%, #000 70%, transparent); animation: drift 22s linear infinite alternate; }
.login-story::after { content: ""; position: absolute; right: -14%; bottom: -18%; width: 58vw; height: 58vw; border: 1px solid rgba(255,255,255,.17); border-radius: 50%; box-shadow: inset 0 0 100px rgba(255,255,255,.04), 0 0 0 90px rgba(255,255,255,.018), 0 0 0 180px rgba(255,255,255,.012); }
.login-story > * { position: relative; z-index: 1; }
.story-copy h1 { margin: 17px 0 24px; font-size: clamp(55px, 7.2vw, 108px); font-weight: 390; line-height: .87; letter-spacing: -.075em; }
.story-copy p { max-width: 530px; margin: 0; color: rgba(255,255,255,.58); font-size: clamp(15px, 1.4vw, 19px); line-height: 1.6; }
.story-meta { display: flex; flex-wrap: wrap; gap: 10px 28px; color: rgba(255,255,255,.38); font-size: 9px; text-transform: uppercase; letter-spacing: .13em; }
.story-meta span::before { content: "/"; margin-right: 8px; color: rgba(255,255,255,.2); }
.login-panel { display: grid; place-items: center; min-height: 100vh; padding: 35px; background: rgba(6,6,6,.82); }
.login-form { width: min(100%, 380px); animation: reveal .8s .12s var(--ease) both; }
.login-form h2 { margin: 12px 0 8px; font-size: 32px; font-weight: 500; letter-spacing: -.045em; }
.login-form > p { line-height: 1.6; }
.login-form .field { margin-top: 19px; }
.login-form .button { margin-top: 24px; }
.security-note { display: flex; align-items: center; gap: 8px; margin-top: 18px; color: #565656; font-size: 9px; }
.security-note span { width: 6px; height: 6px; border: 1px solid #777; border-radius: 50%; }

.confirm-dialog { width: min(430px, calc(100% - 32px)); padding: 27px; border: 1px solid #3a3a3a; border-radius: 14px; background: #101010; color: #f2f2ef; box-shadow: 0 30px 100px rgba(0,0,0,.65); }
.confirm-dialog::backdrop { background: rgba(0,0,0,.72); backdrop-filter: blur(7px); }
.confirm-dialog h2 { margin: 10px 0; font-size: 24px; letter-spacing: -.035em; }.confirm-dialog p { margin: 0; color: var(--muted); line-height: 1.6; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 25px; }


/* ---- Лента событий бота ---- */
.events-metrics { margin-bottom: 18px; }
.metric strong.metric-danger { color: var(--danger); }
.events-panel { padding-top: 22px; }
.events-filters { display: grid; grid-template-columns: minmax(170px, 1fr) minmax(130px, .7fr) minmax(200px, 1.6fr) minmax(100px, .5fr) auto; align-items: end; gap: 12px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.events-filters .field.grow { min-width: 0; }
.field select { width: 100%; height: 45px; padding: 0 36px 0 13px; border: 1px solid var(--line); border-radius: 9px; outline: none; background: rgba(3,3,3,.58) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' fill='none' stroke='%23888' stroke-width='1.4'/></svg>") no-repeat right 14px center; color: #f1f1ee; font: inherit; appearance: none; -webkit-appearance: none; transition: border .2s, background-color .2s, box-shadow .2s; }
.field select:focus { border-color: #656565; box-shadow: 0 0 0 3px rgba(255,255,255,.035); }
.field select option { background: #101010; color: #f1f1ee; }
.events-filter-actions { display: flex; gap: 8px; }
.events-filter-actions .button { min-height: 45px; white-space: nowrap; }
.events-table td { max-width: none; }
.events-table td:nth-child(5) { min-width: 260px; color: #b3b3b0; }
.events-table tr.level-error td { background: rgba(255,107,107,.045); }
.events-table tr.level-warn td { background: rgba(255,255,255,.018); }
.event-level { display: inline-block; padding: 3px 8px; border: 1px solid var(--line); border-radius: 999px; font-size: 9px; letter-spacing: .08em; text-transform: uppercase; color: #8a8a8a; white-space: nowrap; }
.event-level.success { border-color: rgba(232,232,228,.55); color: #e8e8e4; }
.event-level.warn { border-color: rgba(255,255,255,.35); color: #d0d0cc; border-style: dashed; }
.event-level.error { border-color: var(--danger); color: var(--danger); }
.user-ref { color: #d6d6d2; text-decoration: none; border-bottom: 1px dotted #555; }
.user-ref:hover { color: #fff; border-bottom-color: #fff; }
.events-table td small { display: block; margin-top: 3px; color: var(--muted-2); font-size: 9px; }
.status-dot.level.success { background: #e8e8e4; border-color: #e8e8e4; }
.status-dot.level.warn { background: transparent; border-style: dashed; border-color: #bbb; }
.status-dot.level.error { background: var(--danger); border-color: var(--danger); }
.events-feed { max-width: 1440px; margin: 0 auto 18px; padding: 25px; }
.events-summary { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 14px; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .1em; }
.events-summary b { color: #e8e8e4; font-size: 13px; font-weight: 500; margin-right: 4px; }
.events-compact > div > div small { color: #8f8f8c; font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.events-compact .status-label { text-transform: none; letter-spacing: 0; white-space: nowrap; }
.logs-panel .muted { margin: 14px 0 0; font-size: 11px; line-height: 1.6; }

@media (max-width: 1120px) {
  :root { --sidebar: 230px; }
  .main { padding-left: 28px; padding-right: 28px; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .metric:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); }
  .metric:nth-child(4) { border-top: 1px solid var(--line); }
  .dashboard-grid, .dashboard-grid.lower { grid-template-columns: 1fr; }
  .system-grid { grid-template-columns: 1fr; }
  .login-layout { grid-template-columns: 1.1fr minmax(360px, .9fr); }
  .story-copy h1 { font-size: clamp(48px, 7vw, 78px); }
}

@media (max-width: 820px) {
  .events-filters { grid-template-columns: 1fr 1fr; }
  .events-filters .field.grow, .events-filter-actions { grid-column: 1 / -1; }
  .events-compact > div > div small { white-space: normal; }
  .sidebar { width: min(310px, 88vw); transform: translateX(-105%); box-shadow: 24px 0 70px rgba(0,0,0,.5); transition: transform .35s var(--ease); }
  .sidebar.open { transform: none; }
  .mobile-header { position: sticky; top: 0; z-index: 45; display: flex; align-items: center; justify-content: space-between; height: 66px; padding: 0 19px; border-bottom: 1px solid var(--line); background: rgba(6,6,6,.82); backdrop-filter: blur(18px); }
  .brand.compact .brand-mark { width: 34px; height: 34px; border-radius: 9px; }.brand.compact .brand-copy b { font-size: 13px; }
  .menu-toggle { display: grid; gap: 6px; width: 38px; height: 38px; place-content: center; border: 1px solid var(--line); border-radius: 9px; background: transparent; cursor: pointer; }
  .menu-toggle span { width: 16px; height: 1px; background: #ddd; transition: .25s; }
  .menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }.menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }
  .main { width: 100%; margin: 0; padding: 28px 18px 60px; }
  .page-head { align-items: flex-start; }.page-head h1 { font-size: 41px; }
  .split-layout, .broadcasts-layout, .content-section, .account-layout { grid-template-columns: 1fr; }
  .sticky-panel { position: static; }
  .content-section { gap: 5px; }.section-copy { padding: 12px 4px; }
  .login-layout { grid-template-columns: 1fr; }
  .login-story { min-height: 48vh; padding: 28px; }
  .login-story .brand { margin-bottom: 80px; }
  .story-copy h1 { font-size: clamp(47px, 13vw, 72px); }
  .story-meta { display: none; }
  .login-panel { min-height: 52vh; padding: 55px 28px; }
}

@media (max-width: 560px) {
  .page-head { display: grid; }.head-count { text-align: left; }.live-state { width: 100%; }
  .metrics { grid-template-columns: 1fr 1fr; }.metric { min-height: 125px; padding: 17px; }.metric strong { font-size: 34px; }
  .dashboard-grid > .panel, .panel, .form-panel, .list-panel, .content-section > .panel, .system-grid > .panel { padding: 19px; }
  .bar-chart { gap: 6px; height: 180px; }
  .bar-value { opacity: 1; font-size: 8px; }
  .inline-form { display: grid; grid-template-columns: 1fr; }.align-end { margin-top: 0; }
  .record-row { grid-template-columns: 27px minmax(0,1fr); }.record-row form { grid-column: 2; }
  .form-line { align-items: stretch; flex-direction: column; }
  .anchor-nav { overflow-x: auto; padding-bottom: 5px; }.anchor-nav a { white-space: nowrap; }
  .admin-row dl { grid-template-columns: 1fr; }.reset-form { width: 100%; flex-wrap: wrap; }.reset-form .field { width: 100%; }
  .system-facts { grid-template-columns: 1fr; }.service-hero { align-items: flex-start; flex-direction: column; }
  .system-actions { display: grid; grid-template-columns: 1fr; }.system-actions form, .system-actions .button { width: 100%; }
  .data-table th, .data-table td { padding-left: 8px; padding-right: 8px; }
  .story-copy h1 { font-size: 45px; }.login-story { min-height: 430px; }
  .dialog-actions { display: grid; grid-template-columns: 1fr 1fr; }.dialog-actions .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
