:root {
  --bg: #efe7d6;
  --panel: rgba(255, 251, 244, 0.92);
  --ink: #18261b;
  --muted: #566255;
  --line: #d8ccb7;
  --accent: #b64d2e;
  --accent-2: #204a66;
  --accent-3: #e4b363;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(182, 77, 46, 0.18), transparent 22%),
    radial-gradient(circle at bottom right, rgba(32, 74, 102, 0.14), transparent 24%),
    linear-gradient(180deg, #f5efe2 0%, #ece1cf 100%);
}

.shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.95fr;
  gap: 24px;
  align-items: start;
}

.hero-copy {
  padding: 12px 0;
}

.feature-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.feature-strip span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 248, 239, 0.75);
  border: 1px solid rgba(216, 204, 183, 0.9);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12px;
  color: var(--accent-2);
  margin: 0 0 10px;
}

h1, h2, h3, h4 {
  margin: 0 0 12px;
}

h1 {
  font-size: clamp(36px, 5vw, 62px);
  line-height: 0.96;
  max-width: 10ch;
}

.lede, .hint {
  color: var(--muted);
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 22px;
  box-shadow: 0 14px 38px rgba(24, 38, 27, 0.08);
  backdrop-filter: blur(8px);
}

.auth-panel {
  position: relative;
  overflow: hidden;
}

.auth-panel::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 6px;
  background: linear-gradient(90deg, var(--accent), var(--accent-3), var(--accent-2));
}

.auth-tabs,
.main-nav {
  display: flex;
  gap: 10px;
}

.auth-tabs {
  margin-bottom: 18px;
}

.tab,
.nav-link {
  background: #fff7ef;
  color: var(--ink);
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  text-decoration: none;
}

.tab.active,
.nav-link.active {
  background: var(--accent-2);
  color: white;
}

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

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

input, textarea, select {
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fffdf8;
}

button {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  background: var(--accent);
  color: white;
  cursor: pointer;
}

.ghost-button {
  background: white;
  color: var(--ink);
  border: 1px solid var(--line);
}

.google-button {
  width: 100%;
  background: white;
  color: #1f1f1f;
  border: 1px solid var(--line);
}

.hidden {
  display: none;
}

.topbar,
.section-head,
.actions,
.dashboard-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.topbar {
  margin-bottom: 20px;
}

.topbar-right {
  display: flex;
  gap: 12px;
  align-items: center;
}

.dashboard-top {
  align-items: stretch;
}

.billing-card {
  flex: 1;
}

.token-banner {
  min-width: 320px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #fff4dd;
  border: 1px solid #f1d08b;
}

.dashboard-section {
  display: block;
}

.dashboard-section.hidden {
  display: none;
}

.grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 20px;
  margin-top: 20px;
}

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

.machine-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  cursor: pointer;
  text-align: left;
  background: white;
  color: var(--ink);
}

.machine-item.active {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.status {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  background: #e7f3ea;
  color: #22643b;
  font-size: 12px;
}

.detail-grid,
.billing-grid,
.downloads-layout {
  display: grid;
  gap: 16px;
}

.detail-grid {
  grid-template-columns: 1fr 1fr;
}

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

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

.schedule-block {
  display: grid;
  gap: 10px;
}

.error {
  color: #8a1c1c;
  min-height: 20px;
}

.history {
  max-height: 280px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: white;
}

.mini-stat {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  background: white;
}

.steps {
  margin: 0;
  padding-left: 18px;
  color: var(--ink);
}

.copy-block {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

@media (max-width: 980px) {
  .hero,
  .grid,
  .detail-grid,
  .dashboard-top,
  .billing-grid,
  .downloads-layout {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .topbar,
  .section-head,
  .actions,
  .main-nav,
  .topbar-right {
    flex-direction: column;
    align-items: flex-start;
  }
}

.checkbox-field {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffdf8;
}

.checkbox-field input {
  width: auto;
  margin: 0;
}
