:root {
  --bg: #f3f4f6;
  --surface: #ffffff;
  --surface-soft: #f8f8f8;
  --surface-muted: #f7f7f9;
  --text: #171717;
  --muted: #737373;
  --line: #ececec;
  --primary: #f5a623;
  --primary-dark: #d48806;
  --primary-deep: #b56e00;
  --success: #3bb273;
  --danger: #e35d5d;
  --warning: #f0ad4e;
  --shadow: 0 16px 38px rgba(0, 0, 0, 0.08);
  --shadow-strong: 0 24px 44px rgba(181, 110, 0, 0.3);
  --phone-max: 430px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100dvh;
  color: var(--text);
  background: linear-gradient(180deg, #f6c15b 0 190px, #eef0f3 190px 100%);
  font-family: "Segoe UI", "Aptos", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
  min-height: 100dvh;
}

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

button {
  border: none;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[role="button"]:focus-visible {
  outline: 2px solid rgba(212, 136, 6, 0.45);
  outline-offset: 2px;
}

.app-shell {
  width: 100%;
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  padding: 18px 12px 22px;
}

.phone {
  width: 100%;
  max-width: var(--phone-max);
  height: calc(100dvh - 36px);
  background: var(--surface);
  border-radius: 34px;
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(0, 0, 0, 0.04);
}

@media (max-width: 480px) {
  .app-shell {
    padding: 0;
  }

  .phone {
    max-width: 100%;
    height: 100dvh;
    border-radius: 0;
    box-shadow: none;
    border: none;
  }
}

.screen {
  display: none;
  min-height: 100%;
}

.screen.active {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
}

.login-screen {
  justify-content: center;
  padding: calc(28px + var(--safe-top)) 26px calc(24px + var(--safe-bottom));
  background:
    radial-gradient(circle at left top, rgba(245, 166, 35, 0.2) 0 30%, transparent 31%),
    radial-gradient(circle at right bottom, rgba(245, 166, 35, 0.12) 0 24%, transparent 25%),
    #fff;
}

.brand-badge {
  width: 78px;
  height: 78px;
  border-radius: 24px;
  background: linear-gradient(145deg, var(--primary), var(--primary-dark));
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 30px;
  font-weight: 800;
  margin: 0 auto 18px;
  box-shadow: 0 18px 34px rgba(245, 166, 35, 0.26);
}

.login-title {
  text-align: center;
  font-size: 2rem;
  margin: 0;
  letter-spacing: 0.08em;
  font-weight: 800;
}

.login-subtitle {
  text-align: center;
  margin: 10px 0 34px;
  color: var(--muted);
  font-size: 0.96rem;
}

.field {
  background: #fafafa;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 15px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.field input {
  border: none;
  outline: none;
  background: transparent;
  width: 100%;
  font-size: 1rem;
  color: var(--text);
}

.field-icon {
  color: var(--muted);
  font-size: 1.05rem;
}

.login-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 10px 2px 22px;
  color: var(--muted);
  font-size: 0.92rem;
}

.btn {
  border-radius: 16px;
  min-height: 52px;
  width: 100%;
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.16s ease, opacity 0.16s ease, box-shadow 0.16s ease;
}

.btn:active {
  transform: scale(0.985);
}

.btn-primary {
  background: linear-gradient(180deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 12px 24px rgba(245, 166, 35, 0.25);
}

.btn-secondary {
  background: #fff5df;
  color: var(--primary-deep);
  box-shadow: inset 0 0 0 1px rgba(212, 136, 6, 0.14);
}

.btn-danger {
  background: #fff0f0;
  color: #bb3f3f;
  box-shadow: inset 0 0 0 1px rgba(227, 93, 93, 0.16);
}

.btn:disabled {
  opacity: 0.56;
  cursor: not-allowed;
  box-shadow: none;
}

.login-footer {
  margin-top: 18px;
  text-align: center;
  color: var(--muted);
  font-size: 0.94rem;
}

.app-screen {
  background: var(--bg);
  flex: 1;
  position: relative;
  overflow: hidden;
}

.main-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-bottom: calc(164px + var(--safe-bottom));
}

.tab-screen {
  display: none;
  min-height: 100%;
}

.tab-screen.active {
  display: block;
  animation: viewIn 220ms ease;
}

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

.top-wrap {
  background: linear-gradient(180deg, #f7b21b 0, #f1a316 100%);
  padding: calc(18px + var(--safe-top)) 18px 86px;
  color: #fff;
  border-bottom-left-radius: 28px;
  border-bottom-right-radius: 28px;
}

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

.icon-btn {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.16);
  display: grid;
  place-items: center;
  font-size: 1.08rem;
  color: #fff;
  backdrop-filter: blur(6px);
  cursor: pointer;
}

.icon-btn[data-badge]::after {
  content: attr(data-badge);
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: #fff;
  color: var(--primary-deep);
  font-size: 0.72rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

.hello {
  font-size: 0.92rem;
  opacity: 0.9;
}

.dashboard-title {
  font-size: 1.45rem;
  font-weight: 800;
  margin-top: 4px;
}

.dashboard-subtitle {
  margin: 10px 0 0;
  max-width: 320px;
  font-size: 0.92rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.9);
}

.sticky-page-head {
  position: sticky;
  top: 0;
  z-index: 4;
  padding-top: calc(8px + var(--safe-top));
  background: linear-gradient(180deg, rgba(243, 244, 246, 0.98), rgba(243, 244, 246, 0.9));
  backdrop-filter: blur(12px);
}

.page-hero {
  margin: 10px 18px 14px;
  padding: 22px 20px;
  border-radius: 24px;
  background: linear-gradient(145deg, #fff8eb, #ffffff);
  box-shadow: var(--shadow);
}

.compact-hero {
  margin-top: 8px;
}

.analytics-hero {
  background: linear-gradient(145deg, #fff3d9, #ffffff);
}

.finance-hero {
  background: linear-gradient(145deg, #fff0d5, #ffffff);
}

.profile-hero {
  background: linear-gradient(145deg, #fff6e0, #ffffff);
}

.page-kicker {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--primary-deep);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.page-hero h2 {
  margin: 8px 0 6px;
  font-size: 1.5rem;
}

.page-hero p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
  font-size: 0.94rem;
}

.hero-actions {
  margin-top: 18px;
  display: flex;
  gap: 10px;
}

.hero-btn {
  min-height: 46px;
}

.stats-grid {
  margin: -64px 18px 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  position: relative;
  z-index: 2;
}

.stat-card,
.mini-card,
.sales-stat-card,
.finance-card,
.profile-card,
.search-wrap,
.section-card,
.toolbar-card,
.action-card {
  background: #fff;
  box-shadow: var(--shadow);
}

.stat-card {
  border-radius: 22px;
  padding: 16px;
  min-height: 98px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.stat-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  background: #fff6df;
  flex-shrink: 0;
}

.stat-card:nth-child(2) .stat-icon {
  background: #eef7ff;
}

.stat-card:nth-child(3) .stat-icon {
  background: #edf9f1;
}

.stat-card:nth-child(4) .stat-icon {
  background: #fff0f0;
}

.stat-label {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.2;
}

.stat-value {
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1;
}

.panel-grid,
.sales-grid,
.finance-grid,
.earnings-grid {
  margin: 0 18px 14px;
  display: grid;
  gap: 12px;
}

.panel-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.sales-grid,
.finance-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.earnings-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.home-overview-grid {
  margin-top: 0;
}

.mini-card,
.sales-stat-card,
.finance-card {
  border-radius: 18px;
  padding: 15px;
}

.mini-label,
.sales-stat-label,
.finance-card-label,
.earnings-label {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

.mini-value,
.sales-stat-value,
.finance-card-value,
.earnings-profit {
  margin-top: 10px;
  font-size: 1.15rem;
  font-weight: 800;
}

.earnings-card {
  border-radius: 18px;
  padding: 15px;
  background: #fff;
  box-shadow: var(--shadow);
}

.earnings-revenue {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.82rem;
}

.action-grid {
  margin: 0 18px 14px;
  display: grid;
  gap: 12px;
}

.action-card {
  width: 100%;
  border-radius: 20px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  cursor: pointer;
}

.action-icon {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: #fff3d9;
  color: var(--primary-deep);
  font-size: 1.25rem;
  flex-shrink: 0;
}

.action-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.action-title {
  font-size: 0.95rem;
  font-weight: 800;
}

.action-subtitle {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.search-wrap,
.section-card,
.toolbar-card,
.filter-summary {
  margin: 0 18px 14px;
  border-radius: 18px;
}

.search-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  color: var(--muted);
}

.search-icon {
  font-size: 1rem;
}

.search-wrap input {
  border: none;
  outline: none;
  width: 100%;
  font-size: 0.96rem;
  background: transparent;
}

.toolbar-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
}

.toolbar-label {
  font-size: 0.92rem;
  font-weight: 800;
}

.toolbar-select {
  width: 170px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  padding: 10px 12px;
  color: var(--text);
}

.narrow-select {
  width: 160px;
}

.filter-summary {
  min-height: 54px;
  padding: 10px 12px;
  background: #fff;
  box-shadow: var(--shadow);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-chip {
  padding: 8px 12px;
  border-radius: 999px;
  background: #fff4de;
  color: var(--primary-deep);
  font-size: 0.8rem;
  font-weight: 700;
}

.section-card {
  padding-bottom: 8px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 16px 16px 6px;
}

.section-title {
  font-size: 1rem;
  font-weight: 800;
}

.section-caption {
  color: var(--muted);
  font-size: 0.84rem;
}

.chip-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 6px 16px 4px;
  scrollbar-width: none;
}

.chip-row::-webkit-scrollbar {
  display: none;
}

.chip {
  flex: 0 0 auto;
  padding: 10px 14px;
  border-radius: 999px;
  background: #f5f5f5;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.chip.active {
  background: #fff4de;
  color: var(--primary-dark);
  border-color: #ffe1a0;
}

.range-row {
  padding-top: 0;
  margin: 0 10px 10px;
}

.item-list,
.inventory-list,
.history-list,
.alert-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.item-list,
.inventory-list {
  padding: 8px 12px 14px;
}

.history-list {
  padding: 0 0 4px;
}

.item-card,
.inventory-card,
.history-item,
.alert-item,
.chart-legend-item {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.item-card,
.alert-item {
  width: 100%;
  padding: 12px;
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 12px;
  align-items: center;
  text-align: left;
  cursor: pointer;
}

.alert-item {
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.inventory-card {
  padding: 14px;
}

.inventory-card-main {
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 12px;
  align-items: center;
  cursor: pointer;
  text-align: left;
}

.inventory-card-meta {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.inventory-card-actions {
  margin-top: 14px;
  display: flex;
  gap: 10px;
}

.inventory-action-btn {
  flex: 1;
  min-height: 40px;
  border-radius: 12px;
  background: linear-gradient(180deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.inventory-action-btn.secondary {
  background: #fff5df;
  color: var(--primary-deep);
}

.inventory-action-btn.danger {
  background: #fff0f0;
  color: #bb3f3f;
}

.avatar,
.detail-avatar {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #fff;
  font-size: 0.9rem;
  background: linear-gradient(145deg, #ffbc42, #f28c28);
}

.avatar-blue,
.detail-avatar.avatar-blue {
  background: linear-gradient(145deg, #8bc6ec, #4a90e2);
}

.avatar-green,
.detail-avatar.avatar-green {
  background: linear-gradient(145deg, #7cd992, #3bb273);
}

.avatar-purple,
.detail-avatar.avatar-purple {
  background: linear-gradient(145deg, #c89ef2, #7a5cff);
}

.avatar-orange,
.detail-avatar.avatar-orange {
  background: linear-gradient(145deg, #ffca7b, #f28c28);
}

.avatar-slate,
.detail-avatar.avatar-slate {
  background: linear-gradient(145deg, #7d8ca3, #50627b);
}

.avatar-red,
.detail-avatar.avatar-red {
  background: linear-gradient(145deg, #ff9f93, #e85d5d);
}

.avatar-teal,
.detail-avatar.avatar-teal {
  background: linear-gradient(145deg, #8eddd2, #2ea59b);
}

.avatar-brown,
.detail-avatar.avatar-brown {
  background: linear-gradient(145deg, #c8a882, #8d633f);
}

.avatar-gray,
.detail-avatar.avatar-gray {
  background: linear-gradient(145deg, #b8b8c8, #7f8190);
}

.item-copy {
  min-width: 0;
}

.item-name {
  font-size: 0.96rem;
  font-weight: 800;
}

.item-meta,
.item-submeta {
  color: var(--muted);
  line-height: 1.45;
}

.item-meta {
  font-size: 0.82rem;
  margin-top: 3px;
}

.item-submeta {
  font-size: 0.78rem;
  margin-top: 2px;
}

.item-side {
  text-align: right;
}

.item-price {
  font-weight: 800;
  font-size: 0.95rem;
}

.item-qty,
.item-profit {
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 4px;
}

.item-profit {
  color: var(--success);
  font-weight: 700;
}

.status {
  display: inline-flex;
  align-items: center;
  margin-top: 7px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
}

.status.available {
  background: #edf9f1;
  color: #238552;
}

.status.sold {
  background: #fff0f0;
  color: #bb3f3f;
}

.age-badge,
.detail-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff5df;
  color: var(--primary-deep);
  font-size: 0.76rem;
  font-weight: 800;
}

.age-badge.is-alert-30 {
  background: #fff6e8;
  color: #ba7b15;
}

.age-badge.is-alert-60 {
  background: #fff2d8;
  color: #af6a00;
}

.age-badge.is-alert-90 {
  background: #fff0f0;
  color: #bb3f3f;
}

.profile-card {
  margin: 0 18px 14px;
  padding: 18px;
  border-radius: 22px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.profile-avatar {
  width: 58px;
  height: 58px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  font-weight: 800;
  background: linear-gradient(145deg, var(--primary), var(--primary-dark));
  color: #fff;
}

.profile-name {
  font-size: 1.05rem;
  font-weight: 800;
}

.profile-email {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.9rem;
}

.detail-list {
  padding: 0 16px 16px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
}

.detail-row:first-child {
  border-top: none;
}

.detail-row span {
  color: var(--muted);
}

.detail-row strong {
  text-align: right;
}

.tools-stack {
  display: grid;
  gap: 10px;
  padding: 0 16px 16px;
}

.empty-state {
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  padding: 26px 16px;
}

.bottom-nav {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  height: calc(102px + var(--safe-bottom));
  padding: 10px 10px calc(14px + var(--safe-bottom));
  background: linear-gradient(180deg, var(--primary), var(--primary-dark));
  border-radius: 30px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: end;
  gap: 4px;
  color: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-strong);
  z-index: 10;
}

.nav-item {
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
  padding: 0 0 4px;
  color: rgba(255, 255, 255, 0.68);
  cursor: pointer;
  transition: color 0.16s ease, transform 0.16s ease;
}

.nav-item.active {
  color: #fff;
}

.nav-icon-wrap {
  width: 42px;
  height: 42px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  transition: background 0.16s ease, transform 0.16s ease;
}

.nav-item.active .nav-icon-wrap {
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.nav-icon {
  font-size: 1.05rem;
  line-height: 1;
}

.nav-label {
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.1;
}

.fab-wrap {
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.fab {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 5px solid rgba(255, 255, 255, 0.95);
  background: linear-gradient(180deg, #ffcb58, #f5a623);
  color: #fff;
  font-size: 2rem;
  display: grid;
  place-items: center;
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.2);
  transform: translateY(-28px);
  cursor: pointer;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.36);
  display: none;
  align-items: flex-end;
  z-index: 20;
}

.modal-backdrop.show {
  display: flex;
}

.panel-backdrop {
  align-items: flex-start;
  justify-content: flex-end;
  padding: calc(16px + var(--safe-top)) 16px 0;
}

.sheet,
.floating-panel {
  width: 100%;
  background: #fff;
  box-shadow: 0 -18px 38px rgba(0, 0, 0, 0.12);
}

.sheet {
  border-top-left-radius: 28px;
  border-top-right-radius: 28px;
  padding: 18px 18px calc(20px + var(--safe-bottom));
  max-height: 88dvh;
  overflow-y: auto;
}

.floating-panel {
  max-width: 360px;
  border-radius: 24px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.detail-sheet {
  padding-bottom: calc(28px + var(--safe-bottom));
}

.sheet-handle {
  width: 52px;
  height: 5px;
  border-radius: 999px;
  background: #ddd;
  margin: 0 auto 14px;
}

.sheet-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.sheet-title {
  font-size: 1.15rem;
  font-weight: 800;
}

.sheet-subtitle {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 4px;
  line-height: 1.45;
}

.close-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #f4f4f4;
  font-size: 1.05rem;
  cursor: pointer;
  flex-shrink: 0;
}

.mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: #f5f5f5;
  border-radius: 14px;
  padding: 6px;
  margin-bottom: 16px;
}

.mode-btn {
  min-height: 42px;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
}

.mode-btn.active {
  background: #fff;
  color: var(--text);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

.form-grid {
  display: grid;
  gap: 12px;
}

.form-grid.two {
  grid-template-columns: 1fr 1fr;
}

.input-wrap {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.input-wrap label {
  font-size: 0.86rem;
  color: var(--muted);
  font-weight: 700;
}

.field-hint,
.menu-helper {
  color: var(--muted);
  font-size: 0.78rem;
}

.input-wrap input,
.input-wrap select,
.input-wrap textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: #fbfbfb;
  outline: none;
}

.input-wrap input.is-invalid,
.input-wrap select.is-invalid,
.input-wrap textarea.is-invalid {
  border-color: var(--danger);
  background: #fff7f7;
  box-shadow: 0 0 0 3px rgba(232, 93, 93, 0.14);
}

.input-wrap textarea {
  min-height: 92px;
  resize: vertical;
}

.button-row {
  display: flex;
  gap: 10px;
}

.button-row.stacked {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.banner {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #fff6df;
  color: var(--primary-deep);
  font-size: 0.84rem;
  line-height: 1.5;
}

.image-preview-frame,
.detail-image-frame {
  border-radius: 18px;
  overflow: hidden;
  border: 1px dashed rgba(212, 136, 6, 0.35);
  background: #fffaf0;
}

.image-preview-frame img,
.detail-image-frame img {
  display: block;
  width: 100%;
  height: auto;
}

.image-preview-frame {
  min-height: 120px;
}

.detail-hero {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px 0 16px;
  border-bottom: 1px solid var(--line);
}

.detail-visual {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.detail-avatar {
  width: 88px;
  height: 88px;
  border-radius: 22px;
  font-size: 1rem;
}

.detail-image-frame {
  width: 88px;
  min-height: 88px;
}

.detail-copy {
  min-width: 0;
}

.detail-item-name {
  font-size: 1.1rem;
  font-weight: 800;
}

.detail-item-subtitle {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.86rem;
}

.detail-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 16px 0;
}

.detail-field {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  background: var(--surface-muted);
}

.detail-field-wide {
  grid-column: 1 / -1;
}

.detail-field-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.detail-field-value {
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.45;
  white-space: pre-wrap;
}

.detail-section-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  padding: 0 14px 12px;
}

.detail-section-header {
  padding: 14px 0 10px;
}

.history-item {
  padding: 12px;
}

.history-type {
  font-size: 0.84rem;
  font-weight: 800;
}

.history-date {
  color: var(--muted);
  font-size: 0.78rem;
}

.history-note {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.history-meta {
  margin-top: 6px;
  color: var(--primary-deep);
  font-size: 0.8rem;
  font-weight: 700;
}

.detail-actions {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

#detailCloseBtn {
  grid-column: 1 / -1;
}

.menu-panel .menu-section + .menu-section,
.menu-actions {
  margin-top: 16px;
}

.menu-label {
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--muted);
}

.language-switch {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.language-chip {
  flex: 1;
  min-height: 42px;
  border-radius: 12px;
  background: #f5f5f5;
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
}

.language-chip.active {
  background: #fff4de;
  color: var(--primary-deep);
  box-shadow: inset 0 0 0 1px #ffe1a0;
}

.menu-actions {
  display: grid;
  gap: 10px;
}

.chart-card {
  padding-bottom: 16px;
}

.chart-empty {
  color: var(--muted);
  text-align: center;
  font-size: 0.88rem;
  padding: 8px 16px 14px;
}

.chart-layout {
  display: grid;
  gap: 14px;
  padding: 8px 16px 0;
}

.chart-target {
  display: grid;
  place-items: center;
}

.chart-donut {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
  background: conic-gradient(#ddd 0deg 360deg);
}

.chart-hole {
  width: 118px;
  height: 118px;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
  text-align: center;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
  padding: 12px;
}

.chart-total-label {
  color: var(--muted);
  font-size: 0.78rem;
}

.chart-total-value {
  margin-top: 6px;
  font-size: 1rem;
  font-weight: 800;
}

.chart-legend {
  display: grid;
  gap: 10px;
}

.chart-legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
}

.chart-swatch {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
}

.chart-legend-copy {
  min-width: 0;
}

.chart-legend-label {
  font-size: 0.86rem;
  font-weight: 800;
}

.chart-legend-meta {
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 2px;
}

.alert-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.alert-item-title {
  font-size: 0.94rem;
  font-weight: 800;
}

.alert-item-meta {
  margin-top: 4px;
  color: var(--primary-deep);
  font-size: 0.82rem;
  font-weight: 700;
}

.alert-item-submeta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.8rem;
}

.label-preview-card {
  border-radius: 24px;
  background: #fff;
  padding: 8px;
  box-shadow: var(--shadow);
}

.label-preview-card svg {
  width: 100%;
  height: auto;
  display: block;
}

.toast {
  position: absolute;
  bottom: calc(126px + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%) translateY(18px);
  background: #222;
  color: #fff;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 30;
}

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

.hidden {
  display: none !important;
}

@media (max-width: 390px) {
  .panel-grid,
  .finance-grid,
  .sales-grid,
  .earnings-grid,
  .detail-grid,
  .detail-actions,
  .form-grid.two,
  .button-row,
  .hero-actions,
  .inventory-card-meta,
  .inventory-card-actions {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .toolbar-card {
    flex-direction: column;
    align-items: stretch;
  }

  .toolbar-select,
  .narrow-select {
    width: 100%;
  }

  .bottom-nav {
    left: 6px;
    right: 6px;
    gap: 2px;
  }

  .nav-label {
    font-size: 0.63rem;
  }
}

/* Product pictures and galleries */
.item-photo {
  object-fit: cover;
  color: transparent;
  flex: 0 0 auto;
}
.image-placeholder {
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--primary-deep));
}
.image-gallery-editor,
.detail-gallery {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 8px 2px 2px;
}
.image-thumb,
.detail-thumb {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 14px;
  padding: 6px;
  min-width: 82px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}
.image-thumb.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.18);
}
.image-thumb img,
.detail-thumb img {
  width: 66px;
  height: 66px;
  border-radius: 10px;
  object-fit: cover;
  display: block;
}
.image-thumb span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.detail-visual {
  align-items: center;
}
.detail-gallery {
  width: 100%;
  justify-content: center;
  padding-top: 10px;
}
.detail-image-frame img,
.image-preview-frame img {
  object-fit: cover;
}
.status.draft { background: #eef0f3; color: #50627b; }
.status.listed { background: #eaf4ff; color: #2b77f3; }
.status.archived { background: #f0eded; color: #7f8190; }
@media (max-width: 520px) {
  .image-thumb img,
  .detail-thumb img { width: 58px; height: 58px; }
  .image-thumb,
  .detail-thumb { min-width: 72px; }
}

/* Modern app shell refresh */
:root {
  --bg: #eef4fb;
  --surface: #ffffff;
  --surface-soft: #f8fbff;
  --surface-muted: #eef5ff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #dbe7f3;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-deep: #1e3a8a;
  --accent: #14b8a6;
  --success: #16a34a;
  --danger: #dc2626;
  --warning: #f59e0b;
  --shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
  --shadow-strong: 0 24px 54px rgba(37, 99, 235, 0.22);
}

html,
body {
  background:
    radial-gradient(circle at 18% 0%, rgba(37, 99, 235, 0.22), transparent 30%),
    radial-gradient(circle at 85% 12%, rgba(20, 184, 166, 0.18), transparent 32%),
    linear-gradient(180deg, #eaf3ff 0%, #f8fbff 48%, #eef4fb 100%);
}

.phone {
  max-width: 460px;
  background: linear-gradient(180deg, #f8fbff, #eef4fb);
  border: 1px solid rgba(148, 163, 184, 0.28);
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.18);
}

.main-content {
  overflow: hidden;
  padding-bottom: 0;
}

.tab-screen {
  height: 100%;
  overflow-y: auto;
  padding-bottom: calc(104px + var(--safe-bottom));
  scroll-behavior: smooth;
}

.login-screen,
.top-wrap {
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.95), rgba(20, 184, 166, 0.9)),
    #2563eb;
}

.brand-badge,
.btn-primary,
.fab {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: var(--shadow-strong);
}

.btn-secondary {
  background: #eff6ff;
  color: var(--primary-deep);
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.14);
}

.btn-danger {
  background: #fef2f2;
  color: var(--danger);
}

.field,
.search-wrap,
.toolbar-card,
.section-card,
.stat-card,
.mini-card,
.sales-stat-card,
.finance-card,
.profile-card,
.action-card,
.earnings-card,
.inventory-card {
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: var(--shadow);
}

.top-wrap {
  padding-bottom: 92px;
  border-bottom-left-radius: 34px;
  border-bottom-right-radius: 34px;
}

.dashboard-title,
.page-hero h2 {
  letter-spacing: -0.04em;
}

.page-hero {
  background: linear-gradient(145deg, #ffffff, #edf7ff);
  border: 1px solid rgba(37, 99, 235, 0.08);
}

.analytics-hero,
.finance-hero,
.profile-hero,
.compact-hero {
  background: linear-gradient(145deg, #ffffff, #edf7ff);
}

.page-kicker {
  color: var(--primary);
}

.stat-icon,
.action-icon {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(20, 184, 166, 0.14));
  color: var(--primary-deep);
}

.finance-card.accent-blue { background: linear-gradient(145deg, #ffffff, #eff6ff); }
.finance-card.accent-indigo { background: linear-gradient(145deg, #ffffff, #eef2ff); }
.finance-card.accent-green { background: linear-gradient(145deg, #ffffff, #ecfdf5); }
.finance-card.accent-teal { background: linear-gradient(145deg, #ffffff, #f0fdfa); }

.finance-card-value,
.sales-stat-value,
.stat-value,
.mini-value,
.earnings-profit {
  color: #0f172a;
  letter-spacing: -0.04em;
}

.inventory-card {
  border-radius: 24px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.96);
}

.inventory-card-main,
.item-card {
  align-items: stretch;
  gap: 14px;
}

.item-photo,
.slow-item-image {
  width: 76px;
  height: 76px;
  border-radius: 18px;
  object-fit: cover;
  background: linear-gradient(135deg, #dbeafe, #ccfbf1);
  color: var(--primary-deep);
  font-weight: 900;
}

.inventory-card .item-photo {
  width: 92px;
  height: 92px;
  border-radius: 20px;
}

.item-name {
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.item-side {
  min-width: 88px;
}

.item-price {
  color: var(--primary-deep);
  font-size: 1.02rem;
}

.status.listed,
.status.available {
  background: #dbeafe;
  color: #1d4ed8;
}

.status.sold {
  background: #dcfce7;
  color: #15803d;
}

.status.draft {
  background: #f1f5f9;
  color: #475569;
}

.status.archived {
  background: #e2e8f0;
  color: #64748b;
}

.age-badge.is-alert-30,
.age-badge.is-alert-60,
.age-badge.is-alert-90 {
  background: #fef3c7;
  color: #b45309;
}

.bottom-nav {
  left: 14px;
  right: 14px;
  bottom: calc(12px + var(--safe-bottom));
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.24);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.16);
  backdrop-filter: blur(18px);
}

.nav-item.active .nav-icon-wrap {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
}

.nav-item.active .nav-label {
  color: var(--primary-deep);
}

.fab {
  width: 62px;
  height: 62px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  gap: 0;
  color: #fff;
  font-weight: 900;
}

.fab span {
  line-height: 0.8;
  font-size: 1.5rem;
}

.fab small {
  font-size: 0.66rem;
  line-height: 1;
  margin-top: -8px;
}

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

.insight-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 16px;
  background: #f8fbff;
  border: 1px solid var(--line);
  padding: 12px;
}

.insight-pill span {
  color: var(--muted);
  font-size: 0.84rem;
}

.insight-pill strong {
  color: var(--primary-deep);
}

.slow-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.slow-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 10px;
  cursor: pointer;
}

.slow-item span {
  display: grid;
  gap: 4px;
}

.slow-item small {
  color: var(--muted);
}

.compact-empty {
  padding: 12px;
  min-height: auto;
}

.finance-analytics-heading {
  background: linear-gradient(135deg, #eff6ff, #f0fdfa);
}

@media (max-width: 480px) {
  .bottom-nav {
    left: 10px;
    right: 10px;
  }

  .inventory-card .item-photo {
    width: 84px;
    height: 84px;
  }
}

/* Verified live mobile fixes */
.login-screen {
  color: #fff;
  overflow-x: hidden;
}

.login-title,
.login-subtitle,
.login-actions,
.login-footer {
  color: rgba(255, 255, 255, 0.92);
}

.login-title {
  color: #071327;
}

.field {
  width: 100%;
  max-width: 100%;
}

.login-actions {
  gap: 16px;
}

.login-actions span:last-child {
  text-align: right;
  white-space: nowrap;
}

.bottom-nav {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  height: calc(92px + var(--safe-bottom));
}

.main-content {
  overflow: hidden;
}

@media (max-width: 520px) {
  html,
  body {
    overflow-x: hidden;
  }

  .app-shell {
    padding: 0;
    overflow: hidden;
  }

  .phone {
    width: 100%;
    max-width: 100%;
    height: 100dvh;
    border-radius: 0;
    border: none;
    box-shadow: none;
  }

  .login-screen {
    padding-left: 22px;
    padding-right: 22px;
  }

  .login-actions {
    font-size: 0.86rem;
  }
}

/* Second-pass mobile overflow correction */
.login-screen {
  width: 100%;
  max-width: 100%;
  align-items: stretch;
}

.login-screen .field,
.login-screen .btn,
.login-actions,
.login-footer,
.login-subtitle,
.login-title {
  width: auto;
  max-width: 100%;
}

.login-actions {
  justify-content: space-between;
  overflow: hidden;
}

.login-actions span {
  min-width: 0;
  max-width: 48%;
}

.login-actions span:last-child {
  white-space: normal;
}

.login-screen input {
  min-width: 0;
}

/* Hard clamp login contents to phone viewport */
@media (max-width: 520px) {
  .login-screen .field,
  .login-screen .btn {
    flex: 0 0 auto;
    width: calc(100vw - 44px);
    max-width: calc(100vw - 44px);
    align-self: center;
  }

  .login-actions {
    width: calc(100vw - 44px);
    max-width: calc(100vw - 44px);
    align-self: center;
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 12px;
  }

  .login-actions span {
    max-width: none;
  }

  .login-actions span:last-child {
    justify-self: end;
    text-align: right;
  }
}

/* Designer polish: cohesive color system, readability, and overflow safety */
:root {
  --bg: #edf4ff;
  --surface: #ffffff;
  --surface-soft: #f8fbff;
  --surface-muted: #eef6ff;
  --text: #0f172a;
  --text-soft: #334155;
  --muted: #5f6f85;
  --line: #d8e5f2;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-deep: #1e3a8a;
  --accent: #14b8a6;
  --success: #15803d;
  --danger: #dc2626;
  --warning: #d97706;
  --shadow: 0 16px 42px rgba(15, 23, 42, 0.08);
  --shadow-strong: 0 22px 56px rgba(37, 99, 235, 0.24);
}

body {
  color: var(--text);
  background:
    radial-gradient(circle at 12% -8%, rgba(37, 99, 235, 0.28), transparent 28%),
    radial-gradient(circle at 88% 4%, rgba(20, 184, 166, 0.22), transparent 30%),
    linear-gradient(180deg, #eaf3ff 0%, #f9fbff 42%, #edf4ff 100%);
}

.phone {
  background: linear-gradient(180deg, #fbfdff 0%, #eef5ff 100%);
}

/* Keep every label/value readable on narrow cards */
.item-copy,
.item-side,
.detail-field,
.detail-row,
.section-header,
.action-copy,
.finance-card,
.sales-stat-card,
.stat-card,
.mini-card,
.insight-pill,
.slow-item span {
  min-width: 0;
}

.item-name,
.item-meta,
.item-submeta,
.item-price,
.item-qty,
.item-profit,
.section-title,
.section-caption,
.finance-card-label,
.finance-card-value,
.sales-stat-label,
.sales-stat-value,
.detail-field-value,
.detail-row strong,
.detail-row span,
.action-title,
.action-subtitle,
.insight-pill span,
.slow-item small {
  overflow-wrap: anywhere;
  word-break: normal;
}

.item-card,
.inventory-card-main {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.item-side {
  max-width: 112px;
  text-align: right;
}

.item-price,
.finance-card-value,
.sales-stat-value,
.stat-value,
.mini-value {
  line-height: 1.05;
}

.stat-card,
.mini-card,
.section-card,
.inventory-card,
.finance-card,
.sales-stat-card,
.profile-card,
.action-card,
.toolbar-card,
.search-wrap {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(148, 163, 184, 0.22);
  box-shadow: 0 14px 38px rgba(15, 23, 42, 0.07);
}

.top-wrap,
.login-screen {
  background:
    radial-gradient(circle at 14% 0%, rgba(255, 255, 255, 0.22), transparent 30%),
    linear-gradient(135deg, #1d4ed8 0%, #2563eb 48%, #14b8a6 100%);
}

.hello,
.dashboard-title,
.dashboard-subtitle,
.topbar .icon-btn {
  color: #ffffff;
  text-shadow: 0 1px 8px rgba(15, 23, 42, 0.16);
}

.dashboard-subtitle {
  color: rgba(255, 255, 255, 0.86);
}

.login-title,
.login-subtitle,
.login-actions,
.login-footer {
  color: #ffffff;
}

.login-subtitle,
.login-actions,
.login-footer {
  color: rgba(255, 255, 255, 0.88);
}

.field,
.input-wrap input,
.input-wrap select,
.input-wrap textarea {
  background: #ffffff;
  color: var(--text);
  border-color: #d7e3f1;
}

.input-wrap label,
.finance-card-label,
.sales-stat-label,
.stat-label,
.mini-label,
.section-caption,
.item-meta,
.item-submeta,
.item-qty,
.detail-row span,
.field-hint,
.menu-helper {
  color: var(--muted);
}

.btn,
.inventory-action-btn,
.chip,
.nav-item,
.fab,
.icon-btn {
  -webkit-tap-highlight-color: transparent;
}

.btn-primary,
.inventory-action-btn:not(.secondary):not(.danger),
.fab {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #ffffff;
}

.btn-secondary,
.inventory-action-btn.secondary,
.chip {
  background: #eff6ff;
  color: var(--primary-deep);
  border-color: rgba(37, 99, 235, 0.18);
}

.chip.active,
.mode-btn.active,
.language-chip.active {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #ffffff;
  border-color: transparent;
}

.bottom-nav {
  color: var(--muted);
}

.nav-label,
.nav-icon {
  color: inherit;
}

.nav-item {
  color: #64748b;
}

.nav-item.active {
  color: var(--primary-deep);
}

.nav-item.active .nav-label {
  color: var(--primary-deep);
  font-weight: 900;
}

.status,
.age-badge,
.detail-pill,
.filter-chip,
.insight-pill {
  font-weight: 800;
}

.status.available,
.status.listed {
  background: #dbeafe;
  color: #1e40af;
}

.status.sold {
  background: #dcfce7;
  color: #166534;
}

.status.archived,
.status.draft {
  background: #e2e8f0;
  color: #334155;
}

.age-badge.is-alert-30,
.age-badge.is-alert-60,
.age-badge.is-alert-90 {
  background: #fef3c7;
  color: #92400e;
}

.empty-state {
  color: var(--muted);
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.9), rgba(240, 253, 250, 0.72));
  border: 1px dashed rgba(37, 99, 235, 0.2);
  border-radius: 18px;
  margin: 8px 0;
}

.banner {
  background: linear-gradient(135deg, #eff6ff, #f0fdfa);
  color: var(--primary-deep);
  border: 1px solid rgba(37, 99, 235, 0.16);
}

@media (max-width: 420px) {
  .stats-grid,
  .finance-grid,
  .sales-grid,
  .panel-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .item-card,
  .inventory-card-main {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .item-side {
    grid-column: 2;
    max-width: none;
    text-align: left;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    align-items: baseline;
  }

  .inventory-card .item-photo,
  .item-photo {
    width: 72px;
    height: 72px;
  }

  .section-header {
    align-items: flex-start;
    gap: 6px;
  }

  .bottom-nav {
    height: calc(86px + var(--safe-bottom));
  }

  .nav-label {
    font-size: 0.68rem;
  }
}
