/* ============================================================
   Garment QC — (RED) Edition
   White canvas, single crimson accent, iOS-native large-title
   layout, soft-shadow cards, pill controls.

   Palette:
   --red        #E1142E   (the one accent — buttons, active states, brand)
   --red-dark   #B80F24
   --ink        #1C1C1E   (Apple system black)
   --gray       #6E6E73   (secondary text)
   --gray-2     #AEAEB2   (tertiary/placeholder)
   --bg         #F5F5F7   (canvas)
   --card       #FFFFFF
   --line       rgba(0,0,0,0.06)

   Type: 'Inter' throughout (SF Pro-adjacent metrics), weight does
   the work instead of mixing families — one system font, like iOS.
============================================================ */

:root {
  --red: #e1142e;
  --red-dark: #b80f24;
  --red-tint: #fdecee;
  --ink: #1c1c1e;
  --gray: #6e6e73;
  --gray-2: #aeaeb2;
  --bg: #f5f5f7;
  --card: #ffffff;
  --line: rgba(0, 0, 0, 0.07);
}
* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
html,
body {
  margin: 0;
  height: 100%;
  background: #dcdce0;
  font-family: "Inter", sans-serif;
  color: var(--ink);
}
h1,
h2,
h3 {
  font-family: "Inter", sans-serif;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.01em;
}
button,
input,
textarea,
select {
  font-family: inherit;
}
button {
  border: none;
  background: none;
  cursor: pointer;
}
a {
  color: inherit;
  text-decoration: none;
}
img,
svg {
  display: block;
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Phone frame chrome ---------- */
.stage {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}
.phone {
  width: 100%;
  max-width: 420px;
  height: 860px;
  max-height: 92vh;
  background: var(--bg);
  border-radius: 44px;
  box-shadow:
    0 30px 60px rgba(0, 0, 0, 0.32),
    0 0 0 10px #0a0a0c;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}
.notch {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 140px;
  height: 26px;
  background: #0a0a0c;
  border-radius: 0 0 16px 16px;
  z-index: 40;
}
/* .screen {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  padding-bottom: 96px;
} */
.screen{
    flex:1;
    overflow-y:auto;
    overflow-x:hidden;

    padding-bottom:90px;
}
.screen::-webkit-scrollbar {
  display: none;
}
@media (max-width: 480px) {
  .stage {
    padding: 0;
  }
  .phone {
    max-width: 100%;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    box-shadow: none;
  }
  .notch {
    display: none;
  }
}

/* ---------- Large-title top bar ---------- */
.topbar {
  background: var(--bg);
  padding: 20px 20px 6px;
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.back-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  flex-shrink: 0;
}
.back-btn svg {
  width: 15px;
  height: 15px;
}
.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--red);
  flex-shrink: 0;
  position: relative;
}
.icon-btn svg {
  width: 16px;
  height: 16px;
}
.icon-btn.filled {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}
.dot-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--red);
  border: 2px solid var(--bg);
}
.large-title {
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--ink);
  margin-top: 12px;
  letter-spacing: -0.02em;
}
.large-title .accent {
  color: var(--red);
}
.subtitle {
  font-size: 0.82rem;
  color: var(--gray);
  margin-top: 2px;
}

/* ---------- Cards ---------- */
.card {
  background: var(--card);
  border-radius: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.03),
    0 10px 24px rgba(0, 0, 0, 0.035);
}

/* ---------- Stat cards ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 14px 20px 0;
}
.stat-card {
  background: var(--card);
  border-radius: 16px;
  padding: 14px 10px;
  border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}
.stat-card .num {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stat-card .lbl {
  font-size: 0.66rem;
  color: var(--gray);
  margin-top: 6px;
  line-height: 1.3;
  font-weight: 500;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 14px 20px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  transition:
    transform 0.15s ease,
    background 0.15s ease;
}
.btn:active {
  transform: scale(0.97);
  background: var(--red-dark);
}
.btn.block {
  width: 100%;
}
.btn svg {
  width: 16px;
  height: 16px;
}
.btn.outline {
  background: #fff;
  color: var(--red);
  border: 1.5px solid var(--red);
}
.btn.dark {
  background: var(--ink);
  color: #fff;
}
.btn.ghost {
  background: var(--bg);
  color: var(--ink);
}

/* ---------- Badges (status) ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}
.badge.approved {
  background: var(--red);
  color: #fff;
}
.badge.pending {
  background: #fff;
  color: var(--red);
  border: 1.5px solid var(--red);
}
.badge.rejected {
  background: var(--ink);
  color: #fff;
}

/* ---------- Bottom nav ---------- */
.bottomnav {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;

  z-index: 100;

  display: flex;
  justify-content: space-around;
  align-items: center;

  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);

  border-top: 1px solid var(--line);

  height: 78px;
  padding-bottom: env(safe-area-inset-bottom);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: var(--gray-2);
  padding: 4px 12px;
}
.nav-item.active {
  color: var(--red);
}
.nav-item svg {
  width: 22px;
  height: 22px;
}
.nav-item span {
  font-size: 0.62rem;
  font-weight: 600;
}

/* ---------- Search + chips ---------- */
.search-bar {
  margin: 12px 20px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #ececef;
  border-radius: 999px;
  padding: 11px 15px;
}
.search-bar svg {
  width: 16px;
  height: 16px;
  color: var(--gray);
  flex-shrink: 0;
}
.search-bar input {
  background: none;
  border: none;
  outline: none;
  font-size: 0.86rem;
  width: 100%;
  color: var(--ink);
}
.search-bar input::placeholder {
  color: var(--gray-2);
}
.chip-row {
  display: flex;
  gap: 8px;
  padding: 14px 20px 2px;
  overflow-x: auto;
}
.chip-row::-webkit-scrollbar {
  display: none;
}
.chip {
  flex-shrink: 0;
  padding: 8px 15px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: #ececef;
  color: var(--ink);
}
.chip.active {
  background: var(--red);
  color: #fff;
}

/* ---------- Section label ---------- */
.section-label {
  padding: 18px 20px 10px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.section-label h2 {
  font-size: 1.02rem;
  color: var(--ink);
  font-weight: 700;
}
.section-label span,
.section-label a {
  font-size: 0.74rem;
  color: var(--red);
  font-weight: 600;
}

/* ---------- List rows ---------- */
.list-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
}
.list-row .thumb {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--red-tint);
  color: var(--red);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.72rem;
}
.list-row .body {
  flex: 1;
  min-width: 0;
}
.list-row .top-line {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}
.list-row h4 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
}
.list-row .style-no {
  font-size: 0.74rem;
  color: var(--gray);
  margin-top: 2px;
}
.list-row .meta-row {
  display: flex;
  gap: 8px;
  margin-top: 9px;
  flex-wrap: wrap;
  align-items: center;
}
.tag {
  font-size: 0.68rem;
  color: var(--gray);
  background: var(--bg);
  padding: 4px 9px;
  border-radius: 999px;
  font-weight: 500;
}

/* ---------- Form fields ---------- */
.field {
  margin-bottom: 14px;
}
.field:last-child {
  margin-bottom: 0;
}
.field label {
  display: block;
  font-size: 0.76rem;
  color: var(--gray);
  margin-bottom: 7px;
  font-weight: 600;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 13px;
  font-size: 0.88rem;
  color: var(--ink);
  outline: none;
  background: #f7f7f8;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--red);
  background: #fff;
}
.field-row {
  display: flex;
  gap: 10px;
}
.field-row .field {
  flex: 1;
}

/* ---------- Upload dropzone ---------- */
.dropzone {
  border: 1.5px dashed var(--gray-2);
  border-radius: 16px;
  padding: 28px 16px;
  text-align: center;
  background: var(--card);
}
.dropzone svg {
  width: 30px;
  height: 30px;
  color: var(--red);
  margin: 0 auto 10px;
}
.dropzone p {
  font-size: 0.8rem;
  color: var(--gray);
  margin: 0;
}
.dropzone .file-name {
  margin-top: 10px;
  font-size: 0.78rem;
  color: var(--red);
  font-weight: 600;
}

/* ---------- Bottom sheet ---------- */
.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.sheet-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}
.sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 51;
  background: var(--bg);
  border-radius: 24px 24px 0 0;
  max-height: 82%;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(0.32, 0.72, 0.35, 1);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.18);
}
.sheet.open {
  transform: translateY(0);
}
.sheet-handle {
  width: 36px;
  height: 4px;
  background: var(--gray-2);
  border-radius: 99px;
  margin: 12px auto 4px;
}
.sheet-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 20px 14px;
}
.sheet-head h3 {
  font-size: 1.05rem;
  color: var(--ink);
  font-weight: 800;
}
.sheet-body {
  flex: 1;
  overflow-y: auto;
  padding: 4px 20px 24px;
}

/* ---------- Empty state ---------- */
.empty-state {
  padding: 50px 24px;
  text-align: center;
}
.empty-state svg {
  width: 44px;
  height: 44px;
  color: var(--gray-2);
  margin: 0 auto 14px;
}
.empty-state h3 {
  font-size: 0.98rem;
  color: var(--ink);
  margin-bottom: 6px;
}
.empty-state p {
  font-size: 0.82rem;
  color: var(--gray);
}

/* ---------- Toast ---------- */
.toast {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: #fff;
  padding: 11px 18px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
  z-index: 65;
  white-space: nowrap;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
