/* XHUB ADMIN v5 — Monochrome Premium */

:root {
  --bg-deep: #080808;
  --bg: #0f0f0f;
  --bg-card: #ffffff;
  --bg-card-alt: #f7f7f7;
  --bg-hover: #efefef;
  --bg-input: #fafafa;
  --text: #0a0a0a;
  --text-body: #1c1c1c;
  --text-dim: #5c5c5c;
  --text-muted: #8a8a8a;
  --text-inv: #f5f5f5;
  --border: #e2e2e2;
  --border-dark: #2a2a2a;
  --accent: #0a0a0a;
  --accent-soft: #333333;
  --accent-inv: #ffffff;
  --success: #1a7f37;
  --warning: #9a6700;
  --danger: #cf222e;
  --sidebar-w: 268px;
  --radius: 10px;
  --shadow: 0 4px 24px rgba(0,0,0,0.12);
  --font: 'Inter', -apple-system, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', Monaco, monospace;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg-deep);
  color: var(--text-body);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.55;
}
.hidden { display: none !important; }

/* ── Arrière-plan stylé ── */
.app-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.app-bg__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, black 20%, transparent 75%);
}
.app-bg__glow {
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.15;
}
.app-bg__glow--1 { background: #fff; top: -200px; right: -100px; }
.app-bg__glow--2 { background: #666; bottom: -200px; left: -100px; opacity: 0.08; }

/* Loading */
.loading-screen {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-deep);
  transition: opacity 0.6s var(--ease), visibility 0.6s;
}
.loading-screen.done { opacity: 0; visibility: hidden; pointer-events: none; }
.loading-logo { font-size: 2.5rem; font-weight: 800; letter-spacing: 0.25em; color: #fff; margin-bottom: 24px; }
.loading-bar { width: 200px; height: 3px; background: #222; border-radius: 3px; margin: 0 auto 16px; overflow: hidden; }
.loading-bar-fill { height: 100%; width: 0; background: #fff; animation: loadBar 1.8s var(--ease) forwards; }
@keyframes loadBar { to { width: 100%; } }
.loading-credit { font-size: 11px; color: #555; letter-spacing: 0.15em; }

/* Login */
.login-screen {
  position: fixed; inset: 0; z-index: 500;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.login-card {
  position: relative; z-index: 2;
  width: 100%; max-width: 400px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 14px; padding: 40px 32px; box-shadow: var(--shadow);
}
.login-brand h1 { font-size: 28px; font-weight: 800; color: var(--text); text-align: center; }
.login-brand p { color: var(--text-dim); text-align: center; margin-top: 6px; }
.login-error { text-align: center; color: var(--danger); font-size: 13px; margin-top: 12px; padding: 10px; background: rgba(207,34,46,0.06); border-radius: var(--radius); }
.login-lockout { text-align: center; color: var(--warning); font-size: 13px; margin-top: 12px; }

/* Inputs */
.input-field, .input-select, .input-textarea {
  width: 100%; padding: 11px 14px; min-height: 44px;
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text);
  font-family: var(--font); font-size: 14px; margin-bottom: 12px;
  outline: none; transition: 0.2s var(--ease);
}
.input-textarea { min-height: 88px; resize: vertical; font-family: var(--font-mono); font-size: 12px; }
.input-field:focus, .input-select:focus, .input-textarea:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,0,0,0.06);
}
.input-field.input--valid { border-color: var(--success); }
.input-field.input--invalid { border-color: var(--danger); }
.field-hint { font-size: 12px; margin: -8px 0 12px; }
.field-hint--valid { color: var(--success); }
.field-hint--invalid { color: var(--danger); }
.strength-bar { height: 3px; background: var(--border); border-radius: 2px; margin: -6px 0 12px; overflow: hidden; }
.strength-bar-fill { height: 100%; width: 0; transition: width 0.3s, background 0.3s; }
.strength-bar-fill--weak { width: 33%; background: var(--danger); }
.strength-bar-fill--medium { width: 66%; background: var(--warning); }
.strength-bar-fill--strong { width: 100%; background: var(--success); }

/* Buttons */
.btn {
  font-family: var(--font); font-size: 13px; font-weight: 600;
  padding: 10px 18px; min-height: 42px; border: none;
  border-radius: var(--radius); cursor: pointer;
  transition: 0.2s var(--ease); display: inline-flex;
  align-items: center; justify-content: center; gap: 8px;
}
.btn-primary { background: var(--accent); color: var(--accent-inv); }
.btn-primary:hover { background: var(--accent-soft); transform: translateY(-1px); }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn-ghost { background: var(--bg-card); border: 1px solid var(--border); color: var(--text-dim); }
.btn-ghost:hover { background: var(--bg-hover); color: var(--text); border-color: #ccc; }
.btn-danger { background: #fff; color: var(--danger); border: 1px solid rgba(207,34,46,0.35); }
.btn-danger:hover { background: rgba(207,34,46,0.06); }
.btn-success { background: #fff; color: var(--success); border: 1px solid rgba(26,127,55,0.35); }
.btn-sm { padding: 6px 12px; min-height: 34px; font-size: 12px; }
.btn-icon { background: none; border: none; color: var(--text-dim); cursor: pointer; padding: 8px; border-radius: var(--radius); }
.btn-icon:hover { background: var(--bg-hover); color: var(--danger); }
.btn-link { background: none; border: none; color: var(--accent-soft); cursor: pointer; font-size: 12px; padding: 4px 8px; text-decoration: underline; }
.btn-block { width: 100%; }

/* Layout */
.app { position: relative; z-index: 1; display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); min-height: 100vh;
  position: fixed; left: 0; top: 0; z-index: 100;
  background: var(--bg-card); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 16px 12px;
  box-shadow: 4px 0 24px rgba(0,0,0,0.06);
}
.sidebar-brand {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 10px 20px; border-bottom: 1px solid var(--border); margin-bottom: 8px;
}
.sidebar-brand strong { font-size: 15px; font-weight: 700; }
.sidebar-brand small { color: var(--text-muted); font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; }
.brand-dot {
  width: 38px; height: 38px; border-radius: var(--radius);
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 800;
}
.nav-section { font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); padding: 14px 14px 4px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 10px 14px; background: none; border: none;
  border-radius: var(--radius); color: var(--text-dim);
  font-family: var(--font); font-size: 13px; font-weight: 500;
  cursor: pointer; transition: 0.2s; text-align: left; margin-bottom: 2px; position: relative;
}
.nav-item svg { width: 18px; height: 18px; fill: currentColor; flex-shrink: 0; }
.nav-item:hover { background: var(--bg-hover); color: var(--text); }
.nav-item.active { background: var(--accent); color: #fff; font-weight: 600; }
.nav-item.active::before { display: none; }
.nav-item.locked { opacity: 0.4; cursor: not-allowed; }
.nav-item.locked::after { content: '🔒'; font-size: 10px; margin-left: auto; }
.sidebar-footer {
  display: flex; align-items: center; gap: 10px;
  padding: 12px; margin-top: auto; background: var(--bg-card-alt); border-radius: var(--radius);
  border: 1px solid var(--border);
}
.admin-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; overflow: hidden; flex-shrink: 0;
}
.admin-avatar img { width: 100%; height: 100%; object-fit: cover; }
.sidebar-footer strong { display: block; font-size: 13px; }
.sidebar-footer small { color: var(--text-muted); font-size: 10px; }
.sidebar-toggle {
  display: none; position: absolute; top: 16px; right: -48px;
  background: #fff; border: 1px solid var(--border); padding: 8px 12px; border-radius: var(--radius); cursor: pointer;
}

.main {
  flex: 1; margin-left: var(--sidebar-w); padding: 24px 28px 52px;
  min-width: 0; position: relative; z-index: 1;
}
.main-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 24px; gap: 16px; flex-wrap: wrap;
}
.main-header h1 { font-size: 26px; font-weight: 800; color: #fff; letter-spacing: -0.02em; }
.page-subtitle { color: rgba(255,255,255,0.55); font-size: 14px; margin-top: 4px; }
.header-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.health-badge {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px; background: rgba(255,255,255,0.95);
  border: 1px solid var(--border); border-radius: 20px;
  font-size: 12px; font-weight: 600;
}
.health-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); }

.page { display: none; }
.page.active { display: block; animation: pageIn 0.35s var(--ease); }
@keyframes pageIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.access-denied {
  text-align: center; padding: 60px 24px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
}

.card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; padding: 22px; box-shadow: var(--shadow); margin-bottom: 16px;
}
.card h2, .card h3 { color: var(--text); margin-bottom: 14px; }
.card h2 { font-size: 18px; font-weight: 700; }
.card h3 { font-size: 15px; font-weight: 600; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-bottom: 16px; }

.stats-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px; margin-bottom: 22px;
}
.stat-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; padding: 18px 20px; box-shadow: var(--shadow);
}
.stat-label { display: block; font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; }
.stat-value { font-size: 30px; font-weight: 800; color: var(--text); line-height: 1; }
.stat-value--success { color: var(--success); }
.stat-value--danger { color: var(--danger); }

.perm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 8px; margin: 14px 0; }
.perm-item {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px;
  background: var(--bg-card-alt); border-radius: var(--radius); font-size: 12px; cursor: pointer;
}
.perm-item input { accent-color: var(--accent); }

.profile-card { max-width: 420px; }
.profile-header { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.profile-avatar-lg {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 700; overflow: hidden;
  border: 3px solid var(--border);
}
.profile-avatar-lg img { width: 100%; height: 100%; object-fit: cover; }
.profile-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.profile-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }

.page-toolbar { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; align-items: center; }
.search-input { flex: 1; min-width: 180px; max-width: 300px; margin-bottom: 0 !important; }
.toolbar-spacer { flex: 1; }
.bulk-bar {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: 12px;
}
.bulk-bar.hidden { display: none; }

.table-wrap { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; overflow-x: auto; box-shadow: var(--shadow); }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th {
  text-align: left; padding: 12px 14px; color: var(--text-dim);
  font-weight: 600; font-size: 10px; text-transform: uppercase;
  letter-spacing: 0.05em; border-bottom: 1px solid var(--border);
  background: var(--bg-card-alt); white-space: nowrap;
}
.data-table td { padding: 11px 14px; border-bottom: 1px solid var(--border); }
.data-table tr:hover td { background: #fafafa; }
.data-table tr.row-selected td { background: rgba(10,10,10,0.06) !important; }
.data-table tr.row-selectable { cursor: pointer; }
.key-cell { font-family: var(--font-mono); font-size: 12px; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mono { font-family: var(--font-mono); font-size: 12px; }
.empty-row { text-align: center; color: var(--text-muted); padding: 32px !important; }
.actions-cell { display: flex; gap: 4px; flex-wrap: wrap; }
.sortable { cursor: pointer; }
.sortable:hover { color: var(--text); }
.row-check { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }

.badge { display: inline-block; padding: 3px 9px; border-radius: 20px; font-size: 10px; font-weight: 700; text-transform: uppercase; }
.badge--active { background: #dafbe1; color: var(--success); }
.badge--expired { background: #ffebe9; color: var(--danger); }
.badge--trial { background: #f0f0f0; color: #333; }
.badge--premium { background: #f3e8ff; color: #6f42c1; }
.badge--lifetime { background: #fff8c5; color: #9a6700; }
.badge--pending { background: #fff8c5; color: #9a6700; }
.badge--disabled { background: #f0f0f0; color: #888; }

.logs-toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
.logs-list { display: flex; flex-direction: column; gap: 8px; }
.log-entry {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 16px; cursor: pointer;
}
.log-entry:hover { border-color: #bbb; }
.log-entry-header { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; flex-wrap: wrap; }
.log-time { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); }
.log-type { font-size: 10px; font-weight: 700; text-transform: uppercase; padding: 2px 8px; border-radius: 4px; background: #f0f0f0; }
.log-summary { font-size: 13px; }
.log-meta { font-size: 11px; color: var(--text-dim); margin-top: 4px; }
.logs-pagination { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 16px; }

.config-section label { display: block; font-size: 13px; color: var(--text-dim); margin-bottom: 6px; }
.config-meta { font-size: 12px; color: var(--text-muted); margin-top: 8px; line-height: 1.6; }
.toggle-row { display: flex !important; align-items: center; gap: 10px; margin-bottom: 10px; cursor: pointer; font-size: 14px !important; }
.toggle-row input { accent-color: var(--accent); width: 16px; height: 16px; }
.health-grid { display: grid; gap: 6px; }
.health-item { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); }
.health-item span:last-child { display: flex; align-items: center; gap: 0; font-weight: 500; }
.code-block {
  font-family: var(--font-mono); font-size: 11px;
  background: #0a0a0a; color: #e6e6e6;
  border-radius: var(--radius); padding: 14px; overflow-x: auto;
  white-space: pre-wrap; margin: 12px 0; line-height: 1.5;
}
.code-block--edit { min-height: 120px; width: 100%; resize: vertical; border: 1px solid var(--border-dark); }

.portal-preview {
  border: 1px dashed var(--border); border-radius: 12px;
  padding: 20px; background: #0a0a0a; color: #fff; margin-top: 12px;
}
.portal-preview h4 { font-size: 14px; margin-bottom: 12px; color: #fff; }
.portal-loot-card {
  background: #161616; border: 1px solid #333; border-radius: 10px;
  padding: 20px; max-width: 360px;
}
.portal-loot-card h5 { font-size: 16px; margin-bottom: 8px; }
.portal-loot-card p { font-size: 13px; color: #aaa; margin-bottom: 14px; }
.portal-loot-btn {
  display: inline-block; padding: 10px 20px;
  background: #fff; color: #0a0a0a; border-radius: 8px;
  font-weight: 700; font-size: 13px; text-decoration: none;
}

.key-detail-panel {
  position: fixed; right: 0; top: 0; bottom: 0; width: 380px; max-width: 100%;
  background: var(--bg-card); border-left: 1px solid var(--border);
  box-shadow: -8px 0 32px rgba(0,0,0,0.15); z-index: 200;
  padding: 24px; overflow-y: auto; transform: translateX(100%);
  transition: transform 0.3s var(--ease);
}
.key-detail-panel.open { transform: translateX(0); }
.key-detail-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

/* Chat */
.chat-wrap {
  display: flex; flex-direction: column; height: calc(100vh - 200px);
  min-height: 400px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
  box-shadow: var(--shadow);
}
.chat-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.chat-msg { max-width: 75%; padding: 10px 14px; border-radius: 12px; font-size: 13px; }
.chat-msg--own { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
.chat-msg--other { align-self: flex-start; background: var(--bg-card-alt); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.chat-msg-meta { font-size: 10px; opacity: 0.7; margin-bottom: 4px; }
.chat-input-row { display: flex; gap: 10px; padding: 14px; border-top: 1px solid var(--border); background: var(--bg-card-alt); }
.chat-input-row .input-field { margin: 0; flex: 1; }

.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.55);
  display: flex; align-items: center; justify-content: center;
  z-index: 300; padding: 24px;
}
.modal { width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto;
  background: var(--bg-card); border-radius: 12px; padding: 24px; box-shadow: var(--shadow); }
.modal h3 { font-size: 18px; margin-bottom: 14px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }

.toast {
  position: fixed; bottom: 36px; right: 24px; padding: 12px 20px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); font-size: 14px; z-index: 400;
  box-shadow: var(--shadow); max-width: 360px;
}
.toast--success { border-color: var(--success); color: var(--success); }
.toast--error { border-color: var(--danger); color: var(--danger); }

.ctx-menu {
  position: fixed; z-index: 400; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); min-width: 160px; padding: 4px 0;
}
.ctx-menu button {
  display: block; width: 100%; text-align: left; padding: 8px 14px;
  background: none; border: none; font-size: 13px; cursor: pointer;
}
.ctx-menu button:hover { background: var(--bg-hover); }
.ctx-menu button.danger { color: var(--danger); }

.admin-list-item { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--border); }
.text-muted { color: var(--text-dim); font-size: 13px; }

/* Dashboard & Profile — layout fluide */
.status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--success); margin-right: 8px; vertical-align: middle; }
.status-dot--off { background: var(--text-muted); }
.status-dot--warn { background: var(--warning); }
.status-dot--err { background: var(--danger); }

.dash { display: flex; flex-direction: column; gap: 28px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; padding: 32px 36px; }
.dash-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.dash-eyebrow, .prof-eyebrow { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 8px; }
.dash-title { font-size: 2rem; font-weight: 800; letter-spacing: -0.02em; color: var(--text); line-height: 1.1; }
.dash-meta, .prof-id-line { color: var(--text-dim); font-size: 13px; margin-top: 6px; }
.dash-status { font-size: 12px; font-weight: 600; color: var(--text-dim); white-space: nowrap; }

.dash-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.dash-metric { padding: 22px 20px; border-right: 1px solid var(--border); }
.dash-metric:last-child { border-right: none; }
.dash-metric-val { display: block; font-size: 2rem; font-weight: 800; letter-spacing: -0.03em; color: var(--text); line-height: 1; }
.dash-metric-val--accent { color: var(--success); }
.dash-metric-lbl { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); margin-top: 8px; }
.dash-metric-sub { display: block; font-size: 12px; color: var(--text-dim); margin-top: 4px; }

.dash-body { display: grid; grid-template-columns: 1fr 280px; gap: 40px; align-items: start; }
.dash-section-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 16px; }
.dash-section-head h3, .prof-col h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); font-weight: 600; }
.dash-link { background: none; border: none; padding: 0; font: inherit; font-size: 13px; color: var(--text); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.dash-link:hover { color: var(--text-dim); }

.dash-timeline { display: flex; flex-direction: column; }
.dash-timeline-item { display: grid; grid-template-columns: 72px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.dash-timeline-item:last-child { border-bottom: none; }
.dash-timeline-time { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); padding-top: 2px; }
.dash-timeline-type { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-dim); margin-bottom: 4px; }
.dash-timeline-text { font-size: 13px; color: var(--text-body); line-height: 1.45; }

.dash-aside { display: flex; flex-direction: column; gap: 28px; }
.dash-aside-block h4 { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); margin-bottom: 12px; font-weight: 600; }
.dash-lines { display: flex; flex-direction: column; }
.dash-line { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.dash-line:last-child { border-bottom: none; }
.dash-line span:last-child { color: var(--text-dim); font-weight: 500; }
.dash-nav { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }

/* Profile */
.prof { display: flex; flex-direction: column; gap: 28px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; padding: 32px 36px; }
.prof-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; flex-wrap: wrap; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.prof-id-block { display: flex; gap: 20px; align-items: center; }
.prof-id-block .profile-avatar-lg { width: 72px; height: 72px; font-size: 1.6rem; flex-shrink: 0; }
.prof-id-block h2 { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; }
.prof-tags { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.prof-tag { font-size: 11px; font-weight: 600; padding: 4px 10px; border: 1px solid var(--border); border-radius: 4px; color: var(--text-dim); }
.prof-tag--live { border-color: var(--success); color: var(--success); }
.prof-top-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.prof-metrics { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.prof-metric { padding: 20px; border-right: 1px solid var(--border); text-align: left; }
.prof-metric:last-child { border-right: none; }
.prof-metric span { display: block; font-size: 1.75rem; font-weight: 800; letter-spacing: -0.02em; }
.prof-metric small { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; }

.prof-body { display: grid; grid-template-columns: 1fr 1fr; gap: 32px 40px; }
.prof-col--wide { grid-column: 1 / -1; }
.prof-dl { display: flex; flex-direction: column; }
.prof-dl > div { display: grid; grid-template-columns: 140px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.prof-dl > div:last-child { border-bottom: none; }
.prof-dl dt { color: var(--text-muted); font-weight: 500; }
.prof-dl dd { color: var(--text); font-weight: 600; text-align: right; }
.prof-perms { display: flex; flex-wrap: wrap; gap: 6px; }
.prof-perm { font-size: 11px; padding: 5px 10px; border: 1px solid var(--border); border-radius: 4px; color: var(--text-muted); }
.prof-perm--on { background: var(--accent); border-color: var(--accent); color: #fff; }

.site-footer {
  position: fixed; bottom: 0; left: var(--sidebar-w); right: 0;
  height: 28px; display: flex; align-items: center; justify-content: center;
  font-size: 10px; color: rgba(255,255,255,0.35); pointer-events: none;
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-toggle { display: block; }
  .main { margin-left: 0; padding: 16px 16px 48px; padding-top: 52px; }
  .site-footer { left: 0; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .dash-metrics, .prof-metrics { grid-template-columns: 1fr 1fr; }
  .dash-metric:nth-child(2n), .prof-metric:nth-child(2n) { border-right: none; }
  .dash, .prof { padding: 20px 16px; }
  .dash-body, .prof-body { grid-template-columns: 1fr; }
  .prof-top { flex-direction: column; }
  .prof-dl > div { grid-template-columns: 1fr; gap: 4px; }
  .prof-dl dd { text-align: left; }
}
