:root {
  color-scheme: light;
  --ink: #172326;
  --muted: #5f6f73;
  --line: #d9e2df;
  --soft: #f4f8f7;
  --paper: #ffffff;
  --teal: #0f766e;
  --teal-strong: #0b5f59;
  --mint: #dff5ef;
  --amber: #f59e0b;
  --rose: #e05663;
  --plum: #6d4a78;
  --shadow: 0 18px 50px rgba(23, 35, 38, .14);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

body.menu-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 76px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(255, 255, 255, .92);
  border-bottom: 1px solid rgba(217, 226, 223, .8);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 232px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: var(--radius);
  background: var(--teal);
  color: #fff;
  font-weight: 900;
}

.brand-copy {
  display: grid;
  line-height: 1.1;
}

.brand-copy strong {
  font-size: 1rem;
}

.brand-copy small {
  color: var(--muted);
  font-size: .75rem;
}

.main-nav {
  display: flex;
  flex: 1;
  justify-content: center;
  gap: 8px;
}

.main-nav a {
  border-radius: var(--radius);
  color: #415257;
  font-size: .93rem;
  font-weight: 700;
  padding: 10px 12px;
}

.main-nav a:hover {
  background: var(--soft);
  color: var(--teal-strong);
}

.top-actions,
.hero-actions,
.module-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.primary-btn,
.ghost-btn,
.light-btn,
.connect-btn,
.icon-btn {
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 800;
  text-align: center;
  transition: transform .16s ease, border-color .16s ease, background .16s ease, color .16s ease;
}

.primary-btn,
.connect-btn {
  display: inline-flex;
  background: var(--teal);
  color: #fff;
  padding: 0 18px;
}

.primary-btn:hover,
.connect-btn:hover {
  background: var(--teal-strong);
  transform: translateY(-1px);
}

.ghost-btn {
  display: inline-flex;
  background: #fff;
  border-color: var(--line);
  color: var(--ink);
  padding: 0 16px;
}

.ghost-btn:hover {
  border-color: var(--teal);
  color: var(--teal-strong);
}

.light-btn {
  display: inline-flex;
  background: rgba(255, 255, 255, .9);
  color: var(--teal-strong);
  padding: 0 18px;
}

.icon-btn {
  display: grid;
  width: 42px;
  min-width: 42px;
  padding: 0;
  place-items: center;
  background: #fff;
  border-color: var(--line);
  color: var(--ink);
  font-size: 1.1rem;
}

.compact {
  min-height: 36px;
  padding-inline: 12px;
  font-size: .88rem;
}

.menu-btn {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  place-items: center;
  padding: 10px;
}

.menu-btn span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 3px 0;
  background: var(--ink);
}

.hero {
  position: relative;
  display: grid;
  min-height: min(700px, calc(100vh - 76px));
  overflow: hidden;
  isolation: isolate;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: -2;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(6, 18, 20, .84), rgba(6, 18, 20, .47) 48%, rgba(6, 18, 20, .12));
}

.hero-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(780px, calc(100% - 36px));
  min-height: 560px;
  margin-left: clamp(18px, 6vw, 76px);
  padding: 52px 0 80px;
  color: #fff;
  max-width: calc(100vw - 36px);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--amber);
  font-size: .76rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 740px;
  margin: 0;
  font-size: clamp(2.3rem, 6vw, 5.35rem);
  line-height: .96;
  letter-spacing: 0;
  overflow-wrap: break-word;
}

.hero-lead {
  width: min(650px, 100%);
  margin: 22px 0 28px;
  color: rgba(255, 255, 255, .88);
  font-size: clamp(1rem, 2vw, 1.24rem);
  line-height: 1.65;
  overflow-wrap: break-word;
}

.summary-band,
.content-band,
.app-band {
  padding: clamp(44px, 7vw, 86px) clamp(18px, 4vw, 56px);
}

.summary-band {
  background: var(--soft);
  border-block: 1px solid var(--line);
  padding-block: 28px;
}

.summary-grid,
.security-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  max-width: 1240px;
  margin: 0 auto;
}

.summary-grid article,
.security-grid article {
  display: grid;
  gap: 8px;
  min-height: 112px;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.summary-grid strong,
.security-grid strong {
  font-size: 1rem;
}

.summary-grid span,
.security-grid span {
  color: var(--muted);
  line-height: 1.45;
}

.section-head {
  max-width: 940px;
  margin: 0 auto 32px;
  text-align: center;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.9rem, 4vw, 3.25rem);
  line-height: 1.05;
}

.section-head p:not(.eyebrow) {
  margin: 16px auto 0;
  max-width: 770px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.feature-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  max-width: 1240px;
  margin: 0 auto;
}

.feature-item {
  min-height: 294px;
  padding: 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 8px 30px rgba(23, 35, 38, .06);
}

.feature-icon {
  display: inline-grid;
  width: 42px;
  height: 34px;
  place-items: center;
  margin-bottom: 22px;
  border-radius: var(--radius);
  background: var(--mint);
  color: var(--teal-strong);
  font-weight: 900;
}

.feature-item h3 {
  margin: 0 0 10px;
  font-size: 1.12rem;
  line-height: 1.25;
}

.feature-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.app-band {
  background: #0f1f21;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 16px;
  max-width: 1380px;
  margin: 0 auto;
}

.account-rail,
.workbench {
  background: var(--paper);
  border: 1px solid rgba(217, 226, 223, .16);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.account-rail {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-self: start;
  padding: 18px;
}

.panel-title-row,
.module-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.panel-title-row h2,
.panel-title-row h3,
.panel-title-row h4,
.module-head h3 {
  margin: 0;
}

.panel-title-row p,
.module-head p,
.chart-panel p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.account-list {
  display: grid;
  gap: 10px;
}

.account-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 72px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: left;
}

.account-card.is-active {
  border-color: var(--teal);
  background: var(--mint);
}

.account-avatar {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: var(--radius);
  background: var(--teal);
  color: #fff;
  font-weight: 900;
}

.account-card strong,
.account-card span,
.status-pill,
.tag {
  overflow-wrap: anywhere;
}

.account-card span {
  display: block;
  color: var(--muted);
  font-size: .8rem;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #22c55e;
}

.status-dot.warn {
  background: var(--amber);
}

.connect-btn {
  width: 100%;
}

.sync-box {
  display: grid;
  gap: 8px;
  margin-top: auto;
  padding: 14px;
  border: 1px dashed #a7c8c0;
  border-radius: var(--radius);
  background: #f7fcfa;
}

.sync-box span {
  color: var(--muted);
  line-height: 1.45;
}

.workbench {
  min-width: 0;
  overflow: hidden;
}

.tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}

.tab,
.segmented button,
.auth-tabs button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--muted);
  font-weight: 800;
  padding: 0 13px;
  white-space: nowrap;
}

.tab.is-active,
.segmented button.is-active,
.auth-tabs button.is-active {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}

.view {
  display: none;
  padding: 18px;
}

.view.is-active {
  display: block;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.metric-panel,
.chart-panel,
.automation-panel,
.block-editor,
.template-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.metric-panel {
  display: grid;
  gap: 6px;
  min-height: 124px;
  padding: 16px;
}

.metric-panel span,
.metric-panel small {
  color: var(--muted);
}

.metric-panel strong {
  font-size: clamp(1.35rem, 3vw, 2.1rem);
}

.metric-panel small {
  color: var(--teal-strong);
  font-weight: 800;
}

.chart-panel {
  padding: 18px;
}

.segmented {
  display: flex;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.segmented button {
  border-color: transparent;
}

canvas {
  width: 100%;
  max-width: 100%;
  height: 360px;
  margin-top: 18px;
}

.module-head {
  margin-bottom: 16px;
}

.filters {
  display: grid;
  grid-template-columns: repeat(7, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

label {
  display: grid;
  gap: 7px;
}

label span {
  color: #415257;
  font-size: .78rem;
  font-weight: 900;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 11px 12px;
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, .14);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.data-table {
  width: 100%;
  min-width: 940px;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.data-table th {
  background: var(--soft);
  color: #415257;
  font-size: .78rem;
  text-transform: uppercase;
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.status-pill,
.tag {
  display: inline-grid;
  min-height: 28px;
  align-items: center;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 900;
  padding: 0 10px;
}

.status-pill {
  background: var(--mint);
  color: var(--teal-strong);
}

.status-pill.warn {
  background: #fff0d4;
  color: #9a5d00;
}

.status-pill.danger {
  background: #ffe5e8;
  color: #9b1c2a;
}

.inventory-filters {
  grid-template-columns: 1.4fr repeat(6, minmax(120px, 1fr));
}

.inventory-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.product-card {
  display: grid;
  gap: 12px;
  min-height: 284px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.product-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.product-card h4 {
  margin: 0 0 6px;
  line-height: 1.3;
}

.product-card p {
  margin: 0;
  color: var(--muted);
}

.product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  background: var(--soft);
  color: #415257;
}

.quick-edit {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.responder-layout {
  display: grid;
  grid-template-columns: minmax(280px, .9fr) minmax(320px, 1.1fr);
  gap: 14px;
}

.rule-editor,
.template-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.rule-editor {
  display: grid;
  gap: 12px;
  align-self: start;
}

.checkbox-row {
  display: grid;
  gap: 8px;
  color: var(--muted);
}

.checkbox-row label,
.automation-panel label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkbox-row input,
.automation-panel input {
  width: auto;
}

.template-stack {
  display: grid;
  gap: 10px;
}

.template-card {
  display: grid;
  gap: 8px;
}

.template-card h4 {
  margin: 0;
}

.template-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.automation-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.automation-panel,
.block-editor {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.automation-panel h4,
.block-editor h4 {
  margin: 0;
}

.block-editor {
  grid-column: 1 / -1;
}

.blocks {
  display: grid;
  gap: 10px;
}

.block-row {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.security-band {
  background: var(--soft);
}

.integration-band {
  background: #fff;
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  display: grid;
  gap: 10px;
  min-height: 180px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  counter-increment: step;
}

.steps li::before {
  content: counter(step, decimal-leading-zero);
  color: var(--teal);
  font-weight: 900;
}

.steps span {
  color: var(--muted);
  line-height: 1.5;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 26px clamp(18px, 4vw, 56px);
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.footer strong {
  color: var(--ink);
}

.admin-page {
  background: var(--soft);
}

.admin-main {
  display: grid;
  gap: 18px;
  width: min(1320px, calc(100% - 36px));
  margin: 0 auto;
  padding: clamp(24px, 4vw, 48px) 0;
}

.admin-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 440px);
  gap: 18px;
  align-items: center;
  padding: clamp(24px, 5vw, 48px);
  border-radius: var(--radius);
  background: #0f1f21;
  color: #fff;
}

.admin-hero h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1;
}

.admin-hero p:not(.eyebrow) {
  max-width: 760px;
  color: rgba(255, 255, 255, .78);
  line-height: 1.65;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.admin-stats article {
  display: grid;
  gap: 8px;
  min-height: 112px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .08);
}

.admin-stats span {
  color: rgba(255, 255, 255, .7);
}

.admin-stats strong {
  font-size: 2rem;
}

.admin-panel {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 10px 34px rgba(23, 35, 38, .08);
}

.admin-panel h2 {
  margin: 0;
}

.admin-filters {
  grid-template-columns: 1.5fr 1fr 1fr;
}

.seo-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.seo-form label:nth-child(2),
.seo-form label:last-child {
  grid-column: 1 / -1;
}

.audit-list {
  display: grid;
  gap: 10px;
}

.audit-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 54px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.audit-row strong {
  color: var(--teal-strong);
}

.checkout-admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.checkout-column {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft);
}

.checkout-column h3 {
  margin: 0;
}

.checkout-method-list {
  display: grid;
  gap: 10px;
  min-height: 96px;
}

.checkout-method-card {
  display: grid;
  grid-template-columns: 34px minmax(150px, 1fr) minmax(100px, .42fr) 120px 86px;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 8px 24px rgba(23, 35, 38, .06);
  transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease, border-color .18s ease;
}

.checkout-method-card.is-hidden-method {
  background: #f8faf9;
  opacity: .72;
}

.checkout-method-card.is-dragging {
  border-color: var(--teal);
  box-shadow: 0 18px 40px rgba(15, 118, 110, .2);
  opacity: .62;
  transform: scale(.985);
}

.drag-handle {
  display: grid;
  width: 34px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft);
  color: var(--muted);
  cursor: grab;
  font-weight: 900;
  user-select: none;
}

.checkout-method-card:active .drag-handle {
  cursor: grabbing;
}

.visibility-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
}

.visibility-toggle input {
  width: auto;
}

.panel-page {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
  background: #eef5f3;
}

.user-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 18px;
  background: #0f1f21;
  color: #fff;
}

.panel-brand {
  min-width: 0;
  margin-bottom: 20px;
  color: #fff;
}

.panel-brand .brand-copy small {
  color: rgba(255, 255, 255, .64);
}

.user-nav {
  display: grid;
  gap: 6px;
}

.user-nav button {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: rgba(255, 255, 255, .76);
  font-weight: 800;
  text-align: left;
  padding: 0 12px;
}

.user-nav button:hover,
.user-nav button.is-active {
  background: rgba(255, 255, 255, .1);
  color: #fff;
}

.user-main {
  min-width: 0;
}

.user-topbar {
  position: sticky;
  top: 0;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 82px;
  padding: 16px 22px;
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.user-topbar h1 {
  margin: 0;
  font-size: clamp(1.35rem, 2vw, 2rem);
}

.user-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.user-actions select {
  min-width: 190px;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  max-width: 220px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--muted);
  font-weight: 800;
  padding: 0 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-content {
  display: grid;
  gap: 18px;
  padding: 22px;
}

.panel-view {
  display: none;
}

.panel-view.is-active {
  display: grid;
  gap: 18px;
}

.ops-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.ops-card,
.ops-panel,
.account-manage-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 10px 34px rgba(23, 35, 38, .07);
}

.ops-card {
  display: grid;
  gap: 8px;
  min-height: 126px;
  padding: 18px;
}

.ops-card span,
.ops-card small {
  color: var(--muted);
}

.ops-card strong {
  font-size: clamp(1.6rem, 3vw, 2.3rem);
}

.ops-layout-2,
.ops-layout-3 {
  display: grid;
  gap: 14px;
}

.ops-layout-2 {
  grid-template-columns: 1.25fr .75fr;
}

.ops-layout-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ops-panel,
.account-manage-card {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.ops-panel h2,
.ops-panel h3,
.account-manage-card h3 {
  margin: 0;
}

.ops-panel p,
.account-manage-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.task-board,
.quick-actions,
.account-admin-grid {
  display: grid;
  gap: 10px;
}

.task-board {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.task-board article {
  display: grid;
  gap: 6px;
  min-height: 92px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft);
}

.task-board strong {
  color: var(--teal-strong);
  font-size: 1.8rem;
}

.task-board span {
  color: var(--muted);
}

.quick-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.quick-actions button {
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font-weight: 800;
  padding: 0 12px;
  text-align: left;
}

.quick-actions button:hover {
  border-color: var(--teal);
  color: var(--teal-strong);
}

.account-admin-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.account-manage-card input,
.account-manage-card select {
  min-height: 40px;
}

.user-filters {
  grid-template-columns: repeat(7, minmax(120px, 1fr));
}

@media (max-width: 1180px) {
  .panel-page {
    grid-template-columns: 230px minmax(0, 1fr);
  }

  .ops-grid,
  .task-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ops-layout-2,
  .ops-layout-3,
  .account-admin-grid {
    grid-template-columns: 1fr;
  }

  .user-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 840px) {
  .panel-page {
    grid-template-columns: 1fr;
  }

  .user-sidebar {
    position: static;
    height: auto;
  }

  .user-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .user-topbar,
  .user-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .user-actions select,
  .user-chip {
    width: 100%;
    max-width: none;
  }
}

@media (max-width: 620px) {
  .ops-grid,
  .task-board,
  .quick-actions,
  .user-nav,
  .user-filters {
    grid-template-columns: 1fr;
  }

  .user-content,
  .user-topbar {
    padding: 14px;
  }
}

.auth-modal {
  width: min(860px, calc(100% - 28px));
  border: 0;
  border-radius: var(--radius);
  padding: 0;
  box-shadow: var(--shadow);
}

.auth-modal::backdrop {
  background: rgba(8, 18, 19, .62);
}

.modal-close-form {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
}

.auth-grid {
  display: grid;
  grid-template-columns: .85fr 1fr;
}

.auth-grid > section {
  padding: clamp(22px, 4vw, 34px);
}

.auth-grid > section:first-child {
  background: #0f1f21;
  color: #fff;
}

.auth-grid > section:first-child p:not(.eyebrow) {
  color: rgba(255, 255, 255, .78);
  line-height: 1.65;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}

.auth-form {
  display: none;
  gap: 12px;
}

.auth-form.is-active {
  display: grid;
}

.form-note {
  min-height: 22px;
  color: var(--muted);
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  max-width: min(380px, calc(100vw - 36px));
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1180px) {
  .feature-list,
  .summary-grid,
  .security-grid,
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-grid,
  .inventory-grid,
  .automation-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filters,
  .inventory-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .topbar {
    min-height: 68px;
  }

  .main-nav,
  .top-actions {
    position: fixed;
    left: 14px;
    right: 14px;
    display: none;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
  }

  .main-nav {
    top: 80px;
    flex-direction: column;
    padding: 10px;
  }

  .top-actions {
    top: 286px;
    padding: 12px;
  }

  body.menu-open .main-nav,
  body.menu-open .top-actions {
    display: flex;
  }

  .menu-btn {
    display: grid;
    position: fixed;
    top: 12px;
    right: auto;
    left: min(330px, calc(100vw - 62px));
    z-index: 35;
    margin-left: auto;
  }

  .brand {
    min-width: 0;
  }

  .brand-copy small {
    display: none;
  }

  .hero {
    min-height: 680px;
  }

  .hero-content {
    min-height: 620px;
    margin-inline: 18px;
  }

  .hero-scrim {
    background: rgba(6, 18, 20, .72);
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .account-rail {
    position: static;
  }

  .responder-layout,
  .auth-grid,
  .admin-hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .topbar {
    width: 100vw;
    max-width: 100vw;
    padding-inline: 18px;
  }

  .hero-content {
    width: min(330px, calc(100vw - 36px));
    max-width: min(330px, calc(100vw - 36px));
    margin-inline: 18px;
  }

  .hero h1 {
    font-size: clamp(1.85rem, 6vw, 2.35rem);
    line-height: 1.08;
  }

  .hero-lead {
    max-width: min(330px, calc(100vw - 36px));
    font-size: .98rem;
    line-height: 1.55;
  }

  .summary-grid,
  .security-grid,
  .feature-list,
  .steps,
  .dashboard-grid,
  .inventory-grid,
  .automation-grid {
    grid-template-columns: 1fr;
  }

  .summary-grid,
  .security-grid,
  .feature-list,
  .steps {
    width: min(330px, 100%);
    margin-inline: 0;
  }

  .filters,
  .inventory-filters,
  .admin-filters,
  .seo-form {
    grid-template-columns: 1fr;
  }

  .seo-form label:nth-child(2),
  .seo-form label:last-child {
    grid-column: auto;
  }

  .admin-stats {
    grid-template-columns: 1fr;
  }

  .checkout-admin-grid,
  .checkout-method-card {
    grid-template-columns: 1fr;
  }

  .module-head,
  .panel-title-row,
  .footer {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-actions,
  .module-actions,
  .top-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .primary-btn,
  .ghost-btn,
  .light-btn {
    width: 100%;
  }

  .view,
  .account-rail {
    padding: 14px;
  }

  .block-row {
    grid-template-columns: 1fr;
  }

  canvas {
    height: 300px;
  }
}

@media (max-width: 440px) {
  .brand-copy strong {
    font-size: .92rem;
  }

  .hero h1 {
    font-size: 1.95rem;
    line-height: 1.08;
  }

  .hero-lead {
    font-size: .96rem;
    line-height: 1.55;
  }

  .tabs {
    padding-inline: 8px;
  }

  .tab,
  .segmented button {
    min-height: 36px;
    padding-inline: 10px;
    font-size: .83rem;
  }
}
