/* Sunpal dealer portal */
:root {
  --d-green: #1f8a4c;
  --d-green-dark: #166b3a;
  --d-ink: #14231a;
  --d-muted: #5c6b62;
  --d-line: #dce5df;
  --d-bg: #f3f7f4;
  --d-wa: #25d366;
}
* { box-sizing: border-box; }
body.dealer-body {
  margin: 0;
  min-height: 100vh;
  font-family: Sora, system-ui, sans-serif;
  color: var(--d-ink);
  background:
    radial-gradient(ellipse 70% 40% at 90% 0%, rgba(31,138,76,.1), transparent),
    linear-gradient(180deg, #eef6f1, var(--d-bg) 45%, #f8faf8);
}
.dealer-top { border-bottom: 1px solid var(--d-line); background: rgba(255,255,255,.88); backdrop-filter: blur(8px); }
.dealer-top-inner { max-width: 960px; margin: 0 auto; padding: .85rem 1rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.dealer-brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--d-ink); font-weight: 700; }
.dealer-brand img { height: 28px; width: auto; }
.dealer-nav { display: flex; gap: .35rem; flex-wrap: wrap; align-items: center; }
.dealer-nav a, .dealer-nav .linkish {
  text-decoration: none; color: var(--d-muted); font: 600 13px/1 Sora, system-ui, sans-serif;
  padding: .55rem .85rem; border-radius: 999px; border: 0; background: transparent; cursor: pointer;
}
.dealer-nav a:hover, .dealer-nav a.active, .dealer-nav .linkish:hover { color: var(--d-green-dark); background: #e8f6ee; }
.dealer-main { max-width: 960px; margin: 0 auto; padding: 1.75rem 1rem 3rem; }
.dealer-hero { margin-bottom: 1.35rem; }
.dealer-eyebrow { margin: 0 0 .35rem; color: var(--d-green); font: 700 12px/1.3 Sora, system-ui, sans-serif; letter-spacing: .08em; text-transform: uppercase; }
.dealer-hero h1 { margin: 0 0 .4rem; font-size: clamp(1.5rem, 3.5vw, 2rem); letter-spacing: -.02em; }
.dealer-hero p { margin: 0; color: var(--d-muted); }
.dealer-muted { color: var(--d-muted); font-size: .92rem; }
.dealer-notice { border-radius: 12px; padding: .9rem 1rem; margin: 0 0 1rem; }
.dealer-notice--ok { background: #e8f6ee; color: #145c34; }
.dealer-notice--err { background: #fdecea; color: #8a1f11; }
.dealer-notice--info { background: #eef3f0; color: #314038; }
.dealer-notice ul { margin: 0; padding-left: 1.1rem; }
.dealer-form {
  display: grid; gap: .75rem; max-width: 420px; margin: 0 0 1rem;
  padding: 1.1rem 1.15rem; border: 1px solid var(--d-line); border-radius: 14px; background: #fff;
}
.dealer-form--wide { max-width: 640px; }
.dealer-form fieldset { border: 1px solid var(--d-line); border-radius: 12px; padding: .85rem; margin: 0; }
.dealer-form legend { padding: 0 .35rem; font-weight: 700; color: var(--d-green-dark); }
.dealer-form label { display: block; font: 600 13px/1.3 Sora, system-ui, sans-serif; }
.dealer-form input, .dealer-form select, .dealer-form textarea {
  display: block; width: 100%; margin-top: .35rem; padding: .65rem .75rem;
  border: 1px solid var(--d-line); border-radius: 10px; font: inherit;
}
.dealer-form button, .dealer-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0 1.1rem;
  border: 0; border-radius: 999px; background: var(--d-green); color: #fff;
  font: 700 13px/1 Sora, system-ui, sans-serif; text-decoration: none; cursor: pointer;
}
.dealer-btn--ghost { background: #fff; color: var(--d-ink); border: 1px solid var(--d-line); }
.dealer-btn--wa { background: var(--d-wa); }
.dealer-check { display: flex !important; align-items: center; gap: .5rem; font-weight: 500 !important; }
.dealer-check input { width: auto; margin: 0; }
.dealer-hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.dealer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.dealer-card { border: 1px solid var(--d-line); border-radius: 16px; background: #fff; padding: 1rem 1.1rem; box-shadow: 0 8px 24px rgba(20,35,26,.04); margin-bottom: 1rem; }
.dealer-card h2 { margin: 0 0 .55rem; font-size: 1.05rem; }
.dealer-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.dealer-copy, .dealer-pre {
  width: 100%; margin: 0 0 .75rem; padding: .75rem; border-radius: 10px; border: 1px solid var(--d-line);
  background: var(--d-bg); font: 13px/1.45 ui-monospace, monospace; white-space: pre-wrap;
}
@media (max-width: 640px) {
  .dealer-form, .dealer-form--wide { max-width: none; }
}

.dealer-order-card { max-width: 560px; }
.dealer-order-form { display: grid; gap: 1rem; margin-top: .75rem; }
.dealer-order-form label span { display: block; font: 600 13px/1.3 Sora, system-ui, sans-serif; margin-bottom: .35rem; }
.dealer-order-form input[type="number"] {
  width: 100%; max-width: 160px; padding: .65rem .75rem;
  border: 1px solid var(--d-line); border-radius: 10px; font: inherit;
}
.dealer-order-totals {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem;
  margin: 0; padding: .85rem 0; border-top: 1px solid var(--d-line); border-bottom: 1px solid var(--d-line);
}
.dealer-order-totals dt { margin: 0; font-size: .78rem; color: var(--d-muted); }
.dealer-order-totals dd { margin: .2rem 0 0; font-size: 1.15rem; font-weight: 700; }
@media (max-width: 640px) {
  .dealer-order-totals { grid-template-columns: 1fr; }
}
