:root {
  --bg: radial-gradient(circle at 15% 0%, #ccfbf1 0%, #f0fdfa 38%, #f7fee7 100%);
  --card: #ffffff;
  --ink: #0f172a;
  --muted: #475569;
  --primary: #0f766e;
  --primary-strong: #115e59;
  --danger: #b91c1c;
  --ok: #166534;
  --radius: 18px;
  --shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  font-family: "Sora", sans-serif;
  color: var(--ink);
  background: var(--bg);
  min-height: 100%;
}

.app-shell {
  max-width: 460px;
  margin: 0 auto;
  padding: 14px 14px 92px;
}

.view { display: none; animation: in .24s ease; }
.view.active { display: block; }
@keyframes in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero {
  padding: 8px 2px 2px;
}
.hero h1 {
  margin: 4px 0;
  font-size: 2rem;
}
.hero p {
  margin: 0 0 14px;
  color: var(--muted);
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px;
  margin-bottom: 12px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

input, select, textarea, button {
  font: inherit;
}

form {
  display: grid;
  gap: 10px;
}

input, select, textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 12px;
  background: #fff;
}

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

.btn {
  border: 0;
  border-radius: 14px;
  padding: 12px 14px;
  font-weight: 700;
  cursor: pointer;
}
.btn.primary { background: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-strong); }
.btn.ghost { background: #ecfeff; color: #0f766e; }
.btn.danger { background: #fee2e2; color: var(--danger); }

.result {
  border-radius: 12px;
  padding: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}
.hint { color: var(--muted); font-size: .87rem; }
.hidden { display: none !important; }

.quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}
.quick-card {
  border: 0;
  border-radius: 16px;
  min-height: 86px;
  background: linear-gradient(135deg, #0f766e, #0ea5a3);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  box-shadow: var(--shadow);
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  width: min(460px, calc(100vw - 20px));
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  background: rgba(255, 255, 255, .95);
  border: 1px solid #d1fae5;
  border-radius: 20px;
  padding: 8px;
  backdrop-filter: blur(10px);
}
.bottom-nav button {
  border: 0;
  border-radius: 12px;
  padding: 11px 6px;
  background: transparent;
  color: #0f172a;
  font-weight: 700;
}
.bottom-nav button.active {
  background: #ccfbf1;
  color: #115e59;
}

.list {
  display: grid;
  gap: 10px;
}
.order-card {
  background: #fff;
  border-radius: 16px;
  padding: 12px;
  box-shadow: var(--shadow);
}
.order-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.badge {
  border-radius: 999px;
  padding: 4px 10px;
  font-size: .76rem;
  font-weight: 700;
  text-transform: uppercase;
}
.status-received { background: #dbeafe; color: #1e40af; }
.status-reviewing { background: #fef3c7; color: #92400e; }
.status-printing { background: #fae8ff; color: #7e22ce; }
.status-ready { background: #dcfce7; color: var(--ok); }
.status-delivered { background: #e2e8f0; color: #334155; }

.file-drop {
  border: 2px dashed #5eead4;
  border-radius: 14px;
  padding: 16px;
  text-align: center;
  background: #f0fdfa;
  display: block;
}
.file-drop input { margin-bottom: 10px; }
.mini-list { margin: 8px 0 0; padding-left: 16px; color: var(--muted); }

.wizard-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}
.step {
  background: #f1f5f9;
  border-radius: 10px;
  padding: 8px 6px;
  text-align: center;
  font-size: .82rem;
  font-weight: 700;
  color: #64748b;
}
.step.active { background: #ccfbf1; color: #115e59; }
.step-panel { display: none; }
.step-panel.active { display: grid; gap: 10px; }
.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0;
}
.chip {
  border: 1px solid #94a3b8;
  border-radius: 999px;
  background: #fff;
  padding: 7px 12px;
}
.chip.active,
.chips .active {
  background: #ccfbf1;
  border-color: #14b8a6;
}

.status-action {
  margin-top: 8px;
}

.btn.status-toggle {
  width: 100%;
  background: #f59e0b;
  color: #111827;
}

.btn.status-toggle:hover {
  background: #d97706;
  color: #fff;
}

dialog {
  border: 0;
  border-radius: 16px;
  width: min(92vw, 480px);
  box-shadow: var(--shadow);
}

.admin-body {
  padding: 14px;
}
.admin-shell {
  max-width: 960px;
  margin: 0 auto;
}
.admin-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.admin-tabs button {
  border: 0;
  border-radius: 12px;
  padding: 10px 14px;
  background: #e2e8f0;
  font-weight: 700;
}
.admin-tabs button.active { background: #0f766e; color: #fff; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

@media (min-width: 900px) {
  .app-shell { max-width: 680px; }
  .quick-grid { grid-template-columns: repeat(3, 1fr); }
}
