/* ==========================================================
   Aromatika Ops — Modern dashboard
   ========================================================== */

:root {
  --bg: #f7f5f0;
  --bg-elev: #fdfbf6;
  --bg-card: #ffffff;
  --ink: #1a1a1a;
  --ink-2: #5c5c5c;
  --ink-3: #9a9a9a;
  --line: #ece8df;
  --line-2: #ddd6c8;
  --accent: #b8541f;
  --accent-2: #d97a3e;
  --accent-soft: #fce9d8;
  --accent-tile-bg: #fce9d8;
  --accent-tile-fg: #b8541f;

  /* Stat card icon tiles - each metric gets a distinct soft pastel */
  --tile-1-bg: #fce9d8; --tile-1-fg: #b8541f;     /* terracotta */
  --tile-2-bg: #ede7f6; --tile-2-fg: #6b5cd1;     /* violet */
  --tile-3-bg: #e3eede; --tile-3-fg: #4a7a52;     /* green */
  --tile-4-bg: #fcedd3; --tile-4-fg: #b88a1f;     /* amber */
  --tile-5-bg: #fae3e3; --tile-5-fg: #c04848;     /* rose */
  --tile-6-bg: #d8eaf3; --tile-6-fg: #3a6b8a;     /* blue */
  --tile-7-bg: #ffe0d0; --tile-7-fg: #c25a1f;     /* peach */

  /* Status pills */
  --good: #2d7544; --good-soft: #dcf5e1;
  --warn: #b85a1f; --warn-soft: #ffedd5;
  --bad: #c04848; --bad-soft: #fce7e7;
  --info: #3a6b8a; --info-soft: #dde9f2;
  --soon: #c25a1f; --soon-soft: #ffe5d4;

  --shadow-xs: 0 1px 2px rgba(26, 26, 26, 0.04);
  --shadow-sm: 0 2px 6px rgba(26, 26, 26, 0.05);
  --shadow: 0 8px 24px -8px rgba(26, 26, 26, 0.08);
  --shadow-lg: 0 24px 64px -16px rgba(26, 26, 26, 0.18);
  --radius-sm: 7px;
  --radius: 12px;
  --radius-lg: 16px;
  --sidebar-w: 244px;
}

[data-theme="dark"] {
  --bg: #14110d;
  --bg-elev: #1c1814;
  --bg-card: #25201a;
  --ink: #f3ece1;
  --ink-2: #b8aea0;
  --ink-3: #7e7569;
  --line: #2e2820;
  --line-2: #3d362c;
  --accent: #e08a4e;
  --accent-2: #f0a06a;
  --accent-soft: #3a2618;
  --accent-tile-bg: #3a2618;
  --accent-tile-fg: #e08a4e;

  --tile-1-bg: #3a2618; --tile-1-fg: #e08a4e;
  --tile-2-bg: #2a2438; --tile-2-fg: #9e8fe5;
  --tile-3-bg: #1f2e1b; --tile-3-fg: #7aab6c;
  --tile-4-bg: #2e2614; --tile-4-fg: #d9b25a;
  --tile-5-bg: #2e1818; --tile-5-fg: #e08585;
  --tile-6-bg: #1a2530; --tile-6-fg: #6fa0c2;
  --tile-7-bg: #3a261a; --tile-7-fg: #e89060;

  --good: #7aab6c; --good-soft: #1f2e1b;
  --warn: #d9b25a; --warn-soft: #2e2614;
  --bad: #e08585; --bad-soft: #2e1818;
  --info: #6fa0c2; --info-soft: #1a2530;
  --soon: #e89060; --soon-soft: #3a261a;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.4);
  --shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 24px 64px -16px rgba(0, 0, 0, 0.7);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv11', 'ss01';
}
button, input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.font-mono { font-family: 'JetBrains Mono', 'Fira Code', monospace; }

.boot {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-3); font-size: 14px;
}

/* Scrollbar */
.scrollbar { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.scrollbar::-webkit-scrollbar { width: 8px; height: 8px; }
.scrollbar::-webkit-scrollbar-track { background: transparent; }
.scrollbar::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 999px; }
.scrollbar::-webkit-scrollbar-thumb:hover { background: var(--ink-3); }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.97); } to { opacity: 1; transform: scale(1); } }
.fade-up { animation: fadeUp 0.35s ease-out forwards; }

/* ==========================================================
   Layout
   ========================================================== */

.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--bg);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 14px 14px;
}

.sidebar-brand {
  padding: 4px 10px 28px;
}
.sidebar-brand-name {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.sidebar-brand-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  color: var(--accent);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
}
.sidebar-brand-sub {
  font-size: 11.5px;
  color: var(--ink-3);
  margin-top: 4px;
  padding-left: 1px;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 0 0 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-2);
  cursor: pointer;
  transition: all 0.15s;
  margin-bottom: 2px;
}
.nav-item:hover { background: var(--bg-card); color: var(--ink); }
.nav-item.active {
  background: var(--bg-card);
  color: var(--ink);
  font-weight: 600;
  box-shadow: var(--shadow-xs);
}
.nav-item.active svg { color: var(--accent); }
.nav-item svg { color: var(--ink-3); flex-shrink: 0; }

.sidebar-foot {
  margin-top: 8px;
  padding: 12px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 10px;
}
.avatar {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  display: grid; place-items: center;
  font-weight: 700; font-size: 14px;
  flex-shrink: 0;
}
.user-info { flex: 1; min-width: 0; }
.user-name { font-size: 13px; font-weight: 600; line-height: 1.2; color: var(--ink); }
.user-role { font-size: 11px; color: var(--ink-3); margin-top: 2px; }
.user-actions { display: flex; gap: 2px; }
.user-actions .btn-icon { padding: 6px; }

main {
  flex: 1;
  min-width: 0;
  padding: 32px 40px 60px;
  overflow-x: auto;
  position: relative;
}
.main-inner { max-width: 1500px; margin: 0 auto; }

/* ==========================================================
   Page header
   ========================================================== */

.page-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  color: var(--accent);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 6px;
}
.page-title {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--ink);
  margin: 0;
}
.page-title.lg { font-size: 36px; }
.page-sub {
  color: var(--ink-2);
  font-size: 14px;
  margin-top: 6px;
  max-width: 600px;
}
.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

/* ==========================================================
   Cards & surfaces
   ========================================================== */

.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
}

/* Stat card with icon tile */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-xs);
  transition: box-shadow 0.2s;
}
.stat-card:hover { box-shadow: var(--shadow-sm); }
.stat-icon-tile {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.stat-icon-tile svg { width: 20px; height: 20px; }
.stat-body { flex: 1; min-width: 0; }
.stat-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-2);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.stat-value {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--ink);
  line-height: 1.1;
}
.stat-value.sm { font-size: 22px; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

/* Insight panel (Fastest moving / Reorder suggestions style) */
.insight-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-xs);
}
.insight-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.insight-title {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 600;
  letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--ink-2);
}
.insight-title-icon {
  width: 28px; height: 28px;
  border-radius: 8px;
  display: grid; place-items: center;
  background: var(--accent-tile-bg);
  color: var(--accent-tile-fg);
}
.insight-title-icon svg { width: 14px; height: 14px; }
.insight-link {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent);
}
.insight-list { display: flex; flex-direction: column; gap: 10px; }
.insight-row {
  display: flex; align-items: center; gap: 12px;
  padding: 6px 0;
}
.insight-row + .insight-row { border-top: 1px solid var(--line); padding-top: 12px; }
.insight-thumb {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  display: grid; place-items: center;
  flex-shrink: 0;
  color: var(--ink-3);
}
.insight-thumb svg { width: 18px; height: 18px; }
.insight-name { flex: 1; font-size: 13.5px; font-weight: 500; color: var(--ink); min-width: 0; }
.insight-meta { font-size: 12.5px; color: var(--ink-2); margin-right: 6px; }

/* ==========================================================
   Forms
   ========================================================== */

.input, .select, textarea.input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 13.5px;
  color: var(--ink);
  transition: all 0.15s;
}
.input:focus, .select:focus, textarea.input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.input::placeholder { color: var(--ink-3); }
.input:disabled { background: var(--bg-elev); cursor: not-allowed; opacity: 0.7; }
textarea.input { resize: vertical; min-height: 80px; line-height: 1.5; }

select.input {
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  background-color: var(--bg-card);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1.5L6 6.5L11 1.5' stroke='%239a9a9a' stroke-width='1.5' stroke-linecap='round' fill='none'/></svg>") !important;
  background-repeat: no-repeat !important;
  background-position: right 14px center !important;
  background-size: 12px 8px !important;
  padding-right: 38px;
}
select.input::-ms-expand { display: none; }

.field-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-2);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.field-help {
  font-size: 11.5px;
  color: var(--ink-3);
  margin-top: 6px;
}

.search-wrap { position: relative; }
.search-wrap svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.search-wrap .input { padding-left: 38px; }

/* ==========================================================
   Buttons
   ========================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 15px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover:not(:disabled) {
  background: var(--accent-2);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn-ghost {
  background: var(--bg-card);
  color: var(--ink);
  border-color: var(--line-2);
}
.btn-ghost:hover:not(:disabled) {
  background: var(--bg-elev);
  border-color: var(--ink-3);
}

.btn-icon { padding: 8px; }
.btn-icon svg { width: 16px; height: 16px; }

/* ==========================================================
   Tables
   ========================================================== */

.tbl-wrap { overflow-x: auto; }
.tbl-wrap.maxh { max-height: 70vh; }
table.tbl {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
table.tbl th {
  background: transparent;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
  text-align: left;
  padding: 14px 16px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--bg-card);
}
table.tbl td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
  vertical-align: middle;
  color: var(--ink);
}
table.tbl tbody tr:last-child td { border-bottom: 0; }
table.tbl tbody tr { transition: background 0.1s; }
table.tbl tbody tr:hover td { background: var(--bg-elev); }
table.tbl td.muted { color: var(--ink-3); }

.empty-row {
  text-align: center;
  padding: 60px 20px;
  color: var(--ink-3);
}

.product-cell { display: flex; align-items: center; gap: 12px; }
.product-thumb {
  width: 32px; height: 32px;
  border-radius: 7px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  display: grid; place-items: center;
  color: var(--ink-3);
  flex-shrink: 0;
}
.product-thumb svg { width: 16px; height: 16px; }

/* Pagination */
.pagination {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
}
.pages { display: flex; align-items: center; gap: 4px; }
.page-btn {
  min-width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
  display: grid; place-items: center;
  padding: 0 10px;
}
.page-btn:hover:not(:disabled):not(.active) { background: var(--bg-elev); color: var(--ink); }
.page-btn.active { background: var(--accent); color: #fff; }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ==========================================================
   Pills / badges
   ========================================================== */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  background: var(--bg-elev);
  color: var(--ink-2);
  white-space: nowrap;
  border: 1px solid var(--line);
}
.pill.good { background: var(--good-soft); color: var(--good); border-color: transparent; }
.pill.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.pill.bad  { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.pill.info { background: var(--info-soft); color: var(--info); border-color: transparent; }
.pill.accent { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.pill.soon { background: var(--soon-soft); color: var(--soon); border-color: transparent; }

/* ==========================================================
   MODAL — bulletproof centered over content area
   ========================================================== */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 244px;
  right: 0;
  bottom: 0;
  background-color: rgba(26, 23, 20, 0.55);
  z-index: 9999;
  padding: 24px;
  overflow-y: auto;
  animation: fadeIn 0.18s ease-out;

  /* center child via flex */
  display: flex;
  align-items: flex-start;
  justify-content: center;
}
@supports (backdrop-filter: blur(6px)) {
  .modal-overlay {
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
  }
}
@media (max-width: 768px) {
  .modal-overlay { left: 0; padding: 0; }
}

.modal-card {
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 24px 64px -16px rgba(26, 26, 26, 0.25);
  width: 100%;
  max-width: 480px;
  margin: auto 0; /* vertical centering when content is short */
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: scaleIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-card.wide { max-width: 720px; }
.modal-card.xwide { max-width: 980px; }

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 16px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.modal-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0;
}
.modal-body {
  padding: 22px;
}
.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 22px;
  border-top: 1px solid var(--line);
  background-color: var(--bg-elev);
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .modal-card {
    border-radius: 0;
    margin: 0;
    min-height: 100vh;
    max-width: 100%;
  }
}

/* ==========================================================
   Form grids
   ========================================================== */

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px 16px;
}
.form-grid .col-span-2 { grid-column: span 2; }
.form-grid .col-span-3 { grid-column: span 3; }
@media (max-width: 900px) {
  .form-grid { grid-template-columns: 1fr 1fr; }
  .form-grid .col-span-3 { grid-column: span 2; }
}
@media (max-width: 600px) {
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .col-span-2, .form-grid .col-span-3 { grid-column: span 1; }
}

.divider { height: 1px; background: var(--line); margin: 4px 0; }

/* ==========================================================
   Filters bar
   ========================================================== */

.filters {
  display: grid;
  gap: 10px;
  padding: 14px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 16px;
  box-shadow: var(--shadow-xs);
}
.filters-2 { grid-template-columns: 2fr 1fr; }
.filters-3 { grid-template-columns: 2fr 1fr 1fr; }
.filters-4 { grid-template-columns: 2fr 1fr 1fr 1fr; }
.filters-5 { grid-template-columns: 2fr 1fr 1fr 1fr 1fr; }
@media (max-width: 880px) {
  .filters-2, .filters-3, .filters-4, .filters-5 { grid-template-columns: 1fr; }
}

/* ==========================================================
   Utilities
   ========================================================== */

.flex { display: flex; }
.inline-flex { display: inline-flex; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.flex-1 { flex: 1; min-width: 0; }
.flex-wrap { flex-wrap: wrap; }
.flex-col { flex-direction: column; }
.gap-1 { gap: 4px; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; } .gap-5 { gap: 20px; }
.mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; } .mt-5 { margin-top: 20px; } .mt-6 { margin-top: 24px; }
.mb-1 { margin-bottom: 4px; } .mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; } .mb-5 { margin-bottom: 20px; } .mb-6 { margin-bottom: 24px; }
.p-2 { padding: 8px; } .p-3 { padding: 12px; } .p-4 { padding: 16px; } .p-5 { padding: 20px; } .p-6 { padding: 24px; }
.pt-3 { padding-top: 12px; } .pt-4 { padding-top: 16px; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-xs { font-size: 11px; }
.text-sm { font-size: 12.5px; }
.text-base { font-size: 14px; }
.text-lg { font-size: 16px; }
.text-xl { font-size: 18px; }
.text-2xl { font-size: 22px; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.text-ink { color: var(--ink); }
.text-ink-2 { color: var(--ink-2); }
.text-ink-3 { color: var(--ink-3); }
.text-accent { color: var(--accent); }
.text-good { color: var(--good); }
.text-bad { color: var(--bad); }
.text-warn { color: var(--warn); }
.uppercase { text-transform: uppercase; }
.tracking-wide { letter-spacing: 0.04em; }
.tracking-widest { letter-spacing: 0.16em; }
.w-full { width: 100%; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.relative { position: relative; }
.absolute { position: absolute; }
.border-t { border-top: 1px solid var(--line); }
.border-b { border-bottom: 1px solid var(--line); }
.hidden { display: none; }

.grid { display: grid; }
.grid-2 { grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
@media (max-width: 880px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* ==========================================================
   Login
   ========================================================== */

.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  background:
    radial-gradient(circle at 20% 30%, var(--accent-soft) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, var(--accent-soft) 0%, transparent 50%),
    var(--bg);
}
.login-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 40px;
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 1;
}
.theme-toggle-fixed { position: absolute; top: 24px; right: 24px; z-index: 2; }
.login-title {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--ink);
}

/* ==========================================================
   Tabs
   ========================================================== */

.tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}
.tab {
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-3);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  transition: all 0.15s;
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ==========================================================
   Dropzone
   ========================================================== */

.dropzone {
  display: block;
  border: 2px dashed var(--line-2);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
  background: var(--bg-elev);
}
.dropzone:hover { background: var(--bg-card); border-color: var(--accent); }
.dropzone svg { color: var(--ink-3); margin-bottom: 8px; }

/* ==========================================================
   Photos
   ========================================================== */

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 8px;
}
.photo-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-elev);
  border: 1px solid var(--line);
}
.photo-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-item .photo-remove {
  position: absolute; top: 4px; right: 4px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border-radius: 50%;
  width: 22px; height: 22px;
  display: grid; place-items: center;
  opacity: 0;
  transition: opacity 0.15s;
}
.photo-item:hover .photo-remove { opacity: 1; }

/* ==========================================================
   Progress
   ========================================================== */

.progress { height: 6px; background: var(--bg-elev); border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--accent); transition: width 0.3s; }

/* ==========================================================
   Callout
   ========================================================== */

.callout {
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 18px;
}
.callout-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--accent);
  margin-bottom: 10px;
}

/* ==========================================================
   Mobile responsive
   ========================================================== */

@media (max-width: 768px) {
  .app-shell { flex-direction: column; }
  .sidebar {
    width: 100%; height: auto; position: static;
    flex-direction: row; align-items: center;
    padding: 12px 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .sidebar-brand { padding: 0; flex: 1; }
  .sidebar-brand-sub { display: none; }
  .sidebar-nav { display: none; }
  .sidebar-foot { margin: 0; padding: 6px 8px; flex-shrink: 0; background: transparent; border: 0; box-shadow: none; }
  .user-info { display: none; }
  main { padding: 24px 18px 40px; }
  .page-title { font-size: 24px; }
  .page-title.lg { font-size: 28px; }
}
