/* ══════════════════════════════════════════════════════════════
   LYAMORS DJ — app.css v4.0  |  Neutral Dark Professional
   Inter — https://fonts.google.com/specimen/Inter
   ══════════════════════════════════════════════════════════════ */
:root {
  /* Backgrounds — neutral, not blue-tinted */
  --bg:         #0a0a0a;
  --bg-2:       #111111;
  --bg-3:       #1c1c1c;
  --bg-card:    #161616;
  --bg-card-hover: #1e1e1e;

  /* Borders */
  --border:       rgba(255,255,255,0.08);
  --border-hover: rgba(255,255,255,0.15);

  /* Accent — indigo */
  --violet:       #4f46e5;
  --violet-light: #818cf8;
  --violet-mid:   #4338ca;
  --violet-dark:  #3730a3;
  --violet-glow:  rgba(79,70,229,0.14);

  /* Text — only white/neutral grays */
  --text:       #f4f4f4;
  --text-muted: #888888;
  --text-dim:   #4a4a4a;
  --white:      #ffffff;

  /* Semantic */
  --success:    #22c55e;
  --success-bg: rgba(34,197,94,0.08);
  --warning:    #f59e0b;
  --warning-bg: rgba(245,158,11,0.08);
  --error:      #ef4444;
  --error-bg:   rgba(239,68,68,0.08);
  --info:       #3b82f6;
  --info-bg:    rgba(59,130,246,0.08);

  /* Layout */
  --sidebar-w: 256px;
  --topbar-h:  56px;
  --radius:    10px;
  --radius-sm: 7px;
  --radius-lg: 16px;

  /* Shadows — minimal */
  --shadow:       0 4px 24px rgba(0,0,0,0.5);
  --shadow-card:  0 1px 8px rgba(0,0,0,0.3);
  --shadow-hover: 0 4px 20px rgba(0,0,0,0.45);

  --transition: 0.15s ease;
  --font-display: 'Inter', sans-serif;
  --font-body:    'Inter', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv02','cv03','cv04','cv11';
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
input, textarea, select { font-family: inherit; }

/* Scrollbars */
* { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.1) transparent; }
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.22); }

/* ── Layout ───────────────────────────────────────────────────── */
.layout { display: flex; min-height: 100vh; }

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

.sidebar__logo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.sidebar__brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.sidebar__brand-text { display: flex; flex-direction: column; }
.sidebar__brand-name { font-family: var(--font-display); font-weight: 700; font-size: 0.88rem; color: var(--white); letter-spacing: -0.01em; line-height: 1.2; }
.sidebar__brand-sub { font-size: 0.62rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.1em; margin-top: 2px; }
.sidebar__toggle { color: var(--text-dim); padding: 6px; border-radius: 6px; display: none; transition: color var(--transition), background var(--transition); }
.sidebar__toggle:hover { background: var(--bg-3); color: var(--text); }

.sidebar__nav { flex: 1; overflow-y: auto; padding: 14px 10px; }
.sidebar__section-label {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  padding: 0 10px 6px;
  margin-top: 8px;
  margin-bottom: 2px;
}
.sidebar__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.855rem;
  font-weight: 500;
  transition: all var(--transition);
  position: relative;
  margin-bottom: 1px;
}
.sidebar__link svg { flex-shrink: 0; opacity: 0.6; transition: opacity var(--transition); }
.sidebar__link:hover { background: var(--bg-3); color: var(--text); }
.sidebar__link:hover svg { opacity: 1; }
.sidebar__link--active {
  background: var(--bg-3);
  color: var(--white) !important;
  border-left: 2px solid var(--violet);
  padding-left: 10px;
}
.sidebar__link--active svg { opacity: 1; color: var(--white); }

.sidebar__badge {
  margin-left: auto;
  background: var(--violet);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  min-width: 20px;
  text-align: center;
}

.sidebar__user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.sidebar__avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--violet), var(--violet-dark));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.75rem; color: white;
  flex-shrink: 0; position: relative; overflow: visible;
}
.sidebar__avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.sidebar__certified {
  position: absolute; bottom: -2px; right: -2px;
  width: 13px; height: 13px;
  background: var(--success);
  border-radius: 50%;
  border: 2px solid var(--bg-2);
  display: flex; align-items: center; justify-content: center;
}
.sidebar__certified svg { width: 7px; height: 7px; color: white; }
.sidebar__user-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sidebar__user-name { font-size: 0.8rem; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar__user-role { font-size: 0.68rem; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar__logout { color: var(--text-dim); padding: 6px; border-radius: 6px; transition: all var(--transition); flex-shrink: 0; }
.sidebar__logout:hover { background: var(--error-bg); color: var(--error); }

/* ── Main content ─────────────────────────────────────────────── */
.main-content { margin-left: var(--sidebar-w); flex: 1; min-height: 100vh; display: flex; flex-direction: column; }
.page-content { padding: 32px 36px; flex: 1; max-width: 1400px; width: 100%; }

.topbar {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  height: var(--topbar-h);
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar__logo { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 700; font-size: 0.9rem; }
.topbar__menu, .topbar__notif {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  border-radius: 7px;
  color: var(--text-muted);
  transition: all var(--transition);
}
.topbar__menu:hover, .topbar__notif:hover { background: var(--bg-3); color: var(--text); }

.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 90; }

/* ── Page header ──────────────────────────────────────────────── */
.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.page-header__kicker {
  font-size: 0.66rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.page-header__title { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; color: var(--white); letter-spacing: -0.02em; line-height: 1.2; }
.page-header__sub { font-size: 0.855rem; color: var(--text-muted); margin-top: 5px; }
.page-header__actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; flex-wrap: wrap; margin-top: 4px; }

/* ── Cards ────────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color var(--transition);
}
.card:hover { border-color: rgba(255,255,255,0.10); }
.card--hover:hover { box-shadow: var(--shadow-hover); transform: translateY(-1px); }
.card--violet {
  background: var(--bg-card);
  border-color: rgba(79,70,229,0.2);
}
.card__title { font-family: var(--font-display); font-weight: 600; font-size: 0.92rem; color: var(--white); margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }

/* ── Stats ────────────────────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin-bottom: 28px; }
.stat-card { display: flex; align-items: center; gap: 14px; }
.stat-card__icon {
  width: 42px; height: 42px;
  border-radius: 9px;
  background: var(--bg-3);
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
  flex-shrink: 0;
  border: 1px solid var(--border);
}
.stat-card__value { font-family: var(--font-display); font-size: 1.45rem; font-weight: 700; color: var(--white); line-height: 1; }
.stat-card__label { font-size: 0.72rem; color: var(--text-muted); margin-top: 3px; text-transform: uppercase; letter-spacing: 0.06em; }
.stat-card__trend { font-size: 0.72rem; font-weight: 600; margin-top: 3px; }
.stat-card__trend--up { color: var(--success); }
.stat-card__trend--down { color: var(--error); }

/* ── Grids ────────────────────────────────────────────────────── */
.grid { display: grid; gap: 20px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--auto { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.grid--main { grid-template-columns: 1fr 300px; }

/* ── Buttons ──────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.855rem;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}
.btn--primary {
  background: var(--violet);
  color: white;
}
.btn--primary:hover {
  background: var(--violet-mid);
  transform: translateY(-1px);
}
.btn--secondary { background: var(--bg-3); color: var(--text); border: 1px solid var(--border); }
.btn--secondary:hover { background: var(--bg-card-hover); border-color: var(--border-hover); }
.btn--ghost { color: var(--text-muted); }
.btn--ghost:hover { background: var(--bg-3); color: var(--text); }
.btn--danger { background: var(--error-bg); color: var(--error); border: 1px solid rgba(239,68,68,0.15); }
.btn--danger:hover { background: var(--error); color: white; }
.btn--success { background: var(--success); color: white; }
.btn--success:hover { filter: brightness(1.08); }
.btn--sm { padding: 5px 11px; font-size: 0.78rem; }
.btn--lg { padding: 11px 24px; font-size: 0.95rem; }
.btn--full { width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; pointer-events: none; }
.btn--icon { padding: 7px; width: 34px; height: 34px; justify-content: center; border-radius: 7px; }

/* ── Forms ────────────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 0.77rem; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.07em; }
.form-control {
  width: 100%;
  padding: 9px 13px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.88rem;
  font-family: var(--font-body);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  -webkit-appearance: none;
  min-height: 40px;
}
.form-control:focus { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(79,70,229,0.12); }
.form-control::placeholder { color: var(--text-dim); }
textarea.form-control { resize: vertical; min-height: 100px; }
.form-hint { font-size: 0.73rem; color: var(--text-dim); margin-top: 4px; }
.form-error { font-size: 0.75rem; color: var(--error); margin-top: 4px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }

/* Input with icon — both class names supported */
.input-wrap,
.form-control-icon { position: relative; }
.input-wrap svg,
.form-control-icon svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-dim); pointer-events: none; z-index: 1; }
.input-wrap .form-control,
.form-control-icon .form-control { padding-left: 38px; }

/* ── Badges ───────────────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 20px; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; white-space: nowrap; }
.badge--violet { background: var(--violet-glow); color: var(--violet-light); border: 1px solid rgba(79,70,229,0.2); }
.badge--success { background: var(--success-bg); color: var(--success); }
.badge--warning { background: var(--warning-bg); color: var(--warning); }
.badge--error { background: var(--error-bg); color: var(--error); }
.badge--info { background: var(--info-bg); color: var(--info); }
.badge--muted { background: rgba(255,255,255,0.05); color: var(--text-muted); }

/* ── Tables ───────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; }
thead { background: var(--bg-3); }
th { padding: 11px 14px; text-align: left; font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-dim); white-space: nowrap; }
td { padding: 12px 14px; font-size: 0.855rem; color: var(--text); border-top: 1px solid var(--border); vertical-align: middle; }
tr:hover td { background: rgba(255,255,255,0.02); }
.td-actions { display: flex; gap: 6px; align-items: center; }

/* ── Flash messages ───────────────────────────────────────────── */
.flash { display: flex; align-items: center; gap: 12px; padding: 11px 16px; margin: 16px 36px 0; border-radius: var(--radius-sm); font-size: 0.855rem; font-weight: 500; animation: slideDown 0.25s ease; }
.flash--success { background: var(--success-bg); color: var(--success); border: 1px solid rgba(34,197,94,0.18); }
.flash--error { background: var(--error-bg); color: var(--error); border: 1px solid rgba(239,68,68,0.18); }
.flash--info { background: var(--info-bg); color: var(--info); border: 1px solid rgba(59,130,246,0.18); }
.flash--warning { background: var(--warning-bg); color: var(--warning); border: 1px solid rgba(245,158,11,0.18); }
.flash__close { margin-left: auto; opacity: 0.6; transition: opacity var(--transition); }
.flash__close:hover { opacity: 1; }
@keyframes slideDown { from { transform: translateY(-6px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ── Auth ─────────────────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 24px;
}
.auth-box { width: 100%; max-width: 420px; }
.auth-logo { text-align: center; margin-bottom: 24px; }
.auth-logo__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px; height: 58px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-bottom: 12px;
  overflow: hidden;
}
.auth-logo__icon img { width: 100%; height: 100%; object-fit: contain; }
.auth-logo__name { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; color: var(--white); letter-spacing: -0.02em; }
.auth-logo__sub { font-size: 0.76rem; color: var(--text-dim); margin-top: 3px; }
.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  box-shadow: var(--shadow);
}
.auth-title { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; color: var(--white); margin-bottom: 6px; }
.auth-sub { font-size: 0.845rem; color: var(--text-muted); margin-bottom: 22px; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 18px 0; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.auth-divider span { font-size: 0.71rem; color: var(--text-dim); white-space: nowrap; }
.oauth-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin-bottom: 6px; }
.oauth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.77rem;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition);
}
.oauth-btn:hover { border-color: var(--border-hover); background: var(--bg-card-hover); }
.oauth-btn svg, .oauth-btn img { width: 17px; height: 17px; flex-shrink: 0; }

/* ── PIN ──────────────────────────────────────────────────────── */
.pin-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--bg); padding: 24px; }
.pin-box { width: 100%; max-width: 360px; text-align: center; }
.pin-inputs { display: flex; gap: 12px; justify-content: center; margin: 24px 0; }
.pin-input {
  width: 52px; height: 60px;
  text-align: center;
  font-size: 1.45rem;
  font-weight: 700;
  font-family: var(--font-display);
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--white);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  caret-color: var(--violet);
}
.pin-input:focus { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(79,70,229,0.12); }

/* ── Carte membre ─────────────────────────────────────────────── */
.membre-card-wrap { display: flex; flex-direction: column; align-items: center; gap: 24px; }
.membre-card-svg-wrap {
  width: 100%; max-width: 520px;
  filter: drop-shadow(0 16px 40px rgba(0,0,0,0.5));
  transition: filter var(--transition), transform var(--transition);
}
.membre-card-svg-wrap:hover { filter: drop-shadow(0 20px 56px rgba(0,0,0,0.65)); transform: translateY(-3px); }

/* ── Cotisation ───────────────────────────────────────────────── */
.cotisation-status { display: flex; align-items: center; gap: 12px; padding: 13px 18px; border-radius: var(--radius-sm); margin-bottom: 22px; }
.cotisation-status--active { background: var(--success-bg); border: 1px solid rgba(34,197,94,0.18); color: var(--success); }
.cotisation-status--expired { background: var(--error-bg); border: 1px solid rgba(239,68,68,0.18); color: var(--error); }
.cotisation-status--pending { background: var(--warning-bg); border: 1px solid rgba(245,158,11,0.18); color: var(--warning); }
.pdf-preview-wrap { width: 100%; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: #fff; }
.pdf-preview-wrap iframe { width: 100%; height: 600px; border: none; display: block; }

/* ── Messagerie ───────────────────────────────────────────────── */
.messaging-layout { display: grid; grid-template-columns: 280px 1fr; gap: 20px; height: calc(100vh - 160px); min-height: 500px; }
.conv-list { overflow-y: auto; }
.conv-item { display: flex; gap: 12px; padding: 12px; border-radius: var(--radius-sm); cursor: pointer; transition: background var(--transition); border-bottom: 1px solid var(--border); }
.conv-item:hover { background: var(--bg-3); }
.conv-item--active { background: var(--bg-3); border-left: 2px solid var(--violet); }
.conv-item--unread .conv-item__name { color: var(--white); font-weight: 700; }
.conv-item__avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--violet), var(--violet-dark)); display: flex; align-items: center; justify-content: center; font-size: 0.78rem; font-weight: 700; color: white; flex-shrink: 0; }
.conv-item__name { font-size: 0.855rem; font-weight: 600; color: var(--text); }
.conv-item__preview { font-size: 0.76rem; color: var(--text-dim); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-item__time { font-size: 0.68rem; color: var(--text-dim); margin-left: auto; white-space: nowrap; }
.chat-area { display: flex; flex-direction: column; }
.chat-messages { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.msg { display: flex; gap: 10px; align-items: flex-end; max-width: 75%; }
.msg--out { align-self: flex-end; flex-direction: row-reverse; }
.msg__bubble { padding: 9px 13px; border-radius: 14px; font-size: 0.855rem; line-height: 1.5; color: var(--text); background: var(--bg-3); border: 1px solid var(--border); }
.msg--out .msg__bubble { background: var(--violet); border-color: transparent; color: white; }
.msg__time { font-size: 0.66rem; color: var(--text-dim); margin-bottom: 4px; white-space: nowrap; }
.chat-input { display: flex; gap: 10px; padding: 14px; border-top: 1px solid var(--border); }
.chat-input textarea { flex: 1; resize: none; min-height: 42px; max-height: 120px; }

/* ── Bibliothèque ─────────────────────────────────────────────── */
.track-card { display: flex; align-items: center; gap: 16px; padding: 14px; transition: border-color var(--transition); flex-wrap: wrap; }
.track-cover { width: 60px; height: 60px; border-radius: 8px; object-fit: cover; border: 1px solid var(--border); flex-shrink: 0; background: var(--bg-3); display: flex; align-items: center; justify-content: center; color: var(--text-muted); }
.track-info { flex: 1; min-width: 200px; }
.track-title { font-weight: 600; color: var(--white); margin-bottom: 4px; }
.track-artist { font-size: 0.83rem; color: var(--text-muted); }
.track-tags { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.track-player { flex: 1; min-width: 240px; }
.track-player audio { width: 100%; accent-color: var(--violet); }

/* ── Admin ────────────────────────────────────────────────────── */
.admin-topstrip {
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  padding: 8px 36px;
  font-size: 0.7rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

/* ── Empty state ──────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 48px 24px; color: var(--text-muted); }
.empty-state__icon {
  width: 52px; height: 52px;
  margin: 0 auto 14px;
  background: var(--bg-3);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-dim);
  border: 1px solid var(--border);
}
.empty-state__title { font-family: var(--font-display); font-weight: 600; color: var(--text); margin-bottom: 6px; }
.empty-state__sub { font-size: 0.845rem; color: var(--text-muted); }

/* ── Modals ───────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}
.modal-overlay.is-open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-lg);
  padding: 24px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.96) translateY(10px);
  transition: transform 0.2s ease;
  box-shadow: var(--shadow);
}
.modal-overlay.is-open .modal { transform: scale(1) translateY(0); }
.modal__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.modal__title { font-family: var(--font-display); font-weight: 600; font-size: 0.95rem; color: var(--white); }

/* ── Divider ──────────────────────────────────────────────────── */
.divider { height: 1px; background: var(--border); margin: 20px 0; }

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.is-open { transform: translateX(0); }
  .sidebar__toggle { display: flex; }
  .sidebar-overlay.is-open { display: block; }
  .main-content { margin-left: 0; }
  .topbar { display: flex; }
  .page-content { padding: 20px 16px; }
  .grid--main, .grid--2, .grid--3 { grid-template-columns: 1fr; }
  .messaging-layout { grid-template-columns: 1fr; height: auto; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .flash { margin: 12px 16px 0; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .oauth-grid { grid-template-columns: 1fr 1fr; }
  .auth-card { padding: 22px 18px; }
  .pin-input { width: 44px; height: 54px; font-size: 1.25rem; }
}

/* ── Animations ───────────────────────────────────────────────── */
.fade-in { animation: fadeIn 0.35s ease forwards; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.stagger > * { animation: fadeIn 0.35s ease forwards; opacity: 0; }
.stagger > *:nth-child(1) { animation-delay: 0.04s; }
.stagger > *:nth-child(2) { animation-delay: 0.08s; }
.stagger > *:nth-child(3) { animation-delay: 0.12s; }
.stagger > *:nth-child(4) { animation-delay: 0.16s; }
.stagger > *:nth-child(5) { animation-delay: 0.20s; }
.stagger > *:nth-child(6) { animation-delay: 0.24s; }
