:root {
  --ink: #10202a;
  --muted: #637381;
  --line: rgba(16, 32, 42, .12);
  --panel: rgba(255, 255, 255, .86);
  --frost: rgba(244, 249, 250, .72);
  --cyan: #4dc6d5;
  --green: #4ca66a;
  --gold: #c9a24d;
  --steel: #415665;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #f4f7f6;
  letter-spacing: 0;
}
a { color: inherit; text-decoration: none; }
.page { min-height: 100vh; }

.hero {
  position: relative;
  min-height: 92vh;
  overflow: hidden;
  color: white;
}
.internal-hero { min-height: 100vh; }
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(7, 22, 29, .78), rgba(10, 35, 43, .32) 48%, rgba(7, 22, 29, .26));
}
.nav {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 24px clamp(20px, 5vw, 72px);
}
.brand {
  font-weight: 800;
  font-size: 22px;
  margin-right: auto;
}
.brand.dark { color: var(--ink); }
.nav-link { opacity: .86; }
.nav-button, button {
  border: 1px solid rgba(255,255,255,.36);
  background: rgba(255,255,255,.14);
  color: white;
  padding: 11px 16px;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
}
.nav-button {
  position: relative;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
}
.hero-copy {
  position: relative;
  z-index: 2;
  width: min(900px, calc(100% - 40px));
  padding: clamp(72px, 12vh, 140px) 0 80px clamp(20px, 5vw, 72px);
}
.compact-hero { padding-top: clamp(88px, 18vh, 180px); }
.eyebrow {
  margin: 0 0 12px;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  color: var(--cyan);
}
h1, h2, h3 { margin: 0; line-height: 1.05; }
h1 { font-size: clamp(54px, 8vw, 118px); }
h2 { font-size: clamp(30px, 4vw, 56px); }
h3 { font-size: 20px; }
.lead {
  max-width: 720px;
  font-size: clamp(19px, 2vw, 28px);
  line-height: 1.42;
  color: rgba(255,255,255,.88);
}
.hero-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  margin-top: 24px;
  padding: 0 22px;
  border-radius: 6px;
  background: rgba(255,255,255,.94);
  color: #15313d;
  font-weight: 900;
  box-shadow: 0 18px 48px rgba(5, 19, 25, .24);
}
.band {
  padding: 72px clamp(20px, 5vw, 72px);
}
.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr);
  gap: 42px;
  background: white;
}
.intro-copy {
  font-size: 20px;
  line-height: 1.6;
  color: var(--steel);
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: #12242d;
  color: white;
}
.internal-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: #ffffff;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.internal-strip div {
  padding: 26px clamp(20px, 5vw, 72px);
  border-right: 1px solid var(--line);
}
.internal-strip strong {
  display: block;
  color: #16313c;
  font-size: 28px;
}
.internal-strip span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}
.metrics div {
  min-height: 150px;
  padding: 30px clamp(20px, 4vw, 54px);
  border-right: 1px solid rgba(255,255,255,.14);
}
.metrics strong {
  display: block;
  font-size: 44px;
  color: var(--cyan);
}
.metrics span { color: rgba(255,255,255,.72); }
.section-head {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  align-items: end;
  margin-bottom: 28px;
}
.section-head.compact {
  align-items: start;
  display: block;
  margin: 48px 0 18px;
}
.team-grid, .wolf-grid, .tool-grid, .context-grid, .hermes-ui-grid {
  display: grid;
  gap: 16px;
}
.team-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.wolf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hermes-ui-grid { grid-template-columns: 1fr; }
.tool-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.context-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.team-card, .wolf-card, .hermes-frame-card, .tool-panel, .info-panel, .ops-primary, .ops-side, .login-panel {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 18px 50px rgba(34, 52, 61, .08);
}
.team-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.wolf, .pill, .status, .tool-key {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 6px;
  background: rgba(77,198,213,.12);
  color: #146575;
  font-size: 12px;
  font-weight: 800;
}
.status { color: #28613d; background: rgba(76,166,106,.12); }
.muted, .team-card p { color: var(--muted); }
.context { background: #eaf0ef; }
.info-panel, .tool-panel {
  max-height: 520px;
  overflow: auto;
}
.info-panel p, .tool-panel p, .ops-primary p, .ops-side p {
  line-height: 1.55;
  color: var(--steel);
}
code {
  background: rgba(16, 32, 42, .08);
  padding: 2px 5px;
  border-radius: 4px;
}
.app-shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(255,255,255,.86), rgba(244,247,246,.96)),
    radial-gradient(circle at 80% 0%, rgba(77,198,213,.16), transparent 38%);
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 28px;
  background: #ffffff;
  border-right: 1px solid var(--line);
}
.sidebar nav {
  display: grid;
  gap: 8px;
  margin-top: 48px;
}
.sidebar nav a {
  padding: 11px 12px;
  border-radius: 6px;
  color: var(--steel);
}
.sidebar nav a:hover { background: #eef5f5; }
.workspace { padding: 30px clamp(20px, 4vw, 54px) 80px; }
.workspace-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}
.workspace h1 { font-size: 46px; }
.ops-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
}
.control-room {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
  gap: 16px;
}
.control-primary, .control-stack article {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.9);
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 18px 50px rgba(34, 52, 61, .07);
}
.control-primary {
  max-height: 420px;
  overflow: auto;
}
.control-primary h2,
.tool-panel h2,
.info-panel h2 {
  font-size: 28px;
  line-height: 1.16;
  margin: 0 0 14px;
}
.control-primary h3,
.tool-panel h3,
.info-panel h3 {
  font-size: 20px;
  margin-top: 18px;
}
.control-primary p:first-of-type {
  margin-top: 0;
}
.control-stack {
  display: grid;
  gap: 12px;
}
.control-stack article span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}
.control-stack article strong {
  display: block;
  margin-top: 6px;
  line-height: 1.2;
}
.workspace-section { margin-top: 42px; }
.erp-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, .9fr);
  gap: 18px;
  align-items: stretch;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.96), rgba(235,246,247,.92)),
    linear-gradient(90deg, rgba(77,198,213,.12), transparent);
  box-shadow: 0 18px 50px rgba(34, 52, 61, .08);
}
.erp-hero h2 { font-size: 42px; }
.erp-hero p {
  max-width: 720px;
  color: var(--steel);
  line-height: 1.55;
}
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.kpi-grid article,
.path-grid article,
.object-card,
.object-list,
.tender-card,
.data-table {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 16px 42px rgba(34,52,61,.06);
}
.kpi-grid article {
  min-height: 92px;
  padding: 16px;
}
.kpi-grid span,
.path-grid span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.kpi-grid strong {
  display: block;
  margin-top: 8px;
  font-size: 34px;
}
.risk-yellow strong { color: #9b7a1e; }
.risk-red strong { color: #aa3434; }
.quick-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  margin: 0;
}
.inline-create {
  grid-template-columns: minmax(130px, 1fr) minmax(130px, 1fr) auto;
  align-items: end;
  min-width: min(640px, 100%);
}
.quick-form input,
.quick-form select,
.object-card select {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 10px;
  background: white;
  color: var(--ink);
  font: inherit;
}
.quick-form button,
.task-row button {
  min-height: 42px;
  border-radius: 6px;
  background: #15313d;
  color: white;
}
.object-layout {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 16px;
}
.object-list {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 10px;
  max-height: 680px;
  overflow: auto;
}
.object-row {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: #f8fbfb;
}
.object-row.active {
  border-color: rgba(77,198,213,.55);
  background: #eef8f9;
}
.object-row span,
.object-row small,
.task-row span,
.path-grid small,
.tender-card p {
  color: var(--muted);
}
.object-card { padding: 18px; }
.object-card-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}
.object-card h3 { font-size: 30px; }
.risk-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}
.risk-pill {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.risk-pill span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.risk-pill.green { background: rgba(76,166,106,.1); }
.risk-pill.yellow { background: rgba(201,162,77,.14); }
.risk-pill.red { background: rgba(170,52,52,.12); }
.object-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr);
  gap: 16px;
}
.object-columns h4 {
  margin: 0 0 12px;
  font-size: 16px;
}
.task-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}
.task-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.task-row.done {
  opacity: .62;
}
.task-row div {
  display: grid;
  gap: 4px;
}
.mini-table {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.mini-table div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfb;
}
.mini-table span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.mini-table strong {
  display: block;
  margin-top: 6px;
  font-size: 24px;
}
.next-action {
  margin-top: 14px;
  padding: 12px;
  border-left: 3px solid var(--cyan);
  background: #f4fafb;
  color: var(--steel);
}
.data-table {
  overflow: auto;
}
.table-head,
.table-row {
  display: grid;
  grid-template-columns: 150px 140px 1fr 120px 110px minmax(220px, 1.2fr) 86px;
  gap: 12px;
  align-items: center;
  min-width: 980px;
  padding: 12px 14px;
}
.table-head {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  background: #f3f8f8;
  border-bottom: 1px solid var(--line);
}
.table-row {
  border-bottom: 1px solid var(--line);
}
.table-row:last-child { border-bottom: 0; }
.risk-dot {
  display: inline-flex;
  justify-content: center;
  min-width: 62px;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}
.risk-dot.green { background: rgba(76,166,106,.13); color: #28613d; }
.risk-dot.yellow { background: rgba(201,162,77,.18); color: #7a5f14; }
.risk-dot.red { background: rgba(170,52,52,.13); color: #9b2f2f; }
.tender-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.tender-card {
  display: grid;
  gap: 10px;
  padding: 16px;
}
.tender-card > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.tender-card dl {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.path-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.path-grid article {
  display: grid;
  gap: 8px;
  padding: 14px;
}
.path-grid small {
  overflow-wrap: anywhere;
  line-height: 1.35;
}
.compact-list {
  columns: 3;
}
dl {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
dt { font-size: 11px; color: var(--muted); text-transform: uppercase; font-weight: 800; }
dd { margin: 2px 0 0; font-weight: 800; }
details {
  margin-top: 16px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
summary { cursor: pointer; font-weight: 800; }
pre {
  white-space: pre-wrap;
  font-size: 12px;
  line-height: 1.45;
  color: #33434c;
}
.hermes-frame-card {
  min-height: 760px;
}
.wolf-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}
.wolf-tab {
  display: grid;
  gap: 4px;
  min-height: 68px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 8px;
  text-align: left;
}
.wolf-tab.active {
  border-color: rgba(77,198,213,.55);
  box-shadow: inset 0 0 0 1px rgba(77,198,213,.32), 0 12px 28px rgba(34,52,61,.08);
}
.wolf-tab span {
  font-weight: 900;
  color: #146575;
}
.wolf-tab small {
  color: var(--muted);
  line-height: 1.2;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.tab-stage h3 {
  font-size: 24px;
}
.tab-stage {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.9);
  padding: 14px;
}
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.frame-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: 14px 0;
  color: var(--muted);
  font-size: 13px;
}
.frame-actions a {
  color: #146575;
  font-weight: 800;
}
iframe {
  display: block;
  width: 100%;
  height: min(72vh, 760px);
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
}
.login-body {
  min-height: 100vh;
  background: linear-gradient(135deg, #eef7f6, #ffffff 46%, #e8edf0);
}
.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.login-shell .brand {
  position: fixed;
  top: 24px;
  left: 24px;
}
.login-panel {
  width: min(480px, 100%);
}
.login-panel h1 { font-size: 38px; }
form { display: grid; gap: 10px; margin-top: 20px; }
label { font-size: 13px; font-weight: 800; color: var(--steel); }
input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 13px 12px;
  font: inherit;
}
button {
  background: #15313d;
  border: 0;
}
button:disabled {
  opacity: .68;
  cursor: wait;
}
.bot-login-button {
  width: 100%;
  margin-top: 20px;
  min-height: 52px;
  border-radius: 6px;
  background: #15313d;
  box-shadow: 0 14px 34px rgba(21, 49, 61, .18);
  font-size: 16px;
}
.hidden { display: none; }
.form-message { min-height: 24px; color: var(--muted); }
.form-message.error { color: #a34242; }
.form-message.ok { color: #28613d; }
.login-status {
  min-height: 22px;
  margin: 16px 0 0;
  color: #28613d;
  font-weight: 800;
}
.login-note {
  margin-top: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.jtbd-list {
  columns: 2;
  column-gap: 28px;
  padding-left: 22px;
}
.jtbd-list li {
  break-inside: avoid;
  margin: 0 0 12px;
  padding-left: 4px;
  color: var(--steel);
  line-height: 1.45;
}

@media (max-width: 960px) {
  .intro-grid, .metrics, .ops-grid, .app-shell, .control-room, .internal-strip, .erp-hero, .object-layout, .object-columns { grid-template-columns: 1fr; }
  .team-grid, .wolf-grid, .tool-grid, .context-grid, .hermes-ui-grid, .tender-board, .path-grid { grid-template-columns: 1fr; }
  .kpi-grid, .risk-board, .mini-table { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inline-create { grid-template-columns: 1fr; }
  .section-head {
    display: grid;
    align-items: start;
  }
  .wolf-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .jtbd-list, .compact-list { columns: 1; }
  .sidebar {
    position: static;
    height: auto;
  }
  .sidebar nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 20px;
  }
  .nav-link { display: none; }
  .nav {
    align-items: flex-start;
    padding: 20px;
  }
  .nav-button {
    min-width: 148px;
    min-height: 48px;
    padding: 10px 12px;
    text-align: center;
  }
  .hero-copy {
    width: calc(100% - 40px);
    padding: clamp(80px, 12vh, 120px) 20px 56px;
  }
  .hero-action {
    width: 100%;
    max-width: 360px;
  }
  .hero { min-height: 86vh; }
  .metrics div { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.14); }
}
