/* ==========================================================================
   CodyReviews — Premium Modern Bilingual UI Stylesheet for Zid Stores
   Colors: Comfortable Slate & Soothing Emerald / Teal Palette
   ========================================================================== */

:root {
  --primary: #0d9488;
  --primary-hover: #0f766e;
  --primary-deep: #134e4a;
  --primary-light: #ccfbf1;
  --primary-subtle: #f0fdfa;
  --primary-border: #99f6e4;
  
  --bg-page: #f8fafc;
  --bg-surface: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-muted: #e2e8f0;
  
  --text-main: #0f172a;
  --text-body: #334155;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  
  --line: #e2e8f0;
  --line-light: #f1f5f9;
  
  --amber: #f59e0b;
  --amber-bg: #fffbeb;
  --amber-border: #fde68a;
  --amber-text: #b45309;
  
  --emerald: #10b981;
  --emerald-bg: #ecfdf5;
  --emerald-border: #a7f3d0;
  --emerald-text: #047857;
  
  --rose: #ef4444;
  --rose-bg: #fff1f2;
  --rose-border: #fecdd3;
  --rose-text: #be123c;
  
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.06), 0 2px 4px rgba(15, 23, 42, 0.03);
  --shadow-lg: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.03);
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Cairo", "Noto Sans Arabic", Tahoma, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg-page);
  color: var(--text-body);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

.skip {
  position: fixed;
  top: -100px;
  left: 20px;
  z-index: 9999;
  background: var(--bg-surface);
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
}
.skip:focus {
  top: 15px;
}

[hidden] {
  display: none !important;
}

/* ==========================================================================
   SIDEBAR LAYOUT
   ========================================================================== */

.sidebar {
  width: 260px;
  position: fixed;
  top: 0;
  bottom: 0;
  background: var(--bg-surface);
  border-inline-end: 1px solid var(--line);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  z-index: 40;
  overflow-y: auto;
}

[dir="rtl"] .sidebar {
  right: 0;
  left: auto;
}

[dir="ltr"] .sidebar {
  left: 0;
  right: auto;
}

.brand--wordmark {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.brand--wordmark img {
  display: block;
  width: 140px;
  height: auto;
}

.brand--wordmark small {
  font-size: 11px;
  font-weight: 600;
  color: var(--primary-dark);
  letter-spacing: 0.5px;
}

.workspace {
  margin: 22px 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--primary-deep));
  color: #ffffff;
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
}

.workspace-details {
  min-width: 0;
  flex: 1;
}

.workspace-details strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-indicator-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dot-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.status-indicator-pill small {
  font-size: 11px;
  color: var(--text-muted);
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.side-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-body);
  transition: all 0.15s ease;
}

.side-nav a .navicon {
  font-size: 16px;
}

.side-nav a:hover {
  background: var(--primary-subtle);
  color: var(--primary-dark);
}

.side-nav a.active {
  background: var(--primary-subtle);
  color: var(--primary-dark);
  border-inline-start: 3px solid var(--primary);
  font-weight: 700;
}

.side-promo {
  margin-top: auto;
  padding: 14px;
  background: linear-gradient(135deg, #f0fdf4 0%, #e6fcf5 100%);
  border: 1px solid var(--primary-border);
  border-radius: var(--radius-md);
}

.promo-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.promo-header strong {
  font-size: 12px;
  color: var(--primary-deep);
}

.side-promo p {
  font-size: 11px;
  color: var(--text-body);
  line-height: 1.5;
}

.side-foot {
  margin-top: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--text-light);
}

.partner-badge {
  background: var(--bg-subtle);
  color: var(--text-muted);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-weight: 600;
}

/* ==========================================================================
   APP SHELL & TOPBAR
   ========================================================================== */

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

[dir="rtl"] .app-shell {
  margin-right: 260px;
}

[dir="ltr"] .app-shell {
  margin-left: 260px;
}

.topbar {
  height: 60px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--line);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 30;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.crumb-sep {
  color: var(--text-light);
}

#breadcrumb-current {
  color: var(--text-main);
  font-weight: 700;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Language Switcher */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
}

.lang-btn {
  background: transparent;
  border: 0;
  cursor: pointer;
  color: var(--text-muted);
  font-weight: 600;
  padding: 2px 4px;
  transition: color 0.15s ease;
}

.lang-btn.active {
  color: var(--primary-deep);
  font-weight: 800;
}

.lang-sep {
  color: var(--text-light);
}

.connection-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--emerald-bg);
  border: 1px solid var(--emerald-border);
  color: var(--emerald-text);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: var(--radius-full);
}

.dot-online {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald);
}

/* ==========================================================================
   MAIN CONTENT AREA
   ========================================================================== */

main {
  flex: 1;
  padding: 32px;
  max-width: 1240px;
  width: 100%;
  margin: 0 auto;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}

.tag-pill {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary-dark);
  background: var(--primary-subtle);
  border: 1px solid var(--primary-border);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  display: inline-block;
  margin-bottom: 8px;
}

.page-header h1 {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.3px;
  margin-bottom: 4px;
}

.subtitle {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 650px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
}

.button.primary {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(13, 148, 136, 0.25);
}
.button.primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.button.secondary {
  background: var(--bg-surface);
  border-color: var(--line);
  color: var(--text-main);
  box-shadow: var(--shadow-xs);
}
.button.secondary:hover {
  background: var(--bg-subtle);
  border-color: #cbd5e1;
}

.button.danger {
  background: var(--rose);
  color: #ffffff;
}
.button.danger:hover {
  background: #dc2626;
}

.button.compact {
  padding: 6px 14px;
  font-size: 12px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  font-size: 16px;
}

/* ==========================================================================
   STATS CARDS
   ========================================================================== */

.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.stat-card.clickable {
  cursor: pointer;
  position: relative;
  user-select: none;
}

.stat-card.clickable:hover {
  border-color: var(--primary);
  background: #fcfefe;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.12);
}

.stat-card.clickable:active {
  transform: translateY(0);
}

.stat-icon-wrap {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 20px;
  flex-shrink: 0;
}

.stat-icon-wrap.teal { background: var(--primary-subtle); color: var(--primary-dark); }
.stat-icon-wrap.amber { background: var(--amber-bg); color: var(--amber-text); }
.stat-icon-wrap.emerald { background: var(--emerald-bg); color: var(--emerald-text); }
.stat-icon-wrap.star-gold { background: #fefce8; color: #ca8a04; }
.stat-icon-wrap.rose { background: var(--rose-bg); color: var(--rose-text); }

.stat-meta {
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 2px;
}

.stat-value {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
}

.text-amber { color: #d97706; }
.text-emerald { color: #059669; }
.text-gold { color: #d97706; }
.text-rose { color: #e11d48; }

/* ==========================================================================
   TOOLBAR & FILTER PILLS
   ========================================================================== */

.table-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.filter-pills {
  display: flex;
  gap: 6px;
  background: var(--bg-surface);
  border: 1px solid var(--line);
  padding: 4px;
  border-radius: var(--radius-full);
}

.pill-btn {
  background: transparent;
  border: 0;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.pill-btn:hover {
  color: var(--text-main);
}

.pill-btn.active {
  background: var(--primary);
  color: #ffffff;
  font-weight: 700;
}

.pill-btn.pill-trash {
  color: #64748b;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.pill-btn.pill-trash:hover {
  color: var(--rose);
}

.pill-btn.pill-trash.active {
  background: #475569;
  color: #ffffff;
}

.search-box {
  position: relative;
  min-width: 280px;
}

.search-icon {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  font-size: 16px;
  pointer-events: none;
}

[dir="rtl"] .search-icon { right: 14px; }
[dir="ltr"] .search-icon { left: 14px; }

.search-box input {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
  padding: 9px 16px;
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

[dir="rtl"] .search-box input { padding-right: 38px; }
[dir="ltr"] .search-box input { padding-left: 38px; }

.search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

/* ==========================================================================
   REVIEWS FEED & CARDS
   ========================================================================== */

.reviews-feed {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.review-card {
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: box-shadow 0.15s ease;
}

.review-card:hover {
  box-shadow: var(--shadow-md);
}

.review-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
}

.review-author-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.review-author-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.review-author-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}

.review-author-phone {
  font-size: 12px;
  color: var(--text-muted);
}

.cr-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--emerald-text);
  background: var(--emerald-bg);
  border: 1px solid var(--emerald-border);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.review-product-name {
  font-size: 12px;
  color: var(--text-muted);
}

.review-status-area {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.status-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

.badge-approved { background: var(--emerald-bg); color: var(--emerald-text); border: 1px solid var(--emerald-border); }
.badge-pending { background: var(--amber-bg); color: var(--amber-text); border: 1px solid var(--amber-border); }
.badge-rejected { background: var(--rose-bg); color: var(--rose-text); border: 1px solid var(--rose-border); }
.badge-deleted { background: #f1f5f9; color: #64748b; border: 1px solid #cbd5e1; }

.review-stars-display {
  color: var(--amber);
  font-size: 16px;
  letter-spacing: 2px;
}

.review-comment-body {
  font-size: 14px;
  line-height: 1.6;
  color: #1e293b;
}

.review-photos-grid {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.review-photo-thumb {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.review-photo-thumb:hover {
  transform: scale(1.04);
  border-color: var(--primary);
}

.review-coupon-tag {
  background: var(--emerald-bg);
  border: 1px dashed var(--emerald);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: 12px;
  color: var(--emerald-text);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
}

.review-card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid var(--line-light);
  gap: 12px;
  flex-wrap: wrap;
}

.review-date-text {
  font-size: 12px;
  color: var(--text-light);
}

.review-actions-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-action {
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-action.approve {
  background: var(--emerald-bg);
  color: var(--emerald-text);
  border-color: var(--emerald-border);
}
.btn-action.approve:hover {
  background: #d1fae5;
}

.btn-action.reject {
  background: var(--amber-bg);
  color: var(--amber-text);
  border-color: var(--amber-border);
}
.btn-action.reject:hover {
  background: #fef3c7;
}

.btn-action.delete {
  background: var(--bg-surface);
  color: var(--rose);
  border-color: var(--rose-border);
}
.btn-action.delete:hover {
  background: var(--rose-bg);
}

.btn-action.restore {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}
.btn-action.restore:hover {
  background: #d1fae5;
}

.btn-action.purge {
  background: #fff1f2;
  color: #be123c;
  border-color: #fecdd3;
}
.btn-action.purge:hover {
  background: #ffe4e6;
}

/* Sidebar & Setup WhatsApp Buttons */
.sidebar-whatsapp-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #25d366;
  color: #ffffff !important;
  font-weight: 700;
  font-size: 13px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  margin-top: 14px;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(37, 211, 102, 0.28);
  transition: all 0.15s ease;
}
.sidebar-whatsapp-btn:hover {
  background: #20bd5a;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
}

.btn-whatsapp {
  background: #25d366 !important;
  color: #ffffff !important;
  border-color: #20bd5a !important;
  text-decoration: none;
}
.btn-whatsapp:hover {
  background: #20bd5a !important;
}

/* ==========================================================================
   ANALYTICS & KPI STYLES
   ========================================================================== */

.analytics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 24px;
}

.breakdown-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 18px;
}

.breakdown-row {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
}

.breakdown-stars {
  min-width: 65px;
  font-weight: 700;
  color: var(--amber);
  display: flex;
  align-items: center;
  gap: 4px;
}

.bar-track {
  flex: 1;
  height: 10px;
  background: var(--bg-subtle);
  border-radius: var(--radius-full);
  overflow: hidden;
  border: 1px solid var(--line);
}

.bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 0;
}

.bar-fill.star-5 { background: #059669; }
.bar-fill.star-4 { background: #10b981; }
.bar-fill.star-3 { background: #f59e0b; }
.bar-fill.star-2 { background: #fb923c; }
.bar-fill.star-1 { background: #f43f5e; }

.breakdown-count {
  min-width: 50px;
  text-align: end;
  font-weight: 700;
  color: var(--text-muted);
}

.metrics-kpis {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 18px;
}

.kpi-box {
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px 12px;
  text-align: center;
}

.kpi-num {
  font-size: 24px;
  font-weight: 800;
  color: var(--primary-deep);
  margin-bottom: 4px;
  line-height: 1.1;
}

.kpi-lbl {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

.analytics-tip-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-top: 20px;
}

.analytics-tip-box .tip-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.analytics-tip-box p {
  color: #166534;
  font-size: 13px;
  margin: 0;
  line-height: 1.5;
}

/* ==========================================================================
   CARDS & PANELS (SETTINGS & INSTALLATION)
   ========================================================================== */

.cards-grid {
  display: grid;
  gap: 24px;
}

.clean-card {
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 26px;
  box-shadow: var(--shadow-sm);
}

.card-title-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 20px;
}

.badge-step {
  width: 28px;
  height: 28px;
  background: var(--primary-subtle);
  color: var(--primary-dark);
  border: 1px solid var(--primary-border);
  border-radius: var(--radius-full);
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 800;
  flex-shrink: 0;
}

.clean-card h2 {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 4px;
}

.card-caption {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.switch-container {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  margin: 16px 0;
  user-select: none;
}

.switch-container input {
  display: none;
}

.switch-ui {
  width: 44px;
  height: 24px;
  background: #cbd5e1;
  border-radius: var(--radius-full);
  position: relative;
  transition: background 0.2s ease;
  flex-shrink: 0;
}

.switch-ui::after {
  content: '';
  position: absolute;
  top: 2px;
  width: 20px;
  height: 20px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: transform 0.2s ease;
}

[dir="rtl"] .switch-ui::after {
  right: 2px;
}

[dir="ltr"] .switch-ui::after {
  left: 2px;
}

.switch-container input:checked + .switch-ui {
  background: var(--primary);
}

[dir="rtl"] .switch-container input:checked + .switch-ui::after {
  transform: translateX(-20px);
}

[dir="ltr"] .switch-container input:checked + .switch-ui::after {
  transform: translateX(20px);
}

.switch-text {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.input-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-top: 16px;
}

.field-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-body);
}

.field-item input, .field-item select {
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  height: 42px;
  font-size: 13px;
  color: var(--text-main);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field-item input:focus, .field-item select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.12);
}

.input-with-addon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-addon input {
  width: 100%;
}

.input-with-addon .addon {
  position: absolute;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
}

[dir="rtl"] .input-with-addon .addon { left: 14px; }
[dir="ltr"] .input-with-addon .addon { right: 14px; }

.color-picker-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.color-picker-input {
  width: 44px;
  height: 42px;
  padding: 2px !important;
  cursor: pointer;
  border-radius: var(--radius-sm);
}

.color-code {
  font-family: ui-monospace, monospace;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
}

.hint-text {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 12px;
}

/* ==========================================================================
   INSTALLATION GUIDE SECTION (CLEAR & VISUAL)
   ========================================================================== */

.method-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.method-tab-btn {
  background: var(--bg-surface);
  border: 2px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  text-align: start;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: all 0.2s ease;
}

.method-tab-btn:hover {
  border-color: var(--primary-border);
  background: var(--primary-subtle);
}

.method-tab-btn.active {
  border-color: var(--primary);
  background: var(--primary-subtle);
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.12);
}

.tab-badge {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--primary-dark);
  background: var(--primary-light);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  width: fit-content;
  margin-bottom: 4px;
}

.method-tab-btn strong {
  font-size: 14px;
  color: var(--text-main);
}

.method-tab-btn small {
  font-size: 12px;
  color: var(--text-muted);
}

.install-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.install-guide-card {
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.install-guide-card h3 {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 16px;
}

.steps-numbered {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-inline-start: 20px;
}

.steps-numbered li {
  line-height: 1.5;
}

.steps-numbered strong {
  color: var(--text-main);
  font-size: 13px;
}

.steps-numbered p {
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 2px;
}

.code-box-card {
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-md);
}

.code-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.code-type-pill {
  font-family: ui-monospace, monospace;
  font-size: 12px;
  font-weight: 700;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
}

.code-snippet {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: var(--radius-sm);
  padding: 16px;
  color: #f1f5f9;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  line-height: 1.6;
  overflow-x: auto;
  direction: ltr;
  text-align: left;
}

.code-note {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 10px;
}

/* ==========================================================================
   LIVE PREVIEW MOCKUP
   ========================================================================== */

.mock-browser-frame {
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.browser-address-bar {
  background: #f1f5f9;
  border-bottom: 1px solid var(--line);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.window-dots {
  display: flex;
  gap: 6px;
}

.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.d-red { background: #f87171; }
.dot.d-yellow { background: #fbbf24; }
.dot.d-green { background: #34d399; }

.address-input {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 4px 12px;
  font-size: 11px;
  color: var(--text-muted);
  flex: 1;
  direction: ltr;
  text-align: left;
}

.mock-product-viewport {
  padding: 32px 24px;
}

.mock-product-card {
  display: flex;
  gap: 24px;
  align-items: center;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line-light);
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.mock-img-box {
  width: 100px;
  height: 100px;
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  font-size: 40px;
}

.mock-info-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mock-badge {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}

.mock-info-box h2 {
  font-size: 20px;
  color: var(--text-main);
  font-weight: 800;
}

.mock-price-tag {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
}

.mock-stock-info {
  font-size: 12px;
  color: var(--emerald-text);
  font-weight: 600;
}

.mock-buy-btn {
  background: var(--text-main);
  color: #ffffff;
  border: 0;
  border-radius: var(--radius-sm);
  padding: 9px 20px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  width: fit-content;
  margin-top: 6px;
}

/* ==========================================================================
   ACCOUNT & MODALS
   ========================================================================== */

.badge-store-id {
  font-family: ui-monospace, monospace;
  background: var(--bg-subtle);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  color: var(--primary-deep);
  font-weight: 700;
}

.action-buttons-group {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.danger-card {
  border-color: var(--rose-border);
}

.danger-card h2 {
  color: var(--rose);
}

.confirm-checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
}

.picker-dialog {
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  max-width: 480px;
  width: 90%;
  margin: auto;
  box-shadow: var(--shadow-lg);
}

.picker-dialog::backdrop {
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
}

.photo-lightbox-dialog {
  border: 0;
  background: transparent;
  max-width: 90vw;
  max-height: 90vh;
  margin: auto;
  outline: none;
}

.photo-lightbox-dialog::backdrop {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(5px);
}

.photo-lightbox-dialog img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.photo-lightbox-close {
  position: absolute;
  top: 16px;
  left: 16px;
  background: rgba(15, 23, 42, 0.7);
  color: #ffffff;
  border: 0;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  font-size: 18px;
  cursor: pointer;
  display: grid;
  place-items: center;
}

/* Toast */
.toast-notify {
  position: fixed;
  bottom: 24px;
  left: 24px;
  background: #0f172a;
  color: #ffffff;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 13px;
  font-weight: 600;
  z-index: 99999;
  display: flex;
  align-items: center;
  gap: 10px;
  border-left: 4px solid var(--primary);
  animation: slideInToast 0.2s ease-out;
}

.toast-notify.error {
  border-left-color: var(--rose);
}

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

.main-footer {
  padding: 24px 32px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-light);
}

.main-footer .sep {
  margin: 0 6px;
}

/* Responsive */
@media (max-width: 900px) {
  .sidebar {
    display: none;
  }
  .app-shell {
    margin-right: 0 !important;
    margin-left: 0 !important;
  }
  main {
    padding: 20px 16px;
  }
}
