* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Tajawal", sans-serif;
  background-image:
    radial-gradient(circle at 100% 0%, rgba(29, 215, 94, 0.11), transparent 32%),
    radial-gradient(circle at 10% 15%, rgba(59, 130, 246, 0.1), transparent 30%),
    linear-gradient(180deg, #03070f, #02050b);
}

#scrollProgress {
  transition: width 0.2s linear;
}

.app-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  width: 18rem;
  height: 100vh;
  border-left: 1px solid #273245;
  background: #070c16;
  padding: 1rem;
  transition: transform 0.3s ease;
}

.side-group {
  margin-bottom: 0.2rem;
}

.side-title {
  margin: 0.3rem 0 0.65rem;
  color: #7f8dac;
  font-size: 0.76rem;
}

.side-dropdown-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.side-dropdown-chevron {
  transition: transform 0.2s ease;
}

.side-dropdown-toggle.open .side-dropdown-chevron {
  transform: rotate(180deg);
}

.side-dropdown-links {
  padding-right: 0.2rem;
}

.side-link {
  display: block;
  border-radius: 0.7rem;
  color: #b6c3de;
  font-size: 0.92rem;
  padding: 0.55rem 0.75rem;
  margin-bottom: 0.2rem;
  transition: all 0.2s ease;
}

.side-link:hover,
.side-link.active {
  background: rgba(29, 215, 94, 0.15);
  color: #1dd75e;
}

.theme-btn,
.ghost-btn,
.store-btn,
.icon-btn,
.slide-btn {
  border: 1px solid #2a364c;
  border-radius: 0.75rem;
  background: #101a2d;
  color: #d7e4ff;
  font-weight: 700;
  transition: all 0.2s ease;
}

.theme-btn:hover,
.ghost-btn:hover,
.store-btn:hover,
.icon-btn:hover,
.slide-btn:hover {
  border-color: #1dd75e;
  color: #1dd75e;
}

.theme-btn {
  padding: 0.7rem 1rem;
}

.ghost-btn,
.store-btn {
  padding: 0.6rem 0.9rem;
  font-size: 0.88rem;
}

.icon-btn {
  width: 2.1rem;
  height: 2.1rem;
}

.slide-btn {
  width: 2rem;
  height: 2rem;
}

.sidebar-overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(2, 6, 13, 0.68);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.sidebar-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.app-main {
  margin-right: 18rem;
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 1rem;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(39, 50, 69, 0.8);
  background: rgba(4, 9, 19, 0.72);
}

.dash-card {
  border: 1px solid #273245;
  border-radius: 1rem;
  background: linear-gradient(180deg, rgba(13, 20, 34, 0.98), rgba(8, 13, 24, 0.98));
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.2);
}

.hero-track {
  display: flex;
  transition: transform 0.35s ease;
}

.hero-slide {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.6rem;
  min-width: 100%;
  padding: 0.8rem;
}

.banner-a,
.banner-b,
.banner-c {
  border-radius: 0.9rem;
  padding: 1.2rem;
  min-height: 9rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.banner-a {
  background: linear-gradient(135deg, #0a1c10, #2d7b31);
}

.banner-b {
  background: linear-gradient(135deg, #11254e, #245fdd);
}

.banner-c {
  background: linear-gradient(135deg, #102524, #1a8f90);
}

.banner-a h2,
.banner-b h2,
.banner-c h2 {
  margin: 0 0 0.35rem;
  font-size: 1.5rem;
  font-weight: 800;
}

.banner-a p,
.banner-b p,
.banner-c p {
  margin: 0;
  color: #e2ebff;
  font-size: 1rem;
}

.banner-img {
  border-radius: 0.9rem;
  width: 100%;
  height: 9rem;
  object-fit: cover;
  border: 1px solid #2a364c;
}

.dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: #3a4a67;
  transition: all 0.25s ease;
}

.dot.active {
  width: 1.7rem;
  background: #1dd75e;
}

.task-card {
  position: relative;
  text-align: right;
  border: 1px solid #2b3851;
  border-radius: 0.8rem;
  background: #0d1526;
  color: #d8e4fe;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.9rem 0.8rem;
  transition: all 0.2s ease;
}

.task-card::before {
  content: "";
  position: absolute;
  left: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  width: 0.8rem;
  height: 0.8rem;
  border: 1px solid #1dd75e;
  border-radius: 0.2rem;
}

.task-card.done {
  border-color: rgba(29, 215, 94, 0.75);
  background: rgba(29, 215, 94, 0.14);
  color: #98f8b8;
}

.task-card.done::before {
  background: #1dd75e;
}

.promo-card h3 {
  font-size: 1.8rem;
  margin: 0 0 0.4rem;
}

.promo-card p {
  margin: 0;
  color: #a2b1cd;
}

.promo-card.green {
  background:
    radial-gradient(circle at 15% 15%, rgba(255, 255, 255, 0.1), transparent 30%),
    linear-gradient(135deg, #159440, #1dd75e);
}

.promo-card.green h3,
.promo-card.green p,
.promo-card.green .store-btn {
  color: #052811;
}

.promo-card.green .store-btn {
  border-color: rgba(5, 40, 17, 0.45);
  background: rgba(255, 255, 255, 0.72);
}

.kpi-card {
  border: 1px solid #273245;
  border-radius: 0.9rem;
  background: #0b1424;
  padding: 0.9rem;
}

.kpi-card p {
  margin: 0;
  color: #91a2c0;
  font-size: 0.86rem;
}

.kpi-card h4 {
  margin: 0.45rem 0 0;
  font-size: 1.45rem;
  font-weight: 800;
  color: #dff1ff;
}

.select-dark {
  border: 1px solid #2a364c;
  border-radius: 0.7rem;
  background: #0e172a;
  color: #cfe0ff;
  padding: 0.5rem 0.7rem;
}

.chart-bars {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 0.55rem;
  align-items: end;
  min-height: 12rem;
}

.bar {
  border-radius: 0.45rem 0.45rem 0.2rem 0.2rem;
  background: linear-gradient(180deg, rgba(29, 215, 94, 0.92), rgba(29, 215, 94, 0.35));
  min-height: 18px;
  transition: height 0.35s ease;
}

.alert-item {
  border: 1px solid #2b3851;
  border-radius: 0.7rem;
  padding: 0.65rem;
  background: #0d1525;
}

table {
  border-collapse: collapse;
}

th,
td {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid #243045;
}

tbody tr:hover {
  background: rgba(29, 215, 94, 0.08);
}

.pill {
  display: inline-flex;
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 700;
}

.pill.success {
  background: rgba(29, 215, 94, 0.18);
  color: #78ef9d;
}

.pill.pending {
  background: rgba(59, 130, 246, 0.2);
  color: #8dbbff;
}

.pill.danger {
  background: rgba(239, 68, 68, 0.2);
  color: #ff9090;
}

.lazy {
  filter: blur(9px);
  transform: scale(1.02);
  transition: filter 0.45s ease, transform 0.45s ease;
}

.lazy.loaded {
  filter: blur(0);
  transform: scale(1);
}

@media (min-width: 900px) {
  .hero-slide {
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
  }

  .banner-img {
    height: 100%;
    min-height: 9rem;
  }
}

/* ─── Store selector ───────────────────────────────────────── */
.store-selector {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  border: 1px solid #273245;
  border-radius: 0.75rem;
  padding: 0.6rem 0.75rem;
  cursor: pointer;
  transition: border-color 0.2s;
}
.store-selector:hover { border-color: #1dd75e; }

/* ─── Side nav icons ────────────────────────────────────────── */
.side-link {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.side-link svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.side-link-label {
  flex: 1;
}

/* ─── Badge ─────────────────────────────────────────────────── */
.side-badge {
  margin-right: auto;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.22);
  color: #ff9090;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.12rem 0.45rem;
}
.side-badge.new {
  background: rgba(29, 215, 94, 0.2);
  color: #5ef891;
}

/* ─── Scrollable nav ────────────────────────────────────────── */
.side-nav { scrollbar-width: thin; scrollbar-color: #273245 transparent; }
.side-nav::-webkit-scrollbar { width: 4px; }
.side-nav::-webkit-scrollbar-thumb { background: #273245; border-radius: 999px; }

/* ─── Page title strip ──────────────────────────────────────── */
.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.page-header h1 { font-size: 1.6rem; font-weight: 800; margin: 0; }
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: #96A4BE;
  margin-bottom: 0.3rem;
}
.breadcrumb a { color: #1dd75e; }

/* ─── Table ─────────────────────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; text-align: right; }
.data-table th {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #273245;
  color: #7f8dac;
  font-weight: 700;
  white-space: nowrap;
}
.data-table td {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid rgba(39,50,69,0.6);
  vertical-align: middle;
}
.data-table tbody tr:hover { background: rgba(29, 215, 94, 0.06); }

/* ─── Search / filter bar ───────────────────────────────────── */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #273245;
}
.search-input {
  flex: 1;
  min-width: 180px;
  background: #0b1424;
  border: 1px solid #273245;
  border-radius: 0.65rem;
  color: #e6f1ff;
  font-family: inherit;
  font-size: 0.9rem;
  padding: 0.55rem 0.85rem;
  outline: none;
  transition: border-color 0.2s;
}
.search-input:focus { border-color: #1dd75e; }
.filter-btn {
  border: 1px solid #273245;
  border-radius: 0.65rem;
  background: #0b1424;
  color: #c0ceea;
  font-family: inherit;
  font-size: 0.87rem;
  font-weight: 600;
  padding: 0.55rem 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}
.filter-btn:hover,
.filter-btn.active { border-color: #1dd75e; color: #1dd75e; }

/* ─── Tabs ───────────────────────────────────────────────────── */
.tab-strip {
  display: flex;
  overflow-x: auto;
  border-bottom: 1px solid #273245;
  scrollbar-width: none;
}
.tab-strip::-webkit-scrollbar { display: none; }
.tab-btn {
  flex-shrink: 0;
  padding: 0.75rem 1.1rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: #96A4BE;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  cursor: pointer;
}
.tab-btn:hover { color: #e6f1ff; }
.tab-btn.active { color: #1dd75e; border-bottom-color: #1dd75e; }

/* ─── Product card grid ─────────────────────────────────────── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  padding: 1rem;
}
.product-card {
  border: 1px solid #273245;
  border-radius: 1rem;
  background: #0d1526;
  overflow: hidden;
  transition: transform 0.22s, border-color 0.22s;
  cursor: pointer;
}
.product-card:hover { transform: translateY(-3px); border-color: rgba(29,215,94,0.5); }
.product-card img { width: 100%; height: 10rem; object-fit: cover; }
.product-card-body { padding: 0.7rem; }
.product-card-body h4 { font-size: 0.95rem; font-weight: 700; margin: 0 0 0.3rem; }
.product-card-body p { font-size: 0.82rem; color: #96A4BE; margin: 0; }

/* ─── Form elements ─────────────────────────────────────────── */
.form-group { display: grid; gap: 0.4rem; margin-bottom: 0.9rem; }
.form-label { font-size: 0.87rem; color: #b0c0dc; font-weight: 600; }
.form-input,
.form-select,
.form-textarea {
  background: #0b1424;
  border: 1px solid #273245;
  border-radius: 0.7rem;
  color: #e6f1ff;
  font-family: inherit;
  font-size: 0.9rem;
  padding: 0.7rem 0.9rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: #1dd75e;
  box-shadow: 0 0 0 3px rgba(29,215,94,0.15);
}
.form-textarea { resize: vertical; min-height: 100px; }

/* ─── Toggle switch ─────────────────────────────────────────── */
.toggle-wrap { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; }
.toggle-switch {
  position: relative;
  width: 2.8rem;
  height: 1.55rem;
  flex-shrink: 0;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-track {
  position: absolute;
  inset: 0;
  background: #273245;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.25s;
}
.toggle-track::after {
  content: '';
  position: absolute;
  top: 0.18rem;
  right: 0.18rem;
  width: 1.2rem;
  height: 1.2rem;
  background: #fff;
  border-radius: 999px;
  transition: transform 0.25s;
}
.toggle-switch input:checked + .toggle-track { background: #1dd75e; }
.toggle-switch input:checked + .toggle-track::after { transform: translateX(-1.25rem); }

/* ─── Stat summary row ──────────────────────────────────────── */
.summary-row {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}
.summary-card {
  border: 1px solid #273245;
  border-radius: 0.9rem;
  background: #0b1424;
  padding: 0.85rem;
}
.summary-card .s-label { font-size: 0.8rem; color: #7f8dac; margin-bottom: 0.35rem; }
.summary-card .s-value { font-size: 1.4rem; font-weight: 800; }
.summary-card .s-delta { font-size: 0.78rem; margin-top: 0.25rem; }
.s-delta.up   { color: #1dd75e; }
.s-delta.down { color: #ef4444; }

/* ─── Btn variants ──────────────────────────────────────────── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 0.4rem;
  border-radius: 0.7rem;
  background: #1dd75e;
  color: #04230E;
  font-weight: 800;
  padding: 0.65rem 1.1rem;
  font-size: 0.9rem;
  transition: opacity 0.2s, transform 0.2s;
  cursor: pointer;
}
.btn-primary:hover { opacity: 0.88; transform: translateY(-1px); }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 0.4rem;
  border: 1px solid #273245;
  border-radius: 0.7rem;
  background: transparent;
  color: #c0ceea;
  font-weight: 700;
  padding: 0.65rem 1.1rem;
  font-size: 0.9rem;
  transition: border-color 0.2s, color 0.2s;
  cursor: pointer;
}
.btn-ghost:hover { border-color: #1dd75e; color: #1dd75e; }
.btn-danger {
  display: inline-flex; align-items: center; gap: 0.4rem;
  border-radius: 0.7rem;
  background: rgba(239,68,68,0.18);
  color: #ff9090;
  font-weight: 700;
  padding: 0.65rem 1.1rem;
  font-size: 0.9rem;
  transition: background 0.2s;
  cursor: pointer;
}
.btn-danger:hover { background: rgba(239,68,68,0.28); }

/* ─── Modal ──────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 4, 14, 0.72);
  backdrop-filter: blur(4px);
  padding: 1rem;
}
.modal-overlay.hidden { display: none; }
.modal-box {
  background: #0d1527;
  border: 1px solid #273245;
  border-radius: 1rem;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 1.5rem;
  box-shadow: 0 24px 60px rgba(0,0,0,0.4);
  animation: fadeInUp 0.22s ease;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.pill.info { background: rgba(59,130,246,0.2); color: #93c5fd; }

.marketing-hero {
  background:
    radial-gradient(circle at 0% 0%, rgba(49, 224, 123, 0.08), transparent 24%),
    linear-gradient(180deg, rgba(12, 22, 39, 0.98), rgba(8, 15, 27, 0.98));
}

.marketing-card {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  border: 1px solid #223047;
  border-radius: 1.15rem;
  background: linear-gradient(180deg, rgba(13, 23, 40, 0.98), rgba(8, 15, 27, 0.98));
  padding: 1.1rem;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.18);
}

.tool-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.65rem;
  height: 2.65rem;
  border-radius: 0.95rem;
  background: #111a2a;
  border: 1px solid #223047;
  font-size: 1.1rem;
}

.tool-icon.blue { color: #4c8dff; }
.tool-icon.green { color: #31e07b; }
.tool-icon.orange { color: #f7b654; }

.status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.3rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.status-pill.success {
  background: rgba(49, 224, 123, 0.12);
  color: #6ef09d;
}

.status-pill.pending {
  background: rgba(247, 182, 84, 0.12);
  color: #f7c86f;
}

.tool-meter {
  display: grid;
  gap: 0.4rem;
  border-radius: 0.95rem;
  background: #0d1728;
  border: 1px solid #223047;
  padding: 0.85rem;
}

.tool-meter span,
.field span {
  color: #8a98b2;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tool-meter strong {
  font-size: 1.2rem;
}

.meter-bar {
  height: 0.45rem;
  border-radius: 999px;
  background: #111b30;
  overflow: hidden;
}

.meter-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #31e07b, #56f08f);
}

.tool-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.tool-preview {
  width: min(100%, 17rem);
  border-radius: 1rem;
  background: #0b1424;
  border: 1px solid #223047;
  padding: 0.9rem;
}

.field {
  display: grid;
  gap: 0.45rem;
}

.field input {
  width: 100%;
  border-radius: 0.85rem;
  border: 1px solid #223047;
  background: #0b1424;
  color: #e7f0ff;
  padding: 0.85rem 0.95rem;
  outline: none;
}

.field input:focus {
  border-color: #31e07b;
  box-shadow: 0 0 0 3px rgba(49, 224, 123, 0.12);
}

.reach-badge,
.reach-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 999px;
  border: 1px solid #223047;
  background: #0d1728;
}

.reach-badge.blue { color: #4c8dff; }
.reach-badge.green { color: #31e07b; }

.reach-more {
  color: #d6e2fb;
  font-size: 0.75rem;
  font-weight: 800;
}

.mini-platform {
  border-radius: 1rem;
  border: 1px solid #223047;
  background: linear-gradient(180deg, rgba(13, 23, 40, 0.98), rgba(8, 15, 27, 0.98));
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mini-top,
.mini-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.platform-dot {
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 999px;
  background: #5df089;
  box-shadow: 0 0 0 5px rgba(93, 240, 137, 0.12);
}

.platform-dot.yellow { background: #f7c86f; box-shadow: 0 0 0 5px rgba(247, 200, 111, 0.12); }
.platform-dot.red { background: #ff7f7f; box-shadow: 0 0 0 5px rgba(255, 127, 127, 0.12); }
.platform-dot.amber { background: #f0ca60; box-shadow: 0 0 0 5px rgba(240, 202, 96, 0.12); }

.mini-state {
  border-radius: 999px;
  padding: 0.28rem 0.55rem;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
}

.mini-state.success { color: #6ef09d; background: rgba(49, 224, 123, 0.12); }
.mini-state.muted { color: #95a4c0; background: rgba(149, 164, 192, 0.08); }

.mini-platform h3,
.marketing-card h3 {
  margin: 0;
  font-size: 1.18rem;
  font-weight: 800;
}

.mini-platform p,
.marketing-card p {
  margin: 0;
  color: #8f9cb5;
  font-size: 0.9rem;
}

.mini-meter {
  height: 0.3rem;
  border-radius: 999px;
  background: #111b30;
  overflow: hidden;
}

.mini-meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #31e07b, #56f08f);
}

.mini-link {
  margin-top: auto;
  color: #31e07b;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.infra-bar {
  background:
    radial-gradient(circle at 0% 0%, rgba(49, 224, 123, 0.08), transparent 24%),
    linear-gradient(180deg, rgba(13, 23, 40, 0.98), rgba(8, 15, 27, 0.98));
}

.infra-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  background: rgba(49, 224, 123, 0.12);
  color: #6ef09d;
  font-size: 1.25rem;
}

.orders-hero {
  background:
    radial-gradient(circle at 0% 0%, rgba(49, 224, 123, 0.08), transparent 24%),
    linear-gradient(180deg, rgba(12, 22, 39, 0.98), rgba(8, 15, 27, 0.98));
}

.order-stat {
  border-radius: 1.05rem;
  border: 1px solid #223047;
  background: #0d1728;
  padding: 1rem;
  display: grid;
  gap: 0.5rem;
}

.order-stat p {
  margin: 0;
  color: #7f8dac;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
}

.order-stat strong {
  font-size: 1.8rem;
  line-height: 1;
}

.orders-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid #223047;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 999px;
  border: 1px solid #223047;
  background: #0d1728;
  color: #9cafc9;
  font-size: 0.86rem;
  font-weight: 700;
  padding: 0.7rem 1rem;
}

.filter-chip span {
  color: #e7f0ff;
}

@media (max-width: 767px) {
  .orders-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ─── Responsive breakpoints ────────────────────────────────── */
@media (max-width: 767px) {
  .app-sidebar { transform: translateX(100%); }
  .app-sidebar.open { transform: translateX(0); }
  .app-main { margin-right: 0; }
  .topbar { padding: 0.75rem; }
}

html[dir="ltr"] .app-sidebar {
  left: 0;
  right: auto;
  border-left: 0;
  border-right: 1px solid #273245;
}

html[dir="ltr"] .app-main {
  margin-left: 18rem;
  margin-right: 0;
}

html[dir="ltr"] .topbar,
html[dir="ltr"] .dashboard-shell,
html[dir="ltr"] .dashboard-page .panel-head,
html[dir="ltr"] .dashboard-page .activity-item,
html[dir="ltr"] .dashboard-page .panel-sub,
html[dir="ltr"] .dashboard-page .summary-copy {
  direction: ltr;
}

html[dir="ltr"] .sidebar-overlay {
  left: 0;
}

html[dir="ltr"] #backToTop {
  left: auto;
  right: 1.25rem;
}

html[dir="rtl"] #scrollProgress {
  left: auto;
  right: 0;
}

html[dir="rtl"] #backToTop {
  left: 1.25rem;
  right: auto;
}

html[dir="ltr"] .dashboard-page .topbar {
  padding-inline: 1.15rem;
}

.dashboard-page .topbar {
  gap: 1rem;
}

.dashboard-topbar {
  padding-block: 1rem;
}

.dashboard-search {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: min(34rem, 100%);
  border: 1px solid #1b2740;
  border-radius: 999px;
  background: rgba(13, 23, 40, 0.94);
  padding: 0.78rem 1rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.dashboard-search svg {
  width: 1.05rem;
  height: 1.05rem;
  color: #8b9bb8;
  flex-shrink: 0;
}

.dashboard-search input {
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: #e7f0ff;
  font: inherit;
  font-size: 0.94rem;
}

.dashboard-search input::placeholder {
  color: #647492;
}

.top-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid #273245;
  border-radius: 999px;
  background: #101a2d;
  padding: 0.55rem 0.9rem;
  color: #dce7fb;
  font-weight: 700;
  font-size: 0.85rem;
}

.dot-live {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: #8c9ab3;
}

.admin-chip {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
  border: 1px solid #273245;
  border-radius: 999px;
  background: rgba(13, 23, 40, 0.85);
  padding: 0.35rem 0.45rem 0.35rem 0.9rem;
}

.dashboard-shell {
  display: grid;
  gap: 1.1rem;
}

.status-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.3rem 1.35rem;
  background:
    radial-gradient(circle at 0% 0%, rgba(49, 224, 123, 0.15), transparent 22%),
    linear-gradient(135deg, rgba(13, 23, 40, 0.98), rgba(10, 16, 28, 0.98));
}

.status-dot-title {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.95rem;
  font-weight: 700;
}

.status-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: #ff8c6c;
  box-shadow: 0 0 0 4px rgba(255, 140, 108, 0.1);
}

.status-cta {
  padding-inline: 1.35rem;
  white-space: nowrap;
}

.metric-card {
  padding: 1.15rem;
  min-height: 10.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    radial-gradient(circle at 10% 0%, rgba(49, 224, 123, 0.09), transparent 22%),
    linear-gradient(180deg, rgba(12, 22, 39, 0.98), rgba(9, 17, 30, 0.98));
}

.metric-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.metric-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.85rem;
  border: 1px solid #24314a;
  background: #111b30;
  color: #a6b7d8;
  font-size: 1rem;
}

.metric-icon.green {
  color: #31e07b;
  box-shadow: inset 0 0 0 1px rgba(49, 224, 123, 0.14);
}

.metric-icon.teal {
  color: #67d2c8;
}

.metric-icon.rose {
  color: #ff9b9b;
}

.metric-icon.lime {
  color: #96e67a;
}

.metric-change {
  font-size: 0.83rem;
  font-weight: 700;
}

.metric-change.up {
  color: #71f19d;
}

.metric-change.down {
  color: #ff8d8d;
}

.metric-label {
  margin: 0.3rem 0 0;
  color: #7f8eab;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.metric-value {
  margin: 0;
  color: #eef6ff;
  font-size: 1.95rem;
  line-height: 1;
  font-weight: 900;
}

.chart-panel,
.side-panel,
.crm-card,
.activity-card,
.summary-panel {
  padding: 1.15rem;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.panel-head.compact {
  margin-bottom: 0.8rem;
}

.panel-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.panel-sub {
  margin: 0.18rem 0 0;
  color: #7e8ca8;
  font-size: 0.84rem;
}

.segmented-control {
  display: inline-flex;
  gap: 0.25rem;
  padding: 0.2rem;
  border: 1px solid #273245;
  border-radius: 999px;
  background: #111a2a;
}

.seg-btn {
  border-radius: 999px;
  padding: 0.42rem 0.8rem;
  color: #7d8ca8;
  font-size: 0.8rem;
  font-weight: 700;
}

.seg-btn.active {
  background: rgba(49, 224, 123, 0.14);
  color: #31e07b;
}

.chart-area {
  display: grid;
  gap: 0.95rem;
}

.bars-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: stretch;
  gap: 0.55rem;
  min-height: 18rem;
  padding: 1.1rem 0.1rem 0.2rem;
}

.bar {
  position: relative;
  height: 100%;
  border-radius: 0.85rem 0.85rem 0.3rem 0.3rem;
  background: linear-gradient(180deg, rgba(13, 23, 40, 0.95), rgba(15, 24, 41, 0.85));
  box-shadow: inset 0 -1px 0 rgba(255,255,255,0.02);
}

.bar::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: var(--bar-height, 50%);
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(49, 224, 123, 0.92), rgba(49, 224, 123, 0.42));
  box-shadow: 0 0 26px rgba(49, 224, 123, 0.18);
}

.bar.emphasis::after {
  background: linear-gradient(180deg, rgba(49, 224, 123, 1), rgba(49, 224, 123, 0.62));
}

.chart-axis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  color: #75839d;
  font-size: 0.75rem;
}

.funnel-list {
  display: grid;
  gap: 0.82rem;
}

.funnel-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  border-radius: 0.95rem;
  padding: 0.8rem 0.9rem;
  background: #111a2a;
  overflow: hidden;
}

.funnel-row::before {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 0.24rem;
  background: linear-gradient(90deg, rgba(49, 224, 123, 0.18), rgba(49, 224, 123, 0.88));
  width: var(--fill, 100%);
  border-radius: inherit;
}

.funnel-row span {
  color: #bac7df;
  font-size: 0.85rem;
  font-weight: 700;
}

.funnel-row strong {
  color: #eff6ff;
  font-size: 0.88rem;
}

.mini-badge {
  border-radius: 999px;
  background: rgba(49, 224, 123, 0.14);
  color: #6ef09d;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.32rem 0.55rem;
  text-transform: uppercase;
}

.crm-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.crm-tile {
  min-height: 6.1rem;
  border-radius: 1rem;
  border: 1px solid #25334c;
  background: #0d1728;
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.crm-tile span {
  color: #8090ab;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.crm-tile strong {
  font-size: 1.8rem;
  line-height: 1;
}

.activity-list {
  display: grid;
  gap: 0.85rem;
}

.activity-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.8rem;
  align-items: center;
  border-radius: 1rem;
  padding: 0.85rem 0.9rem;
  background: #0d1728;
  border: 1px solid #223047;
}

.activity-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 0.9rem;
  font-size: 1rem;
}

.activity-icon.green {
  background: rgba(49, 224, 123, 0.15);
  color: #79f19c;
}

.activity-icon.teal {
  background: rgba(103, 210, 200, 0.16);
  color: #8fe3dc;
}

.activity-icon.rose {
  background: rgba(255, 127, 127, 0.14);
  color: #ffb2b2;
}

.activity-title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 800;
}

.activity-sub {
  margin: 0.2rem 0 0;
  color: #7f8dac;
  font-size: 0.8rem;
}

.activity-time {
  color: #76839d;
  font-size: 0.74rem;
  white-space: nowrap;
}

.view-all-btn {
  margin-top: 0.95rem;
  width: 100%;
  border-radius: 999px;
  background: #111a2a;
  color: #dce6fa;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 0.7rem 1rem;
  text-align: center;
}

.summary-panel {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 100% 0%, rgba(49, 224, 123, 0.12), transparent 22%),
    linear-gradient(180deg, rgba(12, 22, 39, 0.98), rgba(8, 15, 27, 0.98));
}

.eyebrow {
  margin: 0 0 0.35rem;
  color: #4cef87;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.summary-copy {
  max-width: 22rem;
  margin: 0;
  color: #9aa9c5;
  font-size: 0.92rem;
  line-height: 1.7;
}

.summary-visual {
  display: flex;
  justify-content: flex-end;
  margin-top: 1rem;
}

.mock-laptop {
  width: min(100%, 18rem);
  border-radius: 1.2rem;
  padding: 0.7rem;
  background: linear-gradient(180deg, rgba(16, 25, 42, 0.98), rgba(7, 12, 22, 0.98));
  border: 1px solid #223047;
  box-shadow: 0 24px 42px rgba(0, 0, 0, 0.28);
}

.mock-screen {
  height: 11rem;
  border-radius: 0.9rem;
  background:
    linear-gradient(180deg, rgba(18, 31, 57, 0.98), rgba(6, 14, 25, 0.98));
  position: relative;
  overflow: hidden;
}

.mock-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(transparent 0 78%, rgba(49, 224, 123, 0.26) 78% 80%, transparent 80% 100%),
    linear-gradient(90deg, transparent 0 11%, rgba(49, 224, 123, 0.18) 11% 13%, transparent 13% 24%, rgba(49, 224, 123, 0.22) 24% 26%, transparent 26% 40%, rgba(49, 224, 123, 0.25) 40% 42%, transparent 42% 100%);
  opacity: 0.95;
}

.mock-screen span {
  position: absolute;
  bottom: 0;
  width: 1rem;
  border-radius: 0.6rem 0.6rem 0 0;
  background: linear-gradient(180deg, #56f08f, rgba(49, 224, 123, 0.15));
  box-shadow: 0 0 20px rgba(49, 224, 123, 0.18);
}

.mock-screen span:nth-child(1) { left: 12%; height: 28%; }
.mock-screen span:nth-child(2) { left: 28%; height: 42%; }
.mock-screen span:nth-child(3) { left: 44%; height: 24%; }
.mock-screen span:nth-child(4) { left: 60%; height: 55%; }
.mock-screen span:nth-child(5) { left: 76%; height: 72%; }

.summary-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  margin-top: 1rem;
}

.summary-chip {
  border: 1px solid #223047;
  border-radius: 1rem;
  background: #0d1728;
  padding: 0.85rem;
}

.summary-chip span {
  display: block;
  color: #72809c;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.summary-chip strong {
  display: block;
  margin-top: 0.35rem;
  font-size: 1.1rem;
}

.summary-chip small {
  color: #7f8dac;
  font-size: 0.75rem;
}

.inventory-hero {
  background:
    radial-gradient(circle at 0% 0%, rgba(49, 224, 123, 0.14), transparent 24%),
    linear-gradient(135deg, rgba(13, 23, 40, 0.98), rgba(8, 15, 27, 0.98));
}

.inventory-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  justify-content: space-between;
}

.inventory-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.inventory-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid #273245;
  border-radius: 999px;
  background: #0b1424;
  color: #cbd8f1;
  font-size: 0.84rem;
  font-weight: 700;
  padding: 0.55rem 0.9rem;
}

.inventory-chip.active {
  border-color: rgba(29, 215, 94, 0.55);
  background: rgba(29, 215, 94, 0.1);
  color: #73f1a0;
}

.inventory-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(205px, 1fr));
}

.inventory-card {
  overflow: hidden;
  border: 1px solid #273245;
  border-radius: 1.1rem;
  background: linear-gradient(180deg, rgba(13, 23, 40, 0.98), rgba(8, 15, 27, 0.98));
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.inventory-card:hover {
  transform: translateY(-3px);
  border-color: rgba(29, 215, 94, 0.5);
}

.inventory-art {
  position: relative;
  height: 11rem;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 20%, color-mix(in srgb, var(--art-a) 84%, transparent), transparent 30%),
    linear-gradient(135deg, var(--art-a), var(--art-b));
}

.inventory-art::before,
.inventory-art::after {
  content: '';
  position: absolute;
  inset: auto;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  filter: blur(1px);
}

.inventory-art::before {
  width: 4.8rem;
  height: 4.8rem;
  right: -0.6rem;
  bottom: -0.4rem;
}

.inventory-art::after {
  width: 2.8rem;
  height: 2.8rem;
  left: 0.9rem;
  top: 0.9rem;
}

.inventory-art .label {
  position: absolute;
  top: 0.9rem;
  left: 0.9rem;
}

.inventory-art .glyph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 3rem;
  font-weight: 900;
  letter-spacing: -0.08em;
  color: rgba(255, 255, 255, 0.82);
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.inventory-body {
  padding: 0.95rem 1rem 1rem;
}

.inventory-name {
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.25;
}

.inventory-price {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
  margin-top: 0.4rem;
}

.inventory-price strong {
  color: #7cf4a3;
}

.inventory-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-top: 0.8rem;
  font-size: 0.8rem;
  color: #8d9bb8;
}

.settings-tabs {
  display: flex;
  gap: 0.55rem;
  overflow-x: auto;
  padding-bottom: 0.2rem;
  scrollbar-width: none;
}

.settings-tabs::-webkit-scrollbar {
  display: none;
}

.settings-tab {
  flex-shrink: 0;
  border: 1px solid #273245;
  border-radius: 999px;
  background: #0b1424;
  color: #c7d4ee;
  font-size: 0.86rem;
  font-weight: 700;
  padding: 0.7rem 1rem;
}

.settings-tab.active {
  border-color: rgba(29, 215, 94, 0.5);
  background: rgba(29, 215, 94, 0.1);
  color: #73f1a0;
}

.settings-hero {
  background:
    radial-gradient(circle at 100% 0%, rgba(49, 224, 123, 0.12), transparent 24%),
    linear-gradient(135deg, rgba(13, 23, 40, 0.98), rgba(8, 15, 27, 0.98));
}

.profile-portrait {
  position: relative;
  overflow: hidden;
  border-radius: 1.1rem;
  border: 1px solid #273245;
  background:
    radial-gradient(circle at 30% 30%, rgba(125, 211, 252, 0.14), transparent 30%),
    linear-gradient(180deg, rgba(16, 25, 43, 0.96), rgba(9, 16, 29, 0.98));
}

.profile-portrait::after {
  content: '';
  position: absolute;
  inset: auto 1rem 1rem auto;
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 999px;
  background: rgba(29, 215, 94, 0.22);
  filter: blur(10px);
}

.settings-card {
  border: 1px solid #273245;
  border-radius: 1rem;
  background: linear-gradient(180deg, rgba(13, 23, 40, 0.98), rgba(8, 15, 27, 0.98));
}

.settings-card.compact {
  padding: 1rem;
}

.wallet-hero {
  background:
    radial-gradient(circle at 0% 0%, rgba(49, 224, 123, 0.14), transparent 24%),
    linear-gradient(135deg, rgba(13, 23, 40, 0.98), rgba(8, 15, 27, 0.98));
}

.wallet-card {
  border: 1px solid #273245;
  border-radius: 1.15rem;
  background: linear-gradient(180deg, rgba(13, 23, 40, 0.98), rgba(8, 15, 27, 0.98));
}

.wallet-chip {
  border-radius: 999px;
  border: 1px solid #273245;
  background: #0b1424;
  padding: 0.55rem 0.9rem;
  color: #dfe9fb;
  font-weight: 700;
  font-size: 0.86rem;
}

.wallet-card-art {
  position: relative;
  min-height: 15rem;
  overflow: hidden;
  border-radius: 1rem;
  border: 1px solid #273245;
  background:
    radial-gradient(circle at 30% 20%, rgba(29, 215, 94, 0.24), transparent 28%),
    radial-gradient(circle at 100% 0%, rgba(71, 145, 255, 0.18), transparent 26%),
    linear-gradient(135deg, #0b1323, #121e33);
}

.wallet-card-art::before {
  content: '';
  position: absolute;
  inset: auto auto 14% 10%;
  width: 72%;
  height: 58%;
  border-radius: 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  transform: rotate(-2deg);
}

.wallet-card-art::after {
  content: '';
  position: absolute;
  inset: 11% 12% auto auto;
  width: 8rem;
  height: 8rem;
  border-radius: 999px;
  background: rgba(29, 215, 94, 0.14);
  filter: blur(16px);
}

.wallet-amount {
  font-size: clamp(2.3rem, 5vw, 3.6rem);
  font-weight: 900;
  letter-spacing: -0.04em;
}

@media (max-width: 1279px) {
  .status-banner {
    flex-direction: column;
    align-items: flex-start;
  }

  .status-cta {
    width: 100%;
    justify-content: center;
  }

  .dashboard-search {
    width: min(28rem, 100%);
  }
}

@media (max-width: 1023px) {
  html[dir="ltr"] .app-main {
    margin-left: 0;
  }
}

@media (max-width: 767px) {
  .dashboard-search {
    display: none;
  }

  .dashboard-topbar {
    padding-inline: 0.75rem;
  }

  .activity-item {
    grid-template-columns: auto 1fr;
  }

  .activity-time {
    grid-column: 2;
    justify-self: start;
  }

  .crm-grid,
  .summary-metrics {
    grid-template-columns: 1fr;
  }

  html[dir="ltr"] .app-sidebar {
    transform: translateX(-100%);
  }

  html[dir="ltr"] .app-sidebar.open {
    transform: translateX(0);
  }
}

html.light-mode body {
  color: #10243c;
  background:
    radial-gradient(900px 460px at 92% -12%, rgba(29, 215, 94, 0.14), transparent 62%),
    radial-gradient(760px 420px at -4% 8%, rgba(20, 184, 166, 0.14), transparent 58%),
    #eef3f9;
}

html.light-mode .app-main {
  background: #eef3f9;
}

html.light-mode .app-sidebar {
  background: rgba(255, 255, 255, 0.94);
  border-left-color: #d7e2ed;
  box-shadow: 0 22px 42px rgba(20, 40, 66, 0.1);
}

html.light-mode .topbar,
html.light-mode .dashboard-topbar {
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid #d7e2ed;
  box-shadow: 0 12px 30px rgba(20, 40, 66, 0.08);
}

html.light-mode .side-title {
  color: #60728f;
}

html.light-mode .side-link {
  color: #324863;
}

html.light-mode .side-link:hover,
html.light-mode .side-link.active {
  background: rgba(29, 215, 94, 0.12);
  color: #1e8a4e;
}

html.light-mode .dash-card,
html.light-mode .summary-card,
html.light-mode .inventory-card,
html.light-mode .settings-card,
html.light-mode .wallet-card,
html.light-mode .activity-item,
html.light-mode .modal-box {
  background: linear-gradient(180deg, #ffffff 0%, #f6f9fe 100%);
  border-color: #d7e2ed;
  box-shadow: 0 16px 30px rgba(20, 40, 66, 0.08);
}

html.light-mode .data-table th {
  color: #5f728e;
}

html.light-mode .data-table td {
  color: #1a2f4a;
}

html.light-mode .form-input,
html.light-mode .form-select,
html.light-mode .form-textarea,
html.light-mode .dashboard-search input {
  background: #ffffff;
  color: #10243c;
  border-color: #d7e2ed;
}

html.light-mode .form-input::placeholder,
html.light-mode .form-textarea::placeholder,
html.light-mode .dashboard-search input::placeholder {
  color: #7e90aa;
}

html.light-mode .text-app-text {
  color: #10243c !important;
}

html.light-mode .text-app-muted {
  color: #5f728e !important;
}

html.light-mode .bg-app-card {
  background-color: #ffffff !important;
}

html.light-mode .border-app-line {
  border-color: #d7e2ed !important;
}

html.light-mode .breadcrumb {
  color: #6f819c;
}

html.light-mode .breadcrumb a {
  color: #1e8a4e;
}

html.light-mode .page-header h1,
html.light-mode .kpi-card h4,
html.light-mode .summary-card .s-value,
html.light-mode .task-card,
html.light-mode .promo-card h3,
html.light-mode .side-link-label,
html.light-mode .tab-btn,
html.light-mode .filter-btn,
html.light-mode .search-input,
html.light-mode .select-dark,
html.light-mode th,
html.light-mode td,
html.light-mode label,
html.light-mode p {
  color: #10243c;
}

html.light-mode .promo-card p,
html.light-mode .kpi-card p,
html.light-mode .summary-card .s-label,
html.light-mode .summary-card .s-delta,
html.light-mode .breadcrumb,
html.light-mode .sf-page-subtitle {
  color: #5f728e;
}

html.light-mode .kpi-card,
html.light-mode .task-card,
html.light-mode .alert-item,
html.light-mode .promo-card,
html.light-mode .store-selector,
html.light-mode .filter-bar,
html.light-mode .status-banner,
html.light-mode .dashboard-search,
html.light-mode .search-input,
html.light-mode .select-dark {
  background: #ffffff;
  border-color: #d7e2ed;
}

html.light-mode .pill.success {
  background: rgba(29, 215, 94, 0.16);
  color: #157f42;
}

html.light-mode .pill.pending {
  background: rgba(59, 130, 246, 0.14);
  color: #1f5ca8;
}

html.light-mode .pill.danger {
  background: rgba(239, 68, 68, 0.14);
  color: #ad2f2f;
}

html.light-mode tbody tr:hover,
html.light-mode .data-table tbody tr:hover {
  background: rgba(20, 184, 166, 0.08);
}

html.light-mode .theme-btn,
html.light-mode .ghost-btn,
html.light-mode .store-btn,
html.light-mode .icon-btn,
html.light-mode .slide-btn,
html.light-mode .btn-ghost,
html.light-mode .filter-btn,
html.light-mode .tab-btn {
  background: #ffffff;
  color: #1f3756;
  border-color: #d7e2ed;
}

html.light-mode .theme-btn:hover,
html.light-mode .ghost-btn:hover,
html.light-mode .store-btn:hover,
html.light-mode .icon-btn:hover,
html.light-mode .slide-btn:hover,
html.light-mode .btn-ghost:hover,
html.light-mode .filter-btn:hover,
html.light-mode .tab-btn:hover {
  color: #1e8a4e;
  border-color: rgba(29, 215, 94, 0.48);
  box-shadow: 0 10px 22px rgba(29, 215, 94, 0.12);
}

@keyframes uiRiseIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.992);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes uiSoftPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(29, 215, 94, 0);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(29, 215, 94, 0.08);
  }
}

.page-header,
.dash-card,
.kpi-card,
.summary-card,
.settings-card,
.wallet-card,
.inventory-card {
  animation: uiRiseIn 0.44s ease both;
}

.side-link,
.theme-btn,
.ghost-btn,
.store-btn,
.icon-btn,
.slide-btn,
.btn-primary,
.btn-ghost,
.btn-danger,
.filter-btn,
.tab-btn,
.task-card,
.kpi-card,
.dash-card {
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, background-color 0.22s ease, color 0.22s ease;
}

.side-link:hover {
  transform: translateX(-4px);
}

html[dir="ltr"] .side-link:hover {
  transform: translateX(4px);
}

.task-card:hover,
.kpi-card:hover,
.dash-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px rgba(8, 17, 33, 0.22);
}

.btn-primary:hover,
.theme-btn:hover,
.store-btn:hover {
  transform: translateY(-2px);
}

.btn-primary:focus-visible,
.theme-btn:focus-visible,
.store-btn:focus-visible,
.icon-btn:focus-visible,
.filter-btn:focus-visible,
.tab-btn:focus-visible {
  animation: uiSoftPulse 0.85s ease;
}

@media (prefers-reduced-motion: reduce) {
  .page-header,
  .dash-card,
  .kpi-card,
  .summary-card,
  .settings-card,
  .wallet-card,
  .inventory-card {
    animation: none;
  }

  .side-link,
  .theme-btn,
  .ghost-btn,
  .store-btn,
  .icon-btn,
  .slide-btn,
  .btn-primary,
  .btn-ghost,
  .btn-danger,
  .filter-btn,
  .tab-btn,
  .task-card,
  .kpi-card,
  .dash-card {
    transition: none;
  }
}

html.light-mode .marketing-hero,
html.light-mode .marketing-card,
html.light-mode .mini-platform,
html.light-mode .infra-bar,
html.light-mode .status-banner,
html.light-mode .metric-card,
html.light-mode .summary-panel,
html.light-mode .summary-chip,
html.light-mode .crm-tile,
html.light-mode .activity-item,
html.light-mode .tool-preview,
html.light-mode .field input,
html.light-mode .field textarea,
html.light-mode .field select {
  background: linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
  border-color: #d7e2ed;
}

html.light-mode .marketing-card h3,
html.light-mode .mini-platform h3,
html.light-mode .field span,
html.light-mode .tool-meter span,
html.light-mode .tool-meter strong,
html.light-mode .mini-foot,
html.light-mode .mini-link,
html.light-mode .infra-bar h3,
html.light-mode .infra-bar strong,
html.light-mode .summary-chip strong,
html.light-mode .crm-tile strong,
html.light-mode .activity-title {
  color: #10243c;
}

html.light-mode .marketing-card p,
html.light-mode .mini-platform p,
html.light-mode .infra-bar p,
html.light-mode .summary-copy,
html.light-mode .summary-chip span,
html.light-mode .summary-chip small,
html.light-mode .crm-tile span,
html.light-mode .activity-sub,
html.light-mode .activity-time,
html.light-mode .reach-more,
html.light-mode .tool-preview p,
html.light-mode .text-app-muted {
  color: #5f728e !important;
}

html.light-mode .tool-icon {
  background: #f2f7ff;
  border-color: #d3dfec;
}

html.light-mode .meter-bar,
html.light-mode .mini-meter {
  background: #dde8f4;
}

html.light-mode .reach-badge,
html.light-mode .platform-dot,
html.light-mode .platform-dot.yellow,
html.light-mode .platform-dot.red,
html.light-mode .platform-dot.amber {
  box-shadow: 0 0 0 4px rgba(20, 40, 66, 0.08);
}

html.light-mode .mini-state.success {
  color: #157f42;
  background: rgba(29, 215, 94, 0.14);
}

html.light-mode .mini-state.muted {
  color: #4a607b;
  background: rgba(74, 96, 123, 0.12);
}

.marketing-card,
.mini-platform,
.metric-card,
.crm-card,
.activity-card,
.settings-card,
.wallet-card,
.inventory-card,
.summary-card,
.product-card,
.dash-card,
.alert-item,
.tool-preview,
.summary-chip,
.crm-tile,
.activity-item {
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease, filter 0.24s ease;
}

.marketing-card:hover,
.mini-platform:hover,
.metric-card:hover,
.crm-card:hover,
.activity-card:hover,
.settings-card:hover,
.wallet-card:hover,
.summary-card:hover,
.product-card:hover,
.dash-card:hover,
.tool-preview:hover,
.summary-chip:hover,
.crm-tile:hover,
.activity-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 28px rgba(8, 17, 33, 0.2);
}

.mini-link,
.view-all-btn,
.sf-view-all,
.store-selector,
.settings-tab,
.inventory-chip,
.tab-btn,
.filter-btn,
.btn-primary,
.btn-ghost,
.btn-danger,
.theme-btn,
.ghost-btn,
.store-btn,
.icon-btn,
.slide-btn {
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, color 0.22s ease, background-color 0.22s ease;
}

.mini-link:hover,
.view-all-btn:hover,
.sf-view-all:hover,
.store-selector:hover,
.settings-tab:hover,
.inventory-chip:hover,
.tab-btn:hover,
.filter-btn:hover,
.btn-primary:hover,
.btn-ghost:hover,
.btn-danger:hover,
.theme-btn:hover,
.ghost-btn:hover,
.store-btn:hover,
.icon-btn:hover,
.slide-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(7, 15, 30, 0.18);
}

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

.marketing-card,
.mini-platform,
.summary-card,
.metric-card,
.crm-tile,
.activity-item,
.inventory-card,
.settings-card,
.wallet-card {
  animation: cardReveal 0.48s ease both;
}

.marketing-card:nth-child(2),
.mini-platform:nth-child(2),
.inventory-card:nth-child(2) {
  animation-delay: 0.05s;
}

.marketing-card:nth-child(3),
.mini-platform:nth-child(3),
.inventory-card:nth-child(3) {
  animation-delay: 0.1s;
}

.marketing-card:nth-child(4),
.mini-platform:nth-child(4),
.inventory-card:nth-child(4) {
  animation-delay: 0.15s;
}

/* Global hover layer for all app pages */
@media (hover: hover) and (pointer: fine) {
  a,
  button,
  [role="button"],
  .side-link,
  .btn-primary,
  .btn-ghost,
  .btn-danger,
  .theme-btn,
  .ghost-btn,
  .store-btn,
  .icon-btn,
  .slide-btn,
  .filter-btn,
  .tab-btn,
  .inventory-chip,
  .settings-tab,
  .mini-link,
  .view-all-btn,
  .sf-view-all,
  .order-row,
  .data-table tbody tr,
  .dash-card,
  .summary-card,
  .metric-card,
  .inventory-card,
  .settings-card,
  .wallet-card,
  .marketing-card,
  .mini-platform,
  .activity-item,
  .crm-tile,
  .summary-chip,
  .alert-item,
  .tool-preview,
  .product-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease, filter 0.2s ease;
  }

  a:hover,
  button:hover,
  [role="button"]:hover,
  .side-link:hover,
  .btn-primary:hover,
  .btn-ghost:hover,
  .btn-danger:hover,
  .theme-btn:hover,
  .ghost-btn:hover,
  .store-btn:hover,
  .icon-btn:hover,
  .slide-btn:hover,
  .filter-btn:hover,
  .tab-btn:hover,
  .inventory-chip:hover,
  .settings-tab:hover,
  .mini-link:hover,
  .view-all-btn:hover,
  .sf-view-all:hover {
    transform: translateY(-2px);
  }

  .data-table tbody tr:hover,
  .order-row:hover,
  .dash-card:hover,
  .summary-card:hover,
  .metric-card:hover,
  .inventory-card:hover,
  .settings-card:hover,
  .wallet-card:hover,
  .marketing-card:hover,
  .mini-platform:hover,
  .activity-item:hover,
  .crm-tile:hover,
  .summary-chip:hover,
  .alert-item:hover,
  .tool-preview:hover,
  .product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 30px rgba(8, 17, 33, 0.18);
  }
}
