:root {
  --bg: #0f1117;
  --bg2: #161b27;
  --bg3: #1e2535;
  --bg4: #252d3d;
  --border: #2a3347;
  --text: #e8eaf0;
  --text2: #8892a4;
  --text3: #525f74;
  --accent: #4f79f6;
  --accent-hover: #3d67e8;
  --accent-glow: rgba(79,121,246,0.18);
  --green: #22c98a;
  --green-bg: rgba(34,201,138,0.12);
  --red: #f04f5a;
  --red-bg: rgba(240,79,90,0.12);
  --yellow: #f5a623;
  --yellow-bg: rgba(245,166,35,0.12);
  --purple: #9c7fe8;
  --purple-bg: rgba(156,127,232,0.12);
  --shadow: 0 2px 16px rgba(0,0,0,0.32);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.4);
  --radius: 14px;
  --radius-sm: 8px;
  --sidebar-w: 272px;
  --topbar-h: 60px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --transition: 0.22s cubic-bezier(0.4,0,0.2,1);
}
[data-theme="light"] {
  --bg: #f4f6fb;
  --bg2: #ffffff;
  --bg3: #f0f2f8;
  --bg4: #e8ecf5;
  --border: #dde2ef;
  --text: #1a2033;
  --text2: #4a5568;
  --text3: #a0aab8;
  --shadow: 0 2px 12px rgba(30,40,80,0.08);
  --shadow-lg: 0 8px 28px rgba(30,40,80,0.12);
  --accent-glow: rgba(79,121,246,0.10);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* ─── OVERLAY ─── */
.overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.55);
  z-index: 199; opacity: 0; pointer-events: none;
  transition: opacity var(--transition);
  backdrop-filter: blur(3px);
}
.overlay.active { opacity: 1; pointer-events: all; }

/* ─── SIDEBAR ─── */
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--bg2);
  border-right: 1px solid var(--border);
  z-index: 200;
  transform: translateX(-100%);
  transition: transform var(--transition);
  display: flex; flex-direction: column;
  will-change: transform;
}
.sidebar.open { transform: translateX(0); }

.sidebar-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 16px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.sidebar-brand {
  display: flex; align-items: center; gap: 10px;
}
.brand-icon-wrap {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  flex-shrink: 0;
}
.brand-name {
  font-weight: 800; font-size: 17px; color: var(--text);
  letter-spacing: -0.3px;
}
.sidebar-close-btn {
  width: 30px; height: 30px;
  border: none; background: var(--bg3);
  border-radius: 8px; color: var(--text2);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background var(--transition), color var(--transition);
}
.sidebar-close-btn:hover { background: var(--border); color: var(--text); }

.sidebar-user {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.user-avatar {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px; color: #fff;
  flex-shrink: 0;
}
.user-info { min-width: 0; }
.user-name { font-weight: 600; font-size: 14px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.role-badge {
  display: inline-block; font-size: 11px; font-weight: 600;
  padding: 1px 8px; border-radius: 20px;
  text-transform: uppercase; letter-spacing: 0.4px;
}
.role-admin { background: var(--accent-glow); color: var(--accent); }
.role-user  { background: var(--green-bg); color: var(--green); }

.sidebar-scroll {
  flex: 1; overflow-y: auto; display: flex; flex-direction: column;
  scrollbar-width: none;
}
.sidebar-scroll::-webkit-scrollbar { display: none; }

.sidebar-nav { padding: 10px 10px 0; flex: 1; }
.nav-section-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.8px; color: var(--text3);
  padding: 14px 8px 4px;
}
.nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: var(--radius-sm);
  color: var(--text2); font-size: 14px; font-weight: 500;
  transition: background var(--transition), color var(--transition);
  position: relative; text-decoration: none;
}
.nav-link:hover { background: var(--bg3); color: var(--text); text-decoration: none; }
.nav-link.active {
  background: var(--accent-glow); color: var(--accent);
}
.nav-link.active .icon { color: var(--accent); }
.nav-link svg { flex-shrink: 0; }
.nav-count {
  margin-left: auto; background: var(--accent);
  color: #fff; font-size: 11px; font-weight: 700;
  padding: 1px 7px; border-radius: 20px;
}
.nav-logout { color: var(--red) !important; }
.nav-logout:hover { background: var(--red-bg) !important; }

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

/* ─── APP LAYOUT ─── */
.app-layout { min-height: 100vh; display: flex; flex-direction: column; }

/* ─── TOPBAR ─── */
.topbar {
  height: var(--topbar-h); min-height: var(--topbar-h);
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
  padding: 0 16px;
  position: sticky; top: 0; z-index: 100;
}
.hamburger {
  width: 38px; height: 38px;
  border: none; background: transparent;
  border-radius: var(--radius-sm);
  color: var(--text2);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background var(--transition), color var(--transition);
}
.hamburger:hover { background: var(--bg3); color: var(--text); }
.topbar-title {
  flex: 1; font-weight: 700; font-size: 16px;
  color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.topbar-right {
  display: flex; align-items: center; gap: 4px;
  flex-shrink: 0;
}
.topbar-icon-btn {
  width: 38px; height: 38px;
  border: none; background: transparent;
  border-radius: var(--radius-sm);
  color: var(--text2);
  display: flex; align-items: center; justify-content: center;
  position: relative;
  transition: background var(--transition), color var(--transition);
}
.topbar-icon-btn:hover { background: var(--bg3); color: var(--text); }
.notif-badge {
  position: absolute; top: 6px; right: 6px;
  width: 8px; height: 8px;
  background: var(--red); border-radius: 50%;
  border: 2px solid var(--bg2);
}

/* ─── NOTIFICATIONS ─── */
.notif-wrap { position: relative; }
.notif-panel {
  position: absolute; top: calc(100% + 8px); right: 0;
  width: 300px; background: var(--bg2);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none;
  transform: translateY(-8px);
  transition: opacity var(--transition), transform var(--transition);
  z-index: 150; overflow: hidden;
}
.notif-panel.open { opacity: 1; pointer-events: all; transform: translateY(0); }
.notif-panel-header {
  padding: 12px 16px; font-weight: 700; font-size: 13px;
  color: var(--text2); text-transform: uppercase; letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
}
.notif-item {
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--bg3); }
.notif-item-title { font-weight: 600; font-size: 13px; color: var(--text); }
.notif-item-body { font-size: 12px; color: var(--text2); margin-top: 2px; }
.notif-item-time { font-size: 11px; color: var(--text3); margin-top: 4px; }
.notif-empty { padding: 20px; text-align: center; color: var(--text3); font-size: 13px; }

/* ─── MAIN CONTENT ─── */
.main-content {
  flex: 1; padding: 20px 16px 80px;
  max-width: 600px; width: 100%;
  margin: 0 auto;
}

/* ─── AUTH ─── */
.auth-body { background: var(--bg); }
.auth-screen {
  min-height: 100vh; display: flex;
  align-items: center; justify-content: center;
  padding: 24px 16px;
}
.auth-card {
  width: 100%; max-width: 400px;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 20px; padding: 36px 28px;
  box-shadow: var(--shadow-lg);
}
.auth-brand {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; margin-bottom: 24px; color: var(--accent);
  font-weight: 800; font-size: 22px;
}
.auth-brand svg { color: var(--accent); }
.auth-heading { font-size: 26px; font-weight: 800; color: var(--text); text-align: center; }
.auth-sub { color: var(--text2); text-align: center; font-size: 14px; margin-top: 6px; margin-bottom: 24px; }
.auth-form { margin-top: 20px; }
.auth-footer-link { text-align: center; margin-top: 20px; color: var(--text2); font-size: 14px; }

/* ─── CARDS ─── */
.card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-weight: 700; font-size: 14px; color: var(--text);
}
.card-link { font-size: 13px; font-weight: 500; color: var(--accent); }
.card-link:hover { text-decoration: underline; }
.card-body { padding: 16px; }
.card-body.p0 { padding: 0; }

/* ─── STATS ─── */
.stats-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 12px; margin-bottom: 16px;
}
.stats-grid-3 { grid-template-columns: repeat(3, 1fr); }
.stat-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px;
  display: flex; align-items: center; gap: 14px;
  box-shadow: var(--shadow);
}
.stat-card.stat-sm { flex-direction: column; align-items: flex-start; gap: 6px; }
.stat-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; color: #fff;
}
.stat-icon svg { color: #fff; }
.stat-info { min-width: 0; }
.stat-value { font-size: 22px; font-weight: 800; color: var(--text); line-height: 1.1; }
.stat-label { font-size: 12px; color: var(--text2); font-weight: 500; margin-top: 2px; }

/* ─── FORMS ─── */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--text2); margin-bottom: 7px; }
.form-control {
  width: 100%; padding: 11px 14px;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text);
  font-size: 15px; outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  -webkit-appearance: none;
}
.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-control:disabled { opacity: 0.5; cursor: not-allowed; }
.form-hint { font-size: 12px; color: var(--text3); margin-top: 5px; }
.form-hint a { color: var(--accent); }

.input-icon-wrap { position: relative; }
.input-icon-wrap .input-icon {
  position: absolute; left: 12px; top: 50%;
  transform: translateY(-50%); color: var(--text3); pointer-events: none;
}
.form-control.has-icon { padding-left: 38px; }
.input-toggle-btn {
  position: absolute; right: 12px; top: 50%;
  transform: translateY(-50%);
  border: none; background: transparent;
  color: var(--text3); padding: 0;
  display: flex; align-items: center;
  transition: color var(--transition);
}
.input-toggle-btn:hover { color: var(--text); }

textarea.form-control { resize: vertical; min-height: 90px; }

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 7px; padding: 10px 18px;
  border: none; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600;
  cursor: pointer; text-decoration: none;
  transition: all var(--transition);
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; text-decoration: none; transform: translateY(-1px); box-shadow: 0 4px 14px rgba(79,121,246,0.35); }
.btn-secondary { background: var(--bg3); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--bg4); color: var(--text); text-decoration: none; }
.btn-danger { background: var(--red-bg); color: var(--red); border: 1px solid rgba(240,79,90,0.2); }
.btn-danger:hover { background: var(--red); color: #fff; text-decoration: none; }
.btn-success { background: var(--green-bg); color: var(--green); border: 1px solid rgba(34,201,138,0.2); }
.btn-success:hover { background: var(--green); color: #fff; text-decoration: none; }
.btn-warning { background: var(--yellow-bg); color: var(--yellow); border: 1px solid rgba(245,166,35,0.2); }
.btn-warning:hover { background: var(--yellow); color: #fff; text-decoration: none; }
.btn-block { width: 100%; }
.btn-lg { padding: 13px 24px; font-size: 16px; border-radius: 10px; }
.btn-sm { padding: 7px 13px; font-size: 13px; }
.btn-xs { padding: 4px 9px; font-size: 12px; border-radius: 6px; }
.mt-16 { margin-top: 16px; }

/* ─── ALERTS ─── */
.alert {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 13px 15px; border-radius: var(--radius-sm);
  font-size: 14px; margin-bottom: 16px; border: 1px solid transparent;
}
.alert svg { flex-shrink: 0; margin-top: 1px; }
.alert-danger { background: var(--red-bg); color: var(--red); border-color: rgba(240,79,90,0.2); }
.alert-success { background: var(--green-bg); color: var(--green); border-color: rgba(34,201,138,0.2); }
.alert-info { background: var(--accent-glow); color: var(--accent); border-color: rgba(79,121,246,0.2); }
.alert a { color: inherit; font-weight: 600; text-decoration: underline; }

/* ─── BADGES ─── */
.badge {
  display: inline-flex; align-items: center;
  padding: 2px 9px; border-radius: 20px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.3px;
}
.badge-active { background: var(--green-bg); color: var(--green); }
.badge-disabled { background: var(--red-bg); color: var(--red); }
.badge-admin { background: var(--accent-glow); color: var(--accent); }
.badge-user { background: var(--purple-bg); color: var(--purple); }

/* ─── STATUS INDICATORS ─── */
.status-dot {
  width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0;
}
.status-active { background: var(--green); box-shadow: 0 0 6px var(--green); }
.status-disabled { background: var(--red); }

.status-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600;
}
.pill-active { background: var(--green-bg); color: var(--green); }
.pill-disabled { background: var(--red-bg); color: var(--red); }

/* ─── PAGE HERO ─── */
.page-hero {
  padding: 8px 0 20px;
}
.hero-greeting { font-size: 22px; font-weight: 800; color: var(--text); }
.hero-sub { font-size: 14px; color: var(--text2); margin-top: 3px; }

/* ─── PAGE TOP ACTIONS ─── */
.page-top-actions {
  display: flex; justify-content: flex-end;
  margin-bottom: 16px; gap: 10px;
}

/* ─── BOT LIST ROWS ─── */
.bot-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
}
.bot-row:last-child { border-bottom: none; }
.bot-avatar {
  width: 38px; height: 38px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: #fff; font-size: 15px;
}
.bot-info { flex: 1; min-width: 0; }
.bot-name { font-weight: 600; font-size: 14px; color: var(--text); }
.bot-meta { font-size: 12px; color: var(--text3); margin-top: 1px; }

/* ─── BOT CARDS GRID ─── */
.bot-grid { display: flex; flex-direction: column; gap: 14px; }
.bot-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow);
  transition: border-color var(--transition);
}
.bot-card:hover { border-color: var(--accent); }
.bot-card-disabled { opacity: 0.6; }
.bot-card-header {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-bottom: 1px solid var(--border);
}
.bot-card-avatar {
  width: 44px; height: 44px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: #fff; font-size: 18px;
}
.bot-card-meta { flex: 1; min-width: 0; }
.bot-card-name { font-weight: 700; font-size: 15px; color: var(--text); }
.bot-card-date { font-size: 12px; color: var(--text3); margin-top: 2px; }
.bot-card-stats {
  display: flex; gap: 0;
  border-bottom: 1px solid var(--border);
}
.bot-stat {
  flex: 1; padding: 10px 14px;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  border-right: 1px solid var(--border);
}
.bot-stat:last-child { border-right: none; }
.bot-stat-icon { font-size: 13px; color: var(--text3); }
.bot-stat-val { font-size: 12px; font-weight: 600; color: var(--text2); }
.token-preview { font-family: monospace; letter-spacing: 0.5px; }
.bot-card-actions {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 12px 14px; border-bottom: 1px solid var(--border);
}
.bot-card-footer {
  display: flex; gap: 8px; padding: 12px 14px;
}

/* ─── ACTIVITY ─── */
.activity-row {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
}
.activity-row:last-child { border-bottom: none; }
.activity-icon {
  width: 30px; height: 30px; flex-shrink: 0;
  background: var(--accent-glow); border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
}
.activity-info { flex: 1; min-width: 0; }
.activity-action { font-size: 13px; font-weight: 500; color: var(--text); }
.activity-time { font-size: 11px; color: var(--text3); margin-top: 2px; }

/* ─── NOTICE ITEMS ─── */
.notice-item {
  padding: 14px 16px; border-bottom: 1px solid var(--border);
}
.notice-item:last-child { border-bottom: none; }
.notice-title { font-weight: 700; font-size: 14px; color: var(--text); }
.notice-msg { font-size: 13px; color: var(--text2); margin-top: 4px; }
.notice-time { font-size: 11px; color: var(--text3); margin-top: 4px; }

/* ─── PROGRESS ─── */
.progress-bar-wrap {
  height: 8px; background: var(--bg3);
  border-radius: 99px; overflow: hidden;
}
.progress-bar {
  height: 100%; border-radius: 99px;
  transition: width 0.5s ease;
}
.progress-labels {
  display: flex; justify-content: space-between;
  font-size: 12px; color: var(--text3); margin-top: 6px;
}

/* ─── FILE MANAGER ─── */
.fm-header {
  margin-bottom: 14px;
}
.fm-bot-name { font-weight: 700; font-size: 16px; color: var(--text); margin-bottom: 4px; }
.fm-breadcrumb {
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px;
  font-size: 13px; color: var(--text3);
}
.fm-breadcrumb a { color: var(--accent); }
.fm-breadcrumb span { color: var(--text3); }
.fm-toolbar {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px;
}
.fm-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.fm-table th {
  text-align: left; padding: 10px 16px;
  color: var(--text3); font-weight: 600; font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
  background: var(--bg3);
}
.fm-table td {
  padding: 10px 16px; border-bottom: 1px solid var(--border);
  color: var(--text); vertical-align: middle;
}
.fm-table tr:last-child td { border-bottom: none; }
.fm-table tr:hover td { background: var(--bg3); }
.fm-row-link { color: var(--text); font-weight: 500; text-decoration: none; }
.fm-row-link:hover { color: var(--accent); }
.fm-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.code-editor {
  width: 100%; min-height: 380px; font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 13px; line-height: 1.6;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text); padding: 14px;
  resize: vertical; outline: none;
}
.code-editor:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.editor-actions { display: flex; gap: 10px; margin-top: 12px; }

/* ─── WEBHOOK ─── */
.webhook-status-box {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 16px; border-radius: var(--radius-sm);
  border: 1px solid; margin-bottom: 18px;
}
.wh-active { background: var(--green-bg); border-color: rgba(34,201,138,0.2); }
.wh-inactive { background: var(--red-bg); border-color: rgba(240,79,90,0.2); }
.wh-status-icon { font-size: 20px; flex-shrink: 0; margin-top: 2px; }
.wh-status-text { flex: 1; }
.wh-status-text strong { font-weight: 700; font-size: 15px; display: block; }
.wh-url { font-family: monospace; font-size: 11px; color: var(--text2); margin-top: 4px; word-break: break-all; }
.wh-auto-url { margin-top: 18px; }
.input-copy-row { display: flex; gap: 8px; }
.input-copy-row .form-control { flex: 1; }
.divider {
  display: flex; align-items: center; gap: 12px;
  color: var(--text3); font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.5px;
  margin: 18px 0;
}
.divider::before, .divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

/* ─── PROFILE ─── */
.profile-hero {
  text-align: center; padding: 20px 0 24px;
}
.profile-avatar-lg {
  width: 72px; height: 72px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 800; color: #fff;
  margin: 0 auto 12px;
}
.profile-username { font-size: 20px; font-weight: 800; color: var(--text); }
.profile-role-badge {
  display: inline-block; font-size: 12px; font-weight: 700;
  padding: 3px 12px; border-radius: 20px; margin-top: 6px;
  text-transform: uppercase; letter-spacing: 0.4px;
}
.profile-since { font-size: 13px; color: var(--text3); margin-top: 6px; }

/* ─── EMPTY STATES ─── */
.empty-state {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 10px;
  padding: 40px 20px; color: var(--text3);
}
.empty-state .icon { width: 48px; height: 48px; color: var(--text3); }
.empty-title { font-size: 15px; font-weight: 600; color: var(--text2); }
.empty-sub { font-size: 13px; text-align: center; max-width: 280px; }
.empty-fullpage {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 12px;
  padding: 80px 20px; text-align: center;
}
.empty-fullpage .icon { width: 56px; height: 56px; color: var(--text3); margin-bottom: 4px; }
.empty-fullpage .empty-title { font-size: 18px; font-weight: 800; }
.empty-fullpage .empty-sub { color: var(--text2); max-width: 280px; }

/* ─── FAB ─── */
.fab {
  position: fixed; right: 20px; bottom: 28px;
  width: 54px; height: 54px;
  background: var(--accent); color: #fff;
  border-radius: 50%; box-shadow: 0 6px 20px rgba(79,121,246,0.45);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 300; text-decoration: none;
  z-index: 90;
  transition: transform var(--transition), box-shadow var(--transition);
}
.fab:hover { transform: scale(1.08); box-shadow: 0 8px 26px rgba(79,121,246,0.55); text-decoration: none; color: #fff; }

/* ─── MODALS ─── */
.modal-backdrop {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 300; align-items: center; justify-content: center;
  padding: 16px;
  backdrop-filter: blur(4px);
}
.modal-backdrop.open { display: flex; }
.modal-box {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
  width: 100%; max-width: 360px;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.2s ease;
}
@keyframes modalIn { from { transform: scale(0.92) translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-title { font-weight: 700; font-size: 16px; color: var(--text); margin-bottom: 16px; }
.modal-actions { display: flex; gap: 10px; margin-top: 16px; }

/* ─── INFO BOX ─── */
.info-box {
  background: var(--accent-glow); border: 1px solid rgba(79,121,246,0.2);
  border-radius: var(--radius-sm); padding: 14px 16px;
  font-size: 13px; color: var(--text2); margin-bottom: 16px;
}
.info-box strong { color: var(--accent); }
.info-box ul { margin-top: 8px; padding-left: 18px; }
.info-box li { margin-bottom: 4px; }
.info-box code { background: var(--bg3); padding: 1px 5px; border-radius: 4px; font-family: monospace; font-size: 12px; color: var(--accent); }

/* ─── FILE DROP ─── */
.file-drop {
  border: 2px dashed var(--border); border-radius: var(--radius-sm);
  padding: 32px 20px; text-align: center; cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}
.file-drop:hover, .file-drop.drag-over {
  border-color: var(--accent); background: var(--accent-glow);
}
.file-drop-icon { color: var(--text3); margin-bottom: 10px; }
.file-drop-icon svg { width: 36px; height: 36px; }
.file-drop-text { font-size: 14px; font-weight: 600; color: var(--text2); }
.file-drop-hint { font-size: 12px; color: var(--text3); margin-top: 6px; }

/* ─── ADMIN TABLES ─── */
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th {
  text-align: left; padding: 10px 14px;
  color: var(--text3); font-weight: 700; font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.5px;
  border-bottom: 2px solid var(--border);
  background: var(--bg3);
}
.data-table td { padding: 12px 14px; border-bottom: 1px solid var(--border); color: var(--text); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg3); }
.data-table .actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* ─── ENV VARS ─── */
.envar-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; border-bottom: 1px solid var(--border);
}
.envar-row:last-child { border-bottom: none; }
.envar-key { font-family: monospace; font-size: 13px; font-weight: 600; color: var(--accent); flex: 1; }
.envar-val { font-family: monospace; font-size: 12px; color: var(--text2); flex: 2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ─── LOG VIEWER ─── */
.log-viewer {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px;
  font-family: 'SF Mono', 'Fira Code', monospace; font-size: 12px;
  line-height: 1.7; color: var(--text2);
  max-height: 420px; overflow-y: auto;
  white-space: pre-wrap; word-break: break-all;
}

/* ─── SEARCH ─── */
.search-bar {
  display: flex; gap: 8px; margin-bottom: 14px;
}
.search-bar .form-control { flex: 1; }

/* ─── SCROLL TO TOP ─── */
@media (min-width: 640px) {
  .main-content { padding: 24px 24px 80px; }
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
  .bot-grid { display: grid; grid-template-columns: repeat(2, 1fr); }
}
