:root {
  --bg: #f8f7f4;
  --bg-soft: #efede8;
  --surface: #ffffff;
  --surface-soft: #fbfaf7;
  --line: #e5e1d8;
  --text: #1d2633;
  --muted: #6e7888;
  --heading: #111827;
  --teal: #2f8b83;
  --blue: #466fbc;
  --slate: #7f8fa8;
  --shadow: 0 8px 26px #1b20290f;
  --font-body: "Nunito Sans", "Segoe UI", sans-serif;
  --font-display: "Libre Baskerville", Georgia, serif;
  --font-numeric: "Nunito Sans", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(circle at 84% 10%, #b7c4d614, transparent 30%),
    radial-gradient(circle at 12% 80%, #2f8b830f, transparent 24%),
    linear-gradient(165deg, var(--bg), var(--bg-soft));
}

.page-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg, transparent 0 46%, #ffffff7d 46% 50%, transparent 50%);
}

.app-shell {
  width: min(1200px, 92vw);
  margin: 1.2rem auto 2.3rem;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1.05rem;
  position: relative;
  z-index: 1;
}

.hero,
.card {
  border: 1px solid var(--line);
  border-radius: 6px;
  background:
    linear-gradient(180deg, #ffffff 0%, #fcfaf6 100%);
  box-shadow:
    0 14px 28px #1b202914,
    0 2px 6px #1b20290a,
    inset 0 1px 0 #ffffff;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.hero > *,
.card > * {
  position: relative;
  z-index: 1;
}

.hero::before,
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(122deg, transparent 0 50%, #ffffffd4 50% 56%, transparent 56%),
    linear-gradient(180deg, #ffffffd9 0, #ffffff40 24%, transparent 38%);
  z-index: 0;
}

.hero::after,
.card::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 4px;
  border-radius: 6px 6px 0 0;
  pointer-events: none;
  background: linear-gradient(90deg, #d8e7fb, #f5f9ff 50%, #dbe9ff);
  z-index: 0;
}

.hero {
  grid-column: 1 / -1;
  padding: clamp(1.05rem, 2vw, 1.35rem) clamp(1rem, 2.4vw, 1.5rem);
}

.app-shell:not(.admin-shell) .hero {
  border-color: #1f3f63;
  background:
    linear-gradient(160deg, #143e66 0%, #0f3050 55%, #1c4f7c 100%);
  box-shadow:
    0 16px 32px #10253c33,
    inset 0 1px 0 #ffffff2a;
}

.app-shell:not(.admin-shell) .hero::before {
  background:
    linear-gradient(122deg, transparent 0 48%, #ffffff30 48% 54%, transparent 54%),
    linear-gradient(180deg, #ffffff2c 0, #ffffff14 26%, transparent 44%);
}

.app-shell:not(.admin-shell) .hero::after {
  background: linear-gradient(90deg, #7db0ea, #d3e7ff 50%, #8eb9ea);
}

.admin-shell .hero { margin-bottom: 0; }
.card { padding: 1.05rem 1.08rem; }

.brand-head {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.92rem;
}

.brand-image {
  width: clamp(82px, 11vw, 118px);
  min-width: 72px;
  height: auto;
  object-fit: contain;
  border: 1px solid #d9d2c7;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff, #f6f2ea);
  padding: 0.34rem;
  filter: drop-shadow(0 4px 10px #14284422);
}

.app-shell:not(.admin-shell) .brand-image {
  border-color: #7ea5cf66;
  background: linear-gradient(180deg, #f8fbff, #eaf2fb);
}

.brand-copy {
  min-width: 0;
}

.hero-top {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1.1rem;
}

.hero-intro {
  min-width: 0;
}

.hero-art {
  position: relative;
  width: min(230px, 26vw);
  min-height: 118px;
  border: 1px solid #7ea5cf4a;
  border-radius: 12px;
  background:
    linear-gradient(132deg, transparent 0 54%, #ffffff24 54% 60%, transparent 60%),
    linear-gradient(170deg, #ffffff21, #d8e7fb14);
  box-shadow: inset 0 1px 0 #ffffff42, 0 10px 20px #0e223734;
  padding: 0.62rem 0.58rem;
  display: grid;
  align-content: center;
  gap: 0.42rem;
  overflow: hidden;
}

.hero-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0 56%, #ffffff1e 56% 60%, transparent 60%);
  pointer-events: none;
}

.hero-spark {
  position: relative;
  z-index: 1;
  height: 92px;
  border: 1px solid #b5cdec4a;
  border-radius: 9px;
  background:
    repeating-linear-gradient(
      to top,
      #ffffff00 0,
      #ffffff00 15px,
      #cde0f619 15px,
      #cde0f619 16px
    ),
    radial-gradient(circle at 84% 16%, #ffffff2b 0, transparent 38%),
    linear-gradient(180deg, #ffffff14, #ffffff08);
  overflow: hidden;
  margin-top: 0.1rem;
}

.spark-line {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.spark-area {
  fill: url(#heroSparkFill);
}

.spark-curve {
  fill: none;
  stroke: #ebf6ff;
  stroke-width: 2.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 5px #10253e9a);
}

.spark-dot {
  fill: #deefff;
  stroke: #ffffffbf;
  stroke-width: 1.1;
}

.spark-dot-end {
  fill: #f6fbff;
  stroke: #d7ebff;
  stroke-width: 1.2;
}

.eyebrow {
  margin: 0;
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 800;
  color: #7c8ea8;
}

h1 {
  margin: 0.45rem 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: 0.01em;
  color: var(--heading);
}

.subtitle {
  margin: 0.72rem 0 0;
  color: var(--muted);
  max-width: 78ch;
  line-height: 1.55;
}

.app-shell:not(.admin-shell) .hero .eyebrow {
  color: #bbd7f4;
}

.app-shell:not(.admin-shell) .hero h1 {
  color: #f4f9ff;
}

.app-shell:not(.admin-shell) .hero .subtitle {
  color: #d3e4f6;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}

h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  line-height: 1.2;
  color: var(--heading);
}

.summary,
.chart,
.packages-card,
.banners-card,
.archive-card,
.contact-card { grid-column: 1 / -1; }

.contact-card { align-self: start; }

.summary-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}

.summary-text {
  margin: 0.34rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.pill {
  border-radius: 999px;
  border: 1px solid #d2dce9;
  background: #edf2f8;
  color: #4d627e;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.34rem 0.7rem;
  white-space: nowrap;
}

.metrics-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.metric-tile {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.9rem 3.9rem 0.9rem 0.9rem;
  background:
    linear-gradient(126deg, transparent 0 54%, #ffffffd1 54% 60%, transparent 60%),
    linear-gradient(170deg, #ffffff, var(--surface-soft));
  box-shadow: inset 0 1px 0 #ffffff, inset 0 -1px 0 #ebe3d7, 0 8px 16px #202b3a12;
  position: relative;
  overflow: hidden;
}

.metric-tile::before,
.info-card::before,
.admin-package-item::before,
.chart-wrapper::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, #ffffff, #ffffff60, transparent);
  pointer-events: none;
}

.metric-tile::after {
  content: "";
  position: absolute;
  right: 0.6rem;
  bottom: 0.52rem;
  width: 2.8rem;
  height: 2.8rem;
  opacity: 0.22;
  pointer-events: none;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.metric-unique::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234f6482' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='7.5' r='3.5'/%3E%3Cpath d='M5 20c0-3.9 3.1-6 7-6s7 2.1 7 6'/%3E%3C/svg%3E");
}

.metric-visits::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234f6482' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 19V9'/%3E%3Cpath d='M10 19V5'/%3E%3Cpath d='M16 19v-7'/%3E%3Cpath d='M22 19V3'/%3E%3C/svg%3E");
}

.metric-pageviews::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234f6482' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.5-6 10-6 10 6 10 6-3.5 6-10 6S2 12 2 12Z'/%3E%3Ccircle cx='12' cy='12' r='2.6'/%3E%3C/svg%3E");
}

.metric-tile p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.metric-tile strong {
  display: block;
  margin-top: 0.38rem;
  font-family: var(--font-numeric);
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  color: #263347;
}

.metric-tile:hover strong {
  color: #1d2d43;
}

.chart-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.chart-switch,
.chart-range {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  background: #f5f2ec;
  border: 1px solid #dfd8cc;
  border-radius: 4px;
  padding: 0.2rem;
}

.switch-btn {
  border: 1px solid #ddd4c5;
  background: linear-gradient(180deg, #ffffff, #f4eee3);
  color: #697382;
  padding: 0.34rem 0.6rem;
  border-radius: 3px;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: inset 0 1px 0 #ffffff, 0 1px 0 #d9d0c1;
  transition: transform 140ms ease, box-shadow 140ms ease, filter 140ms ease;
}

.switch-btn.is-active {
  color: #1f2b3c;
  background: linear-gradient(180deg, #dfe8f4, #bccada);
  border-color: #aab9cc;
  box-shadow: inset 0 1px 0 #f8fbff, 0 2px 0 #93a4b8;
}

.switch-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.01);
}

.switch-btn:active {
  transform: translateY(0);
}

.chart-meta {
  margin: 0 0 0.72rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.chart-wrapper {
  height: min(54vh, 490px);
  min-height: 380px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: linear-gradient(170deg, #ffffff, #f6f2ec);
  padding: 0.54rem;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 1px 0 #ffffff, inset 0 -1px 0 #ebe4d7, 0 10px 20px #1b223010;
}

#statsChart {
  display: block;
  width: 100%;
  height: 100%;
}

.soft-note,
.contact-copy,
.empty-packages {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

.contact-form {
  display: grid;
  gap: 1rem;
}

.contact-form label {
  gap: 0.5rem;
}

.contact-form .primary-btn {
  margin-top: 0.25rem;
  width: fit-content;
  background: linear-gradient(130deg, #2f6fb3, #1f4f84);
  box-shadow: inset 0 1px 0 #ffffff55, 0 2px 0 #163b63;
}

.table-wrap { margin-top: 0.65rem; overflow-x: auto; }

table { width: 100%; border-collapse: collapse; min-width: 520px; }

th,
td {
  padding: 0.62rem;
  text-align: left;
  border-bottom: 1px solid #ebe4d8;
  font-size: 0.83rem;
}

th { color: #384458; }
td { color: #687486; }

td:nth-child(n + 2),
.chart-meta,
.pill,
.status,
.info-card-price {
  font-family: var(--font-numeric);
  font-variant-numeric: tabular-nums;
}

.packages-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.banner-map {
  margin-top: 0.72rem;
  position: relative;
  border: 1px solid #d8d2c6;
  border-radius: 6px;
  overflow: hidden;
  background: linear-gradient(170deg, #f7f2e9, #eee5d6);
  box-shadow: inset 0 1px 0 #ffffff, 0 8px 18px #202b3a10;
}

.banner-map-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: 640px;
  object-fit: contain;
  background: linear-gradient(180deg, #f4efe6, #ece3d5);
}

.banner-legend {
  margin-top: 0.62rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
}

.banner-legend span {
  border: 1px solid #d8d2c6;
  border-radius: 999px;
  background: #f8f4ec;
  color: #566680;
  font-size: 0.73rem;
  font-weight: 700;
  padding: 0.24rem 0.52rem;
}

.banner-legend span:hover {
  background: #f1ebdf;
}

.info-card {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.9rem;
  background: linear-gradient(170deg, #ffffff, var(--surface-soft));
  box-shadow: inset 0 1px 0 #ffffff, inset 0 -1px 0 #ebe3d7, 0 8px 16px #202b3a12;
  position: relative;
  overflow: hidden;
  display: grid;
  align-content: start;
  gap: 0.42rem;
  min-height: 100%;
}

.info-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
}

.info-card-type {
  margin: 0;
  font-size: 0.71rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
  color: #7688a3;
}

.info-card-badge {
  border: 1px solid #c6d7ec;
  border-radius: 999px;
  background: linear-gradient(180deg, #eef4fb, #dce8f7);
  color: #4d6685;
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.16rem 0.42rem;
}

.info-card h3 { margin: 0.44rem 0 0; font-size: 1.02rem; }

.info-card-price {
  margin: 0.44rem 0 0;
  display: grid;
  gap: 0.16rem;
}

.price-main {
  color: #203753;
  font-size: 1.1rem;
  font-weight: 800;
}

.price-meta {
  color: #5f738e;
  font-size: 0.8rem;
  font-weight: 700;
}

.info-card-summary {
  margin: 0.46rem 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.info-card-list,
.admin-package-includes {
  margin: 0.58rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.33rem;
}

.info-card-list li,
.admin-package-includes li {
  position: relative;
  padding-left: 1.1rem;
  color: #49576b;
  font-size: 0.82rem;
}

.info-card-list li::before,
.admin-package-includes li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--teal);
  font-weight: 800;
}

.info-card-foot {
  margin-top: 0.56rem;
  padding-top: 0.56rem;
  border-top: 1px dashed #d6dfe9;
}

.info-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.34rem;
  border: 1px solid #c6d7ec;
  border-radius: 999px;
  padding: 0.24rem 0.58rem;
  color: #3d5879;
  background: #f3f8ff;
  font-size: 0.74rem;
  font-weight: 700;
  text-decoration: none;
}

.info-card-cta::after {
  content: "→";
  color: #2f6fb3;
}

.info-card-cta:hover {
  background: #e9f2ff;
  border-color: #b8cde7;
}

label {
  display: grid;
  gap: 0.38rem;
  color: var(--muted);
  font-size: 0.8rem;
}

input,
textarea {
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #ffffff;
  color: var(--text);
  padding: 0.62rem 0.66rem;
  font: inherit;
}

textarea {
  min-height: 94px;
  resize: vertical;
}

input:focus,
textarea:focus {
  outline: 2px solid #d4dfea;
  outline-offset: 1px;
}

.primary-btn,
.ghost-btn {
  border: 0;
  border-radius: 3px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.primary-btn {
  padding: 0.68rem 0.86rem;
  color: #f8fbff;
  background: linear-gradient(130deg, #4c82c5, #2f8b83);
  box-shadow: inset 0 1px 0 #ffffff50, 0 2px 0 #31608f;
  transition: transform 140ms ease, box-shadow 140ms ease, filter 140ms ease;
}

.ghost-btn {
  padding: 0.56rem 0.72rem;
  color: #55637a;
  border: 1px solid #ded5c8;
  background: #ffffff;
  box-shadow: inset 0 1px 0 #ffffff, 0 1px 0 #d8d1c5;
  transition: transform 140ms ease, box-shadow 140ms ease, filter 140ms ease;
}

.primary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.01);
}

.primary-btn:active,
.ghost-btn:active {
  transform: translateY(0);
}

.nav-link { text-decoration: none; display: inline-flex; align-items: center; }

.status {
  min-height: 1.2rem;
  margin: 0.66rem 0 0;
  font-size: 0.83rem;
  color: #5b6f8e;
}

.admin-toolbar {
  margin-top: 0.62rem;
  display: grid;
  grid-template-columns: 1.9fr minmax(220px, 1fr) minmax(220px, 1fr);
  gap: 0.7rem;
  align-items: stretch;
}

.admin-tool-panel,
.admin-tool-btn {
  border: 1px solid #dfd6c9;
  background: linear-gradient(170deg, #ffffff, #f8f4ed);
  box-shadow: inset 0 1px 0 #ffffff, 0 1px 0 #d8d1c5;
  min-height: 52px;
}

.admin-tool-panel {
  padding: 0.5rem 0.72rem 0.56rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.38rem;
}

.admin-tool-title {
  margin: 0;
  color: #5d6f86;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.metric-visibility {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.56rem;
  align-items: center;
}

.metric-visibility label {
  display: inline-flex;
  gap: 0.38rem;
  align-items: center;
  color: #43536a;
  font-size: 0.83rem;
  white-space: nowrap;
}

.metric-visibility input[type="checkbox"] {
  width: 0.94rem;
  height: 0.94rem;
  accent-color: #3a73bb;
}

.admin-tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.56rem 0.8rem;
  color: #465670;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.15;
}

.admin-tool-btn.ghost-btn {
  border: 1px solid #dfd6c9;
}

.file-inline input[type="file"] {
  font-size: 0.77rem;
  max-width: 138px;
}

.admin,
.login-card { grid-column: 1 / -1; }

.admin-form {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
}

.login-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.actions-inline { display: inline-flex; gap: 0.5rem; flex-wrap: wrap; }

.admin-divider {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 0.94rem 0;
}

.package-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.package-form label:last-of-type { grid-column: 1 / -1; }

.package-actions { display: inline-flex; flex-wrap: wrap; gap: 0.5rem; }

.packages-admin-list {
  display: grid;
  gap: 0.74rem;
  margin-top: 0.7rem;
}

.admin-package-item {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: linear-gradient(170deg, #ffffff, var(--surface-soft));
  padding: 0.82rem;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 1px 0 #ffffff, inset 0 -1px 0 #ebe3d7, 0 8px 16px #202b3a12;
}

.admin-package-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.56rem;
  flex-wrap: wrap;
}

.admin-package-top h3 { margin: 0; font-size: 0.96rem; }

.admin-package-top p,
.admin-package-summary {
  margin: 0.39rem 0 0;
  color: var(--muted);
  font-size: 0.83rem;
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.app-shell > .card,
.app-shell > .hero {
  animation: cardIn 360ms ease both;
}

@media (hover: hover) and (pointer: fine) {
  .card,
  .metric-tile,
  .info-card,
  .admin-package-item,
  .chart-wrapper {
    transition: transform 180ms ease, box-shadow 180ms ease;
  }

  .card:hover,
  .metric-tile:hover,
  .info-card:hover,
  .admin-package-item:hover,
  .chart-wrapper:hover {
    transform: translateY(-2px);
    box-shadow:
      0 18px 34px #1b202918,
      0 4px 10px #1b20290d,
      inset 0 1px 0 #ffffff;
  }
}

@media (max-width: 1080px) {
  .app-shell { width: min(1240px, 94vw); }

  .hero,
  .card { border-radius: 8px; }

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

  .chart-wrapper {
    min-height: 350px;
    height: min(53vh, 460px);
  }

  .admin-form,
  .login-form,
  .package-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .admin-toolbar { grid-template-columns: 1fr; }

  .admin-form .primary-btn,
  .login-form .primary-btn { grid-column: span 2; }
}

@media (max-width: 760px) {
  .app-shell {
    width: 95vw;
    margin: 0.9rem auto 1.6rem;
    gap: 0.82rem;
  }

  .hero,
  .card {
    border-radius: 10px;
    padding: 0.9rem 0.88rem;
  }

  .brand-head {
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 0.62rem;
  }

  .hero-top {
    grid-template-columns: 1fr;
    gap: 0.7rem;
  }

  .hero-art {
    display: none;
  }

  .brand-copy h1 {
    margin-top: 0.12rem;
    font-size: clamp(1.35rem, 6vw, 1.84rem);
    line-height: 1.17;
  }

  .brand-image {
    width: min(28vw, 96px);
    min-width: 0;
    padding: 0.22rem;
    border-radius: 8px;
  }

  .subtitle {
    margin-top: 0.62rem;
    font-size: 0.92rem;
    line-height: 1.5;
  }

  .summary-head,
  .section-head,
  .chart-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .chart-controls {
    width: 100%;
  }

  .chart-switch,
  .chart-range {
    width: 100%;
    justify-content: space-between;
  }

  .switch-btn {
    flex: 1;
    text-align: center;
    font-size: 0.74rem;
    padding: 0.34rem 0.45rem;
  }

  .metrics-strip,
  .packages-grid,
  .admin-form,
  .login-form,
  .package-form { grid-template-columns: 1fr; }

  .admin-toolbar { grid-template-columns: 1fr; }

  .admin-tool-btn {
    justify-content: space-between;
    padding-inline: 0.72rem;
  }

  .file-inline input[type="file"] {
    max-width: 120px;
  }

  .chart-wrapper {
    min-height: 340px;
    height: min(58vh, 430px);
  }

  .metric-tile {
    padding-right: 3.2rem;
  }

  .metric-tile::after {
    width: 2.45rem;
    height: 2.45rem;
  }

  .banner-legend span {
    font-size: 0.7rem;
    padding: 0.2rem 0.45rem;
  }

  .contact-form .primary-btn,
  .package-actions .primary-btn,
  .package-actions .ghost-btn,
  .actions-inline .ghost-btn {
    width: 100%;
    justify-content: center;
  }

  .package-actions,
  .actions-inline {
    width: 100%;
  }

  .admin-form .primary-btn,
  .login-form .primary-btn { grid-column: auto; }
}

@media (max-width: 440px) {
  .chart-wrapper {
    min-height: 310px;
    height: min(54vh, 370px);
  }

  .switch-btn {
    font-size: 0.72rem;
    padding: 0.32rem 0.34rem;
  }
}

@media (min-width: 1100px) {
  .banners-card {
    grid-column: span 8;
  }

  .contact-card {
    grid-column: span 4;
    align-self: start;
    position: sticky;
    top: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
