@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@300;400;500;600;700&display=swap');

:root {
  /* ── Фирменная палитра ── */
  --brand-light: #CDCDE4;
  --brand-mid:   #9C9FE0;
  --brand-deep:  #6B6ECC;
  --brand-ink:   #2D2B5E;
  --brand-ink-2: #5C5A8E;
  --brand-ink-3: #9896C2;

  /* ── Фоны и поверхности ── */
  --bg:        #F2F1F9;
  --surface:   #FFFFFF;
  --surface-2: #EAEBF5;
  --surface-3: #DDDDF0;

  /* ── Семантические цвета ── */
  --danger:       #B5395A;
  --danger-soft:  #FBF0F3;
  --success:      #3A7D68;
  --success-soft: #EDF7F4;
  --accent:       var(--brand-mid);
  --accent-soft:  #E8E9F9;
  --accent-dark:  var(--brand-deep);

  /* ── Радиусы ── */
  --r-sm: 12px;
  --r-md: 20px;
  --r-lg: 28px;
  --r-xl: 36px;

  /* ── Анимации ── */
  --ease:        cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ===== RESET ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--brand-ink);
  font-family: 'Nunito', -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

/* ===== UTILITIES ===== */
.hidden { display: none !important; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.btn-full { width: 100%; }

/* ===== LAYOUT ===== */
.phone-wrapper {
  max-width: 480px;
  margin: 0 auto;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ===== STATUS BAR ===== */
.status-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 20px 20px 8px;
  animation: slideDown 0.5s var(--ease) both;
}

.status-bar-spacer { flex: 1; }

.user-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--surface-3);
  font-size: 12px;
  font-weight: 600;
  color: var(--brand-ink-2);
  letter-spacing: 0.02em;
  box-shadow: 0 1px 4px rgba(45, 43, 94, 0.08);
}

.user-chip::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  flex-shrink: 0;
}

/* ===== HERO CARD ===== */
.card-main {
  margin: 12px 16px 0;
  border-radius: var(--r-xl);
  background: linear-gradient(145deg, var(--brand-ink) 0%, #3d3a80 100%);
  color: #fff;
  padding: 28px 28px 24px;
  position: relative;
  overflow: hidden;
  animation: slideUp 0.55s var(--ease) 0.05s both;
  box-shadow: 0 8px 32px rgba(45, 43, 94, 0.28);
}

.card-main::before {
  content: '';
  position: absolute;
  right: -40px;
  top: -50px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(156, 159, 224, 0.18) 0%, transparent 70%);
  pointer-events: none;
}

.card-main::after {
  content: 'AF';
  position: absolute;
  right: 10px;
  bottom: -20px;
  font-family: 'Nunito', sans-serif;
  font-size: 130px;
  font-weight: 600;
  color: rgba(205, 205, 228, 0.07);
  pointer-events: none;
  line-height: 1;
  letter-spacing: -3px;
}

.card-main .label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(205, 205, 228, 0.55);
  margin-bottom: 6px;
}

.card-main .value {
  font-family: 'Nunito', sans-serif;
  font-size: 54px;
  line-height: 1;
  letter-spacing: -1px;
  color: #fff;
  margin-bottom: 20px;
  font-weight: 600;
}

.card-main-footer {
  border-top: 1px solid rgba(205, 205, 228, 0.15);
  padding-top: 16px;
  font-family: 'Nunito', sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(205, 205, 228, 0.5);
  font-style: italic;
}

/* ===== CART BADGE ===== */
.cart-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--brand-mid);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s var(--ease-spring);
  box-shadow: 0 2px 8px rgba(107, 110, 204, 0.4);
}

/* ===== SEARCH BAR ===== */
.search-bar {
  position: relative;
  padding: 0 16px 10px;
  animation: slideDown 0.4s var(--ease) both;
}

.search-bar input {
  width: 100%;
  padding: 12px 40px 12px 18px;
  border: 1.5px solid var(--surface-3);
  border-radius: 999px;
  font-size: 14px;
  font-family: 'Nunito', sans-serif;
  background: var(--surface);
  color: var(--brand-ink);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.search-bar input:focus {
  outline: none;
  border-color: var(--brand-mid);
  box-shadow: 0 0 0 3px rgba(156, 159, 224, 0.2);
}

.search-bar input::placeholder { color: var(--brand-ink-3); }

.search-clear {
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-60%);
  border: none;
  background: none;
  font-size: 18px;
  color: var(--brand-ink-3);
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: color 0.15s var(--ease);
}

.search-clear:hover { color: var(--brand-deep); }

/* ===== BOTTOM NAVIGATION ===== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  background: var(--surface);
  border-top: 1.5px solid var(--surface-3);
  padding: 6px 0 max(6px, env(safe-area-inset-bottom));
  z-index: 100;
  box-shadow: 0 -4px 16px rgba(45, 43, 94, 0.06);
}

.nav-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  border: none;
  background: none;
  color: var(--brand-ink-3);
  font-size: 10px;
  font-weight: 600;
  font-family: 'Nunito', sans-serif;
  cursor: pointer;
  padding: 4px 0;
  position: relative;
  transition: color 0.2s var(--ease);
  -webkit-tap-highlight-color: transparent;
}

.nav-tab:active { transform: scale(0.93); }

.nav-tab.active { color: var(--brand-deep); }

.nav-icon-wrap {
  position: relative;
  width: 44px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  transition: background 0.25s var(--ease);
}

.nav-tab.active .nav-icon-wrap {
  background: var(--accent-soft);
}

.nav-tab.active .nav-icon-wrap svg {
  stroke: var(--brand-deep);
}

.nav-label {
  letter-spacing: 0.01em;
  transition: color 0.2s var(--ease);
}

.nav-badge {
  position: absolute;
  top: -2px;
  right: 2px;
  min-width: 15px;
  height: 15px;
  border-radius: 999px;
  background: var(--brand-mid);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  box-shadow: 0 2px 6px rgba(107, 110, 204, 0.4);
}

/* ===== BOTTOM CARD ===== */
.card-bottom {
  background: var(--surface);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  margin-top: 12px;
  padding: 20px 16px 16px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  color: var(--brand-ink);
  animation: slideUp 0.55s var(--ease) 0.15s both;
  border-top: 1px solid var(--surface-3);
}

/* ===== CONTENT AREA ===== */
.content {
  flex: 1;
  overflow-y: auto;
  padding-right: 2px;
  padding-bottom: 72px;
  transition: opacity 0.15s var(--ease);
  scrollbar-width: thin;
  scrollbar-color: var(--surface-3) transparent;
}

.content::-webkit-scrollbar { width: 4px; }
.content::-webkit-scrollbar-track { background: transparent; }
.content::-webkit-scrollbar-thumb {
  background: var(--surface-3);
  border-radius: 999px;
}

/* ===== SECTION TITLES ===== */
.section-title {
  font-family: 'Nunito', sans-serif;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--brand-ink);
  margin-bottom: 4px;
}

.section-subtitle {
  font-size: 12px;
  color: var(--brand-ink-3);
  margin-bottom: 14px;
  line-height: 1.5;
}

/* ===== PILLS ===== */
.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.pill {
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  border: 1.5px solid var(--surface-3);
  background: transparent;
  color: var(--brand-ink-2);
  cursor: pointer;
  transition: all 0.2s var(--ease);
  font-family: 'Nunito', sans-serif;
}

.pill:hover {
  border-color: var(--brand-mid);
  color: var(--brand-deep);
  background: var(--accent-soft);
}

.pill.active {
  background: var(--brand-ink);
  color: #fff;
  border-color: var(--brand-ink);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(45, 43, 94, 0.2);
}

.pill:active { transform: scale(0.95); }

/* ===== SAMPLE LISTS ===== */
.sample-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sample-list.sample-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.sample-list.sample-grid .empty-state-full {
  grid-column: 1 / -1;
}

/* ===== PRODUCT CARD ===== */
.product-card {
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--surface-3);
  color: var(--brand-ink);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
  animation: cardIn 0.35s var(--ease) backwards;
}

.product-card:nth-child(1)  { animation-delay: 0.03s; }
.product-card:nth-child(2)  { animation-delay: 0.06s; }
.product-card:nth-child(3)  { animation-delay: 0.09s; }
.product-card:nth-child(4)  { animation-delay: 0.12s; }
.product-card:nth-child(5)  { animation-delay: 0.15s; }
.product-card:nth-child(6)  { animation-delay: 0.18s; }
.product-card:nth-child(n+7){ animation-delay: 0.21s; }

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(45, 43, 94, 0.1);
}

.product-card:active { transform: scale(0.98); }

.product-card-image {
  aspect-ratio: 1;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* Лёгкий скелетон пока фото грузится */
.product-card-image::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--surface-2) 0%, rgba(255,255,255,0.06) 50%, var(--surface-2) 100%);
  background-size: 200% 100%;
  animation: imagePlaceholder 1.2s ease-in-out infinite;
  pointer-events: none;
}

.product-card-image:has(img.loaded)::before { display: none; }

@keyframes imagePlaceholder {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.product-card-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(45, 43, 94, 0.04) 100%);
  pointer-events: none;
}

.product-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.4s var(--ease);
}

.product-card-image img.loaded {
  opacity: 1;
}

.product-card:hover .product-card-image img {
  transform: scale(1.04);
}

.product-card-image-placeholder {
  width: 40px;
  height: 40px;
  opacity: 0.2;
}

.product-card-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 2px;
}

.product-card-article {
  font-size: 9px;
  color: var(--brand-ink-3);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.product-card-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--brand-ink);
  letter-spacing: -0.01em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card-meta {
  font-size: 11px;
  color: var(--brand-ink-3);
  margin-top: 2px;
}

.product-card-btn {
  margin-top: auto;
  padding-top: 10px;
  display: flex;
  gap: 6px;
}

/* ===== BUTTONS ===== */
.btn-primary {
  display: block;
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, var(--brand-mid) 0%, var(--brand-deep) 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  font-family: 'Nunito', sans-serif;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  letter-spacing: 0.01em;
  box-shadow: 0 4px 16px rgba(107, 110, 204, 0.35);
}

.btn-primary:hover {
  box-shadow: 0 6px 24px rgba(107, 110, 204, 0.45);
  transform: translateY(-1px);
}

.btn-primary:active { transform: scale(0.98); }

.btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  display: block;
  width: 100%;
  padding: 12px;
  border: 1.5px solid var(--surface-3);
  border-radius: var(--r-md);
  background: transparent;
  color: var(--brand-ink-2);
  font-size: 14px;
  font-weight: 600;
  font-family: 'Nunito', sans-serif;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}

.btn-secondary:hover {
  border-color: var(--brand-mid);
  color: var(--brand-deep);
  background: var(--accent-soft);
}

.btn-secondary:active { transform: scale(0.98); }

.btn-icon {
  flex: 1;
  padding: 8px 10px;
  border: 1.5px solid var(--surface-3);
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--brand-ink-2);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s var(--ease);
  font-family: 'Nunito', sans-serif;
  white-space: nowrap;
  text-align: center;
}

.btn-icon:hover {
  border-color: var(--brand-mid);
  color: var(--brand-deep);
  background: var(--accent-soft);
}

.btn-icon:active { transform: scale(0.96); }

.btn-icon.active,
.btn-icon.in-cart {
  background: var(--brand-ink);
  color: #fff;
  border-color: var(--brand-ink);
}

.btn-add-cart {
  flex: 1;
  padding: 9px;
  border: none;
  border-radius: var(--r-sm);
  background: linear-gradient(135deg, var(--brand-mid) 0%, var(--brand-deep) 100%);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s var(--ease-spring);
  font-family: 'Nunito', sans-serif;
  text-align: center;
  box-shadow: 0 2px 8px rgba(107, 110, 204, 0.3);
}

.btn-add-cart.in-cart {
  background: linear-gradient(135deg, var(--brand-light) 0%, var(--brand-mid) 100%);
  box-shadow: none;
}

.btn-add-cart:active { transform: scale(0.94); }

/* ===== FORM ELEMENTS ===== */
.form-group { margin-bottom: 12px; }

.form-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--brand-ink-3);
  margin-bottom: 6px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  border: 1.5px solid var(--surface-3);
  background: var(--bg);
  color: var(--brand-ink);
  font-size: 14px;
  font-family: 'Nunito', sans-serif;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
  appearance: none;
  -webkit-appearance: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--brand-mid);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(156, 159, 224, 0.2);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--brand-ink-3);
}

.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239896C2' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.form-textarea {
  resize: vertical;
  min-height: 80px;
}

/* ===== SEARCH ===== */
.search-wrap {
  position: relative;
  margin-bottom: 14px;
}

.search-wrap input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--surface-3);
  background: var(--bg);
  color: var(--brand-ink);
  font-size: 14px;
  font-family: 'Nunito', sans-serif;
  transition: all 0.2s var(--ease);
}

.search-wrap input:focus {
  outline: none;
  border-color: var(--brand-mid);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(156, 159, 224, 0.2);
}

.search-wrap .btn-primary {
  display: block;
  width: 100%;
  margin-top: 12px;
}

/* ===== CART & MY SAMPLES ===== */
.cart-item,
.my-sample-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--r-md);
  background: var(--bg);
  border: 1px solid var(--surface-3);
  transition: all 0.2s var(--ease);
}

.cart-item-thumb,
.my-sample-thumb {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--surface-2);
}

.cart-item-thumb img,
.my-sample-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item-info,
.my-sample-info { flex: 1; min-width: 0; }

.cart-item-name,
.my-sample-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-ink);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item-code,
.my-sample-code {
  font-size: 10px;
  color: var(--brand-ink-3);
  margin-top: 2px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cart-item-remove {
  padding: 6px 8px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--brand-ink-3);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  transition: all 0.15s var(--ease);
  flex-shrink: 0;
}

.cart-item-remove:hover {
  background: var(--danger-soft);
  color: var(--danger);
}

/* ===== STATUS BADGES ===== */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.status-badge.active  { background: var(--success-soft); color: var(--success); }
.status-badge.overdue { background: var(--danger-soft);  color: var(--danger);  }
.status-badge.pending { background: var(--accent-soft);  color: var(--brand-deep); }

/* ===== MISC ===== */
.divider {
  height: 1px;
  background: var(--surface-3);
  margin: 14px 0;
}

.info-note {
  font-size: 11px;
  color: var(--brand-ink-3);
  margin-top: 6px;
  line-height: 1.5;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
  gap: 8px;
  color: var(--brand-ink-3);
}

.empty-state-icon { font-size: 32px; opacity: 0.35; margin-bottom: 4px; }
.empty-state p { font-size: 13px; line-height: 1.5; }
.empty-state-full { grid-column: 1 / -1; }

.bottom-bar { display: none; }

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 76px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--brand-ink);
  color: #fff;
  padding: 11px 20px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  font-family: 'Nunito', sans-serif;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s var(--ease-spring);
  box-shadow: 0 8px 32px rgba(45, 43, 94, 0.25);
  z-index: 9999;
  max-width: 90%;
  text-align: center;
  white-space: nowrap;
}

.toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===== RADIO PILLS ===== */
.radio-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }

.radio-pill {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--surface-3);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  color: var(--brand-ink-2);
  transition: all 0.2s var(--ease);
  font-family: 'Nunito', sans-serif;
}

.radio-pill:hover {
  border-color: var(--brand-mid);
  color: var(--brand-deep);
  background: var(--accent-soft);
}

.radio-pill.active {
  background: var(--brand-ink);
  color: #fff;
  border-color: var(--brand-ink);
  font-weight: 700;
}

.radio-pill:active { transform: scale(0.95); }

/* ===== RETURN FORM ===== */
.return-form-wrap {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1.5px solid var(--surface-3);
  animation: slideDown 0.3s var(--ease);
}

/* ===== ADMIN PANEL ===== */
#viewContainer.admin-view .admin-login-wrap,
#viewContainer.admin-view .admin-panel { padding: 4px 0; }

.admin-login-wrap .section-title { margin-bottom: 16px; }

.admin-login-error {
  color: var(--danger);
  font-size: 13px;
  margin-bottom: 10px;
  padding: 10px 14px;
  border-radius: var(--r-sm);
  background: var(--danger-soft);
}

.admin-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  border: 1.5px solid var(--surface-3);
  background: var(--bg);
  color: var(--brand-ink);
  font-size: 15px;
  font-family: 'Nunito', sans-serif;
  margin-bottom: 12px;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.admin-input:focus {
  outline: none;
  border-color: var(--brand-mid);
  box-shadow: 0 0 0 3px rgba(156, 159, 224, 0.2);
}

.admin-input::placeholder { color: var(--brand-ink-3); }

.admin-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  gap: 8px;
}

.admin-title { font-weight: 700; font-size: 15px; color: var(--brand-ink); }

.admin-btn-back,
.admin-btn-logout {
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border: 1.5px solid var(--surface-3);
  cursor: pointer;
  background: transparent;
  color: var(--brand-ink-2);
  font-family: 'Nunito', sans-serif;
  transition: all 0.2s var(--ease);
}

.admin-btn-back:hover {
  border-color: var(--brand-mid);
  color: var(--brand-deep);
  background: var(--accent-soft);
}

.admin-btn-logout {
  border-color: rgba(181, 57, 90, 0.25);
  color: var(--danger);
}

.admin-btn-logout:hover { background: var(--danger-soft); }

.admin-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  background: var(--surface-2);
  border-radius: var(--r-md);
  padding: 4px;
  flex-wrap: nowrap;
}

.admin-tab {
  flex: 1;
  padding: 9px 8px;
  border-radius: calc(var(--r-md) - 4px);
  border: none;
  background: transparent;
  color: var(--brand-ink-3);
  font-size: 12px;
  font-weight: 600;
  font-family: 'Nunito', sans-serif;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  white-space: nowrap;
  text-align: center;
}

.admin-tab.active {
  background: var(--surface);
  color: var(--brand-ink);
  box-shadow: 0 1px 4px rgba(45, 43, 94, 0.1);
}

.admin-tab .admin-badge {
  margin-left: 4px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 10px;
  background: var(--surface-3);
  color: var(--brand-ink-2);
}

.admin-tab.active .admin-badge {
  background: var(--brand-mid);
  color: #fff;
}

.admin-tab-content { display: none; }
.admin-tab-content.visible { display: block; }

.admin-card {
  background: var(--bg);
  border-radius: var(--r-md);
  padding: 14px;
  margin-bottom: 10px;
  border: 1px solid var(--surface-3);
}

.admin-card-header {
  font-weight: 700;
  color: var(--brand-ink);
  margin-bottom: 6px;
  font-size: 13px;
}

.admin-card-meta {
  color: var(--brand-ink-2);
  font-size: 12px;
  margin-bottom: 4px;
  line-height: 1.4;
}

.admin-card-list {
  font-size: 12px;
  color: var(--brand-ink-2);
  margin: 8px 0;
  padding-left: 16px;
}

.admin-card-list li { margin: 3px 0; }

.admin-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.admin-card-actions button {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  transition: all 0.2s var(--ease);
}

.admin-btn-approve {
  background: linear-gradient(135deg, #3A7D68, #2e6453);
  color: #fff;
  box-shadow: 0 2px 8px rgba(58, 125, 104, 0.3);
}

.admin-btn-approve:hover { box-shadow: 0 4px 14px rgba(58, 125, 104, 0.4); }

.admin-btn-reject {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1.5px solid rgba(181, 57, 90, 0.2);
}

.admin-btn-reject:hover { background: #f8e4e8; }

.admin-card-actions button:disabled { opacity: 0.5; cursor: not-allowed; }

.admin-empty {
  text-align: center;
  color: var(--brand-ink-3);
  padding: 32px 16px;
  font-size: 13px;
}

.admin-table-wrap {
  overflow-x: auto;
  border-radius: var(--r-sm);
  border: 1px solid var(--surface-3);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  background: var(--bg);
}

.admin-table th,
.admin-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--surface-3);
  color: var(--brand-ink);
}

.admin-table th {
  background: var(--surface-2);
  font-weight: 700;
  color: var(--brand-ink-3);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.admin-row-overdue td { background: var(--danger-soft); }

/* ===== ANIMATIONS ===== */
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(8px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--brand-mid);
  outline-offset: 2px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 360px) {
  .product-card-title { font-size: 12px; }
  .nav-label { font-size: 9px; }
}
