/* SaaS extras for admin + super + landing */

.mp-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}
.mp-tabs button {
  flex: 1;
  border: 1px solid var(--divider, #e5ded4);
  background: var(--surface, #fff);
  border-radius: 10px;
  padding: 8px;
  font: inherit;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  color: var(--text-sub, #8a8278);
}
.mp-tabs button.on {
  background: var(--primary, #1B5E3A);
  color: #fff;
  border-color: transparent;
}
.plan-warn {
  background: #fff3e0 !important;
  color: #bf360c !important;
  font-weight: 700;
}
.lang-mini {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.lang-mini button {
  border: 1px solid rgba(255,255,255,.25);
  background: transparent;
  color: inherit;
  border-radius: 8px;
  padding: 4px 8px;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}
.lang-mini button.on { background: rgba(201,168,76,.2); border-color: #C9A84C; }
.admin-topbar .lang-mini button {
  color: #fff;
  border-color: rgba(255,255,255,.4);
}
.admin-topbar .lang-mini button.on {
  background: rgba(255,255,255,.22);
  border-color: #fff;
}
.login-card .lang-mini {
  justify-content: center;
  margin-bottom: 16px;
}
.login-card .lang-mini button {
  color: var(--text, #2c2c2c);
  border-color: var(--divider, #e5ded4);
}
.login-card .lang-mini button.on {
  background: var(--primary, #1B5E3A);
  color: #fff;
  border-color: transparent;
}
.super-body .login-card .lang-mini button.on {
  background: #C9A84C;
  color: #0F1C1C;
}
html[dir="ltr"] .admin-back-btn i.fa-arrow-right,
html[dir="ltr"] .login-page a .fa-arrow-right {
  transform: scaleX(-1);
}

.super-body {
  --bg: #0F1C1C;
  --surface: #162424;
  --primary: #C9A84C;
  --text: #F3EEE2;
  --text-sub: #9AA8A8;
  --divider: #243333;
  background: #0F1C1C;
  min-height: 100dvh;
  font-family: Cairo, sans-serif;
  color: #F3EEE2;
}
.super-body .admin-topbar {
  background: #132020;
  border-bottom: 1px solid #243333;
}
.super-body .admin-card, .super-body .dash-card, .super-body .admin-list-item {
  background: #162424;
  border: 1px solid #243333;
}
.super-body .form-modal {
  background: #162424;
  color: #F3EEE2;
}
.super-body .form-input,
.super-body .form-row input,
.super-body .form-row textarea,
.super-body .form-row select,
.super-body input,
.super-body textarea,
.super-body select {
  color-scheme: light;
  background: #ffffff !important;
  color: #1a1a1a !important;
  caret-color: #1a1a1a;
  border-color: #c5c0b5;
}
.super-body .form-input:focus,
.super-body .form-row input:focus,
.super-body .form-row textarea:focus,
.super-body .form-row select:focus,
.super-body input:focus,
.super-body textarea:focus,
.super-body select:focus {
  background: #ffffff !important;
  color: #1a1a1a !important;
  border-color: #C9A84C;
  box-shadow: 0 0 0 3px rgba(201,168,76,0.22);
}
.super-body .form-input::placeholder,
.super-body input::placeholder,
.super-body textarea::placeholder {
  color: #8a8278 !important;
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.stat-card {
  background: #162424;
  border: 1px solid #243333;
  border-radius: 16px;
  padding: 18px;
}
.stat-card b { display: block; font-size: 28px; color: #C9A84C; }
.stat-card span { font-size: 12px; color: #9AA8A8; }
.super-body .admin-content { max-width: 1120px; }
.super-subnav {
  display: flex;
  gap: 8px;
  padding: 10px 16px;
  background: #132020;
  border-bottom: 1px solid #243333;
  position: sticky;
  top: 60px;
  z-index: 90;
}
.super-subnav a {
  color: #9AA8A8;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
}
.super-body .muted { color: #9AA8A8; font-size: 12px; }
.super-body a.btn-cancel { text-decoration: none; display: inline-flex; align-items: center; }
.stat-grid-wide {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}
.stat-card small {
  display: block;
  font-size: 11px;
  color: #6e7c7c;
  margin-top: 4px;
  font-weight: 600;
}
.egress-hint {
  font-size: 12px;
  color: #9AA8A8;
  line-height: 1.6;
  margin: 0 0 16px;
}
.perf-toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.perf-toolbar .form-input { flex: 1; min-width: 180px; }
.perf-wrap { overflow-x: auto; border: 1px solid #243333; border-radius: 16px; }
.perf-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 860px;
}
.perf-table th, .perf-table td {
  padding: 10px 12px;
  text-align: start;
  border-bottom: 1px solid #243333;
  white-space: nowrap;
}
.perf-table th {
  color: #9AA8A8;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  background: #132020;
}
.perf-table tbody tr { cursor: pointer; }
.perf-table tbody tr:hover { background: rgba(201,168,76,.08); }
.perf-table .muted { color: #9AA8A8; font-size: 12px; }
.usage-bar {
  height: 8px;
  background: #243333;
  border-radius: 99px;
  overflow: hidden;
  margin-top: 6px;
}
.usage-bar > i {
  display: block;
  height: 100%;
  background: #C9A84C;
  border-radius: 99px;
}
.usage-bar.warn > i { background: #e6a23c; }
.usage-bar.bad > i { background: #e57373; }
.health-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }
.health-chip {
  font-size: 11px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 999px;
  background: #243333;
  color: #C9A84C;
}
.health-chip.warn { background: #3a2a12; color: #e6a23c; }
.health-chip.bad { background: #3a1818; color: #e57373; }
.health-chip.ok { background: #16301c; color: #81c784; }
.spark {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 88px;
  padding: 8px 0;
}
.spark i {
  flex: 1;
  min-width: 4px;
  background: #C9A84C;
  border-radius: 3px 3px 0 0;
  opacity: .85;
}
.kv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 16px;
  font-size: 13px;
}
.kv-grid b { display: block; color: #9AA8A8; font-size: 11px; font-weight: 700; }
.bucket-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid #243333; font-size: 13px; }
@media (max-width: 640px) {
  .kv-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
}

/* Landing */
.lp {
  min-height: 100dvh;
  background: radial-gradient(1200px 600px at 80% -10%, #1d3a33 0%, #0E0B07 45%);
  color: #F0E8D5;
  font-family: Cairo, sans-serif;
}
.lp-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 8%;
}
.lp-brand { font-weight: 900; font-size: 22px; color: #C9A84C; letter-spacing: .5px; }
.lp-hero { padding: 48px 8% 80px; max-width: 920px; }
.lp-hero h1 { font-size: clamp(28px, 5vw, 48px); line-height: 1.35; margin: 0 0 16px; }
.lp-hero p { color: #8A7D68; font-size: 18px; line-height: 1.8; margin: 0 0 28px; }
.lp-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.lp-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: #C9A84C; color: #0E0B07; font-weight: 800;
  border-radius: 999px; padding: 12px 22px; text-decoration: none;
}
.lp-btn.ghost { background: transparent; color: #F0E8D5; border: 1px solid #3a3428; }
.lp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  padding: 0 8% 80px;
}
.lp-card {
  background: #181410;
  border: 1px solid #2A2418;
  border-radius: 20px;
  padding: 22px;
}
.lp-card h3 { margin: 0 0 8px; color: #C9A84C; }
.lp-card p { margin: 0; color: #8A7D68; line-height: 1.7; }
.gallery-row, #extraImagesGallery {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
html[dir="ltr"] .admin-body, html[dir="ltr"] .super-body { direction: ltr; }

.style-hint { font-size: 13px; color: var(--text-sub); line-height: 1.6; margin: 0 0 14px; }
.theme-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.theme-pick {
  border: 2px solid var(--divider, #e5ded4);
  background: var(--surface, #fff);
  border-radius: 14px;
  padding: 10px;
  font: inherit;
  font-weight: 800;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: start;
}
.theme-pick.on { border-color: var(--primary, #1B5E3A); box-shadow: 0 0 0 3px rgba(27,94,58,.15); }
.theme-pick-swatch {
  height: 52px;
  border-radius: 10px;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 6px;
  padding: 8px;
}
.theme-pick-swatch i {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(255,255,255,.35);
}
.color-row {
  display: grid;
  grid-template-columns: 1fr 44px minmax(90px, 110px);
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}
.color-row label { font-size: 13px; font-weight: 700; color: var(--text); }
.color-row input[type="color"] {
  width: 44px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--divider);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}
.color-row .form-input { text-transform: lowercase; font-family: ui-monospace, monospace; }
.style-preview {
  --bg: #0e0b07;
  --surface: #181410;
  --primary: #c9a84c;
  --accent: #e8d090;
  --text: #f0e8d5;
  --text-sub: #8a7d68;
  background: var(--bg);
  color: var(--text);
  border-radius: 22px;
  padding: 16px;
  max-width: 280px;
  margin: 0 auto;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
}
.tp-top { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.tp-logo { width: 36px; height: 36px; border-radius: 50%; background: var(--primary); flex-shrink: 0; }
.tp-name { font-weight: 800; font-size: 15px; }
.tp-chips { display: flex; gap: 6px; margin-bottom: 12px; }
.tp-chips i { flex: 1; height: 10px; border-radius: 99px; background: var(--surface); }
.tp-chips i:first-child { background: var(--primary); }
.tp-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border-radius: 14px;
  padding: 10px;
  margin-bottom: 12px;
}
.tp-img { width: 42px; height: 42px; border-radius: 10px; background: var(--accent); flex-shrink: 0; }
.tp-lines { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.tp-lines b { height: 8px; width: 80%; border-radius: 4px; background: var(--text); opacity: .85; }
.tp-lines em { height: 6px; width: 50%; border-radius: 4px; background: var(--text-sub); opacity: .7; font-style: normal; }
.tp-price { width: 28px; height: 10px; border-radius: 4px; background: var(--primary); }
.tp-btn { height: 34px; border-radius: 999px; background: var(--primary); }

.mp-qr-card { text-align: center; }
.mp-qr-card img {
  width: 220px;
  height: 220px;
  background: #fff;
  padding: 12px;
  border-radius: 16px;
  margin: 8px auto;
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
}
.mp-qr-url {
  font-size: 12px;
  word-break: break-all;
  color: var(--text-sub, #7a7469);
  direction: ltr;
  text-align: center;
  margin: 8px 0;
  font-family: ui-monospace, Consolas, monospace;
}
.mp-qr-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 12px;
}
.mp-qr-warn {
  background: #fff3e0;
  color: #bf360c;
  font-size: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  margin-top: 12px;
  font-weight: 700;
  line-height: 1.6;
}
.mp-switch {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  font-weight: 700;
  cursor: pointer;
}
.mp-switch input { width: 18px; height: 18px; accent-color: var(--primary, #1B5E3A); }
.mp-hint {
  font-size: 12px;
  color: var(--text-sub, #7a7469);
  line-height: 1.65;
  margin: 0 0 8px;
}
.mp-sale{display:inline-flex;align-items:center;flex-wrap:wrap;gap:6px;line-height:1.2}
.mp-price-old{text-decoration:line-through;opacity:.5;font-weight:600;font-size:.82em}
.mp-price-now{font-weight:800}
.mp-off{
  background:var(--primary,#1B5E3A);color:#fff;font-size:10px;font-weight:800;
  padding:2px 7px;border-radius:999px;white-space:nowrap
}
.admin-item-price .mp-sale{color:inherit}
.disc-controls{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  margin-top:10px;
}
.disc-pct{
  width:88px;
  max-width:30%;
  margin:0;
  padding:8px 10px;
  height:40px;
}
.disc-pct-label{font-weight:800;color:var(--text-sub,#7a7469)}
.disc-apply{height:40px;padding:0 14px}
