:root {
  --ink: #1a1a1a;
  --red: #cc2936;
  --paper: #f5f0e8;
  --charcoal: #333333;
  --stone: #d4cfc6;
  --white: #ffffff;
  --muted: #6d6a65;
  --green: #18794e;
  --blue: #315b78;
  --shadow: 0 18px 55px rgba(26, 26, 26, 0.1);
  --header-height: 148px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, "Noto Sans SC", "Microsoft YaHei", Arial, sans-serif;
  letter-spacing: 0;
}
body.modal-open { overflow: hidden; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }
img { display: block; max-width: 100%; }

.skip-link {
  position: fixed;
  left: 16px;
  top: -60px;
  z-index: 200;
  padding: 12px 16px;
  background: var(--ink);
  color: var(--white);
}
.skip-link:focus { top: 12px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: var(--header-height);
  padding: 0 max(24px, calc((100vw - 1240px) / 2));
  border-bottom: 1px solid transparent;
  background: rgba(245, 240, 232, 0.96);
  display: flex;
  align-items: center;
  gap: 34px;
}
.site-header.scrolled { border-color: var(--stone); }
.brand { flex: 0 0 auto; display: inline-flex; align-items: center; }
.brand img {
  width: 132px;
  height: 132px;
  object-fit: contain;
  object-position: center;
  background: #f3f3ee;
  box-shadow: 0 0 0 1px rgba(26, 26, 26, .08);
}
.desktop-nav { display: flex; align-items: center; gap: 28px; margin-right: auto; }
.desktop-nav a, .text-action { font-size: 14px; font-weight: 700; }
.desktop-nav a:hover, .text-action:hover { color: var(--red); }
.header-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.language-switch {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--stone);
  background: var(--white);
  padding: 3px;
}
.language-switch button {
  min-width: 42px;
  height: 30px;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}
.language-switch button.active { background: var(--ink); color: var(--white); }
.button, .button-secondary {
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  cursor: pointer;
  font-weight: 800;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}
.button { background: var(--red); border-color: var(--red); color: var(--white); }
.button-secondary { background: transparent; }
.button:hover, .button-secondary:hover { transform: translateY(-2px); }
.button:hover { background: #ae1f2c; }
.button-secondary:hover { background: var(--ink); color: var(--white); }
.button-small { min-height: 40px; padding: 0 15px; font-size: 13px; }
.button-secondary.light { color: var(--white); border-color: rgba(255,255,255,.65); }
.button-secondary.light:hover { background: var(--white); color: var(--ink); }
.icon-button {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--stone);
  background: var(--white);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  position: relative;
}
.icon-button svg { width: 18px; height: 18px; }
.icon-button.solid { background: var(--red); border-color: var(--red); color: var(--white); }
.menu-toggle { display: none; }
.mobile-nav { display: none; }

.hero {
  width: min(1240px, calc(100% - 48px));
  min-height: calc(100vh - var(--header-height));
  margin: 0 auto;
  padding: 78px 0 92px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(480px, .9fr);
  gap: 68px;
  align-items: center;
}
.eyebrow {
  margin: 0 0 18px;
  color: var(--red);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .12em;
}
h1, h2, h3, p { margin-top: 0; }
h1 {
  margin-bottom: 28px;
  font-size: clamp(52px, 6vw, 92px);
  line-height: .96;
  letter-spacing: -.055em;
  font-weight: 700;
}
h1 strong { color: var(--red); font-weight: inherit; }
.hero-lede {
  max-width: 650px;
  margin-bottom: 32px;
  color: var(--charcoal);
  font-size: 18px;
  line-height: 1.65;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-trust { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px 22px; }
.hero-trust span { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--charcoal); }
.hero-trust svg { width: 14px; color: var(--green); }
.hero-product {
  min-height: 510px;
  background: var(--white);
  border: 1px solid var(--stone);
  box-shadow: var(--shadow);
}
.product-topbar {
  height: 54px;
  border-bottom: 1px solid var(--stone);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  font-size: 12px;
}
.product-topbar span:last-child { margin-left: auto; color: var(--muted); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.product-body { display: grid; grid-template-columns: 142px 1fr; min-height: 455px; }
.model-rail { padding: 18px 12px; border-right: 1px solid var(--stone); display: flex; flex-direction: column; gap: 8px; }
.model-pill {
  min-height: 48px;
  padding: 7px 10px;
  border: 1px solid transparent;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
}
.model-pill span {
  width: 26px; height: 26px; display: grid; place-items: center;
  background: var(--paper); border: 1px solid var(--stone); font-size: 11px;
}
.model-pill.active { background: var(--paper); border-color: var(--stone); }
.demo-conversation { padding: 40px 28px 24px; display: flex; flex-direction: column; }
.demo-label { font-size: 12px; color: var(--muted); font-weight: 700; }
.demo-answer { margin: 62px 0 auto; display: flex; align-items: flex-start; gap: 12px; }
.demo-avatar {
  flex: 0 0 34px; width: 34px; height: 34px; display: grid; place-items: center;
  background: var(--red); color: var(--white); font-weight: 800;
}
.demo-answer p { margin: 5px 0 0; line-height: 1.55; color: var(--charcoal); }
.demo-prompt {
  min-height: 58px;
  margin-top: 34px;
  border: 1px solid var(--stone);
  padding: 8px;
  display: flex;
  gap: 8px;
}
.demo-prompt input { min-width: 0; flex: 1; border: 0; outline: 0; padding: 0 8px; background: transparent; }

.proof-strip {
  min-height: 82px;
  background: var(--ink);
  color: var(--white);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: center;
  padding: 0 max(24px, calc((100vw - 1240px) / 2));
}
.proof-strip span { min-height: 42px; padding: 0 24px; border-right: 1px solid rgba(255,255,255,.2); display: flex; justify-content: center; align-items: center; text-align: center; font-size: 13px; font-weight: 800; }
.proof-strip span:first-child { padding-left: 0; justify-content: flex-start; }
.proof-strip span:last-child { border: 0; padding-right: 0; justify-content: flex-end; }
.proof-strip b { margin-left: 5px; color: #c4c4c4; font-weight: 500; }

.section { padding: 116px max(24px, calc((100vw - 1240px) / 2)); }
.section-heading { margin-bottom: 48px; }
.section-heading h2, .enterprise-preview h2, .final-cta h2 {
  margin-bottom: 0;
  font-size: clamp(38px, 4.5vw, 68px);
  line-height: 1.02;
  letter-spacing: -.045em;
}
.split-heading { display: grid; grid-template-columns: 1fr minmax(320px, .65fr); gap: 70px; align-items: end; }
.split-heading > p { margin-bottom: 3px; color: var(--charcoal); line-height: 1.65; }
.catalog-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 22px; }
.filter-tabs { display: flex; flex-wrap: wrap; gap: 7px; }
.filter-tabs button, .currency-switch button {
  min-height: 38px; padding: 0 14px; border: 1px solid var(--stone); background: transparent; cursor: pointer; font-weight: 800; font-size: 12px;
}
.filter-tabs button.active, .currency-switch button.active { background: var(--ink); border-color: var(--ink); color: var(--white); }
.search-field {
  width: min(300px, 100%);
  min-height: 42px;
  border-bottom: 1px solid var(--ink);
  display: flex; align-items: center; gap: 10px;
}
.search-field svg { width: 17px; }
.search-field input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; }
.model-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-left: 1px solid var(--stone); border-top: 1px solid var(--stone); }
.model-card {
  min-height: 330px;
  padding: 26px;
  border-right: 1px solid var(--stone);
  border-bottom: 1px solid var(--stone);
  background: rgba(255,255,255,.32);
  display: flex; flex-direction: column;
}
.model-card[hidden] { display: none; }
.model-card > div:first-child { display: flex; align-items: center; justify-content: space-between; margin-bottom: 34px; }
.model-mark { width: 44px; height: 44px; display: grid; place-items: center; font-weight: 800; border: 1px solid var(--stone); }
.model-mark.red { background: var(--red); color: var(--white); border-color: var(--red); }
.model-mark.ink, .model-mark.dark { background: var(--ink); color: var(--white); border-color: var(--ink); }
.model-mark.paper { background: var(--paper); }
.model-mark.stone { background: var(--stone); }
.model-mark.white { background: var(--white); }
.region-tag { font-size: 10px; color: var(--muted); font-weight: 800; }
.model-card small { color: var(--muted); }
.model-card h3 { margin: 7px 0 12px; font-size: 24px; }
.model-card p { color: var(--charcoal); line-height: 1.55; font-size: 14px; }
.model-card > button {
  width: 100%;
  margin-top: auto;
  padding: 14px 0 0;
  border: 0;
  border-top: 1px solid var(--stone);
  background: transparent;
  display: flex; align-items: center; justify-content: space-between;
  cursor: pointer; font-weight: 800;
}
.model-card > button:hover { color: var(--red); }
.model-card > button svg { width: 18px; }
.empty-state { padding: 40px; text-align: center; border: 1px solid var(--stone); color: var(--muted); }

.platform-section { background: var(--white); }
.workflow-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--stone); }
.workflow-grid article { position: relative; min-height: 260px; padding: 28px 32px 30px 0; border-bottom: 1px solid var(--stone); }
.workflow-grid article + article { padding-left: 32px; border-left: 1px solid var(--stone); }
.workflow-grid article > span { color: var(--red); font-size: 12px; font-weight: 800; }
.workflow-grid svg { width: 30px; height: 30px; margin: 54px 0 24px; }
.workflow-grid h3 { margin-bottom: 10px; font-size: 21px; }
.workflow-grid p { margin: 0; color: var(--muted); line-height: 1.55; font-size: 14px; }
.api-band {
  margin-top: 74px;
  background: var(--ink);
  color: var(--white);
  display: grid;
  grid-template-columns: .8fr 1.2fr;
}
.api-band > div { padding: 50px; }
.api-band h3 { margin: 0 0 16px; font-size: clamp(26px, 3vw, 42px); word-break: break-word; }
.api-band p:last-child { max-width: 460px; margin: 0; color: #c7c7c7; line-height: 1.6; }
.api-band pre { margin: 0; padding: 46px; overflow: auto; background: #242424; color: #e8e8e8; font-size: 13px; line-height: 1.75; }
.api-band code span { color: #ff7580; }
.api-band code b { color: #a7d9bd; font-weight: 500; }

.pricing-section { background: var(--paper); }
.currency-switch { display: inline-flex; justify-self: end; gap: 5px; }
.pricing-layout { display: grid; grid-template-columns: .8fr 1.2fr; gap: 70px; align-items: stretch; }
.pricing-copy { display: flex; flex-direction: column; justify-content: space-between; gap: 50px; }
.check-list { margin: 0; padding: 0; list-style: none; }
.check-list li { padding: 18px 0; border-bottom: 1px solid var(--stone); display: flex; gap: 12px; align-items: center; font-weight: 700; }
.check-list svg { width: 17px; color: var(--green); }
.payment-row { display: flex; flex-wrap: wrap; gap: 8px; }
.payment-row span, .payment-method-list span { padding: 9px 12px; border: 1px solid var(--stone); background: var(--white); font-size: 12px; font-weight: 800; }
.ru-only { display: none !important; }
html[data-lang="ru"] .ru-only { display: inline-flex !important; }
.ru-block { display: none !important; }
html[data-lang="ru"] .ru-block { display: block !important; }
.ru-payment-note { margin: 16px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
html[data-lang="ru"] .ru-payment-note { display: block !important; }
.cost-calculator { padding: 38px; background: var(--white); border: 1px solid var(--stone); }
.calculator-head { padding-bottom: 28px; border-bottom: 1px solid var(--stone); display: flex; justify-content: space-between; align-items: center; }
.calculator-head span { color: var(--muted); font-weight: 700; }
.calculator-head strong { font-size: 34px; }
.cost-calculator > label { display: block; margin: 34px 0; }
.cost-calculator > label > span { display: flex; justify-content: space-between; margin-bottom: 18px; }
.cost-calculator output { font-weight: 800; }
input[type="range"] { width: 100%; accent-color: var(--red); }
.cost-calculator fieldset { margin: 0 0 24px; padding: 0; border: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cost-calculator legend { margin-bottom: 12px; font-weight: 800; }
.cost-calculator fieldset label { cursor: pointer; }
.cost-calculator fieldset input { position: absolute; opacity: 0; pointer-events: none; }
.cost-calculator fieldset span { min-height: 52px; padding: 10px; border: 1px solid var(--stone); display: grid; place-items: center; text-align: center; font-size: 12px; font-weight: 800; }
.cost-calculator fieldset input:checked + span { border-color: var(--red); color: var(--red); background: #fff6f6; }
.cost-calculator > small { display: block; color: var(--muted); line-height: 1.5; }

.enterprise-preview {
  background: var(--red);
  color: var(--white);
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 60px;
}
.enterprise-preview > div { max-width: 780px; }
.enterprise-preview .eyebrow { color: var(--white); opacity: .8; }
.enterprise-preview p:last-child { max-width: 650px; margin: 24px 0 0; line-height: 1.65; color: #ffe9eb; }
.faq-section { background: var(--white); }
.faq-list { border-top: 1px solid var(--stone); }
.faq-list article { border-bottom: 1px solid var(--stone); }
.faq-list button { width: 100%; padding: 24px 0; border: 0; background: transparent; display: flex; justify-content: space-between; align-items: center; text-align: left; cursor: pointer; font-size: 18px; font-weight: 800; }
.faq-list button svg { width: 19px; flex: 0 0 auto; }
.faq-list article p { max-width: 740px; margin: 0 0 26px; color: var(--muted); line-height: 1.6; }
.final-cta {
  min-height: 560px;
  padding: 80px max(24px, calc((100vw - 1240px) / 2));
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 90px;
  align-items: center;
  overflow: hidden;
}
.final-cta > img { width: min(500px, 100%); max-height: 390px; object-fit: contain; }
.final-cta .button { margin-top: 32px; }

footer {
  min-height: 230px;
  padding: 48px max(24px, calc((100vw - 1240px) / 2));
  background: var(--ink);
  color: var(--white);
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
  align-content: start;
}
.footer-brand img { width: 136px; height: 136px; filter: none; background: #f3f3ee; box-shadow: none; }
footer > div { display: flex; flex-direction: column; gap: 10px; font-size: 13px; }
footer > div b { color: #a9a9a9; margin-bottom: 4px; }
footer > p { grid-column: 1 / -1; margin: 32px 0 0; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.2); color: #a9a9a9; font-size: 12px; }

.enterprise-hero {
  min-height: 690px;
  padding: 90px max(24px, calc((100vw - 1240px) / 2));
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 80px;
  align-items: center;
}
.enterprise-hero > div:first-child > p:not(.eyebrow) { max-width: 680px; color: var(--charcoal); font-size: 18px; line-height: 1.65; }
.enterprise-metrics { border: 1px solid var(--stone); background: var(--white); box-shadow: var(--shadow); }
.enterprise-metrics article { padding: 28px; border-bottom: 1px solid var(--stone); display: grid; grid-template-columns: 1fr auto; gap: 7px 20px; }
.enterprise-metrics article:last-child { border: 0; }
.enterprise-metrics span { color: var(--muted); font-size: 13px; }
.enterprise-metrics strong { grid-row: span 2; grid-column: 2; align-self: center; font-size: 26px; }
.enterprise-metrics small { color: var(--green); }
.feature-lines { border-top: 1px solid var(--stone); }
.feature-lines article { padding: 30px 0; border-bottom: 1px solid var(--stone); display: grid; grid-template-columns: 50px 1fr; gap: 28px; }
.feature-lines svg { width: 28px; height: 28px; color: var(--red); }
.feature-lines h3 { margin-bottom: 8px; font-size: 22px; }
.feature-lines p { max-width: 760px; margin: 0; color: var(--muted); line-height: 1.6; }
.security-band { background: var(--ink); color: var(--white); display: grid; grid-template-columns: 1fr 1fr; gap: 80px; }
.security-list { display: grid; align-content: center; }
.security-list span { padding: 22px 0; border-bottom: 1px solid rgba(255,255,255,.2); display: flex; gap: 14px; align-items: center; }
.security-list svg { color: #ff6974; }
.deployment-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--stone); }
.deployment-grid article { padding: 32px 32px 32px 0; }
.deployment-grid article + article { padding-left: 32px; border-left: 1px solid var(--stone); }
.deployment-grid span { color: var(--red); font-size: 12px; font-weight: 800; }
.deployment-grid h3 { margin: 55px 0 12px; font-size: 23px; }
.deployment-grid p { margin: 0; color: var(--muted); line-height: 1.6; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 300;
  padding: 20px;
  background: rgba(26,26,26,.7);
  display: grid;
  place-items: center;
}
.modal-backdrop[hidden] { display: none; }
.modal {
  width: min(520px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 34px;
  background: var(--paper);
  border: 1px solid var(--stone);
  box-shadow: var(--shadow);
  position: relative;
}
.modal-close { position: absolute; top: 16px; right: 16px; }
.modal h2 { margin-bottom: 28px; font-size: 34px; }
.modal form { display: grid; gap: 18px; }
.modal form label { display: grid; gap: 8px; font-weight: 700; font-size: 13px; }
.modal input, .modal select { width: 100%; min-height: 46px; border: 1px solid var(--stone); background: var(--white); padding: 0 12px; outline: 0; }
.modal input:focus, .modal select:focus { border-color: var(--red); }
.toast-region { position: fixed; right: 20px; bottom: 20px; z-index: 400; display: grid; gap: 8px; }
.toast { min-width: 260px; max-width: 360px; padding: 14px 16px; background: var(--ink); color: var(--white); border-left: 4px solid var(--red); box-shadow: var(--shadow); font-size: 13px; }

/* Authentication */
.auth-body { min-height: 100vh; background: var(--white); }
.auth-layout { min-height: 100vh; display: grid; grid-template-columns: minmax(420px, .9fr) minmax(520px, 1.1fr); }
.auth-brand-panel {
  position: relative;
  min-height: 100vh;
  padding: 42px max(42px, calc((100vw - 1240px) / 2));
  padding-right: 54px;
  overflow: hidden;
  background: var(--ink);
  color: var(--white);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.auth-brand-panel .brand img { width: 190px; height: 190px; background: #f3f3ee; box-shadow: none; }
.auth-brand-panel > div { position: relative; z-index: 2; max-width: 640px; margin: auto 0; padding: 70px 0; }
.auth-brand-panel h1 { margin-bottom: 26px; font-size: clamp(48px, 5.5vw, 78px); }
.auth-brand-panel > div > p:last-child { max-width: 560px; color: #cacaca; line-height: 1.65; }
.auth-pattern { position: absolute; right: -80px; bottom: -110px; width: 390px; opacity: .13; }
.auth-form-panel { min-height: 100vh; padding: 34px clamp(28px, 6vw, 92px); display: flex; flex-direction: column; }
.auth-topbar { display: flex; justify-content: space-between; align-items: center; }
.auth-topbar > a, .auth-back { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; font-weight: 800; }
.auth-topbar svg, .auth-back svg { width: 16px; }
.auth-box { width: min(460px, 100%); margin: auto; padding: 70px 0; }
.auth-box h2 { margin-bottom: 14px; font-size: clamp(34px, 4vw, 48px); letter-spacing: -.035em; }
.auth-mode-switch { margin-bottom: 30px; padding: 3px; border: 1px solid var(--stone); display: grid; grid-template-columns: 1fr 1fr; }
.auth-mode-switch button { min-height: 38px; padding: 0 12px; border: 0; background: transparent; cursor: pointer; color: var(--muted); font-size: 12px; font-weight: 800; }
.auth-mode-switch button.active { background: var(--ink); color: var(--white); }
.admin-access-badge {
  width: fit-content;
  margin-bottom: 24px;
  padding: 9px 12px;
  border: 1px solid rgba(204,41,54,.28);
  background: rgba(204,41,54,.06);
  color: var(--red);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.admin-access-badge svg { width: 16px; height: 16px; }
.admin-login-mode .auth-mode-switch,
.admin-login-mode .google-button,
.admin-login-mode .auth-divider,
.admin-login-mode .auth-legal { display: none; }
.auth-intro { margin-bottom: 28px; color: var(--muted); line-height: 1.6; }
.google-button {
  width: 100%;
  min-height: 52px;
  padding: 0 18px;
  border: 1px solid var(--stone);
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  font-weight: 800;
}
.google-button:hover { border-color: var(--ink); }
.google-button:disabled, .auth-box button:disabled { opacity: .55; cursor: wait; }
.google-mark { width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid var(--stone); color: #4285f4; font-weight: 900; }
.auth-divider { margin: 24px 0; display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 11px; text-transform: uppercase; }
.auth-divider::before, .auth-divider::after { content: ""; height: 1px; flex: 1; background: var(--stone); }
.auth-box form { display: grid; gap: 18px; }
.auth-box form label { display: grid; gap: 8px; font-size: 12px; font-weight: 800; }
.auth-box form input {
  width: 100%;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid var(--stone);
  background: var(--white);
  outline: 0;
}
.auth-box form input:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(204,41,54,.1); }
.auth-box form .button { width: 100%; }
.auth-legal { margin: 22px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; text-align: center; }
.auth-support { margin: 10px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; text-align: center; }
.auth-support a { color: var(--ink); font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.auth-back { margin: 0 0 28px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.demo-code { margin: -8px 0 24px; padding: 14px 16px; border-left: 3px solid var(--red); background: var(--paper); display: flex; justify-content: space-between; align-items: center; }
.demo-code span { color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.demo-code strong { font-size: 22px; letter-spacing: .12em; }
.resend-button { margin-top: 20px; padding: 0; border: 0; background: transparent; color: var(--red); cursor: pointer; font-size: 12px; font-weight: 800; }
.forgot-button { margin-top: 18px; padding: 0; border: 0; background: transparent; color: var(--ink); cursor: pointer; font-size: 12px; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.field-hint { color: var(--muted); font-size: 10px; font-weight: 500; line-height: 1.45; }

/* Console */
.dashboard-body { background: #f7f6f2; min-height: 100vh; }
.dashboard-body.auth-pending { visibility: hidden; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 120;
  width: 250px;
  padding: 20px 14px;
  background: var(--ink);
  color: var(--white);
  display: flex;
  flex-direction: column;
}
.sidebar .brand img { width: 140px; height: 140px; background: #f3f3ee; box-shadow: none; }
.sidebar-head { min-height: 150px; display: flex; justify-content: space-between; align-items: flex-start; }
.sidebar-close { display: none; background: transparent; color: var(--white); border-color: #555; }
.console-nav { display: grid; gap: 5px; margin-top: 28px; }
.console-nav button, .console-nav a {
  min-height: 44px; padding: 0 12px; border: 0; background: transparent; color: #c6c6c6; display: flex; align-items: center; gap: 12px; cursor: pointer; text-align: left; font-size: 13px; font-weight: 700;
}
.console-nav button svg, .console-nav a svg { width: 18px; }
.console-nav button.active, .console-nav button:hover, .console-nav a:hover { background: #303030; color: var(--white); }
.console-nav button.active { border-left: 3px solid var(--red); padding-left: 9px; }
.sidebar-support { margin-top: auto; padding: 12px; border: 1px solid #454545; color: #c6c6c6; display: flex; align-items: center; gap: 10px; }
.sidebar-support:hover { border-color: #6b6b6b; color: var(--white); }
.sidebar-support svg { width: 18px; flex: 0 0 auto; }
.sidebar-support span { min-width: 0; }
.sidebar-support b, .sidebar-support small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-support b { font-size: 11px; }
.sidebar-support small { margin-top: 3px; color: #9f9f9f; font-size: 10px; }
.sidebar-support + .sidebar-account { margin-top: 12px; }
.sidebar-account { margin-top: auto; padding-top: 18px; border-top: 1px solid #454545; display: grid; grid-template-columns: 34px 1fr 34px; gap: 10px; align-items: center; }
.avatar { width: 34px; height: 34px; display: grid; place-items: center; background: var(--red); font-weight: 800; }
.sidebar-account div { min-width: 0; }
.sidebar-account b, .sidebar-account small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-account b { font-size: 12px; }
.sidebar-account small { margin-top: 3px; color: #9f9f9f; font-size: 10px; }
.sidebar-account .icon-button { width: 34px; height: 34px; background: transparent; color: var(--white); border-color: #555; }
.console-main { margin-left: 250px; min-width: 0; }
.console-header {
  position: sticky; top: 0; z-index: 80;
  height: 76px; padding: 0 28px; border-bottom: 1px solid var(--stone); background: rgba(247,246,242,.96);
  display: flex; justify-content: space-between; align-items: center;
}
.console-header > div, .console-actions { display: flex; align-items: center; gap: 14px; }
.console-header small { display: block; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.console-header h1 { margin: 2px 0 0; font-size: 19px; line-height: 1.1; letter-spacing: 0; }
.sidebar-open { display: none; }
.notification-dot { position: absolute; right: 8px; top: 7px; width: 6px; height: 6px; border-radius: 50%; background: var(--red); }
.console-view { display: none; padding: 34px 30px 56px; }
.console-view.active { display: block; }
.welcome-line, .view-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 26px; }
.welcome-line h2, .view-heading h2, .chat-heading h2 { margin: 0; font-size: 32px; letter-spacing: -.03em; }
.welcome-line .eyebrow, .view-heading .eyebrow, .chat-heading .eyebrow { margin-bottom: 8px; }
.view-heading > div > p:last-child { margin: 8px 0 0; color: var(--muted); }
.view-heading-actions { display: flex; gap: 10px; align-items: center; }
.metric-row { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--stone); background: var(--white); }
.metric-row article { padding: 22px; border-right: 1px solid var(--stone); }
.metric-row article:last-child { border: 0; }
.metric-row span, .metric-row small { display: block; color: var(--muted); font-size: 12px; }
.metric-row strong { display: block; margin: 15px 0 8px; font-size: 25px; }
.positive { color: var(--green) !important; }
.overview-grid { margin-top: 20px; display: grid; grid-template-columns: 1.25fr .75fr; gap: 20px; }
.quick-actions { margin-top: 20px; display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--stone); background: var(--white); }
.quick-actions button { min-height: 78px; padding: 16px 18px; border: 0; border-right: 1px solid var(--stone); background: transparent; display: flex; align-items: center; gap: 12px; cursor: pointer; text-align: left; font-size: 12px; font-weight: 800; }
.quick-actions button:last-child { border-right: 0; }
.quick-actions button:hover { background: var(--paper); }
.quick-actions svg { width: 19px; color: var(--red); }
.console-panel { padding: 24px; border: 1px solid var(--stone); background: var(--white); }
.panel-heading { min-height: 44px; display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; }
.panel-heading span { color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.panel-heading h3 { margin: 5px 0 0; font-size: 19px; }
.activity-list { margin-top: 16px; }
.activity-item { padding: 13px 0; border-top: 1px solid #e9e6df; display: grid; grid-template-columns: 32px 1fr auto; gap: 12px; align-items: center; }
.activity-item > span:first-child { width: 32px; height: 32px; display: grid; place-items: center; background: var(--paper); border: 1px solid var(--stone); font-size: 11px; font-weight: 800; }
.activity-item b, .activity-item small { display: block; }
.activity-item b { font-size: 13px; }
.activity-item small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.activity-item > strong { font-size: 12px; }
.spend-bars { margin-top: 24px; display: grid; gap: 24px; }
.spend-bars label span { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 12px; }
.spend-bars label > i { height: 5px; display: block; background: #e4e1d9; position: relative; }
.spend-bars label > i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--value); background: var(--red); }
.model-updates { margin-top: 20px; }
.update-grid { margin-top: 18px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.model-update { min-height: 148px; padding: 18px; border: 1px solid #e7e3dc; background: #faf9f6; }
.model-update > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.model-update span { padding: 4px 7px; background: var(--red); color: var(--white); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.model-update small { color: var(--muted); font-size: 10px; font-weight: 800; }
.model-update h4 { margin: 18px 0 7px; font-size: 16px; }
.model-update p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.chat-shell { max-width: 980px; height: calc(100vh - 144px); min-height: 610px; margin: 0 auto; display: flex; flex-direction: column; }
.chat-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; padding-bottom: 22px; }
.model-select { display: grid; gap: 6px; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.model-select select { min-width: 180px; min-height: 40px; border: 1px solid var(--stone); background: var(--white); padding: 0 10px; }
.chat-messages { flex: 1; min-height: 0; padding: 24px; border: 1px solid var(--stone); border-bottom: 0; background: var(--white); overflow-y: auto; }
.message { display: flex; gap: 12px; margin-bottom: 22px; }
.message > span { flex: 0 0 34px; width: 34px; height: 34px; display: grid; place-items: center; background: var(--red); color: var(--white); font-size: 12px; font-weight: 800; }
.message.user { justify-content: flex-end; }
.message.user > span { order: 2; background: var(--ink); }
.message > div { max-width: 75%; }
.message b { font-size: 12px; }
.message p { margin: 5px 0 0; padding: 13px 15px; background: var(--paper); line-height: 1.55; font-size: 14px; }
.message.user p { background: #eceae4; }
.message small { display: block; margin-top: 6px; color: var(--muted); font-size: 10px; }
.chat-composer { border: 1px solid var(--stone); background: var(--white); padding: 12px; }
.chat-composer textarea { width: 100%; min-height: 56px; resize: none; border: 0; outline: 0; padding: 5px; background: transparent; }
.chat-composer > div { display: flex; justify-content: space-between; align-items: center; }
.chat-composer > div > span { display: flex; gap: 7px; align-items: center; color: var(--muted); }
.chat-composer > div > span svg { width: 15px; }
.console-model-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.console-model {
  min-height: 220px; padding: 20px; border: 1px solid var(--stone); background: var(--white); display: flex; flex-direction: column;
}
.console-model > div { display: flex; justify-content: space-between; align-items: center; }
.console-model > div small { max-width: 72%; text-align: right; color: var(--muted); }
.console-model h3 { margin: 22px 0 8px; }
.console-model p { color: var(--muted); line-height: 1.5; font-size: 13px; }
.console-model footer { min-height: 0; padding: 14px 0 0; margin-top: auto; border-top: 1px solid #e7e3dc; background: transparent; color: var(--ink); display: flex; justify-content: space-between; align-items: center; font-size: 11px; }
.switch { position: relative; width: 38px; height: 22px; }
.switch input { position: absolute; opacity: 0; }
.switch i { position: absolute; inset: 0; background: #bbb; border-radius: 20px; cursor: pointer; }
.switch i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--white); transition: transform 150ms; }
.switch input:checked + i { background: var(--green); }
.switch input:checked + i::after { transform: translateX(16px); }
.table-panel { padding: 0; overflow: hidden; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 16px 18px; border-bottom: 1px solid #e7e3dc; text-align: left; white-space: nowrap; font-size: 12px; }
th { color: var(--muted); background: #faf9f6; font-size: 10px; text-transform: uppercase; letter-spacing: .05em; }
tbody tr:last-child td { border-bottom: 0; }
.status-pill { padding: 5px 8px; background: #eaf5ef; color: var(--green); font-size: 10px; font-weight: 800; }
.billing-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 20px; }
.balance-card > span { color: var(--muted); font-size: 12px; }
.balance-card > strong { display: block; margin: 12px 0; font-size: 38px; }
.balance-card > p { color: var(--green); font-size: 12px; }
.balance-card label { display: grid; gap: 12px; margin-top: 38px; padding-top: 22px; border-top: 1px solid var(--stone); }
.balance-card label span { font-weight: 800; font-size: 12px; }
.balance-card output { font-size: 20px; font-weight: 800; }
.payment-method-list { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 10px; }
.endpoint-panel { min-height: 80px; margin-bottom: 20px; padding: 16px 20px; background: var(--ink); color: var(--white); display: flex; justify-content: space-between; align-items: center; }
.endpoint-panel span { display: block; margin-bottom: 6px; color: #aaa; font-size: 9px; font-weight: 800; }
.endpoint-panel code { font-size: 14px; }
.endpoint-panel .icon-button { background: #333; border-color: #555; color: var(--white); }
.keys-panel #api-key-list { margin-top: 16px; }
.provider-panel { margin-top: 20px; }
.provider-grid { margin-top: 18px; display: grid; grid-template-columns: repeat(2, 1fr); border: 1px solid #e7e3dc; }
.provider-grid article { min-height: 76px; padding: 13px 14px; border-right: 1px solid #e7e3dc; border-bottom: 1px solid #e7e3dc; display: grid; grid-template-columns: 34px 1fr auto; gap: 11px; align-items: center; }
.provider-grid article:nth-child(2n) { border-right: 0; }
.provider-grid article:nth-last-child(-n+2) { border-bottom: 0; }
.provider-grid article > span { width: 34px; height: 34px; display: grid; place-items: center; background: var(--paper); font-size: 12px; font-weight: 900; }
.provider-grid b, .provider-grid small { display: block; }
.provider-grid small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.provider-grid button { min-height: 32px; padding: 0 10px; border: 1px solid var(--stone); background: var(--white); cursor: pointer; font-size: 10px; font-weight: 800; }
.provider-grid button.connected { border-color: var(--green); color: var(--green); }
.key-row { min-height: 68px; padding: 12px 0; border-top: 1px solid #e7e3dc; display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: center; }
.key-row b, .key-row small { display: block; }
.key-row small { margin-top: 5px; color: var(--muted); }
.key-row code { padding: 7px 9px; background: var(--paper); font-size: 11px; }
.team-metrics { display: grid; grid-template-columns: repeat(3, 1fr); margin-bottom: 20px; border: 1px solid var(--stone); background: var(--white); }
.team-metrics article { padding: 18px 22px; border-right: 1px solid var(--stone); }
.team-metrics article:last-child { border: 0; }
.team-metrics span { color: var(--muted); font-size: 11px; }
.team-metrics strong { display: block; margin-top: 9px; font-size: 24px; }
.routing-layout { display: grid; grid-template-columns: 1.05fr .95fr; gap: 20px; }
.routing-strategies { display: grid; gap: 10px; margin-top: 20px; }
.routing-strategy { width: 100%; min-height: 78px; padding: 15px 16px; border: 1px solid var(--stone); background: #faf9f6; display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: center; cursor: pointer; text-align: left; }
.routing-strategy svg { width: 20px; color: var(--muted); }
.routing-strategy b, .routing-strategy small { display: block; }
.routing-strategy small { margin-top: 4px; color: var(--muted); line-height: 1.4; }
.routing-strategy i { width: 12px; height: 12px; border: 1px solid var(--stone); border-radius: 50%; }
.routing-strategy.active { border-color: var(--ink); background: var(--white); box-shadow: inset 3px 0 0 var(--red); }
.routing-strategy.active svg { color: var(--red); }
.routing-strategy.active i { border: 3px solid var(--white); background: var(--red); box-shadow: 0 0 0 1px var(--red); }
.routing-summary { margin-top: 18px; padding: 16px; background: var(--ink); color: var(--white); font-size: 12px; line-height: 1.55; }
.fallback-chain { margin-top: 20px; display: grid; gap: 0; counter-reset: fallback; }
.fallback-chain li { min-height: 64px; padding: 13px 0; border-top: 1px solid #e7e3dc; display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: center; list-style: none; }
.fallback-chain li::before { counter-increment: fallback; content: counter(fallback); width: 24px; height: 24px; display: grid; place-items: center; background: var(--paper); font-size: 10px; font-weight: 800; }
.fallback-chain b, .fallback-chain small { display: block; }
.fallback-chain small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.fallback-chain em { color: var(--green); font-size: 10px; font-style: normal; font-weight: 800; text-transform: uppercase; }
.policy-list { margin-top: 18px; display: grid; gap: 0; }
.policy-row { min-height: 62px; border-top: 1px solid #e7e3dc; display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.policy-row b, .policy-row small { display: block; }
.policy-row small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.console-nav { min-height: 0; overflow-y: auto; scrollbar-width: thin; }
.project-metrics, .storage-metrics, .cost-metrics { margin-bottom: 20px; display: grid; border: 1px solid var(--stone); background: var(--white); }
.project-metrics { grid-template-columns: repeat(3, 1fr); }
.storage-metrics { grid-template-columns: repeat(3, 1fr); }
.cost-metrics { grid-template-columns: repeat(4, 1fr); }
.project-metrics article, .storage-metrics article, .cost-metrics article { padding: 19px 22px; border-right: 1px solid var(--stone); }
.project-metrics article:last-child, .storage-metrics article:last-child, .cost-metrics article:last-child { border-right: 0; }
.project-metrics span, .storage-metrics span, .cost-metrics span { display: block; color: var(--muted); font-size: 11px; }
.project-metrics strong, .storage-metrics strong, .cost-metrics strong { display: block; margin: 10px 0 5px; font-size: 24px; }
.project-metrics small, .cost-metrics small { color: var(--muted); font-size: 10px; }
.project-toolbar, .file-toolbar, .history-toolbar { margin-bottom: 18px; display: grid; gap: 12px; align-items: end; }
.project-toolbar { grid-template-columns: minmax(240px, 1fr) 190px; }
.file-toolbar { grid-template-columns: minmax(240px, 1fr) 220px 170px; }
.history-toolbar { padding: 16px; border: 1px solid var(--stone); background: var(--white); grid-template-columns: minmax(220px, 1fr) 190px 150px 160px auto; }
.project-toolbar > label:not(.console-search), .file-toolbar > label:not(.console-search), .history-toolbar > label:not(.console-search), .budget-form-grid label, .budget-row label, .api-cost-row label {
  display: grid; gap: 6px; color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
}
.project-toolbar select, .file-toolbar select, .history-toolbar select, .budget-form-grid input, .budget-form-grid select, .budget-row input, .api-cost-row input {
  width: 100%; min-height: 42px; padding: 0 11px; border: 1px solid var(--stone); background: var(--white); color: var(--ink); outline: 0;
}
.console-search { min-height: 42px; padding: 0 12px; border: 1px solid var(--stone); background: var(--white); display: flex; align-items: center; gap: 9px; }
.console-search:focus-within { border-color: var(--ink); }
.console-search svg { flex: 0 0 17px; width: 17px; color: var(--muted); }
.console-search input { min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; }
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.project-card { min-height: 310px; padding: 20px; border: 1px solid var(--stone); background: var(--white); display: flex; flex-direction: column; }
.project-card > header { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.project-card > header small { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.project-status { padding: 5px 8px; background: #eaf5ef; color: var(--green); font-size: 9px; font-weight: 900; text-transform: uppercase; }
.project-status.paused { background: #fff3d5; color: #8a6400; }
.project-status.archived { background: #eceae4; color: var(--muted); }
.project-card h3 { margin: 22px 0 7px; font-size: 20px; }
.project-card p { min-height: 40px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.project-card dl { margin: 22px 0 0; padding: 14px 0; border-top: 1px solid #e7e3dc; border-bottom: 1px solid #e7e3dc; display: grid; grid-template-columns: 1.35fr .55fr .75fr; gap: 12px; }
.project-card dt { color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.project-card dd { margin: 5px 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 800; }
.project-budget-line { margin-top: 16px; display: grid; grid-template-columns: 1fr auto; gap: 7px 10px; font-size: 10px; }
.project-budget-line > small { color: var(--muted); }
.project-budget-line > i { grid-column: 1 / -1; height: 4px; background: #e7e3dc; }
.project-budget-line > i b { height: 100%; display: block; background: var(--red); }
.project-card footer { min-height: 0; margin-top: auto; padding: 17px 0 0; background: transparent; display: flex; gap: 8px; }
.project-card footer button { min-height: 36px; padding: 0 10px; border: 1px solid var(--stone); background: var(--white); display: inline-flex; align-items: center; justify-content: center; gap: 7px; cursor: pointer; font-size: 10px; font-weight: 800; }
.project-card footer button:hover { border-color: var(--ink); }
.project-card footer .project-open { margin-right: auto; background: var(--ink); color: var(--white); border-color: var(--ink); }
.project-card footer svg { width: 15px; }
.empty-state { min-height: 240px; padding: 32px; border: 1px dashed var(--stone); background: rgba(255,255,255,.45); display: grid; place-items: center; align-content: center; text-align: center; }
.empty-state[hidden] { display: none; }
.empty-state svg { width: 30px; color: var(--muted); }
.empty-state h3 { margin: 14px 0 5px; font-size: 17px; }
.empty-state p { max-width: 420px; margin: 0; color: var(--muted); font-size: 12px; }
.empty-state.compact { min-height: 170px; border: 0; }
.file-dropzone { min-height: 154px; margin-bottom: 20px; padding: 24px 28px; border: 1px dashed #aaa49a; background: var(--white); display: grid; grid-template-columns: 46px 1fr auto; gap: 18px; align-items: center; cursor: pointer; outline: 0; }
.file-dropzone:hover, .file-dropzone:focus, .file-dropzone.is-dragging { border-color: var(--red); background: #fffafa; }
.file-dropzone > svg { width: 38px; height: 38px; color: var(--red); }
.file-dropzone h3 { margin: 0 0 6px; font-size: 19px; }
.file-dropzone p { margin: 0; color: var(--muted); font-size: 11px; }
.file-library { padding: 20px 0 0; overflow: hidden; }
.file-library .file-toolbar { padding: 0 20px; }
.file-list { border-top: 1px solid #e7e3dc; }
.file-row { min-height: 74px; padding: 12px 20px; border-bottom: 1px solid #e7e3dc; display: grid; grid-template-columns: 46px minmax(190px, 1fr) 230px auto 80px; gap: 14px; align-items: center; }
.file-row:last-child { border-bottom: 0; }
.file-type { width: 44px; height: 44px; display: grid; place-items: center; background: var(--paper); border: 1px solid var(--stone); font-size: 9px; font-weight: 900; }
.file-identity { min-width: 0; }
.file-identity b, .file-identity small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-identity b { font-size: 12px; }
.file-identity small { margin-top: 5px; color: var(--muted); font-size: 10px; }
.file-row label { display: grid; gap: 5px; }
.file-row label > span { color: var(--muted); font-size: 8px; font-weight: 800; text-transform: uppercase; }
.file-row select { min-width: 0; width: 100%; min-height: 34px; padding: 0 8px; border: 1px solid var(--stone); background: var(--white); font-size: 10px; }
.file-actions { display: flex; justify-content: flex-end; gap: 6px; }
.file-actions .icon-button { width: 34px; height: 34px; }
.file-actions .icon-button:disabled { opacity: .35; cursor: not-allowed; }
.file-dropzone small { display: block; margin-top: 8px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.status-processing { background: #fff3d5; color: #8a6400; }
.status-failed { background: #fde9e6; color: #a62d22; }
.status-cancelled { background: #eceae4; color: var(--muted); }
.status-pending { background: #fff3d5; color: #8a6400; }
.status-suspended { background: #fde9e6; color: #a62d22; }
.status-paid { background: #eaf5ef; color: var(--green); }
.status-refunded { background: #e8eef8; color: #345d94; }
.history-result-line { margin: 0 2px 10px; display: flex; justify-content: space-between; gap: 16px; color: var(--muted); }
.history-result-line span { color: var(--ink); font-size: 11px; font-weight: 800; }
.history-result-line small { font-size: 10px; }
.history-row { cursor: pointer; }
.history-row:hover, .history-row:focus { background: #faf9f6; outline: 0; }
.request-summary { max-width: 250px; margin-top: 5px; display: block; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.warning { color: #a35f00 !important; }
.cost-layout { display: grid; grid-template-columns: 1.2fr .8fr; gap: 20px; }
.finance-history-grid { margin-top: 20px; display: grid; grid-template-columns: 1.15fr .85fr; gap: 20px; }
.finance-history-grid .panel-heading { padding: 20px 22px 4px; }
.finance-history-grid .empty-inline { padding: 22px; }
.money-positive { color: var(--green); }
.money-negative { color: #a62d22; }
.russian-invoice-panel { margin-top: 20px; }
.invoice-panel-intro { max-width: 900px; margin: 18px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.invoice-process { margin: 22px 0; display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid #e7e3dc; }
.invoice-process span { min-height: 58px; padding: 12px 14px; border-right: 1px solid #e7e3dc; display: flex; gap: 10px; align-items: center; font-size: 11px; font-weight: 800; }
.invoice-process span:last-child { border-right: 0; }
.invoice-process b { width: 25px; height: 25px; flex: 0 0 25px; background: var(--ink); color: var(--white); display: grid; place-items: center; font-size: 10px; }
.invoice-profile-state { min-height: 20px; margin-bottom: 10px; color: var(--muted); font-size: 10px; }
.invoice-profile-state b { color: var(--ink); }
.invoice-profile-chip { margin-left: 8px; display: inline-flex; gap: 4px; align-items: center; }
.invoice-profile-chip .icon-button { width: 28px; height: 28px; }
.invoice-history-table table { min-width: 850px; }
.invoice-document-link { display: inline-flex; align-items: center; gap: 6px; margin: 2px 10px 2px 0; color: var(--red); font-size: 10px; font-weight: 900; white-space: nowrap; }
.invoice-document-link svg { width: 14px; }
.invoice-legal-note { margin: 16px 0 0; padding-top: 14px; border-top: 1px solid #e7e3dc; color: var(--muted); font-size: 9px; line-height: 1.55; }
.invoice-delivery-state { display: block; margin-top: 5px; color: var(--muted); font-size: 8px; }
.modal.invoice-modal { width: min(780px, 100%); }
.invoice-form { gap: 20px !important; }
.invoice-form-label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 700; }
.invoice-form .payer-fields { display: grid; gap: 16px; }
.invoice-payer-switch { display: grid; grid-template-columns: repeat(2, 1fr); border: 1px solid var(--stone); }
.invoice-payer-switch button { min-height: 48px; padding: 0 14px; border: 0; border-right: 1px solid var(--stone); background: var(--white); cursor: pointer; font-size: 12px; font-weight: 900; }
.invoice-payer-switch button:last-child { border-right: 0; }
.invoice-payer-switch button.active { background: var(--ink); color: var(--white); }
.invoice-amount-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.invoice-amount-grid label { position: relative; min-width: 0; }
.invoice-amount-grid input { position: absolute; opacity: 0; pointer-events: none; }
.invoice-amount-grid span { min-height: 56px; padding: 9px 7px; border: 1px solid var(--stone); background: var(--white); display: grid; place-items: center; text-align: center; cursor: pointer; font-size: 11px; }
.invoice-amount-grid span small { display: block; margin-top: 3px; color: var(--muted); font-size: 8px; }
.invoice-amount-grid input:checked + span { border-color: var(--red); box-shadow: inset 0 0 0 1px var(--red); }
.invoice-saved-profile { padding: 12px 14px; border-left: 3px solid var(--red); background: #faf9f6; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.invoice-saved-profile span { font-size: 10px; line-height: 1.45; }
.invoice-saved-profile button { flex: 0 0 auto; }
.invoice-consent { display: grid !important; grid-template-columns: 20px 1fr; gap: 10px !important; align-items: flex-start; font-weight: 500 !important; line-height: 1.5; }
.modal .invoice-consent input { width: 18px; min-height: 18px; height: 18px; margin-top: 1px; accent-color: var(--red); }
.invoice-consent a { color: var(--red); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.invoice-form-note { margin: 0; padding: 12px 14px; background: #f5f0e8; color: var(--muted); font-size: 10px; line-height: 1.55; }
.invoice-result-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.invoice-result-actions .button, .invoice-result-actions .button-secondary { display: inline-flex; align-items: center; gap: 7px; }
.budget-settings .panel-heading { align-items: center; }
.budget-progress { margin-top: 24px; }
.budget-progress > span { margin-bottom: 9px; display: flex; justify-content: space-between; gap: 12px; font-size: 11px; }
.budget-progress > i, .budget-row > i, .model-cost-list i { height: 6px; display: block; background: #e7e3dc; }
.budget-progress > i b, .budget-row > i b, .model-cost-list i b { height: 100%; display: block; background: var(--red); }
.budget-form-grid { margin-top: 24px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.cost-toggle-list { margin-top: 20px; border-top: 1px solid #e7e3dc; }
.budget-grid { margin-top: 20px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.budget-list, .model-cost-list, .api-cost-list { margin-top: 16px; }
.budget-row { min-height: 88px; padding: 14px 0; border-top: 1px solid #e7e3dc; display: grid; grid-template-columns: 1fr 110px; gap: 9px 16px; align-items: center; }
.budget-row > span b, .budget-row > span small, .api-cost-row > span b, .api-cost-row > span small { display: block; }
.budget-row > span b, .api-cost-row > span b { font-size: 11px; }
.budget-row > span small, .api-cost-row > span small { margin-top: 5px; color: var(--muted); font-size: 9px; }
.budget-row > i { grid-column: 1 / -1; height: 4px; }
.budget-row input, .api-cost-row input { min-height: 34px; font-size: 11px; }
.model-cost-list > div { padding: 15px 0; border-top: 1px solid #e7e3dc; display: grid; grid-template-columns: 1fr auto; gap: 9px 12px; align-items: center; }
.model-cost-list span { display: flex; justify-content: space-between; gap: 10px; }
.model-cost-list b { font-size: 11px; }
.model-cost-list small { color: var(--muted); font-size: 9px; }
.model-cost-list strong { font-size: 11px; }
.model-cost-list i { grid-column: 1 / -1; height: 4px; }
.api-cost-row { min-height: 78px; padding: 13px 0; border-top: 1px solid #e7e3dc; display: grid; grid-template-columns: 1fr 120px; gap: 14px; align-items: center; }
.modal textarea { width: 100%; min-height: 92px; padding: 11px 12px; border: 1px solid var(--stone); background: var(--white); resize: vertical; outline: 0; }
.modal textarea:focus { border-color: var(--red); }
.modal-form-grid, .detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.detail-grid { margin-bottom: 22px; }
.detail-grid > div { padding: 13px; background: var(--paper); }
.detail-grid span, .request-prompt > span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.detail-grid b { font-size: 12px; }
.request-prompt { margin-bottom: 22px; padding: 16px; border-left: 3px solid var(--red); background: #faf9f6; }
.request-prompt p { margin: 0; font-size: 13px; line-height: 1.55; }
.request-sources { margin: -6px 0 22px; display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.request-sources > span { width: 100%; color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.request-sources b { padding: 6px 8px; border: 1px solid var(--stone); background: var(--white); font-size: 10px; }
.empty-inline { padding: 24px 0; color: var(--muted); font-size: 12px; text-align: center; }

/* Administration */
.admin-body { min-height: 100vh; background: #f7f6f2; }
.admin-body.auth-pending { visibility: hidden; }
.admin-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 120;
  width: 270px;
  padding: 18px 16px;
  background: var(--ink);
  color: var(--white);
  display: flex;
  flex-direction: column;
}
.admin-sidebar-head { min-height: 150px; display: flex; justify-content: space-between; align-items: flex-start; }
.admin-sidebar .brand img { width: 140px; height: 140px; background: #f3f3ee; box-shadow: none; }
.admin-sidebar-close { display: none; background: transparent; color: var(--white); border-color: #555; }
.admin-product-label { margin: 16px 10px 18px; padding-bottom: 18px; border-bottom: 1px solid #444; }
.admin-product-label span, .admin-product-label b { display: block; }
.admin-product-label span { color: var(--red); font-size: 9px; font-weight: 900; letter-spacing: .08em; }
.admin-product-label b { margin-top: 6px; font-size: 15px; }
.admin-nav { min-height: 0; display: grid; gap: 5px; overflow-y: auto; }
.admin-nav button {
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: #c6c6c6;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  text-align: left;
  font-size: 13px;
  font-weight: 700;
}
.admin-nav button svg { width: 18px; }
.admin-nav button:hover, .admin-nav button.active { background: #303030; color: var(--white); }
.admin-nav button.active { border-left: 3px solid var(--red); padding-left: 9px; }
.admin-sidebar-account { margin-top: auto; padding-top: 18px; border-top: 1px solid #454545; display: grid; grid-template-columns: 34px 1fr 34px; gap: 10px; align-items: center; }
.admin-sidebar-account > div { min-width: 0; }
.admin-sidebar-account b, .admin-sidebar-account small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-sidebar-account b { font-size: 12px; }
.admin-sidebar-account small { margin-top: 3px; color: #9f9f9f; font-size: 10px; }
.admin-sidebar-account .icon-button { width: 34px; height: 34px; background: transparent; color: var(--white); border-color: #555; }
.admin-main { margin-left: 270px; min-width: 0; }
.admin-header {
  position: sticky;
  top: 0;
  z-index: 80;
  height: 76px;
  padding: 0 28px;
  border-bottom: 1px solid var(--stone);
  background: rgba(247,246,242,.96);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.admin-header > div { display: flex; align-items: center; gap: 14px; }
.admin-header small { display: block; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.admin-header h1 { margin: 2px 0 0; font-size: 19px; line-height: 1.1; }
.admin-sidebar-open { display: none; }
.admin-view { display: none; padding: 34px 30px 56px; }
.admin-view.active { display: block; }
.admin-metrics { margin-bottom: 20px; display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--stone); background: var(--white); }
.admin-metrics article { padding: 21px 22px; border-right: 1px solid var(--stone); }
.admin-metrics article:last-child { border-right: 0; }
.admin-metrics span, .admin-metrics small { display: block; color: var(--muted); font-size: 10px; }
.admin-metrics strong { display: block; margin: 13px 0 7px; font-size: 25px; }
.admin-security-summary {
  margin-bottom: 20px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--stone);
  background: var(--white);
}
.admin-security-summary article { padding: 20px 22px; border-right: 1px solid var(--stone); }
.admin-security-summary article:last-child { border-right: 0; }
.admin-security-summary span, .admin-security-summary small { display: block; color: var(--muted); font-size: 10px; }
.admin-security-summary strong { display: block; margin: 12px 0 7px; font-size: 25px; }
.security-panel { margin-bottom: 20px; }
.security-toolbar { grid-template-columns: minmax(260px, 1fr) 190px 210px; }
.security-result {
  display: inline-flex;
  min-height: 24px;
  padding: 0 8px;
  align-items: center;
  border: 1px solid;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}
.security-result.success { border-color: #9ac7ae; background: #edf7f1; color: #286443; }
.security-result.failed { border-color: #e2a8ae; background: #fff0f1; color: #9f2632; }
.security-device { min-width: 190px; max-width: 280px; }
.security-device b, .security-device small { display: block; }
.security-device small {
  max-width: 260px;
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-table-action.danger { border-color: #e2a8ae; color: #9f2632; }
.admin-table-action.danger:hover { border-color: #9f2632; }
.admin-overview-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 20px; }
.procurement-grid { grid-template-columns: 1fr 1fr; align-items: start; }
.procurement-grid .table-wrap { max-height: 430px; overflow: auto; }
.admin-status-list, .admin-recent-audit { margin-top: 16px; }
.admin-status-list > div { min-height: 58px; padding: 11px 0; border-top: 1px solid #e7e3dc; display: grid; grid-template-columns: 32px 1fr 10px; gap: 11px; align-items: center; }
.admin-status-list svg { width: 18px; color: var(--muted); }
.admin-status-list b, .admin-status-list small { display: block; }
.admin-status-list b { font-size: 11px; }
.admin-status-list small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.admin-status-list em { width: 8px; height: 8px; border-radius: 50%; background: #d4a23b; }
.admin-status-list em.healthy { background: var(--green); }
.admin-recent-audit > div { min-height: 58px; padding: 11px 0; border-top: 1px solid #e7e3dc; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.admin-recent-audit b, .admin-recent-audit small { display: block; }
.admin-recent-audit b { font-size: 11px; }
.admin-recent-audit small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.admin-recent-audit code { padding: 5px 7px; background: var(--paper); font-size: 9px; }
.admin-toolbar { margin-bottom: 18px; display: grid; grid-template-columns: minmax(240px, 1fr) 190px 190px; gap: 12px; align-items: end; }
.admin-toolbar.compact { grid-template-columns: 190px; justify-content: end; }
.admin-toolbar > label:not(.console-search) { display: grid; gap: 6px; color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.admin-toolbar select { width: 100%; min-height: 42px; padding: 0 11px; border: 1px solid var(--stone); background: var(--white); }
.admin-table-action { min-height: 32px; padding: 0 10px; border: 1px solid var(--stone); background: var(--white); display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 10px; font-weight: 800; }
.admin-table-action:hover { border-color: var(--ink); }
.admin-table-action svg { width: 14px; }
.admin-table-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.admin-balance-adjustment { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--stone); }
.admin-balance-adjustment .eyebrow { margin-bottom: 12px; }
.admin-plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.admin-plan-card { min-height: 330px; padding: 22px; border: 1px solid var(--stone); background: var(--white); }
.admin-plan-card.disabled { opacity: .58; }
.admin-plan-card header { display: flex; justify-content: space-between; align-items: center; }
.admin-plan-card header > span { padding: 5px 8px; background: #eaf5ef; color: var(--green); font-size: 9px; font-weight: 900; text-transform: uppercase; }
.admin-plan-card.disabled header > span { background: #eceae4; color: var(--muted); }
.admin-plan-card h3 { margin: 27px 0 12px; font-size: 22px; }
.admin-plan-card > strong { display: block; font-size: 31px; }
.admin-plan-card > strong small { margin-left: 5px; color: var(--muted); font-size: 10px; font-weight: 600; }
.admin-plan-card > p { color: var(--muted); font-size: 11px; }
.admin-plan-card ul { margin: 24px 0 0; padding: 18px 0 0; border-top: 1px solid #e7e3dc; display: grid; gap: 10px; list-style: none; }
.admin-plan-card li { font-size: 11px; line-height: 1.4; }
.admin-plan-card li::before { content: "✓"; margin-right: 8px; color: var(--red); font-weight: 900; }
.admin-modal { width: min(620px, 100%); }

@media (max-width: 1000px) {
  .desktop-nav, .desktop-only { display: none; }
  .menu-toggle { display: inline-grid; }
  .mobile-nav {
    position: absolute;
    left: 0; right: 0; top: 100%;
    padding: 18px 24px 24px;
    border-bottom: 1px solid var(--stone);
    background: var(--paper);
  }
  .mobile-nav.open { display: grid; gap: 18px; }
  .mobile-nav a { font-weight: 800; }
  .hero { grid-template-columns: 1fr; padding-top: 60px; }
  .hero-product { min-height: 450px; }
  .product-body { min-height: 395px; }
  .model-grid { grid-template-columns: repeat(2, 1fr); }
  .api-band, .pricing-layout, .enterprise-hero { grid-template-columns: 1fr; }
  .enterprise-hero { gap: 36px; }
  .proof-strip { grid-template-columns: repeat(2, 1fr); padding-top: 14px; padding-bottom: 14px; }
  .proof-strip span, .proof-strip span:first-child, .proof-strip span:last-child { justify-content: center; padding: 12px; border: 0; }
  .sidebar { transform: translateX(-100%); transition: transform 180ms ease; }
  .sidebar.open { transform: translateX(0); }
  .sidebar-close, .sidebar-open { display: inline-grid; }
  .sidebar-backdrop { position: fixed; inset: 0; z-index: 110; background: rgba(0,0,0,.48); }
  .console-main { margin-left: 0; }
  .metric-row { grid-template-columns: repeat(2, 1fr); }
  .metric-row article:nth-child(2) { border-right: 0; }
  .metric-row article:nth-child(-n+2) { border-bottom: 1px solid var(--stone); }
  .console-model-grid { grid-template-columns: repeat(2, 1fr); }
  .quick-actions, .update-grid { grid-template-columns: repeat(2, 1fr); }
  .quick-actions button:nth-child(2) { border-right: 0; }
  .quick-actions button:nth-child(-n+2) { border-bottom: 1px solid var(--stone); }
  .routing-layout { grid-template-columns: 1fr; }
  .cost-metrics { grid-template-columns: repeat(2, 1fr); }
  .cost-metrics article:nth-child(2) { border-right: 0; }
  .cost-metrics article:nth-child(-n+2) { border-bottom: 1px solid var(--stone); }
  .cost-layout { grid-template-columns: 1fr; }
  .finance-history-grid { grid-template-columns: 1fr; }
  .invoice-amount-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .budget-grid { grid-template-columns: repeat(2, 1fr); }
  .budget-grid > :last-child { grid-column: 1 / -1; }
  .history-toolbar { grid-template-columns: minmax(220px, 1fr) repeat(2, 150px); }
  .history-toolbar > label:nth-of-type(4), .history-toolbar > button { grid-row: 2; }
  .file-row { grid-template-columns: 46px minmax(180px, 1fr) 200px auto; }
  .file-actions { grid-column: 2 / -1; }
  .auth-layout { grid-template-columns: minmax(330px, .75fr) minmax(440px, 1.25fr); }
  .auth-brand-panel { padding: 34px; }
  .auth-form-panel { padding-left: 42px; padding-right: 42px; }
  .admin-sidebar { transform: translateX(-100%); transition: transform 180ms ease; }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-sidebar-close, .admin-sidebar-open { display: inline-grid; }
  .admin-sidebar-backdrop { position: fixed; inset: 0; z-index: 110; background: rgba(0,0,0,.48); }
  .admin-main { margin-left: 0; }
  .admin-metrics { grid-template-columns: repeat(2, 1fr); }
  .admin-metrics article:nth-child(2) { border-right: 0; }
  .admin-metrics article:nth-child(-n+2) { border-bottom: 1px solid var(--stone); }
  .admin-plan-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  :root { --header-height: 112px; }
  .site-header { padding: 0 16px; gap: 10px; }
  .brand img { width: 96px; height: 96px; }
  .language-switch button { min-width: 36px; }
  .hero { width: calc(100% - 32px); min-height: auto; padding: 54px 0 66px; gap: 42px; }
  h1 { font-size: 48px; }
  .hero-lede { font-size: 16px; }
  .hero-actions > * { flex: 1 1 100%; }
  .hero-trust { display: grid; }
  .hero-product { min-height: 0; }
  .product-body { grid-template-columns: 1fr; min-height: 0; }
  .model-rail { padding: 10px; border-right: 0; border-bottom: 1px solid var(--stone); flex-direction: row; overflow-x: auto; }
  .model-pill { min-width: 112px; }
  .demo-conversation { min-height: 330px; padding: 28px 18px 18px; }
  .demo-answer { margin-top: 42px; }
  .section { padding: 78px 16px; }
  .section-heading h2, .enterprise-preview h2, .final-cta h2 { font-size: 40px; }
  .split-heading { grid-template-columns: 1fr; gap: 22px; }
  .catalog-toolbar { align-items: stretch; flex-direction: column; }
  .filter-tabs { display: grid; grid-template-columns: repeat(2, 1fr); }
  .filter-tabs button { width: 100%; }
  .search-field { width: 100%; }
  .model-grid { grid-template-columns: 1fr; }
  .model-card { min-height: 290px; }
  .workflow-grid, .deployment-grid { grid-template-columns: 1fr; }
  .workflow-grid article, .workflow-grid article + article, .deployment-grid article, .deployment-grid article + article { padding: 28px 0; border-left: 0; border-bottom: 1px solid var(--stone); }
  .workflow-grid svg { margin-top: 35px; }
  .deployment-grid h3 { margin-top: 34px; }
  .api-band > div, .api-band pre { padding: 28px 20px; }
  .api-band pre { font-size: 11px; }
  .currency-switch { justify-self: start; }
  .pricing-layout { gap: 34px; }
  .cost-calculator { padding: 24px 18px; }
  .calculator-head { align-items: flex-start; flex-direction: column; gap: 12px; }
  .cost-calculator fieldset { grid-template-columns: 1fr; }
  .enterprise-preview { align-items: flex-start; flex-direction: column; }
  .final-cta { min-height: 0; padding: 70px 16px; grid-template-columns: 1fr; gap: 46px; }
  footer { padding: 42px 16px; grid-template-columns: 1fr 1fr; }
  footer .footer-brand { grid-column: 1 / -1; }
  .enterprise-hero { min-height: 0; padding: 65px 16px; }
  .enterprise-metrics article { grid-template-columns: 1fr; }
  .enterprise-metrics strong { grid-row: auto; grid-column: auto; }
  .security-band { grid-template-columns: 1fr; gap: 38px; }
  .console-header { height: 68px; padding: 0 14px; }
  .console-header .notification-dot + * { display: none; }
  .console-header .language-switch { display: inline-flex; }
  .console-header .button { width: 40px; min-height: 40px; padding: 0; }
  .console-header .button span { display: none; }
  .console-view { padding: 24px 14px 42px; }
  .welcome-line, .view-heading, .chat-heading { align-items: flex-start; flex-direction: column; }
  .view-heading-actions { width: 100%; }
  .view-heading-actions .button, .view-heading-actions .button-secondary { flex: 1; }
  .welcome-line h2, .view-heading h2, .chat-heading h2 { font-size: 28px; }
  .metric-row { grid-template-columns: 1fr; }
  .metric-row article, .metric-row article:nth-child(2) { border-right: 0; border-bottom: 1px solid var(--stone); }
  .metric-row article:last-child { border-bottom: 0; }
  .overview-grid, .billing-grid { grid-template-columns: 1fr; }
  .project-metrics, .storage-metrics, .cost-metrics { grid-template-columns: 1fr; }
  .project-metrics article, .storage-metrics article, .cost-metrics article, .cost-metrics article:nth-child(2) { border-right: 0; border-bottom: 1px solid var(--stone); }
  .project-metrics article:last-child, .storage-metrics article:last-child, .cost-metrics article:last-child { border-bottom: 0; }
  .project-toolbar, .file-toolbar, .history-toolbar, .budget-form-grid, .budget-grid { grid-template-columns: 1fr; }
  .history-toolbar > label:nth-of-type(4), .history-toolbar > button, .budget-grid > :last-child { grid-column: auto; grid-row: auto; }
  .project-grid { grid-template-columns: 1fr; }
  .project-card dl { grid-template-columns: 1fr 1fr; }
  .project-card dl div:first-child { grid-column: 1 / -1; }
  .file-dropzone { padding: 24px 18px; grid-template-columns: 38px 1fr; }
  .file-dropzone .button-secondary { grid-column: 1 / -1; width: 100%; }
  .file-row { padding: 14px 18px; grid-template-columns: 44px minmax(0, 1fr) auto; }
  .file-row label { grid-column: 2 / -1; }
  .file-row .status-pill { grid-column: 2; justify-self: start; }
  .file-actions { grid-column: 3; }
  .history-result-line { align-items: flex-start; flex-direction: column; }
  .budget-row, .api-cost-row { grid-template-columns: 1fr; }
  .invoice-process { grid-template-columns: 1fr; }
  .invoice-process span { border-right: 0; border-bottom: 1px solid #e7e3dc; }
  .invoice-process span:last-child { border-bottom: 0; }
  .invoice-payer-switch { grid-template-columns: 1fr; }
  .invoice-payer-switch button { border-right: 0; border-bottom: 1px solid var(--stone); }
  .invoice-payer-switch button:last-child { border-bottom: 0; }
  .budget-row > i { grid-column: auto; }
  .modal-form-grid, .detail-grid { grid-template-columns: 1fr; }
  .console-panel { padding: 18px; }
  .activity-item { grid-template-columns: 32px 1fr; }
  .activity-item > strong { grid-column: 2; }
  .chat-shell { height: calc(100vh - 116px); min-height: 560px; }
  .chat-heading { gap: 12px; }
  .model-select, .model-select select { width: 100%; }
  .chat-messages { padding: 16px; }
  .message > div { max-width: 86%; }
  .console-model-grid { grid-template-columns: 1fr; }
  .key-row { grid-template-columns: 1fr auto; }
  .key-row code { grid-column: 1 / -1; }
  .team-metrics { grid-template-columns: 1fr; }
  .team-metrics article { border-right: 0; border-bottom: 1px solid var(--stone); }
  .quick-actions, .update-grid { grid-template-columns: 1fr; }
  .quick-actions button, .quick-actions button:nth-child(2) { border-right: 0; border-bottom: 1px solid var(--stone); }
  .quick-actions button:last-child { border-bottom: 0; }
  .routing-strategy { grid-template-columns: 30px 1fr auto; }
  .provider-grid { grid-template-columns: 1fr; }
  .provider-grid article, .provider-grid article:nth-child(2n), .provider-grid article:nth-last-child(-n+2) { border-right: 0; border-bottom: 1px solid #e7e3dc; }
  .provider-grid article:last-child { border-bottom: 0; }
  .auth-layout { grid-template-columns: 1fr; }
  .auth-brand-panel { min-height: 280px; padding: 20px 18px 30px; }
  .auth-brand-panel .brand img { width: 128px; height: 128px; }
  .auth-brand-panel > div { margin: 46px 0 0; padding: 0; }
  .auth-brand-panel h1 { margin-bottom: 0; font-size: 38px; }
  .auth-brand-panel > div > p:last-child { display: none; }
  .auth-pattern { width: 230px; right: -70px; bottom: -95px; }
  .auth-form-panel { min-height: calc(100vh - 280px); padding: 22px 18px; }
  .auth-topbar > a span { display: none; }
  .auth-box { padding: 54px 0 34px; }
  .admin-header { height: 68px; padding: 0 14px; }
  .admin-header .button-secondary span { display: none; }
  .admin-header .button-secondary { width: 40px; min-height: 40px; padding: 0; }
  .admin-view { padding: 24px 14px 42px; }
  .admin-metrics, .admin-security-summary, .admin-overview-grid, .admin-toolbar, .admin-plan-grid { grid-template-columns: 1fr; }
  .admin-metrics article, .admin-metrics article:nth-child(2) { border-right: 0; border-bottom: 1px solid var(--stone); }
  .admin-metrics article:last-child { border-bottom: 0; }
  .admin-security-summary article { border-right: 0; border-bottom: 1px solid var(--stone); }
  .admin-security-summary article:last-child { border-bottom: 0; }
  .admin-toolbar.compact { grid-template-columns: 1fr; justify-content: stretch; }
}
