:root {
  --bg: #090f1f;
  --bg-surface: #111a2f;
  --card: #17223c;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --border: #24314d;
  --primary: #22c55e;
  --secondary: #38bdf8;
  --error-text: #fecaca;
  --error-bg-top: rgba(127, 29, 29, 0.25);
  --error-bg-bottom: rgba(69, 10, 10, 0.35);
  --error-border: rgba(248, 113, 113, 0.45);
  --success-text: #bbf7d0;
  --success-bg-top: rgba(21, 128, 61, 0.25);
  --success-bg-bottom: rgba(20, 83, 45, 0.35);
  --success-border: rgba(74, 222, 128, 0.4);
}

[data-theme="light"] {
  --bg: #f1f5f9;
  --bg-surface: #ffffff;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --border: #dbe4f0;
  --primary: #0f766e;
  --secondary: #0284c7;
  --error-text: #991b1b;
  --error-bg-top: rgba(254, 226, 226, 0.95);
  --error-bg-bottom: rgba(254, 242, 242, 0.95);
  --error-border: rgba(239, 68, 68, 0.35);
  --success-text: #166534;
  --success-bg-top: rgba(220, 252, 231, 0.95);
  --success-bg-bottom: rgba(240, 253, 244, 0.95);
  --success-border: rgba(34, 197, 94, 0.35);
}

* {
  box-sizing: border-box;
}

html,
body,
#App {
  margin: 0;
  min-height: 100%;
  font-family: "Inter", "Segoe UI", "Roboto", "Helvetica Neue", Arial, system-ui, -apple-system, sans-serif;
  background: radial-gradient(circle at top, #1d4ed8 0%, var(--bg) 45%);
  color: var(--text);
  line-height: 1.5;
  letter-spacing: 0.01em;
}

a {
  color: inherit;
  text-decoration: none;
}

.app-shell {
  min-height: 100vh;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--border);
  background: rgba(11, 17, 32, 0.8);
  backdrop-filter: blur(10px);
}

[data-theme="light"] .nav {
  background: rgba(255, 255, 255, 0.9);
}

.nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 250px;
}

.brand-logo {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 10px;
  padding: 6px 10px;
  font-weight: 800;
}

.brand-logo span {
  color: #ef4444;
}

.brand-main {
  font-size: 0.9rem;
  font-weight: 700;
}

.brand-sub {
  color: var(--muted);
  font-size: 0.72rem;
}

.nav-links {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.nav-links a {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--muted);
  border: 1px solid transparent;
  font-size: 0.85rem;
}

.nav-links a.active,
.nav-links a:hover {
  border-color: var(--border);
  color: var(--text);
  background: var(--card);
}

.nav-link-btn {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--muted);
  border: 1px solid transparent;
  font-size: 0.85rem;
  background: transparent;
  cursor: pointer;
}

.nav-link-btn.active,
.nav-link-btn:hover {
  border-color: var(--border);
  color: var(--text);
  background: var(--card);
}

.mega-menu {
  position: absolute;
  top: 64px;
  left: 50%;
  transform: translateX(-50%);
  width: min(1180px, calc(100vw - 32px));
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 18px 32px rgba(2, 6, 23, 0.35);
  z-index: 60;
  max-height: calc(100vh - 84px);
  overflow-y: auto;
}

.mega-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.mega-group-col h4 {
  margin: 0 0 8px;
  font-size: 0.86rem;
}

.mega-category-block {
  margin-bottom: 8px;
}

.mega-category-block p {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.74rem;
}

.mega-sub-links {
  display: grid;
  gap: 4px;
}

.mega-sub-links a {
  font-size: 0.78rem;
  padding: 4px 6px;
  border-radius: 6px;
}

.mega-sub-links a:hover {
  background: var(--bg-surface);
}

.btn.mobile-categories-btn {
  display: none;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #03131a;
  font-size: 0.82rem;
}

.main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px 18px 28px;
  display: grid;
  gap: 14px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
}

.card h1,
.card h2,
.card h3,
.card p {
  margin-top: 0;
}

.home-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.filters {
  display: flex;
  gap: 8px;
}

.catalogue-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 14px;
  align-items: start;
}

.filter-panel {
  position: sticky;
  top: 84px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  background: var(--bg-surface);
  max-height: calc(100vh - 110px);
  overflow: auto;
}

.catalogue-content {
  min-width: 0;
}

.filter-section {
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 8px;
  background: var(--card);
}

.filter-section-head {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  cursor: pointer;
}

.filter-options {
  border-top: 1px solid var(--border);
  padding: 8px 10px;
  display: grid;
  gap: 6px;
}

.filter-option {
  display: inline-flex;
  gap: 7px;
  font-size: 0.8rem;
  align-items: center;
}

.filter-mobile-toggle {
  display: none;
}

.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: var(--card);
  padding: 14px;
  overflow: auto;
}

.mobile-drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.mobile-drawer-list {
  display: grid;
  gap: 8px;
}

.mobile-drawer-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-surface);
  color: var(--text);
  padding: 10px;
  text-align: left;
  font-size: 0.86rem;
}

.mobile-drawer-item.link-item {
  display: block;
}

.input {
  background: var(--bg-surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 10px;
  font-size: 0.85rem;
  min-width: 0;
  font-family: inherit;
}

.input::placeholder {
  color: var(--muted);
  opacity: 1;
  font-family: inherit;
}

input.input:not([type='file']) {
  height: 38px;
}

.upload-preview-label {
  display: inline-flex;
  cursor: pointer;
  width: fit-content;
}

.upload-preview-image {
  width: 140px;
  height: 100px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
}

.btn {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 0.84rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-sm {
  padding: 6px 10px;
  font-size: 0.76rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #03131a;
}

.btn-outline {
  background: var(--bg-surface);
  color: var(--text);
  border-color: var(--border);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.product-card {
  border: 1px solid var(--border);
  background: var(--bg-surface);
  border-radius: 12px;
  padding: 10px;
  display: grid;
  gap: 8px;
}

.product-image-wrap {
  display: block;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.product-image {
  width: 100%;
  height: 130px;
  object-fit: contain;
  display: block;
  background: var(--bg-surface);
}

.product-chip {
  display: inline-flex;
  border: 1px solid #2a4f4f;
  color: #86efac;
  border-radius: 999px;
  font-size: 0.66rem;
  padding: 4px 8px;
  width: fit-content;
}

[data-theme="light"] .product-chip {
  color: #0f766e;
  border-color: #99f6e4;
}

.product-card h3 {
  margin: 0;
  font-size: 0.9rem;
}

.product-sub {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
}

.product-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
}

.product-actions {
  display: flex;
  gap: 8px;
}

.detail {
  display: grid;
  grid-template-columns: 1.8fr 1fr;
  gap: 14px;
}

.detail-image {
  width: 100%;
  height: 260px;
  object-fit: contain;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-surface);
}

.spec-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.spec-grid div {
  border: 1px solid var(--border);
  background: var(--bg-surface);
  border-radius: 10px;
  padding: 8px;
}

.spec-grid span {
  color: var(--muted);
  font-size: 0.7rem;
  display: block;
}

.spec-grid strong {
  font-size: 0.82rem;
}

.detail-aside {
  border: 1px solid var(--border);
  background: var(--bg-surface);
  border-radius: 10px;
  padding: 12px;
  display: grid;
  gap: 9px;
  align-content: start;
}

.price {
  font-size: 1rem;
  font-weight: 700;
}

.label {
  color: var(--muted);
  font-size: 0.78rem;
}

.layout-2 {
  display: grid;
  grid-template-columns: 1.8fr 1fr;
  gap: 14px;
}

.cart-item {
  border: 1px solid var(--border);
  background: var(--bg-surface);
  border-radius: 10px;
  padding: 10px;
  display: grid;
  grid-template-columns: 2fr 120px 100px 90px;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.cart-item p,
.cart-item h3 {
  margin: 0;
}

.cart-item p {
  color: var(--muted);
  font-size: 0.78rem;
}

.summary {
  border: 1px solid var(--border);
  background: var(--bg-surface);
  border-radius: 10px;
  padding: 12px;
  display: grid;
  gap: 8px;
  align-content: start;
}

.summary div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.summary .total {
  border-top: 1px solid var(--border);
  padding-top: 8px;
  font-weight: 700;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.payment-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 10px 0;
  font-size: 0.82rem;
}

.line-item {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.78rem;
  border-bottom: 1px dashed var(--border);
  padding: 5px 0;
}

.line-item:last-child {
  border-bottom: none;
}

.order-row {
  width: 100%;
  text-align: left;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text);
  border-radius: 10px;
  padding: 10px;
  display: grid;
  gap: 4px;
  margin-bottom: 8px;
  cursor: pointer;
}

.profile {
  position: relative;
}

.profile-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  border-radius: 10px;
  min-width: 220px;
  overflow: hidden;
  z-index: 50;
  box-shadow: 0 12px 24px rgba(2, 6, 23, 0.35);
}

.profile-menu-head {
  padding: 9px 10px;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}

.profile-menu-item {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  color: var(--text);
  padding: 9px 10px;
  cursor: pointer;
  font-size: 0.82rem;
}

.profile-menu-item:hover {
  background: var(--card);
}

.profile-menu-logout {
  border-top: 1px solid var(--border);
}

.auth {
  min-height: calc(100vh - 60px);
  display: grid;
  place-items: center;
}

.auth-card {
  max-width: 520px;
  width: 100%;
}

.auth-foot {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.84rem;
}

.auth-foot a {
  color: var(--secondary);
}

.otp {
  font-size: 1.4rem;
  letter-spacing: 0.4rem;
  text-align: center;
}

.error {
  margin: 10px 0;
  color: var(--error-text);
  background: linear-gradient(180deg, var(--error-bg-top), var(--error-bg-bottom));
  border: 1px solid var(--error-border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.84rem;
  font-weight: 500;
  line-height: 1.45;
  box-shadow: 0 4px 12px rgba(2, 6, 23, 0.12);
}

.success {
  margin: 10px 0;
  color: var(--success-text);
  background: linear-gradient(180deg, var(--success-bg-top), var(--success-bg-bottom));
  border: 1px solid var(--success-border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.84rem;
  font-weight: 500;
  line-height: 1.45;
  box-shadow: 0 4px 12px rgba(2, 6, 23, 0.12);
}

.empty {
  color: var(--text);
  margin: 0;
  padding: 12px;
  opacity: 0.9;
}

.portal-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px 1fr;
  background:
    radial-gradient(circle at 0% 0%, rgba(56, 189, 248, 0.12), transparent 34%),
    radial-gradient(circle at 100% 100%, rgba(34, 197, 94, 0.08), transparent 40%);
}

.portal-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(23, 34, 60, 0.98), rgba(15, 23, 42, 0.98));
  padding: 22px 16px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 16px;
  box-shadow: 10px 0 30px rgba(2, 6, 23, 0.16);
}

[data-theme="light"] .portal-sidebar {
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.portal-brand {
  font-weight: 700;
  font-size: 1.06rem;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  letter-spacing: 0.02em;
}

.portal-nav {
  display: grid;
  gap: 7px;
  align-content: start;
}

.portal-nav a {
  position: relative;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.22s ease;
}

.portal-nav a:hover,
.portal-nav a.active {
  transform: translateX(2px);
  border-color: rgba(99, 102, 241, 0.45);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.22), rgba(56, 189, 248, 0.12));
  color: var(--text);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.22);
}

.portal-nav a.active::before {
  content: "";
  position: absolute;
  left: -9px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 8px;
  background: linear-gradient(180deg, #22c55e, #38bdf8);
}

.portal-main {
  padding: 24px;
  display: grid;
  gap: 16px;
  align-content: start;
  max-width: 1320px;
  width: 100%;
}

.portal-main .card {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(2, 6, 23, 0.1));
  box-shadow: 0 10px 30px rgba(2, 6, 23, 0.2);
}

[data-theme="light"] .portal-main .card {
  background: #ffffff;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
}

.portal-main h1,
.portal-main h2,
.portal-main h3 {
  margin-top: 0;
  letter-spacing: 0.01em;
}

.portal-main h2 {
  font-size: 1.35rem;
  margin-bottom: 10px;
}

.portal-main h3 {
  font-size: 1.06rem;
}

.portal-main .section-head {
  margin-bottom: 14px;
}

.portal-main .form-grid {
  gap: 12px;
}

.portal-main .input {
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.42);
  border-radius: 10px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

[data-theme="light"] .portal-main .input {
  background: #fff;
}

.portal-main .input::placeholder {
  color: #94a3b8;
  font-size: 0.88rem;
}

.portal-main .input:focus {
  border-color: rgba(56, 189, 248, 0.8);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18);
}

.portal-main textarea.input {
  min-height: 96px;
}

.portal-main .btn {
  border-radius: 10px;
  font-weight: 600;
  transition: transform 0.18s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.portal-main .btn:hover {
  transform: translateY(-1px);
}

.portal-main .btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  box-shadow: none;
}

.portal-main .btn-primary {
  box-shadow: 0 10px 18px rgba(34, 197, 94, 0.2);
}

.portal-main .btn-outline {
  border-color: rgba(148, 163, 184, 0.36);
  background: rgba(15, 23, 42, 0.25);
}

.portal-main .btn-outline:hover {
  border-color: rgba(56, 189, 248, 0.55);
  background: rgba(56, 189, 248, 0.12);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.table th,
.table td {
  border-bottom: 1px solid var(--border);
  padding: 11px 10px;
  text-align: left;
  vertical-align: middle;
}

.table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.admin-card {
  padding: 18px;
}

.admin-page-title {
  margin: 0;
  letter-spacing: 0.01em;
}

.admin-subtext {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.82rem;
}

.table-wrap {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: auto;
  background: var(--bg-surface);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.table thead th {
  position: sticky;
  top: 0;
  background: var(--bg-surface);
  z-index: 1;
}

.table tbody tr:hover {
  background: rgba(99, 102, 241, 0.08);
}

.table tbody tr:nth-child(even) {
  background: rgba(148, 163, 184, 0.04);
}

.table tbody tr {
  transition: background 0.15s ease;
}

.kpi-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.kpi-card {
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.62), rgba(15, 23, 42, 0.35));
  border-radius: 12px;
  padding: 12px;
  display: grid;
  gap: 6px;
  box-shadow: 0 8px 20px rgba(2, 6, 23, 0.16);
}

.kpi-card span {
  font-size: 0.74rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.kpi-card strong {
  font-size: 1.05rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 10px;
  margin-right: 6px;
  margin-bottom: 4px;
  font-size: 0.74rem;
  text-transform: lowercase;
  background: var(--card);
}

.chip-wrap {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.action-row {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.72rem;
  text-transform: capitalize;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.45);
  color: var(--text);
  font-weight: 600;
}

.status-success {
  color: #86efac;
  border-color: rgba(134, 239, 172, 0.5);
}

.status-warning {
  color: #fde68a;
  border-color: rgba(253, 230, 138, 0.5);
}

.status-danger {
  color: #fca5a5;
  border-color: rgba(252, 165, 165, 0.5);
}

.expanded-row {
  background: var(--bg-surface);
  padding: 0 !important;
}

.expanded-content {
  padding: 12px;
  border-top: 1px solid var(--border);
}

.upload-box {
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 12px;
  display: grid;
  gap: 10px;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.42), rgba(15, 23, 42, 0.3));
}

.merchant-profile-card {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 14px;
  align-items: start;
}

.merchant-profile-left {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 12px;
  align-items: start;
}

.merchant-profile-trigger {
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 10px;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.merchant-profile-trigger:hover,
.merchant-profile-trigger:focus {
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

.merchant-avatar-img,
.merchant-avatar-fallback {
  width: 84px;
  height: 84px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
}

.merchant-avatar-img {
  object-fit: cover;
}

.merchant-avatar-fallback {
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--secondary);
}

.merchant-profile-right {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: var(--bg-surface);
}

textarea.input {
  width: 100%;
  resize: vertical;
}

.chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.chart-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-surface);
  padding: 12px;
  min-height: 280px;
  box-shadow: 0 8px 24px rgba(2, 6, 23, 0.14);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.7);
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 16px;
}

.modal-card {
  width: min(940px, 100%);
  max-height: calc(100vh - 32px);
  overflow: auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
}

.portal-main ul {
  padding-left: 18px;
}

.portal-main li {
  margin-bottom: 6px;
}

/* Merchant fluorescent blue theme */
.auth-merchant {
  background:
    radial-gradient(circle at 8% 10%, rgba(37, 99, 235, 0.18), transparent 32%),
    radial-gradient(circle at 85% 88%, rgba(6, 182, 212, 0.2), transparent 38%),
    #f5faff;
}

.merchant-auth-card {
  border: 1px solid #e2e8f0;
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
}

.merchant-auth-card h2 {
  color: #0f172a;
}

.merchant-auth-card .input {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #0f172a;
}

.merchant-auth-card .input::placeholder {
  color: #64748b;
}

.merchant-auth-card .input:focus {
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2);
}

.merchant-auth-card .btn-primary {
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  color: #fff;
  border: 1px solid #0284c7;
}

.merchant-auth-card .btn-primary:hover {
  background: linear-gradient(135deg, #1d4ed8, #0891b2);
}

.portal-layout-merchant {
  background:
    radial-gradient(circle at 0% 0%, rgba(37, 99, 235, 0.1), transparent 30%),
    radial-gradient(circle at 100% 100%, rgba(6, 182, 212, 0.12), transparent 34%),
    #f5faff;
}

.portal-layout-merchant .portal-sidebar {
  background: linear-gradient(180deg, #0b1d42, #0b2f6d 62%, #0a1a3a);
  border-right: 1px solid rgba(56, 189, 248, 0.35);
  box-shadow: 10px 0 24px rgba(8, 47, 115, 0.34);
}

.portal-layout-merchant .portal-brand {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.03);
  color: #f8fafc;
}

.portal-layout-merchant .portal-nav a {
  color: #cbd5e1;
}

.portal-layout-merchant .portal-nav a:hover,
.portal-layout-merchant .portal-nav a.active {
  color: #f8fafc;
  border-color: rgba(56, 189, 248, 0.58);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.35), rgba(6, 182, 212, 0.26));
  box-shadow: 0 8px 20px rgba(5, 15, 45, 0.38);
}

.portal-layout-merchant .portal-nav a.active::before {
  background: linear-gradient(180deg, #38bdf8, #2563eb);
}

.portal-layout-merchant .portal-main {
  background: transparent;
}

.portal-layout-merchant .portal-main .card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.portal-layout-merchant .merchant-profile-trigger:hover,
.portal-layout-merchant .merchant-profile-trigger:focus {
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2);
  background: #eef9ff;
}

.portal-layout-merchant .admin-page-title {
  color: #0f172a;
}

.portal-layout-merchant .admin-subtext {
  color: #475569;
}

.portal-layout-merchant .section-head > h2,
.portal-layout-merchant .section-head > h3,
.portal-layout-merchant .section-head > h4 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.portal-layout-merchant .section-head > h2::before,
.portal-layout-merchant .section-head > h3::before,
.portal-layout-merchant .section-head > h4::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #67e8f9 0%, #22d3ee 45%, #2563eb 100%);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18), 0 0 16px rgba(37, 99, 235, 0.3);
  flex-shrink: 0;
}

.portal-layout-merchant .input {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #0f172a;
}

.portal-layout-merchant .input::placeholder {
  color: #64748b;
}

.portal-layout-merchant .input:focus {
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.18);
}

.portal-layout-merchant .btn-primary {
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  color: #ffffff;
  border: 1px solid #0284c7;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.3);
}

.portal-layout-merchant .btn-primary:hover {
  background: linear-gradient(135deg, #1d4ed8, #0891b2);
}

.portal-layout-merchant .btn-outline {
  color: #1e293b;
  background: #ffffff;
  border-color: #cbd5e1;
}

.portal-layout-merchant .btn-outline:hover {
  color: #0f172a;
  border-color: #0ea5e9;
  background: #eaf6ff;
}

.portal-layout-merchant .home-actions .btn,
.portal-layout-merchant .section-head .btn {
  position: relative;
}

.portal-layout-merchant .home-actions .btn::before,
.portal-layout-merchant .section-head .btn::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #67e8f9 0%, #22d3ee 50%, #1d4ed8 100%);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.15), 0 0 10px rgba(37, 99, 235, 0.26);
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  opacity: 0.9;
}

.portal-layout-merchant .home-actions .btn:hover::before,
.portal-layout-merchant .section-head .btn:hover::before,
.portal-layout-merchant .home-actions .btn:focus-visible::before,
.portal-layout-merchant .section-head .btn:focus-visible::before {
  transform: scale(1.15);
  box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.24), 0 0 12px rgba(6, 182, 212, 0.34);
}

.portal-layout-merchant .table-wrap {
  border-color: #e2e8f0;
  background: #ffffff;
}

.portal-layout-merchant .table thead th {
  background: #f1f5f9;
  color: #334155;
}

.portal-layout-merchant .table tbody tr:nth-child(even) {
  background: #f8fafc;
}

.portal-layout-merchant .table tbody tr:hover {
  background: #eaf6ff;
}

.portal-layout-merchant .kpi-card,
.portal-layout-merchant .chart-card,
.portal-layout-merchant .merchant-profile-right,
.portal-layout-merchant .upload-box {
  border-color: #e2e8f0;
  background: #ffffff;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
}

.portal-layout-merchant .status-badge {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #1e293b;
}

.portal-layout-merchant .status-success {
  color: #166534;
  border-color: rgba(22, 101, 52, 0.24);
}

.portal-layout-merchant .status-warning {
  color: #1d4ed8;
  border-color: rgba(29, 78, 216, 0.3);
}

.portal-layout-merchant .status-danger {
  color: #991b1b;
  border-color: rgba(153, 27, 27, 0.25);
}

.portal-layout-merchant .chip {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #334155;
}

.portal-layout-merchant .error {
  color: #991b1b;
  background: linear-gradient(180deg, rgba(254, 226, 226, 0.95), rgba(254, 242, 242, 0.95));
  border-color: rgba(239, 68, 68, 0.35);
}

.portal-layout-merchant .success {
  color: #166534;
  background: linear-gradient(180deg, rgba(220, 252, 231, 0.95), rgba(240, 253, 244, 0.95));
  border-color: rgba(34, 197, 94, 0.35);
}

/* Admin orange theme */
.auth-admin {
  background:
    radial-gradient(circle at 14% 16%, rgba(251, 146, 60, 0.2), transparent 34%),
    radial-gradient(circle at 82% 82%, rgba(249, 115, 22, 0.16), transparent 38%);
}

.admin-auth-card {
  border: 1px solid rgba(251, 146, 60, 0.35);
  background: linear-gradient(180deg, rgba(30, 18, 8, 0.96), rgba(17, 10, 4, 0.96));
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.36), 0 0 0 1px rgba(251, 146, 60, 0.15);
  max-width: 560px;
}

.admin-auth-card h2 {
  color: #fed7aa;
  letter-spacing: 0.02em;
}

.admin-auth-card .empty {
  color: #fdba74;
  background: rgba(154, 52, 18, 0.2);
  border-radius: 10px;
}

.admin-auth-card .input {
  border: 1px solid rgba(251, 146, 60, 0.35);
  background: rgba(66, 32, 6, 0.35);
}

.admin-auth-card .input::placeholder {
  color: #fdba74;
}

.admin-auth-card .input:focus {
  border-color: rgba(251, 146, 60, 0.9);
  box-shadow: 0 0 0 3px rgba(251, 146, 60, 0.24);
}

.admin-auth-card .btn-primary {
  background: linear-gradient(135deg, #fb923c, #f97316);
  color: #261202;
  border: 1px solid rgba(251, 146, 60, 0.5);
  box-shadow: 0 12px 24px rgba(249, 115, 22, 0.28);
}

.admin-auth-card .btn-primary:hover {
  background: linear-gradient(135deg, #fdba74, #fb923c);
}

.portal-layout-admin {
  background:
    radial-gradient(circle at 4% 0%, rgba(251, 146, 60, 0.16), transparent 30%),
    radial-gradient(circle at 100% 100%, rgba(249, 115, 22, 0.13), transparent 36%),
    #0f121a;
}

.portal-layout-admin .portal-sidebar {
  background: linear-gradient(180deg, #2f1707, #1f1208 46%, #130d08);
  border-right-color: rgba(251, 146, 60, 0.22);
  box-shadow: 14px 0 28px rgba(0, 0, 0, 0.32);
}

.portal-layout-admin .portal-brand {
  background: linear-gradient(135deg, rgba(251, 146, 60, 0.16), rgba(234, 88, 12, 0.08));
  border-color: rgba(251, 146, 60, 0.42);
  color: #ffedd5;
  font-weight: 700;
}

.portal-layout-admin .portal-nav a {
  color: #fed7aa;
  border-color: transparent;
}

.portal-layout-admin .portal-nav a:hover,
.portal-layout-admin .portal-nav a.active {
  border-color: rgba(251, 146, 60, 0.55);
  background: linear-gradient(135deg, rgba(251, 146, 60, 0.25), rgba(249, 115, 22, 0.12));
  color: #fff7ed;
  box-shadow: 0 8px 20px rgba(14, 9, 5, 0.34);
}

.portal-layout-admin .portal-nav a.active::before {
  background: linear-gradient(180deg, #fdba74, #f97316);
}

.portal-layout-admin .portal-main {
  background: transparent;
}

.portal-layout-admin .portal-main .card {
  background: linear-gradient(180deg, rgba(31, 21, 13, 0.9), rgba(20, 14, 10, 0.92));
  border-color: rgba(251, 146, 60, 0.25);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.24);
}

.portal-layout-admin .admin-page-title {
  color: #ffedd5;
}

.portal-layout-admin .admin-subtext {
  color: #fdba74;
}

.portal-layout-admin .table-wrap {
  border-color: rgba(251, 146, 60, 0.28);
  background: rgba(24, 17, 10, 0.9);
}

.portal-layout-admin .table thead th {
  background: rgba(57, 31, 10, 0.82);
  color: #fdba74;
}

.portal-layout-admin .table tbody tr:nth-child(even) {
  background: rgba(251, 146, 60, 0.06);
}

.portal-layout-admin .table tbody tr:hover {
  background: rgba(251, 146, 60, 0.14);
}

.portal-layout-admin .input {
  border-color: rgba(251, 146, 60, 0.34);
  background: rgba(53, 29, 8, 0.28);
}

.portal-layout-admin .input::placeholder {
  color: #fbbf24;
}

.portal-layout-admin .input:focus {
  border-color: rgba(251, 146, 60, 0.95);
  box-shadow: 0 0 0 3px rgba(251, 146, 60, 0.2);
}

.portal-layout-admin .btn-primary {
  background: linear-gradient(135deg, #fb923c, #f97316);
  color: #311b08;
  border-color: rgba(251, 146, 60, 0.6);
  box-shadow: 0 10px 20px rgba(249, 115, 22, 0.28);
}

.portal-layout-admin .btn-primary:hover {
  background: linear-gradient(135deg, #fdba74, #fb923c);
}

.portal-layout-admin .btn-outline {
  border-color: rgba(251, 146, 60, 0.42);
  background: rgba(63, 32, 9, 0.36);
  color: #ffedd5;
}

.portal-layout-admin .btn-outline:hover {
  border-color: rgba(253, 186, 116, 0.66);
  background: rgba(124, 45, 18, 0.35);
}

.portal-layout-admin .kpi-card,
.portal-layout-admin .chart-card,
.portal-layout-admin .merchant-profile-right,
.portal-layout-admin .upload-box {
  border-color: rgba(251, 146, 60, 0.28);
  background: linear-gradient(180deg, rgba(58, 33, 11, 0.48), rgba(36, 22, 9, 0.36));
}

.portal-layout-admin .status-badge {
  background: rgba(66, 34, 9, 0.45);
  border-color: rgba(251, 146, 60, 0.32);
}

.portal-layout-admin .status-success {
  color: #bbf7d0;
  border-color: rgba(134, 239, 172, 0.45);
}

.portal-layout-admin .status-warning {
  color: #fde68a;
  border-color: rgba(253, 230, 138, 0.5);
}

.portal-layout-admin .status-danger {
  color: #fca5a5;
  border-color: rgba(252, 165, 165, 0.52);
}

.portal-layout-admin .error {
  color: #fecaca;
}

.portal-layout-admin .success {
  color: #bbf7d0;
}

[data-theme="light"] .auth-admin {
  background:
    radial-gradient(circle at 15% 14%, rgba(251, 146, 60, 0.24), transparent 34%),
    radial-gradient(circle at 85% 86%, rgba(249, 115, 22, 0.18), transparent 40%),
    #fff7ed;
}

[data-theme="light"] .admin-auth-card {
  background: #fff;
  border-color: rgba(251, 146, 60, 0.38);
  box-shadow: 0 16px 28px rgba(234, 88, 12, 0.12);
}

[data-theme="light"] .admin-auth-card h2 {
  color: #9a3412;
}

[data-theme="light"] .admin-auth-card .empty {
  color: #9a3412;
  background: rgba(255, 237, 213, 0.9);
}

[data-theme="light"] .portal-layout-admin {
  background:
    radial-gradient(circle at 0% 0%, rgba(251, 146, 60, 0.18), transparent 34%),
    radial-gradient(circle at 100% 100%, rgba(249, 115, 22, 0.14), transparent 40%),
    #fff7ed;
}

[data-theme="light"] .portal-layout-admin .portal-sidebar {
  background: linear-gradient(180deg, #fff1e6, #ffe8d2);
  border-right-color: rgba(251, 146, 60, 0.34);
}

[data-theme="light"] .portal-layout-admin .portal-brand {
  color: #9a3412;
}

[data-theme="light"] .portal-layout-admin .portal-nav a {
  color: #9a3412;
}

[data-theme="light"] .portal-layout-admin .portal-main .card {
  background: #fff;
  border-color: rgba(251, 146, 60, 0.34);
  box-shadow: 0 10px 22px rgba(194, 65, 12, 0.08);
}

[data-theme="light"] .portal-layout-admin .admin-page-title {
  color: #7c2d12;
}

[data-theme="light"] .portal-layout-admin .admin-subtext {
  color: #9a3412;
}

[data-theme="light"] .portal-layout-admin .table-wrap {
  background: #fff;
}

[data-theme="dark"] .portal-layout-merchant {
  background:
    radial-gradient(circle at 0% 0%, rgba(37, 99, 235, 0.28), transparent 34%),
    radial-gradient(circle at 100% 100%, rgba(6, 182, 212, 0.2), transparent 36%),
    #071126;
}

[data-theme="dark"] .portal-layout-merchant .portal-main .card,
[data-theme="dark"] .portal-layout-merchant .kpi-card,
[data-theme="dark"] .portal-layout-merchant .chart-card,
[data-theme="dark"] .portal-layout-merchant .merchant-profile-right,
[data-theme="dark"] .portal-layout-merchant .upload-box,
[data-theme="dark"] .portal-layout-merchant .table-wrap {
  background: #111827;
  border-color: #334155;
}

[data-theme="dark"] .portal-layout-merchant .admin-page-title {
  color: #f8fafc;
}

[data-theme="dark"] .portal-layout-merchant .admin-subtext,
[data-theme="dark"] .portal-layout-merchant .table thead th,
[data-theme="dark"] .portal-layout-merchant .chip {
  color: #cbd5e1;
}

[data-theme="dark"] .portal-layout-merchant .table thead th {
  background: #1e293b;
}

[data-theme="dark"] .portal-layout-merchant .table tbody tr:nth-child(even) {
  background: rgba(30, 41, 59, 0.45);
}

[data-theme="dark"] .portal-layout-merchant .table tbody tr:hover {
  background: rgba(14, 165, 233, 0.14);
}

[data-theme="dark"] .portal-layout-merchant .input,
[data-theme="dark"] .portal-layout-merchant .btn-outline,
[data-theme="dark"] .portal-layout-merchant .status-badge,
[data-theme="dark"] .portal-layout-merchant .chip {
  background: #0f172a;
  color: #e2e8f0;
  border-color: #334155;
}

[data-theme="dark"] .portal-layout-merchant .section-head > h2::before,
[data-theme="dark"] .portal-layout-merchant .section-head > h3::before,
[data-theme="dark"] .portal-layout-merchant .section-head > h4::before,
[data-theme="dark"] .portal-layout-merchant .home-actions .btn::before,
[data-theme="dark"] .portal-layout-merchant .section-head .btn::before {
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.24), 0 0 14px rgba(6, 182, 212, 0.38);
}

@media (max-width: 980px) {
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail,
  .layout-2,
  .cart-item {
    grid-template-columns: 1fr;
  }

  .portal-layout {
    grid-template-columns: 1fr;
  }

  .portal-sidebar {
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 14px 12px;
    box-shadow: none;
  }

  .portal-brand {
    display: none;
  }

  .portal-nav {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 4px;
  }

  .portal-nav a {
    white-space: nowrap;
  }

  .portal-nav a.active::before {
    display: none;
  }

  .portal-main {
    padding: 14px;
  }

  .portal-layout-admin .portal-sidebar {
    box-shadow: none;
  }

  .portal-layout-merchant .portal-sidebar {
    box-shadow: none;
  }

  .chart-grid {
    grid-template-columns: 1fr;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .merchant-profile-card {
    grid-template-columns: 1fr;
  }

  .mega-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 740px) {
  .nav-inner {
    flex-wrap: wrap;
  }

  .brand {
    min-width: 0;
  }

  .nav-links {
    width: 100%;
    order: 3;
    margin-left: 0;
    flex-wrap: wrap;
  }

  .section-head {
    flex-direction: column;
    align-items: stretch;
  }

  .filters,
  .form-grid {
    grid-template-columns: 1fr;
    display: grid;
  }

  .catalogue-layout {
    grid-template-columns: 1fr;
  }

  .filter-panel {
    display: none;
  }

  .filter-mobile-toggle {
    display: inline-flex;
  }

  .btn.mobile-categories-btn {
    display: inline-flex;
  }

  .mega-menu {
    display: none;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .portal-main .card {
    padding: 12px;
    border-radius: 12px;
  }

  .table th,
  .table td {
    padding: 9px 8px;
    font-size: 0.84rem;
  }
}
