* {
  box-sizing: border-box;
}

:root {
  color-scheme: light dark;
  --bg: #f5f1e8;
  --ink: #1f2933;
  --muted: #667085;
  --panel: rgba(255, 255, 255, 0.76);
  --border: rgba(31, 41, 51, 0.14);
  --accent: #e0a500;
  --accent-ink: #211805;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111827;
    --ink: #f9fafb;
    --muted: #a7b0be;
    --panel: rgba(17, 24, 39, 0.72);
    --border: rgba(255, 255, 255, 0.16);
    --accent: #f8c537;
    --accent-ink: #211805;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(224, 165, 0, 0.18), transparent 34rem),
    var(--bg);
  color: var(--ink);
}

a {
  color: inherit;
}

.construction {
  width: min(100%, 760px);
  text-align: center;
}

.dev-shell {
  width: min(100%, 1120px);
  display: grid;
  gap: 18px;
  text-align: left;
}

.dev-shell > .card,
.dev-shell > .admin-card {
  width: 100%;
}

.dev-shell > section[id] {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.dev-shell > section[id] > .eyebrow,
.dev-shell > section[id] > h2 {
  grid-column: 1 / -1;
}

.dev-shell .card .card {
  min-height: auto;
  margin-top: 14px;
  background: rgba(255, 255, 255, 0.52);
  box-shadow: none;
}

.label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-bottom: 28px;
  padding: 10px 18px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  box-shadow: 5px 5px 0 var(--ink);
  transform: rotate(-1.5deg);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(2.3rem, 10vw, 5.4rem);
  line-height: 0.95;
  letter-spacing: -0.07em;
  text-wrap: balance;
}

.construction p,
.lead {
  max-width: 42rem;
  margin: 24px auto 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2.5vw, 1.25rem);
  line-height: 1.65;
  text-wrap: pretty;
}

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

.card {
  min-height: 150px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
}

.card h2 {
  margin: 0 0 10px;
  font-size: 0.95rem;
}

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

.card .value {
  margin-bottom: 8px;
  color: var(--ink);
  font-weight: 750;
  overflow-wrap: anywhere;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 26px;
}

.actions a,
.button,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel);
  color: var(--ink);
  text-decoration: none;
  font-weight: 750;
  cursor: pointer;
}

.button:first-child,
button {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: transparent;
}

.auth-shell,
.admin-shell {
  width: min(100%, 1040px);
}

.auth-card {
  min-height: auto;
  text-align: left;
}

.auth-card h1 {
  font-size: clamp(2.2rem, 8vw, 4rem);
}

.admin-card {
  min-height: auto;
  text-align: left;
  overflow-x: auto;
}

.admin-card h1 {
  font-size: clamp(2.1rem, 7vw, 4.4rem);
}

.admin-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-start;
  margin: 0 0 18px;
}

.admin-nav a {
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel);
  text-decoration: none;
  font-weight: 750;
}

.table {
  width: 100%;
  margin-top: 24px;
  border-collapse: collapse;
}

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

.table th {
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

fieldset {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
}

legend {
  padding: 0 8px;
  font-weight: 800;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.check-row input {
  width: auto;
  min-height: auto;
}

.muted,
.form-note {
  color: var(--muted);
  line-height: 1.6;
}

.form {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.form div {
  display: grid;
  gap: 6px;
}

label {
  font-weight: 750;
}

input,
textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
  color: var(--ink);
  font: inherit;
}

textarea {
  resize: vertical;
}

.account-credit-balance {
  font-size: clamp(2rem, 8vw, 4rem);
  line-height: 1;
}

.credit-positive {
  color: #15803d;
  font-weight: 800;
}

.credit-negative {
  color: #b91c1c;
  font-weight: 800;
}

.design-template-option {
  display: grid;
  gap: 8px;
  cursor: pointer;
}

.design-template-option input {
  width: auto;
  min-height: auto;
}

.account-design-modern .admin-card {
  border-radius: 28px;
  box-shadow: 0 28px 72px rgba(15, 23, 42, 0.14);
}

.account-design-modern .eyebrow {
  color: #2563eb;
}

.account-design-contrast .admin-card {
  border-width: 2px;
  background: rgba(255, 255, 255, 0.92);
}

.account-design-contrast .muted,
.account-design-contrast .form-note {
  color: #374151;
}

.account-design-custom .admin-card {
  border-style: dashed;
}

.account-design-custom fieldset {
  border-color: var(--accent);
}

.alert {
  margin: 16px 0;
  padding: 12px 14px;
  border-radius: 12px;
  font-weight: 650;
}

.alert-success {
  background: rgba(21, 128, 61, 0.12);
  color: #15803d;
}

.alert-error,
.form ul {
  background: rgba(185, 28, 28, 0.12);
  color: #b91c1c;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.module-card {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--panel);
}

.module-card h2 {
  margin: 0 0 10px;
}

.module-card p + p {
  margin-top: 10px;
}

.feature-list {
  margin: 24px 0 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.75;
}

.ad-slot {
  display: grid;
  gap: 14px;
  border-style: dashed;
}

.ad-slot-adsense {
  min-height: 120px;
}

.custom-banners {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.custom-banner {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  color: inherit;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.62);
}

.custom-banner img {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border-radius: 12px;
}

.code-block {
  overflow-x: auto;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #0f172a;
  color: #e5e7eb;
}

.calculator-shell {
  width: min(100%, 1120px);
  margin: 0 auto;
  padding: 32px 16px;
  display: grid;
  gap: 22px;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
}

.site-brand {
  font-weight: 900;
  color: var(--ink);
  text-decoration: none;
}

.site-user-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.site-user-nav a {
  color: var(--accent);
  font-weight: 750;
}

.calculator-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(320px, 1.15fr);
  gap: 22px;
}

.result-list {
  display: grid;
  gap: 12px;
  margin: 16px 0 22px;
}

.result-list div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
}

.result-list dt {
  color: var(--muted);
  font-weight: 750;
}

.result-list dd {
  margin: 0;
  font-weight: 900;
}

.cylinder-drawing {
  width: 100%;
  max-width: 680px;
  height: auto;
  background: #ffffff;
  border: 1px solid #d1d5db;
}

.cylinder-drawing text {
  fill: #111827;
}

.premium-calculator-box {
  border-color: rgba(37, 99, 235, 0.35);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.10), rgba(255, 255, 255, 0.9));
}

.form ul {
  margin: 0;
  padding: 10px 12px 10px 28px;
  border-radius: 12px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 850;
}

.status-active {
  background: #dcfce7;
  color: #14532d;
}

.status-blocked {
  background: #fee2e2;
  color: #7f1d1d;
}

.button-danger {
  background: #dc2626;
  color: #fff;
  border-color: #991b1b;
}

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