:root {
  --paper: #f6f5f0;
  --surface: #fffefa;
  --ink: #1a2520;
  --soft: #5e6861;
  --muted: #8a938c;
  --line: rgba(26,37,32,.14);
  --lime: #d4ef62;
  --green: #214d38;
  --blue: #5268c9;
  --error: #a3332b;
  --success: #285e3d;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
*[hidden] { display: none !important; }
body { min-height: 100vh; margin: 0; display: flex; flex-direction: column; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.admin-header { min-height: 74px; padding-inline: clamp(20px, 6vw, 84px); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.admin-wordmark { display: inline-flex; align-items: baseline; font-family: var(--serif); font-size: 32px; font-weight: 700; letter-spacing: -.085em; }
.admin-wordmark i { color: var(--blue); font-style: normal; }
.admin-wordmark small { margin-left: 7px; font-family: var(--sans); font-size: 8px; font-weight: 750; letter-spacing: .17em; text-transform: uppercase; }
.back-to-store { font-size: 10px; font-weight: 650; }
.back-to-store span { color: var(--blue); font-size: 14px; }
.admin-main { width: min(100% - 40px, 940px); flex: 1; margin: 0 auto; padding-block: clamp(36px, 7vw, 82px); }
.admin-loading { padding-block: 90px; color: var(--soft); text-align: center; font-size: 12px; }
.access-card { max-width: 440px; margin: 5vh auto 12vh; padding: clamp(28px, 5vw, 53px); border: 1px solid var(--line); background: var(--surface); }
.admin-eyebrow { margin: 0 0 13px; color: var(--soft); font-size: 9px; font-weight: 800; letter-spacing: .16em; }
.access-card h1, .dashboard-title h1 { margin: 0; font-family: var(--serif); font-size: clamp(43px, 7vw, 68px); font-weight: 400; line-height: .98; letter-spacing: -.07em; }
.access-card h1 em, .dashboard-title h1 em { color: var(--blue); font-weight: 400; }
.access-card > p:not(.admin-eyebrow):not(.login-error) { margin: 18px 0 23px; color: var(--soft); font-size: 11px; line-height: 1.8; }
.admin-button { min-height: 42px; padding: 0 18px; border: 1px solid transparent; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; gap: 13px; cursor: pointer; font-size: 10px; font-weight: 750; transition: transform .2s, background .2s, opacity .2s; }
.admin-button:hover:not(:disabled) { transform: translateY(-1px); }
.admin-button:disabled { opacity: .55; cursor: wait; }
.admin-button span { font-size: 15px; font-weight: 450; }
.admin-button-dark { background: var(--ink); color: white; }
.admin-button-dark:hover:not(:disabled) { background: #33443a; }
.admin-button-light { border-color: var(--line); background: transparent; color: var(--ink); }
.admin-button-light:hover:not(:disabled) { background: var(--lime); border-color: var(--lime); }
.login-error { margin: 17px 0 0; color: var(--error); font-size: 10px; line-height: 1.6; }
.dashboard { display: flex; flex-direction: column; gap: 19px; }
.dashboard-title { margin-bottom: 12px; display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.dashboard-title h1 { font-size: clamp(48px, 7vw, 76px); }
.signed-in { margin: 10px 0 0; color: var(--soft); font-size: 10px; }
.logout-button { flex: none; margin-bottom: 4px; }
.admin-notice { padding: 14px 17px; border: 1px solid var(--line); color: var(--ink); font-size: 11px; line-height: 1.6; }
.admin-notice[data-kind="success"] { border-color: rgba(40,94,61,.28); background: rgba(40,94,61,.06); color: var(--success); }
.admin-notice[data-kind="error"] { border-color: rgba(163,51,43,.3); background: rgba(163,51,43,.06); color: var(--error); }
.admin-panel { padding: clamp(22px, 4vw, 34px); border: 1px solid var(--line); background: var(--surface); }
.panel-heading { margin-bottom: 22px; display: flex; align-items: start; justify-content: space-between; gap: 18px; }
.panel-heading .admin-eyebrow { margin-bottom: 7px; }
.panel-heading h2 { margin: 0; font-family: var(--serif); font-size: clamp(25px, 4vw, 34px); font-weight: 400; letter-spacing: -.04em; }
.panel-icon { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 50%; display: grid; place-items: center; color: var(--blue); font-size: 17px; }
.panel-copy { max-width: 630px; margin: -7px 0 20px; color: var(--soft); font-size: 10px; line-height: 1.8; }
.settings-form, .product-form { display: flex; flex-direction: column; }
.settings-form > label, .field-label { margin: 0 0 8px; font-size: 10px; font-weight: 750; }
.field-label { margin-top: 18px; }
.field-label span { margin-left: 5px; color: var(--muted); font-size: 9px; font-weight: 500; }
input:not([type="file"]), textarea { width: 100%; min-height: 43px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 0; background: #fff; color: var(--ink); font-size: 11px; }
input::placeholder, textarea::placeholder { color: #9aa19c; }
textarea { min-height: 100px; resize: vertical; line-height: 1.65; }
.inline-form { display: flex; gap: 9px; }
.inline-form input { flex: 1; }
.inline-form .admin-button { flex: none; }
.field-help { margin: 8px 0 0; color: var(--muted); font-size: 9px; line-height: 1.65; }
.upload-fields { margin-top: 3px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.upload-field { min-width: 0; }
.upload-field .field-label { display: block; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; clip-path: inset(50%); border: 0; }
.file-drop { min-height: 145px; padding: 16px; border: 1px dashed rgba(26,37,32,.28); background: #f8f8f3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; cursor: pointer; text-align: center; transition: border-color .2s, background .2s; }
.file-drop:hover, .file-drop:focus-within { border-color: var(--blue); background: rgba(82,104,201,.035); }
.upload-symbol { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--lime); color: var(--ink); font-size: 17px; }
.file-drop-title { max-width: 100%; overflow: hidden; font-size: 10px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.file-drop-detail { color: var(--muted); font-size: 9px; }
.file-drop img { width: 100%; max-height: 130px; object-fit: cover; }
.file-drop:has(img:not([hidden])) .upload-symbol { display: none; }
.upload-status-card { margin-top: 9px; padding: 11px 12px; border: 1px solid var(--line); background: #fff; }
.upload-status-card[data-state="READY"] { border-color: rgba(40,94,61,.3); background: rgba(40,94,61,.035); }
.upload-status-card[data-state="ERROR"] { border-color: rgba(163,51,43,.3); background: rgba(163,51,43,.035); }
.upload-status-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--soft); font-size: 8px; font-weight: 750; letter-spacing: .08em; }
.upload-state-pill { color: var(--blue); }
.upload-status-card[data-state="READY"] .upload-state-pill { color: var(--success); }
.upload-status-card[data-state="ERROR"] .upload-state-pill { color: var(--error); }
.upload-progress { width: 100%; height: 7px; margin: 9px 0 2px; border: 0; border-radius: 9px; display: block; appearance: none; background: #e9ebe3; }
.upload-progress::-webkit-progress-bar { border-radius: 9px; background: #e9ebe3; }
.upload-progress::-webkit-progress-value { border-radius: 9px; background: var(--blue); transition: width .18s linear; }
.upload-status-card[data-state="READY"] .upload-progress::-webkit-progress-value { background: var(--success); }
.upload-status-card[data-state="ERROR"] .upload-progress::-webkit-progress-value { background: var(--error); }
.upload-progress::-moz-progress-bar { border-radius: 9px; background: var(--blue); }
.upload-status-card[data-state="READY"] .upload-progress::-moz-progress-bar { background: var(--success); }
.upload-status-card[data-state="ERROR"] .upload-progress::-moz-progress-bar { background: var(--error); }
.upload-meta { margin: 7px 0 0; color: var(--soft); font-size: 9px; overflow-wrap: anywhere; }
.upload-message { margin: 5px 0 0; color: var(--soft); font-size: 9px; line-height: 1.55; overflow-wrap: anywhere; }
.upload-status-card[data-state="ERROR"] .upload-message { color: var(--error); }
.upload-actions { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.publish-status { margin-top: 10px; padding: 11px 13px; border-left: 2px solid var(--blue); background: rgba(82,104,201,.05); color: var(--soft); font-size: 9px; line-height: 1.6; }
.publish-status[data-state="READY"], .publish-status[data-state="PUBLISHED"] { border-color: var(--success); background: rgba(40,94,61,.06); color: var(--success); }
.publish-status[data-state="ERROR"] { border-color: var(--error); background: rgba(163,51,43,.06); color: var(--error); }
.publish-status[data-state="PUBLISHING"] { border-color: var(--blue); }
.submit-product { width: fit-content; margin-top: 21px; }
.product-form > .field-help { max-width: 560px; }
.product-count { min-width: 31px; height: 31px; padding-inline: 8px; border: 1px solid var(--line); border-radius: 999px; display: grid; place-items: center; color: var(--green); font-size: 10px; font-weight: 750; }
.panel-heading-actions { display: flex; align-items: center; gap: 9px; }
.admin-empty { min-height: 105px; border: 1px dashed var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--soft); text-align: center; }
.admin-empty span { color: #799123; font-size: 18px; }
.admin-empty p { margin: 0; font-size: 10px; }
.admin-product-list { display: flex; flex-direction: column; }
.admin-product-row { padding: 15px 0; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.admin-product-details { min-width: 0; }
.admin-product-details h3 { margin: 0; overflow-wrap: anywhere; font-family: var(--serif); font-size: 20px; font-weight: 400; letter-spacing: -.025em; }
.admin-product-details p { margin: 5px 0 7px; color: var(--soft); font-size: 9px; overflow-wrap: anywhere; }
.product-state { display: inline-block; padding: 4px 7px; border-radius: 999px; font-size: 8px; font-weight: 750; }
.state-active { background: rgba(40,94,61,.09); color: var(--success); }
.state-hidden { background: rgba(26,37,32,.07); color: var(--soft); }
.admin-product-actions { flex: none; max-width: 250px; display: flex; flex-wrap: wrap; justify-content: end; gap: 7px; }
.small-action, .temporary-file-link { min-height: 32px; padding: 0 11px; border: 1px solid var(--line); border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; background: transparent; color: var(--ink); cursor: pointer; font-size: 8px; font-weight: 700; }
.small-action:hover:not(:disabled), .temporary-file-link:hover { background: var(--lime); border-color: var(--lime); }
.small-action:disabled { opacity: .55; cursor: wait; }
.small-action-subtle { color: var(--soft); }
.temporary-file-link { border-color: rgba(82,104,201,.3); color: var(--blue); }
.payment-note { padding: 16px 18px; display: flex; align-items: flex-start; gap: 11px; background: #ebece3; }
.payment-note > span { width: 18px; height: 18px; flex: none; border: 1px solid rgba(26,37,32,.35); border-radius: 50%; display: grid; place-items: center; font-family: var(--serif); font-size: 12px; }
.payment-note p { margin: 0; color: var(--soft); font-size: 9px; line-height: 1.75; }
.admin-footer { min-height: 60px; padding-inline: clamp(20px, 6vw, 84px); border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 20px; color: var(--muted); font-size: 9px; }
.admin-footer span:first-child { color: var(--ink); font-family: var(--serif); font-size: 16px; font-weight: 700; letter-spacing: -.06em; }
@media (max-width: 620px) {
  .admin-header { min-height: 65px; }
  .admin-main { width: min(100% - 28px, 940px); padding-block: 36px; }
  .access-card { margin: 4vh auto 9vh; }
  .dashboard-title { align-items: center; }
  .dashboard-title h1 { font-size: 55px; }
  .admin-panel { padding: 20px 16px; }
  .panel-heading-actions { flex: none; gap: 6px; }
  .panel-heading-actions .small-action { padding-inline: 8px; font-size: 7px; }
  .inline-form { align-items: stretch; flex-direction: column; }
  .inline-form .admin-button { align-self: flex-start; }
  .upload-fields { grid-template-columns: 1fr; }
  .file-drop { min-height: 120px; }
  .admin-product-row { align-items: flex-start; flex-direction: column; }
  .admin-product-actions { max-width: none; justify-content: flex-start; }
  .admin-footer { padding-block: 15px; align-items: flex-start; flex-direction: column; gap: 7px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: .01ms !important; } }
