:root {
  --bg: #efe7d3;
  --bg-deep: #ded1b2;
  --surface: rgba(253, 249, 241, 0.78);
  --surface-strong: #fffaf0;
  --ink: #1f2b21;
  --muted: #566458;
  --line: rgba(31, 43, 33, 0.12);
  --forest: #294335;
  --forest-deep: #1d3126;
  --sand: #b7854d;
  --moss: #758365;
  --mist: #eff3ec;
  --danger: #a24e3d;
  --shadow: 0 20px 60px rgba(31, 43, 33, 0.14);
  --shadow-soft: 0 12px 32px rgba(31, 43, 33, 0.08);
  --radius-lg: 30px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --header-height: 88px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.55), transparent 30%),
    linear-gradient(180deg, #f5efdf 0%, var(--bg) 42%, #e4d7bc 100%);
  color: var(--ink);
  font-family: Sora, "Segoe UI", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.16), transparent 28%),
    repeating-radial-gradient(circle at 12% 18%, rgba(41, 67, 53, 0.04) 0 2px, transparent 2px 28px);
  mix-blend-mode: multiply;
  opacity: 0.65;
}

body.menu-open {
  overflow: hidden;
}

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

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

button {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

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

h1,
h2,
h3 {
  margin: 0;
  font-family: Fraunces, Georgia, serif;
  line-height: 0.98;
}

p,
ul {
  margin: 0;
}

ul {
  padding-left: 18px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: min(100% - 40px, 1180px);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid rgba(31, 43, 33, 0.08);
  background: rgba(245, 239, 223, 0.76);
  backdrop-filter: blur(18px);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(100% - 40px, 1180px);
  min-height: var(--header-height);
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 0;
}

.brand-text strong,
.brand-text small {
  display: block;
}

.brand-text strong {
  font-size: 18px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.brand-text small {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--forest), #49654c);
  color: #f7f3ea;
  font-family: Fraunces, Georgia, serif;
  font-size: 24px;
  font-weight: 700;
  box-shadow: var(--shadow-soft);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.desktop-nav > button:not(.button),
.mobile-nav button {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.desktop-nav > button:not(.button):hover,
.mobile-nav button:hover {
  color: var(--ink);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: linear-gradient(135deg, var(--forest), #46604b);
  color: #f6f2e9;
  box-shadow: var(--shadow-soft);
}

.button-primary:hover {
  background: linear-gradient(135deg, var(--forest-deep), #39533f);
}

.button-secondary {
  border-color: rgba(41, 67, 53, 0.16);
  background: rgba(255, 250, 240, 0.84);
}

.button-secondary:hover,
.button-ghost:hover {
  border-color: rgba(41, 67, 53, 0.28);
  background: rgba(255, 250, 240, 0.98);
}

.button-danger {
  border-color: rgba(162, 78, 61, 0.2);
  background: rgba(162, 78, 61, 0.09);
  color: var(--danger);
}

.button-danger:hover {
  border-color: rgba(162, 78, 61, 0.36);
  background: rgba(162, 78, 61, 0.14);
}

.button-ghost {
  border-color: rgba(41, 67, 53, 0.18);
  background: rgba(255, 255, 255, 0.28);
}

.large {
  min-height: 56px;
  padding: 14px 24px;
  font-size: 15px;
}

.full {
  width: 100%;
}

.menu-toggle {
  display: none;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span:not(.sr-only) {
  width: 24px;
  height: 2px;
  border-radius: 999px;
  background: var(--ink);
}

.mobile-nav {
  display: grid;
  gap: 14px;
  width: min(100% - 40px, 1180px);
  margin: 0 auto;
  padding: 0 0 20px;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 52px 0 72px;
}

.hero-noise {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 25%, rgba(255, 255, 255, 0.65), transparent 20%),
    radial-gradient(circle at 90% 20%, rgba(183, 133, 77, 0.22), transparent 18%),
    linear-gradient(125deg, rgba(255, 255, 255, 0.2), transparent 48%);
}

.hero-grid,
.product-grid,
.checkout-grid,
.footer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 42px;
}

.hero-grid {
  align-items: center;
  min-height: calc(100svh - var(--header-height) - 30px);
}

.hero-copy,
.hero-visual,
.product-gallery,
.product-panel,
.summary-card,
.checkout-form,
.feature-card,
.admin-card,
.admin-panel,
.order-card {
  animation: rise 700ms ease both;
}

.hero-visual {
  animation-delay: 120ms;
}

.eyebrow,
.section-kicker {
  color: var(--forest);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 12ch;
  margin-top: 14px;
  font-size: clamp(3.3rem, 8vw, 6.2rem);
}

.hero-lead {
  max-width: 56ch;
  margin-top: 22px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.72;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 34px;
}

.metric-pill {
  display: grid;
  gap: 6px;
  padding: 18px;
  border: 1px solid rgba(41, 67, 53, 0.14);
  border-radius: 20px;
  background: rgba(255, 250, 240, 0.56);
  box-shadow: var(--shadow-soft);
}

.metric-pill strong {
  font-size: 22px;
}

.metric-pill span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.product-stage {
  position: relative;
  min-height: 560px;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 250, 240, 0.92), rgba(243, 236, 220, 0.9)),
    radial-gradient(circle at top right, rgba(117, 131, 101, 0.22), transparent 24%);
  box-shadow: var(--shadow);
}

.product-stage::before {
  content: "";
  position: absolute;
  inset: 26px;
  border: 1px solid rgba(41, 67, 53, 0.08);
  border-radius: 24px;
}

.floating-note {
  position: absolute;
  padding: 14px 18px;
  border-radius: 999px;
  background: rgba(255, 250, 240, 0.92);
  color: var(--forest);
  font-size: 13px;
  font-weight: 700;
  box-shadow: var(--shadow-soft);
}

.note-bottom {
  bottom: 34px;
  left: 32px;
}

.section {
  padding: 72px 0;
}

.section-heading {
  display: grid;
  gap: 14px;
  max-width: 760px;
}

.section-heading h2,
.product-panel h2,
.summary-card h2,
.checkout-form h2,
.admin-hero h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
}

.section-product {
  background: rgba(255, 250, 240, 0.34);
}

.product-grid,
.checkout-grid {
  align-items: start;
}

.gallery-card,
.product-panel,
.summary-card,
.checkout-form,
.spec-panel,
.admin-card,
.admin-panel,
.order-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(8px);
}

.gallery-card {
  padding: 28px;
}

.gallery-stats {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.gallery-stats article,
.product-facts div,
.trust-list div {
  display: grid;
  gap: 6px;
  padding: 18px;
  border: 1px solid rgba(41, 67, 53, 0.1);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.4);
}

.gallery-stats span,
.product-facts span,
.trust-list span,
.order-meta,
.empty-state,
.form-status,
.feature-card p,
.product-copy {
  color: var(--muted);
  line-height: 1.68;
}

.product-panel,
.summary-card,
.checkout-form {
  padding: 30px;
}

.product-price {
  margin-top: 16px;
  font-size: 34px;
  font-weight: 800;
  color: var(--forest);
}

.product-copy {
  margin-top: 12px;
}

.product-facts,
.trust-list {
  display: grid;
  gap: 12px;
  margin-top: 26px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 34px;
}

.feature-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 250, 240, 0.52);
  box-shadow: var(--shadow-soft);
}

.feature-card h3,
.order-card h3,
.admin-card strong {
  font-family: Sora, "Segoe UI", sans-serif;
}

.feature-card h3 {
  margin-bottom: 10px;
  font-size: 18px;
}

.spec-panel {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  margin-top: 22px;
  padding: 28px;
}

.spec-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  color: var(--muted);
}

.spec-quote {
  display: grid;
  place-items: center;
  padding: 24px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(41, 67, 53, 0.94), rgba(64, 92, 74, 0.94));
  color: #f7f3ea;
}

.spec-quote p {
  font-family: Fraunces, Georgia, serif;
  font-size: 28px;
  line-height: 1.2;
}

.cart-summary {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.summary-line,
.summary-total {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(41, 67, 53, 0.08);
}

.summary-total {
  font-weight: 800;
  color: var(--forest);
}

.summary-line small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}

.inline-link {
  display: inline-flex;
  margin-top: 18px;
  color: var(--forest);
  font-weight: 700;
}

.inline-link:hover {
  text-decoration: underline;
}

.checkout-form label {
  display: block;
  margin-top: 16px;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.checkout-form input,
.checkout-form textarea,
.checkout-form select {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(41, 67, 53, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.66);
  color: var(--ink);
  outline: none;
}

.checkout-form input:focus,
.checkout-form textarea:focus,
.checkout-form select:focus {
  border-color: rgba(41, 67, 53, 0.4);
  box-shadow: 0 0 0 4px rgba(41, 67, 53, 0.08);
}

.checkout-form textarea {
  resize: vertical;
  min-height: 120px;
}

.checkout-form select {
  appearance: none;
}

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

.form-status {
  min-height: 24px;
  margin-top: 14px;
}

.form-status.is-success {
  color: var(--forest);
}

.form-status.is-error {
  color: var(--danger);
}

.footer {
  padding: 30px 0 26px;
}

.footer-grid {
  gap: 24px;
  padding: 28px 0;
  border-top: 1px solid rgba(41, 67, 53, 0.08);
}

.footer h2 {
  font-size: 32px;
}

.footer h3 {
  margin-bottom: 12px;
  font-size: 18px;
  font-family: Sora, "Segoe UI", sans-serif;
}

.footer p {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.6;
}

.copyright {
  width: min(100% - 40px, 1180px);
  margin: 0 auto;
  padding-top: 20px;
  border-top: 1px solid rgba(41, 67, 53, 0.08);
  color: var(--muted);
  text-align: center;
}

.admin-body {
  min-height: 100svh;
}

.admin-body.auth-pending .site-header,
.admin-body.auth-pending .admin-main {
  visibility: hidden;
}

.admin-body.auth-pending::after {
  content: "Sjekker innlogging...";
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--forest);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-main {
  padding: 42px 0 60px;
}

.auth-main {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 32px 18px;
  background:
    radial-gradient(circle at 12% 12%, rgba(230, 167, 86, 0.22), transparent 30%),
    radial-gradient(circle at 88% 22%, rgba(41, 67, 53, 0.18), transparent 34%),
    var(--cream);
}

.auth-card {
  width: min(100%, 520px);
  padding: clamp(28px, 5vw, 44px);
  border: 1px solid rgba(41, 67, 53, 0.12);
  border-radius: 34px;
  background: rgba(255, 250, 240, 0.92);
  box-shadow: 0 28px 90px rgba(41, 67, 53, 0.16);
}

.auth-card .brand {
  margin-bottom: 34px;
}

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

.auth-form label {
  color: var(--forest);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-form input {
  width: 100%;
  padding: 15px 16px;
  border: 1px solid rgba(41, 67, 53, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--ink);
  outline: none;
}

.auth-form input:focus {
  border-color: rgba(41, 67, 53, 0.44);
  box-shadow: 0 0 0 4px rgba(41, 67, 53, 0.08);
}

.auth-form .button {
  margin-top: 10px;
}

.business-profile-form {
  display: grid;
  gap: 16px;
}

.business-profile-form label {
  display: block;
  margin-bottom: 8px;
  color: var(--forest);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.business-profile-form input,
.business-profile-form textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(41, 67, 53, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.66);
  color: var(--ink);
  outline: none;
}

.business-profile-form input:focus,
.business-profile-form textarea:focus {
  border-color: rgba(41, 67, 53, 0.4);
  box-shadow: 0 0 0 4px rgba(41, 67, 53, 0.08);
}

.profile-panel {
  background:
    radial-gradient(circle at top right, rgba(117, 131, 101, 0.16), transparent 32%),
    rgba(255, 250, 240, 0.78);
}

.admin-hero {
  display: grid;
  gap: 24px;
}

.admin-command {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at top right, rgba(183, 133, 77, 0.18), transparent 34%),
    rgba(255, 250, 240, 0.72);
  box-shadow: var(--shadow-soft);
}

.admin-lead {
  max-width: 66ch;
  color: var(--muted);
  line-height: 1.7;
}

.admin-command-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  max-width: 520px;
}

.admin-status-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid rgba(41, 67, 53, 0.14);
  border-radius: 999px;
  background: rgba(255, 250, 240, 0.76);
  box-shadow: var(--shadow-soft);
}

.admin-status-strip small,
.admin-status-strip span:not(.status-dot) {
  color: var(--muted);
  font-size: 13px;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--sand);
  box-shadow: 0 0 0 6px rgba(183, 133, 77, 0.14);
}

.admin-status-strip.is-ok .status-dot {
  background: #3f7f54;
  box-shadow: 0 0 0 6px rgba(63, 127, 84, 0.14);
}

.admin-status-strip.is-warning .status-dot {
  background: var(--danger);
  box-shadow: 0 0 0 6px rgba(162, 78, 61, 0.14);
}

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

.admin-stat-grid-wide {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.admin-card,
.admin-panel {
  padding: 24px;
}

.admin-card {
  position: relative;
  overflow: hidden;
}

.admin-card::after {
  content: "";
  position: absolute;
  right: -34px;
  bottom: -42px;
  width: 112px;
  height: 112px;
  border-radius: 999px;
  background: rgba(41, 67, 53, 0.07);
}

.admin-card strong {
  display: block;
  margin-top: 10px;
  font-size: 32px;
  font-weight: 800;
}

.admin-card small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.admin-panel {
  margin-top: 22px;
}

.priority-panel {
  background:
    linear-gradient(135deg, rgba(255, 250, 240, 0.9), rgba(245, 239, 223, 0.72)),
    radial-gradient(circle at 15% 10%, rgba(41, 67, 53, 0.1), transparent 30%);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.panel-head h2 {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
}

.panel-head-stack {
  align-items: flex-end;
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.filter-tab {
  min-height: 40px;
  padding: 9px 14px;
  border: 1px solid rgba(41, 67, 53, 0.14);
  border-radius: 999px;
  background: rgba(255, 250, 240, 0.58);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.filter-tab.is-active,
.filter-tab:hover {
  background: var(--forest);
  color: #f7f3ea;
}

.orders-root {
  display: grid;
  gap: 16px;
}

.pipeline-root,
.action-queue {
  display: grid;
  gap: 16px;
}

.action-card,
.lead-work-card,
.system-card,
.empty-work {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 250, 240, 0.68);
  box-shadow: var(--shadow-soft);
}

.action-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 20px;
}

.action-card h3,
.lead-work-card h3 {
  margin-top: 10px;
  font-family: Sora, "Segoe UI", sans-serif;
  font-size: 22px;
  line-height: 1.2;
}

.action-card p,
.action-card small,
.lead-work-head p,
.lead-work-grid p,
.lead-work-footer,
.timeline p,
.timeline small,
.system-card p,
.system-note,
.empty-work span {
  color: var(--muted);
  line-height: 1.6;
}

.action-card p {
  margin-top: 8px;
}

.action-card small {
  display: block;
  margin-top: 8px;
}

.action-card-actions,
.lead-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.empty-work {
  display: grid;
  gap: 8px;
  padding: 22px;
}

.lead-work-card {
  padding: 22px;
}

.lead-work-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.lead-work-grid,
.system-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

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

.lead-work-grid section,
.system-grid section {
  padding: 18px;
  border: 1px solid rgba(41, 67, 53, 0.08);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.48);
}

.lead-work-grid h4 {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.lead-work-grid dl {
  display: grid;
  gap: 8px;
  margin: 16px 0 0;
}

.lead-work-grid dl div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding-top: 8px;
  border-top: 1px solid rgba(41, 67, 53, 0.08);
}

.lead-work-grid dt,
.lead-work-grid dd {
  margin: 0;
}

.lead-work-grid dt {
  color: var(--muted);
}

.lead-work-grid dd {
  font-weight: 800;
  text-align: right;
}

.timeline {
  position: relative;
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.36);
}

.qualification-box {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid rgba(183, 133, 77, 0.18);
  border-radius: 20px;
  background:
    radial-gradient(circle at top right, rgba(183, 133, 77, 0.14), transparent 36%),
    rgba(255, 255, 255, 0.4);
}

.qualification-box strong {
  display: block;
  margin-top: 6px;
  font-size: 22px;
  text-transform: uppercase;
}

.qualification-box p {
  color: var(--muted);
  line-height: 1.6;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-row span {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(41, 67, 53, 0.08);
  color: var(--forest);
  font-size: 12px;
  font-weight: 800;
}

.history-box {
  display: grid;
  gap: 16px;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid rgba(41, 67, 53, 0.1);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.36);
}

.history-head,
.history-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.45fr);
  gap: 16px;
}

.history-head strong {
  display: block;
  margin-top: 6px;
  font-size: 20px;
}

.history-head p,
.history-grid p,
.history-message small,
.previous-leads span {
  color: var(--muted);
  line-height: 1.6;
}

.history-grid section {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 250, 240, 0.5);
}

.history-grid h4,
.previous-leads h4 {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.history-message {
  display: grid;
  gap: 6px;
  padding: 12px 0;
  border-top: 1px solid rgba(41, 67, 53, 0.08);
}

.history-message:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.previous-leads {
  display: grid;
  gap: 10px;
}

.previous-leads div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 250, 240, 0.5);
}

.timeline-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
}

.timeline-dot {
  width: 12px;
  height: 12px;
  margin-top: 6px;
  border-radius: 999px;
  background: var(--forest);
}

.lead-work-footer,
.system-note {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(41, 67, 53, 0.08);
}

.system-card {
  padding: 22px;
}

.system-label {
  color: var(--forest);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.system-grid strong {
  display: block;
  margin: 8px 0;
  font-size: 22px;
}

.order-card {
  padding: 22px;
}

.order-card-head,
.order-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.order-meta {
  margin-top: 8px;
}

.status-pill {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(41, 67, 53, 0.1);
  color: var(--forest);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-hot {
  background: rgba(162, 78, 61, 0.12);
  color: var(--danger);
}

.status-draft {
  background: rgba(183, 133, 77, 0.16);
  color: #7a542b;
}

.status-waiting {
  background: rgba(41, 67, 53, 0.1);
  color: var(--forest);
}

.status-done {
  background: rgba(63, 127, 84, 0.12);
  color: #315f40;
}

.order-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.order-grid section {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.42);
}

.order-grid h4 {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.order-grid p {
  color: var(--muted);
  line-height: 1.6;
}

.order-footer {
  margin-top: 4px;
  padding-top: 16px;
  border-top: 1px solid rgba(41, 67, 53, 0.08);
}

.loading {
  padding: 20px;
  border: 1px dashed rgba(41, 67, 53, 0.2);
  border-radius: 18px;
  color: var(--muted);
  text-align: center;
}

.message-stage {
  display: grid;
  place-items: center;
  padding: 32px;
}

.message-board {
  display: grid;
  gap: 14px;
  width: min(100%, 470px);
  padding: 24px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.66);
  box-shadow: var(--shadow-soft);
  z-index: 1;
}

.message-label {
  color: var(--forest);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.chat-bubble {
  max-width: 88%;
  padding: 16px 18px;
  border-radius: 20px;
  line-height: 1.6;
  box-shadow: var(--shadow-soft);
}

.chat-bubble-user {
  justify-self: end;
  background: linear-gradient(135deg, var(--forest), #4a6751);
  color: #f7f3ea;
  border-bottom-right-radius: 8px;
}

.chat-bubble-system {
  justify-self: start;
  background: rgba(255, 250, 240, 0.92);
  border: 1px solid rgba(41, 67, 53, 0.12);
  border-bottom-left-radius: 8px;
}

.chat-bubble.delayed {
  opacity: 0.86;
}

.workflow-list {
  display: grid;
  gap: 14px;
}

.workflow-step {
  display: grid;
  gap: 6px;
  padding: 20px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(41, 67, 53, 0.1);
}

.workflow-step span {
  color: var(--muted);
  line-height: 1.6;
}

.service-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.service-chip {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(41, 67, 53, 0.08);
  border: 1px solid rgba(41, 67, 53, 0.12);
  font-size: 13px;
  font-weight: 700;
}

.lead-card {
  display: grid;
  gap: 18px;
}

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

.followup-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.42);
}

.followup-item strong,
.followup-item small {
  display: block;
}

.followup-item small,
.followup-meta small {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.5;
}

.followup-meta {
  display: grid;
  justify-items: end;
}

.run-followup-button {
  white-space: nowrap;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .desktop-nav {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .hero-grid,
  .product-grid,
  .checkout-grid,
  .footer-grid,
  .spec-panel,
  .admin-stat-grid,
  .order-grid,
  .feature-grid,
  .admin-command,
  .lead-work-grid,
  .system-grid,
  .history-head,
  .history-grid {
    grid-template-columns: 1fr;
  }

  .admin-command {
    align-items: start;
  }

  .admin-command-actions,
  .filter-tabs,
  .action-card-actions,
  .lead-actions {
    justify-content: flex-start;
  }

  .action-card,
  .lead-work-head,
  .panel-head,
  .panel-head-stack {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: flex-start;
  }

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

  .product-stage {
    min-height: 460px;
  }

  .hero h1 {
    max-width: 11ch;
  }

  .chat-bubble {
    max-width: 100%;
  }
}

@media (max-width: 640px) {
  .container,
  .nav-wrap,
  .mobile-nav,
  .copyright {
    width: min(100% - 24px, 1180px);
  }

  .hero {
    padding-top: 28px;
  }

  .hero h1,
  .section-heading h2,
  .product-panel h2,
  .summary-card h2,
  .checkout-form h2,
  .admin-hero h1 {
    font-size: clamp(2.3rem, 12vw, 3.6rem);
  }

  .hero-actions .button,
  .full-mobile {
    width: 100%;
  }

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

  .product-panel,
  .summary-card,
  .checkout-form,
  .admin-card,
  .admin-panel,
  .order-card,
  .gallery-card {
    padding: 22px;
  }

  .product-stage {
    min-height: 360px;
  }

  .floating-note {
    font-size: 12px;
  }

  .followup-item,
  .order-footer,
  .action-card,
  .lead-work-head,
  .lead-work-footer,
  .previous-leads div,
  .summary-line,
  .summary-total {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-status-strip {
    border-radius: 22px;
  }

  .admin-command-actions .button,
  .action-card-actions .button,
  .lead-actions .button,
  .filter-tab {
    width: 100%;
  }

  .lead-work-grid dl div {
    display: grid;
  }

  .lead-work-grid dd {
    text-align: left;
  }

  .followup-meta {
    justify-items: start;
  }
}
