:root {
  color-scheme: light;
  --brand-night: #06111f;
  --brand-navy: #0a1e35;
  --brand-navy-2: #102e50;
  --brand-ink: #10263d;
  --brand-paper: #f3f0e9;
  --brand-white: #fff;
  --brand-cyan: #63dcff;
  --brand-blue: #3c83ff;
  --brand-violet: #925cff;
  --brand-gold: #f6c75d;
  --brand-muted: #607083;
  --brand-line: rgba(16,38,61,.15);
  --brand-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --brand-body: "Manrope", Arial, sans-serif;
  --brand-shadow: 0 24px 64px rgba(6,17,31,.13);
}

html { background: var(--brand-paper); }
html body {
  background-color: var(--brand-paper);
  color: var(--brand-ink);
  font-family: var(--brand-body);
  -webkit-font-smoothing: antialiased;
}
body::before {
  background:
    radial-gradient(circle at 91% 4%,rgba(99,220,255,.12),transparent 24%),
    radial-gradient(circle at 8% 92%,rgba(146,92,255,.08),transparent 25%),
    linear-gradient(90deg,rgba(16,38,61,.035) 1px,transparent 1px),
    linear-gradient(0deg,rgba(16,38,61,.03) 1px,transparent 1px) !important;
  background-size:auto,auto,34px 34px,34px 34px !important;
}
body, button, input, select, textarea { font-family: var(--brand-body); }
h1, h2, h3, h4, .panel-title h1, .workspace-title strong, .cards-panel-header h2,
.page-head h1, .topbar h1, .sidebar h2, .login-card h1, .info-panel h1,
.order-head strong, .summary h2, .status-head h1 {
  font-family: var(--brand-display);
  font-weight: 800;
  letter-spacing: .005em;
}
h1, .panel-title h1, .page-head h1, .topbar h1, .login-card h1, .info-panel h1 {
  color: var(--brand-ink);
  text-transform: uppercase;
}
a { color: #176f9e; }
::selection { background: var(--brand-cyan); color: var(--brand-night); }

/* Shared navigation */
.editor-nav,
.customer-nav,
body > header,
.topbar {
  border-color: rgba(10,30,53,.11) !important;
  background: #fff !important;
  box-shadow: 0 9px 30px rgba(6,17,31,.07) !important;
  backdrop-filter: blur(18px);
}
.editor-nav,
.customer-nav { min-height: 78px; }
.editor-nav .brand-logo,
.customer-nav .brand-logo,
body > header .brand-logo { height: 58px; }
.editor-menu-trigger,
.editor-menu-close,
.account-menu-avatar-trigger,
.mobile-nav-menu summary {
  border-color: rgba(16,38,61,.16) !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: var(--brand-ink) !important;
  box-shadow: 0 8px 20px rgba(6,17,31,.07) !important;
}
.account-menu-avatar-trigger { border-radius: 50% !important; }
.avatar,
.editor-menu-avatar {
  background: linear-gradient(135deg,var(--brand-navy),#17629a 52%,#6338bd) !important;
}
.cart-count,
.menu-count { background: #e7f8ff !important; color: #12658e !important; }
.badge.delivery { border-color: #14532d !important; background: #166534 !important; color: #fff !important; }
.studio-return-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid rgba(99,220,255,.28);
  font-size: 13px;
  text-decoration: none;
  transition: transform .16s ease, box-shadow .16s ease;
}
.studio-return-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nav-pill,
.studio-return-button,
.button-link,
.button,
.price-action,
.contact-submit,
button[type="submit"] {
  border-radius: 8px !important;
  font-weight: 800;
}
.studio-return-button,
.button-link:not(.secondary),
.login-card button,
.checkout-button,
.contact-submit,
button[type="submit"] {
  border-color: rgba(99,220,255,.28) !important;
  background: linear-gradient(135deg,#0b2848 0%,#17629a 54%,#6338bd 115%) !important;
  color: #fff !important;
  box-shadow: 0 13px 30px rgba(6,17,31,.17) !important;
}
.nav-pill:hover,
.studio-return-button:hover,
.button-link:hover,
button[type="submit"]:hover { transform: translateY(-1px); }
.button-link.secondary,
button.secondary,
.secondary-button {
  border: 1px solid rgba(16,38,61,.16) !important;
  background: #fff !important;
  color: var(--brand-ink) !important;
  box-shadow: none !important;
}

/* Shared surfaces and forms */
.panel,
.card,
.summary,
.order-card,
.empty,
.login-card,
.info-panel,
.detail-card,
.process-step,
.support-ticket,
.settings-card,
.product-card,
.option-card,
.modal-dialog,
.contact-card,
.download-modal-card {
  border-color: var(--brand-line) !important;
  border-radius: 10px !important;
  background-color: rgba(255,255,255,.96) !important;
  box-shadow: var(--brand-shadow) !important;
}
.panel::before,
.login-card::before { border-radius: 0 !important; }
.muted,
.hint,
.note,
.login-card p,
.info-updated { color: var(--brand-muted) !important; }
input,
select,
textarea {
  border-color: rgba(16,38,61,.18) !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: var(--brand-ink) !important;
}
input:focus,
select:focus,
textarea:focus {
  outline: 0 !important;
  border-color: #2789bc !important;
  box-shadow: 0 0 0 3px rgba(39,137,188,.15) !important;
}
label { color: var(--brand-ink); }
.notice {
  border-radius: 8px !important;
  border-color: rgba(39,137,188,.25) !important;
  background: #ecf8fc !important;
  color: #145678 !important;
}
.pill,
.tool-badge,
.step-number,
.eyebrow {
  color: #176f9e !important;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

/* Design studio */
body:has(.studio-panel) {
  background:
    radial-gradient(circle at 84% 2%,rgba(99,220,255,.13),transparent 22%),
    linear-gradient(90deg,rgba(16,38,61,.038) 1px,transparent 1px),
    linear-gradient(0deg,rgba(16,38,61,.032) 1px,transparent 1px),
    var(--brand-paper) !important;
  background-size:auto,34px 34px,34px 34px,auto !important;
}
.studio-panel {
  border-color: rgba(16,38,61,.13) !important;
  background: linear-gradient(180deg,#fff,#f4f8fa) !important;
  box-shadow: 16px 0 45px rgba(6,17,31,.08) !important;
}
.studio-panel::before {
  background: linear-gradient(90deg,var(--brand-cyan),var(--brand-blue),var(--brand-violet),var(--brand-gold)) !important;
}
.panel-title h1,
.cards-panel-header h2,
.workspace-title strong { color: var(--brand-ink) !important; text-transform: uppercase; }
.field,
.source-preview,
.image-toolbar,
.cards-panel,
.editor-landing-card,
.personalisation-section,
.card-details-panel,
.card-uploads-panel {
  border-color: rgba(16,38,61,.13) !important;
  background-color: rgba(255,255,255,.94) !important;
}
.field,
.source-preview,
.personalisation-section { border-radius: 10px !important; }
#submitButton,
.wizard-next,
.quick-create-submit,
.modal-actions .primary {
  background: linear-gradient(135deg,#0b2848,#17629a 54%,#6338bd) !important;
  color: #fff !important;
}
.layout-picker img,
.frame-choice img,
.artwork-style-option img,
.card-tile,
.card-tile img { border-radius: 8px !important; }
.selected-card-status {
  border-radius: 8px !important;
  background: linear-gradient(135deg,var(--brand-night),var(--brand-navy-2)) !important;
}
.cards-panel {
  background: linear-gradient(180deg,rgba(255,255,255,.96),rgba(237,244,247,.94)) !important;
  box-shadow: -16px 0 42px rgba(6,17,31,.08) !important;
}
.cards-panel .middle-upload-action {
  border-radius: 10px !important;
  border-color: rgba(39,137,188,.3) !important;
  background: linear-gradient(135deg,#fff,#ecf8fc) !important;
}
.modal-overlay,
.editor-menu-backdrop { background: rgba(2,8,16,.78) !important; backdrop-filter: blur(10px); }
.modal-dialog { overflow: hidden; }
.modal-header {
  border-bottom-color: rgba(16,38,61,.12) !important;
  background: linear-gradient(135deg,#f8fbfc,#eef6f9) !important;
}

/* Quick Create owns its vertical scroll; keep horizontal choice rails independent. */
.modal-dialog.quick-card-dialog {
  max-height: calc(100dvh - 48px);
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}
.quick-card-dialog .quick-choice-gallery,
.quick-card-dialog .quick-choice-gallery > * { touch-action: pan-x pan-y; }

/* Account drawer */
.editor-menu-drawer {
  background:
    radial-gradient(circle at 0 0,rgba(99,220,255,.13),transparent 28%),
    linear-gradient(180deg,#fff,#eef4f6) !important;
  color: var(--brand-ink) !important;
  font-family: var(--brand-body) !important;
}
.editor-menu-account {
  border-color: rgba(16,38,61,.13) !important;
  border-radius: 10px !important;
  box-shadow: 0 14px 34px rgba(6,17,31,.08);
}
.editor-menu-links a { border-radius: 8px !important; color: var(--brand-ink) !important; }
.editor-menu-links a:hover { border-color: rgba(39,137,188,.2) !important; background: #eaf7fb !important; }
.editor-menu-links > a > svg { border-radius: 7px !important; }

/* Cart, orders and profile */
main > .hero h1,
.account-main h1 { font-size: clamp(38px,5vw,58px); line-height: .95; }
.order-head,
.cart-mini-pricing,
.summary-row { border-color: rgba(16,38,61,.12) !important; }
.order-card { overflow: hidden; }
.order-head { background: linear-gradient(135deg,var(--brand-night),var(--brand-navy-2)) !important; color: #fff !important; }
.order-head strong,
.order-head span { color: #fff !important; }
.summary { border-top: 5px solid var(--brand-cyan) !important; }
.quantity-option,
.holder-option,
.option-card { background: #edf8fc !important; border-color: rgba(39,137,188,.22) !important; color: #145678 !important; }
.price-total { font-family: var(--brand-display); font-size: 25px !important; }
main > .hero .nav-pill {
  border-color: rgba(99,220,255,.28) !important;
  background: linear-gradient(135deg,#0b2848,#17629a 54%,#6338bd) !important;
  color: #fff !important;
  box-shadow: 0 12px 28px rgba(6,17,31,.15);
}

/* Admin */
.sidebar {
  background:
    radial-gradient(circle at 10% 0,rgba(99,220,255,.16),transparent 26%),
    linear-gradient(180deg,var(--brand-night),var(--brand-navy-2)) !important;
  color: #fff !important;
}
.sidebar .menu a { border-radius: 8px !important; color: rgba(255,255,255,.74) !important; }
.sidebar .menu a:hover,
.sidebar .menu a.is-active { background: rgba(99,220,255,.12) !important; color: #fff !important; }
.sidebar .menu svg { color: var(--brand-cyan); }
.portal-main { background: transparent !important; }
.topbar h1 { color: var(--brand-ink) !important; }
.page-head { align-items: end; }
.page-head h1 { font-size: clamp(36px,4vw,54px) !important; }
.settings-grid label,
.grid label { letter-spacing: .04em; }

/* Public information and compact account pages */
body:has(.info-main),
body:has(.login-card) {
  background:
    radial-gradient(circle at 85% 8%,rgba(99,220,255,.18),transparent 25%),
    radial-gradient(circle at 12% 92%,rgba(146,92,255,.12),transparent 28%),
    linear-gradient(135deg,var(--brand-night),var(--brand-navy-2)) !important;
}
.info-panel { position: relative; overflow: hidden; }
.login-card { position: relative; overflow: visible; }
.info-panel::before,
.login-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg,var(--brand-cyan),var(--brand-blue),var(--brand-violet),var(--brand-gold));
}
.info-panel h1,
.login-card h1 { font-size: clamp(34px,5vw,58px) !important; line-height: .92; }
.info-section h2 { color: var(--brand-ink) !important; font-size: 25px !important; text-transform: uppercase; }
.info-section p,
.info-section li { color: #52677b !important; }
.info-actions .button.secondary { color: var(--brand-ink) !important; background: #fff !important; }

@media (max-width: 720px) {
  .editor-nav,
  .customer-nav { min-height: 64px; }
  .editor-nav .brand-logo,
  .customer-nav .brand-logo,
  body > header .brand-logo { height: 43px; }
  .panel,
  .summary,
  .login-card,
  .info-panel { border-radius: 8px !important; }
  .sidebar { background: linear-gradient(180deg,var(--brand-night),var(--brand-navy-2)) !important; }
  main > .hero h1 { font-size: 42px; }
  .hero .studio-return-button { width: 100%; min-height: 42px; }
}

@media (max-width: 960px) {
  body:has(.portal-main) .sidebar {
    position: sticky !important;
    top: 0;
    z-index: 40;
    display: grid !important;
    grid-template-rows: auto auto !important;
    gap: 8px !important;
    height: auto !important;
    padding: 8px 10px 10px !important;
    box-shadow: 0 10px 30px rgba(6,17,31,.18) !important;
  }
  body:has(.portal-main) .sidebar .account-nav-brand { min-height: 48px; }
  body:has(.portal-main) .sidebar .brand-logo { width: auto !important; height: 44px !important; max-width: min(220px,68vw) !important; }
  body:has(.portal-main) .sidebar .menu {
    display: flex !important;
    gap: 6px !important;
    padding: 1px 0 2px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
  }
  body:has(.portal-main) .sidebar .menu::-webkit-scrollbar { display: none; }
  body:has(.portal-main) .sidebar .menu a {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 0 11px;
    white-space: nowrap;
    scroll-snap-align: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
