:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-soft: #f8faff;
  --surface-alt: #f2f5fb;
  --line: #e3e9f4;
  --line-strong: #d4ddec;
  --text: #202938;
  --muted: #738198;
  --primary: #4f7df1;
  --primary-strong: #315fda;
  --primary-soft: #eaf1ff;
  --green: #18b46e;
  --orange: #ff9a3c;
  --red: #ff6a7d;
  --pink: #ff6bbe;
  --indigo: #6979ff;
  --shadow: 0 22px 60px rgba(54, 83, 145, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  background: linear-gradient(180deg, #f9fbff 0%, #eef3fb 100%);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", sans-serif;
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(79, 125, 241, 0.14), transparent 24%),
    linear-gradient(315deg, rgba(79, 125, 241, 0.08), transparent 18%),
    var(--bg);
}

button,
input {
  font: inherit;
}

button {
  border: 0;
}

svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.app-shell {
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 24px 18px;
  background: rgba(255, 255, 255, 0.92);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 2px 6px 16px;
  border-bottom: 1px solid var(--line);
}

.brand-logo {
  position: relative;
  width: 42px;
  height: 42px;
}

.brand-logo-ring,
.brand-logo-core {
  position: absolute;
  inset: 0;
  border-radius: 50%;
}

.brand-logo-ring {
  border: 8px solid #dce7ff;
  border-right-color: var(--primary);
  border-bottom-color: var(--primary);
  transform: rotate(28deg);
}

.brand-logo-core {
  inset: 12px;
  background: #fff;
}

.brand-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.brand-block p,
.topbar p,
.section-head p,
.roadmap-step p,
.stat-card small,
.metric-card span,
.stack-item small,
.cart-item small {
  margin: 0;
  color: var(--muted);
}

.sidebar-nav,
.subnav-list,
.sidebar-foot {
  display: grid;
  gap: 8px;
}

.nav-item,
.subnav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.nav-item:hover,
.subnav-link:hover {
  background: var(--surface-alt);
}

.nav-item.active,
.subnav-link.active {
  background: linear-gradient(135deg, var(--primary), #6b95ff);
  color: #fff;
  box-shadow: 0 12px 24px rgba(79, 125, 241, 0.22);
}

.nav-icon,
.group-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: currentColor;
}

.sidebar-group {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.sidebar-group-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding: 0 8px;
  font-size: 14px;
}

.subnav-list {
  position: relative;
  padding-left: 16px;
}

.subnav-list::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: var(--line);
}

.subnav-link {
  position: relative;
  padding-left: 18px;
  font-size: 14px;
}

.subnav-link::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 50%;
  width: 10px;
  height: 1px;
  background: var(--line-strong);
}

.mini-card {
  padding: 14px;
  border-radius: 16px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.mini-card span,
.eyebrow {
  display: inline-flex;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.mini-card strong {
  display: block;
  margin-top: 6px;
  font-size: 14px;
}

.workspace {
  padding: 24px;
}

.mobile-summary,
.mobile-tabbar {
  display: none;
}

.topbar,
.content-card,
.stat-card,
.metric-card,
.roadmap-step {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding: 24px 28px;
  border-radius: 24px;
}

.topbar h1,
.section-head h2 {
  margin: 8px 0 6px;
  font-size: 32px;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.section-head h2 {
  font-size: 18px;
}

.topbar-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.search-shell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 320px;
  padding: 0 14px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.search-shell svg {
  color: var(--muted);
}

.search-shell input {
  width: 100%;
  padding: 13px 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.search-shell--compact {
  min-width: 280px;
}

.filter-btn,
.ghost-btn,
.list-chip,
.pay-chip {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.filter-btn,
.ghost-btn {
  padding: 12px 16px;
  border-radius: 14px;
  font-weight: 600;
}

.ghost-btn--small {
  padding: 10px 14px;
}

.panel {
  display: none;
  margin-top: 18px;
}

.panel.active {
  display: block;
}

.content-card {
  padding: 22px;
  border-radius: 24px;
}

.shortcut-card {
  margin-bottom: 16px;
  padding: 20px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.section-head--tight {
  margin-bottom: 14px;
}

.shortcut-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.shortcut-btn {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff, #f7faff);
  border: 1px solid var(--line);
  text-align: left;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(79, 125, 241, 0.08);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.shortcut-btn:hover {
  transform: translateY(-2px);
  border-color: #cadeff;
  box-shadow: 0 14px 28px rgba(79, 125, 241, 0.13);
}

.shortcut-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: var(--primary);
  background: var(--primary-soft);
}

.shortcut-copy strong {
  display: block;
  font-size: 15px;
}

.shortcut-copy span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.stat-card {
  padding: 20px;
  border-radius: 20px;
}

.stat-card--wide {
  grid-column: span 2;
}

.stat-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 13px;
}

.stat-card strong {
  display: block;
  font-size: 32px;
  letter-spacing: -0.05em;
}

.stat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
}

.stat-icon.blue {
  color: var(--primary);
  background: #eaf1ff;
}

.stat-icon.orange {
  color: var(--orange);
  background: #fff1e4;
}

.stat-icon.red {
  color: var(--red);
  background: #ffe8ec;
}

.stat-icon.pink {
  color: var(--pink);
  background: #ffe8f5;
}

.stat-icon.indigo {
  color: var(--indigo);
  background: #edf0ff;
}

.stat-icon.green {
  color: var(--green);
  background: #e9fbf3;
}

.trend {
  display: inline-flex;
  align-items: center;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 600;
}

.trend.positive {
  color: var(--green);
}

.trend.negative {
  color: var(--red);
}

.chip-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.list-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
}

.list-chip span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
}

.list-chip.active {
  color: var(--primary);
  border-color: #cddcff;
  background: #f8fbff;
}

.order-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.order-card {
  padding: 18px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.order-top,
.cart-item,
.stack-item,
.report-bar-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.order-card h3,
.product-card h3 {
  margin: 0;
  font-size: 15px;
}

.order-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: #e9fbf3;
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
}

.order-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.outline-btn,
.solid-btn {
  padding: 12px 14px;
  border-radius: 14px;
  font-weight: 600;
  cursor: pointer;
}

.outline-btn {
  border: 1px solid #bcd0ff;
  background: #fff;
  color: var(--primary);
}

.solid-btn {
  background: linear-gradient(135deg, var(--primary), #6f93ff);
  color: #fff;
}

.register-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) 360px;
  gap: 18px;
  margin-top: 18px;
}

.cart-stack {
  display: grid;
  gap: 18px;
}

.barcode-box,
.split-box,
.table-card,
.receipt-paper {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-soft);
}

.barcode-box,
.split-box {
  padding: 14px;
}

.barcode-box label,
.split-box label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
}

input[type="text"],
input[type="search"],
input[type="number"] {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  outline: 0;
  background: #fff;
  color: var(--text);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.product-card {
  padding: 14px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: var(--surface);
  text-align: left;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(79, 125, 241, 0.08);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.product-card:hover {
  transform: translateY(-3px);
  border-color: #c8d8ff;
  box-shadow: 0 16px 34px rgba(79, 125, 241, 0.14);
}

.product-thumb {
  height: 124px;
  margin-bottom: 12px;
  border-radius: 18px;
  background-size: cover;
  background-position: center;
}

.product-thumb.theme-espresso {
  background-image: linear-gradient(135deg, rgba(106, 60, 34, 0.2), rgba(54, 32, 22, 0.6));
}

.product-thumb.theme-cool {
  background-image: linear-gradient(135deg, rgba(119, 197, 255, 0.2), rgba(36, 81, 126, 0.55));
}

.product-thumb.theme-sunset {
  background-image: linear-gradient(135deg, rgba(255, 186, 104, 0.3), rgba(255, 111, 97, 0.56));
}

.product-thumb.theme-garden {
  background-image: linear-gradient(135deg, rgba(125, 222, 163, 0.28), rgba(48, 117, 92, 0.58));
}

.product-thumb.theme-night {
  background-image: linear-gradient(135deg, rgba(67, 83, 148, 0.24), rgba(18, 24, 45, 0.76));
}

.product-thumb.theme-violet {
  background-image: linear-gradient(135deg, rgba(176, 147, 255, 0.28), rgba(95, 72, 184, 0.62));
}

.product-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
}

.product-meta span,
.product-config span,
.totals span,
thead th {
  color: var(--muted);
}

.product-price {
  margin-top: 6px;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.product-config {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  font-size: 12px;
}

.token-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.token {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--surface-alt);
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.token.active {
  background: #dce8ff;
  color: var(--primary);
}

.qty-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}

.qty-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface-alt);
  color: var(--muted);
  font-weight: 700;
}

.add-cart-btn {
  width: 100%;
  margin-top: 14px;
  padding: 13px 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), #668cff);
  color: #fff;
  cursor: pointer;
}

.cart-list,
.inventory-summary,
.metrics-grid,
.payment-roadmap {
  display: grid;
  gap: 12px;
}

.cart-list {
  margin: 16px 0;
  min-height: 150px;
}

.cart-item,
.stack-item {
  padding: 14px;
  border-radius: 16px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.cart-actions,
.payment-methods {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.ghost-btn {
  border-radius: 12px;
}

.pay-chip {
  padding: 10px 14px;
  border-radius: 999px;
}

.pay-chip.active {
  background: var(--primary-soft);
  border-color: #c3d5ff;
  color: var(--primary);
}

.totals {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.totals div {
  display: flex;
  justify-content: space-between;
}

.total-line {
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.primary-btn {
  width: 100%;
  margin-top: 16px;
  padding: 14px 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), #6d91ff);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.receipt-paper {
  padding: 18px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
  line-height: 1.7;
}

.table-card {
  margin-top: 16px;
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 16px;
  text-align: left;
}

thead th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

tbody tr + tr {
  border-top: 1px solid var(--line);
}

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

.metric-card,
.roadmap-step {
  padding: 18px;
  border-radius: 18px;
}

.metric-card strong,
.roadmap-step strong {
  display: block;
  margin-top: 10px;
  font-size: 24px;
  letter-spacing: -0.04em;
}

.report-bars {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.report-bar {
  padding: 16px 18px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.report-bar-track {
  height: 12px;
  margin-top: 10px;
  border-radius: 999px;
  background: #edf2fb;
  overflow: hidden;
}

.report-bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), #79a0ff);
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  padding: 5px 10px;
  border-radius: 999px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
}

.badge--danger {
  color: var(--red);
  background: #ffe7eb;
}

.badge--success {
  color: var(--green);
  background: #e9fbf3;
}

.roadmap-step.complete {
  border-color: #cfeede;
}

.roadmap-step.pending {
  border-color: #ffe1bf;
}

.hidden {
  display: none;
}

@media (max-width: 1320px) {
  .stats-grid,
  .metrics-grid,
  .order-strip,
  .product-grid,
  .shortcut-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .register-shell {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  .topbar,
  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .topbar-actions,
  .search-shell,
  .search-shell--compact {
    width: 100%;
    min-width: 0;
  }

  .stats-grid,
  .metrics-grid,
  .order-strip,
  .product-grid,
  .shortcut-grid {
    grid-template-columns: 1fr;
  }

  .stat-card--wide {
    grid-column: auto;
  }

  .workspace {
    padding: 14px 14px 94px;
  }

  .mobile-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    padding: 16px 18px;
    border-radius: 22px;
    background: linear-gradient(135deg, #4f7df1, #6c97ff);
    color: #fff;
    box-shadow: 0 20px 40px rgba(79, 125, 241, 0.24);
  }

  .mobile-summary strong {
    display: block;
    margin-top: 6px;
    font-size: 22px;
    letter-spacing: -0.04em;
  }

  .mobile-summary .eyebrow {
    color: rgba(255, 255, 255, 0.76);
  }

  .mobile-pill {
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
  }

  .topbar {
    padding: 18px;
    border-radius: 22px;
  }

  .topbar h1 {
    font-size: 26px;
  }

  .content-card,
  .shortcut-card {
    padding: 18px;
    border-radius: 22px;
  }

  .filter-btn {
    width: 100%;
  }

  .section-head h2 {
    font-size: 17px;
  }

  .chip-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

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

  .list-chip {
    flex: 0 0 auto;
  }

  .order-card,
  .product-card,
  .stat-card,
  .metric-card,
  .roadmap-step {
    border-radius: 18px;
  }

  .order-actions {
    grid-template-columns: 1fr;
  }

  .product-grid {
    gap: 14px;
  }

  .product-thumb {
    height: 132px;
  }

  .register-shell {
    gap: 14px;
  }

  .cart-stack {
    gap: 14px;
  }

  .mobile-tabbar {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 50;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--line);
    box-shadow: 0 18px 42px rgba(54, 83, 145, 0.18);
    backdrop-filter: blur(18px);
  }

  .mobile-tab {
    display: grid;
    justify-items: center;
    gap: 6px;
    padding: 10px 6px;
    border-radius: 16px;
    background: transparent;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
  }

  .mobile-tab.active {
    background: var(--primary-soft);
    color: var(--primary);
  }
}
