/* ═══════════════════════════════════════════════════════
   Tomnyson Shop ADMIN — Professional Design System
   Layout: Fixed Sidebar + Scrollable Content
   Palette: Slate Dark Sidebar, Clean Light Content
   Font: Inter (compact B2B), Be Vietnam Pro fallback
═══════════════════════════════════════════════════════ */

/* ── Imports ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ── Design Tokens ── */
:root {
  /* Sidebar */
  --sidebar-bg:      #0f172a;
  --sidebar-hover:   rgba(255,255,255,0.06);
  --sidebar-active:  rgba(16,185,129,0.14);
  --sidebar-text:    #94a3b8;
  --sidebar-active-text: #34d399;
  --sidebar-border:  rgba(255,255,255,0.06);
  --sidebar-w:       220px;

  /* Content */
  --page:            #f1f5f9;
  --surface:         #ffffff;
  --surface-2:       #f8fafc;
  --surface-3:       #f1f5f9;
  --text:            #0f172a;
  --text-2:          #334155;
  --muted:           #64748b;
  --line:            #e2e8f0;
  --line-strong:     #cbd5e1;

  /* Accent — Emerald (growth, ecommerce) */
  --accent:          #10b981;
  --accent-dark:     #059669;
  --accent-soft:     #ecfdf5;
  --accent-ring:     rgba(16,185,129,0.2);

  /* Semantic */
  --danger:          #ef4444;
  --danger-soft:     #fef2f2;
  --danger-border:   #fecaca;
  --warning:         #f59e0b;
  --warning-soft:    #fffbeb;
  --warning-border:  #fde68a;
  --ok:              #10b981;
  --ok-soft:         #ecfdf5;
  --ok-border:       #a7f3d0;

  /* Elevation */
  --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.08), 0 2px 4px rgba(15,23,42,0.04);
  --shadow-card: 0 0 0 1px var(--line);

  /* Radius */
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 12px;

  /* Transition */
  --t: 0.15s ease;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; }
html { height: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", "Be Vietnam Pro", "Noto Sans", sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
}

body.modal-open {
  overflow: hidden;
}

/* ═══════════════════════════════════════════════════════
   LOGIN PAGE
═══════════════════════════════════════════════════════ */
.page {
  width: 100%;
  min-height: 100vh;
}

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 40px 36px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.28);
}

.login-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}

.login-logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.login-logo-text {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.login-logo-sub {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

.login-card h1 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
}

.login-card > p {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 24px;
  line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════
   APP SHELL: SIDEBAR + CONTENT
═══════════════════════════════════════════════════════ */
.app-shell {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ── */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 18px;
  border-bottom: 1px solid var(--sidebar-border);
  flex-shrink: 0;
}

.sidebar-brand-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.sidebar-brand-name {
  font-size: 13px;
  font-weight: 700;
  color: #f1f5f9;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.sidebar-brand-sub {
  font-size: 11px;
  color: var(--sidebar-text);
  font-weight: 500;
}

.sidebar-section {
  padding: 12px 10px 4px;
  flex: 1;
}

.sidebar-section-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #475569;
  padding: 0 8px;
  margin-bottom: 4px;
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: none;
  border: none;
  box-shadow: none;
  padding: 0;
  margin-bottom: 12px;
}

.admin-nav a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border-radius: var(--r-sm);
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: background var(--t), color var(--t);
  white-space: nowrap;
}

.admin-nav a:hover {
  background: var(--sidebar-hover);
  color: #e2e8f0;
}

.admin-nav a.active {
  background: var(--sidebar-active);
  color: var(--sidebar-active-text);
  font-weight: 600;
}

.nav-icon {
  font-size: 15px;
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}

.sidebar-footer {
  padding: 12px 10px;
  border-top: 1px solid var(--sidebar-border);
  flex-shrink: 0;
}

/* ── Main Content ── */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 24px;
  height: 56px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: none;
}

.topbar-left h2 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--text);
}

.topbar-left p {
  display: none;
}

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

.content-body {
  padding: 24px;
  flex: 1;
}

/* ═══════════════════════════════════════════════════════
   CARDS
═══════════════════════════════════════════════════════ */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px;
  margin-bottom: 16px;
}

.product-quick-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.product-workbench {
  padding: 0;
  overflow: hidden;
}

.product-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(16,185,129,0.08), transparent 34%),
    var(--surface);
}

.product-summary-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border-bottom: 1px solid var(--line);
}

.product-summary-card {
  background: var(--surface-2);
  padding: 14px 20px;
}

.product-summary-card span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.product-summary-card strong {
  display: block;
  margin-top: 4px;
  font-size: 24px;
  line-height: 1;
  letter-spacing: -0.03em;
}

.product-workbench .table-wrap {
  border: 0;
  border-radius: 0;
}

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

.card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  letter-spacing: -0.01em;
}

.card-sub {
  font-size: 12px;
  color: var(--muted);
  margin: 2px 0 0;
  font-weight: 400;
}

/* ═══════════════════════════════════════════════════════
   STATS GRID
═══════════════════════════════════════════════════════ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 0;
  position: relative;
  overflow: hidden;
  transition: box-shadow var(--t), border-color var(--t);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-dark));
  opacity: 0;
  transition: opacity var(--t);
}

.stat-card:hover { border-color: var(--accent); }
.stat-card:hover::before { opacity: 1; }

.stat-card span {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stat-card strong {
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.03em;
  line-height: 1;
}

/* ═══════════════════════════════════════════════════════
   CHART
═══════════════════════════════════════════════════════ */
.pricing-head, .orders-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.legend-row {
  display: flex;
  gap: 14px;
  margin: 4px 0 12px;
  color: var(--muted);
  font-size: 12px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.dot.cost { background: #3b82f6; }
.dot.sale { background: var(--accent); }

.chart-wrap {
  width: 100%;
  min-height: 300px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 12px;
  background: var(--surface-2);
}

#pricing-chart { width: 100%; height: 280px; display: block; }

.pricing-metrics {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

/* ═══════════════════════════════════════════════════════
   METRIC ITEMS
═══════════════════════════════════════════════════════ */
.payment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.metric-item {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface-2);
  padding: 14px 16px;
  display: grid;
  gap: 5px;
}

.metric-item span {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.metric-item strong {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  word-break: break-all;
}

.metric-item button {
  justify-self: start;
  padding: 7px 11px;
  font-size: 12px;
}

#bank-summary-detail { white-space: pre-line; }

/* ═══════════════════════════════════════════════════════
   FORMS
═══════════════════════════════════════════════════════ */
.stack { display: grid; gap: 14px; }

label {
  display: grid;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  letter-spacing: 0.01em;
}

input,
select,
textarea,
button {
  max-width: 100%;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text);
  padding: 9px 12px;
  font-size: 13.5px;
  font-family: inherit;
  transition: border-color var(--t), box-shadow var(--t);
}

textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.55;
}

input:hover, select:hover, textarea:hover {
  border-color: var(--line);
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}

select { cursor: pointer; }

button {
  cursor: pointer;
  font-weight: 600;
  font-size: 13.5px;
  padding: 9px 16px;
  border: none;
  background: var(--accent);
  color: #fff;
  transition: background var(--t), transform var(--t), box-shadow var(--t);
  letter-spacing: 0.01em;
}

button:hover:not(:disabled) {
  background: var(--accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16,185,129,0.3);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.brand-logo-presets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(124px, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.emoji-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 8px;
}

.display-options {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background: var(--surface-2);
}

.display-options legend {
  padding: 0 6px;
  color: var(--text-2);
  font-size: 12px;
  font-weight: 800;
}

.display-option-card {
  display: flex;
  grid-template-columns: none;
  align-items: flex-start;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  cursor: pointer;
}

.display-option-card input {
  width: auto;
  margin-top: 2px;
}

.display-option-card strong {
  display: block;
  color: var(--text);
  font-size: 13px;
}

.display-option-card small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.45;
}

.display-option-panel {
  padding: 0 0 4px 26px;
}

.display-option-card:not(:has(input:checked)) + .display-option-panel {
  display: none;
}

.image-preview-box {
  margin-top: 10px;
  width: min(260px, 100%);
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--surface-3);
}

.image-preview-box img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.brand-logo-preset {
  width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 6px 10px;
  background: var(--surface);
  color: var(--text-2);
  border: 1px solid var(--line-strong);
  box-shadow: none;
}

.brand-logo-preset:hover:not(:disabled) {
  background: var(--surface-2);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
  transform: none;
}

.brand-emoji {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 7px;
  background: var(--surface-2);
  font-size: 16px;
  line-height: 1;
}

.brand-logo-preset span {
  line-height: 1;
}

.icon-chip {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 18px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line-strong);
  box-shadow: none;
}

.icon-chip:hover:not(:disabled) {
  background: var(--surface-2);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
  transform: none;
}

.icon-input-row {
  display: flex;
  gap: 8px;
}

.icon-input-row input {
  flex: 1;
  min-width: 0;
}

.icon-input-row button {
  width: auto;
  white-space: nowrap;
}

.form-grid-two,
.form-grid-three,
.form-grid-four {
  display: grid;
  gap: 12px;
}

.form-grid-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-grid-four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.admin-modal {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: grid;
  place-items: center;
  padding: 24px;
}

.admin-modal-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(4px);
}

.admin-modal-backdrop:hover:not(:disabled) {
  background: rgba(15, 23, 42, 0.62);
  box-shadow: none;
  transform: none;
}

.admin-modal-panel {
  position: relative;
  width: min(760px, 100%);
  max-height: min(88vh, 860px);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
}

.admin-modal-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.admin-modal-head h3 {
  font-size: 18px;
}

.modal-close-btn {
  width: 34px;
  height: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
  color: var(--text-2);
  border: 1px solid var(--line-strong);
  font-size: 22px;
  line-height: 1;
}

.modal-close-btn:hover:not(:disabled) {
  background: var(--surface-3);
  box-shadow: none;
  transform: none;
}

.product-modal-form {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 8px;
}

.modal-actions .hint {
  flex: 1;
}

/* Button Variants */
.btn-secondary {
  background: var(--surface);
  color: var(--text-2);
  border: 1px solid var(--line-strong);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--surface-2);
  box-shadow: none;
  transform: none;
}

.danger-btn {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid var(--danger-border);
}

.danger-btn:hover:not(:disabled) {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
  box-shadow: 0 4px 12px rgba(239,68,68,0.25);
}

.setup-form {
  max-width: 640px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.setup-form button { justify-self: start; }

.setup-list {
  margin: 12px 0 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.75;
  font-size: 13px;
}

/* ═══════════════════════════════════════════════════════
   LAYOUT HELPERS
═══════════════════════════════════════════════════════ */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}

.hidden { display: none !important; }

code {
  color: var(--accent-dark);
  background: var(--accent-soft);
  border: 1px solid #a7f3d0;
  border-radius: 4px;
  padding: 1px 5px;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.88em;
}

/* ═══════════════════════════════════════════════════════
   TABLES
═══════════════════════════════════════════════════════ */
.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 900px;
  background: var(--surface);
}

th, td {
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  font-size: 13px;
  vertical-align: top;
}

tbody tr:last-child td { border-bottom: 0; }

tbody tr {
  transition: background var(--t);
}

tbody tr:hover { background: var(--surface-2); }

th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--muted);
  background: var(--surface-2);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--line);
}

td input { width: 120px; padding: 6px 9px; font-size: 13px; }

td .wide-input,
td .table-textarea { width: 200px; margin-top: 6px; }

td .table-textarea {
  min-height: 64px;
  padding: 6px 9px;
  font-size: 12px;
}

.table-value {
  display: inline-block;
  max-width: 220px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.45;
  white-space: normal;
  word-break: break-word;
}

.product-title {
  font-weight: 700;
}

.truncate-cell {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════
   BADGES & STATUS
═══════════════════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  font-size: 11px;
  font-weight: 700;
  padding: 0 8px;
  border-radius: 99px;
  border: 1px solid transparent;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.badge.pending {
  color: #92400e;
  background: var(--warning-soft);
  border-color: var(--warning-border);
}

.badge.done {
  color: #065f46;
  background: var(--ok-soft);
  border-color: var(--ok-border);
}

.badge.stop {
  color: #991b1b;
  background: var(--danger-soft);
  border-color: var(--danger-border);
}

/* ═══════════════════════════════════════════════════════
   MISC COMPONENTS
═══════════════════════════════════════════════════════ */
.cell-sub {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 3px;
  line-height: 1.45;
}

.hint {
  color: var(--accent-dark);
  min-height: 18px;
  font-size: 12.5px;
  font-weight: 500;
}

.error {
  color: var(--danger);
  min-height: 18px;
  font-weight: 600;
  font-size: 13px;
}

.inline-actions {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.inline-actions button {
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-2);
}

.checkbox input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}

.price-mode-field {
  display: grid;
  align-content: start;
  gap: 7px;
}

.field-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  letter-spacing: 0.01em;
}

.price-mode-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.price-radio {
  min-height: 41px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text-2);
  cursor: pointer;
}

.price-radio input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  margin: 0;
  padding: 0;
  border: 2px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
  box-shadow: none;
  flex: 0 0 auto;
}

.price-radio input[type="radio"]:checked {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 4px var(--surface);
  background: var(--accent);
}


.sale-price-field input:disabled {
  color: var(--muted);
  background: var(--surface-3);
  cursor: not-allowed;
}

.rank-list { display: grid; gap: 8px; }

.rank-item {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface-2);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.rank-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rank-item-info { flex: 1; }
.rank-item-info strong { font-size: 13px; font-weight: 600; }
.rank-item span { color: var(--muted); font-size: 12px; }

/* Secrets card */
#product-secrets-card {
  border: 2px solid var(--accent);
}

/* ═══════════════════════════════════════════════════════
   SECTION & PAGE STRUCTURE
═══════════════════════════════════════════════════════ */
h3 {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 4px;
  color: var(--text);
  line-height: 1.3;
}

h1, h2 {
  margin: 0 0 6px;
  letter-spacing: -0.02em;
  line-height: 1.18;
}

h2 { font-size: 20px; font-weight: 800; }
p  { margin: 0; color: var(--muted); line-height: 1.55; font-size: 13px; }

/* Page sections */
.page-section { animation: fadeIn 0.18s ease; }

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

/* ═══════════════════════════════════════════════════════
   HTML MESSAGE EDITOR
═══════════════════════════════════════════════════════ */
.msg-editor {
  display: grid;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--surface);
  transition: border-color var(--t), box-shadow var(--t);
}

.msg-editor:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}

.msg-editor-toolbar {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 6px 8px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}

.msg-editor-toolbar-sep {
  width: 1px;
  height: 18px;
  background: var(--line-strong);
  margin: 0 3px;
}

.msg-toolbar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 26px;
  padding: 0 7px;
  font-size: 12.5px;
  font-weight: 700;
  font-family: inherit;
  border-radius: 5px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  transition: background var(--t), color var(--t);
  white-space: nowrap;
  line-height: 1;
}

.msg-toolbar-btn:hover {
  background: var(--accent-soft);
  border-color: #a7f3d0;
  color: var(--accent-dark);
  transform: none;
  box-shadow: none;
}

.msg-editor-textarea {
  border: none !important;
  border-radius: 0 !important;
  outline: none !important;
  box-shadow: none !important;
  resize: vertical;
  min-height: 100px;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.6;
  padding: 10px 12px;
  background: var(--surface);
}

.msg-editor-preview {
  display: none;
  border-top: 1px solid var(--line);
  background: #f0f2f5;
  padding: 12px;
}

.msg-editor-preview.visible { display: block; }

.msg-editor-preview-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.tg-preview-bubble {
  display: inline-block;
  max-width: 100%;
  background: #effdde;
  border-radius: 12px 12px 2px 12px;
  padding: 8px 13px;
  font-size: 14px;
  line-height: 1.55;
  color: #0e1621;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  white-space: pre-wrap;
  word-break: break-word;
}

.tg-preview-bubble b  { font-weight: 700; }
.tg-preview-bubble i  { font-style: italic; }
.tg-preview-bubble u  { text-decoration: underline; }
.tg-preview-bubble s  { text-decoration: line-through; }
.tg-preview-bubble code {
  background: rgba(0,0,0,0.08);
  border: none;
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 0.9em;
  color: #0e1621;
}
.tg-preview-bubble a { color: #168acd; }

/* ═══════════════════════════════════════════════════════
   RESPONSIVE — Mobile-First
   Breakpoints:
   - Mobile:  < 768px  → Bottom Tab Bar
   - Tablet:  768–1023px → Sidebar icon-only (56px)
   - Desktop: ≥ 1024px  → Full sidebar (220px)
═══════════════════════════════════════════════════════ */

/* ── Hamburger toggle button (hidden on desktop) ── */
.sidebar-toggle-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 36px;
  height: 36px;
  padding: 6px;
  border: none;
  background: transparent;
  border-radius: var(--r-sm);
  cursor: pointer;
  flex-shrink: 0;
  color: var(--text);
  box-shadow: none;
}

.sidebar-toggle-btn:hover {
  background: var(--surface-2);
  transform: none;
  box-shadow: none;
}

.sidebar-toggle-btn span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text-2);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* X animation when sidebar open */
.sidebar-toggle-btn.is-open span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.sidebar-toggle-btn.is-open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.sidebar-toggle-btn.is-open span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* ── Sidebar overlay (mobile) ── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 99;
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.sidebar-overlay.visible {
  display: block;
  opacity: 1;
}

/* ── TOPBAR REDESIGN ── */
.btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 8px 16px;
  font-weight: 600;
  border-radius: var(--r-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-primary:hover {
  background: var(--accent-dark);
}
.btn-icon {
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--line);
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: all var(--t);
  box-shadow: none;
}
.btn-icon:hover {
  background: var(--surface-2);
  border-color: var(--line-strong);
  color: var(--text);
  box-shadow: none;
  transform: none;
}

/* ── INNER TABS ── */
.unified-card { padding: 0; overflow: hidden; background: #fff; }
.inner-tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
  background: #fff;
  padding: 0 16px;
}
.inner-tab-btn {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
  padding: 16px 20px;
  cursor: pointer;
  border-radius: 0;
  box-shadow: none;
}
.inner-tab-btn:hover {
  color: var(--text);
  background: transparent;
  box-shadow: none;
  transform: none;
}
.inner-tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.inner-tab-content { padding: 20px; }
.inner-tab-content.hidden { display: none; }
.card-inner { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; margin-bottom: 20px; }

/* ── PRODUCT REDESIGN ── */
.product-summary-row.redesign {
  display: flex;
  gap: 20px;
  background: transparent;
  border: none;
  padding: 0 0 20px 0;
}
.product-summary-card {
  flex: 1;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 16px;
}
.label-green { color: #10b981; font-weight: 700; font-size: 11px; letter-spacing: 0.05em; }
.val-green { color: #10b981; display: block; font-size: 24px; font-weight: 800; margin-top: 4px; }

.label-blue { color: #3b82f6; font-weight: 700; font-size: 11px; letter-spacing: 0.05em; }
.val-blue { color: #3b82f6; display: block; font-size: 24px; font-weight: 800; margin-top: 4px; }

.label-dark { color: #0f172a; font-weight: 700; font-size: 11px; letter-spacing: 0.05em; }
.val-dark { color: #0f172a; display: block; font-size: 24px; font-weight: 800; margin-top: 4px; }

.col-center { text-align: center; }
.col-right { text-align: right; }

.table-action-icon {
  background: transparent;
  color: var(--muted);
  border: none;
  padding: 6px;
  cursor: pointer;
  box-shadow: none;
}
.table-action-icon:hover {
  color: var(--text);
  background: var(--surface-2);
  border-radius: var(--r-sm);
  box-shadow: none;
  transform: none;
}

.pagination-mock {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  font-size: 13px;
  color: var(--muted);
}
.pagination-controls {
  display: flex;
  gap: 4px;
}
.pagination-controls button {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text-2);
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: var(--r-sm);
  box-shadow: none;
}
.pagination-controls button:hover:not(:disabled) {
  background: var(--surface-2);
  box-shadow: none;
  transform: none;
}
.pagination-controls button.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ── TABLET: 768px – 1023px ── */
@media (min-width: 768px) and (max-width: 1023px) {
  :root { --sidebar-w: 60px; }

  .sidebar {
    width: 60px;
    overflow: hidden;
  }

  .sidebar-brand {
    padding: 16px 12px;
    justify-content: center;
  }

  .sidebar-brand-icon {
    margin: 0;
  }

  /* Hide text labels on tablet */
  .sidebar-brand-name,
  .sidebar-brand-sub,
  .sidebar-section-label,
  .sidebar-footer button span:last-child {
    display: none;
  }

  .sidebar-section {
    padding: 12px 6px 4px;
  }

  .admin-nav a {
    justify-content: center;
    padding: 10px 6px;
    gap: 0;
    position: relative;
  }

  /* Show label as tooltip on hover */
  .admin-nav a::after {
    content: attr(data-label);
    position: absolute;
    left: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    background: #1e293b;
    color: #f1f5f9;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: var(--r-sm);
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
    z-index: 200;
    box-shadow: var(--shadow-md);
  }

  .admin-nav a:hover::after {
    opacity: 1;
  }

  .nav-icon {
    font-size: 18px;
    width: auto;
  }

  .sidebar-footer {
    padding: 10px 6px;
  }

  .sidebar-footer button {
    padding: 8px;
    justify-content: center;
    font-size: 16px;
  }

  .sidebar-toggle-btn { display: none; }

  .content-body { padding: 20px; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); }

  .grid { grid-template-columns: 1fr; }
}

/* ── MOBILE: < 768px ── */
@media (max-width: 767px) {
  :root { --sidebar-w: 260px; }

  /* Show hamburger */
  .sidebar-toggle-btn { display: flex; }

  /* Sidebar slides in from left */
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    width: var(--sidebar-w);
    z-index: 101;
    box-shadow: 8px 0 32px rgba(0,0,0,0.3);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  /* Full content width */
  .main-content {
    margin-left: 0;
  }

  /* Topbar adjustments */
  .topbar {
    padding: 0 12px;
    gap: 8px;
  }

  .topbar-left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1;
  }

  .topbar-left h2 {
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .topbar-actions .btn-secondary {
    font-size: 12px;
    padding: 7px 10px;
  }

  /* Content padding */
  .content-body {
    padding: 12px;
    padding-bottom: 80px; /* space for bottom tabs */
  }

  /* Stats: 2 columns */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .stat-card { padding: 14px 16px; }
  .stat-card strong { font-size: 22px; }

  /* Cards */
  .card { padding: 14px; }

  /* Forms */
  .setup-form { max-width: 100%; }

  /* Grid: single column */
  .grid { grid-template-columns: 1fr; }

  /* Pricing head / orders head stack */
  .pricing-head,
  .orders-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .product-quick-card,
  .product-toolbar,
  .modal-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .product-summary-row,
  .form-grid-two,
  .form-grid-three,
  .form-grid-four {
    grid-template-columns: 1fr;
  }

  .product-workbench.card {
    padding: 0;
  }

  .admin-modal {
    padding: 12px;
    align-items: end;
  }

  .admin-modal-panel {
    width: 100%;
    max-height: 92vh;
    border-radius: 14px 14px 0 0;
  }

  .orders-head select,
  .orders-head input {
    width: 100%;
  }

  /* ── BOTTOM TAB BAR ── */
  .bottom-tabs {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--sidebar-bg);
    border-top: 1px solid rgba(255,255,255,0.08);
    z-index: 100;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
  }

  .bottom-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: #64748b;
    text-decoration: none;
    font-size: 10px;
    font-weight: 600;
    padding: 6px 4px;
    transition: color 0.15s ease;
    cursor: pointer;
    border: none;
    background: transparent;
    -webkit-tap-highlight-color: transparent;
  }

  .bottom-tab:hover,
  .bottom-tab.active {
    color: var(--sidebar-active-text);
    transform: none;
    box-shadow: none;
  }

  .bottom-tab .tab-icon { font-size: 18px; line-height: 1; }
  .bottom-tab .tab-label { font-size: 9.5px; line-height: 1; letter-spacing: 0.01em; }

  /* "More" button opens sidebar */
  .bottom-tab-more { color: #64748b; }

  /* Inline actions wrap nicely */
  .inline-actions { flex-wrap: wrap; }

  /* Chart height reduction */
  #pricing-chart { height: 200px; }
  .chart-wrap { min-height: 220px; }

  /* Page section animation faster on mobile */
  .page-section { animation-duration: 0.12s; }

  /* Table scroll hint */
  .table-wrap {
    -webkit-overflow-scrolling: touch;
  }
}

/* ── Extra small ── */
@media (max-width: 380px) {
  .stats-grid { grid-template-columns: 1fr; }
  .stat-card strong { font-size: 24px; }
  .bottom-tab .tab-label { display: none; }
  .bottom-tab { gap: 0; }
}

/* ── Desktop (always show sidebar, hide tablet/mobile UI) ── */
@media (min-width: 1024px) {
  .sidebar-toggle-btn { display: none; }
  .sidebar-overlay { display: none !important; }
  .bottom-tabs { display: none !important; }

  .sidebar {
    transform: none !important;
    width: var(--sidebar-w);
  }
}

/* ═══════════════════════════════════════════════════════
   PRODUCT MODAL REDESIGN
═══════════════════════════════════════════════════════ */

.admin-modal-panel.redesign {
  width: min(860px, calc(100vw - 24px));
  background: var(--surface);
  border-radius: 12px;
  padding: 0;
  max-width: 860px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.admin-modal-panel.redesign .admin-modal-head {
  padding: 24px 24px 16px;
  border-bottom: none;
  background: var(--surface);
}

.admin-modal-panel.redesign .admin-modal-head h3 {
  font-size: 20px;
  color: var(--text);
}

.modal-divider {
  border: none;
  border-top: 1px solid var(--line);
  margin: 0;
}

.admin-modal-panel.redesign .product-modal-form {
  padding: 20px 24px 0px; /* adjusted bottom padding */
  gap: 20px;
}

.required-star {
  color: #ef4444;
}

.fieldset-divider {
  width: 100%;
  text-align: left;
  border-bottom: 1px solid var(--line);
  line-height: 0.1em;
  margin: 10px 0 20px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-2);
  letter-spacing: 0.05em;
}

.fieldset-divider span {
  background: var(--surface);
  padding-right: 10px;
}

.display-options-box {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 16px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.product-modal-form .form-grid-two {
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
}

.product-modal-form .form-grid-four {
  grid-template-columns: repeat(auto-fit, minmax(min(118px, 100%), 1fr));
}

.display-option-card {
  border: none;
  background: transparent;
  padding: 0;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
}

.display-option-card:hover {
  background: transparent;
  border-color: transparent;
}

.display-option-card input[type="radio"].custom-radio {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid var(--line-strong);
  border-radius: 50%;
  margin-top: 2px;
  position: relative;
  cursor: pointer;
  outline: none;
  flex-shrink: 0;
}

.display-option-card input[type="radio"].custom-radio:checked {
  border-color: var(--accent);
}

.display-option-card input[type="radio"].custom-radio:checked::after {
  content: "";
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.display-option-card span strong {
  font-size: 14px;
  display: block;
  margin-bottom: 2px;
}

.input-with-button {
  display: flex;
  gap: 8px;
}

.input-icon-wrap {
  position: relative;
  flex: 1;
}

.input-icon-wrap .input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-2);
  pointer-events: none;
}

.input-icon-wrap input {
  width: 100%;
  padding-left: 36px;
}

.btn-upload {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #e2e8f0;
  color: #334155;
  border: none;
  padding: 0 16px;
  font-weight: 500;
  border-radius: var(--r-sm);
  cursor: pointer;
}

.btn-upload:hover {
  background: #cbd5e1;
}

.form-grid-three {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.modal-actions.redesign {
  position: sticky;
  bottom: -20px;
  margin: 20px -20px -20px -20px;
  padding: 16px 24px;
  background: var(--surface);
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
}

.modal-buttons {
  display: flex;
  gap: 12px;
  margin-left: auto;
}

.btn-cancel {
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--text);
  padding: 8px 16px;
  font-weight: 500;
}

.btn-cancel:hover {
  background: var(--surface-2);
}

.modal-actions.redesign .btn-primary {
  background: var(--accent);
  color: white;
  padding: 8px 16px;
  border: none;
}

.checkbox-row {
  display: flex;
  align-items: center;
}

@media screen and (max-width: 640px) {
  .admin-modal {
    padding: 8px;
  }

  .admin-modal-panel.redesign {
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
    border-radius: 12px;
  }

  .admin-modal-panel.redesign .admin-modal-head {
    gap: 12px;
    padding: 14px 16px 10px;
  }

  .admin-modal-panel.redesign .admin-modal-head h3 {
    font-size: 18px;
  }

  .modal-close-btn {
    flex: 0 0 34px;
  }

  .admin-modal-panel.redesign .product-modal-form {
    padding: 16px 12px 0;
    gap: 16px;
  }

  .display-options {
    padding: 10px;
  }

  .display-options-box {
    padding: 12px;
    gap: 14px;
  }

  .display-option-panel {
    padding-left: 0;
  }

  .product-modal-form .form-grid-four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .icon-input-row,
  .input-with-button,
  .modal-actions.redesign,
  .modal-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .brand-logo-presets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(108px, 1fr));
  }

  .brand-logo-preset,
  .icon-input-row button,
  .btn-upload,
  .modal-buttons button {
    width: 100%;
    justify-content: center;
  }

  .emoji-presets {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .icon-chip {
    width: 100%;
  }

  .image-preview-box {
    width: 100%;
  }

  .modal-actions.redesign {
    bottom: 0;
    margin: 16px -12px 0;
    padding: 12px;
  }

  .modal-actions.redesign .hint {
    min-height: 0;
  }
}

@media screen and (max-width: 380px) {
  .product-modal-form .form-grid-four {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════════════════════════════════════════════
   SECRET TABLE
═══════════════════════════════════════════════════════ */
.secrets-table {
  width: 100%;
  border-collapse: collapse;
}

.secrets-table th,
.secrets-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.secrets-table th {
  text-align: left;
  background: var(--surface-2);
  color: var(--text-2);
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 10;
}

.secrets-table td.secret-content {
  word-break: break-all;
  font-family: monospace;
}

.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.badge.success { background: #dcfce7; color: #166534; }
.badge.danger { background: #fee2e2; color: #991b1b; }
.badge.neutral { background: #f1f5f9; color: #475569; }

.action-btns {
  display: flex;
  gap: 8px;
}

.btn-small {
  padding: 4px 8px;
  font-size: 12px;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  color: var(--text);
  cursor: pointer;
}

.btn-small:hover {
  background: var(--surface-2);
}

.btn-small.danger {
  color: #ef4444;
  border-color: #ef4444;
}

.btn-small.danger:hover {
  background: #fef2f2;
}

/* ═══════════════ MOBILE RESPONSIVE & EJS REFACTOR ═══════════════ */
@media screen and (max-width: 768px) {
  .app-shell {
    display: flex;
    flex-direction: column;
  }
  
  .sidebar {
    position: fixed;
    top: 0;
    left: -280px; /* Hidden by default */
    height: 100vh;
    z-index: 1000;
    transition: left 0.3s ease;
    box-shadow: 2px 0 8px rgba(0,0,0,0.1);
  }
  
  .sidebar.open {
    left: 0;
  }
  
  .sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
  }
  
  .sidebar.open ~ .main-content .sidebar-overlay,
  .sidebar.open + .main-content .sidebar-overlay {
    display: block;
  }

  .sidebar-toggle-btn {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 24px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-right: 12px;
  }

  .sidebar-toggle-btn span {
    width: 24px;
    height: 3px;
    background: var(--text);
    border-radius: 10px;
  }

  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .form-grid-two, .form-grid-three, .form-grid-four {
    grid-template-columns: 1fr;
  }

  /* Make tab layout scrollable horizontally */
  .inner-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
  }
}

@media screen and (min-width: 769px) {
  .sidebar-toggle-btn {
    display: none;
  }
  .sidebar-overlay {
    display: none !important;
  }
}

/* ═══════════════════════════════════════════════════════
   PRODUCT MODAL v2 — UI/UX polish
   Scoped to .admin-modal-panel.redesign so other modals are untouched.
   Strategy: refine the existing chip rows, display-option cards,
   price-mode segmented control, and footer without HTML changes.
═══════════════════════════════════════════════════════ */

/* Panel: keep size, ensure header/body/footer are a clean column flex */
.admin-modal-panel.redesign {
  width: min(860px, calc(100vw - 24px));
  max-height: min(90vh, 880px);
  border-radius: 14px;
  box-shadow: 0 24px 64px -16px rgba(15, 23, 42, 0.28), 0 8px 24px -8px rgba(15, 23, 42, 0.12);
}

.admin-modal-panel.redesign.category-modal-panel {
  width: min(680px, calc(100vw - 24px));
}

.admin-modal-panel.redesign .admin-modal-head {
  padding: 20px 24px 16px;
}
.admin-modal-panel.redesign .admin-modal-head h3 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.admin-modal-panel.redesign #product-create-subtitle,
.admin-modal-panel.redesign #product-edit-subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

/* Form body — consistent 16px rhythm, smooth scroll */
.admin-modal-panel.redesign .product-modal-form {
  padding: 20px 24px;
  gap: 18px;
  scrollbar-gutter: stable;
}

.admin-modal-panel.redesign .product-lang-tabs {
  position: sticky;
  top: -20px;
  z-index: 6;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: -2px -4px 0;
  padding: 8px 4px 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 72%, rgba(255, 255, 255, 0)),
    var(--surface);
}

.admin-modal-panel.redesign .product-lang-tabs .lang-tab {
  min-width: 0;
  min-height: 58px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.88), rgba(255, 255, 255, 0.96));
  color: var(--text-2);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  text-align: left;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease, color 140ms ease;
}

.admin-modal-panel.redesign .product-lang-tabs .lang-tab:hover {
  border-color: color-mix(in srgb, var(--accent) 44%, var(--line));
  background: var(--surface);
  transform: none;
}

.admin-modal-panel.redesign .product-lang-tabs .lang-tab.active {
  border-color: var(--accent);
  color: var(--text);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 13%, #ffffff), #ffffff 58%);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--accent) 70%, transparent) inset,
    0 10px 24px -18px rgba(5, 150, 105, 0.95);
}

.admin-modal-panel.redesign .product-lang-tabs .lang-tab-flag {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
}

.admin-modal-panel.redesign .product-lang-tabs .lang-tab.active .lang-tab-flag {
  border-color: color-mix(in srgb, var(--accent) 56%, var(--line));
  background: var(--accent);
  color: #ffffff;
}

.admin-modal-panel.redesign .product-lang-tabs .lang-tab-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
  line-height: 1.15;
}

.admin-modal-panel.redesign .product-lang-tabs .lang-tab-copy strong,
.admin-modal-panel.redesign .product-lang-tabs .lang-tab-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-modal-panel.redesign .product-lang-tabs .lang-tab-copy strong {
  font-size: 13px;
  font-weight: 750;
}

.admin-modal-panel.redesign .product-lang-tabs .lang-tab-copy small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.admin-modal-panel.redesign .product-lang-tabs .lang-tab.active .lang-tab-copy small {
  color: var(--accent-dark);
}

/* Form labels — consistent baseline */
.product-modal-form > label,
.product-modal-form .form-grid-two > label,
.product-modal-form .form-grid-four > label,
.product-modal-form .price-mode-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  letter-spacing: 0.01em;
}
.product-modal-form input[type="text"],
.product-modal-form input[type="url"],
.product-modal-form input[type="number"],
.product-modal-form input:not([type]),
.product-modal-form select,
.product-modal-form textarea {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  min-height: 40px;
  border-radius: 8px;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.product-modal-form input:focus,
.product-modal-form select:focus,
.product-modal-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring, rgba(16, 185, 129, 0.18));
}

/* Section header — replace the hairline-through-text divider with a quieter eyebrow */
.admin-modal-panel.redesign .fieldset-divider {
  margin: 0 0 10px;
  padding: 0;
  border: none;
  line-height: 1;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
}
.admin-modal-panel.redesign .fieldset-divider span {
  background: transparent;
  padding: 0;
}

/* Display options container — single grouped card */
.admin-modal-panel.redesign .display-options {
  padding: 0;
  border: none;
  background: transparent;
}
.admin-modal-panel.redesign .display-options-box {
  padding: 16px;
  gap: 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-2);
}

/* Display option card — real selectable card */
.admin-modal-panel.redesign .display-option-card {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  gap: 12px;
  transition: border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
}
.admin-modal-panel.redesign .display-option-card:hover {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
  background: var(--surface);
}
.admin-modal-panel.redesign .display-option-card:has(input:checked) {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 6%, var(--surface));
  box-shadow: 0 0 0 1px var(--accent) inset;
}
.admin-modal-panel.redesign .display-option-card span strong {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
}
.admin-modal-panel.redesign .display-option-card small {
  font-size: 12px;
  color: var(--muted);
}

/* The expanded panel sits directly under its card */
.admin-modal-panel.redesign .display-option-panel {
  padding: 4px 4px 4px 34px;
  margin-top: -4px;
}

/* Icon input row — input + button */
.admin-modal-panel.redesign .icon-input-row {
  gap: 8px;
}
.admin-modal-panel.redesign .icon-input-row input {
  height: 40px;
  font-size: 14px;
}
.admin-modal-panel.redesign .icon-input-row button {
  height: 40px;
  padding: 0 14px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--text-2);
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
  transition: background 120ms ease, border-color 120ms ease;
}
.admin-modal-panel.redesign .icon-input-row button:hover {
  background: var(--surface-2);
  border-color: var(--accent);
  color: var(--accent-dark, var(--accent));
}

/* Brand presets grid — tidy 5-up, then 4, then 3, then 2 */
.admin-modal-panel.redesign .brand-logo-presets {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 4px;
}
@media (max-width: 720px) {
  .admin-modal-panel.redesign .brand-logo-presets { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .admin-modal-panel.redesign .brand-logo-presets { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 380px) {
  .admin-modal-panel.redesign .brand-logo-presets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.admin-modal-panel.redesign .brand-logo-preset {
  width: 100%;
  min-height: 38px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 120ms ease, border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}
.admin-modal-panel.redesign .brand-logo-preset:hover:not(:disabled) {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 6%, var(--surface));
  box-shadow: 0 0 0 3px var(--accent-ring, rgba(16, 185, 129, 0.18));
  transform: none;
}
.admin-modal-panel.redesign .brand-logo-preset.is-active {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
  box-shadow: 0 0 0 1px var(--accent) inset;
  color: var(--accent-dark, var(--accent));
}
.admin-modal-panel.redesign .brand-emoji {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--surface-2);
  font-size: 14px;
}

/* Emoji presets row — sit visually inside the same picker panel */
.admin-modal-panel.redesign .emoji-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}
.admin-modal-panel.redesign .icon-chip {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 17px;
  transition: background 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}
.admin-modal-panel.redesign .icon-chip:hover:not(:disabled) {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 6%, var(--surface));
  box-shadow: 0 0 0 3px var(--accent-ring, rgba(16, 185, 129, 0.18));
  transform: none;
}
.admin-modal-panel.redesign .icon-chip.is-active {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
  box-shadow: 0 0 0 1px var(--accent) inset;
}

/* Image input with upload button */
.admin-modal-panel.redesign .input-with-button {
  gap: 8px;
}
.admin-modal-panel.redesign .input-icon-wrap input {
  padding-left: 36px;
}
.admin-modal-panel.redesign .btn-upload {
  height: 40px;
  padding: 0 14px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--text-2);
  font-weight: 600;
  font-size: 13px;
  transition: background 120ms ease, border-color 120ms ease;
}
.admin-modal-panel.redesign .btn-upload:hover {
  background: var(--surface-2);
  border-color: var(--accent);
  color: var(--accent-dark, var(--accent));
}

/* Image preview */
.admin-modal-panel.redesign .image-preview-box {
  border-radius: 10px;
  border-color: var(--line);
}

/* CKEditor surface — match form input styling */
.admin-modal-panel.redesign .ck.ck-editor__main > .ck-editor__editable {
  min-height: 120px;
  border-radius: 0 0 8px 8px !important;
  border-color: var(--line) !important;
  background: var(--surface) !important;
  font-size: 13.5px;
}
.admin-modal-panel.redesign .ck.ck-toolbar {
  border-radius: 8px 8px 0 0 !important;
  border-color: var(--line) !important;
  background: var(--surface-2) !important;
}
.admin-modal-panel.redesign .ck.ck-editor__main > .ck-editor__editable.ck-focused {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px var(--accent-ring, rgba(16, 185, 129, 0.18)) !important;
}

/* Price block — 2-row mini-grid so 5 fields breathe */
.admin-modal-panel.redesign .product-modal-form .form-grid-four {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px 14px;
}
.admin-modal-panel.redesign .product-modal-form .form-grid-four > :nth-child(1) { grid-column: span 4; }   /* Giá nhập */
.admin-modal-panel.redesign .product-modal-form .form-grid-four > :nth-child(2) { grid-column: span 4; }   /* Giá chính */
.admin-modal-panel.redesign .product-modal-form .form-grid-four > :nth-child(3) { grid-column: span 4; }   /* Chế độ giá */
.admin-modal-panel.redesign .product-modal-form .form-grid-four > :nth-child(4) { grid-column: span 6; }   /* Giá sale */
.admin-modal-panel.redesign .product-modal-form .form-grid-four > :nth-child(5) { grid-column: span 6; }   /* Tồn kho */

@media (max-width: 640px) {
  .admin-modal-panel.redesign .product-modal-form .form-grid-four > :nth-child(n) {
    grid-column: span 12;
  }
}

/* Price mode — segmented control */
.admin-modal-panel.redesign .price-mode-field { gap: 6px; }
.admin-modal-panel.redesign .price-mode-field .field-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  letter-spacing: 0.01em;
}
.admin-modal-panel.redesign .price-mode-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding: 3px;
  border-radius: 9px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  min-height: 40px;
}
.admin-modal-panel.redesign .price-radio {
  position: relative;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 6px;
  background: transparent;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 600;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease, box-shadow 120ms ease;
}
.admin-modal-panel.redesign .price-radio input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}
.admin-modal-panel.redesign .price-radio:has(input:checked) {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08), 0 0 0 1px var(--line);
}
.admin-modal-panel.redesign .price-radio:hover:not(:has(input:checked)) {
  color: var(--text);
}

/* Sale price disabled state */
.admin-modal-panel.redesign .sale-price-field input:disabled {
  background: var(--surface-2);
  color: var(--muted);
  cursor: not-allowed;
}

/* Checkbox row */
.admin-modal-panel.redesign .checkbox-row {
  padding: 6px 0;
}
.admin-modal-panel.redesign .checkbox-row .checkbox {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Sticky footer — fix the negative-margin hack with a real flex footer */
.admin-modal-panel.redesign .modal-actions.redesign {
  position: sticky;
  bottom: 0;
  margin: 0 -24px -20px;
  padding: 14px 24px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  border-radius: 0 0 14px 14px;
  z-index: 5;
}
.admin-modal-panel.redesign .modal-actions.redesign .hint {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}
.admin-modal-panel.redesign .modal-actions.redesign .btn-primary {
  height: 38px;
  padding: 0 18px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13.5px;
  box-shadow: 0 1px 2px rgba(16, 185, 129, 0.18), 0 4px 12px -2px rgba(16, 185, 129, 0.22);
}
.admin-modal-panel.redesign .modal-actions.redesign .btn-primary:hover {
  filter: brightness(1.04);
}
.admin-modal-panel.redesign .modal-actions.redesign .btn-cancel {
  height: 38px;
  padding: 0 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13.5px;
}

/* Mobile refinement */
@media (max-width: 640px) {
  .admin-modal-panel.redesign .admin-modal-head { padding: 16px 16px 12px; }
  .admin-modal-panel.redesign .product-modal-form { padding: 16px; gap: 16px; }
  .admin-modal-panel.redesign .display-options-box { padding: 12px; gap: 12px; }
  .admin-modal-panel.redesign .display-option-panel { padding-left: 0; }
  .admin-modal-panel.redesign .modal-actions.redesign {
    margin: 0 -16px -16px;
    padding: 12px 16px;
    flex-wrap: wrap;
  }
  .admin-modal-panel.redesign .modal-actions.redesign .modal-buttons {
    width: 100%;
    margin-left: 0;
  }
  .admin-modal-panel.redesign .modal-actions.redesign .modal-buttons button {
    flex: 1;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .admin-modal-panel.redesign * {
    transition: none !important;
  }
}

/* ═══════════════════════════════════════════════════════
   2FA TOOL STYLES
   ═══════════════════════════════════════════════════════ */
.tf-drag-zone-content:hover,
.tf-drag-zone.dragover .tf-drag-zone-content {
  border-color: var(--accent) !important;
  background-color: var(--accent-soft) !important;
  box-shadow: 0 0 0 3px var(--accent-ring);
}

.tf-drag-zone.dragover .tf-drag-icon {
  transform: scale(1.15);
  display: inline-block;
  transition: transform var(--t);
}

.tf-otp-code {
  letter-spacing: 6px !important;
}

.tf-info-val {
  user-select: all;
}

.tf-saved-otp-code {
  font-family: monospace;
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 1px;
}

.hm-saved-email {
  color: var(--text);
}

/* ═══════════════════════════════════════════════════════
   HOTMAIL OAUTH2 CHECKER STYLES
   ═══════════════════════════════════════════════════════ */
.hm-accordion {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  overflow: hidden;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--t), box-shadow var(--t);
}

.hm-accordion:hover {
  border-color: var(--line-strong);
}

.hm-accordion-header {
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  background: var(--surface-2);
  user-select: none;
  font-weight: 600;
  color: var(--text-2);
}

.hm-accordion-header:hover {
  background: var(--surface-3);
}

.hm-accordion-content {
  border-top: 1px solid var(--line);
  display: none;
  padding: 8px 16px;
  background: var(--surface);
}

.hm-accordion.open .hm-accordion-content {
  display: block;
}

.hm-mail-item {
  border-bottom: 1px solid var(--line);
  padding: 12px 10px;
  cursor: pointer;
  transition: background var(--t);
}

.hm-mail-item:last-child {
  border-bottom: none;
}

.hm-mail-item:hover {
  background: var(--surface-2);
}

.hm-mail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 6px;
}

.hm-mail-sender {
  font-weight: 600;
  color: var(--text);
  font-size: 13px;
}

.hm-mail-date {
  font-size: 11.5px;
  color: var(--muted);
}

.hm-mail-subject {
  font-weight: 500;
  color: var(--text-2);
  font-size: 13.5px;
}

.hm-mail-subject-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hm-copy-otp {
  flex: 0 0 auto;
  border: 1px solid var(--ok-border);
  border-radius: var(--r-sm);
  background: var(--ok-soft);
  color: #000;
  padding: 5px 9px;
  font: 700 12px/1.2 monospace;
  cursor: pointer;
}

.hm-copy-otp:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.hm-mail-body {
  margin-top: 8px;
  padding: 12px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-all;
  display: none;
}

/* Email HTML can carry white inline text styles intended for a dark email theme. */
.hm-mail-body,
.hm-mail-body * {
  color: #000 !important;
}

.hm-mail-item.expanded .hm-mail-body {
  display: block;
}


