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

:root {
  --bg: #f3f5f8;
  --panel: #ffffff;
  --panel-2: #f8fafc;
  --ink: #101828;
  --muted: #667085;
  --line: #e6eaf0;
  --nav: #0b1120;
  --nav-2: #111a2d;
  --accent: #f15a24;
  --accent-dark: #d84713;
  --accent-soft: #fff1eb;
  --green: #16a36a;
  --green-soft: #e9f8f1;
  --yellow: #e4a11b;
  --yellow-soft: #fff7df;
  --red: #e04747;
  --red-soft: #ffeded;
  --blue: #3676e8;
  --blue-soft: #edf4ff;
  --shadow: 0 14px 35px rgba(16, 24, 40, .065);
  --radius: 18px;
  --sidebar: 245px;
}

* { box-sizing: border-box; }
html { color-scheme: light; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(54, 118, 232, .22);
  outline-offset: 2px;
}
.truncate { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.muted { color: var(--muted); }
.text-danger { color: var(--red) !important; }
.eyebrow {
  margin: 0 0 6px;
  color: #8a94a6;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .16em;
}

.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  display: flex;
  width: var(--sidebar);
  padding: 26px 18px 20px;
  flex-direction: column;
  overflow-y: auto;
  color: #cbd3df;
  background:
    radial-gradient(circle at 20% 18%, rgba(241, 90, 36, .12), transparent 25%),
    linear-gradient(165deg, var(--nav-2), var(--nav) 55%);
  box-shadow: 8px 0 30px rgba(8, 13, 24, .14);
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 8px 28px;
  color: #fff;
}
.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 11px;
  color: #fff;
  background: var(--accent);
  font-size: 21px;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(241, 90, 36, .28);
}
.brand strong { display: block; font-size: 19px; line-height: 1.05; }
.brand small { display: block; margin-top: 4px; color: #7f899a; font-size: 11px; font-weight: 800; letter-spacing: .18em; }
.main-nav { display: grid; gap: 4px; }
.main-nav a, .sidebar-bottom a, .sidebar-bottom button {
  display: flex;
  width: 100%;
  min-height: 43px;
  padding: 0 12px;
  align-items: center;
  gap: 11px;
  border: 0;
  border-radius: 10px;
  color: #9ea9b9;
  background: transparent;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  text-align: left;
  transition: .18s ease;
}
.main-nav a:hover, .sidebar-bottom a:hover, .sidebar-bottom button:hover { color: #fff; background: rgba(255,255,255,.055); }
.main-nav a.active, .sidebar-bottom a.active {
  color: #fff;
  background: rgba(255,255,255,.085);
  box-shadow: inset 3px 0 var(--accent);
}
.nav-icon { display: grid; width: 20px; height: 20px; place-items: center; color: #79869a; font-size: 20px; font-weight: 800; }
.active .nav-icon { color: var(--accent); }
.nav-count { display: grid; min-width: 23px; height: 23px; margin-left: auto; padding: 0 6px; place-items: center; border-radius: 99px; color: #fff; background: var(--accent); font-size: 10px; font-weight: 800; }
.codex-icon { border: 1px solid currentColor; border-radius: 6px; font-size: 14px; }
.sidebar-projects { margin-top: 28px; padding: 0 8px; }
.sidebar-label { margin-bottom: 10px; color: #5c6879; font-size: 12px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.sidebar-projects a { display: flex; min-height: 37px; align-items: center; gap: 9px; color: #8f9aac; font-size: 14px; }
.sidebar-projects a:hover { color: #fff; }
.project-dot { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: #657184; }
.project-dot.status-active { background: var(--green); box-shadow: 0 0 0 3px rgba(22,163,106,.12); }
.score-mini { margin-left: auto; padding: 2px 5px; border-radius: 5px; background: rgba(255,255,255,.07); font-size: 12px; }
.sidebar-bottom { display: grid; gap: 4px; margin-top: auto; padding-top: 25px; }
.sidebar-bottom form { margin: 0; }

.main { min-height: 100vh; margin-left: var(--sidebar); }
.topbar {
  display: flex;
  height: 86px;
  padding: 0 34px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(222, 227, 234, .8);
  background: rgba(255,255,255,.84);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar h1 { margin: 0; font-size: 23px; line-height: 1.1; letter-spacing: -.035em; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.quick-action { display: flex; height: 36px; padding: 0 12px; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 10px; color: #455267; background: #fff; font-size: 14px; font-weight: 700; }
.quick-action span { display: grid; width: 18px; height: 18px; place-items: center; border: 1px solid #aab3c0; border-radius: 5px; font-size: 12px; }
.avatar { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 50%; color: #fff; background: #1f2a3d; font-size: 16px; font-weight: 800; }
.mobile-menu { display: none; border: 0; background: transparent; font-size: 22px; }
.page-content { max-width: 1500px; margin: 0 auto; padding: 30px 34px 55px; }
.toast {
  position: fixed;
  right: 30px;
  top: 102px;
  z-index: 50;
  display: flex;
  max-width: 420px;
  padding: 13px 14px;
  align-items: center;
  gap: 10px;
  border: 1px solid #caeddb;
  border-radius: 12px;
  color: #176544;
  background: #effaf5;
  box-shadow: var(--shadow);
}
.toast > span { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 50%; color: #fff; background: var(--green); font-size: 14px; }
.toast p { margin: 0; font-size: 15px; font-weight: 700; }
.toast button { margin-left: auto; border: 0; color: #6f8e80; background: transparent; cursor: pointer; font-size: 21px; }

.button {
  display: inline-flex;
  min-height: 41px;
  padding: 0 17px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .01em;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:disabled { opacity: .55; cursor: not-allowed; }
.button.primary { color: #fff; background: var(--accent); box-shadow: 0 8px 18px rgba(241,90,36,.18); }
.button.primary:hover:not(:disabled) { background: var(--accent-dark); box-shadow: 0 10px 22px rgba(241,90,36,.23); }
.button.ghost { border-color: var(--line); color: #465267; background: #fff; }
.button.ghost:hover:not(:disabled) { border-color: #cad1db; }
.button.light { color: #101828; background: #fff; }
.button.small { min-height: 34px; padding: 0 12px; font-size: 13px; }
.button.full { width: 100%; }
.text-link { padding: 0; border: 0; color: var(--accent); background: transparent; cursor: pointer; font-size: 13px; font-weight: 800; }

.overview-hero {
  position: relative;
  display: grid;
  min-height: 300px;
  padding: 42px 48px;
  grid-template-columns: minmax(0, 1.45fr) minmax(240px, .55fr);
  align-items: center;
  overflow: hidden;
  border-radius: 24px;
  color: #fff;
  background:
    linear-gradient(115deg, rgba(12, 18, 32, .98) 15%, rgba(21, 32, 52, .97) 72%),
    #101828;
  box-shadow: 0 22px 50px rgba(9, 15, 29, .16);
}
.overview-hero::before {
  content: "";
  position: absolute;
  width: 480px;
  height: 480px;
  right: -130px;
  top: -190px;
  border: 1px solid rgba(255,255,255,.05);
  border-radius: 50%;
  box-shadow: 0 0 0 60px rgba(255,255,255,.015), 0 0 0 120px rgba(255,255,255,.012);
}
.overview-hero::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 2px;
  right: 30%;
  bottom: 32px;
  transform: rotate(-18deg);
  background: linear-gradient(90deg, transparent, rgba(241,90,36,.5), transparent);
}
.hero-copy { position: relative; z-index: 2; max-width: 670px; }
.hero-copy h2 { margin: 4px 0 12px; font-size: clamp(29px, 3vw, 47px); line-height: 1.06; letter-spacing: -.05em; }
.hero-copy > p:not(.eyebrow) { max-width: 580px; margin: 0; color: #99a5b8; font-size: 16px; line-height: 1.7; }
.hero-actions { display: flex; margin-top: 25px; gap: 10px; }
.hero-actions form { margin: 0; }
.health-orbit { position: relative; z-index: 2; display: grid; justify-items: center; }
.orbit-ring { display: grid; width: 170px; height: 170px; place-items: center; border: 1px solid rgba(255,255,255,.08); border-radius: 50%; box-shadow: inset 0 0 35px rgba(255,255,255,.03), 0 0 0 18px rgba(255,255,255,.018); }
.health-score { display: grid; width: 118px; height: 118px; place-content: center; text-align: center; border: 6px solid currentColor; border-radius: 50%; background: #121d31; }
.health-score strong { color: #fff; font-size: 42px; line-height: 1; letter-spacing: -.05em; }
.health-score span { margin-top: 6px; color: #8290a4; font-size: 12px; text-transform: uppercase; }
.health-orbit p { margin: 22px 0 0; color: #818da0; font-size: 13px; font-weight: 700; }
.score-good { color: var(--green) !important; }
.score-warn { color: var(--yellow) !important; }
.score-bad { color: var(--red) !important; }

.metric-grid { display: grid; margin: 20px 0; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.metric-card {
  min-width: 0;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--panel);
  box-shadow: 0 8px 22px rgba(16,24,40,.035);
}
.metric-card.danger-tint { background: linear-gradient(140deg, #fff, #fff9f9); }
.metric-kicker { display: block; margin-bottom: 8px; color: #8d97a6; font-size: 12px; font-weight: 800; letter-spacing: .14em; }
.metric-card > strong { display: block; font-size: 28px; line-height: 1; letter-spacing: -.045em; }
.metric-card p { margin: 7px 0 0; color: var(--muted); font-size: 13px; }

.dashboard-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 18px; }
.span-7 { grid-column: span 7; }
.span-5 { grid-column: span 5; }
.panel {
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 9px 26px rgba(16, 24, 40, .035);
}
.panel-head { display: flex; min-height: 36px; margin-bottom: 17px; align-items: flex-start; justify-content: space-between; gap: 15px; }
.panel-head h3 { margin: 0; font-size: 19px; letter-spacing: -.025em; }
.project-list, .audit-list, .issue-feed, .job-list, .content-list { display: grid; }
.project-row {
  display: grid;
  padding: 12px 4px;
  grid-template-columns: 38px minmax(130px, 1fr) 64px 64px 44px;
  align-items: center;
  gap: 12px;
  border-top: 1px solid #eef1f4;
  transition: background .15s ease;
}
.project-row:hover { background: #fafbfd; }
.project-row:first-child { border-top: 0; }
.project-avatar { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 10px; color: #fff; background: linear-gradient(145deg, #23314a, #111a2b); font-size: 13px; font-weight: 800; letter-spacing: .04em; }
.project-avatar.large { width: 46px; height: 46px; border-radius: 13px; font-size: 15px; }
.project-avatar.xlarge { width: 58px; height: 58px; border-radius: 16px; font-size: 19px; }
.project-main { min-width: 0; }
.project-main strong { display: block; overflow: hidden; color: #263043; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.project-main small { display: block; margin-top: 4px; overflow: hidden; color: #929baa; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.project-meta { text-align: center; }
.project-meta small { display: block; color: #9ca5b2; font-size: 11px; }
.project-meta strong { display: block; margin-top: 3px; font-size: 15px; }
.score-pill { display: grid; width: 39px; height: 28px; place-items: center; border-radius: 8px; background: #f2f4f7; font-size: 13px; font-weight: 800; }
.issue-feed a {
  display: grid;
  padding: 10px 0;
  grid-template-columns: 8px minmax(0, 1fr) 10px;
  align-items: center;
  gap: 11px;
  border-top: 1px solid #eff2f5;
}
.issue-feed a:first-child { border-top: 0; }
.issue-feed a:hover strong { color: var(--accent); }
.issue-feed strong { display: block; font-size: 13px; }
.issue-feed small { display: block; margin-top: 4px; color: #929baa; font-size: 11px; }
.severity-dot { width: 7px; height: 7px; border-radius: 50%; }
.severity-critical, .severity-high { color: var(--red) !important; background: var(--red-soft); }
.severity-medium { color: #b47b00 !important; background: var(--yellow-soft); }
.severity-low { color: var(--blue) !important; background: var(--blue-soft); }
.severity-dot.severity-critical, .severity-dot.severity-high { background: var(--red); }
.severity-dot.severity-medium { background: var(--yellow); }
.severity-dot.severity-low { background: var(--blue); }
.audit-row { display: grid; min-height: 49px; padding: 7px 3px; grid-template-columns: 9px minmax(0,1fr) auto 30px; align-items: center; gap: 11px; border-top: 1px solid #eff2f5; }
.audit-row:first-child { border-top: 0; }
.audit-status { width: 7px; height: 7px; border-radius: 50%; background: #98a2b3; }
.audit-status.status-completed { background: var(--green); }
.audit-status.status-running, .audit-status.status-queued { background: var(--yellow); box-shadow: 0 0 0 4px rgba(228,161,27,.12); }
.audit-status.status-failed { background: var(--red); }
.audit-score { font-size: 14px; }
.badge { display: inline-flex; min-height: 23px; padding: 0 8px; align-items: center; border-radius: 99px; color: #596579; background: #f0f2f5; font-size: 11px; font-weight: 800; white-space: nowrap; }
.badge-completed, .badge-succeeded, .status-active, .badge-published { color: #137a4f; background: var(--green-soft); }
.badge-running, .badge-queued, .status-paused, .badge-writing { color: #9b6900; background: var(--yellow-soft); }
.badge-failed, .badge-cancelled { color: #be3838; background: var(--red-soft); }
.muted-badge { color: #768194; background: #eef1f5; }
.codex-panel { position: relative; overflow: hidden; color: #dce4ef; border-color: #1b2940; background: linear-gradient(145deg, #101b2f, #0b1323); }
.codex-panel .panel-head h3 { color: #fff; }
.codex-panel > p { position: relative; max-width: 400px; margin: 8px 0 21px; color: #8693a7; font-size: 13px; line-height: 1.65; }
.codex-glow { position: absolute; width: 170px; height: 170px; right: -40px; bottom: -70px; border-radius: 50%; background: rgba(241,90,36,.1); filter: blur(2px); }
.worker-chip { display: inline-flex; min-height: 24px; padding: 0 8px; align-items: center; gap: 6px; border-radius: 99px; color: #a0aaba; background: rgba(255,255,255,.06); font-size: 11px; font-weight: 800; white-space: nowrap; }
.worker-chip i { width: 6px; height: 6px; border-radius: 50%; background: #7d8796; }
.worker-chip.online { color: #64dfa8; background: rgba(22,163,106,.13); }
.worker-chip.online i { background: #39c98b; box-shadow: 0 0 0 4px rgba(57,201,139,.11); }
.last-job { position: relative; display: flex; padding: 12px; align-items: center; gap: 11px; margin-bottom: 15px; border: 1px solid rgba(255,255,255,.07); border-radius: 11px; background: rgba(255,255,255,.04); }
.last-job > span { display: grid; width: 28px; height: 28px; place-items: center; border: 1px solid #66738a; border-radius: 8px; font-weight: 800; }
.last-job small, .last-job strong { display: block; }
.last-job small { color: #788599; font-size: 11px; }
.last-job strong { margin-top: 3px; color: #dce4ef; font-size: 12px; }
.empty-state { padding: 32px 20px; color: var(--muted); text-align: center; }
.empty-state strong { display: block; color: var(--ink); font-size: 15px; }
.empty-state p { margin: 7px 0 0; font-size: 13px; }
.empty-state.compact { padding: 20px 10px; font-size: 13px; }

.page-intro { display: flex; margin-bottom: 22px; align-items: flex-end; justify-content: space-between; gap: 20px; }
.page-intro h2 { margin: 0; font-size: 25px; letter-spacing: -.04em; }
.page-intro p { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.project-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; }
.site-card { display: flex; min-height: 300px; padding: 22px; flex-direction: column; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: 0 9px 26px rgba(16,24,40,.035); }
.site-card-top { display: flex; margin-bottom: 18px; align-items: center; justify-content: space-between; }
.site-card h3 { margin: 0 0 6px; font-size: 21px; letter-spacing: -.03em; }
.site-card a:not(.button) { color: #7b8798; font-size: 12px; }
.site-health { display: grid; margin: 24px 0 17px; grid-template-columns: auto 1fr; align-items: end; gap: 20px; }
.site-health small { display: block; color: #929baa; font-size: 11px; }
.site-health strong { display: block; margin-top: 4px; font-size: 25px; }
.site-health strong span { color: #a5aebc; font-size: 12px; }
.mini-bar { height: 5px; margin-bottom: 8px; overflow: hidden; border-radius: 99px; background: #edf0f3; }
.mini-bar i { display: block; width: var(--score); height: 100%; border-radius: inherit; background: currentColor; }
.site-stats { display: grid; padding: 14px 0; grid-template-columns: repeat(3, 1fr); border-top: 1px solid #edf0f3; border-bottom: 1px solid #edf0f3; }
.site-stats span { text-align: center; border-left: 1px solid #edf0f3; }
.site-stats span:first-child { border-left: 0; }
.site-stats small, .site-stats strong { display: block; }
.site-stats small { color: #929baa; font-size: 11px; }
.site-stats strong { margin-top: 4px; font-size: 16px; }
.site-card-footer { display: flex; margin-top: auto; padding-top: 18px; align-items: center; justify-content: space-between; }
.site-card-footer > small { color: #9ca5b3; font-size: 11px; }
.add-site-card { align-items: center; justify-content: center; border-style: dashed; color: #7f8997; cursor: pointer; }
.add-site-card:hover { border-color: var(--accent); color: var(--accent); }
.add-site-card > span { display: grid; width: 48px; height: 48px; margin-bottom: 13px; place-items: center; border: 1px dashed currentColor; border-radius: 50%; font-size: 22px; }
.add-site-card strong { color: var(--ink); font-size: 15px; }
.add-site-card small { margin-top: 5px; font-size: 12px; }

.project-header { display: flex; margin-bottom: 23px; align-items: center; justify-content: space-between; gap: 18px; }
.project-identity { display: flex; align-items: center; gap: 15px; }
.project-identity h2 { margin: 0; font-size: 25px; letter-spacing: -.04em; }
.project-identity a { display: block; margin-top: 6px; color: #758195; font-size: 12px; }
.title-line { display: flex; align-items: center; gap: 10px; }
.project-actions { display: flex; align-items: center; gap: 9px; }
.project-actions form { margin: 0; }
.audit-progress { display: grid; margin-bottom: 18px; padding: 14px 18px; grid-template-columns: minmax(250px, auto) minmax(180px, 1fr); align-items: center; gap: 25px; border: 1px solid #f2d5c9; border-radius: 13px; background: #fff8f4; }
.audit-progress > div:first-child { display: grid; grid-template-columns: 20px auto; align-items: center; column-gap: 10px; }
.audit-progress small { grid-column: 2; margin-top: 2px; color: #9a7768; font-size: 11px; }
.spinner { display: inline-block; width: 15px; height: 15px; vertical-align: -3px; border: 2px solid rgba(241,90,36,.22); border-top-color: var(--accent); border-radius: 50%; animation: spin .9s linear infinite; }
.spinner.large { width: 27px; height: 27px; margin: 0 auto 14px; }
@keyframes spin { to { transform: rotate(360deg); } }
.progress-track { height: 5px; overflow: hidden; border-radius: 99px; background: #f1ddd4; }
.progress-track i { display: block; width: 40%; height: 100%; border-radius: inherit; background: var(--accent); animation: progress 2s ease-in-out infinite alternate; }
@keyframes progress { to { transform: translateX(145%); } }
.tabs { display: flex; margin-bottom: 18px; gap: 5px; border-bottom: 1px solid #dfe4ea; overflow-x: auto; }
.tabs button { position: relative; min-height: 43px; padding: 0 13px; border: 0; color: #7d8898; background: transparent; cursor: pointer; font-size: 13px; font-weight: 700; white-space: nowrap; }
.tabs button::after { content: ""; position: absolute; right: 10px; bottom: -1px; left: 10px; height: 2px; background: transparent; }
.tabs button.active { color: var(--ink); }
.tabs button.active::after { background: var(--accent); }
.tabs button span { margin-left: 4px; padding: 2px 5px; border-radius: 99px; color: #8a94a3; background: #e9edf2; font-size: 10px; }
.project-metrics { display: grid; margin-bottom: 18px; grid-template-columns: minmax(310px, 2fr) repeat(3, 1fr); gap: 14px; }
.score-card { display: flex; padding: 18px; align-items: center; gap: 17px; border: 1px solid var(--line); border-radius: 15px; background: #fff; }
.score-disc { display: grid; width: 73px; height: 73px; place-content: center; flex: 0 0 auto; border: 5px solid currentColor; border-radius: 50%; text-align: center; }
.score-disc strong { color: var(--ink); font-size: 24px; line-height: 1; }
.score-disc small { margin-top: 2px; color: #929baa; font-size: 10px; }
.score-card h3 { margin: 0; font-size: 17px; }
.score-card p:not(.eyebrow) { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.issue-table-row { display: grid; min-height: 49px; padding: 8px 2px; grid-template-columns: 62px minmax(0,1fr) 72px; align-items: center; gap: 11px; border-top: 1px solid #edf0f3; }
.issue-table-row:first-child { border-top: 0; }
.severity-label { display: inline-flex; min-height: 21px; padding: 0 7px; align-items: center; justify-content: center; border-radius: 6px; font-size: 10px; font-weight: 800; white-space: nowrap; }
.category { color: #8a94a3; font-size: 11px; text-transform: capitalize; }
.issue-table-row strong { display: block; font-size: 13px; }
.issue-table-row small { margin-top: 3px; color: #9aa3b0; font-size: 11px; }

.table-panel { padding: 0; overflow: hidden; }
.table-panel .panel-head { margin: 0; padding: 20px 22px 16px; }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { padding: 10px 15px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: #8b95a4; background: #f8fafc; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
td { max-width: 300px; padding: 13px 15px; border-bottom: 1px solid #edf0f3; color: #515d70; font-size: 12px; }
tbody tr:hover { background: #fbfcfd; }
td strong, td small { display: block; }
td strong { color: #263043; font-size: 13px; }
td small { margin-top: 4px; color: #929baa; font-size: 11px; }
.url-cell { display: block; max-width: 360px; overflow: hidden; color: #376daf; text-overflow: ellipsis; white-space: nowrap; }
.http-code { display: inline-flex; min-width: 35px; padding: 3px 5px; justify-content: center; border-radius: 5px; font-size: 11px; font-weight: 800; }
.http-code.code-ok { color: #137a4f; background: var(--green-soft); }
.http-code.code-bad { color: #be3838; background: var(--red-soft); }
.table-empty { padding: 38px !important; color: var(--muted); text-align: center; }
.table-search { display: flex; min-width: 220px; height: 35px; padding: 0 10px; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.table-search input { width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 12px; }
.truncate-cell { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.position { font-size: 17px !important; }
.delta { display: inline-flex; min-width: 28px; justify-content: center; color: #8490a0; font-weight: 800; }
.delta.up { color: var(--green); }
.delta.down { color: var(--red); }
.issue-cards { display: grid; padding: 0 22px 22px; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.issue-card { display: flex; min-height: 180px; padding: 16px; flex-direction: column; border: 1px solid var(--line); border-left-width: 3px; border-radius: 12px; background: #fff; }
.severity-border-critical, .severity-border-high { border-left-color: var(--red) !important; }
.severity-border-medium { border-left-color: var(--yellow) !important; }
.severity-border-low { border-left-color: var(--blue) !important; }
.issue-card-head { display: flex; align-items: center; justify-content: space-between; }
.issue-card h4 { margin: 14px 0 7px; font-size: 15px; }
.issue-card p { margin: 0 0 10px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.issue-card > a { margin-top: auto; color: #7d8897; font-size: 11px; }
.issue-card form { margin-top: 12px; }

.filter-bar { display: flex; margin-bottom: 16px; padding: 14px 16px; align-items: flex-end; gap: 11px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.filter-bar label > span, .dialog label > span, .codex-compose label > span, .login-form label > span {
  display: block;
  margin-bottom: 6px;
  color: #687487;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.filter-bar select, .filter-bar input, .dialog input, .dialog select, .dialog textarea, .codex-compose select, .codex-compose textarea, .content-card select {
  width: 100%;
  min-height: 38px;
  padding: 0 11px;
  border: 1px solid #dfe4ea;
  border-radius: 9px;
  outline: 0;
  color: var(--ink);
  background: #fff;
  font-size: 13px;
}
.filter-bar label { min-width: 170px; }
.filter-bar.compact-filter { justify-content: space-between; }
.filter-bar.compact-filter .table-search { align-self: flex-end; min-width: 280px; }
.filter-bar input:focus, .filter-bar select:focus, .dialog input:focus, .dialog select:focus, .dialog textarea:focus, .codex-compose select:focus, .codex-compose textarea:focus { border-color: #9bb3dc; box-shadow: 0 0 0 3px rgba(54,118,232,.09); }
.issue-worklist { display: grid; gap: 10px; }
.work-issue { display: flex; padding: 18px 20px; align-items: center; justify-content: space-between; gap: 20px; border: 1px solid var(--line); border-left-width: 3px; border-radius: 13px; background: #fff; }
.work-issue-main { min-width: 0; }
.work-issue-main > div:first-child { display: flex; align-items: center; gap: 8px; }
.work-issue h3 { margin: 10px 0 5px; font-size: 16px; }
.work-issue p { margin: 0; color: var(--muted); font-size: 12px; }
.work-issue a { display: block; max-width: 650px; margin-top: 8px; color: #5978a5; font-size: 11px; }
.issue-actions { display: flex; flex: 0 0 auto; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.issue-actions form { display: flex; margin: 0; gap: 7px; }
.inline-position { display: flex; align-items: center; gap: 4px; }
.inline-position input { width: 49px; height: 30px; border: 1px solid var(--line); border-radius: 7px; text-align: center; }
.inline-position button, .icon-button { display: grid; width: 29px; height: 29px; place-items: center; border: 0; border-radius: 7px; color: #778294; background: #f0f3f6; cursor: pointer; }
.inline-position button:hover { color: #fff; background: var(--green); }
.icon-button:hover { color: #fff; background: var(--red); }
.info-strip { display: flex; margin-top: 14px; padding: 13px 16px; align-items: flex-start; gap: 10px; border: 1px solid #dce8f8; border-radius: 12px; color: #516b8f; background: #f5f9ff; }
.info-strip > span { display: grid; width: 20px; height: 20px; place-items: center; flex: 0 0 auto; border-radius: 50%; color: #fff; background: var(--blue); font-size: 13px; font-weight: 800; }
.info-strip p { margin: 2px 0 0; font-size: 12px; line-height: 1.5; }

.semantic-intro { align-items: center; }
.semantic-actions { display: flex; align-items: center; gap: 8px; }
.semantic-actions form { margin: 0; }
.semantic-actions .button:disabled { opacity: .55; cursor: wait; }
.semantic-sync-status { display: flex; min-height: 66px; margin-bottom: 14px; padding: 13px 17px; align-items: center; justify-content: space-between; gap: 16px; border: 1px solid #cfe8da; border-radius: 13px; background: #f5fbf8; }
.semantic-sync-status > div { display: flex; align-items: center; gap: 11px; }
.semantic-sync-status strong, .semantic-sync-status small { display: block; }
.semantic-sync-status strong { color: #233044; font-size: 13px; }
.semantic-sync-status small { margin-top: 4px; color: #768397; font-size: 11px; }
.semantic-sync-status.status-running, .semantic-sync-status.status-queued { border-color: #f0dbaa; background: #fffaf0; }
.semantic-sync-status.status-failed { border-color: #efcccc; background: #fff7f7; }
.semantic-sync-dot { width: 10px; height: 10px; flex: 0 0 auto; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 6px rgba(22,163,106,.1); }
.status-running .semantic-sync-dot, .status-queued .semantic-sync-dot { background: var(--yellow); box-shadow: 0 0 0 6px rgba(228,161,27,.1); animation: pulse 1.4s infinite; }
.status-failed .semantic-sync-dot { background: var(--red); box-shadow: 0 0 0 6px rgba(221,74,74,.1); }
.semantic-warning { max-width: 420px; color: #9a6610; font-size: 11px; text-align: right; }
.semantic-overview { display: grid; margin-bottom: 14px; grid-template-columns: repeat(4, minmax(150px,1fr)); gap: 11px; }
.semantic-overview article { display: flex; min-height: 88px; padding: 17px; align-items: center; gap: 13px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.semantic-overview strong, .semantic-overview small { display: block; }
.semantic-overview strong { color: var(--ink); font-size: 24px; line-height: 1; }
.semantic-overview small { margin-top: 6px; color: var(--muted); font-size: 11px; }
.semantic-stat-icon { display: grid; width: 36px; height: 36px; place-items: center; flex: 0 0 auto; border-radius: 10px; color: #3567a8; background: #edf4ff; font-size: 13px; font-weight: 900; }
.semantic-stat-icon.gap { color: #a66c0a; background: var(--yellow-soft); }
.semantic-stat-icon.competitors { color: #137a4f; background: var(--green-soft); }
.semantic-stat-icon.own { color: #fff; background: #162238; }
.semantic-table-panel td { vertical-align: middle; }
.semantic-table-panel th:nth-child(1) { min-width: 240px; }
.semantic-table-panel th:nth-child(3) { min-width: 260px; }
.semantic-table-panel th:nth-child(6) { min-width: 240px; }
.semantic-keyword-cell > div { display: flex; margin-bottom: 7px; align-items: center; gap: 7px; }
.semantic-rank { display: grid; min-width: 23px; height: 23px; padding: 0 5px; place-items: center; border-radius: 7px; color: #637084; background: #eff2f6; font-size: 10px; font-weight: 900; }
.semantic-source { display: inline-flex; min-height: 25px; padding: 0 8px; align-items: center; border-radius: 99px; color: #456b9c; background: #eef5ff; font-size: 10px; font-weight: 800; white-space: nowrap; }
.semantic-source.source-market_gap { color: #9a6710; background: var(--yellow-soft); }
.semantic-source.source-webmaster_wordstat { color: #13734c; background: var(--green-soft); }
.semantic-competitor-line { max-width: 210px; line-height: 1.35; }
.semantic-action-cell strong { color: #49566a; font-size: 12px; line-height: 1.45; }
.semantic-plan { margin-top: 16px; padding: 20px; border: 1px solid var(--line); border-radius: 15px; background: #fff; }
.semantic-plan .panel-head { display: flex; margin: 0 0 15px; padding: 0; align-items: flex-end; justify-content: space-between; gap: 12px; }
.semantic-plan .panel-head h3 { margin: 4px 0 0; font-size: 20px; }
.semantic-plan .panel-head a { color: var(--accent); font-size: 12px; font-weight: 800; }
.semantic-plan-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; }
.semantic-plan-grid article { min-height: 165px; padding: 15px; border: 1px solid #e4e8ee; border-radius: 12px; background: #fbfcfd; }
.semantic-plan-grid h4 { margin: 12px 0 7px; color: #273144; font-size: 14px; line-height: 1.4; }
.semantic-plan-grid p { margin: 0; color: #737f91; font-size: 11px; line-height: 1.55; }
.semantic-competitors { display: grid; margin-top: 15px; padding-top: 14px; grid-template-columns: 220px minmax(0,1fr); align-items: start; gap: 12px; border-top: 1px solid #edf0f3; }
.semantic-competitors > strong { color: #5c6879; font-size: 11px; }
.semantic-competitors > div { display: flex; flex-wrap: wrap; gap: 6px; }
.semantic-competitors span { display: inline-flex; min-height: 25px; padding: 0 8px; align-items: center; border-radius: 7px; color: #526176; background: #eef1f5; font-size: 10px; font-weight: 700; }
.semantic-row-actions { display: flex; align-items: center; gap: 6px; }
.semantic-row-actions form { margin: 0; }
.button.compact { min-height: 31px; padding: 0 10px; font-size: 10px; white-space: nowrap; }

.keyword-plan-intro { align-items: center; }
.keyword-plan-intro h2 { margin-top: 9px; }
.keyword-plan-badges { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.promotion-state { display: inline-flex; min-height: 25px; padding: 0 9px; align-items: center; border-radius: 99px; color: #637084; background: #eef1f5; font-size: 10px; font-weight: 800; }
.promotion-state.state-doing { color: #94630f; background: var(--yellow-soft); }
.promotion-state.state-done { color: #1d7c52; background: var(--green-soft); }
.keyword-plan-stats { display: grid; margin-bottom: 14px; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; }
.keyword-plan-stats article { padding: 17px 18px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.keyword-plan-stats small, .keyword-plan-stats strong, .keyword-plan-stats span { display: block; }
.keyword-plan-stats small { color: #8893a3; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.keyword-plan-stats strong { margin-top: 9px; color: var(--ink); font-size: 24px; line-height: 1; }
.keyword-plan-stats span { margin-top: 7px; color: var(--muted); font-size: 10px; }
.keyword-plan-layout { display: grid; grid-template-columns: minmax(0,1fr) 330px; align-items: start; gap: 14px; }
.keyword-plan-layout > main, .keyword-plan-layout > aside { display: grid; gap: 14px; }
.keyword-landing-card, .keyword-roadmap, .keyword-task-card, .keyword-kpi-card, .keyword-competitor-card, .keyword-related-card { padding: 20px; }
.keyword-target-url { display: block; margin: -5px 0 16px; overflow: hidden; color: #5278a9; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.keyword-landing-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.keyword-landing-grid > div { padding: 13px; border: 1px solid #e5e9ee; border-radius: 10px; background: #f9fafc; }
.keyword-landing-grid small, .keyword-landing-grid strong { display: block; }
.keyword-landing-grid small { color: #8b95a4; font-size: 9px; text-transform: uppercase; }
.keyword-landing-grid strong { margin-top: 6px; color: #39465a; font-size: 12px; line-height: 1.45; }
.keyword-cannibalization-note { display: flex; margin-top: 12px; padding: 12px; align-items: flex-start; gap: 9px; border-radius: 10px; color: #526d91; background: #f3f8ff; }
.keyword-cannibalization-note span { display: grid; width: 19px; height: 19px; place-items: center; flex: 0 0 auto; border-radius: 50%; color: #fff; background: var(--blue); font-size: 11px; }
.keyword-cannibalization-note p { margin: 1px 0 0; font-size: 10px; line-height: 1.5; }
.keyword-roadmap > .panel-head > span, .keyword-related-card > .panel-head > span { color: #8a95a5; font-size: 11px; }
.keyword-roadmap article { display: grid; padding: 16px 0; grid-template-columns: 31px minmax(0,1fr); gap: 12px; border-top: 1px solid #edf0f3; }
.keyword-roadmap article:first-of-type { border-top: 0; }
.keyword-step-number { display: grid; width: 29px; height: 29px; place-items: center; border-radius: 9px; color: #fff; background: #162238; font-size: 11px; font-weight: 900; }
.keyword-roadmap h4 { margin: 2px 0 6px; font-size: 14px; }
.keyword-roadmap p { margin: 0; color: #697588; font-size: 11px; line-height: 1.55; }
.keyword-roadmap article small { display: block; margin-top: 8px; color: #2e7b59; font-size: 10px; font-weight: 700; }
.keyword-task-card h3, .keyword-kpi-card h3, .keyword-competitor-card h3 { margin: 6px 0 9px; font-size: 16px; line-height: 1.4; }
.keyword-task-card p:not(.eyebrow) { margin: 0 0 15px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.keyword-kpi-card ul { display: grid; margin: 13px 0 0; padding: 0; gap: 9px; list-style: none; }
.keyword-kpi-card li { position: relative; padding-left: 18px; color: #596678; font-size: 11px; line-height: 1.45; }
.keyword-kpi-card li::before { position: absolute; left: 0; top: 5px; width: 7px; height: 7px; border-radius: 50%; background: var(--green); content: ""; }
.keyword-competitor-card > div { display: flex; flex-wrap: wrap; gap: 6px; }
.keyword-competitor-card span { padding: 6px 8px; border-radius: 7px; color: #586578; background: #eef1f5; font-size: 10px; }
.keyword-related-card { margin-top: 14px; }
.keyword-related-list { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.keyword-related-list a { display: flex; min-height: 45px; padding: 10px 12px; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid #e7eaee; border-radius: 9px; }
.keyword-related-list strong { color: #3e4a5c; font-size: 11px; }
.keyword-related-list span { flex: 0 0 auto; color: #8994a3; font-size: 9px; }

.task-board { display: grid; grid-template-columns: repeat(5, minmax(180px,1fr)); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.task-column { min-width: 200px; padding: 11px; border: 1px solid var(--line); border-radius: 14px; background: #edf0f4; }
.task-column-head { display: flex; padding: 3px 5px 11px; align-items: center; justify-content: space-between; }
.task-column-head h3 { margin: 0; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
.task-column-head span { display: grid; width: 21px; height: 21px; place-items: center; border-radius: 7px; color: #778293; background: #fff; font-size: 11px; font-weight: 800; }
.task-stack { display: grid; gap: 8px; }
.content-card { padding: 13px; border: 1px solid #e1e5ea; border-radius: 11px; background: #fff; box-shadow: 0 4px 12px rgba(16,24,40,.035); }
.content-card > div:first-child { display: flex; align-items: center; gap: 7px; }
.content-card small { color: #8b95a4; font-size: 10px; }
.content-card h4 { margin: 10px 0 8px; font-size: 13px; line-height: 1.4; }
.content-card p { margin: 5px 0; color: #5f6a7d; font-size: 11px; line-height: 1.45; }
.content-card select { min-height: 30px; margin-top: 10px; padding: 0 7px; font-size: 11px; }
.priority { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #95a0ae; }
.priority-high { background: var(--red); }
.priority-medium { background: var(--yellow); }
.priority-low { background: var(--blue); }
.column-empty { padding: 22px 8px; border: 1px dashed #cfd5dc; border-radius: 9px; color: #99a2af; font-size: 11px; text-align: center; }
.content-row { display: grid; min-height: 50px; padding: 8px 3px; grid-template-columns: 8px minmax(0,1fr) auto; align-items: center; gap: 12px; border-top: 1px solid #edf0f3; }
.content-row:first-child { border-top: 0; }

.planning-overview { display: grid; margin-bottom: 16px; grid-template-columns: minmax(330px, 2fr) repeat(4, minmax(125px, .5fr)); gap: 12px; }
.planning-overview > article { display: flex; min-height: 104px; padding: 20px; align-items: center; gap: 13px; border: 1px solid var(--line); border-radius: 15px; background: #fff; }
.planning-overview > article:not(.planning-progress-card) strong { display: block; font-size: 24px; line-height: 1; }
.planning-overview > article:not(.planning-progress-card) small { display: block; margin-top: 7px; color: var(--muted); font-size: 12px; }
.planning-progress-card { display: block !important; color: #fff; border-color: #1d2940 !important; background: linear-gradient(135deg, #101a2e, #0b1322) !important; }
.planning-progress-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 15px; }
.planning-progress-head > div { display: flex; align-items: flex-end; gap: 12px; }
.planning-progress-head .metric-kicker { margin: 0 0 4px; color: #78869b; }
.planning-progress-head strong { font-size: 28px; line-height: 1; }
.planning-progress-head > span { color: #8e9aad; font-size: 12px; }
.planning-progress-track { height: 7px; margin-top: 18px; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.08); }
.planning-progress-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), #ff895f); box-shadow: 0 0 16px rgba(241,90,36,.35); }
.plan-stat-dot { width: 10px; height: 10px; flex: 0 0 auto; border-radius: 50%; background: #9aa4b2; }
.plan-stat-dot.todo { background: #7f8b9d; }
.plan-stat-dot.doing { background: var(--yellow); box-shadow: 0 0 0 5px rgba(228,161,27,.1); }
.plan-stat-dot.blocked { background: var(--red); box-shadow: 0 0 0 5px rgba(214,64,64,.1); }
.plan-stat-dot.done { background: var(--green); box-shadow: 0 0 0 5px rgba(22,163,106,.1); }
.planning-board { display: grid; min-width: 0; padding-bottom: 7px; grid-template-columns: repeat(4, minmax(230px, 1fr)); align-items: start; gap: 14px; overflow-x: auto; }
.planning-column { min-width: 0; padding: 13px; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: #eceff3; }
.planning-column-head { display: flex; min-height: 40px; padding: 3px 4px 12px; align-items: center; justify-content: space-between; }
.planning-column-head > div { display: flex; align-items: center; gap: 10px; }
.planning-column-head h3 { margin: 0; font-size: 15px; }
.planning-column-head > strong { display: grid; min-width: 27px; height: 27px; padding: 0 7px; place-items: center; border-radius: 8px; color: #657184; background: #fff; font-size: 12px; }
.planning-stack { display: grid; min-width: 0; align-content: start; gap: 10px; }
.planning-card { width: 100%; min-width: 0; max-width: 100%; padding: 16px; overflow: hidden; border: 1px solid #dde2e8; border-radius: 12px; outline: 0; background: #fff; box-shadow: 0 5px 16px rgba(16,24,40,.035); cursor: pointer; transition: border-color .16s, box-shadow .16s, transform .16s; }
.planning-card:hover, .planning-card:focus-visible { border-color: #f2aa90; box-shadow: 0 10px 25px rgba(16,24,40,.08); transform: translateY(-1px); }
.planning-card.completed { opacity: .72; }
.planning-card.completed h4 { text-decoration: line-through; text-decoration-color: #aab2be; }
.planning-card.is-collapsed-card { display: none; }
.planning-stack.expanded .planning-card.is-collapsed-card { display: block; }
.planning-card-meta { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 8px; color: #7e8999; font-size: 11px; }
.planning-card-meta > span { min-width: 0; overflow-wrap: anywhere; }
.plan-priority { display: inline-flex; min-height: 24px; padding: 0 8px; align-items: center; border-radius: 99px; font-size: 10px; font-weight: 800; }
.plan-priority.priority-high { color: #b43b3b; background: var(--red-soft); }
.plan-priority.priority-medium { color: #9a6810; background: var(--yellow-soft); }
.plan-priority.priority-low { color: #315fae; background: var(--blue-soft); }
.planning-card h4 { display: -webkit-box; margin: 13px 0 8px; overflow: hidden; color: #243044; font-size: 15px; line-height: 1.4; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.planning-card p { display: -webkit-box; margin: 0; overflow: hidden; color: var(--muted); font-size: 12px; line-height: 1.55; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 4; }
.planning-card-progress { display: grid; margin-top: 14px; gap: 7px; }
.planning-card-progress > div { display: flex; align-items: center; justify-content: space-between; color: #7e8999; font-size: 10px; }
.planning-card-progress > div strong { color: #344055; font-size: 11px; }
.planning-card-progress-track { display: block; height: 6px; overflow: hidden; border-radius: 99px; background: #edf0f4; }
.planning-card-progress-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), #ff986f); }
.planning-card.completed .planning-card-progress-track i { background: var(--green); }
.planning-blocked-reason { display: grid; margin-top: 12px; padding: 10px; gap: 4px; border: 1px solid #f0cdcd; border-radius: 9px; color: #934040; background: #fff7f7; }
.planning-blocked-reason strong { font-size: 10px; text-transform: uppercase; letter-spacing: .04em; }
.planning-blocked-reason span { display: -webkit-box; overflow: hidden; font-size: 10px; line-height: 1.45; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.planning-card-context { display: flex; min-width: 0; margin-top: 15px; padding-top: 11px; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid #edf0f3; color: #8b95a4; font-size: 11px; }
.planning-card-context span { min-width: 0; overflow-wrap: anywhere; }
.planning-card-actions { display: flex; margin-top: 11px; align-items: center; justify-content: space-between; gap: 7px; }
.planning-card-actions form { flex: 0 0 auto; }
.planning-open { display: inline-flex; min-width: 0; min-height: 34px; align-items: center; gap: 8px; color: var(--accent); font-size: 12px; font-weight: 800; }
.planning-open span { transition: transform .16s; }
.planning-open:hover span { transform: translateX(3px); }
.plan-delete { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid var(--line); border-radius: 8px; color: #9aa3b0; background: #fff; cursor: pointer; font-size: 18px; }
.plan-delete:hover { color: #fff; border-color: var(--red); background: var(--red); }
.planning-stack-toggle { width: 100%; min-height: 39px; padding: 0 12px; border: 1px solid #d5dbe3; border-radius: 10px; color: #59667a; background: rgba(255,255,255,.68); cursor: pointer; font-size: 11px; font-weight: 800; transition: border-color .16s, color .16s, background .16s; }
.planning-stack-toggle:hover { color: var(--accent); border-color: #efb29c; background: #fff; }

.planning-detail-header .title-line { align-items: center; }
.planning-detail-actions { display: flex; align-items: center; gap: 10px; }
.plan-task-status.status-doing { color: #96630c; background: var(--yellow-soft); }
.plan-task-status.status-blocked, .badge.status-blocked { color: #a83d3d; background: var(--red-soft); }
.plan-task-status.status-done { color: #13734c; background: var(--green-soft); }
.blocked-task-panel { margin-bottom: 18px; overflow: hidden; border: 1px solid #efc4c4; border-radius: 17px; background: #fff; box-shadow: 0 12px 30px rgba(143,38,38,.06); }
.blocked-task-head { display: grid; padding: 21px 23px; grid-template-columns: 42px minmax(0,1fr) auto; align-items: start; gap: 14px; background: linear-gradient(135deg, #fff5f5, #fffafa); }
.blocked-task-mark { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 12px; color: #fff; background: var(--red); box-shadow: 0 7px 18px rgba(214,64,64,.2); font-size: 20px; font-weight: 900; }
.blocked-task-head .eyebrow { color: #ae4c4c; }
.blocked-task-head h3 { margin: 5px 0 7px; color: #2a3447; font-size: 20px; }
.blocked-task-head p:last-child { max-width: 880px; margin: 0; color: #765d63; font-size: 12px; line-height: 1.65; }
.blocked-job-link { padding: 7px 9px; border: 1px solid #edcaca; border-radius: 8px; color: #a74141; background: #fff; font-size: 10px; font-weight: 800; white-space: nowrap; }
.blocked-task-body { display: grid; padding: 19px 23px 22px; grid-template-columns: minmax(0,.85fr) minmax(380px,1.15fr); align-items: start; gap: 24px; border-top: 1px solid #f1dddd; }
.blocked-requirements > span, .blocked-retry-form label > span { display: block; margin-bottom: 9px; color: #7f6870; font-size: 9px; font-weight: 800; letter-spacing: .1em; }
.blocked-requirements ol { display: grid; margin: 0; padding-left: 20px; gap: 8px; color: #435065; font-size: 11px; line-height: 1.55; }
.blocked-requirements li::marker { color: var(--red); font-weight: 800; }
.blocked-retry-form { display: grid; gap: 9px; }
.blocked-retry-form textarea { width: 100%; min-height: 82px; padding: 11px 12px; border: 1px solid #ddcfd2; border-radius: 10px; outline: 0; color: var(--ink); background: #fff; font-family: inherit; font-size: 12px; line-height: 1.5; resize: vertical; }
.blocked-retry-form textarea:focus { border-color: #e9896b; box-shadow: 0 0 0 3px rgba(241,90,36,.08); }
.blocked-retry-form .button { width: fit-content; min-width: 250px; }
.blocked-retry-form small { color: #8b7a80; font-size: 10px; line-height: 1.5; }
.blocked-task-panel.blocker-server { border-color: #eccd9c; }
.blocked-task-panel.blocker-server .blocked-task-head { background: linear-gradient(135deg, #fff8ec, #fffdf8); }
.blocked-task-panel.blocker-server .blocked-task-mark { background: #dc941d; }
.blocked-task-panel.blocker-owner_input { border-color: #efbda9; }
.workflow-summary { display: grid; margin-bottom: 18px; padding: 23px 25px; grid-template-columns: minmax(0, 1.25fr) minmax(460px, .75fr); align-items: center; gap: 32px; border: 1px solid #1d2940; border-radius: 17px; color: #dce4ef; background: linear-gradient(135deg, #101a2e, #0b1322); }
.workflow-summary > div > p { max-width: 720px; margin: 8px 0 0; color: #9aa6b8; font-size: 14px; line-height: 1.65; }
.workflow-summary dl { display: grid; margin: 0; grid-template-columns: 1fr 1fr; gap: 10px; }
.workflow-summary dl div { padding: 11px 12px; border: 1px solid rgba(255,255,255,.07); border-radius: 10px; background: rgba(255,255,255,.035); }
.workflow-summary dt { color: #758399; font-size: 10px; text-transform: uppercase; }
.workflow-summary dd { margin: 5px 0 0; font-size: 12px; font-weight: 800; }
.planning-detail-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(330px, .62fr); align-items: start; gap: 18px; }
.workflow-panel { padding: 22px; border: 1px solid var(--line); border-radius: 17px; background: #fff; }
.workflow-timeline { display: grid; margin-top: 8px; }
.workflow-step { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 12px; }
.workflow-step-marker { display: flex; align-items: center; flex-direction: column; }
.workflow-step-marker > span { position: relative; z-index: 2; display: grid; width: 32px; height: 32px; place-items: center; border: 2px solid #dfe4eb; border-radius: 50%; color: #7f8a9b; background: #fff; font-size: 12px; font-weight: 800; }
.workflow-step-marker > i { width: 2px; min-height: 42px; flex: 1; background: #e8ebf0; }
.workflow-step.step-completed .workflow-step-marker > span, .workflow-step.step-approved .workflow-step-marker > span { color: #fff; border-color: var(--green); background: var(--green); }
.workflow-step.step-running .workflow-step-marker > span { color: #fff; border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 6px rgba(241,90,36,.1); }
.workflow-step.step-awaiting_approval .workflow-step-marker > span, .workflow-step.step-awaiting_input .workflow-step-marker > span { color: #99640e; border-color: var(--yellow); background: var(--yellow-soft); }
.workflow-step.step-rejected .workflow-step-marker > span, .workflow-step.step-failed .workflow-step-marker > span { color: #fff; border-color: var(--red); background: var(--red); }
.workflow-step-body { min-width: 0; padding: 0 0 25px; }
.workflow-step-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.workflow-step-head > div { min-width: 0; }
.workflow-step-head h4 { margin: 7px 0 0; font-size: 16px; }
.workflow-step-body > p { margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.workflow-actor { display: inline-flex; min-height: 22px; padding: 0 7px; align-items: center; border-radius: 6px; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.workflow-actor.actor-system { color: #48617f; background: #edf3fa; }
.workflow-actor.actor-codex { color: #fff; background: #182338; }
.workflow-actor.actor-user { color: #a3411d; background: var(--accent-soft); }
.workflow-status { display: inline-flex; min-height: 26px; padding: 0 9px; align-items: center; border-radius: 99px; color: #677386; background: #f0f2f5; font-size: 10px; font-weight: 800; white-space: nowrap; }
.workflow-status.status-running { color: #a43c18; background: var(--accent-soft); }
.workflow-status.status-awaiting_approval, .workflow-status.status-awaiting_input { color: #8c5c08; background: var(--yellow-soft); }
.workflow-status.status-completed, .workflow-status.status-approved { color: #13734c; background: var(--green-soft); }
.workflow-status.status-rejected, .workflow-status.status-failed { color: #ae3a3a; background: var(--red-soft); }
.workflow-output { margin-top: 13px; overflow: hidden; border: 1px solid #dfe4eb; border-radius: 11px; background: #f8fafc; }
.workflow-output > div { display: flex; min-height: 37px; padding: 0 12px; align-items: center; justify-content: space-between; border-bottom: 1px solid #e5e9ee; color: #7a8697; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.workflow-output > div a { color: var(--accent); text-transform: none; }
.workflow-output pre { max-height: 460px; margin: 0; padding: 14px; overflow: auto; color: #344054; font-family: "Manrope", sans-serif; font-size: 12px; line-height: 1.65; white-space: pre-wrap; }
.approval-box { display: grid; margin-top: 14px; padding: 15px; gap: 11px; border: 1px solid #f0cf9a; border-radius: 12px; background: #fffaf0; }
.approval-box label > span, .credential-form label > span { display: block; margin-bottom: 6px; color: #687487; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.approval-box textarea, .credential-form input, .credential-form textarea { width: 100%; padding: 10px 11px; border: 1px solid #dfe4ea; border-radius: 9px; outline: 0; color: var(--ink); background: #fff; font-size: 12px; resize: vertical; }
.approval-box textarea:focus, .credential-form input:focus, .credential-form textarea:focus { border-color: #9bb3dc; box-shadow: 0 0 0 3px rgba(54,118,232,.09); }
.approval-box > div { display: flex; justify-content: flex-end; gap: 8px; }
.reject-button { color: #a83a3a !important; border-color: #efcaca !important; }
.workflow-sidebar { display: grid; gap: 18px; }
.security-note { display: flex; padding: 12px; align-items: flex-start; gap: 9px; border: 1px solid #d7e8df; border-radius: 10px; color: #486858; background: #f3faf6; }
.security-note > span { color: var(--green); font-size: 17px; }
.security-note p { margin: 0; font-size: 11px; line-height: 1.55; }
.security-note strong { display: block; margin-bottom: 2px; color: #285440; }
.credential-list { display: grid; margin-top: 14px; gap: 8px; }
.credential-list > div { display: grid; min-height: 52px; padding: 9px 10px; grid-template-columns: 25px minmax(0,1fr) 28px; align-items: center; gap: 8px; border: 1px solid #e7eaee; border-radius: 10px; }
.credential-lock { display: grid; width: 24px; height: 24px; place-items: center; border-radius: 7px; color: var(--green); background: var(--green-soft); font-size: 9px; }
.credential-list strong, .credential-list small { display: block; }
.credential-list strong { font-size: 12px; }
.credential-list small { margin-top: 4px; color: #8b95a4; font-size: 10px; }
.credential-list button { width: 27px; height: 27px; border: 0; border-radius: 7px; color: #9aa3b0; background: #f2f4f7; cursor: pointer; font-size: 16px; }
.credential-form { display: grid; margin-top: 15px; padding-top: 15px; gap: 11px; border-top: 1px solid #edf0f3; }
.credential-form input { min-height: 39px; }
.ssh-account-card { display: grid; min-height: 62px; margin-top: 14px; padding: 11px 12px; grid-template-columns: 28px minmax(0,1fr); align-items: center; gap: 9px; border: 1px solid #e3e7ec; border-radius: 11px; background: #fafbfc; }
.ssh-account-card strong, .ssh-account-card small { display: block; }
.ssh-account-card strong { font-size: 13px; }
.ssh-account-card small { margin-top: 4px; color: #7f8a9b; font-size: 11px; line-height: 1.45; }
.ssh-actions { display: grid; margin-top: 12px; grid-template-columns: 1fr 1fr; gap: 8px; }
.ssh-actions form, .ssh-actions button { width: 100%; }
.ssh-check-result { display: grid; margin-top: 13px; padding: 12px; gap: 5px; border: 1px solid #dfe5eb; border-radius: 10px; background: #f8fafc; }
.ssh-check-result strong { font-size: 12px; line-height: 1.5; }
.ssh-check-result small { color: #788496; font-size: 10px; }
.ssh-check-result code { margin-top: 3px; overflow-wrap: anywhere; color: #5d6878; font-size: 9px; }
.ssh-check-success { color: #276248; border-color: #cfe6da; background: #f2faf6; }
.ssh-check-error { color: #923f3f; border-color: #efcece; background: #fff5f5; }
.ssh-server-facts { display: grid; margin: 12px 0 0; gap: 0; border: 1px solid #e5e9ee; border-radius: 10px; overflow: hidden; }
.ssh-server-facts > div { display: grid; padding: 9px 10px; grid-template-columns: 92px minmax(0,1fr); gap: 8px; border-top: 1px solid #edf0f3; }
.ssh-server-facts > div:first-child { border-top: 0; }
.ssh-server-facts dt { color: #8791a0; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.ssh-server-facts dd { margin: 0; color: #344054; font-size: 10px; line-height: 1.45; white-space: pre-line; overflow-wrap: anywhere; }
.ssh-paths { display: grid; margin-top: 11px; padding: 11px; gap: 5px; border: 1px solid #e4e8ed; border-radius: 10px; background: #fafbfc; }
.ssh-paths strong { margin-top: 6px; color: #556173; font-size: 10px; }
.ssh-paths strong:first-child { margin-top: 0; }
.ssh-paths code { padding: 6px 7px; overflow-wrap: anywhere; border-radius: 6px; color: #445064; background: #fff; font-size: 9px; }
.ssh-credential-form input[readonly] { color: #637083; background: #f4f6f8; }
.oauth-status { display: inline-flex; min-height: 25px; padding: 0 9px; align-items: center; border-radius: 99px; color: #556274; background: #eef1f5; font-size: 10px; font-weight: 800; white-space: nowrap; }
.oauth-status.oauth-ready { color: #13734c; background: var(--green-soft); }
.oauth-status.oauth-pending { color: #8c5c08; background: var(--yellow-soft); }
.oauth-status.oauth-error { color: #ae3a3a; background: var(--red-soft); }
.yandex-security-note { margin-top: 3px; border-color: #f0d6a5; color: #695b38; background: #fffaf0; }
.yandex-security-note > span { display: grid; width: 25px; height: 25px; flex: 0 0 25px; place-items: center; border-radius: 7px; color: #fff; background: #fc3f1d; font-size: 12px; font-weight: 900; }
.yandex-security-note strong { color: #4d4124; }
.oauth-setup-steps { display: grid; margin: 15px 0; gap: 11px; }
.oauth-setup-steps > div { display: grid; grid-template-columns: 26px minmax(0,1fr); align-items: start; gap: 9px; }
.oauth-setup-steps > div > span { display: grid; width: 25px; height: 25px; place-items: center; border: 1px solid #e1e5eb; border-radius: 50%; color: #697486; background: #fff; font-size: 10px; font-weight: 800; }
.oauth-setup-steps p { margin: 0; }
.oauth-setup-steps strong, .oauth-setup-steps small { display: block; }
.oauth-setup-steps strong { color: #303a49; font-size: 12px; }
.oauth-setup-steps small { margin-top: 3px; color: #8a94a3; font-size: 10px; line-height: 1.45; }
.button.yandex-button { color: #fff; border-color: #fc3f1d; background: #fc3f1d; box-shadow: 0 8px 18px rgba(252,63,29,.17); }
.button.yandex-button:hover { background: #e93617; }
.oauth-copy-field { display: block; margin-top: 14px; }
.oauth-copy-field > span { display: block; margin-bottom: 6px; color: #687487; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.oauth-copy-field input { width: 100%; min-height: 39px; padding: 10px 11px; border: 1px solid #dfe4ea; border-radius: 9px; color: #5d6878; background: #f8fafc; font-size: 10px; }
.oauth-config-form { margin-top: 12px; padding-top: 12px; }
.oauth-account-card { display: grid; margin-top: 14px; padding: 12px; grid-template-columns: 38px minmax(0,1fr); align-items: center; gap: 10px; border: 1px solid #e3e7ec; border-radius: 11px; background: #fafbfc; }
.oauth-account-mark { display: grid; width: 37px; height: 37px; place-items: center; border-radius: 10px; color: #fff; background: #fc3f1d; font-size: 15px; font-weight: 900; }
.oauth-account-card span, .oauth-account-card strong { display: block; }
.oauth-account-card span { color: #7a8595; font-size: 10px; }
.oauth-account-card strong { margin-top: 3px; color: #293445; font-size: 12px; }
.oauth-message { margin-top: 11px; padding: 10px 11px; border: 1px solid #e2e7ed; border-radius: 9px; color: #566276; background: #f8fafc; font-size: 10px; line-height: 1.5; }
.oauth-message.oauth-warning { color: #795813; border-color: #f0d9a8; background: #fffaf0; }
.oauth-message.oauth-danger { color: #963d3d; border-color: #efcece; background: #fff5f5; }
.oauth-main-action { margin-top: 13px; }
.oauth-help { margin: 9px 3px 0; color: #8993a2; font-size: 10px; line-height: 1.5; }
.oauth-actions { display: grid; margin-top: 13px; gap: 8px; }
.oauth-api-request { margin-top: 13px; padding: 12px; border: 1px solid #f0d49f; border-radius: 10px; color: #6d5a32; background: #fffaf0; }
.oauth-api-request strong { color: #4e4024; font-size: 12px; }
.oauth-api-request p { margin: 6px 0; font-size: 10px; line-height: 1.5; }
.oauth-api-request code { display: block; padding: 8px; overflow-wrap: anywhere; border-radius: 7px; color: #4b5565; background: #fff; font-size: 10px; }
.oauth-api-request a { display: inline-block; margin-top: 8px; color: #b34a22; font-size: 10px; font-weight: 800; }
.oauth-settings { margin-top: 14px; padding-top: 13px; border-top: 1px solid #edf0f3; }
.oauth-settings summary { color: #697486; cursor: pointer; font-size: 10px; font-weight: 800; }
.oauth-settings[open] summary { margin-bottom: 4px; }
.oauth-disconnect { margin-top: 11px; text-align: center; }
.oauth-disconnect button { padding: 4px 8px; border: 0; color: #a24545; background: transparent; cursor: pointer; font-size: 10px; font-weight: 700; }
.workflow-events { display: grid; gap: 10px; }
.workflow-events > div:not(.column-empty) { display: grid; grid-template-columns: 9px minmax(0,1fr); align-items: start; gap: 10px; }
.workflow-events i { width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; background: #9aa4b2; }
.workflow-events i.actor-system { background: var(--blue); }
.workflow-events i.actor-codex { background: #1d293d; }
.workflow-events i.actor-user { background: var(--accent); }
.workflow-events strong, .workflow-events small { display: block; }
.workflow-events strong { color: #4a5669; font-size: 11px; line-height: 1.4; }
.workflow-events small { margin-top: 4px; color: #98a1ae; font-size: 10px; }

.codex-hero { position: relative; display: grid; margin-bottom: 18px; padding: 30px 32px; grid-template-columns: minmax(0,1.45fr) minmax(260px,.55fr); align-items: center; gap: 30px; overflow: hidden; border-radius: 20px; color: #fff; background: linear-gradient(125deg, #101a2e, #0a1222); }
.codex-hero::after { content:""; position:absolute; width:260px; height:260px; right:-80px; top:-120px; border:1px solid rgba(241,90,36,.15); border-radius:50%; box-shadow: 0 0 0 50px rgba(241,90,36,.03); }
.codex-title { display: flex; align-items: center; gap: 15px; }
.codex-title > span, .codex-icon-large { display: grid; width: 48px; height: 48px; place-items: center; border: 1px solid #66738a; border-radius: 14px; color: #fff; background: rgba(255,255,255,.03); font-size: 20px; font-weight: 800; }
.codex-title h2 { margin: 0; font-size: 27px; letter-spacing: -.04em; }
.codex-hero > div:first-child > p { max-width: 720px; margin: 15px 0 0; color: #8b97aa; font-size: 13px; line-height: 1.65; }
.worker-card { position: relative; z-index: 2; padding: 16px; border: 1px solid rgba(255,255,255,.08); border-radius: 13px; background: rgba(255,255,255,.045); }
.worker-card > div { display: flex; align-items: center; gap: 11px; }
.worker-card i { width: 8px; height: 8px; border-radius: 50%; background: #727d8d; }
.worker-card.online i { background: #37c889; box-shadow: 0 0 0 5px rgba(55,200,137,.1); }
.worker-card strong, .worker-card small { display: block; }
.worker-card strong { font-size: 13px; }
.worker-card small { margin-top: 3px; color: #7f8da1; font-size: 11px; }
.worker-card > small { margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.06); }
.codex-layout { display: grid; grid-template-columns: minmax(340px,.8fr) minmax(420px,1.2fr); gap: 18px; }
.codex-compose form { display: grid; gap: 15px; }
.codex-compose textarea, .dialog textarea { min-height: 100px; padding: 10px 11px; resize: vertical; }
.mode-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mode-switch label { position: relative; cursor: pointer; }
.mode-switch input { position: absolute; opacity: 0; }
.mode-switch span { display: block; min-height: 64px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.mode-switch input:checked + span { border-color: #f3a286; background: var(--accent-soft); box-shadow: 0 0 0 2px rgba(241,90,36,.08); }
.mode-switch strong, .mode-switch small { display: block; }
.mode-switch strong { font-size: 12px; }
.mode-switch small { margin-top: 4px; color: #8b95a4; font-size: 10px; }
.prompt-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.prompt-presets button { padding: 6px 9px; border: 1px solid var(--line); border-radius: 7px; color: #6e7a8d; background: #fafbfd; cursor: pointer; font-size: 10px; }
.prompt-presets button:hover { border-color: #f0a086; color: var(--accent); }
.form-hint { margin: 0; color: #8b95a4; font-size: 11px; line-height: 1.5; }
.form-hint.warning { color: #a46f00; }
.job-row { display: grid; min-height: 62px; padding: 10px 2px; grid-template-columns: 35px minmax(0,1fr) auto; align-items: center; gap: 12px; border-top: 1px solid #edf0f3; }
.job-row:first-child { border-top: 0; }
.job-row:hover .job-main strong { color: var(--accent); }
.job-id { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 9px; color: #6e798b; background: #f0f3f6; font-size: 11px; font-weight: 800; }
.job-main { min-width: 0; }
.job-main strong { display: block; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; transition: color .15s; }
.job-main small { display: block; margin-top: 5px; color: #929baa; font-size: 10px; }
.safety-grid { display: grid; margin-top: 18px; grid-template-columns: repeat(3,1fr); gap: 12px; }
.safety-grid article { display: flex; padding: 15px; align-items: flex-start; gap: 11px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.safety-grid article > span { color: var(--accent); font-size: 11px; font-weight: 800; }
.safety-grid strong { display: block; font-size: 12px; }
.safety-grid p { margin: 5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.back-link { display: inline-block; margin-bottom: 11px; color: #788497; font-size: 12px; }
.job-detail-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 18px; }
.prompt-box { padding: 16px; border: 1px solid var(--line); border-radius: 11px; color: #3e4a5d; background: #f8fafc; font-size: 13px; line-height: 1.65; white-space: pre-wrap; }
.job-meta { display: grid; margin: 18px 0 0; grid-template-columns: 1fr 1fr; gap: 10px; }
.job-meta div { padding: 10px; border: 1px solid #edf0f3; border-radius: 9px; }
.job-meta dt { color: #8e98a6; font-size: 10px; text-transform: uppercase; }
.job-meta dd { margin: 4px 0 0; font-size: 12px; font-weight: 700; }
.codex-response { min-height: 250px; max-height: 600px; margin: 0; padding: 17px; overflow: auto; border: 1px solid #26334a; border-radius: 11px; color: #dbe5f2; background: #0d1628; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; line-height: 1.65; white-space: pre-wrap; }
.event-panel { margin-top: 18px; }
.event-log { display: grid; gap: 8px; }
.event-log > div { padding: 10px 12px; border-radius: 9px; background: #f7f9fb; }
.event-log span { color: #8a94a3; font-family: ui-monospace, monospace; font-size: 10px; text-transform: uppercase; }
.event-log pre { margin: 7px 0 0; overflow-x: auto; color: #3f4b5e; font-family: ui-monospace, monospace; font-size: 11px; white-space: pre-wrap; }

.integration-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.integration-card { display: flex; min-height: 145px; padding: 20px; align-items: flex-start; gap: 16px; border: 1px solid var(--line); border-radius: 15px; background: #fff; }
.integration-card.featured { grid-column: 1 / -1; min-height: 170px; color: #dce4ef; border-color: #1e2b42; background: linear-gradient(145deg, #101b2f, #0b1323); }
.integration-card.next { border-color: #f3c8b9; box-shadow: inset 3px 0 0 var(--accent); }
.integration-card.yandex-suite-card { grid-column: 1 / -1; min-height: 135px; border-color: #f0d6a5; background: linear-gradient(135deg, #fffdf7, #fff8eb); }
.yandex-icon { color: #fff; border-color: #fc3f1d; background: #fc3f1d; }
.integration-icon { display: grid; width: 45px; height: 45px; place-items: center; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 13px; color: #344054; background: #f7f9fb; font-size: 20px; font-weight: 800; }
.integration-copy { flex: 1; }
.integration-copy h3 { margin: 0; font-size: 18px; }
.integration-copy p { margin: 9px 0 0; color: #7d8899; font-size: 12px; line-height: 1.55; }
.integration-copy dl { display: grid; margin: 18px 0 0; grid-template-columns: repeat(3,1fr); gap: 10px; }
.integration-copy dl div { padding: 10px; border: 1px solid rgba(255,255,255,.07); border-radius: 9px; background: rgba(255,255,255,.03); }
.integration-copy dt { color: #707e93; font-size: 10px; text-transform: uppercase; }
.integration-copy dd { margin: 4px 0 0; color: #cdd7e4; font-size: 11px; font-weight: 700; }
.roadmap-badge { color: #a63f1b; border-color: #f3c8b9; background: #fff1eb; }
.success-badge { color: #237a51; border-color: #bfe3d0; background: #eaf8f0; }
.integration-result { display: block; margin-top: 13px; color: #536074; font-size: 11px; font-weight: 700; }
.system-panel { margin-top: 16px; }
.settings-list { display: grid; margin: 0; }
.settings-list div { display: grid; padding: 13px 0; grid-template-columns: 190px 1fr; border-top: 1px solid #edf0f3; }
.settings-list div:first-child { border-top: 0; }
.settings-list dt { color: #838e9e; font-size: 12px; }
.settings-list dd { margin: 0; color: #344054; font-size: 12px; font-weight: 700; }

.yandex-page-head { align-items: flex-end; }
.yandex-account-hero { display: grid; margin-bottom: 18px; padding: 27px; grid-template-columns: minmax(0,1.35fr) minmax(380px,.65fr); gap: 28px; border: 1px solid #1f2a3d; border-radius: 17px; color: #e7edf6; background: linear-gradient(145deg, #111c30, #0a1322); box-shadow: 0 14px 34px rgba(14,24,42,.12); }
.yandex-account-identity { display: flex; align-items: center; gap: 18px; }
.yandex-large-mark { display: grid; width: 62px; height: 62px; place-items: center; flex: 0 0 62px; border-radius: 18px; color: #fff; background: #fc3f1d; font-size: 25px; font-weight: 900; box-shadow: 0 13px 25px rgba(252,63,29,.24); }
.yandex-account-identity h3 { margin: 4px 0 7px; font-size: 23px; }
.yandex-account-identity p:last-child { max-width: 690px; margin: 0; color: #8e9bae; font-size: 12px; line-height: 1.65; }
.yandex-account-hero dl { display: grid; margin: 0; grid-template-columns: 1fr 1fr; gap: 9px; }
.yandex-account-hero dl div { padding: 11px; border: 1px solid rgba(255,255,255,.07); border-radius: 10px; background: rgba(255,255,255,.035); }
.yandex-account-hero dt { color: #718096; font-size: 9px; text-transform: uppercase; }
.yandex-account-hero dd { margin: 4px 0 0; color: #dce4ef; font-size: 11px; font-weight: 750; }
.yandex-integration-layout { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(320px,.65fr); align-items: start; gap: 18px; }
.yandex-services-panel, .yandex-connect-panel { padding: 22px; }
.yandex-service-list { display: grid; gap: 10px; }
.yandex-service-row { display: grid; padding: 15px; grid-template-columns: 38px minmax(0,1fr); gap: 12px; border: 1px solid #e6eaf0; border-radius: 12px; background: #fbfcfd; }
.yandex-service-row.status-connected { border-color: #cbe8d8; background: #f7fcf9; }
.yandex-service-row.status-approval_required, .yandex-service-row.status-permission_required, .yandex-service-row.status-resource_missing { border-color: #efd9ad; background: #fffaf1; }
.yandex-service-icon { display: grid; width: 37px; height: 37px; place-items: center; border: 1px solid #e1e6ec; border-radius: 10px; color: #475467; background: #fff; font-size: 15px; font-weight: 850; }
.yandex-service-row h4 { margin: 0; font-size: 14px; }
.yandex-service-row p { margin: 5px 0; color: #7d8899; font-size: 11px; line-height: 1.5; }
.yandex-service-row small { display: block; color: #536074; font-size: 10px; font-weight: 650; line-height: 1.5; }
.yandex-service-row time { display: block; margin-top: 7px; color: #9aa3b0; font-size: 9px; }
.service-facts { display: flex; margin: 10px 0 0; gap: 7px; flex-wrap: wrap; }
.service-facts div { min-width: 95px; padding: 7px 9px; border: 1px solid #e5e9ee; border-radius: 8px; background: #fff; }
.service-facts dt { color: #8d97a5; font-size: 8px; text-transform: uppercase; }
.service-facts dd { margin: 2px 0 0; color: #344054; font-size: 10px; font-weight: 800; }
.yandex-scopes { display: flex; margin-top: 12px; gap: 6px; flex-wrap: wrap; }
.yandex-scopes span { padding: 5px 7px; border: 1px solid #e6e9ee; border-radius: 7px; color: #657184; background: #f8fafc; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 9px; }

.dialog { width: min(520px, calc(100vw - 30px)); padding: 0; border: 0; border-radius: 17px; background: #fff; box-shadow: 0 30px 80px rgba(10,16,28,.28); }
.dialog::backdrop { background: rgba(8, 13, 24, .58); backdrop-filter: blur(3px); }
.dialog form { display: grid; padding: 23px; gap: 14px; }
.dialog-head { display: flex; margin-bottom: 4px; align-items: flex-start; justify-content: space-between; }
.dialog-head h3 { margin: 0; font-size: 20px; letter-spacing: -.04em; }
.dialog-head button { width: 30px; height: 30px; border: 0; border-radius: 8px; color: #7d8796; background: #f0f3f6; cursor: pointer; font-size: 21px; }
.dialog-actions { display: flex; margin-top: 5px; justify-content: flex-end; gap: 8px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.public-page { background: #0c1322; }
.login-shell { display: grid; min-height: 100vh; grid-template-columns: minmax(420px, 1.15fr) minmax(390px, .85fr); }
.login-story { position: relative; display: flex; padding: 42px 55px; flex-direction: column; overflow: hidden; color: #fff; background: radial-gradient(circle at 25% 30%, rgba(241,90,36,.12), transparent 30%), linear-gradient(145deg, #111b2f, #09101d); }
.login-brand { position: relative; z-index: 2; display: flex; align-items: center; gap: 12px; }
.login-brand strong, .login-brand small { display: block; }
.login-brand small { margin-top: 4px; color: #748196; font-size: 11px; letter-spacing: .16em; }
.login-copy { position: relative; z-index: 2; max-width: 690px; margin: auto 0; }
.login-copy h1 { margin: 10px 0 20px; font-size: clamp(46px, 6vw, 85px); line-height: .98; letter-spacing: -.07em; }
.login-copy h1 em { color: var(--accent); font-style: normal; }
.login-copy > p:not(.eyebrow) { max-width: 600px; margin: 0; color: #8d99aa; font-size: 16px; line-height: 1.8; }
.login-points { display: flex; margin-top: 32px; gap: 8px; flex-wrap: wrap; }
.login-points span { padding: 8px 11px; border: 1px solid rgba(255,255,255,.08); border-radius: 99px; color: #9aa6b7; background: rgba(255,255,255,.03); font-size: 12px; }
.login-grid { position: absolute; inset: 0; opacity: .16; background-image: linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px); background-size: 60px 60px; mask-image: linear-gradient(to bottom, transparent, black 30%, transparent); }
.login-panel { display: grid; padding: 35px; place-items: center; background: #f5f7fa; }
.login-form { display: grid; width: min(380px, 100%); padding: 34px; gap: 18px; border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: 0 25px 60px rgba(16,24,40,.12); }
.login-form h2 { margin: 0; font-size: 25px; letter-spacing: -.04em; }
.login-form .muted { margin: 7px 0 0; font-size: 13px; }
.login-form input { width: 100%; height: 43px; padding: 0 12px; border: 1px solid #dfe4ea; border-radius: 10px; outline: 0; }
.login-form input:focus { border-color: #9bb3dc; box-shadow: 0 0 0 3px rgba(54,118,232,.09); }
.login-note { color: #99a2af; font-size: 11px; text-align: center; }
.form-error { padding: 11px 12px; border: 1px solid #f5caca; border-radius: 9px; color: #af3333; background: #fff1f1; font-size: 12px; }

.work-page-head { align-items: flex-end; }
.work-overview { display: grid; margin-bottom: 14px; grid-template-columns: repeat(3, minmax(150px, .62fr)) minmax(300px, 1.45fr); gap: 12px; }
.work-overview > article { display: flex; min-height: 104px; padding: 19px; align-items: center; gap: 13px; border: 1px solid var(--line); border-radius: 15px; background: #fff; }
.work-overview strong, .work-overview small { display: block; }
.work-overview > article:not(.worker-state) strong { font-size: 27px; line-height: 1; }
.work-overview small { margin-top: 7px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.work-metric-icon { display: grid; width: 35px; height: 35px; place-items: center; flex: 0 0 auto; border-radius: 11px; font-size: 15px; font-weight: 900; }
.work-metric-icon.running { color: #a56800; background: var(--yellow-soft); }
.work-metric-icon.queued { color: #45617f; background: #edf3fa; }
.work-metric-icon.completed { color: #16764f; background: var(--green-soft); }
.worker-state { color: #fff; border-color: #1d2940 !important; background: linear-gradient(135deg, #101a2e, #0b1322) !important; }
.worker-state strong { font-size: 15px; }
.worker-state small { color: #8e9bad; }
.worker-pulse { width: 13px; height: 13px; flex: 0 0 auto; border-radius: 50%; background: #7d8796; }
.worker-state.online .worker-pulse { background: #43bc82; box-shadow: 0 0 0 7px rgba(67,188,130,.12); }
.worker-state.offline .worker-pulse { background: #dc6262; box-shadow: 0 0 0 7px rgba(220,98,98,.1); }
.work-filter { justify-content: space-between; }
.work-truth-note { display: flex; align-items: center; gap: 8px; color: #687487; font-size: 11px; font-weight: 700; }
.work-truth-note i { width: 8px; height: 8px; border-radius: 50%; background: #3eb67a; box-shadow: 0 0 0 5px rgba(62,182,122,.1); }
.active-work-list { display: grid; margin-top: 14px; gap: 12px; }
.active-work-card { padding: 21px 23px; border: 1px solid #dfe4eb; border-radius: 16px; background: #fff; box-shadow: 0 8px 24px rgba(16,24,40,.04); }
.active-work-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.active-work-title { min-width: 0; }
.active-work-badges { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: #8993a1; font-size: 10px; }
.active-work-badges .badge { min-height: 24px; }
.work-status-running { color: #a43c18; background: var(--accent-soft); }
.work-status-queued { color: #49617c; background: #edf3fa; }
.active-work-card h3 { margin: 10px 0 0; font-size: 18px; line-height: 1.35; }
.active-work-card h3 a { color: #222e42; }
.active-work-card h3 a:hover { color: var(--accent); }
.work-percent { color: var(--accent); font-size: 28px; line-height: 1; letter-spacing: -.04em; }
.work-progress-track { height: 9px; margin-top: 18px; overflow: hidden; border-radius: 99px; background: #edf0f4; }
.work-progress-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), #ff936b); box-shadow: 0 0 14px rgba(241,90,36,.25); transition: width .3s ease; }
.current-work-action { display: flex; margin-top: 17px; padding: 14px 16px; align-items: flex-start; gap: 12px; border: 1px solid #e4e8ee; border-radius: 11px; background: #f8fafc; }
.work-action-dot { width: 9px; height: 9px; margin-top: 5px; flex: 0 0 auto; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px rgba(241,90,36,.1); animation: work-pulse 1.6s ease-in-out infinite; }
.current-work-action small, .current-work-action strong { display: block; }
.current-work-action small { margin-bottom: 5px; color: #8994a4; font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.current-work-action strong { color: #39465a; font-size: 12px; line-height: 1.45; }
.active-work-footer { display: flex; margin-top: 14px; align-items: center; flex-wrap: wrap; gap: 7px 15px; color: #8c96a5; font-size: 10px; }
.active-work-footer a { margin-left: auto; color: var(--accent); font-weight: 800; }
.active-work-footer a + a { margin-left: 0; }
.work-empty { display: grid; min-height: 285px; padding: 35px; place-items: center; align-content: center; gap: 10px; border: 1px dashed #cfd6df; border-radius: 17px; color: #738094; background: #fff; text-align: center; }
.work-empty > span { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 50%; font-size: 21px; font-weight: 900; }
.work-empty > span.online { color: #16805a; background: var(--green-soft); }
.work-empty > span.offline { color: #ad3f3f; background: var(--red-soft); }
.work-empty h3 { margin: 3px 0 0; color: #263247; font-size: 19px; }
.work-empty p { max-width: 610px; margin: 0; font-size: 12px; line-height: 1.6; }
.blocked-work-callout { display: flex; margin-top: 14px; padding: 17px 19px; align-items: center; justify-content: space-between; gap: 18px; border: 1px solid #efcccc; border-radius: 15px; background: #fff8f8; }
.blocked-work-callout > div { display: flex; align-items: center; gap: 13px; }
.blocked-work-callout strong, .blocked-work-callout p { display: block; }
.blocked-work-callout p { margin: 5px 0 0; color: #846767; font-size: 11px; line-height: 1.5; }
.blocked-icon { display: grid; width: 35px; height: 35px; place-items: center; flex: 0 0 auto; border-radius: 10px; color: #fff; background: var(--red); font-weight: 900; }
.report-task-progress { display: block; height: 4px; margin-top: 8px; overflow: hidden; border-radius: 99px; background: #edf0f3; }
.report-task-progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), #ff936b); }
@keyframes work-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

.report-page-head { align-items: flex-end; }
.report-filter { margin-bottom: 16px; }
.report-goal { display: grid; min-height: 170px; margin-bottom: 14px; padding: 28px 30px; grid-template-columns: minmax(0,1fr) 230px; align-items: center; gap: 30px; border-radius: 20px; color: #fff; background: radial-gradient(circle at 80% 20%, rgba(241,90,36,.16), transparent 30%), linear-gradient(130deg, #101a2e, #0a1222); box-shadow: 0 16px 40px rgba(13,23,41,.12); }
.report-goal h3 { max-width: 760px; margin: 10px 0 8px; font-size: 27px; line-height: 1.2; letter-spacing: -.04em; }
.report-goal > div:first-child > p:last-child { margin: 0; color: #8e9bae; font-size: 13px; }
.report-target { display: grid; padding: 20px; gap: 8px; border: 1px solid rgba(255,255,255,.09); border-radius: 14px; background: rgba(255,255,255,.04); }
.report-target small { color: #8794a7; font-size: 11px; }
.report-target strong { font-size: 38px; line-height: 1; letter-spacing: -.05em; }
.report-target span { display: inline-flex; margin-top: 5px; align-items: center; gap: 7px; color: #9aa6b6; font-size: 10px; font-weight: 800; }
.report-target span i { width: 8px; height: 8px; border-radius: 50%; }
.report-target .automation-on i { background: #45bf86; box-shadow: 0 0 0 5px rgba(69,191,134,.1); }
.report-target .automation-off i { background: #8590a0; }
.report-audit-progress { margin-bottom: 14px; }
.report-metrics { display: grid; margin-bottom: 14px; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.report-metrics article { min-height: 118px; padding: 20px; border: 1px solid var(--line); border-radius: 15px; background: #fff; }
.report-metrics span, .report-metrics small { display: block; color: var(--muted); font-size: 11px; }
.report-metrics span { font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.report-metrics strong { display: block; margin: 10px 0 6px; font-size: 29px; line-height: 1; letter-spacing: -.04em; }
.report-grid { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(340px,.72fr); align-items: start; gap: 14px; }
.report-side { display: grid; gap: 14px; }
.report-roadmap { display: grid; gap: 8px; }
.report-roadmap > a { display: grid; min-height: 68px; padding: 11px 12px; grid-template-columns: 34px minmax(0,1fr) auto; align-items: center; gap: 10px; border: 1px solid #e4e8ed; border-radius: 11px; background: #fff; transition: border-color .16s, transform .16s; }
.report-roadmap > a:hover { border-color: #f2a88e; transform: translateY(-1px); }
.roadmap-number { display: grid; width: 31px; height: 31px; place-items: center; border-radius: 9px; color: #fff; background: #182338; font-size: 11px; font-weight: 800; }
.report-roadmap strong, .report-roadmap small { display: block; }
.report-roadmap strong { color: #273347; font-size: 12px; line-height: 1.4; }
.report-roadmap small { margin-top: 4px; color: #8a94a3; font-size: 10px; }
.integration-health { display: grid; gap: 0; }
.integration-health > div { display: grid; padding: 12px 0; grid-template-columns: 12px minmax(0,1fr); align-items: start; gap: 10px; border-top: 1px solid #edf0f3; }
.integration-health > div:first-child { border-top: 0; }
.integration-health i { width: 9px; height: 9px; margin-top: 5px; border-radius: 50%; }
.integration-health i.ready { background: #42b87e; box-shadow: 0 0 0 5px rgba(66,184,126,.1); }
.integration-health i.missing { background: #e7a928; box-shadow: 0 0 0 5px rgba(231,169,40,.1); }
.integration-health strong, .integration-health small { display: block; }
.integration-health strong { font-size: 12px; }
.integration-health small { margin-top: 4px; color: #8792a1; font-size: 10px; line-height: 1.45; }
.automation-panel form { display: grid; gap: 11px; }
.toggle-row { display: flex; min-height: 52px; padding: 10px 0; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid #edf0f3; }
.toggle-row:first-of-type { border-top: 0; }
.toggle-row strong, .toggle-row small { display: block; }
.toggle-row strong { font-size: 12px; }
.toggle-row small { margin-top: 3px; color: #8a94a3; font-size: 10px; }
.toggle-row input { width: 38px; height: 20px; accent-color: var(--accent); }
.automation-panel form > label:not(.toggle-row) > span, .automation-fields label > span { display: block; margin-bottom: 6px; color: #687487; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.automation-panel textarea, .automation-panel input:not([type="checkbox"]) { width: 100%; padding: 10px; border: 1px solid #dfe4ea; border-radius: 8px; outline: 0; color: var(--ink); background: #fff; font-size: 11px; resize: vertical; }
.automation-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.report-secondary { margin-top: 14px; grid-template-columns: 1fr 1fr; }
.report-issue-groups { display: grid; gap: 0; }
.report-issue-groups > div:not(.empty-state) { display: grid; min-height: 52px; padding: 9px 0; grid-template-columns: 68px minmax(0,1fr) auto; align-items: center; gap: 9px; border-top: 1px solid #edf0f3; }
.report-issue-groups > div:first-child { border-top: 0; }
.report-issue-groups strong { font-size: 11px; }
.report-issue-groups small { color: #8893a2; font-size: 10px; }

.monitoring-head { align-items: flex-end; }
.monitoring-status { display: flex; min-height: 135px; margin-bottom: 14px; padding: 25px 28px; align-items: center; justify-content: space-between; gap: 22px; border: 1px solid #23314a; border-radius: 18px; color: #fff; background: linear-gradient(135deg, #111c30, #0a1322); }
.monitoring-status > div { display: flex; align-items: center; gap: 18px; }
.monitoring-status h3 { margin: 5px 0; font-size: 23px; }
.monitoring-status p:last-child { margin: 0; color: #8f9caf; font-size: 11px; }
.monitoring-status > strong { font-size: 30px; letter-spacing: -.04em; }
.monitoring-pulse { width: 18px; height: 18px; flex: 0 0 18px; border-radius: 50%; background: #7e8998; box-shadow: 0 0 0 10px rgba(126,137,152,.12); }
.monitoring-status.status-healthy .monitoring-pulse { background: #46bb82; box-shadow: 0 0 0 10px rgba(70,187,130,.12); }
.monitoring-status.status-degraded .monitoring-pulse { background: #e5a62a; box-shadow: 0 0 0 10px rgba(229,166,42,.12); }
.monitoring-status.status-down .monitoring-pulse { background: #e45858; box-shadow: 0 0 0 10px rgba(228,88,88,.12); }
.monitoring-metrics { grid-template-columns: repeat(5, 1fr); }
.monitoring-grid { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(330px,.7fr); align-items: start; gap: 14px; }
.monitoring-endpoints, .monitoring-history { display: grid; }
.monitoring-endpoints > div:not(.empty-state) { display: grid; min-height: 66px; padding: 11px 0; grid-template-columns: 12px minmax(0,1fr) auto; align-items: center; gap: 11px; border-top: 1px solid #edf0f3; }
.monitoring-endpoints > div:first-child, .monitoring-history > div:first-child { border-top: 0; }
.monitoring-endpoints i { width: 9px; height: 9px; border-radius: 50%; }
.monitoring-endpoints i.ready { background: #42b87e; box-shadow: 0 0 0 5px rgba(66,184,126,.1); }
.monitoring-endpoints i.missing { background: #e25555; box-shadow: 0 0 0 5px rgba(226,85,85,.1); }
.monitoring-endpoints strong, .monitoring-endpoints small { display: block; }
.monitoring-endpoints strong { font-size: 12px; }
.monitoring-endpoints small { max-width: 540px; margin-top: 4px; overflow: hidden; color: #8a94a3; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.endpoint-result { text-align: right; }
.endpoint-result strong { font-size: 13px; }
.monitoring-history > div:not(.empty-state) { display: grid; min-height: 57px; padding: 9px 0; grid-template-columns: 10px minmax(0,1fr) auto; align-items: center; gap: 10px; border-top: 1px solid #edf0f3; }
.monitoring-history strong, .monitoring-history small { display: block; }
.monitoring-history strong { font-size: 11px; }
.monitoring-history small { margin-top: 3px; color: #8a94a3; font-size: 9px; }
.check-dot { width: 8px; height: 8px; border-radius: 50%; background: #7e8998; }
.check-dot.status-healthy { background: #42b87e; }
.check-dot.status-degraded { background: #e5a62a; }
.check-dot.status-down { background: #e25555; }
.deployment-panel, .deployment-history-panel { margin-top: 14px; }
.deployment-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.deployment-summary > div { padding: 13px; border: 1px solid #e4e8ed; border-radius: 10px; background: #f8fafc; }
.deployment-summary span, .deployment-summary strong { display: block; }
.deployment-summary span { color: #8792a1; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.deployment-summary strong { margin-top: 6px; font-size: 15px; }
.deployment-files { display: flex; margin-top: 12px; gap: 6px; flex-wrap: wrap; }
.deployment-files code { padding: 6px 8px; border-radius: 7px; color: #536074; background: #f1f4f7; font-size: 10px; }
.badge.deployment-success { color: #237a51; background: #e8f7ef; }
.badge.deployment-skipped, .badge.deployment-dry_run { color: #8d6817; background: #fff5d9; }
.badge.deployment-failed { color: #b33e3e; background: #fdecec; }
.deployment-history { display: grid; }
.deployment-history > a { display: grid; min-height: 61px; padding: 10px 0; grid-template-columns: 10px minmax(0,1fr) auto; align-items: center; gap: 11px; border-top: 1px solid #edf0f3; }
.deployment-history > a:first-child { border-top: 0; }
.deployment-history strong, .deployment-history small { display: block; }
.deployment-history strong { color: #273347; font-size: 12px; }
.deployment-history small { margin-top: 4px; color: #8a94a3; font-size: 10px; }

.semantic-tabs { display: flex; margin-bottom: 14px; padding: 5px; gap: 4px; overflow-x: auto; border: 1px solid #e2e7ed; border-radius: 13px; background: #fff; }
.semantic-tabs a { padding: 10px 14px; flex: 0 0 auto; border-radius: 9px; color: #667286; font-size: 11px; font-weight: 750; }
.semantic-tabs a.active { color: #fff; background: #172338; box-shadow: 0 5px 14px rgba(23,35,56,.14); }
.semantic-v21-overview { display: grid; margin-bottom: 14px; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; }
.semantic-v21-overview article { min-height: 105px; padding: 18px; border: 1px solid #e2e7ed; border-radius: 14px; background: #fff; }
.semantic-v21-overview span, .semantic-v21-overview strong, .semantic-v21-overview small { display: block; }
.semantic-v21-overview span { color: #7f8b9d; font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.semantic-v21-overview strong { margin: 7px 0 4px; color: #172338; font-size: 27px; letter-spacing: -.03em; }
.semantic-v21-overview small { color: #8792a2; font-size: 10px; line-height: 1.45; }
.measurement-tier-overview { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.measurement-source-grid { display: grid; margin-bottom: 14px; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.measurement-source-card { min-width: 0; padding: 17px; border: 1px solid #e1e6ec; border-radius: 14px; background: #fff; }
.measurement-source-card > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.measurement-source-card > div span { overflow: hidden; color: #26354d; font-size: 10px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.measurement-source-card > div strong { padding: 4px 7px; flex: 0 0 auto; border-radius: 999px; color: #5d6b7f; background: #edf1f5; font-size: 8px; }
.measurement-source-card.status-fresh > div strong { color: #23764f; background: #e4f5ec; }
.measurement-source-card.status-aging > div strong { color: #95620e; background: #fff1d2; }
.measurement-source-card.status-stale > div strong, .measurement-source-card.status-error > div strong { color: #ad3d32; background: #fde9e6; }
.measurement-source-card dl { display: grid; margin: 14px 0; gap: 7px; }
.measurement-source-card dl div { min-width: 0; }
.measurement-source-card dt { color: #909baa; font-size: 7px; font-weight: 800; letter-spacing: .06em; }
.measurement-source-card dd { margin: 2px 0 0; overflow: hidden; color: #4e5b6f; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.measurement-status-panel { margin-bottom: 14px; }
.measurement-status-panel > p { color: #667286; font-size: 11px; }
.gsc-setup-grid { display: grid; margin-bottom: 16px; grid-template-columns: minmax(0, 1.7fr) minmax(230px, .8fr); gap: 12px; }
.gsc-connection-details { display: grid; margin: 0; padding: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; border: 1px solid #e3e8ee; border-radius: 12px; background: #fafbfd; }
.gsc-connection-details div { min-width: 0; }
.gsc-connection-details dt { margin-bottom: 4px; color: #8a95a5; font-size: 8px; font-weight: 800; letter-spacing: .07em; }
.gsc-connection-details dd { margin: 0; overflow-wrap: anywhere; color: #39465a; font-size: 10px; line-height: 1.45; }
.gsc-connection-details code { font-size: 9px; }
.gsc-readonly-contract { padding: 15px; border: 1px solid #cde7da; border-radius: 12px; color: #32654f; background: #eff9f4; }
.gsc-readonly-contract strong, .gsc-readonly-contract span { display: block; }
.gsc-readonly-contract p { margin: 7px 0; font-size: 10px; line-height: 1.5; }
.gsc-readonly-contract span { color: #53806d; font-size: 9px; font-weight: 700; }
.gsc-secret-state { display: grid; margin-bottom: 12px; padding: 12px 14px; grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px 12px; border: 1px solid #e3e8ee; border-radius: 11px; background: #fafbfd; }
.gsc-secret-state span { color: #8792a2; font-size: 9px; }
.gsc-secret-state strong { overflow: hidden; color: #405069; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.gsc-connect-form { margin-top: 10px; }
.freshness-badge.status-connected { color: #23764f; background: #e4f5ec; }
.freshness-badge.status-error { color: #ad3d32; background: #fde9e6; }
.measurement-config-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; align-items: end; gap: 9px; }
.measurement-config-form label, .measurement-config-form input { min-width: 0; width: 100%; }
.measurement-property-form { display: flex; align-items: center; gap: 8px; }
.measurement-property-form select { min-width: 0; flex: 1; }
.freshness-badge { padding: 5px 8px; border-radius: 999px; color: #5d6b7f; background: #edf1f5; font-size: 8px; font-weight: 800; }
.measurement-cluster-table { min-width: 880px; }
.measurement-cluster-table td strong, .measurement-cluster-table td small { display: block; }
.performance-table { min-width: 1180px; }
.tracking-tier { display: inline-flex; min-width: 31px; padding: 5px 8px; justify-content: center; border-radius: 999px; color: #fff; background: #53647c; font-size: 9px; font-weight: 850; }
.tracking-tier.tier-a { background: #e45a35; }
.tracking-tier.tier-b { background: #c68a20; }
.tracking-tier.tier-c { background: #4d729d; }
.tracking-tier.tier-legacy { background: #687386; }
.filter-bar.semantic-v21-filters { display: grid; width: 100%; min-width: 0; margin-bottom: 14px; grid-template-columns: repeat(auto-fit, minmax(min(135px, 100%), 1fr)); align-items: end; gap: 9px; }
.semantic-v21-filters > *, .semantic-v21-filters label { width: auto; min-width: 0; max-width: 100%; }
.semantic-v21-filters .table-search { min-width: 0; align-self: end; }
.semantic-v21-filters .button { width: 100%; min-width: 0; }
.semantic-v21-table { min-width: 1080px; }
.semantic-v21-table th { white-space: nowrap; }
.semantic-v21-table td { max-width: 260px; vertical-align: top; }
.semantic-v21-table td > strong, .semantic-v21-table td > small, .semantic-v21-table td > a { display: block; }
.semantic-v21-table td > strong { line-height: 1.4; }
.semantic-v21-table td > small { margin-top: 5px; color: #8a95a5; font-size: 9px; line-height: 1.45; }
.semantic-v21-table .url-cell { max-width: 245px; overflow: hidden; font-size: 9px; line-height: 1.5; text-overflow: ellipsis; }
.semantic-badges { display: flex; margin-bottom: 7px; align-items: center; gap: 5px; flex-wrap: wrap; color: #8190a4; font-size: 8px; }
.semantic-priority, .mapping-action { display: inline-flex; padding: 4px 7px; align-items: center; border-radius: 999px; font-size: 8px; font-weight: 850; letter-spacing: .03em; }
.semantic-priority.p-p0 { color: #a82f2f; background: #fdeaea; }
.semantic-priority.p-p1 { color: #a05f13; background: #fff1d7; }
.semantic-priority.p-p2 { color: #2d62a4; background: #eaf2fd; }
.semantic-priority.p-p3 { color: #657388; background: #edf1f5; }
.semantic-badges .tracked { padding: 3px 6px; border-radius: 999px; color: #257a53; background: #e6f6ed; font-weight: 800; }
.mapping-action { color: #42536b; background: #edf1f5; }
.mapping-action.action-remap { color: #b03b2c; background: #fdeae6; }
.mapping-action.action-create { color: #2c619e; background: #e8f1fb; }
.mapping-action.action-expand { color: #98650f; background: #fff2d6; }
.mapping-action.action-keep { color: #24784f; background: #e6f6ed; }
.mapping-problem { color: #bb4735 !important; font-weight: 750; }
.mapping-arrow { color: var(--accent); font-size: 18px; font-weight: 800; text-align: center; }
.semantic-mapping-summary { display: grid; margin-bottom: 14px; grid-template-columns: repeat(6, minmax(0,1fr)); gap: 8px; }
.semantic-mapping-summary article { padding: 13px 14px; border: 1px solid #e2e7ed; border-radius: 11px; background: #fff; }
.semantic-mapping-summary span, .semantic-mapping-summary strong { display: block; }
.semantic-mapping-summary span { color: #8490a1; font-size: 8px; font-weight: 800; }
.semantic-mapping-summary strong { margin-top: 5px; font-size: 19px; }
.semantic-mapping-summary article.attention { border-color: #f0b7aa; background: #fff8f6; }
.semantic-cluster-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 11px; }
.semantic-cluster-card { min-width: 0; padding: 18px; border: 1px solid #e2e7ed; border-radius: 14px; background: #fff; }
.semantic-cluster-card h3 { margin: 11px 0 5px; font-size: 15px; line-height: 1.35; }
.semantic-cluster-card > p { min-height: 30px; margin: 0; color: #7e899a; font-size: 10px; }
.semantic-cluster-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #8793a3; font-size: 8px; font-weight: 800; }
.semantic-cluster-metrics { display: grid; margin: 14px 0; grid-template-columns: repeat(3,1fr); gap: 6px; }
.semantic-cluster-metrics span { padding: 8px; border-radius: 8px; color: #7c8798; background: #f4f6f8; font-size: 8px; }
.semantic-cluster-metrics strong { display: block; margin-bottom: 3px; color: #253249; font-size: 13px; }
.semantic-cluster-urls { display: grid; min-height: 78px; gap: 4px; }
.semantic-cluster-urls small { color: #8792a2; font-size: 8px; font-weight: 800; text-transform: uppercase; }
.semantic-cluster-urls a, .semantic-cluster-urls span { overflow: hidden; color: #5674a0; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.semantic-cluster-card footer { display: flex; margin-top: 13px; padding-top: 12px; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid #edf0f3; font-size: 9px; }
.semantic-cluster-card footer span { color: #8792a2; }
.semantic-cluster-card footer span.has-problem { color: #b24a38; }

/* RBAC and technical expert workflow */
.role-VIEWER form[method="post"]:not(.logout-form), .role-VIEWER [data-dialog-open] { display: none !important; }
.status-pill { display: inline-flex; padding: 5px 9px; align-items: center; border-radius: 999px; color: #5b687b; background: #edf1f5; font-size: 10px; font-weight: 800; white-space: nowrap; }
.status-pill.success, .status-pill.status-accepted { color: #24784f; background: #e6f6ed; }
.status-pill.danger { color: #ad3d32; background: #fde9e6; }
.status-pill.status-submitted { color: #2c619e; background: #e8f1fb; }
.status-pill.status-needs_clarification { color: #9d5f13; background: #fff1d7; }
.priority-code { display: inline-flex; padding: 5px 8px; border-radius: 8px; color: #a43127; background: #fdeae7; font-size: 10px; font-weight: 850; }
.progress-line { height: 6px; overflow: hidden; border-radius: 999px; background: #e9edf2; }
.progress-line span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), #ff936a); }
.progress-line.large { height: 8px; }
.expert-link { display: block; margin: 10px 0; color: var(--accent); font-size: 11px; font-weight: 800; }
.user-grid { display: grid; margin-bottom: 22px; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.user-card { min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: var(--shadow); }
.user-card-head { display: flex; align-items: center; gap: 11px; }
.user-card-head > div { min-width: 0; flex: 1; }
.user-card-head h3, .user-card-head p { overflow: hidden; margin: 0; text-overflow: ellipsis; white-space: nowrap; }
.user-card-head h3 { font-size: 15px; }
.user-card-head p { margin-top: 3px; color: var(--muted); font-size: 10px; }
.role-name { margin: 17px 0; color: #30425c; font-size: 12px; font-weight: 800; }
.compact-meta { display: grid; margin: 0; gap: 8px; }
.compact-meta div { display: grid; grid-template-columns: 90px 1fr; gap: 8px; font-size: 9px; }
.compact-meta dt { color: #8a95a4; }
.compact-meta dd { margin: 0; overflow: hidden; text-overflow: ellipsis; }
.user-card details { margin-top: 16px; padding-top: 13px; border-top: 1px solid var(--line); }
.user-card summary { color: var(--accent); cursor: pointer; font-size: 11px; font-weight: 800; }
.stack-form { display: grid; margin-top: 14px; gap: 11px; }
.stack-form label > span { display: block; margin-bottom: 5px; color: #748197; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.stack-form input, .stack-form select, .stack-form textarea { width: 100%; }
.password-reset-form { padding-top: 13px; border-top: 1px solid var(--line); }
.protected-note { margin: 15px 0 0; padding: 10px; border-radius: 9px; color: #416654; background: #edf8f2; font-size: 9px; line-height: 1.5; }
.audit-panel { margin-top: 18px; }
.audit-list { display: grid; gap: 8px; }
.audit-list > div { display: flex; padding: 9px 0; justify-content: space-between; gap: 10px; border-bottom: 1px solid #edf0f3; font-size: 9px; }
.audit-list strong { color: #39475c; }
.audit-list span { color: #8b96a6; text-align: right; }
.expert-admin-board { display: grid; grid-template-columns: repeat(5, minmax(220px,1fr)); gap: 12px; overflow-x: auto; }
.expert-backlog-summary { display: grid; margin: 0 0 16px; grid-template-columns: repeat(8,minmax(82px,1fr)); gap: 8px; }
.expert-backlog-summary.compact { grid-template-columns: repeat(6,minmax(82px,1fr)); }
.expert-backlog-summary > div { padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.expert-backlog-summary span, .expert-backlog-summary strong { display: block; }
.expert-backlog-summary span { color: #8792a2; font-size: 8px; font-weight: 800; text-transform: uppercase; }
.expert-backlog-summary strong { margin-top: 5px; color: #172339; font-size: 20px; }
.expert-backlog-filters { display: grid; margin-bottom: 18px; grid-template-columns: minmax(120px,.6fr) minmax(180px,1fr) minmax(220px,1.2fr) auto; align-items: end; gap: 10px; }
.expert-backlog-filters > label > span { display: block; margin-bottom: 5px; color: #7d899a; font-size: 8px; font-weight: 800; text-transform: uppercase; }
.expert-backlog-filters input, .expert-backlog-filters select { width: 100%; }
.expert-pagination { display: flex; margin-top: 16px; align-items: center; justify-content: space-between; gap: 12px; }
.expert-pagination > span { color: #7d899a; font-size: 10px; }
.expert-pagination > div { display: flex; gap: 8px; }
.expert-admin-column { min-width: 220px; padding: 12px; border-radius: 16px; background: #e9edf2; }
.expert-admin-card { display: block; padding: 15px; border: 1px solid #dde3ea; border-radius: 13px; background: #fff; }
.expert-admin-card > div:first-child { display: flex; justify-content: space-between; gap: 8px; }
.expert-admin-card h4 { margin: 13px 0 7px; font-size: 13px; line-height: 1.45; }
.expert-admin-card p { margin: 0 0 13px; overflow: hidden; color: #7c8899; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.expert-admin-card small { display: block; margin-top: 9px; color: #8792a2; font-size: 8px; }
.wide-dialog { width: min(720px, calc(100vw - 30px)); }
.expert-title-row h2 { margin: 5px 0 6px; }
.expert-detail-layout { display: grid; grid-template-columns: minmax(0,2fr) minmax(250px,.75fr); gap: 16px; }
.expert-main, .expert-side { display: grid; align-content: start; gap: 16px; }
.expert-summary { padding: 24px; }
.expert-summary > p { margin: 20px 0; color: #5f6d81; font-size: 12px; line-height: 1.7; }
.summary-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 9px; }
.summary-grid div { padding: 12px; border-radius: 10px; background: #f5f7f9; }
.summary-grid span, .summary-grid strong { display: block; }
.summary-grid span { color: #8994a4; font-size: 8px; text-transform: uppercase; }
.summary-grid strong { margin-top: 5px; font-size: 11px; }
.review-question-list { display: grid; }
.review-question-list > article { display: grid; padding: 18px 0; grid-template-columns: 32px minmax(0,1fr); gap: 12px; border-top: 1px solid var(--line); }
.question-number { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 9px; color: #fff; background: #172339; font-size: 11px; font-weight: 800; }
.review-question-list h4 { margin: 3px 0 8px; font-size: 13px; line-height: 1.5; }
.answer-review { margin-top: 11px; padding: 13px; border: 1px solid #cce9db; border-radius: 10px; background: #f0faf5; }
.answer-review.unknown { border-color: #f0d69f; background: #fff8e9; }
.answer-review small, .answer-review span { color: #769384; font-size: 8px; }
.answer-review p { margin: 7px 0; font-size: 11px; line-height: 1.6; white-space: pre-wrap; }
.empty-answer { color: #9aa4b2; font-size: 10px; }
.compact-panel { padding: 20px; }
.compact-panel h3 { margin: 0; font-size: 14px; }
.check-row { display: flex !important; align-items: center; gap: 8px; color: #5f6b7c; font-size: 10px; }
.check-row input { width: auto; }
.review-actions { display: grid; padding: 20px; grid-template-columns: auto 1fr; align-items: end; gap: 16px; border: 1px solid #eadfd8; border-radius: 16px; background: #fffaf7; }
.clarification-form { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 10px; }
.clarification-form label span { display: block; margin-bottom: 5px; font-size: 9px; }
.clarification-form textarea { width: 100%; }
.facts-panel { border-color: #cbe9da; background: #f4fbf7; }
.comment-list { display: grid; gap: 8px; }
.comment-list div { padding: 10px; border-radius: 9px; background: #fff5e6; }
.comment-list p { margin: 0 0 5px; font-size: 10px; line-height: 1.5; }
.comment-list small { color: #9a7a48; font-size: 8px; }
.expert-welcome { margin-bottom: 24px; padding: 28px; border-radius: 20px; color: #fff; background: linear-gradient(125deg, #111b2e, #202f49); }
.expert-welcome h2 { margin: 5px 0 8px; font-size: 28px; }
.expert-welcome > p:not(.eyebrow) { margin: 0; color: #aeb8c8; font-size: 13px; }
.expert-mobile-sections { display: grid; gap: 22px; }
.expert-group-head { display: flex; margin-bottom: 10px; align-items: center; justify-content: space-between; }
.expert-group-head h3 { margin: 0; font-size: 16px; }
.expert-group-head span { display: grid; min-width: 28px; height: 28px; place-items: center; border-radius: 9px; background: #e4e9ef; font-size: 11px; font-weight: 800; }
.expert-mobile-stack { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.expert-mobile-card { display: block; min-width: 0; padding: 19px; border: 1px solid var(--line); border-radius: 15px; background: #fff; box-shadow: 0 8px 24px rgba(16,24,40,.04); }
.expert-mobile-card.upcoming { border-style: dashed; }
.expert-mobile-card > div:first-child, .expert-mobile-card footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.expert-mobile-card > div:first-child > span:last-child { color: #7d899a; font-size: 9px; font-weight: 800; }
.expert-mobile-card h4 { margin: 15px 0 7px; font-size: 14px; line-height: 1.45; }
.expert-mobile-card p { margin: 0 0 14px; overflow: hidden; color: #8893a2; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.expert-mobile-card footer { margin-top: 12px; color: #8893a2; font-size: 9px; }
.expert-mobile-card footer strong { color: var(--accent); }
.expert-empty { padding: 20px; border: 1px dashed #d8dee6; border-radius: 13px; color: #909aaa; font-size: 10px; text-align: center; }
.expert-question-shell { width: min(760px,100%); margin: 0 auto; }
.expert-question-header { margin-bottom: 16px; padding: 24px; border-radius: 19px; color: #fff; background: #111b2e; }
.expert-question-header > div:first-child { display: flex; align-items: center; justify-content: space-between; }
.expert-question-header h2 { margin: 18px 0 9px; font-size: 24px; line-height: 1.25; }
.expert-question-header > p { color: #a8b3c4; font-size: 12px; line-height: 1.65; }
.question-progress { display: flex; margin: 18px 0 8px; align-items: center; justify-content: space-between; color: #a9b4c5; font-size: 10px; }
.question-progress strong { color: #fff; }
.expert-question-card { padding: 28px; border: 1px solid var(--line); border-radius: 19px; background: #fff; box-shadow: var(--shadow); }
.question-counter { color: var(--accent); font-size: 10px; font-weight: 850; letter-spacing: .12em; }
.expert-question-card h3 { margin: 12px 0 17px; font-size: 21px; line-height: 1.42; }
.question-help { padding: 12px; border-radius: 10px; color: #637087; background: #f5f7f9; font-size: 11px; }
.expert-question-card form > label:first-of-type span { display: block; margin-bottom: 7px; color: #536178; font-size: 11px; font-weight: 800; }
.expert-question-card textarea { width: 100%; resize: vertical; }
.unknown-choice { display: flex; margin: 13px 0; padding: 14px; align-items: flex-start; gap: 10px; border: 1px solid #eed9ad; border-radius: 11px; background: #fff9eb; cursor: pointer; }
.unknown-choice input { margin-top: 3px; }
.unknown-choice strong, .unknown-choice small { display: block; }
.unknown-choice strong { font-size: 11px; }
.unknown-choice small { margin-top: 4px; color: #887552; font-size: 9px; }
.question-nav { display: flex; margin: 13px 0; justify-content: space-between; gap: 10px; }
.expert-submit { margin-top: 16px; padding: 20px; border: 1px solid #cbe8d9; border-radius: 15px; background: #f2faf6; }
.expert-submit p { margin: 9px 0 0; color: #688173; font-size: 9px; text-align: center; }
.submitted-answer { padding: 17px; border-radius: 12px; background: #edf8f2; }
.submitted-answer.unknown { background: #fff7e5; }
.submitted-answer small { font-size: 9px; font-weight: 850; }
.submitted-answer p { margin: 8px 0 0; font-size: 12px; line-height: 1.6; white-space: pre-wrap; }
.upcoming-note, .clarification-note { margin-top: 14px; padding: 12px; border-radius: 10px; color: #503f20; background: #fff1c9; font-size: 10px; line-height: 1.5; }
.clarification-note { color: #7a372f; background: #fde9e5; }
.reused-facts-panel { display: grid; margin-bottom: 16px; padding: 18px; gap: 8px; border: 1px solid #d9e4f1; border-radius: 15px; background: #f7faff; }
.reused-facts-panel.admin-view { margin: 0; }
.reused-fact { display: grid; padding: 11px; grid-template-columns: minmax(120px,.35fr) minmax(0,1fr); gap: 4px 12px; border-radius: 9px; background: #fff; }
.reused-fact.confirmed { border-left: 3px solid #4bab7b; }
.reused-fact.pending { border-left: 3px solid #e4a72f; }
.reused-fact strong { color: #45556c; font-size: 9px; }
.reused-fact span { font-size: 10px; line-height: 1.45; }
.reused-fact small { grid-column: 2; color: #8994a4; font-size: 8px; }
.expert-page-actions { display: flex; align-items: center; gap: 8px; }
.expert-review-intro { align-items: flex-end; }
.expert-review-summary { display: grid; margin-bottom: 14px; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 9px; }
.expert-review-summary article { padding: 16px; border: 1px solid var(--line); border-top: 3px solid #aab4c3; border-radius: 13px; background: #fff; }
.expert-review-summary article.confirmed { border-top-color: #4bab7b; }
.expert-review-summary article.clarification { border-top-color: #e4a72f; }
.expert-review-summary article.unknown { border-top-color: #8493a9; }
.expert-review-summary article.conflict { border-top-color: #df5d5d; }
.expert-review-summary span, .expert-review-summary strong, .expert-review-summary small { display: block; }
.expert-review-summary span { color: #7d899a; font-size: 8px; font-weight: 850; text-transform: uppercase; }
.expert-review-summary strong { margin: 6px 0 3px; color: #182338; font-size: 25px; }
.expert-review-summary small { color: #929baa; font-size: 8px; }
.expert-bulk-accept { display: flex; margin-bottom: 14px; padding: 22px; align-items: center; justify-content: space-between; gap: 20px; border-color: #cfe6d9; background: #f5fbf7; }
.expert-bulk-accept h3 { margin: 4px 0 8px; }
.expert-bulk-accept p:not(.eyebrow) { margin: 0 0 5px; color: #405168; font-size: 11px; font-weight: 800; }
.expert-bulk-accept small { color: #708078; font-size: 9px; line-height: 1.5; }
.expert-review-requests { display: grid; margin-bottom: 18px; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; }
.expert-review-requests article { padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.expert-review-requests article > div { display: grid; grid-template-columns: 26px minmax(0,1fr); gap: 6px; }
.expert-review-requests article > div > span { display: grid; height: 24px; place-items: center; border-radius: 7px; color: #fff; background: #172339; font-size: 8px; font-weight: 800; }
.expert-review-requests strong { font-size: 9px; line-height: 1.35; }
.expert-review-requests p { margin: 9px 0 5px; color: #5f6e83; font-size: 8px; line-height: 1.5; }
.expert-review-requests small { color: #929baa; font-size: 8px; }
.expert-review-section { margin: 20px 0; }
.expert-review-section .section-head { margin-bottom: 10px; }
.review-section-count { display: grid; min-width: 32px; height: 32px; place-items: center; border-radius: 9px; color: #415067; background: #e8ecf1; font-size: 11px; font-weight: 850; }
.expert-review-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.expert-review-card { display: grid; min-width: 0; padding: 17px; border: 1px solid var(--line); border-left: 4px solid #aab4c3; border-radius: 13px; background: #fff; }
.classification-confirmed .expert-review-card { border-left-color: #4bab7b; }
.classification-needs_clarification .expert-review-card { border-left-color: #e4a72f; }
.classification-conflict .expert-review-card { border-left-color: #df5d5d; }
.expert-review-card header, .expert-review-card footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.expert-review-card header > div { display: flex; flex-wrap: wrap; gap: 5px; }
.expert-review-card header > strong { color: #8792a2; font-size: 8px; }
.duplicate-pill { padding: 4px 7px; border-radius: 999px; color: #83522c; background: #fff0dd; font-size: 7px; font-weight: 850; text-transform: uppercase; }
.fact-label { margin: 13px 0 5px; color: var(--accent); font-size: 8px; font-weight: 850; text-transform: uppercase; }
.expert-review-card h4 { margin: 0 0 10px; font-size: 12px; line-height: 1.5; }
.maria-answer { padding: 12px; border-radius: 9px; background: #f4f6f8; }
.maria-answer small { color: #8290a2; font-size: 7px; font-weight: 850; }
.maria-answer p { margin: 6px 0 0; font-size: 10px; line-height: 1.55; white-space: pre-wrap; }
.review-rationale { margin: 10px 0; color: #69778b; font-size: 9px; line-height: 1.5; }
.expert-review-card footer { margin-top: auto; padding-top: 9px; border-top: 1px solid #edf0f3; color: #8994a4; font-size: 8px; }
.expert-review-card footer strong { color: #3d8762; }
.future-reuse-preview { padding: 20px; }
.future-reuse-preview table { min-width: 720px; }
.future-reuse-preview td:first-child { max-width: 360px; }

/* P0 SEO Execution Board */
.p0-intro { margin-bottom: 17px; }
.p0-readonly-badge { display: inline-flex; padding: 9px 12px; align-items: center; border-radius: 999px; color: #627087; background: #e9edf2; font-size: 10px; font-weight: 800; }
.p0-summary { display: grid; margin-bottom: 14px; grid-template-columns: 1.35fr repeat(3,1fr); gap: 10px; }
.p0-summary article { min-width: 0; padding: 18px; border: 1px solid #e1e6ed; border-radius: 14px; background: #fff; }
.p0-summary span, .p0-summary small, .p0-summary strong { display: block; }
.p0-summary span { color: #7e899a; font-size: 9px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.p0-summary strong { margin: 6px 0 2px; color: #182338; font-size: 27px; }
.p0-summary small { color: #8d97a6; font-size: 9px; }
.p0-summary .p0-summary-primary { color: #fff; border-color: #152139; background: #111c31; }
.p0-summary-primary span, .p0-summary-primary small { color: #9ba8bc; }
.p0-summary-primary strong { color: #fff; }
.p0-board { display: grid; gap: 12px; }
.p0-card { min-width: 0; padding: 20px; overflow: hidden; border: 1px solid #e0e5ec; border-left: 4px solid #aeb8c7; border-radius: 15px; background: #fff; box-shadow: 0 10px 26px rgba(23,35,56,.035); }
.p0-card.status-waiting_expert { border-left-color: #eca628; }
.p0-card.status-implementing, .p0-card.status-ready_for_review { border-left-color: #f05a37; }
.p0-card.status-deployed, .p0-card.status-measuring, .p0-card.status-done { border-left-color: #49a878; }
.p0-card-top { display: grid; grid-template-columns: 42px minmax(0,1fr) auto; align-items: start; gap: 13px; }
.p0-sequence { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 11px; color: #fff; background: #172238; font-size: 12px; font-weight: 900; }
.p0-card-title { min-width: 0; }
.p0-card-title h3 { margin: 5px 0 4px; color: #1b2639; font-size: 17px; line-height: 1.35; }
.p0-target { display: block; overflow: hidden; color: #6681a9; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.p0-status { display: inline-flex; padding: 6px 9px; align-items: center; border-radius: 999px; color: #667388; background: #eef1f5; font-size: 9px; font-weight: 850; white-space: nowrap; }
.p0-status.status-waiting_expert { color: #94610e; background: #fff1d6; }
.p0-status.status-done, .p0-status.status-deployed, .p0-status.status-measuring { color: #247850; background: #e4f5ec; }
.p0-card-metrics { display: grid; margin: 16px 0; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 7px; }
.p0-card-metrics span { min-width: 0; padding: 10px; border-radius: 9px; color: #8490a2; background: #f4f6f8; font-size: 8px; }
.p0-card-metrics span.attention { color: #a44f28; background: #fff0e9; }
.p0-card-metrics strong { display: block; margin-bottom: 3px; color: #263248; font-size: 15px; }
.p0-current-state { display: grid; grid-template-columns: 105px minmax(0,1fr); align-items: start; gap: 9px; }
.p0-current-state > span { color: #7c889a; font-size: 8px; font-weight: 850; text-transform: uppercase; }
.p0-current-state > div { display: flex; min-width: 0; flex-wrap: wrap; gap: 5px; }
.p0-current-state small { max-width: 100%; padding: 4px 7px; overflow: hidden; border-radius: 6px; color: #63738b; background: #eef2f6; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.p0-expert-state { display: grid; margin-top: 12px; padding: 11px; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; border: 1px solid #f0dfb9; border-radius: 10px; background: #fffaf0; }
.p0-expert-state small, .p0-expert-state strong { display: block; overflow-wrap: anywhere; }
.p0-expert-state small { margin-bottom: 3px; color: #9a8258; font-size: 7px; font-weight: 850; }
.p0-expert-state strong { color: #5e4c2d; font-size: 9px; }
.p0-stage-grid { display: grid; margin: 15px 0 0; padding: 12px 0; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 8px; border-top: 1px solid #edf0f4; border-bottom: 1px solid #edf0f4; }
.p0-stage-grid span { min-width: 0; }
.p0-stage-grid small, .p0-stage-grid strong { display: block; overflow-wrap: anywhere; }
.p0-stage-grid small { margin-bottom: 3px; color: #98a2b1; font-size: 7px; font-weight: 850; }
.p0-stage-grid strong { color: #526077; font-size: 9px; }
.p0-card footer { display: flex; margin-top: 14px; align-items: center; justify-content: space-between; gap: 14px; }
.p0-card footer > div { min-width: 0; }
.p0-card footer small { display: block; color: #929dad; font-size: 8px; font-weight: 800; text-transform: uppercase; }
.p0-card footer p { margin: 4px 0 0; color: #4f5e74; font-size: 10px; line-height: 1.45; }
.p0-card footer .button { flex: 0 0 auto; }
.p0-detail-hero { display: flex; margin: 12px 0 14px; padding: 25px; align-items: center; justify-content: space-between; gap: 18px; border-radius: 17px; color: #fff; background: #111c31; }
.p0-detail-hero h2 { margin: 6px 0; font-size: 27px; }
.p0-detail-hero a { color: #9eb4d6; font-size: 10px; }
.p0-detail-status { max-width: 330px; padding: 15px; border: 1px solid rgba(255,255,255,.12); border-radius: 12px; background: rgba(255,255,255,.04); }
.p0-detail-status small, .p0-detail-status strong, .p0-detail-status span { display: block; }
.p0-detail-status small { color: #8292ac; font-size: 8px; text-transform: uppercase; }
.p0-detail-status strong { margin: 5px 0; color: #ff7d5c; font-size: 12px; }
.p0-detail-status span { color: #b8c1d0; font-size: 9px; line-height: 1.45; }
.p0-detail-metrics { display: grid; margin-bottom: 14px; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 9px; }
.p0-detail-metrics article { padding: 15px; border: 1px solid #e2e7ed; border-radius: 12px; background: #fff; }
.p0-detail-metrics span, .p0-detail-metrics strong { display: block; }
.p0-detail-metrics span { color: #8a95a6; font-size: 8px; font-weight: 800; text-transform: uppercase; }
.p0-detail-metrics strong { margin-top: 5px; color: #1d293c; font-size: 21px; }
.p0-detail-layout { display: grid; grid-template-columns: minmax(0,1.8fr) minmax(270px,.65fr); align-items: start; gap: 14px; }
.p0-detail-main, .p0-detail-side { display: grid; min-width: 0; gap: 14px; }
.p0-detail-main .panel, .p0-detail-side .panel { margin: 0; }
.p0-recommendation { margin-top: 9px; padding: 12px; border-radius: 9px; background: #f4f6f8; }
.p0-recommendation small, .p0-recommendation strong { display: block; }
.p0-recommendation small { color: #8b96a7; font-size: 7px; font-weight: 850; }
.p0-recommendation strong { margin-top: 5px; color: #3b4960; font-size: 11px; line-height: 1.45; }
.p0-provisional { display: grid; margin-top: 9px; padding: 12px; gap: 4px; border: 1px solid #f0d49d; border-radius: 9px; color: #7d5815; background: #fff8e7; }
.p0-provisional strong { font-size: 9px; }
.p0-provisional span { font-size: 9px; line-height: 1.5; }
.p0-draft-questions { margin: 12px 0 0; padding-left: 19px; color: #5d6b80; font-size: 9px; line-height: 1.55; }
.p0-draft-questions li + li { margin-top: 7px; }
.p0-two-columns { display: grid; margin-top: 16px; grid-template-columns: 1fr 1fr; gap: 16px; }
.p0-two-columns h4 { margin: 0 0 10px; font-size: 12px; }
.p0-two-columns ol, .p0-two-columns ul { margin: 0; padding-left: 20px; color: #667389; font-size: 9px; line-height: 1.6; }
.p0-intent-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.p0-intent-grid article { padding: 12px; border-radius: 10px; background: #f4f6f8; }
.p0-intent-grid small, .p0-intent-grid span { display: block; }
.p0-intent-grid small { margin-bottom: 7px; color: #7c8798; font-size: 8px; font-weight: 850; text-transform: uppercase; }
.p0-intent-grid span { padding: 3px 0; color: #4d5d74; font-size: 9px; line-height: 1.35; }
.p0-separate-intents { display: grid; margin-top: 9px; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
.p0-separate-intents article { padding: 10px 12px; border: 1px solid #e4e8ee; border-radius: 9px; }
.p0-separate-intents strong { color: #45546b; font-size: 9px; text-transform: uppercase; }
.p0-separate-intents p { margin: 5px 0 0; color: #7c8798; font-size: 8px; line-height: 1.45; }
.p0-keyword-table { min-width: 980px; }
.p0-keyword-table td { max-width: 220px; vertical-align: top; font-size: 9px; overflow-wrap: anywhere; }
.p0-side-list { display: grid; margin-top: 12px; gap: 6px; }
.p0-side-list > span { display: block; padding: 9px; overflow-wrap: anywhere; border-radius: 8px; color: #68758a; background: #f3f5f7; font-size: 9px; line-height: 1.4; }
.p0-side-list strong, .p0-side-list small { display: block; }
.p0-side-list strong { color: #334158; }
.p0-side-list small { margin-top: 4px; color: #8490a2; }
.full-width { width: 100%; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .45; }
}

@media (max-width: 1180px) {
  .project-card-grid { grid-template-columns: 1fr 1fr; }
  .project-metrics { grid-template-columns: 1.7fr 1fr 1fr; }
  .project-metrics > article:last-child { display: none; }
  .task-board { grid-template-columns: repeat(5, 210px); }
  .planning-overview { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .planning-progress-card { grid-column: 1 / -1; }
  .planning-board { grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; }
  .report-metrics { grid-template-columns: 1fr 1fr; }
  .monitoring-metrics { grid-template-columns: repeat(3, 1fr); }
  .semantic-plan-grid { grid-template-columns: 1fr 1fr; }
  .work-overview { grid-template-columns: 1fr 1fr; }
  .worker-state { grid-column: span 2; }
  .semantic-v21-overview { grid-template-columns: 1fr 1fr; }
  .measurement-tier-overview { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .measurement-source-grid { grid-template-columns: 1fr 1fr; }
  .measurement-config-form { grid-template-columns: 1fr 1fr; }
  .gsc-setup-grid { grid-template-columns: 1fr; }
  .semantic-cluster-grid { grid-template-columns: 1fr 1fr; }
  .semantic-mapping-summary { grid-template-columns: repeat(3,1fr); }
  .user-grid { grid-template-columns: 1fr 1fr; }
  .expert-detail-layout { grid-template-columns: 1fr; }
  .expert-side { grid-template-columns: 1fr 1fr; }
  .p0-detail-layout { grid-template-columns: 1fr; }
  .p0-detail-side { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 980px) {
  :root { --sidebar: 220px; }
  .overview-hero { padding: 35px; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .span-7, .span-5 { grid-column: 1 / -1; }
  .codex-layout, .job-detail-grid { grid-template-columns: 1fr; }
  .project-metrics { grid-template-columns: 1.5fr 1fr 1fr; }
  .planning-overview { grid-template-columns: 1fr 1fr 1fr; }
  .planning-progress-card { grid-column: 1 / -1; }
  .planning-board { overflow-x: auto; }
  .workflow-summary { grid-template-columns: 1fr; }
  .blocked-task-body { grid-template-columns: 1fr; }
  .planning-detail-grid { grid-template-columns: 1fr; }
  .report-grid { grid-template-columns: 1fr; }
  .monitoring-grid { grid-template-columns: 1fr; }
  .deployment-summary { grid-template-columns: 1fr 1fr; }
  .report-side { grid-template-columns: 1fr 1fr; }
  .yandex-account-hero, .yandex-integration-layout { grid-template-columns: 1fr; }
  .keyword-plan-layout { grid-template-columns: 1fr; }
  .expert-mobile-stack { grid-template-columns: 1fr 1fr; }
  .active-work-footer a { margin-left: 0; }
}
@media (max-width: 760px) {
  .sidebar { width: min(285px, 82vw); transform: translateX(-105%); transition: transform .22s ease; }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .topbar { height: 75px; padding: 0 18px; }
  .topbar h1 { font-size: 19px; }
  .mobile-menu { display: block; margin-right: 11px; }
  .topbar > div:first-of-type { margin-right: auto; }
  .quick-action { display: none; }
  .page-content { padding: 22px 16px 45px; }
  .overview-hero { min-height: 0; padding: 28px 23px; grid-template-columns: 1fr; }
  .health-orbit { display: none; }
  .hero-copy h2 { font-size: 32px; }
  .hero-actions { flex-wrap: wrap; }
  .metric-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .metric-card { padding: 17px; }
  .metric-card > strong { font-size: 24px; }
  .dashboard-grid { display: block; }
  .dashboard-grid .panel { margin-bottom: 13px; }
  .project-row { grid-template-columns: 36px minmax(100px,1fr) 42px; }
  .project-row .project-meta { display: none; }
  .project-card-grid { grid-template-columns: 1fr; }
  .page-intro, .project-header { align-items: flex-start; flex-direction: column; }
  .semantic-actions { width: 100%; flex-wrap: wrap; }
  .semantic-actions form, .semantic-actions .button { flex: 1; }
  .semantic-actions .button { width: 100%; }
  .semantic-sync-status { align-items: flex-start; flex-direction: column; }
  .semantic-warning { max-width: none; text-align: left; }
  .semantic-overview { grid-template-columns: 1fr 1fr; }
  .semantic-plan-grid { grid-template-columns: 1fr; }
  .semantic-competitors { grid-template-columns: 1fr; }
  .keyword-plan-stats { grid-template-columns: 1fr 1fr; }
  .yandex-account-identity { align-items: flex-start; flex-direction: column; }
  .yandex-account-hero { padding: 20px; }
  .yandex-account-hero dl { grid-template-columns: 1fr; }
  .project-actions { width: 100%; }
  .project-actions form, .project-actions .button { flex: 1; }
  .project-actions .button { width: 100%; }
  .audit-progress { grid-template-columns: 1fr; }
  .project-metrics { grid-template-columns: 1fr 1fr; }
  .score-card { grid-column: 1 / -1; }
  .issue-cards { grid-template-columns: 1fr; }
  .filter-bar { align-items: stretch; flex-direction: column; }
  .filter-bar label { min-width: 0; }
  .filter-bar.compact-filter .table-search { min-width: 0; align-self: stretch; }
  .work-issue { align-items: flex-start; flex-direction: column; }
  .issue-actions { width: 100%; justify-content: flex-start; }
  .issue-actions form { flex-wrap: wrap; }
  .planning-overview { grid-template-columns: 1fr; }
  .planning-progress-card { grid-column: auto; }
  .planning-board { grid-template-columns: 1fr; overflow: visible; }
  .planning-detail-actions { width: 100%; align-items: stretch; flex-direction: column; }
  .planning-detail-actions form, .planning-detail-actions .button { width: 100%; }
  .blocked-task-head { grid-template-columns: 38px minmax(0,1fr); }
  .blocked-job-link { grid-column: 2; justify-self: start; white-space: normal; }
  .blocked-task-body { padding: 17px; }
  .blocked-retry-form .button { width: 100%; min-width: 0; }
  .work-overview { grid-template-columns: 1fr; }
  .worker-state { grid-column: auto; }
  .work-filter { align-items: flex-start; }
  .active-work-card { padding: 18px; }
  .active-work-card-head, .blocked-work-callout { align-items: flex-start; flex-direction: column; }
  .work-percent { font-size: 24px; }
  .blocked-work-callout .button { width: 100%; }
  .workflow-summary { padding: 20px; }
  .workflow-summary dl { grid-template-columns: 1fr; }
  .workflow-panel { padding: 17px; }
  .workflow-step-head { align-items: flex-start; flex-direction: column; }
  .approval-box > div { flex-direction: column-reverse; }
  .approval-box .button { width: 100%; }
  .codex-hero { padding: 23px; grid-template-columns: 1fr; }
  .codex-title h2 { font-size: 21px; }
  .safety-grid, .integration-grid { grid-template-columns: 1fr; }
  .integration-card.featured { grid-column: auto; }
  .integration-copy dl { grid-template-columns: 1fr; }
  .settings-list div { grid-template-columns: 1fr; gap: 6px; }
  .login-shell { grid-template-columns: 1fr; }
  .login-story { display: none; }
  .login-panel { min-height: 100vh; padding: 18px; }
  .report-goal { padding: 23px; grid-template-columns: 1fr; }
  .report-target { width: 100%; }
  .report-side, .report-secondary { grid-template-columns: 1fr; }
  .monitoring-metrics { grid-template-columns: 1fr 1fr; }
  .semantic-v21-overview, .semantic-cluster-grid { grid-template-columns: 1fr; }
  .measurement-tier-overview, .measurement-source-grid, .measurement-config-form { grid-template-columns: 1fr; }
  .measurement-property-form { align-items: stretch; flex-direction: column; }
  .gsc-connection-details, .gsc-secret-state { grid-template-columns: 1fr; }
  .semantic-mapping-summary { grid-template-columns: 1fr 1fr; }
  .filter-bar.semantic-v21-filters { display: grid; grid-template-columns: 1fr; }
  .semantic-v21-filters .table-search { min-width: 0; }
  .user-grid, .expert-mobile-stack, .expert-side { grid-template-columns: 1fr; }
  .expert-backlog-summary, .expert-backlog-summary.compact { grid-template-columns: 1fr 1fr; }
  .expert-backlog-filters { grid-template-columns: 1fr; }
  .expert-pagination { align-items: stretch; flex-direction: column; }
  .expert-pagination > div, .expert-pagination .button { width: 100%; }
  .reused-fact { grid-template-columns: 1fr; }
  .reused-fact small { grid-column: 1; }
  .expert-admin-board { grid-template-columns: 1fr; overflow: visible; }
  .expert-admin-column { min-width: 0; }
  .expert-page-actions { width: 100%; align-items: stretch; flex-direction: column; }
  .expert-page-actions .button { width: 100%; }
  .expert-review-summary { grid-template-columns: 1fr 1fr; }
  .expert-review-summary article:first-child { grid-column: 1 / -1; }
  .expert-bulk-accept { align-items: stretch; flex-direction: column; }
  .expert-bulk-accept form, .expert-bulk-accept .button { width: 100%; }
  .expert-review-requests, .expert-review-grid { grid-template-columns: 1fr; }
  .summary-grid { grid-template-columns: 1fr 1fr; }
  .review-actions, .clarification-form { grid-template-columns: 1fr; }
  .expert-question-shell { width: 100%; }
  .expert-question-header, .expert-question-card { padding: 20px; }
  .expert-question-card h3 { font-size: 18px; }
  .p0-summary, .p0-detail-metrics { grid-template-columns: 1fr 1fr; }
  .p0-card { padding: 16px; }
  .p0-card-top { grid-template-columns: 36px minmax(0,1fr); }
  .p0-sequence { width: 36px; height: 36px; }
  .p0-status { grid-column: 2; justify-self: start; }
  .p0-card-metrics { grid-template-columns: 1fr 1fr; }
  .p0-current-state { grid-template-columns: 1fr; }
  .p0-stage-grid { grid-template-columns: 1fr 1fr; }
  .p0-card footer { align-items: stretch; flex-direction: column; }
  .p0-card footer .button { width: 100%; }
  .p0-detail-hero { align-items: stretch; flex-direction: column; }
  .p0-detail-status { max-width: none; }
  .p0-two-columns, .p0-intent-grid, .p0-separate-intents, .p0-detail-side { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .metric-card p { min-height: 24px; }
  .project-metrics { grid-template-columns: 1fr; }
  .project-metrics .metric-card { display: block !important; }
  .mode-switch, .form-grid { grid-template-columns: 1fr; }
  .toast { right: 12px; left: 12px; top: 85px; }
  .report-metrics { grid-template-columns: 1fr 1fr; }
  .report-roadmap > a { grid-template-columns: 30px minmax(0,1fr); }
  .report-roadmap .badge { grid-column: 2; justify-self: start; }
  .automation-fields { grid-template-columns: 1fr; }
  .keyword-plan-stats, .keyword-landing-grid, .keyword-related-list { grid-template-columns: 1fr; }
}

/* Marketing extends the existing working surface. */
.marketing-tabs{display:flex;gap:.75rem;flex-wrap:wrap;margin-bottom:1.5rem}.marketing-tabs a{padding:.6rem .8rem;border:1px solid var(--border,#dce1ea);border-radius:8px;font-size:.9rem}
.marketing-panel{padding:1.5rem;margin-bottom:1.5rem;overflow-wrap:anywhere}.marketing-panel h2{font-size:1.25rem;margin:0 0 1rem}.marketing-panel p{font-size:1rem;line-height:1.6}.marketing-panel h3{margin:1rem 0 .5rem}.marketing-row{display:flex;justify-content:space-between;gap:1rem;padding:1rem 0;border-bottom:1px solid var(--border,#dce1ea);font-size:.95rem}.marketing-row span{display:block}.marketing-form{display:grid;gap:1rem;max-width:760px;margin-top:1rem}.marketing-form label{display:grid;gap:.4rem;font-size:1rem}.marketing-form input,.marketing-form select,.marketing-form textarea{width:100%;font:inherit;max-width:100%;min-height:44px}.marketing-form input[type=checkbox]{width:22px;height:22px;min-height:22px}.marketing-policy{padding:1rem 0;border-top:1px solid var(--border,#dce1ea)}.marketing-preview{white-space:pre-wrap;overflow-wrap:anywhere;font-size:1rem;line-height:1.7}.marketing-panel details{padding:1rem 0}.marketing-panel summary{cursor:pointer;font-size:1rem;padding:.4rem}.marketing-panel :focus-visible,.marketing-tabs a:focus-visible{outline:3px solid #3979e9;outline-offset:3px}.marketing-panel li{font-size:1rem;line-height:1.7;margin-bottom:.6rem}
@media(max-width:768px){.marketing-panel{padding:1rem}.marketing-row{flex-direction:column;gap:.4rem}.marketing-tabs{gap:.4rem}.marketing-tabs a{padding:.6rem;font-size:.875rem}}
.marketing-metrics{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,230px),1fr));gap:1rem}.marketing-metrics>div{padding:1rem;background:var(--bg,#f4f6fa);border:1px solid var(--border,#dce1ea);border-radius:8px;min-width:0}.marketing-metrics dt{font-size:.95rem;line-height:1.4}.marketing-metrics dd{margin:.5rem 0 0;font-size:1.4rem;font-weight:700}.marketing-form fieldset{min-width:0;border:1px solid var(--border,#dce1ea);border-radius:8px;padding:1rem}.marketing-form fieldset label{display:flex;align-items:center;margin:.6rem 0}
