/* =========================================================
   Arman Ice Cream — Design System
   ========================================================= */

@import url("https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&family=IBM+Plex+Mono:wght@400;500;600&display=swap");

:root {
  --scoop-blue: #0090d1;
  --scoop-blue-dark: #0077ad;
  --frost-sky: #e8f6fc;
  --berry-accent: #e31e24;
  --berry-dark: #c4181d;
  --vanilla-cream: #fff8f0;
  --cocoa-ink: #2a2430;
  --mint-fresh: #3dbe8b;
  --white: #ffffff;
  --muted: #6b6470;
  --border: #d8e8f0;
  --shadow-sm: 0 2px 8px rgba(42, 36, 48, 0.06);
  --shadow-md: 0 8px 28px rgba(0, 144, 209, 0.12);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "DM Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --container: 1120px;
  --header-h: 72px;
  --focus-ring: 0 0 0 3px rgba(0, 144, 209, 0.35);
  --transition: 180ms ease;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--cocoa-ink);
  background: var(--vanilla-cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--scoop-blue-dark);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--berry-accent);
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  line-height: 1.2;
  margin: 0 0 0.6em;
  font-weight: 600;
}

p {
  margin: 0 0 1rem;
}

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

.section {
  padding: 4rem 0;
}

.section--frost {
  background: var(--frost-sky);
}

.section--ink {
  background: var(--cocoa-ink);
  color: var(--white);
}

.section--ink a {
  color: #9fd8f5;
}

.section__eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--scoop-blue);
  margin-bottom: 0.75rem;
}

.section__title {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  max-width: 18ch;
}

.section__lead {
  color: var(--muted);
  max-width: 52ch;
  font-size: 1.05rem;
}

.section--ink .section__lead,
.section--ink .section__eyebrow {
  color: rgba(255, 255, 255, 0.75);
}

.section-head {
  margin-bottom: 2.5rem;
}

/* ---- Motifs ---- */
.scoop-divider {
  height: 28px;
  background:
    radial-gradient(circle at 12px 0, transparent 11px, var(--frost-sky) 12px) repeat-x,
    var(--vanilla-cream);
  background-size: 24px 28px, 100% 100%;
  background-position: 0 100%, 0 0;
  margin-top: -1px;
}

.scoop-divider--invert {
  background:
    radial-gradient(circle at 12px 28px, transparent 11px, var(--vanilla-cream) 12px) repeat-x,
    var(--frost-sky);
  background-size: 24px 28px, 100% 100%;
  background-position: 0 0, 0 0;
}

.scallop-edge {
  position: relative;
}

.scallop-edge::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -14px;
  height: 28px;
  background: radial-gradient(circle at 14px 0, currentColor 12px, transparent 13px) repeat-x;
  background-size: 28px 28px;
  color: inherit;
  pointer-events: none;
}

.swirl-mark {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 3px solid var(--scoop-blue);
  position: relative;
  display: inline-block;
}

.swirl-mark::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 3px solid transparent;
  border-top-color: var(--berry-accent);
  border-radius: 50%;
  transform: rotate(-25deg);
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.4rem;
  border-radius: var(--radius-pill);
  border: 2px solid transparent;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition),
    transform var(--transition);
  text-decoration: none;
  min-height: 44px;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn--primary {
  background: var(--scoop-blue);
  color: var(--white);
}

.btn--primary:hover {
  background: var(--scoop-blue-dark);
  color: var(--white);
}

.btn--accent {
  background: var(--berry-accent);
  color: var(--white);
}

.btn--accent:hover {
  background: var(--berry-dark);
  color: var(--white);
}

.btn--ghost {
  background: transparent;
  border-color: var(--scoop-blue);
  color: var(--scoop-blue-dark);
}

.btn--ghost:hover {
  background: var(--frost-sky);
  color: var(--scoop-blue-dark);
}

.btn--light {
  background: var(--white);
  color: var(--scoop-blue-dark);
}

.btn--sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  min-height: 40px;
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ---- Header / Nav ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 248, 240, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: 1rem;
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--cocoa-ink);
  font-weight: 700;
  flex-shrink: 0;
}

.nav__brand:hover {
  color: var(--cocoa-ink);
}

.nav__logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 50%;
  background: var(--white);
}

.nav__brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.nav__brand-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.nav__brand-tag {
  font-size: 0.7rem;
  color: var(--scoop-blue);
  font-weight: 500;
}

.nav__toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  cursor: pointer;
}

.nav__toggle-bar {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--cocoa-ink);
  position: relative;
}

.nav__toggle-bar::before,
.nav__toggle-bar::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: var(--cocoa-ink);
}

.nav__toggle-bar::before {
  top: -6px;
}

.nav__toggle-bar::after {
  top: 6px;
}

.nav__menu {
  display: none;
  position: absolute;
  top: var(--header-h);
  left: 0;
  right: 0;
  background: var(--vanilla-cream);
  border-bottom: 1px solid var(--border);
  padding: 1rem;
  flex-direction: column;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
}

.nav__menu.is-open {
  display: flex;
}

.nav__link {
  display: block;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  color: var(--cocoa-ink);
  font-weight: 500;
}

.nav__link:hover,
.nav__link.is-active {
  background: var(--frost-sky);
  color: var(--scoop-blue-dark);
}

@media (min-width: 900px) {
  .nav__toggle {
    display: none;
  }

  .nav__menu {
    display: flex;
    position: static;
    flex-direction: row;
    background: transparent;
    border: 0;
    padding: 0;
    gap: 0.15rem;
    align-items: center;
  }

  .nav__link {
    padding: 0.5rem 0.75rem;
    font-size: 0.92rem;
  }
}

/* ---- Hero ---- */
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100dvh - var(--header-h));
  display: grid;
  align-items: end;
  background:
    linear-gradient(180deg, rgba(42, 36, 48, 0.15) 0%, rgba(42, 36, 48, 0.72) 100%),
    linear-gradient(135deg, #0090d1 0%, #3dbe8b 45%, #e8f6fc 100%);
  color: var(--white);
  overflow: hidden;
}

.hero--with-image {
  background:
    linear-gradient(180deg, rgba(42, 36, 48, 0.25) 0%, rgba(42, 36, 48, 0.78) 100%),
    url("../../photos/photo_2026-07-26_12-03-50.jpg") center / cover no-repeat;
}

.hero__inner {
  padding: 4rem 0 5rem;
  max-width: 40rem;
}

.hero__brand {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 8vw, 4.5rem);
  margin: 0 0 0.4rem;
  letter-spacing: -0.02em;
}

.hero__slogan {
  font-size: clamp(1.15rem, 2.5vw, 1.45rem);
  font-weight: 500;
  margin-bottom: 0.75rem;
  max-width: 28ch;
}

.hero__text {
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 1.75rem;
  max-width: 42ch;
}

/* ---- Cards / grids ---- */
.grid {
  display: grid;
  gap: 1.5rem;
}

.grid--2 {
  grid-template-columns: 1fr;
}

.grid--3 {
  grid-template-columns: 1fr;
}

.grid--4 {
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .grid--2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .grid--4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

.card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(216, 232, 240, 0.8);
  transition: box-shadow var(--transition), transform var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card__media {
  aspect-ratio: 4 / 5;
  background: linear-gradient(145deg, var(--frost-sky), #b8e4f5);
  position: relative;
  overflow: hidden;
}

.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card__body {
  padding: 1.15rem 1.25rem 1.35rem;
}

.card__title {
  font-size: 1.15rem;
  margin-bottom: 0.25rem;
}

.card__meta {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--scoop-blue);
  margin-bottom: 0.5rem;
}

.card__text {
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 0.75rem;
}

.card__price {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--cocoa-ink);
}

/* Placeholders */
.ph {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  height: 100%;
  min-height: 160px;
  background: linear-gradient(145deg, #7ec8e8, #0090d1 55%, #3dbe8b);
  color: var(--white);
  text-align: center;
  padding: 1rem;
}

.ph__icon {
  font-size: 2rem;
  line-height: 1;
  opacity: 0.9;
}

.ph__label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.95;
}

.ph--factory {
  background: linear-gradient(145deg, #5a6d7a, #2a2430);
}

.ph--team {
  background: linear-gradient(145deg, #3dbe8b, #0090d1);
}

.ph--vehicle {
  background: linear-gradient(145deg, #e31e24, #0090d1);
}

.ph--cert {
  background: linear-gradient(145deg, #d4af37, #0090d1);
}

/* Stats */
.stat {
  text-align: center;
  padding: 1.5rem 1rem;
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.stat__value {
  font-family: var(--font-mono);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 600;
  color: var(--scoop-blue);
  display: block;
}

.stat__label {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0.35rem;
}

/* Process / distribution chain */
.chain {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .chain {
    grid-template-columns: repeat(5, 1fr);
    align-items: stretch;
  }
}

.chain__step {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  text-align: center;
  border: 1px solid var(--border);
  position: relative;
}

.chain__num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--scoop-blue);
  color: var(--white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.chain__title {
  font-size: 1rem;
  margin-bottom: 0.35rem;
}

.chain__text {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
}

/* Timeline */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 3px solid var(--scoop-blue);
}

.timeline__item {
  padding: 0 0 2rem 1.5rem;
  position: relative;
}

.timeline__item::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 0.35rem;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--berry-accent);
  border: 2px solid var(--white);
  box-shadow: 0 0 0 2px var(--scoop-blue);
}

.timeline__year {
  font-family: var(--font-mono);
  color: var(--scoop-blue);
  font-weight: 600;
  font-size: 0.9rem;
}

/* Filters */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
}

.filter-btn {
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--cocoa-ink);
  border-radius: var(--radius-pill);
  padding: 0.55rem 1rem;
  font-family: var(--font-body);
  font-weight: 500;
  cursor: pointer;
  min-height: 40px;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.filter-btn:hover,
.filter-btn.is-active {
  background: var(--scoop-blue);
  border-color: var(--scoop-blue);
  color: var(--white);
}

.hidden {
  display: none !important;
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (min-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.gallery-item {
  border: 0;
  padding: 0;
  cursor: pointer;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 1;
  background: var(--frost-sky);
  position: relative;
}

.gallery-item img,
.gallery-item .ph {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-item__cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.5rem 0.75rem;
  background: linear-gradient(transparent, rgba(42, 36, 48, 0.75));
  color: var(--white);
  font-size: 0.8rem;
  text-align: left;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(42, 36, 48, 0.88);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.lightbox.is-open {
  display: flex;
}

.lightbox__panel {
  max-width: min(90vw, 800px);
  max-height: 90vh;
  position: relative;
}

.lightbox__panel img {
  max-height: 80vh;
  width: auto;
  margin: 0 auto;
  border-radius: var(--radius-md);
}

.lightbox__close {
  position: absolute;
  top: -2.5rem;
  right: 0;
  background: transparent;
  border: 0;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
}

.lightbox__caption {
  color: rgba(255, 255, 255, 0.9);
  text-align: center;
  margin-top: 0.75rem;
}

/* Forms */
.form {
  display: grid;
  gap: 1rem;
}

.form__row {
  display: grid;
  gap: 1rem;
}

@media (min-width: 640px) {
  .form__row--2 {
    grid-template-columns: 1fr 1fr;
  }
}

.form__group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form__label {
  font-weight: 600;
  font-size: 0.9rem;
}

.form__input,
.form__textarea,
.form__select {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 1rem;
  background: var(--white);
  color: var(--cocoa-ink);
  min-height: 44px;
}

.form__textarea {
  min-height: 120px;
  resize: vertical;
}

.form__input:focus,
.form__textarea:focus,
.form__select:focus {
  border-color: var(--scoop-blue);
}

.form__error {
  color: var(--berry-accent);
  font-size: 0.85rem;
  display: none;
}

.form__group.has-error .form__error {
  display: block;
}

.form__group.has-error .form__input,
.form__group.has-error .form__textarea {
  border-color: var(--berry-accent);
}

.form-success {
  display: none;
  background: rgba(61, 190, 139, 0.12);
  border: 1px solid var(--mint-fresh);
  color: #1f7a55;
  padding: 1.25rem;
  border-radius: var(--radius-md);
}

.form-success.is-visible {
  display: block;
}

.contact-panel {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.contact-list {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
}

.contact-list li {
  margin-bottom: 0.75rem;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-pill);
  background: var(--frost-sky);
  color: var(--scoop-blue-dark);
  font-weight: 500;
}

/* Values / feature blocks */
.feature {
  padding: 1.5rem;
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.feature__icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--frost-sky);
  color: var(--scoop-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 0.85rem;
}

/* Partners */
.partner {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100px;
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px dashed var(--border);
  padding: 1rem;
  text-align: center;
  font-weight: 600;
  color: var(--muted);
}

/* Certificate badges */
.cert-card {
  text-align: center;
  padding: 1.75rem 1.25rem;
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.cert-card__badge {
  width: 88px;
  height: 88px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #f5e6a8, #0090d1);
  color: var(--white);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
}

/* Page banner */
.page-banner {
  background:
    linear-gradient(135deg, rgba(0, 144, 209, 0.92), rgba(61, 190, 139, 0.85)),
    var(--scoop-blue);
  color: var(--white);
  padding: 3.5rem 0 3rem;
}

.page-banner h1 {
  margin-bottom: 0.5rem;
  font-size: clamp(2rem, 4vw, 2.75rem);
}

.page-banner p {
  margin: 0;
  max-width: 48ch;
  opacity: 0.92;
}

/* CTA band */
.cta-band {
  background: linear-gradient(120deg, var(--scoop-blue), #0077ad 50%, #2a9a6e);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
  justify-content: space-between;
}

.cta-band h2 {
  margin: 0 0 0.4rem;
}

.cta-band p {
  margin: 0;
  opacity: 0.9;
  max-width: 40ch;
}

/* Footer */
.site-footer {
  background: var(--cocoa-ink);
  color: rgba(255, 255, 255, 0.85);
  padding: 3.5rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
  margin-bottom: 2.5rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
  }
}

.site-footer a {
  color: rgba(255, 255, 255, 0.8);
}

.site-footer a:hover {
  color: #9fd8f5;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  color: var(--white);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
}

.footer-brand img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--white);
  object-fit: contain;
}

.footer-title {
  color: var(--white);
  font-size: 1rem;
  margin-bottom: 0.85rem;
  font-family: var(--font-body);
  font-weight: 600;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links li {
  margin-bottom: 0.45rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  background: var(--cocoa-ink);
  color: var(--white);
  padding: 0.85rem 1.15rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  z-index: 300;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity var(--transition), transform var(--transition);
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast--success {
  background: #1f7a55;
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--white);
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.data-table th,
.data-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.data-table th {
  background: var(--frost-sky);
  font-weight: 600;
  white-space: nowrap;
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.data-table img.thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 8px;
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--frost-sky);
  color: var(--scoop-blue-dark);
}

.badge--mint {
  background: rgba(61, 190, 139, 0.15);
  color: #1f7a55;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* Admin shell */
.admin-body {
  background: #f3f7fa;
  min-height: 100vh;
}

.admin-shell {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 100vh;
}

.admin-sidebar {
  background: var(--cocoa-ink);
  color: var(--white);
  padding: 1.25rem;
  display: none;
}

.admin-sidebar.is-open {
  display: block;
  position: fixed;
  inset: 0 auto 0 0;
  width: min(280px, 86vw);
  z-index: 80;
  height: 100vh;
  overflow: auto;
  box-shadow: var(--shadow-md);
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--white);
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.admin-brand img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--white);
  object-fit: contain;
}

.admin-nav {
  list-style: none;
  margin: 0;
  padding: 0;
}

.admin-nav a {
  display: block;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-sm);
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 0.2rem;
}

.admin-nav a:hover,
.admin-nav a.is-active {
  background: rgba(0, 144, 209, 0.25);
  color: var(--white);
}

.admin-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.admin-topbar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 50;
}

.admin-content {
  padding: 1.5rem 1.25rem 2.5rem;
}

.admin-page-title {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.admin-page-sub {
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.kpi-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  margin-bottom: 1.75rem;
}

@media (min-width: 640px) {
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .admin-shell {
    grid-template-columns: 240px 1fr;
  }

  .admin-sidebar {
    display: block;
    position: sticky;
    top: 0;
    height: 100vh;
  }

  .admin-menu-toggle {
    display: none !important;
  }

  .kpi-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

.kpi-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.kpi-card__label {
  color: var(--muted);
  font-size: 0.85rem;
}

.kpi-card__value {
  font-family: var(--font-mono);
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--scoop-blue);
  margin-top: 0.35rem;
}

.panel {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.panel__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.panel__title {
  font-size: 1.1rem;
  margin: 0;
  font-family: var(--font-body);
  font-weight: 600;
}

/* Login */
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background:
    radial-gradient(circle at 20% 20%, rgba(0, 144, 209, 0.2), transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(61, 190, 139, 0.2), transparent 40%),
    var(--vanilla-cream);
}

.login-card {
  width: min(100%, 400px);
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

.login-card__logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: var(--frost-sky);
}

.login-card h1 {
  text-align: center;
  font-size: 1.5rem;
}

.login-card p {
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(42, 36, 48, 0.55);
  z-index: 250;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-backdrop.is-open {
  display: flex;
}

.modal {
  background: var(--white);
  border-radius: var(--radius-md);
  width: min(100%, 520px);
  max-height: 90vh;
  overflow: auto;
  padding: 1.5rem;
}

.modal__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.modal__head h3 {
  margin: 0;
  font-size: 1.15rem;
}

.icon-btn {
  background: transparent;
  border: 0;
  font-size: 1.25rem;
  cursor: pointer;
  min-width: 40px;
  min-height: 40px;
  border-radius: var(--radius-sm);
}

.split-2 {
  display: grid;
  gap: 2rem;
}

@media (min-width: 900px) {
  .split-2 {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

/* Distributors map + list */
.distributor-layout {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 960px) {
  .distributor-layout {
    grid-template-columns: 1.15fr 1fr;
    align-items: start;
  }
}

.distributor-map-wrap {
  position: sticky;
  top: calc(var(--header-h) + 0.75rem);
}

.distributor-map {
  height: min(70vh, 560px);
  min-height: 320px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--frost-sky);
  z-index: 1;
}

.map-hint {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0.5rem 0 0;
}

.distributor-count {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--scoop-blue);
  margin: 0 0 0.75rem;
}

.distributor-list {
  display: grid;
  gap: 0.75rem;
  max-height: min(70vh, 560px);
  overflow: auto;
  padding-right: 0.25rem;
}

.distributor-card {
  text-align: left;
  width: 100%;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem;
  cursor: pointer;
  font-family: var(--font-body);
  color: var(--cocoa-ink);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.distributor-card:hover,
.distributor-card.is-active {
  border-color: var(--scoop-blue);
  box-shadow: var(--shadow-sm);
}

.distributor-card__name {
  font-weight: 700;
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

.distributor-card__meta {
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0 0 0.25rem;
}

.distributor-card__gps {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--scoop-blue);
  margin: 0.4rem 0 0;
}

.leaflet-popup-content {
  font-family: var(--font-body);
  margin: 0.6rem 0.75rem;
}

.leaflet-popup-content strong {
  display: block;
  margin-bottom: 0.25rem;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .btn:hover,
  .card:hover {
    transform: none;
  }
}
