* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

/* ============================================================
   VARIABLES
   ============================================================ */
:root {
  --brand: #f97316;
  --brand-rgb: 249,115,22;
  --brand-dark: #c2410c;
  --brand-light: #fff7ed;

  --text: #0f1419;
  --text-2: #536471;
  --text-3: #8b98a5;
  --border: #eff3f4;
  --border-2: #e5e7eb;
  --hover: rgba(0,0,0,0.03);
  --bg: #ffffff;
  --bg-soft: #f7f9f9;
  --bg-card: #ffffff;
  --bg-elevated: #ffffff;

  --danger: #dc2626;
  --success: #16a34a;
  --warning: #f59e0b;
  --info: #3b82f6;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-md: 0 8px 28px rgba(0,0,0,0.10);
  --shadow-lg: 0 16px 44px rgba(0,0,0,0.14);
  --shadow-brand: 0 8px 28px rgba(var(--brand-rgb), 0.28);

  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;

  --space-row: 14px;
}

html[data-theme="dark"] {
  --text: #e7e9ea;
  --text-2: #9ca3af;
  --text-3: #6b7280;
  --border: #232327;
  --border-2: #2f3336;
  --hover: rgba(255,255,255,0.04);
  --bg: #0a0a0d;
  --bg-soft: #16181c;
  --bg-card: #16181c;
  --bg-elevated: #1c1f23;
  --brand-light: rgba(var(--brand-rgb), 0.12);
  --brand-dark: #fb923c;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
  --shadow: 0 4px 16px rgba(0,0,0,0.35);
  --shadow-md: 0 8px 28px rgba(0,0,0,0.45);
  --shadow-lg: 0 16px 44px rgba(0,0,0,0.55);
}

/* Accents */
html[data-accent="blue"]   { --brand: #3b82f6; --brand-rgb: 59,130,246;  --brand-dark: #1e40af; }
html[data-accent="green"]  { --brand: #10b981; --brand-rgb: 16,185,129;  --brand-dark: #047857; }
html[data-accent="purple"] { --brand: #8b5cf6; --brand-rgb: 139,92,246;  --brand-dark: #5b21b6; }
html[data-accent="pink"]   { --brand: #ec4899; --brand-rgb: 236,72,153;  --brand-dark: #9d174d; }
html[data-accent="red"]    { --brand: #ef4444; --brand-rgb: 239,68,68;   --brand-dark: #991b1b; }
html[data-accent="teal"]   { --brand: #14b8a6; --brand-rgb: 20,184,166;  --brand-dark: #0f766e; }
html[data-accent="yellow"] { --brand: #eab308; --brand-rgb: 234,179,8;   --brand-dark: #854d0e; }
html[data-accent="indigo"] { --brand: #6366f1; --brand-rgb: 99,102,241;  --brand-dark: #3730a3; }
html[data-theme="dark"][data-accent="blue"]   { --brand-dark: #60a5fa; }
html[data-theme="dark"][data-accent="green"]  { --brand-dark: #34d399; }
html[data-theme="dark"][data-accent="purple"] { --brand-dark: #a78bfa; }
html[data-theme="dark"][data-accent="pink"]   { --brand-dark: #f472b6; }
html[data-theme="dark"][data-accent="red"]    { --brand-dark: #f87171; }
html[data-theme="dark"][data-accent="teal"]   { --brand-dark: #2dd4bf; }
html[data-theme="dark"][data-accent="yellow"] { --brand-dark: #facc15; }
html[data-theme="dark"][data-accent="indigo"] { --brand-dark: #818cf8; }

/* Font sizes */
html[data-fontsize="small"]   { font-size: 13.5px; }
html[data-fontsize="medium"]  { font-size: 15px; }
html[data-fontsize="large"]   { font-size: 16.5px; }
html[data-fontsize="xlarge"]  { font-size: 18px; }

/* Compact */
html[data-compact="1"] { --space-row: 10px; }

/* Réduire animation */
html[data-reduce-motion="1"] *,
html[data-reduce-motion="1"] *::before,
html[data-reduce-motion="1"] *::after {
  animation-duration: 0.001ms !important;
  transition-duration: 0.001ms !important;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  padding-bottom: 40px;
  overflow-x: hidden;
  transition: background .25s, color .25s;
  font-size: 1rem;
  line-height: 1.5;
}

img { max-width: 100%; display: block; }

/* ============================================================
   LOADING SKELETONS
   ============================================================ */
.dash-loading { padding: 20px 16px; }
.skeleton-hero { display: flex; gap: 16px; margin-bottom: 24px; }
.skel {
  background: linear-gradient(90deg, var(--bg-soft) 25%, var(--hover) 50%, var(--bg-soft) 75%);
  background-size: 200% 100%;
  animation: skel 1.4s ease-in-out infinite;
  border-radius: 8px;
}
.skel-avatar { width: 76px; height: 76px; border-radius: 50%; flex-shrink: 0; }
.skel-lines { flex: 1; display: flex; flex-direction: column; gap: 10px; justify-content: center; }
.skel-line { height: 14px; }
.skeleton-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.skel-stat { height: 76px; border-radius: 14px; }
@keyframes skel { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ============================================================
   PAGE
   ============================================================ */
.dash-page {
  max-width: 680px;
  margin: 0 auto;
  min-height: 100vh;
  padding-bottom: 90px;
}

/* ============================================================
   TOPBAR
   ============================================================ */
.dash-topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 0 12px;
  height: 56px;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  position: sticky; top: 0; z-index: 20;
  border-bottom: 1px solid var(--border);
}
.dash-topbar-title {
  flex: 1;
  font-size: 1.1rem; font-weight: 800;
  letter-spacing: -0.3px;
  display: flex; align-items: center; gap: 8px;
}
.dash-topbar-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  background: var(--brand);
  color: #fff;
  border-radius: 100px;
  letter-spacing: 0.04em;
}
.dash-back-btn {
  width: 38px; height: 38px; border-radius: 50%;
  background: transparent; border: 0;
  color: var(--text);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 16px;
  flex-shrink: 0;
  text-decoration: none;
  transition: background .15s;
}
.dash-back-btn:hover { background: var(--hover); }
.dash-topbar-iconbtn {
  width: 38px; height: 38px; border-radius: 50%;
  background: transparent; border: 0;
  color: var(--text);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 15px;
  flex-shrink: 0;
  transition: background .15s, color .15s;
}
.dash-topbar-iconbtn:hover { background: var(--brand-light); color: var(--brand); }

/* ============================================================
   HERO
   ============================================================ */
.dash-hero {
  margin: 16px;
  padding: 22px 20px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--brand) 12%, var(--bg)) 0%,
    color-mix(in srgb, var(--brand) 4%, var(--bg)) 60%,
    var(--bg) 100%);
  border: 1px solid var(--border);
  display: flex;
  gap: 18px;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.dash-hero::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--brand-rgb), 0.20), transparent 70%);
  pointer-events: none;
}
.dash-hero-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}
.dash-hero-avatar {
  width: 84px; height: 84px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand) 60%, #000));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; font-weight: 800;
  overflow: hidden;
  cursor: pointer;
  border: 3px solid var(--bg);
  box-shadow: 0 8px 24px rgba(var(--brand-rgb), 0.25);
  transition: transform .25s ease;
}
.dash-hero-avatar:hover { transform: scale(1.05); }
.dash-hero-avatar img { width: 100%; height: 100%; object-fit: cover; }
.dash-hero-status {
  position: absolute;
  bottom: 4px; right: 4px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--success);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 0 rgba(22,163,74,0.4);
  animation: statusPulse 2s infinite;
}
@keyframes statusPulse {
  0% { box-shadow: 0 0 0 0 rgba(22,163,74,0.6); }
  70% { box-shadow: 0 0 0 8px rgba(22,163,74,0); }
  100% { box-shadow: 0 0 0 0 rgba(22,163,74,0); }
}
.dash-hero-info { flex: 1; min-width: 0; position: relative; z-index: 1; }
.dash-hero-name {
  font-size: 1.25rem; font-weight: 800;
  line-height: 1.2;
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 4px;
  word-break: break-word;
}
.dash-hero-name .cert {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--brand); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 9px;
  flex-shrink: 0;
}
.dash-hero-handle { font-size: 0.9rem; color: var(--text-2); margin-bottom: 10px; }

.profile-progress {
  margin-top: 6px;
}
.profile-progress-head {
  display: flex; justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-2);
  margin-bottom: 5px;
  letter-spacing: 0.02em;
}
.profile-progress-head b { color: var(--brand); }
.profile-progress-track {
  height: 5px;
  background: rgba(var(--brand-rgb), 0.15);
  border-radius: 100px;
  overflow: hidden;
}
.profile-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand), color-mix(in srgb, var(--brand) 60%, #fff));
  border-radius: 100px;
  transition: width .6s cubic-bezier(.22,1,.36,1);
}

/* ============================================================
   STATS GRID
   ============================================================ */
.dash-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 0 16px 16px;
}
@media (max-width: 520px) {
  .dash-stats { grid-template-columns: repeat(2, 1fr); }
}
.dash-stat {
  padding: 16px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  transition: transform .2s, border-color .2s, box-shadow .2s;
  cursor: default;
  position: relative;
  overflow: hidden;
}
.dash-stat:hover {
  transform: translateY(-3px);
  border-color: rgba(var(--brand-rgb), 0.4);
  box-shadow: var(--shadow);
}
.dash-stat-icon {
  font-size: 15px;
  color: var(--brand);
  margin-bottom: 8px;
  opacity: 0.85;
}
.dash-stat-value {
  font-size: 1.4rem; font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
  margin-bottom: 3px;
  line-height: 1.1;
}
.dash-stat-label {
  font-size: 10.5px; color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-weight: 700;
}

/* ============================================================
   HEATMAP
   ============================================================ */
.heatmap-wrap {
  margin: 0 16px 16px;
  padding: 18px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.heatmap-title {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12.5px; font-weight: 800;
  color: var(--text-2);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.heatmap-title b { color: var(--brand); font-size: 14px; }
.heatmap-grid {
  display: grid;
  grid-template-columns: repeat(26, 1fr);
  gap: 3px;
  margin-bottom: 10px;
}
.heat-cell {
  aspect-ratio: 1;
  border-radius: 3px;
  background: rgba(var(--brand-rgb), 0.08);
  transition: transform .15s;
  cursor: pointer;
}
.heat-cell:hover { transform: scale(1.4); }
.heat-cell.l1 { background: rgba(var(--brand-rgb), 0.25); }
.heat-cell.l2 { background: rgba(var(--brand-rgb), 0.45); }
.heat-cell.l3 { background: rgba(var(--brand-rgb), 0.70); }
.heat-cell.l4 { background: var(--brand); }
.heatmap-legend {
  display: flex; align-items: center; gap: 6px;
  justify-content: flex-end;
  font-size: 10.5px; color: var(--text-3);
  font-weight: 600;
}
.heatmap-legend-cells { display: flex; gap: 3px; }
.heatmap-legend-cells span {
  width: 11px; height: 11px; border-radius: 3px;
  background: rgba(var(--brand-rgb), 0.08);
}
.heatmap-legend-cells span:nth-child(2) { background: rgba(var(--brand-rgb), 0.25); }
.heatmap-legend-cells span:nth-child(3) { background: rgba(var(--brand-rgb), 0.45); }
.heatmap-legend-cells span:nth-child(4) { background: rgba(var(--brand-rgb), 0.70); }
.heatmap-legend-cells span:nth-child(5) { background: var(--brand); }

/* ============================================================
   SECTION
   ============================================================ */
.dash-section {
  margin: 0 16px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .2s;
}
.dash-section:hover { border-color: var(--border-2); }

.dash-section-header {
  padding: 16px 18px 6px;
  display: flex; align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.dash-section-title {
  font-size: 11.5px; font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-2);
  display: flex; align-items: center; gap: 8px;
}
.dash-section-title i { font-size: 13px; color: var(--brand); }
.dash-section-body { padding: 4px 0 8px; }

/* ============================================================
   ROW
   ============================================================ */
.dash-row {
  display: flex; align-items: center; gap: 14px;
  padding: var(--space-row) 18px;
  cursor: pointer;
  transition: background .12s;
  border: 0; background: transparent;
  width: 100%; text-align: left;
  font-family: inherit; color: var(--text);
  font-size: 1rem;
}
.dash-row:hover { background: var(--hover); }
.dash-row:active { background: color-mix(in srgb, var(--brand) 6%, transparent); }
.dash-row-icon {
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--bg-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  color: var(--text-2);
  flex-shrink: 0;
  transition: transform .2s;
}
.dash-row:hover .dash-row-icon { transform: scale(1.08); }
.dash-row-icon.brand { background: var(--brand-light); color: var(--brand); }
.dash-row-icon.danger { background: rgba(220,38,38,0.1); color: var(--danger); }
.dash-row-icon.success { background: rgba(22,163,74,0.12); color: var(--success); }
.dash-row-icon.neutral { background: var(--bg-soft); color: var(--text-2); }
.dash-row-body { flex: 1; min-width: 0; }
.dash-row-title {
  font-size: 0.94rem; font-weight: 700;
  color: var(--text); line-height: 1.3;
}
.dash-row-sub {
  font-size: 0.8rem; color: var(--text-2);
  margin-top: 3px;
  line-height: 1.4;
  word-wrap: break-word;
}
.dash-row-sub.good { color: var(--success); }
.dash-row-sub.bad { color: var(--danger); }
.dash-row-chevron { color: var(--text-3); font-size: 12px; flex-shrink: 0; }
.dash-row.danger .dash-row-title { color: var(--danger); }
.dash-row.danger .dash-row-icon { background: rgba(220,38,38,0.1); color: var(--danger); }

/* ============================================================
   PUSH CARD
   ============================================================ */
.push-card {
  margin: 0 18px 14px;
  padding: 20px 18px;
  border-radius: var(--radius);
  background: linear-gradient(135deg,
    rgba(var(--brand-rgb), 0.10) 0%,
    rgba(var(--brand-rgb), 0.04) 100%);
  border: 1px solid rgba(var(--brand-rgb), 0.18);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.push-card-header { display: flex; align-items: flex-start; gap: 14px; }
.push-card-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--brand);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  box-shadow: 0 8px 20px rgba(var(--brand-rgb), 0.35);
}
.push-card-info { flex: 1; min-width: 0; }
.push-card-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
}
.push-card-text {
  font-size: 0.85rem;
  color: var(--text-2);
  line-height: 1.45;
}
.push-card-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 10px;
}
.push-card-status.granted { background: rgba(22,163,74,0.15); color: var(--success); }
.push-card-status.denied { background: rgba(220,38,38,0.15); color: var(--danger); }
.push-card-status.default { background: rgba(var(--brand-rgb), 0.15); color: var(--brand); }
.push-card-status.unsupported { background: var(--bg-soft); color: var(--text-3); }
.push-card-status::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor;
}
.push-card-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 20px;
  border: 0;
  border-radius: 100px;
  font-size: 0.94rem;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  background: var(--brand);
  color: #fff;
  box-shadow: 0 6px 18px rgba(var(--brand-rgb), 0.32);
  transition: transform .12s, opacity .15s, box-shadow .15s;
}
.push-card-btn:hover { opacity: .95; transform: translateY(-1px); }
.push-card-btn:active { transform: scale(.98); }
.push-card-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.push-card-btn.danger { background: transparent; color: var(--danger); border: 1.5px solid var(--danger); box-shadow: none; }

/* ============================================================
   TOGGLE
   ============================================================ */
.dash-toggle {
  position: relative;
  width: 46px; height: 26px;
  background: var(--border-2);
  border-radius: 100px;
  flex-shrink: 0;
  transition: background .25s;
  cursor: pointer;
  border: 0;
  padding: 0;
}
.dash-toggle::after {
  content: "";
  position: absolute;
  top: 3px; left: 3px;
  width: 20px; height: 20px;
  background: #fff;
  border-radius: 50%;
  transition: transform .25s cubic-bezier(.22,1,.36,1);
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.dash-toggle.on { background: var(--brand); }
.dash-toggle.on::after { transform: translateX(20px); }

/* ============================================================
   BADGE
   ============================================================ */
.dash-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; font-weight: 800;
  padding: 3px 8px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.dash-badge.good { background: rgba(22,163,74,0.12); color: var(--success); }
.dash-badge.bad { background: rgba(220,38,38,0.12); color: var(--danger); }
.dash-badge.neutral { background: var(--bg-soft); color: var(--text-2); }
.dash-badge.brand { background: var(--brand-light); color: var(--brand); }

/* ============================================================
   QUICK ACTIONS
   ============================================================ */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 0 16px 16px;
}
.quick-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  font-family: inherit;
  color: var(--text);
  transition: all .2s;
  text-decoration: none;
}
.quick-action:hover {
  border-color: rgba(var(--brand-rgb), 0.4);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.quick-action i {
  font-size: 20px;
  color: var(--brand);
  transition: transform .25s;
}
.quick-action:hover i { transform: scale(1.15); }
.quick-action span {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-2);
  text-align: center;
  letter-spacing: 0.01em;
}

/* ============================================================
   FOOTER
   ============================================================ */
.dash-footer {
  padding: 32px 20px 40px;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-3);
  line-height: 1.7;
}
.dash-footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 10px;
  font-weight: 800;
  color: var(--text-2);
  font-size: 0.85rem;
}
.dash-footer-brand i { color: var(--brand); font-size: 14px; }
.dash-footer a { color: var(--text-3); text-decoration: none; transition: color .15s; }
.dash-footer a:hover { color: var(--brand); }

/* ============================================================
   MODALS
   ============================================================ */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 200;
  align-items: flex-end; justify-content: center;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: overlayIn .2s ease;
}
@keyframes overlayIn { from { opacity: 0; } to { opacity: 1; } }
.modal-overlay.open { display: flex; }
.modal-box {
  background: var(--bg-elevated); width: 100%; max-width: 560px;
  max-height: 92vh;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: modalUp .3s cubic-bezier(.22,1,.36,1);
  border: 1px solid var(--border);
  border-bottom: 0;
}
@keyframes modalUp {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@media (min-width: 600px) {
  .modal-overlay { align-items: center; padding: 20px; }
  .modal-box { border-radius: var(--radius-lg); border-bottom: 1px solid var(--border); }
}
.modal-header {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.modal-header h2 {
  font-size: 1.05rem; font-weight: 800;
  flex: 1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.modal-close {
  width: 38px; height: 38px; border-radius: 50%;
  border: 0; background: transparent;
  font-size: 24px; line-height: 1;
  color: var(--text);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background .15s;
}
.modal-close:hover { background: var(--hover); }
.modal-action-btn {
  background: var(--brand); color: #fff;
  border: 0; padding: 9px 18px;
  border-radius: 100px;
  font-size: 0.88rem; font-weight: 800;
  cursor: pointer; font-family: inherit;
  flex-shrink: 0;
  transition: opacity .15s, transform .12s;
}
.modal-action-btn:hover { opacity: .92; }
.modal-action-btn:active { transform: scale(.97); }
.modal-body { padding: 20px; overflow-y: auto; flex: 1; }
.modal-footer { padding: 14px 20px 20px; border-top: 1px solid var(--border); }
.modal-hint { font-size: 0.85rem; color: var(--text-2); line-height: 1.55; margin-bottom: 16px; }

/* Fields */
.field { margin-bottom: 16px; }
.field label {
  display: block; font-size: 0.78rem; font-weight: 800;
  color: var(--text-2); margin-bottom: 7px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.field input, .field textarea, .field select {
  width: 100%;
  padding: 12px 15px;
  border: 1.5px solid var(--border-2);
  border-radius: 12px;
  font-size: 0.92rem; font-family: inherit;
  outline: none; color: var(--text); background: var(--bg);
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(var(--brand-rgb), 0.12);
}
.field input:disabled { background: var(--bg-soft); color: var(--text-2); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.password-input-wrap { position: relative; display: flex; align-items: center; }
.password-input-wrap input { padding-right: 48px; }
.toggle-password {
  position: absolute;
  right: 6px; top: 50%;
  transform: translateY(-50%);
  width: 38px; height: 38px; border-radius: 50%;
  background: transparent; border: 0;
  color: var(--text-3);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 15px;
  transition: color .15s, background .15s;
}
.toggle-password:hover { background: var(--brand-light); color: var(--brand); }

.username-input-wrap { position: relative; display: flex; align-items: center; }
.username-input-wrap .at-sign {
  position: absolute; left: 15px;
  font-size: 15px; font-weight: 800;
  color: var(--text-2); pointer-events: none;
}
.username-input-wrap input { padding-left: 34px; }
.username-availability {
  font-size: 0.8rem; margin-top: 7px;
  min-height: 17px; font-weight: 700;
}
.username-availability.available { color: var(--success); }
.username-availability.taken { color: var(--danger); }
.username-availability.checking { color: var(--text-3); }

.password-strength { margin-top: 10px; display: none; }
.password-strength.visible { display: block; }
.password-strength-bar {
  height: 5px; background: var(--border-2);
  border-radius: 5px; overflow: hidden; margin-bottom: 7px;
}
.password-strength-fill {
  height: 100%; width: 0%;
  background: var(--danger);
  border-radius: 5px;
  transition: width .35s, background .35s;
}
.password-strength-label { font-size: 0.75rem; font-weight: 700; color: var(--text-3); }
.password-strength[data-level="1"] .password-strength-fill { width: 25%; background: var(--danger); }
.password-strength[data-level="2"] .password-strength-fill { width: 50%; background: var(--warning); }
.password-strength[data-level="3"] .password-strength-fill { width: 75%; background: #eab308; }
.password-strength[data-level="4"] .password-strength-fill { width: 100%; background: var(--success); }

.form-msg {
  font-size: 0.84rem; font-weight: 700;
  padding: 11px 15px; border-radius: 12px;
  margin-bottom: 14px; display: none;
}
.form-msg.error { display: block; background: rgba(220,38,38,0.1); color: var(--danger); }
.form-msg.success { display: block; background: rgba(22,163,74,0.1); color: var(--success); }

.action-btn {
  border: 0; border-radius: 100px;
  padding: 13px 22px;
  font-size: 0.9rem; font-weight: 800;
  cursor: pointer; font-family: inherit;
  transition: opacity .15s, transform .12s, box-shadow .15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.action-btn:hover { opacity: .92; }
.action-btn:active { transform: scale(.98); }
.action-btn.primary { background: var(--brand); color: #fff; box-shadow: 0 6px 18px rgba(var(--brand-rgb), 0.28); }
.action-btn.secondary { background: var(--bg-soft); color: var(--text); }
.action-btn.danger { background: var(--danger); color: #fff; }
.action-btn.full { width: 100%; margin-top: 8px; }
.action-btn.full:first-child { margin-top: 0; }

/* ============================================================
   SESSIONS
   ============================================================ */
.session-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.session-item:last-child { border-bottom: 0; }
.session-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--bg-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; color: var(--text-2); flex-shrink: 0;
}
.session-body { flex: 1; min-width: 0; }
.session-title { font-size: 0.92rem; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.session-meta { font-size: 0.78rem; color: var(--text-2); margin-top: 3px; }
.session-btn {
  padding: 7px 14px; font-size: 0.78rem; font-weight: 800;
  background: transparent; border: 1px solid var(--border-2);
  color: var(--text); border-radius: 100px;
  cursor: pointer; font-family: inherit;
  transition: all .15s;
}
.session-btn:hover { background: var(--hover); }
.session-btn.danger { color: var(--danger); border-color: rgba(220,38,38,0.3); }
.session-btn.danger:hover { background: rgba(220,38,38,0.08); }

/* ============================================================
   THEME SWITCHER
   ============================================================ */
.theme-switcher {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.theme-option {
  background: var(--bg);
  border: 2px solid var(--border-2);
  border-radius: var(--radius);
  padding: 10px;
  cursor: pointer;
  font-family: inherit;
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: all .2s;
}
.theme-option:hover { border-color: rgba(var(--brand-rgb), 0.5); }
.theme-option.active {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(var(--brand-rgb), 0.12);
}
.theme-option span { font-size: 0.78rem; font-weight: 700; }
.theme-preview {
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: 8px;
  border: 1px solid var(--border);
  overflow: hidden;
  position: relative;
}
.theme-preview::before {
  content: '';
  position: absolute;
  top: 6px; left: 6px; right: 6px;
  height: 4px;
  border-radius: 2px;
  background: #ddd;
}
.theme-preview::after {
  content: '';
  position: absolute;
  top: 16px; left: 6px; bottom: 6px;
  width: 30%;
  border-radius: 4px;
  background: #eee;
}
.light-preview { background: #ffffff; }
.light-preview::before { background: #d4d4d8; }
.light-preview::after { background: #e5e7eb; }
.dark-preview { background: #0a0a0d; }
.dark-preview::before { background: #2f3336; }
.dark-preview::after { background: #16181c; }
.auto-preview {
  background: linear-gradient(135deg, #ffffff 50%, #0a0a0d 50%);
}

/* ============================================================
   ACCENT PICKER
   ============================================================ */
.accent-picker {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}
.accent-swatch {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--c);
  border: 3px solid transparent;
  cursor: pointer;
  position: relative;
  transition: transform .2s, border-color .2s;
  box-shadow: inset 0 0 0 2px var(--bg);
}
.accent-swatch:hover { transform: scale(1.1); }
.accent-swatch.active {
  border-color: var(--bg);
  box-shadow: 0 0 0 2px var(--c), inset 0 0 0 3px var(--bg);
}
.accent-swatch.active::after {
  content: '✓';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 900;
  font-size: 14px;
}

/* ============================================================
   FONT SIZE PICKER
   ============================================================ */
.fontsize-picker {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.fontsize-option {
  padding: 14px 8px;
  background: var(--bg);
  border: 2px solid var(--border-2);
  border-radius: 12px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 800;
  color: var(--text);
  transition: all .2s;
}
.fontsize-option:hover { border-color: rgba(var(--brand-rgb), 0.5); }
.fontsize-option.active {
  border-color: var(--brand);
  color: var(--brand);
  box-shadow: 0 0 0 4px rgba(var(--brand-rgb), 0.12);
}

/* ============================================================
   SOUND LIST
   ============================================================ */
.sound-list { display: flex; flex-direction: column; gap: 8px; }
.sound-option {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  background: var(--bg);
  border: 1.5px solid var(--border-2);
  border-radius: 12px;
  cursor: pointer;
  font-family: inherit;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 700;
  transition: all .2s;
}
.sound-option:hover { border-color: rgba(var(--brand-rgb), 0.5); }
.sound-option.active { border-color: var(--brand); background: rgba(var(--brand-rgb), 0.06); }
.sound-option > i:first-child { font-size: 18px; color: var(--brand); width: 24px; text-align: center; }
.sound-option > span { flex: 1; text-align: left; }
.sound-play { color: var(--text-3) !important; font-size: 13px !important; }

/* ============================================================
   LANG LIST
   ============================================================ */
.lang-list { display: flex; flex-direction: column; gap: 8px; }
.lang-option {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  background: var(--bg);
  border: 1.5px solid var(--border-2);
  border-radius: 12px;
  cursor: pointer;
  font-family: inherit;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 700;
  transition: all .2s;
}
.lang-option:hover { border-color: rgba(var(--brand-rgb), 0.5); }
.lang-option.active { border-color: var(--brand); background: rgba(var(--brand-rgb), 0.06); }
.lang-flag { font-size: 22px; }
.lang-option > span { flex: 1; text-align: left; }
.lang-check { color: var(--brand); opacity: 0; transition: opacity .2s; }
.lang-option.active .lang-check { opacity: 1; }

/* ============================================================
   SHORTCUTS
   ============================================================ */
.shortcut-list { display: flex; flex-direction: column; gap: 4px; }
.shortcut {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-2);
}
.shortcut:last-child { border-bottom: 0; }
.shortcut > span { flex: 1; color: var(--text); }
kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  padding: 0 8px;
  background: var(--bg-soft);
  border: 1px solid var(--border-2);
  border-bottom-width: 2px;
  border-radius: 6px;
  font-family: 'Montserrat', monospace;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text-2);
}

/* ============================================================
   DATA MODAL
   ============================================================ */
.data-actions { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; }
.storage-bar {
  padding: 16px;
  background: var(--bg-soft);
  border-radius: 12px;
}
.storage-bar-title {
  display: flex; justify-content: space-between;
  font-size: 0.78rem; font-weight: 800;
  color: var(--text-2);
  margin-bottom: 10px;
}
.storage-bar-track {
  height: 6px;
  background: var(--border-2);
  border-radius: 100px;
  overflow: hidden;
}
.storage-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand), color-mix(in srgb, var(--brand) 60%, #fff));
  border-radius: 100px;
  transition: width .5s;
}

/* ============================================================
   HELP LIST
   ============================================================ */
.help-list { display: flex; flex-direction: column; gap: 4px; }
.help-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 14px;
  background: transparent;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  font-family: inherit;
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  text-align: left;
  transition: background .15s;
  width: 100%;
}
.help-item:hover { background: var(--hover); }
.help-item > i:first-child {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--brand-light);
  color: var(--brand);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}
.help-item > div { flex: 1; min-width: 0; }
.help-item b { display: block; font-size: 0.9rem; font-weight: 700; margin-bottom: 2px; }
.help-item span { font-size: 0.76rem; color: var(--text-2); }
.help-item > i:last-child { color: var(--text-3); font-size: 11px; }

/* ============================================================
   FAB
   ============================================================ */
.dash-fab {
  position: fixed;
  bottom: 24px; right: 20px;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  border: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(var(--brand-rgb), 0.4);
  z-index: 150;
  transition: transform .3s cubic-bezier(.34,1.56,.64,1), box-shadow .2s;
}
.dash-fab:hover { transform: scale(1.08); box-shadow: 0 14px 40px rgba(var(--brand-rgb), 0.5); }
.dash-fab.open { transform: rotate(45deg) scale(1.02); }
.dash-fab i { transition: transform .3s; }

.fab-menu {
  position: fixed;
  bottom: 96px; right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 149;
  pointer-events: none;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .25s, transform .25s;
}
.fab-menu.open { opacity: 1; transform: translateY(0); pointer-events: auto; }
.fab-item {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transform: translateX(60px);
  opacity: 0;
  transition: transform .35s cubic-bezier(.22,1,.36,1), opacity .25s, border-color .15s, background .15s;
  white-space: nowrap;
}
.fab-menu.open .fab-item { transform: translateX(0); opacity: 1; }
.fab-menu.open .fab-item:nth-child(1) { transition-delay: 0.05s; }
.fab-menu.open .fab-item:nth-child(2) { transition-delay: 0.10s; }
.fab-menu.open .fab-item:nth-child(3) { transition-delay: 0.15s; }
.fab-menu.open .fab-item:nth-child(4) { transition-delay: 0.20s; }
.fab-item:hover { border-color: var(--brand); background: var(--brand-light); }
.fab-item i { color: var(--brand); font-size: 14px; }

/* ============================================================
   COMMAND PALETTE
   ============================================================ */
.command-palette {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 250;
  align-items: flex-start;
  justify-content: center;
  padding-top: 10vh;
  padding-left: 16px;
  padding-right: 16px;
}
.command-palette.open { display: flex; animation: overlayIn .15s; }
.cp-box {
  width: 100%; max-width: 560px;
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,0.4);
  animation: modalUp .3s cubic-bezier(.22,1,.36,1);
}
.cp-input-wrap {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.cp-input-wrap > i { color: var(--text-3); font-size: 16px; }
.cp-input-wrap input {
  flex: 1;
  border: 0; background: transparent;
  font-family: inherit;
  font-size: 1rem;
  color: var(--text);
  outline: none;
  padding: 4px 0;
}
.cp-input-wrap input::placeholder { color: var(--text-3); }
.cp-input-wrap kbd { font-size: 0.68rem; }
.cp-results {
  max-height: 50vh;
  overflow-y: auto;
  padding: 8px;
}
.cp-result {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  cursor: pointer;
  color: var(--text);
  font-size: 0.9rem;
  transition: background .12s;
}
.cp-result:hover,
.cp-result.active { background: var(--hover); }
.cp-result i { color: var(--brand); width: 18px; text-align: center; font-size: 14px; }
.cp-result .cp-label { flex: 1; font-weight: 600; }
.cp-result .cp-hint { font-size: 0.72rem; color: var(--text-3); font-weight: 600; }
.cp-empty { padding: 30px; text-align: center; color: var(--text-3); font-size: 0.85rem; }

/* ============================================================
   TOASTS
   ============================================================ */
.toast-container {
  position: fixed; top: 16px; left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  display: flex; flex-direction: column; gap: 8px;
  width: calc(100% - 32px); max-width: 380px;
  pointer-events: none;
}
.toast {
  padding: 14px 18px;
  border-radius: 14px;
  font-size: 0.86rem;
  font-weight: 700;
  color: #fff;
  box-shadow: 0 8px 28px rgba(0,0,0,0.22);
  pointer-events: auto;
  animation: toastIn .3s cubic-bezier(.22,1,.36,1);
  display: flex;
  align-items: center;
  gap: 10px;
}
.toast i { font-size: 16px; }
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.toast.info { background: #111827; }
html[data-theme="dark"] .toast.info { background: #f3f4f6; color: #111827; }
@keyframes toastIn {
  from { transform: translateY(-14px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ============================================================
   ERROR STATE
   ============================================================ */
.dash-error {
  text-align: center;
  padding: 80px 24px;
}
.dash-error-icon { font-size: 52px; margin-bottom: 16px; }
.dash-error-title {
  font-size: 1.1rem; font-weight: 800;
  margin-bottom: 6px;
  color: var(--text);
}
.dash-error-sub {
  color: var(--text-2);
  margin-bottom: 20px;
  font-size: 0.9rem;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 480px) {
  .dash-hero { padding: 18px 16px; gap: 14px; }
  .dash-hero-avatar { width: 72px; height: 72px; font-size: 26px; }
  .dash-hero-name { font-size: 1.1rem; }
  .dash-stats { gap: 8px; padding: 0 12px 12px; }
  .dash-stat { padding: 14px 8px; }
  .dash-stat-value { font-size: 1.2rem; }
  .dash-stat-label { font-size: 9.5px; }
  .dash-row { padding: var(--space-row) 14px; gap: 12px; }
  .dash-row-icon { width: 36px; height: 36px; font-size: 14px; }
  .push-card { padding: 16px 14px; margin: 0 14px 14px; }
  .heatmap-grid { grid-template-columns: repeat(13, 1fr); }
  .quick-actions { padding: 0 12px 12px; gap: 8px; }
  .quick-action { padding: 14px 6px; }
  .accent-picker { grid-template-columns: repeat(5, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
