/* Admin Dashboard Styles */

.admin-layout { display: flex; height: 100vh; overflow: hidden; position: relative; }

/* Reuse sidebar styles from dashboard.css */
.admin-sidebar {
  width: 220px; flex-shrink: 0;
  background: var(--surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
}
.admin-sidebar-header { padding: 20px; border-bottom: 1px solid var(--border); }
.admin-logo { font-family: var(--font-heading); font-size: 16px; font-weight: 600; color: var(--pink); letter-spacing: 2px; }
.admin-badge { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--lavender); background: var(--lavender-muted); padding: 2px 8px; border-radius: var(--radius-pill); margin-top: 4px; display: inline-block; }
.admin-nav { flex: 1; padding: 12px; }
.admin-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius-md);
  color: var(--text-secondary); font-size: 14px; cursor: pointer;
  border: none; background: none; width: 100%; text-align: left;
  transition: all var(--transition-fast);
}
.admin-nav-item:hover { background: var(--surface-2); color: var(--text-primary); }
.admin-nav-item.active { background: var(--pink-muted); color: var(--pink); }

/* Main */
.admin-main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.admin-topbar { height: 56px; flex-shrink: 0; background: var(--surface); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 0 24px; }
.admin-topbar-title { font-size: 16px; font-weight: 600; color: var(--text-primary); }
.admin-content { flex: 1; overflow-y: auto; padding: 28px; }

/* Tabs */
.admin-tab { display: none; }
.admin-tab.active { display: block; animation: fadeIn 0.2s ease; }

/* Stat cards */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 28px; }
.stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 22px 20px;
  transition: all var(--transition);
}
.stat-card:hover { border-color: var(--border-light); transform: translateY(-1px); }
.stat-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.8px; color: var(--text-muted); margin-bottom: 8px; }
.stat-value { font-family: var(--font-heading); font-size: 36px; font-weight: 700; color: var(--pink); line-height: 1; }
.stat-sub { font-size: 13px; color: var(--text-secondary); margin-top: 6px; }
.stat-card.lavender .stat-value { color: var(--lavender); }
.stat-card.success .stat-value { color: var(--success); }
.stat-card.danger .stat-value { color: #c04060; }

/* Table */
.data-table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.data-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); gap: 12px; flex-wrap: wrap; }
.search-input {
  background: var(--bg); border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md); padding: 8px 14px; color: var(--text-primary);
  font-size: 14px; outline: none; min-width: 200px; font-family: var(--font-body);
  transition: border-color var(--transition);
}
.search-input:focus { border-color: var(--pink); }
table { width: 100%; border-collapse: collapse; }
th {
  padding: 12px 16px; text-align: left;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px;
  color: var(--text-muted); border-bottom: 1px solid var(--border);
  background: var(--surface);
}
td { padding: 14px 16px; font-size: 13px; color: var(--text-primary); border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,0.01); }
[dir="rtl"] th, [dir="rtl"] td { text-align: right; }
.table-avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--pink), var(--lavender-dark)); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: white; overflow: hidden; }
.table-avatar img { width: 100%; height: 100%; object-fit: cover; }
.table-actions { display: flex; align-items: center; gap: 6px; }
.tbl-btn {
  padding: 4px 10px; border-radius: var(--radius-sm);
  font-size: 12px; font-weight: 500; cursor: pointer; border: none;
  transition: all var(--transition-fast);
}
.tbl-btn-edit { background: var(--lavender-muted); color: var(--lavender); }
.tbl-btn-edit:hover { background: var(--lavender); color: white; }
.tbl-btn-del { background: var(--danger-bg); color: #c04060; }
.tbl-btn-del:hover { background: var(--danger); color: white; }
.pagination { display: flex; align-items: center; gap: 8px; padding: 16px 20px; justify-content: center; border-top: 1px solid var(--border); }
.page-btn { padding: 6px 12px; border-radius: var(--radius-sm); border: 1px solid var(--border-light); background: none; color: var(--text-secondary); font-size: 13px; cursor: pointer; transition: all var(--transition-fast); }
.page-btn:hover, .page-btn.active { background: var(--pink-muted); color: var(--pink); border-color: rgba(232,121,154,0.3); }

/* Programs */
.program-list { display: flex; flex-direction: column; gap: 12px; }
.program-row {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
}
.program-row-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; cursor: pointer;
  transition: background var(--transition-fast);
}
.program-row-header:hover { background: rgba(255,255,255,0.01); }
.program-row-title { font-size: 15px; font-weight: 600; color: var(--text-primary); }
.program-row-meta { font-size: 13px; color: var(--text-secondary); }
.program-exercises { padding: 0 20px 20px; border-top: 1px solid var(--border); display: none; }
.program-row.expanded .program-exercises { display: block; }
.exercise-row-admin { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.exercise-row-admin:last-child { border-bottom: none; }
.drag-handle { color: var(--text-muted); cursor: grab; font-size: 16px; }
.exercise-info-admin { flex: 1; }
.exercise-info-admin .title { font-size: 14px; font-weight: 500; color: var(--text-primary); }
.exercise-info-admin .meta { font-size: 12px; color: var(--text-secondary); }

/* Product page editor */
.editor-layout { display: grid; grid-template-columns: 1fr 380px; gap: 24px; height: calc(100vh - 56px - 56px); }
.editor-form { overflow-y: auto; padding-right: 8px; }
.editor-preview { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; height: 100%; }
.editor-preview iframe { width: 100%; height: 100%; border: none; }
.field-group { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; margin-bottom: 16px; }
.field-group-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); margin-bottom: 16px; }
.page-editor-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.page-editor-grid .full-width { grid-column: 1 / -1; }
.json-editor { width: 100%; background: var(--bg); border: 1.5px solid var(--border-light); border-radius: var(--radius-md); padding: 12px; color: var(--lavender); font-family: var(--font-mono); font-size: 12px; line-height: 1.5; resize: vertical; min-height: 120px; outline: none; box-sizing: border-box; }
.json-editor:focus { border-color: var(--lavender); }
/* ── Visual Editor Cards ── */
.ve-card { background: var(--bg); border: 1.5px solid var(--border-light); border-radius: 12px; margin-bottom: 12px; overflow: hidden; }
.ve-card-header { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; background: linear-gradient(135deg,#FFF0F4,#F5EEF8); border-bottom: 1px solid var(--border-light); }
.ve-card-num { font-size: 12px; font-weight: 700; color: var(--lavender); letter-spacing: 0.5px; }
.ve-del { background: none; border: 1px solid #F5C0CC; color: #C0586A; border-radius: 6px; padding: 3px 10px; font-size: 11px; font-weight: 600; cursor: pointer; transition: background var(--transition), color var(--transition); }
.ve-del:hover { background: #FFECEF; color: #A0344A; }
.ve-card-body { padding: 16px; }
.ve-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.ve-row:last-child { margin-bottom: 0; }
.ve-textarea { resize: vertical; min-height: 72px; font-family: inherit; }
.ve-toggle-row { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.ve-toggle-row input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--lavender); cursor: pointer; }
.ve-empty { font-size: 13px; color: var(--text-muted); text-align: center; padding: 24px 0; font-style: italic; }
.star-picker { display: flex; gap: 4px; margin-top: 6px; }
.star-picker .star { font-size: 24px; cursor: pointer; color: #D8D0E8; transition: color 0.15s, transform 0.1s; line-height: 1; }
.star-picker .star.on { color: #F5A623; }
.star-picker .star:hover { transform: scale(1.2); color: #F5A623; }
@media (max-width: 600px) { .ve-row { grid-template-columns: 1fr; } }
/* ── Gallery Editor ── */
.gallery-grid { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; }
.gallery-thumb { width: 130px; border-radius: 12px; border: 1.5px solid var(--border-light); overflow: hidden; background: var(--bg); flex-shrink: 0; }
.gallery-thumb-img { width: 130px; height: 130px; object-fit: cover; display: block; background: var(--bg); }
.gallery-thumb-img-wrap { position: relative; }
.gallery-main-badge { position: absolute; top: 6px; left: 6px; background: var(--pink); color: #fff; font-size: 9px; font-weight: 800; letter-spacing: 0.5px; padding: 2px 7px; border-radius: 20px; text-transform: uppercase; }
.gallery-thumb-meta { padding: 6px 8px 4px; display: flex; align-items: center; justify-content: space-between; }
.gallery-thumb-num { font-size: 11px; font-weight: 700; color: var(--lavender); }
.gallery-thumb-actions { display: flex; gap: 3px; }
.gallery-btn { border: none; background: var(--border-light); color: var(--text-secondary); border-radius: 5px; width: 24px; height: 24px; font-size: 12px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background var(--transition); }
.gallery-btn:hover:not(:disabled) { background: var(--lavender-muted); color: var(--lavender); }
.gallery-btn:disabled { opacity: 0.3; cursor: default; }
.gallery-btn-del { background: #FFECEF; color: #C0586A; }
.gallery-btn-del:hover { background: #FFD5DA; color: #A0344A; }
.gallery-empty { font-size: 13px; color: var(--text-muted); padding: 28px 0; font-style: italic; text-align: center; width: 100%; border: 2px dashed var(--border-light); border-radius: 12px; background: var(--bg); }
/* Exercise media upload */
.ex-media-upload { border: 2px dashed var(--border-light); border-radius: var(--radius-lg); padding: 20px 16px; text-align: center; cursor: pointer; transition: border-color var(--transition), background var(--transition); background: var(--bg); position: relative; }
.ex-media-upload:hover { border-color: var(--pink); background: var(--pink-muted); }
.ex-media-upload.has-file { border-color: var(--lavender); border-style: solid; }
.ex-media-preview { max-width: 100%; max-height: 140px; border-radius: var(--radius-md); display: block; margin: 8px auto 0; object-fit: contain; }
.ex-media-upload-icon { font-size: 28px; margin-bottom: 6px; }
.ex-media-upload-label { font-size: 13px; color: var(--text-secondary); }
.ex-media-upload-sub { font-size: 11px; color: var(--text-muted); margin-top: 3px; }
.ex-media-clear { position: absolute; top: 6px; right: 8px; background: none; border: none; font-size: 16px; cursor: pointer; color: var(--text-muted); padding: 2px 6px; }
.ex-media-clear:hover { color: var(--danger); }

/* Program thumbnail upload */
.prog-thumb-upload { border: 2px dashed var(--border-light); border-radius: var(--radius-lg); height: 140px; cursor: pointer; position: relative; overflow: hidden; transition: border-color var(--transition), background var(--transition); background: linear-gradient(135deg, rgba(232,121,154,0.06), rgba(184,159,212,0.1)); display: flex; align-items: center; justify-content: center; }
.prog-thumb-upload:hover { border-color: var(--pink); background: var(--pink-muted); }
.prog-thumb-upload.has-thumb { border-style: solid; border-color: var(--lavender); }
.prog-thumb-placeholder { text-align: center; pointer-events: none; }

/* Settings tab */
.settings-section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; margin-bottom: 16px; }
.settings-section-title { font-size: 14px; font-weight: 600; color: var(--text-primary); margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; }
.toggle-label { font-size: 14px; color: var(--text-primary); }
.toggle-sub { font-size: 12px; color: var(--text-secondary); }
.toggle-switch {
  width: 44px; height: 24px; border-radius: 12px;
  background: var(--border-light); position: relative; cursor: pointer;
  transition: background var(--transition);
}
.toggle-switch.on { background: var(--pink); }
.toggle-switch::after {
  content: ''; position: absolute; width: 18px; height: 18px;
  border-radius: 50%; background: white; top: 3px; left: 3px;
  transition: left var(--transition);
}
.toggle-switch.on::after { left: 23px; }
.muted-user-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); }
.muted-user-row:last-child { border-bottom: none; }

/* Modals - shared */
.modal-title { font-size: 18px; font-weight: 600; color: var(--text-primary); margin-bottom: 20px; }
.modal-form-row { margin-bottom: 16px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 24px; }

/* Recent signups */
.recent-table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; margin-top: 24px; }
.recent-table-title { padding: 16px 20px; font-size: 14px; font-weight: 600; color: var(--text-primary); border-bottom: 1px solid var(--border); }

/* Mobile hamburger */
.admin-hamburger { display: none; background: none; border: none; cursor: pointer; font-size: 20px; padding: 4px 8px; color: var(--text-secondary); border-radius: var(--radius-sm); }
.admin-hamburger:hover { background: var(--bg-raised); }
.admin-topbar-left { display: flex; align-items: center; gap: 10px; }
.admin-sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 200; }
.admin-sidebar-overlay.open { display: block; }

/* Clickable stat card */
.stat-card-clickable { cursor: pointer; position: relative; }
.stat-card-clickable:hover { border-color: var(--pink); background: var(--pink-muted); transform: translateY(-2px); box-shadow: 0 4px 20px rgba(232,121,154,0.12); }
.stat-badge-link { font-size: 10px; color: var(--pink); font-weight: 600; margin-left: 6px; opacity: 0.8; text-transform: none; letter-spacing: 0; }

/* Live visitors dot */
.live-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--success); margin-left: 5px; vertical-align: middle;
  animation: livePulse 2s infinite;
}
@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.7); }
}

/* Analytics chart section */
.chart-section {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 24px 24px 16px; margin-bottom: 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.chart-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 16px; flex-wrap: wrap; gap: 12px;
}
.chart-controls { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.chart-title { font-size: 15px; font-weight: 600; color: var(--text-primary); margin-bottom: 6px; }
.chart-legend { display: flex; gap: 14px; flex-wrap: wrap; }
.legend-item { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-secondary); }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.chart-canvas { overflow: visible; border-radius: var(--radius-md); min-height: 260px; }
.chart-canvas svg { display: block; width: 100%; }
.chart-dot { transition: r 0.1s; }
.chart-hover-zone { cursor: crosshair; }
.chart-hover-zone:hover ~ .chart-dot { r: 5; }

/* Chart summary bar */
.chart-summary {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  padding: 10px 0 14px; border-bottom: 1px solid var(--border); margin-bottom: 4px; min-height: 40px;
}
.chart-sum-item { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-secondary); }
.chart-sum-item strong { color: var(--text-primary); font-weight: 700; }
.chart-sum-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; display: inline-block; }

/* Period buttons */
.chart-period-group { display: flex; gap: 3px; background: var(--bg); border: 1px solid var(--border-light); border-radius: var(--radius-md); padding: 3px; }
.chart-period-btn {
  padding: 5px 12px; border-radius: var(--radius-sm); border: none;
  background: none; color: var(--text-muted); font-size: 12px; font-weight: 500; cursor: pointer;
  transition: all var(--transition-fast); white-space: nowrap;
}
.chart-period-btn:hover { background: var(--surface-2); color: var(--text-primary); }
.chart-period-btn.active { background: white; color: var(--pink); font-weight: 700; box-shadow: 0 1px 4px rgba(0,0,0,0.1); }

/* Date range picker */
.chart-date-range {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.chart-date-input {
  padding: 5px 10px; border-radius: var(--radius-sm); border: 1px solid var(--border-light);
  background: var(--bg); color: var(--text-primary); font-size: 12px; font-family: var(--font-body);
  outline: none; cursor: pointer;
}
.chart-date-input:focus { border-color: var(--pink); }

/* Conversion Funnel Section */
.funnel-section {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 24px; margin-bottom: 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.funnel-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 20px; flex-wrap: wrap; gap: 8px;
}
.funnel-title {
  font-size: 14px; font-weight: 600; color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: 0.6px; margin-bottom: 6px;
}
.funnel-rate {
  font-size: 32px; font-weight: 800; color: var(--text-primary); line-height: 1;
}
.funnel-period-label { font-size: 12px; color: var(--text-muted); padding-top: 4px; }
.funnel-loading { text-align: center; padding: 32px; color: var(--text-muted); font-size: 13px; }

/* Funnel columns with arrows */
.funnel-columns {
  display: flex; align-items: stretch;
  border: 1px solid var(--border-light); border-radius: var(--radius-md);
  overflow: hidden; margin-bottom: 20px;
}
.funnel-col {
  flex: 1; padding: 16px 14px; border-left: 1px solid var(--border-light);
}
.funnel-col:first-child { border-left: none; }
.funnel-col--highlight {
  background: linear-gradient(135deg, #FFF0F4 0%, #FDF8FA 100%);
  border-left-color: rgba(232,121,154,0.3);
}
.funnel-col-label { font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 2px; }
.funnel-col-sub { font-size: 11px; color: var(--text-muted); margin-bottom: 10px; }
.funnel-col-pct { font-size: 22px; font-weight: 800; line-height: 1.1; margin-bottom: 3px; }
.funnel-col-count { font-size: 18px; font-weight: 700; color: var(--text-primary); margin-bottom: 6px; }
.funnel-col-step-pct { font-size: 11px; font-weight: 500; }

/* Arrow between funnel cols */
.funnel-arrow-col {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 0 4px; flex-shrink: 0; width: 28px;
}
.funnel-arrow-line { flex: 1; width: 1px; background: var(--border-light); }
.funnel-arrow-icon { font-size: 18px; color: var(--text-muted); line-height: 1; padding: 2px 0; }

/* Funnel bar chart */
.funnel-bar-wrap { display: flex; flex-direction: column; gap: 7px; margin-top: 4px; }
.funnel-bar-row { display: flex; align-items: center; gap: 10px; }
.funnel-bar-name { font-size: 12px; color: var(--text-muted); width: 88px; flex-shrink: 0; text-align: right; }
.funnel-bar-track { flex: 1; background: var(--border); border-radius: 4px; height: 26px; overflow: hidden; }
.funnel-bar-fill {
  height: 100%; border-radius: 4px; display: flex; align-items: center;
  transition: width 0.7s cubic-bezier(0.4,0,0.2,1); min-width: 3px;
}
.funnel-bar-label { font-size: 12px; font-weight: 600; padding: 0 8px; }
.funnel-bar-pct { font-size: 12px; font-weight: 700; width: 52px; flex-shrink: 0; text-align: right; }

@media (max-width: 700px) {
  .funnel-columns { flex-wrap: wrap; }
  .funnel-arrow-col { display: none; }
  .funnel-col { flex: 0 0 calc(50% - 1px); min-width: 0; }
  .funnel-col:nth-child(2n+1) { border-left: none; border-top: 1px solid var(--border-light); }
  .funnel-col:first-child { border-top: none; }
}

/* Subscribers modal table */
.subs-table { width: 100%; border-collapse: collapse; }
.subs-table th { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: var(--text-muted); padding: 10px 12px; border-bottom: 1px solid var(--border); background: var(--surface); text-align: left; }
.subs-table td { padding: 12px 12px; font-size: 13px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.subs-table tr:last-child td { border-bottom: none; }
.subs-expiry-soon { color: #d97706; font-weight: 600; }
.subs-expiry-ok { color: var(--text-secondary); }

/* ─── Orders sub-nav ─── */
.orders-subnav {
  display: flex; gap: 4px; margin-bottom: 20px;
  border-bottom: 2px solid var(--border-light); padding-bottom: 0;
}
.orders-subnav-btn {
  background: none; border: none; cursor: pointer; font-size: 13px; font-weight: 600;
  color: var(--text-muted); padding: 10px 18px; border-radius: 8px 8px 0 0;
  position: relative; display: flex; align-items: center; gap: 7px;
  border-bottom: 2px solid transparent; margin-bottom: -2px; transition: color 0.15s;
}
.orders-subnav-btn:hover { color: var(--text-primary); }
.orders-subnav-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.orders-subnav-badge {
  background: #E8799A; color: white; font-size: 10px; font-weight: 700;
  padding: 2px 6px; border-radius: 999px; line-height: 1.4;
}

/* ─── Abandoned header ─── */
.abandoned-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 20px; gap: 16px;
}
.abandoned-header-title { font-size: 16px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.abandoned-header-sub { font-size: 13px; color: var(--text-muted); line-height: 1.5; max-width: 520px; }

/* ─── Abandoned list ─── */
.abandoned-list { display: flex; flex-direction: column; gap: 10px; }
.abandoned-empty { text-align: center; padding: 60px 24px; color: var(--text-muted); font-size: 14px; }
.abandoned-card {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px;
  background: var(--surface); border: 1px solid var(--border-light); border-radius: var(--radius-md);
  cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s;
}
.abandoned-card:hover { border-color: #D4B8E8; box-shadow: 0 2px 12px rgba(123,94,167,0.08); }
.abandoned-card-avatar {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, #E8799A, #B89FD4);
  color: white; font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.abandoned-card-info { flex: 1; min-width: 0; }
.abandoned-card-name { font-size: 14px; font-weight: 600; color: var(--text-primary); margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.abandoned-card-email { font-size: 12px; color: var(--text-muted); margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.abandoned-card-meta { font-size: 12px; color: var(--text-muted); display: flex; gap: 6px; }
.abandoned-card-dot { opacity: 0.4; }
.abandoned-card-right { flex-shrink: 0; text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.abandoned-plan-chip { font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.abandoned-card-num { font-size: 12px; font-weight: 600; color: var(--text-secondary); font-family: monospace; }
.abandoned-card-time { font-size: 11px; color: var(--text-muted); }
.abandoned-card-action {
  flex-shrink: 0; background: none; border: 1px solid var(--border-light);
  border-radius: 8px; padding: 7px 10px; cursor: pointer; font-size: 14px;
  color: var(--text-muted); transition: background 0.15s, border-color 0.15s;
}
.abandoned-card-action:hover { background: #FFF0F4; border-color: #E8799A; }

/* ─── Abandoned detail modal ─── */
.abandoned-detail-modal { max-width: 540px; width: 100%; padding: 0 !important; overflow: hidden; }
.abandoned-detail-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 24px 28px 20px; border-bottom: 1px solid var(--border-light);
  background: linear-gradient(135deg, #FFF5F8, #F8F4FF);
}
.abandoned-detail-order-num { font-size: 11px; font-weight: 700; color: #E8799A; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 4px; font-family: monospace; }
.abandoned-detail-title { font-size: 18px; font-weight: 700; color: var(--text-primary); }
.modal-close-btn {
  background: none; border: none; font-size: 18px; color: var(--text-muted);
  cursor: pointer; padding: 4px 8px; border-radius: 6px; line-height: 1;
  transition: background 0.15s;
}
.modal-close-btn:hover { background: var(--border); color: var(--text-primary); }
.abandoned-detail-body { padding: 20px 28px; display: flex; flex-direction: column; gap: 20px; max-height: 60vh; overflow-y: auto; }
.abd-section { }
.abd-section-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: var(--text-muted); margin-bottom: 10px; }
.abd-plan-chip { font-size: 13px; font-weight: 600; padding: 7px 14px; border-radius: 8px; display: inline-block; margin-bottom: 6px; }
.abd-abandoned-at { font-size: 12px; color: var(--text-muted); }
.abd-info-grid { display: flex; flex-direction: column; gap: 0; border: 1px solid var(--border-light); border-radius: var(--radius-md); overflow: hidden; }
.abd-info-row { display: flex; align-items: baseline; padding: 10px 14px; border-bottom: 1px solid var(--border-light); gap: 12px; }
.abd-info-row:last-child { border-bottom: none; }
.abd-info-key { font-size: 12px; color: var(--text-muted); width: 70px; flex-shrink: 0; }
.abd-info-val { font-size: 13px; font-weight: 600; color: var(--text-primary); flex: 1; word-break: break-word; }
.abandoned-detail-footer {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 28px; border-top: 1px solid var(--border-light); gap: 12px;
  background: var(--surface);
}
.abd-recover-status { font-size: 12px; font-weight: 500; }
.abd-recover-btn { min-width: 170px; }

/* Mobile responsive */
@media (max-width: 768px) {
  .admin-hamburger { display: flex; }
  .admin-sidebar {
    position: fixed; left: -240px; top: 0; bottom: 0; z-index: 300;
    width: 220px; transition: left 0.25s ease;
    box-shadow: 4px 0 24px rgba(0,0,0,0.15);
  }
  .admin-sidebar.open { left: 0; }
  [dir="rtl"] .admin-sidebar { left: auto; right: -240px; }
  [dir="rtl"] .admin-sidebar.open { right: 0; }
  .admin-content { padding: 16px; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-value { font-size: 26px; }
  table { font-size: 12px; }
  th, td { padding: 10px 8px; }
  .table-actions { flex-wrap: wrap; }
  .editor-layout { grid-template-columns: 1fr; }
  .page-editor-grid { grid-template-columns: 1fr; }
  .page-editor-grid .full-width { grid-column: auto; }
  .admin-topbar { padding: 0 14px; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .table-toolbar { flex-direction: column; align-items: stretch; }
  .search-input { min-width: unset; width: 100%; }
}
