:root {
  --charcoal: #17110f;
  --charcoal-2: #241815;
  --text-light: #f8fafc;
  --paper: #11100f;
  --ink: #f8fafc;
  --muted: #aab2c0;
  --line: rgba(248, 250, 252, 0.16);
  --tomato: #d85d36;
  --fire: #f29b3d;
  --olive: #657b4e;
  --basil: #86a15c;
  --steel: #376173;
  --wine: #7f2d2d;
  --shadow: 0 26px 60px rgba(0, 0, 0, 0.34);
  --soft-shadow: 0 14px 32px rgba(0, 0, 0, 0.18);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  color: var(--text-light);
  font-family: "Aptos", "Segoe UI", system-ui, sans-serif;
  background:
    linear-gradient(115deg, rgba(216, 93, 54, 0.28), transparent 34%),
    linear-gradient(245deg, rgba(101, 123, 78, 0.22), transparent 36%),
    linear-gradient(180deg, var(--charcoal) 0%, #0f0c0b 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.22;
  background:
    linear-gradient(90deg, transparent 0 17px, rgba(255,255,255,0.08) 18px, transparent 19px),
    linear-gradient(0deg, transparent 0 17px, rgba(255,255,255,0.06) 18px, transparent 19px);
  background-size: 96px 96px;
  mask-image: linear-gradient(180deg, black, transparent 80%);
}

h1, h2, p { margin: 0; }
a { color: inherit; text-decoration: none; }

.shell {
  position: relative;
  min-height: 100vh;
  display: grid;
  gap: 14px;
  padding: 14px;
}

.topbar {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(23, 17, 15, 0.82);
  backdrop-filter: blur(20px);
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.brand-logo {
  display: block;
  width: min(214px, 50vw);
  height: auto;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 8px;
}
.brand-context {
  color: rgba(248, 250, 252, 0.74);
  font-size: 13px;
  font-weight: 900;
}
.brand-lockup strong { display: block; font-size: 18px; line-height: 1; }
.brand-lockup span:last-child { color: rgba(248, 250, 252, 0.74); font-size: 13px; }
.station-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.08);
}
.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--basil);
  box-shadow: 0 0 0 5px rgba(134, 161, 92, 0.18);
}

.hero {
  min-height: 300px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  align-items: end;
  gap: 18px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(16, 10, 8, 0.86), rgba(16, 10, 8, 0.34)),
    url("https://thedoughlab.eu/wp-content/uploads/2026/01/etterem-1024x751.png") center/cover no-repeat;
  box-shadow: var(--shadow);
}

.hero-copy {
  display: grid;
  gap: 12px;
  max-width: 880px;
}
.eyebrow {
  color: var(--tomato);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}
.hero h1 {
  font-size: clamp(48px, 8vw, 100px);
  line-height: 0.9;
  max-width: 900px;
}
.hero p:last-child {
  color: rgba(248, 250, 252, 0.78);
  font-size: 18px;
  font-weight: 700;
}
.hero-card {
  display: grid;
  gap: 8px;
  min-height: 170px;
  align-content: end;
  padding: 18px;
  border: 1px solid rgba(248, 250, 252,0.2);
  border-radius: 8px;
  background: rgba(23, 17, 15, 0.72);
  backdrop-filter: blur(16px);
}
.hero-card span, .hero-card small { color: rgba(248, 250, 252,0.72); font-weight: 800; }
.hero-card strong { font-size: 34px; line-height: 1; }

.quick-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.stat-card {
  min-height: 118px;
  display: grid;
  align-content: space-between;
  padding: 16px;
  border-radius: 8px;
  box-shadow: var(--soft-shadow);
}
.stat-card span {
  color: rgba(255,255,255,0.82);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}
.stat-card strong {
  font-size: 42px;
  line-height: 1;
}
.tomato { background: linear-gradient(135deg, #d85d36, #b8462f); }
.olive { background: linear-gradient(135deg, #657b4e, #86a15c); }
.steel { background: linear-gradient(135deg, #376173, #4a8195); }
.fire { background: linear-gradient(135deg, #f29b3d, #d85d36); }

.module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.module-card {
  position: relative;
  min-height: 240px;
  display: grid;
  align-content: space-between;
  gap: 18px;
  padding: 18px;
  border: 1px solid rgba(248, 250, 252, 0.14);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(248, 250, 252, 0.08);
  box-shadow: var(--soft-shadow);
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}
.module-card::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.86;
  background: linear-gradient(135deg, rgba(216, 93, 54, 0.18), transparent 62%);
}
.module-card > * { position: relative; }
.module-card:hover {
  transform: translateY(-3px);
  border-color: rgba(248, 250, 252,0.34);
  background: rgba(248, 250, 252,0.12);
}
.module-card h2 {
  margin-top: 8px;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 0.95;
}
.module-card p:last-child {
  max-width: 420px;
  margin-top: 10px;
  color: rgba(248, 250, 252,0.74);
  font-weight: 700;
}
.module-index {
  width: max-content;
  padding: 6px 9px;
  border-radius: 8px;
  color: #fff;
  background: rgba(248, 250, 252,0.13);
  font-weight: 900;
}
.module-card.primary::before { background: linear-gradient(135deg, rgba(216, 93, 54, 0.34), transparent 60%); }
.module-card.sales::before { background: linear-gradient(135deg, rgba(55, 97, 115, 0.4), transparent 60%); }
.module-card.receipt::before { background: linear-gradient(135deg, rgba(242, 155, 61, 0.32), transparent 60%); }
.module-card.stock::before { background: linear-gradient(135deg, rgba(55, 97, 115, 0.34), transparent 60%); }
.module-card.production::before { background: linear-gradient(135deg, rgba(134, 161, 92, 0.34), transparent 60%); }
.module-card.dough::before { background: linear-gradient(135deg, rgba(240, 163, 74, 0.34), transparent 60%); }
.module-card.hr::before { background: linear-gradient(135deg, rgba(101, 123, 78, 0.34), transparent 60%); }
.module-card.quality::before { background: linear-gradient(135deg, rgba(95, 140, 161, 0.38), transparent 60%); }
.module-card.catalog::before { background: linear-gradient(135deg, rgba(127, 45, 45, 0.34), transparent 60%); }
.module-card.developer::before { background: linear-gradient(135deg, rgba(140, 167, 183, 0.36), transparent 60%); }
.module-card.disabled {
  opacity: 0.72;
  cursor: default;
}
.module-card.disabled:hover {
  transform: none;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  max-width: min(360px, calc(100vw - 36px));
  padding: 14px 16px;
  border-radius: 8px;
  color: #fff;
  background: rgba(23, 17, 15, 0.96);
  box-shadow: var(--shadow);
}
[hidden] { display: none !important; }

@media (min-width: 1280px) {
  html,
  body {
    height: 100%;
    overflow: hidden;
  }

  .shell {
    height: 100vh;
    min-height: 0;
    overflow: hidden;
    grid-template-rows: auto minmax(190px, 0.34fr) minmax(74px, 0.13fr) minmax(0, 1fr);
  }

  .hero {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr) 230px;
    padding: 22px;
  }

  .hero-copy {
    max-width: 1120px;
  }

  .hero h1 {
    font-size: clamp(52px, 5vw, 76px);
    line-height: 0.92;
    max-width: 1120px;
  }

  .hero-card {
    min-height: 136px;
  }

  .quick-stats {
    gap: 10px;
  }

  .stat-card {
    min-height: 74px;
    padding: 12px;
  }

  .stat-card strong {
    font-size: 30px;
  }

  .module-grid {
    min-height: 0;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    overflow: hidden;
  }

  .module-card {
    min-height: 194px;
    gap: 10px;
    padding: 14px;
  }

  .module-card h2 {
    font-size: clamp(24px, 2vw, 34px);
    line-height: 1;
  }

  .module-card p:last-child {
    max-width: none;
    font-size: 13px;
    line-height: 1.25;
  }

}

@media (max-width: 1040px) {
  .hero { grid-template-columns: 1fr; }
  .quick-stats, .module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .shell { padding: 10px; }
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }
  .station-pill { width: 100%; justify-content: space-between; }
  .hero {
    min-height: 360px;
    padding: 18px;
  }
  .hero h1 { font-size: 48px; }
  .quick-stats, .module-grid { grid-template-columns: 1fr; }
  .module-card { min-height: 190px; }
}
