: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%;
}

.student-body {
  padding-bottom: env(safe-area-inset-bottom, 0);
}

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

.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;
}
.auth-hero {
  padding: 14px;
  border-radius: 20px;
  background: linear-gradient(140deg, #0f766e, #14b8a6);
  color: #fff;
  box-shadow: var(--shadow);
  margin-bottom: 10px;
}
.hero h1 {
  margin: 4px 0;
  font-size: 2rem;
}
.hero p {
  margin: 0 0 14px;
  color: var(--muted);
}
.auth-hero p {
  color: rgba(255, 255, 255, .92);
  margin-bottom: 4px;
}

.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;
  position: sticky;
  top: 6px;
  z-index: 10;
  padding: 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: blur(8px);
  border: 1px solid #dbeafe;
}

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);
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 8px 0 10px;
}
.stats-strip article {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px;
}
.stats-strip small {
  display: block;
  color: #64748b;
}
.stats-strip strong {
  font-size: 1.1rem;
}

.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, .97);
  border: 1px solid #dbeafe;
  border-radius: 20px;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom, 0));
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 35px rgba(15, 23, 42, 0.18);
}
.bottom-nav button {
  border: 0;
  border-radius: 12px;
  padding: 11px 6px;
  background: transparent;
  color: #0f172a;
  font-weight: 700;
  font-size: .85rem;
}
.bottom-nav button.active {
  background: linear-gradient(140deg, #ccfbf1, #dbeafe);
  color: #0f172a;
}

.list {
  display: grid;
  gap: 10px;
}
.order-card {
  background: #fff;
  border-radius: 16px;
  padding: 12px;
  box-shadow: var(--shadow);
  border: 1px solid #eef2ff;
}
.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;
}

.toast-host {
  position: fixed;
  right: 12px;
  top: 12px;
  z-index: 2000;
  display: grid;
  gap: 8px;
  max-width: min(92vw, 380px);
}

.toast {
  background: #0f172a;
  color: #fff;
  padding: 10px 12px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity .22s ease, transform .22s ease;
  font-size: .92rem;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.success {
  background: #166534;
}

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

.admin-body {
  padding: 14px;
  padding-bottom: 96px;
  background: radial-gradient(circle at 12% -10%, #d9f99d 0%, #ecfeff 32%, #f8fafc 100%);
  color: #0f172a;
}
.admin-shell {
  max-width: 960px;
  margin: 0 auto;
}
.admin-topbar {
  background: rgba(255, 255, 255, .92);
  border-color: #bbf7d0;
  color: #0f172a;
}
.admin-topbar small {
  color: #0f766e;
}
.admin-topbar .btn.ghost {
  background: #ecfeff;
  color: #0f766e;
}
.admin-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.admin-tabs button {
  border: 0;
  border-radius: 12px;
  padding: 10px 14px;
  background: #f1f5f9;
  color: #334155;
  font-weight: 700;
}
.admin-tabs button.active { background: #14b8a6; color: #ffffff; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.admin-kpis {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}
.admin-kpis article {
  background: #ffffff;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  padding: 10px;
}
.admin-kpis small {
  color: #0f766e;
}
.admin-kpis strong {
  font-size: 1.25rem;
  color: #0f172a;
}

.admin-body .order-card,
.admin-body .card {
  background: #ffffff;
  border: 1px solid #dbeafe;
  color: #0f172a;
}
.admin-body .hint,
.admin-body p {
  color: #475569;
}
.admin-body .chip {
  background: #ffffff;
  color: #334155;
  border-color: #cbd5e1;
}
.admin-body .chip.active {
  background: #14b8a6;
  color: #ffffff;
  border-color: #14b8a6;
}

.admin-bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  width: min(960px, calc(100vw - 20px));
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  background: rgba(255, 255, 255, .96);
  border: 1px solid #dbeafe;
  border-radius: 18px;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom, 0));
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.15);
  z-index: 50;
}

.admin-bottom-nav button {
  border: 0;
  border-radius: 12px;
  padding: 11px 8px;
  background: transparent;
  color: #334155;
  font-weight: 700;
}

.admin-bottom-nav button.active {
  background: linear-gradient(140deg, #ccfbf1, #dbeafe);
  color: #0f172a;
}

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