/* FICKEL — mobile-first PWA styles */
:root {
  --bg: #F4F6F8;
  --surface: #FFFFFF;
  --ink: #0A0A0C;
  --ink-muted: #5A6570;
  --ink-soft: #8A94A0;
  --border: #E4E8EC;
  --header: #0055FF;
  --header-grad: linear-gradient(90deg, #00EAFF 0%, #00D4FF 28%, #0088CC 68%, #0055FF 100%);
  --accent: #0055FF;
  --accent-2: #00D4FF;
  --accent-soft: #E5F7FF;
  --success: #0B8A4B;
  --success-bg: #E8F8EF;
  --warning: #B86E00;
  --warning-bg: #FFF6E5;
  --danger: #C62828;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 2px 12px rgba(10, 10, 12, 0.06);
  --shadow-lg: 0 8px 28px rgba(10, 10, 12, 0.12);
  --nav-h: 64px;
  --header-h: 68px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.45;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
  background: var(--bg);
  box-shadow: 0 0 0 1px var(--border);
}

/* Header — cyan→blue gradient only; star-F comes from .brand-mark img (not baked into bg) */
.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-h);
  background-color: #1362CB;
  background-image: linear-gradient(90deg, #66EAF9 0%, #34A8E6 50%, #1362CB 100%);
  background-size: cover;
  background-position: left center;
  background-repeat: no-repeat;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px 0 10px;
  padding-top: env(safe-area-inset-top, 0);
  box-shadow: 0 1px 0 rgba(255,255,255,0.35), 0 2px 10px rgba(0, 40, 120, 0.18);
}
.app-header .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.app-header .brand-mark {
  height: 52px;
  width: 52px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
  background: #000;
}
.app-header .brand-name {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #fff;
  text-shadow: 0 1px 0 rgba(0,0,0,0.35), 0 0 18px rgba(255,255,255,0.45);
  white-space: nowrap;
}
.install-btn {
  appearance: none;
  border: 1.5px solid rgba(255,255,255,0.9);
  background: rgba(255,255,255,0.2);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 12px;
  border-radius: 999px;
  cursor: pointer;
  display: none;
  backdrop-filter: blur(4px);
  text-shadow: 0 1px 1px rgba(0,0,0,0.15);
}
.install-btn.show { display: inline-flex; }
.install-btn:hover { background: rgba(255,255,255,0.32); }

/* First-open name prompt */
body.modal-open { overflow: hidden; }
.name-modal[hidden] { display: none; }
.name-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
}
.name-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 12, 28, 0.72);
  backdrop-filter: blur(3px);
}
.name-dialog {
  position: relative;
  width: min(100%, 400px);
  padding: 24px;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(145deg, #0A0A0C 0%, #0A2A5C 58%, #0055FF 140%);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.35);
}
.name-dialog .chip {
  display: inline-flex;
  align-items: center;
  background: rgba(0,212,255,0.18);
  color: #B8F0FF;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.name-dialog h2 { margin: 0 0 6px; font-size: 1.35rem; }
.name-dialog > p { margin: 0 0 18px; color: rgba(255,255,255,0.78); }
.name-dialog .field { margin-bottom: 14px; }
.name-dialog .field label { color: rgba(255,255,255,0.88); }
.name-dialog input {
  border-color: rgba(255,255,255,0.28);
  background: rgba(255,255,255,0.98);
  color: var(--ink);
}
.field-error { min-height: 1.25em; margin: 5px 0 0; color: #FFD5D5; font-size: 0.8rem; }
.btn-quiet {
  border: 0;
  background: transparent;
  color: rgba(255,255,255,0.82);
  box-shadow: none;
}
.btn-quiet:hover { background: rgba(255,255,255,0.1); color: #fff; }

/* Main */
.main {
  flex: 1;
  padding: 16px 16px calc(var(--nav-h) + var(--safe-b) + 20px);
}

.view { display: none; animation: fadeIn 0.22s ease; }
.view.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

.page-title {
  margin: 0 0 4px;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.page-sub {
  margin: 0 0 18px;
  color: var(--ink-muted);
  font-size: 0.92rem;
}

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  margin-bottom: 12px;
}
.card h3 {
  margin: 0 0 6px;
  font-size: 1rem;
  font-weight: 700;
}
.card p { margin: 0; color: var(--ink-muted); font-size: 0.9rem; }

.hero {
  background: linear-gradient(135deg, #0E5BB8 0%, #1362CB 42%, #1A7AE8 100%);
  color: #fff;
  border: none;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  right: -20px;
  top: -30px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,212,255,0.35), transparent 70%);
  pointer-events: none;
}
.hero h2 {
  margin: 0 0 6px;
  font-size: 1.25rem;
  font-weight: 700;
  position: relative;
}
.hero p {
  color: rgba(255,255,255,0.78);
  position: relative;
  margin: 0 0 14px;
}
.hero .chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #FFFFFF;
  color: #0A3D8F;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
  position: relative;
  box-shadow: 0 2px 10px rgba(0,0,0,0.22), 0 0 0 1px rgba(255,255,255,0.65);
}

/* Quick actions */
.qa-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 14px 0 18px;
  padding: 12px;
  background: #000000;
  border-radius: var(--radius);
}
.qa {
  appearance: none;
  border: 1px solid var(--border);
  background: #FFFFFF;
  border-radius: var(--radius);
  padding: 16px 12px;
  text-align: left;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform 0.12s ease, border-color 0.12s;
  min-height: 88px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.qa:active { transform: scale(0.98); }
.qa:hover { border-color: #B8DFF0; }
.qa .icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
}
.qa .icon svg { width: 20px; height: 20px; }
.qa strong {
  font-size: 0.92rem;
  font-weight: 700;
}
.qa span {
  font-size: 0.75rem;
  color: var(--ink-muted);
  line-height: 1.3;
}

.value-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.value-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.9rem;
  color: var(--ink-muted);
}

.card-why {
  background: #000000;
  border-color: #000000;
  color: #ffffff;
}
.card-why h3 { color: #ffffff; }
.card-why .value-list li { color: #ffffff; }
.card-why .value-list .dot {
  background: linear-gradient(135deg, #00D4FF, #0055FF);
}

.value-list .dot {
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  flex-shrink: 0;
}

/* Forms */
.form-grid { display: grid; gap: 12px; }
.field { display: grid; gap: 6px; }
.field label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink);
}
.field .hint { font-size: 0.75rem; color: var(--ink-soft); font-weight: 400; }
.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: var(--radius-sm);
  padding: 12px 12px;
  min-height: 44px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0,136,204,0.15);
}
.row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.btn {
  appearance: none;
  border: none;
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  transition: transform 0.12s, opacity 0.12s;
  text-decoration: none;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: linear-gradient(135deg, #0077B8, #00A8E0);
  color: #fff;
  box-shadow: 0 4px 14px rgba(0,136,204,0.35);
}
.btn-primary:hover { text-decoration: none; filter: brightness(1.05); }

.hero .btn-primary {
  background: #FFFFFF;
  color: #0A3D8F;
  font-weight: 800;
  letter-spacing: 0.01em;
  box-shadow: 0 6px 20px rgba(0,0,0,0.28), 0 0 0 1px rgba(255,255,255,0.4);
  border: none;
}
.hero .btn-primary:hover {
  filter: none;
  background: #F0F7FF;
  color: #062A66;
  text-decoration: none;
}

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border);
}
.btn-ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid transparent;
  min-height: 40px;
  padding: 8px 12px;
}
.btn-call {
  background: var(--ink);
  color: #fff;
  width: 100%;
}
.btn-block { width: 100%; }
.btn-row { display: grid; gap: 10px; margin-top: 8px; }

/* Lists / status */
.list { display: grid; gap: 10px; }
.list-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  display: grid;
  gap: 6px;
  box-shadow: var(--shadow);
}
.list-item .top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}
.list-item .title { font-weight: 700; font-size: 0.95rem; }
.list-item .meta { font-size: 0.8rem; color: var(--ink-muted); }
.badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 4px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.badge-shipped { background: var(--accent-soft); color: #0044CC; }
.badge-transit { background: #EEF2FF; color: #3B4CCA; }
.badge-delivered { background: var(--success-bg); color: var(--success); }
.badge-pending { background: var(--warning-bg); color: var(--warning); }
.badge-quoted { background: #F3E8FF; color: #6B21A8; }

/* Artwork grid */
.art-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}
.art-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.art-thumb {
  aspect-ratio: 1;
  background: #EEF2F5;
  display: grid;
  place-items: center;
  position: relative;
}
.art-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 12px;
}
.art-thumb .placeholder-logo {
  width: 70%;
  height: 70%;
}
.art-body { padding: 10px 12px 12px; }
.art-body strong {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 2px;
}
.art-body span { font-size: 0.72rem; color: var(--ink-soft); }

.upload-zone {
  border: 1.5px dashed #B8C4CE;
  border-radius: var(--radius);
  background: #FAFBFC;
  padding: 22px 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.upload-zone:hover, .upload-zone:focus-within {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.upload-zone strong { display: block; margin-bottom: 4px; }
.upload-zone span { font-size: 0.8rem; color: var(--ink-muted); }
.upload-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }

/* Toggle */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.toggle {
  position: relative;
  width: 48px;
  height: 28px;
  flex-shrink: 0;
}
.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.toggle .slider {
  position: absolute;
  inset: 0;
  background: #CDD5DC;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s;
}
.toggle .slider::before {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.toggle input:checked + .slider { background: var(--accent); }
.toggle input:checked + .slider::before { transform: translateX(20px); }
.toggle input:focus-visible + .slider { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Contact */
.contact-note {
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-size: 0.85rem;
  color: #0A4A66;
  margin-top: 8px;
}

/* Bottom nav */
.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: calc(var(--nav-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  z-index: 50;
}
.nav-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--ink-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 2px;
  min-height: var(--nav-h);
}
.nav-btn svg { width: 22px; height: 22px; }
.nav-btn.active { color: var(--accent); }
.nav-btn.active svg { stroke: var(--accent); }

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--nav-h) + var(--safe-b) + 16px);
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: #fff;
  padding: 12px 18px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 80;
  max-width: calc(100% - 32px);
  text-align: center;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast.success { background: #0B6B3A; }

.empty {
  text-align: center;
  padding: 28px 16px;
  color: var(--ink-muted);
  font-size: 0.9rem;
}

.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 18px 0 10px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}


/* Offline banner */
.offline-banner {
  background: #1A1A1E;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.35;
  padding: 10px 14px;
  text-align: center;
  z-index: 45;
}
.offline-banner[hidden] { display: none !important; }
body.is-offline .app-header { box-shadow: inset 0 2px 0 #F5A623; }

/* Artwork upload actions + share */
.upload-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 12px;
}
.btn-sm {
  padding: 8px 14px;
  font-size: 0.82rem;
  min-height: 36px;
  width: auto;
  display: inline-flex;
}
.art-share {
  appearance: none;
  margin-top: 8px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
}
.art-share:hover { background: var(--accent-soft); }

@media (min-width: 768px) {
  body { background: #E8ECF0; }
  .app {
    margin: 24px auto;
    min-height: calc(100dvh - 48px);
    border-radius: 20px;
    overflow: hidden;
  }
  .bottom-nav { border-radius: 0 0 20px 20px; }
}
