:root {
  --navy: #0c2c64;
  --navy-deep: #061c43;
  --blue-soft: #eef4fc;
  --line: #dce4ef;
  --gold: #b58a30;
  --paper: #f5f7fb;
  --ink: #172238;
  --muted: #66738a;
  --danger: #a23a31;
  --white: #fff;
  --display: "Cormorant Garamond", Georgia, serif;
  --sans: "Montserrat", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { color-scheme: light; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
}
button,
input,
select,
textarea { font: inherit; }
button,
a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px clamp(18px, 3vw, 42px);
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.96);
  box-shadow: 0 4px 22px rgba(7, 33, 78, .06);
  backdrop-filter: blur(16px);
}
.admin-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--navy-deep);
}
.admin-brand img { width: 42px; height: 42px; object-fit: contain; }
.admin-brand span { display: grid; gap: 2px; }
.admin-brand b {
  font-family: var(--display);
  font-size: 22px;
  letter-spacing: .16em;
  line-height: 1;
  text-transform: uppercase;
}
.admin-brand small {
  color: var(--gold);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
}
.top-actions { display: flex; align-items: center; gap: 10px; }
.save-state {
  margin-right: 8px;
  color: var(--muted);
  font-size: 11px;
}
.save-state.is-unsaved { color: #946b16; }
.save-state.is-error { color: var(--danger); }

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 17px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--white);
  color: var(--navy);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .09em;
  line-height: 1;
  text-transform: uppercase;
  transition: border-color .2s, background .2s, color .2s, transform .2s;
}
.button:hover { border-color: var(--gold); transform: translateY(-1px); }
.button:disabled { cursor: wait; opacity: .55; transform: none; }
.button--primary {
  border-color: var(--navy);
  background: var(--navy);
  color: white;
}
.button--primary:hover { border-color: var(--gold); background: var(--navy-deep); }
.button--ghost { background: transparent; }
.button--danger-text {
  border-color: transparent;
  background: transparent;
  color: var(--danger);
}

.admin-shell {
  display: grid;
  min-height: calc(100vh - 78px);
  grid-template-columns: minmax(310px, 380px) minmax(0, 1fr);
}
.catalog-panel {
  position: sticky;
  top: 78px;
  height: calc(100vh - 78px);
  overflow-y: auto;
  padding: 28px 20px;
  border-right: 1px solid var(--line);
  background: #fbfcfe;
}
.workspace-tabs {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3px;
  margin-bottom: 24px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #f0f4f9;
}
.workspace-tab {
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  padding: 0 12px;
  text-align: left;
  text-transform: uppercase;
}
.workspace-tab span {
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  padding: 0 5px;
  border-radius: 10px;
  background: #dce5f0;
  color: var(--navy);
  font-size: 8px;
}
.workspace-tab:hover { color: var(--navy); }
.workspace-tab.is-active {
  background: white;
  color: var(--navy);
  box-shadow: 0 2px 8px rgba(17,43,82,.08);
}
.workspace-tab.is-active span { background: var(--navy); color: white; }
.catalog-heading { display: flex; align-items: flex-end; justify-content: space-between; }
.eyebrow {
  margin: 0 0 7px;
  color: var(--gold);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
}
.catalog-heading h1 {
  margin: 0 0 18px;
  color: var(--navy-deep);
  font-family: var(--display);
  font-size: 31px;
  font-weight: 600;
}
.catalog-heading h1 span {
  display: inline-grid;
  min-width: 27px;
  height: 27px;
  place-items: center;
  margin-left: 5px;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--navy);
  font-family: var(--sans);
  font-size: 10px;
}
.search-field {
  position: relative;
  display: block;
  margin-bottom: 16px;
}
.search-field svg {
  position: absolute;
  top: 50%;
  left: 13px;
  width: 17px;
  height: 17px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.6;
  transform: translateY(-50%);
}
.search-field input {
  width: 100%;
  height: 43px;
  padding: 0 13px 0 39px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: white;
  color: var(--ink);
  font-size: 12px;
  outline: none;
}
.search-field input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(181,138,48,.1); }
.product-list { display: grid; gap: 6px; }
.product-row {
  display: grid;
  width: 100%;
  grid-template-columns: 48px minmax(0,1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 9px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  transition: border-color .2s, background .2s;
}
.product-row:hover { border-color: var(--line); background: white; }
.product-row.is-active { border-color: #bfcfdf; background: white; box-shadow: 0 5px 16px rgba(10,35,76,.06); }
.product-row img {
  width: 48px;
  height: 48px;
  border-radius: 3px;
  background: var(--blue-soft);
  object-fit: cover;
}
.product-row-copy { min-width: 0; display: grid; gap: 4px; }
.product-row-copy b {
  overflow: hidden;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.product-row-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: .05em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.product-row-mark {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #d2d9e5;
}
.product-row-mark.is-sold { background: var(--gold); }
.client-avatar {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, #eaf1fa, #dce7f5);
  color: var(--navy);
  font-family: var(--display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: .03em;
}
.client-status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #9bb0ca;
}
.client-status[data-status="contacted"] { background: #4f83c4; }
.client-status[data-status="follow-up"] { background: #c28b24; }
.client-status[data-status="reserved"] { background: #7b61b4; }
.client-status[data-status="purchased"] { background: #3f8d69; }
.client-status[data-status="archived"] { background: #8a94a5; }
.client-form .empty-mark { text-transform: uppercase; }

.editor-panel { min-width: 0; padding: clamp(26px, 4vw, 54px); }
.editor-empty {
  display: grid;
  min-height: 65vh;
  place-items: center;
  align-content: center;
  color: var(--muted);
  text-align: center;
}
.empty-mark {
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  margin-bottom: 20px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--navy);
  font-family: var(--display);
  font-size: 28px;
  letter-spacing: .15em;
}
.editor-empty h2 {
  margin: 0 0 8px;
  color: var(--navy-deep);
  font-family: var(--display);
  font-size: 30px;
}
.editor-empty p { margin: 0 0 22px; font-size: 12px; }
.product-form { max-width: 1120px; margin: 0 auto; padding-bottom: 90px; }
.editor-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}
.editor-header-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}
.editor-header h2 {
  margin: 0;
  color: var(--navy-deep);
  font-family: var(--display);
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 600;
  line-height: 1;
}
.form-card {
  margin-bottom: 18px;
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid var(--line);
  border-radius: 5px;
  background: white;
  box-shadow: 0 9px 30px rgba(18,43,79,.035);
}
.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid #edf0f5;
}
.section-heading > div { display: flex; align-items: center; gap: 12px; }
.section-heading > div > span {
  color: var(--gold);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .12em;
}
.section-heading h3 {
  margin: 0;
  color: var(--navy-deep);
  font-family: var(--display);
  font-size: 24px;
  font-weight: 600;
}
.section-heading p {
  max-width: 370px;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
  text-align: right;
}
.field-grid { display: grid; gap: 18px; }
.field-grid--2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.field--wide { grid-column: 1 / -1; }
.field { display: grid; align-content: start; gap: 7px; }
.field > span {
  color: #40506a;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.field small { color: var(--muted); font-size: 9px; }
.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #fcfdff;
  color: var(--ink);
  font-size: 12px;
  outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.field input,
.field select { height: 44px; padding: 0 13px; }
.field textarea { min-height: 120px; padding: 12px 13px; line-height: 1.6; resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--gold);
  background: white;
  box-shadow: 0 0 0 3px rgba(181,138,48,.1);
}
.toggle-field {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: #40506a;
  font-size: 11px;
  cursor: pointer;
}
.toggle-field input { position: absolute; opacity: 0; pointer-events: none; }
.toggle {
  position: relative;
  width: 36px;
  height: 20px;
  border-radius: 20px;
  background: #d8dee9;
  transition: background .2s;
}
.toggle::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
  content: "";
  transition: transform .2s;
}
.toggle-field input:checked + .toggle { background: var(--navy); }
.toggle-field input:checked + .toggle::after { transform: translateX(16px); }

.variant-list { display: grid; gap: 10px; }
.variant-row {
  display: grid;
  grid-template-columns: minmax(0,1.6fr) minmax(110px,.7fr) auto auto;
  align-items: end;
  gap: 10px;
  padding: 14px;
  border: 1px solid #e7ebf2;
  border-radius: 3px;
  background: #fbfcfe;
}
.variant-row .field { gap: 5px; }
.variant-row .field input { height: 40px; }
.variant-available {
  display: flex;
  height: 40px;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 9px;
  white-space: nowrap;
}
.remove-row {
  width: 38px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: white;
  color: var(--danger);
  font-size: 18px;
}
.add-row-button { margin-top: 12px; }
.empty-inline {
  padding: 22px;
  border: 1px dashed var(--line);
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}
.prospect-pipeline { max-width: 1240px; margin: 0 auto; }
.pipeline-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(180px, 1fr));
  gap: 12px;
  align-items: start;
  overflow-x: auto;
  padding-bottom: 8px;
}
.pipeline-column {
  min-width: 180px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #f8fafd;
}
.pipeline-column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.pipeline-column-header strong {
  color: var(--navy-deep);
  font-size: 9px;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.pipeline-column-header span {
  display: grid;
  min-width: 21px;
  height: 21px;
  place-items: center;
  border-radius: 50%;
  background: #e6edf6;
  color: var(--navy);
  font-size: 8px;
}
.pipeline-cards { display: grid; gap: 8px; }
.pipeline-card {
  display: grid;
  gap: 5px;
  width: 100%;
  padding: 11px;
  border: 1px solid #dfe6f0;
  border-radius: 3px;
  background: white;
  color: var(--ink);
  text-align: left;
  box-shadow: 0 3px 10px rgba(16,40,76,.04);
}
.pipeline-card:hover { border-color: var(--gold); }
.pipeline-card strong {
  overflow: hidden;
  color: var(--navy-deep);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pipeline-card small {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pipeline-card b {
  color: var(--gold);
  font-size: 9px;
  font-weight: 700;
}
.pipeline-column--lost { background: #fbf7f6; }
.pipeline-column--lost .pipeline-column-header { border-bottom-color: #eddcd8; }
.pipeline-column--lost small { white-space: normal; }
.client-spend-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 4px 20px;
  margin-bottom: 16px;
  padding: 18px;
  border-left: 3px solid var(--gold);
  background: #faf8f1;
}
.client-spend-summary > span {
  color: #5f4c24;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.client-spend-summary strong {
  grid-row: 1 / span 2;
  grid-column: 2;
  color: var(--navy-deep);
  font-family: var(--display);
  font-size: 32px;
  font-weight: 600;
}
.client-spend-summary small { color: var(--muted); font-size: 9px; }
.client-spend-log {
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid #e3e8f0;
  border-radius: 4px;
  background: white;
}
.client-spend-log-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}
.client-spend-log-heading .eyebrow { margin: 0; }
.client-spend-log-heading h4 {
  margin: 0;
  color: var(--navy-deep);
  font-family: var(--display);
  font-size: 21px;
  font-weight: 600;
}
.client-spend-table td:first-child { white-space: nowrap; }
.client-spend-product-meta {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}
.client-sales-list { display: grid; gap: 12px; }
.client-sale-card {
  padding: 16px;
  border: 1px solid #e3e8f0;
  border-radius: 4px;
  background: #fbfcfe;
}
.client-sale-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.client-sale-header strong {
  color: var(--navy-deep);
  font-family: var(--display);
  font-size: 21px;
  font-weight: 600;
}
.client-sale-header span {
  margin-left: 8px;
  color: var(--gold);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.client-sale-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.client-sale-grid .field input,
.client-sale-grid .field select { height: 40px; }
.remove-sale {
  border: 0;
  background: transparent;
  color: var(--danger);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.upload-zone {
  display: grid;
  min-height: 145px;
  place-items: center;
  align-content: center;
  gap: 7px;
  padding: 20px;
  border: 1px dashed #c6d1e1;
  border-radius: 4px;
  background: #f9fbfe;
  color: var(--navy);
  cursor: pointer;
  text-align: center;
  transition: border-color .2s, background .2s;
}
.upload-zone:hover,
.upload-zone.is-dragging { border-color: var(--gold); background: #fdf9ef; }
.upload-zone input { position: absolute; opacity: 0; pointer-events: none; }
.upload-zone b { font-size: 11px; letter-spacing: .05em; }
.upload-zone small { color: var(--muted); font-size: 9px; }
.upload-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  margin-bottom: 2px;
  border-radius: 50%;
  background: var(--navy);
  color: white;
  font-size: 20px;
  font-weight: 300;
}
.media-url-row {
  display: grid;
  grid-template-columns: minmax(0,1fr) 130px auto;
  align-items: end;
  gap: 10px;
  margin: 17px 0;
}
.media-url-row .field input,
.media-url-row .field select { height: 40px; }
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px,1fr));
  gap: 12px;
}
.media-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: white;
}
.media-card.is-cover { border-color: var(--gold); }
.media-preview {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: #edf1f6;
}
.media-preview img,
.media-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-badge {
  position: absolute;
  top: 7px;
  left: 7px;
  padding: 4px 7px;
  border-radius: 2px;
  background: rgba(6,28,67,.86);
  color: white;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.cover-badge {
  position: absolute;
  top: 7px;
  right: 7px;
  padding: 4px 7px;
  border-radius: 2px;
  background: var(--gold);
  color: white;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.media-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
}
.media-actions button {
  height: 32px;
  border: 0;
  border-right: 1px solid var(--line);
  background: white;
  color: var(--navy);
  font-size: 12px;
}
.media-actions button:last-child { border-right: 0; color: var(--danger); }
.media-actions button:hover { background: var(--blue-soft); }
.media-actions button:disabled { cursor: default; opacity: .25; }

.sticky-actions {
  position: sticky;
  bottom: 16px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(202,213,227,.9);
  border-radius: 5px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 12px 35px rgba(7,31,70,.13);
  backdrop-filter: blur(16px);
}
.form-status { margin-right: auto; color: var(--muted); font-size: 10px; }
.save-button { min-width: 155px; }
.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 100;
  max-width: min(390px, calc(100vw - 32px));
  padding: 13px 17px;
  border-left: 3px solid var(--gold);
  border-radius: 3px;
  background: var(--navy-deep);
  color: white;
  box-shadow: 0 14px 35px rgba(0,0,0,.2);
  font-size: 11px;
  line-height: 1.5;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity .2s, transform .2s;
}
.toast.is-visible { opacity: 1; transform: translateY(0); }
.toast.is-error { border-left-color: #e46c60; }

/* Sales dashboard */
.sales-dashboard {
  max-width: 1180px;
  margin: 0 auto;
}
.dashboard-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}
.dashboard-header h2 {
  margin: 0;
  color: var(--navy-deep);
  font-family: var(--display);
  font-size: clamp(34px, 4vw, 48px);
  font-weight: 600;
  line-height: 1;
}
.dashboard-header > div > p:last-child {
  max-width: 560px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}
.dashboard-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: white;
}
.dashboard-filters .field input,
.dashboard-filters .field select { height: 40px; }
.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.dashboard-stat {
  display: grid;
  gap: 10px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: white;
}
.dashboard-stat span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.dashboard-stat strong {
  color: var(--navy-deep);
  font-family: var(--display);
  font-size: clamp(27px, 3vw, 36px);
  font-weight: 600;
  line-height: 1;
}
.dashboard-panels {
  display: grid;
  grid-template-columns: minmax(260px, .72fr) minmax(0, 1.28fr);
  gap: 18px;
}
.dashboard-panel {
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: white;
}
.dashboard-panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
}
.dashboard-panel-heading h3 {
  margin: 0;
  color: var(--navy-deep);
  font-family: var(--display);
  font-size: 24px;
  font-weight: 600;
}
.country-bars { display: grid; gap: 15px; }
.country-bar {
  display: grid;
  gap: 6px;
}
.country-bar-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  color: #40506a;
  font-size: 10px;
}
.country-bar-label strong {
  color: var(--navy-deep);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}
.country-bar-track {
  height: 7px;
  overflow: hidden;
  border-radius: 8px;
  background: #edf1f6;
}
.country-bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--navy), #3774b9);
  transition: width .35s ease;
}
.dashboard-empty {
  margin: 24px 0 0;
  padding: 22px;
  border: 1px dashed var(--line);
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}
.dashboard-table-wrap { overflow-x: auto; }
.dashboard-table {
  width: 100%;
  border-collapse: collapse;
  color: var(--ink);
  font-size: 10px;
}
.dashboard-table th,
.dashboard-table td {
  padding: 11px 9px;
  border-bottom: 1px solid #edf0f5;
  text-align: left;
  vertical-align: top;
}
.dashboard-table th {
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.dashboard-table tbody tr:last-child td { border-bottom: 0; }
.dashboard-table .numeric {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.dashboard-table td strong { color: var(--navy-deep); font-weight: 600; }

/* Administrator access */
.login-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 16% 12%, rgba(181,138,48,.14), transparent 28rem),
    linear-gradient(135deg, #061c43 0%, #0b2b60 54%, #f4f6f9 54%, #f4f6f9 100%);
}
.login-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(280px, .9fr) minmax(420px, 1.1fr);
}
.login-brand {
  align-self: start;
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 14px;
  margin: clamp(28px, 5vw, 64px);
  color: white;
}
.login-brand img {
  width: 54px;
  height: 54px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}
.login-brand span { display: grid; gap: 5px; }
.login-brand b {
  font-family: var(--display);
  font-size: 25px;
  letter-spacing: .18em;
  line-height: 1;
  text-transform: uppercase;
}
.login-brand small {
  color: #d7bd7d;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
}
.login-card {
  align-self: center;
  width: min(440px, calc(100% - 40px));
  margin: 50px auto;
  padding: clamp(28px, 5vw, 46px);
  border: 1px solid rgba(204,214,228,.85);
  border-radius: 5px;
  background: rgba(255,255,255,.97);
  box-shadow: 0 30px 80px rgba(4,22,53,.2);
}
.login-card h1 {
  margin: 0 0 12px;
  color: var(--navy-deep);
  font-family: var(--display);
  font-size: clamp(32px, 4vw, 43px);
  font-weight: 600;
  line-height: 1.05;
}
.login-intro {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}
.login-message {
  min-height: 20px;
  margin: 14px 0 0;
  color: #3f7a5f;
  font-size: 10px;
  line-height: 1.5;
}
.login-message.is-error { color: var(--danger); }
.login-form {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}
.login-form .field input { height: 48px; }
.login-form .field span { color: #334661; }
.login-submit { width: 100%; min-height: 48px; margin-top: 4px; }
.setup-note {
  margin: 0 0 2px;
  padding: 12px;
  border-left: 2px solid var(--gold);
  background: #faf7ef;
  color: #76643d;
  font-size: 10px;
  line-height: 1.6;
}
.login-back {
  display: inline-block;
  margin-top: 24px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.login-back:hover { color: var(--gold); }

/* Account dialog */
.account-dialog {
  width: min(480px, calc(100vw - 30px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  box-shadow: 0 30px 80px rgba(4,22,53,.28);
}
.account-dialog::backdrop { background: rgba(3,17,41,.58); backdrop-filter: blur(3px); }
.account-dialog form { padding: 28px; }
.account-dialog h2 {
  margin: 0 0 6px;
  color: var(--navy-deep);
  font-family: var(--display);
  font-size: 30px;
  font-weight: 600;
}
.account-dialog .dialog-copy {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}
.account-dialog .login-form { margin-top: 0; }
.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 22px;
}
.dialog-actions .logout-button { margin-right: auto; color: var(--danger); }
.export-dialog-header { padding: 28px 28px 0; }
.export-dialog-panel { padding: 20px 28px 28px; }
.export-dialog-panel form { padding: 0; }
.export-dialog-panel form > .field + .field { margin-top: 14px; }
.export-dialog-panel .dialog-actions { margin-top: 20px; }
.export-dialog-panel .export-cancel { margin-right: auto; }

@media (max-width: 760px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-brand {
    justify-self: center;
    margin: 28px 20px 0;
  }
  .login-card { margin: 24px auto 40px; }
}

@media (max-width: 900px) {
  .topbar { align-items: flex-start; flex-direction: column; }
  .top-actions { width: 100%; flex-wrap: wrap; }
  .save-state { width: 100%; }
  .admin-shell { display: block; }
  .catalog-panel {
    position: static;
    width: auto;
    height: auto;
    padding: 22px 18px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .product-list {
    display: flex;
    overflow-x: auto;
    padding-bottom: 6px;
  }
  .product-row { min-width: 230px; }
  .editor-panel { padding: 24px 16px; }
  .field-grid--2 { grid-template-columns: 1fr; }
  .section-heading { display: block; }
  .section-heading p { margin-top: 6px; text-align: left; }
  .variant-row { grid-template-columns: 1fr 1fr auto; }
  .variant-row .remove-row { grid-column: 3; grid-row: 1 / span 2; align-self: stretch; height: auto; }
  .variant-available { grid-column: 1 / 3; }
  .media-url-row { grid-template-columns: 1fr 110px; }
  .media-url-row .button { grid-column: 1 / -1; }
  .client-sale-grid { grid-template-columns: 1fr; }
  .dashboard-header { display: block; }
  .dashboard-header .button { margin-top: 16px; }
  .dashboard-filters,
  .dashboard-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-panels { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .top-actions .button { flex: 1; }
  .editor-header h2 { font-size: 30px; }
  .form-card { padding: 18px 15px; }
  .variant-row { grid-template-columns: 1fr auto; }
  .variant-row .field { grid-column: 1; }
  .variant-row .remove-row { grid-column: 2; grid-row: 1 / span 3; }
  .variant-available { grid-column: 1; }
  .media-url-row { grid-template-columns: 1fr; }
  .media-url-row .button { grid-column: 1; }
  .sticky-actions { flex-wrap: wrap; }
  .form-status { width: 100%; }
  .sticky-actions .button { flex: 1; }
  .workspace-tab { gap: 5px; font-size: 9px; }
  .client-spend-summary { grid-template-columns: 1fr; }
  .client-spend-summary strong { grid-row: auto; grid-column: 1; }
  .dashboard-filters,
  .dashboard-stats { grid-template-columns: 1fr; }
}
