
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #0d0d0f;
  --surface: #161618;
  --surface2: #1e1e22;
  --border: #2a2a30;
  --border2: #3a3a42;
  --text: #f0f0f2;
  --text2: #8888a0;
  --accent: #7c3aed;
  --accent-light: #a78bfa;
  --accent-bg: rgba(124,58,237,0.12);
  --green: #22c55e;
  --green-bg: rgba(34,197,94,0.1);
  --red: #ef4444;
  --red-bg: rgba(239,68,68,0.1);
  --yellow: #f59e0b;
  --yellow-bg: rgba(245,158,11,0.1);
  --radius: 12px;
  --radius-sm: 8px;
  --nav-h: 54px;
  --sidebar-w: 210px;
  --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

body { background: var(--bg); color: var(--text); font-family: var(--font); font-size: 14px; line-height: 1.5; min-height: 100vh; }

.navbar {
  position: fixed; top: 0; left: 0; right: 0; height: var(--nav-h);
  background: var(--surface); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px; z-index: 100;
}
.nav-left  { display: flex; align-items: center; gap: 12px; }
.nav-right { display: flex; align-items: center; gap: 10px; }
.nav-logo  { display: flex; align-items: center; gap: 8px; }
.logo-text { font-weight: 700; font-size: 15px; }
.breadcrumb { display: flex; align-items: center; gap: 8px; color: var(--text2); font-size: 13px; }
.breadcrumb-sep { color: var(--border2); }

.live-badge { display: flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 700; letter-spacing: .08em; color: var(--text2); text-transform: uppercase; }
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--text2); animation: livePulse 2s infinite; transition: background .3s, box-shadow .3s; }
@keyframes livePulse { 0%,100%{opacity:1} 50%{opacity:.35} }

.bot-status-pill { display: flex; align-items: center; gap: 7px; background: var(--surface2); border: 1px solid var(--border); border-radius: 20px; padding: 5px 12px; font-size: 12px; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--text2); transition: background .3s; }
.status-dot.online  { background: var(--green); box-shadow: 0 0 6px var(--green); }
.status-dot.offline { background: var(--red); }

.layout { display: flex; margin-top: var(--nav-h); min-height: calc(100vh - var(--nav-h)); }

.sidebar { width: var(--sidebar-w); background: var(--surface); border-right: 1px solid var(--border); position: fixed; top: var(--nav-h); bottom: 0; left: 0; overflow-y: auto; padding: 14px 10px; }
.sidebar-nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--radius-sm); border: none; background: transparent; color: var(--text2); font-size: 13px; cursor: pointer; width: 100%; text-align: left; transition: all .15s; }
.nav-item:hover  { background: var(--surface2); color: var(--text); }
.nav-item.active { background: var(--accent-bg); color: var(--accent-light); }
.nav-item svg    { flex-shrink: 0; }

.main-content { margin-left: var(--sidebar-w); flex: 1; padding: 26px 30px; max-width: 1080px; }

.page { display: none; }
.page.active { display: block; }

.page-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 22px; flex-wrap: wrap; gap: 12px; }
.page-title  { font-size: 24px; font-weight: 700; line-height: 1.2; }
.page-sub    { color: var(--text2); font-size: 13px; margin-top: 3px; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px,1fr)); gap: 14px; margin-bottom: 18px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; }
.stat-label { display: flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 700; letter-spacing: .08em; color: var(--text2); text-transform: uppercase; margin-bottom: 10px; }
.stat-value { font-size: 30px; font-weight: 800; line-height: 1; margin-bottom: 4px; }
.stat-sub   { font-size: 11px; color: var(--text2); }
@keyframes statFlash { 0%{color:var(--accent-light);transform:scale(1.08)} 100%{transform:scale(1)} }
.stat-updated { animation: statFlash .5s ease-out; }

.chart-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; }
.chart-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 18px; }
.chart-header h3 { font-size: 14px; font-weight: 600; }
.chart-sub  { color: var(--text2); font-size: 12px; margin-top: 2px; }
.chart-total { text-align: right; }
.chart-total span { font-size: 26px; font-weight: 800; }
.chart-total small { display: block; color: var(--text2); font-size: 11px; }

.verify-link-bar { display: flex; align-items: center; gap: 10px; background: var(--accent-bg); border: 1px solid rgba(124,58,237,.4); border-radius: var(--radius-sm); padding: 9px 14px; margin-bottom: 18px; flex-wrap: wrap; font-size: 13px; }
.verify-link-bar svg { flex-shrink: 0; color: var(--accent-light); }
.verify-link-bar code { flex: 1; background: rgba(0,0,0,.3); padding: 2px 8px; border-radius: 4px; color: var(--accent-light); font-size: 11px; word-break: break-all; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 16px; border-radius: var(--radius-sm); border: none; font-size: 13px; font-weight: 600; cursor: pointer; transition: all .15s; white-space: nowrap; font-family: var(--font); }
.btn svg { flex-shrink: 0; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #6d28d9; }
.btn-ghost   { background: var(--surface2); color: var(--text); border: 1px solid var(--border2); }
.btn-ghost:hover { background: var(--border); }
.btn-danger  { background: var(--red-bg); color: var(--red); border: 1px solid rgba(239,68,68,.3); }
.btn-danger:hover { background: var(--red); color: #fff; }
.btn-full { width: 100%; }
.btn-sm   { padding: 7px 12px; font-size: 12px; }
.btn-xs   { padding: 4px 9px;  font-size: 11px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.input-field { width: 100%; background: var(--surface2); border: 1px solid var(--border2); border-radius: var(--radius-sm); padding: 8px 12px; color: var(--text); font-size: 13px; font-family: var(--font); transition: border .15s; outline: none; }
.input-field:focus { border-color: var(--accent); }
.input-field::placeholder { color: var(--text2); }
.input-sm { width: 230px; }
textarea.input-field { resize: vertical; }
select.input-field { cursor: pointer; }

.form-group { margin-bottom: 13px; }
.form-group label { display: block; font-size: 12px; font-weight: 600; margin-bottom: 5px; color: var(--text2); }
.form-group small { display: block; margin-top: 4px; font-size: 11px; color: var(--text2); }
.form-group small a { color: var(--accent-light); }

.search-wrap { position: relative; display: flex; align-items: center; }
.search-wrap svg { position: absolute; left: 10px; color: var(--text2); pointer-events: none; }
.search-wrap .input-field { padding-left: 32px; }

.warning-inline { display: flex; align-items: center; gap: 7px; background: var(--yellow-bg); border: 1px solid rgba(245,158,11,.3); border-radius: var(--radius-sm); padding: 8px 12px; font-size: 12px; color: var(--yellow); margin-bottom: 12px; }
.warning-inline.danger { background: var(--red-bg); border-color: rgba(239,68,68,.3); color: var(--red); }
.warning-inline svg { flex-shrink: 0; }

.info-banner { display: flex; align-items: center; gap: 8px; background: var(--surface2); border: 1px solid var(--border2); border-radius: var(--radius-sm); padding: 9px 13px; font-size: 12px; color: var(--text2); margin-bottom: 14px; }
.info-banner svg { flex-shrink: 0; }

.warning-banner { display: flex; align-items: flex-start; gap: 10px; background: var(--yellow-bg); border: 1px solid rgba(245,158,11,.3); border-radius: var(--radius); padding: 13px 16px; font-size: 13px; color: var(--yellow); margin-bottom: 18px; line-height: 1.6; }
.warning-banner svg { flex-shrink: 0; margin-top: 2px; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; }
.card h3  { font-size: 14px; font-weight: 700; margin-bottom: 3px; }
.card-sub { font-size: 12px; color: var(--text2); }

.table-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: visible; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { padding: 11px 14px; text-align: left; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text2); background: var(--surface2); border-bottom: 1px solid var(--border); }
.data-table td { padding: 11px 14px; border-bottom: 1px solid var(--border); font-size: 13px; vertical-align: middle; overflow: visible; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--surface2); }
.table-empty { text-align: center; color: var(--text2); padding: 32px !important; font-size: 13px; }

.user-cell { display: flex; align-items: center; gap: 9px; }
.user-avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--accent-bg); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: var(--accent-light); overflow: hidden; flex-shrink: 0; }
.user-avatar img { width: 100%; height: 100%; object-fit: cover; }

.badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; }
.badge-green { background: var(--green-bg); color: var(--green); }
.badge-red   { background: var(--red-bg);   color: var(--red); }

.pagination { display: flex; gap: 5px; margin-top: 12px; justify-content: center; }
.pagination button { background: var(--surface2); border: 1px solid var(--border2); color: var(--text); border-radius: var(--radius-sm); padding: 5px 11px; cursor: pointer; font-size: 13px; }
.pagination button.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.pull-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.pull-empty { color: var(--text2); font-size: 13px; padding: 24px 0; }
.pull-stat  { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.pull-stat:last-child { border-bottom: none; }
.radio-group  { display: flex; flex-direction: column; gap: 8px; }
.radio-option { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; }
.radio-option input { accent-color: var(--accent); }

.guilds-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px,1fr)); gap: 14px; }
.guild-card  { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; }
.guild-icon  { width: 52px; height: 52px; border-radius: 14px; background: var(--accent-bg); display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 700; color: var(--accent-light); overflow: hidden; }
.guild-icon img { width: 100%; height: 100%; object-fit: cover; border-radius: 14px; }
.guild-name    { font-weight: 700; font-size: 13px; }
.guild-members { font-size: 12px; color: var(--text2); }

.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px,1fr)); gap: 16px; margin-bottom: 16px; }
.danger-zone { border-color: rgba(239,68,68,.3); margin-top: 0; }
.danger-zone h3 { color: var(--red); margin-bottom: 6px; }
.danger-zone p  { color: var(--text2); font-size: 13px; margin-bottom: 14px; }

.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.78); display: flex; align-items: center; justify-content: center; z-index: 1000; backdrop-filter: blur(5px); padding: 20px; }
.modal-box { background: var(--surface); border: 1px solid var(--border2); border-radius: 16px; padding: 30px; width: 100%; max-width: 500px; max-height: 90vh; overflow-y: auto; }
.modal-box h2   { font-size: 18px; font-weight: 700; margin-bottom: 5px; }
.modal-sub      { color: var(--text2); font-size: 13px; margin-bottom: 18px; }
.modal-logo     { display: flex; align-items: center; gap: 9px; margin-bottom: 22px; }

.legal-modal { max-width: 580px; }
.legal-icon  { margin-bottom: 10px; }
.legal-modal h2 { font-size: 20px; margin-bottom: 14px; }
.legal-content  { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.legal-item { border-radius: var(--radius-sm); padding: 12px 14px; font-size: 13px; line-height: 1.6; }
.legal-item strong { display: block; margin-bottom: 4px; font-size: 13px; }
.legal-item p      { color: var(--text2); }
.legal-item.danger  { background: var(--red-bg);    border: 1px solid rgba(239,68,68,.3); }
.legal-item.danger strong  { color: var(--red); }
.legal-item.warning { background: var(--yellow-bg); border: 1px solid rgba(245,158,11,.3); }
.legal-item.warning strong { color: var(--yellow); }
.legal-item.info    { background: var(--green-bg);  border: 1px solid rgba(34,197,94,.3); }
.legal-item.info strong    { color: var(--green); }

.checkbox-label { display: flex; align-items: flex-start; gap: 9px; font-size: 13px; cursor: pointer; margin-bottom: 14px; line-height: 1.5; }
.checkbox-label input { accent-color: var(--accent); margin-top: 2px; flex-shrink: 0; }

.toast { position: fixed; bottom: 22px; right: 22px; background: var(--surface2); border: 1px solid var(--border2); border-radius: var(--radius-sm); padding: 11px 18px; font-size: 13px; z-index: 9999; opacity: 0; transform: translateY(8px); transition: all .22s; pointer-events: none; max-width: 320px; }
.toast.show    { opacity: 1; transform: translateY(0); }
.toast.success { border-color: var(--green); color: var(--green); }
.toast.error   { border-color: var(--red);   color: var(--red); }
.toast.info    { border-color: var(--accent); color: var(--accent-light); }

code { background: rgba(0,0,0,.3); padding: 2px 6px; border-radius: 4px; font-size: 12px; color: var(--accent-light); font-family: monospace; }

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }

@media (max-width: 768px) {
  .sidebar { display: none; }
  .main-content { margin-left: 0; padding: 18px 14px; }
  .pull-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .input-sm { width: 100%; }
  .page-header { flex-direction: column; align-items: flex-start; }
}

.setup-steps { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.setup-step  { display: flex; align-items: flex-start; gap: 10px; background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 13px; line-height: 1.5; }
.step-num    { background: var(--accent); color: #fff; border-radius: 50%; width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; flex-shrink: 0; margin-top: 1px; }
.setup-step code { font-size: 11px; }

.config-status-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 18px; }
.config-row         { display: flex; flex-wrap: wrap; gap: 16px; }
.config-item        { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text2); }
.config-item svg    { flex-shrink: 0; }
.config-warning     { margin-top: 12px; background: var(--red-bg); border: 1px solid rgba(239,68,68,.3); border-radius: var(--radius-sm); padding: 10px 13px; font-size: 12px; color: var(--red); line-height: 1.6; }

.pill-radio-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pill-radio {
  cursor: pointer;
  user-select: none;
}

.pill-radio input[type="radio"] {
  display: none;
}

.pill-radio span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 20px;
  border: 1.5px solid var(--border2);
  background: var(--surface2);
  color: var(--text2);
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.pill-radio span svg {
  flex-shrink: 0;
  transition: stroke 0.15s;
}

.pill-radio:hover span {
  border-color: var(--accent);
  color: var(--text);
  background: var(--accent-bg);
}

.pill-radio input[type="radio"]:checked + span {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 12px rgba(124, 58, 237, 0.35);
}

.pill-radio input[type="radio"]:checked + span svg {
  stroke: #fff;
}

#pageLoader {
  position: fixed; inset: 0;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
  transition: opacity 0.3s ease;
}
#pageLoader.hidden {
  opacity: 0;
  pointer-events: none;
}
.loader-inner {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.loader-text {
  font-size: 20px; font-weight: 700; color: var(--text); letter-spacing: 0.02em;
}
.loader-spinner {
  width: 28px; height: 28px;
  border: 2.5px solid var(--border2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loader-sub {
  font-size: 12px;
  color: var(--text2);
  animation: loaderSubAnim 2s ease-in-out infinite;
}
@keyframes loaderSubAnim {
  0%, 100% { opacity: 0.4; }
  50%       { opacity: 1; }
}

.login-bg {
  min-height: 100vh; background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background-image: radial-gradient(ellipse at 60% 0%, rgba(124,58,237,0.18) 0%, transparent 60%),
                    radial-gradient(ellipse at 0% 80%, rgba(124,58,237,0.08) 0%, transparent 50%);
}
.login-card {
  background: var(--surface); border: 1px solid var(--border2);
  border-radius: 20px; padding: 38px 36px; width: 100%; max-width: 400px;
  box-shadow: 0 24px 60px rgba(0,0,0,.5);
}
.login-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 26px; }
.login-brand { font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.login-title { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.login-sub   { color: var(--text2); font-size: 13px; margin-bottom: 24px; }
.login-error {
  background: var(--red-bg); border: 1px solid rgba(239,68,68,.3);
  color: var(--red); border-radius: var(--radius-sm);
  padding: 9px 13px; font-size: 13px; margin-bottom: 14px;
}
.login-footer { margin-top: 18px; text-align: center; }
.login-about-link {
  background: none; border: none; color: var(--text2); font-size: 12px;
  cursor: pointer; text-decoration: underline; font-family: var(--font);
  transition: color .15s;
}
.login-about-link:hover { color: var(--accent-light); }

.about-bg { min-height: 100vh; background: var(--bg); }
.about-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 32px; border-bottom: 1px solid var(--border);
  background: var(--surface); position: sticky; top: 0; z-index: 10;
}
.about-content { max-width: 900px; margin: 0 auto; padding: 60px 24px 80px; }

.about-hero { text-align: center; margin-bottom: 64px; }
.about-hero-badge {
  display: inline-block; background: var(--accent-bg);
  color: var(--accent-light); border: 1px solid rgba(124,58,237,.4);
  border-radius: 20px; padding: 4px 14px; font-size: 11px;
  font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  margin-bottom: 16px;
}
.about-hero-title {
  font-size: 56px; font-weight: 900; line-height: 1;
  letter-spacing: -.03em; margin-bottom: 18px;
  background: linear-gradient(135deg, #f0f0f2 30%, #a78bfa);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.about-hero-desc {
  color: var(--text2); font-size: 16px; max-width: 560px;
  margin: 0 auto; line-height: 1.7;
}

.about-features {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr));
  gap: 16px; margin-bottom: 60px;
}
.about-feature-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px 22px;
  transition: border-color .2s, transform .2s;
}
.about-feature-card:hover { border-color: var(--border2); transform: translateY(-2px); }
.about-feature-icon {
  width: 46px; height: 46px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; margin-bottom: 14px;
}
.about-feature-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 7px; }
.about-feature-card p  { font-size: 13px; color: var(--text2); line-height: 1.6; }

.about-stack { margin-bottom: 50px; }
.about-stack h2 { font-size: 20px; font-weight: 700; margin-bottom: 18px; }
.about-stack-grid {
  display: flex; flex-wrap: wrap; gap: 10px;
}
.about-stack-item {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; padding: 7px 16px; font-size: 13px; font-weight: 600;
}
.stack-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

.about-cta {
  background: var(--accent-bg); border: 1px solid rgba(124,58,237,.3);
  border-radius: var(--radius); padding: 30px 28px;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
}
.about-cta p { color: var(--text2); font-size: 14px; margin: 0; }

/* ── Lien flou au survol ─────────────────────────────── */
.blurry-link {
  filter: blur(5px);
  transition: filter 0.25s ease;
  cursor: pointer;
  user-select: none;
}
.blurry-link:hover,
.verify-link-bar:hover .blurry-link {
  filter: blur(0);
}

/* ── Token dans la table membres ─────────────────────── */
.token-cell {
  font-family: 'Courier New', monospace;
  font-size: 10px;
  color: var(--text2);
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  filter: blur(4px);
  transition: filter 0.2s ease, color 0.2s;
  display: block;
  padding: 2px 5px;
  border-radius: 4px;
}
.token-cell:hover,
.token-cell.blurry:hover {
  filter: blur(0);
  color: var(--accent-light);
  background: var(--surface);
  border: 1px solid var(--accent);
  overflow: visible;
  white-space: nowrap;
  max-width: none;
  width: max-content;
  position: relative;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}
.token-cell.blurry {
  filter: blur(4px);
}

/* ── Dashboard time selector ─────────────────────────── */
#dashboardTimeRange {
  height: 32px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 0 8px;
  font-size: 12px;
  cursor: pointer;
}

/* ── Custom select styling (tous les selects) ─────────── */
select.input-field,
select#dashboardTimeRange {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238888a0' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s;
}
select.input-field:hover,
select#dashboardTimeRange:hover {
  border-color: var(--accent);
  background-color: var(--surface2);
}
select.input-field:focus,
select#dashboardTimeRange:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 2px var(--accent-bg);
}
select.input-field option,
select#dashboardTimeRange option {
  background: var(--surface2);
  color: var(--text);
  padding: 8px;
}


/* ── Page Admin ──────────────────────────────────────── */
.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 18px;
}
.admin-full-col {
  grid-column: 1 / -1;
}
.sys-rows {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.sys-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}
.sys-row:last-child { border-bottom: none; }
.sys-row span:first-child { color: var(--text2); }
.sys-row span:last-child  { font-weight: 600; font-family: monospace; font-size: 11px; }

.admin-action-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  gap: 12px;
}

.admin-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  background: var(--red);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  border-radius: 50%;
  margin-left: auto;
}

/* Event badges in logs */
.ev-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.ev-success  { background: var(--green-bg);  color: var(--green); }
.ev-danger   { background: var(--red-bg);    color: var(--red); }
.ev-warning  { background: var(--yellow-bg); color: var(--yellow); }
.ev-info     { background: var(--accent-bg); color: var(--accent-light); }
.ev-neutral  { background: var(--surface2);  color: var(--text2); }

/* Session rows */
.session-current {
  background: rgba(124,58,237,0.06);
}
.session-current td:first-child::before {
  content: '● ';
  color: var(--green);
  font-size: 10px;
}

@media (max-width: 768px) {
  .admin-grid { grid-template-columns: 1fr; }
  .admin-full-col { grid-column: 1; }
}

.token-status {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 2px;
}
.token-status.valid     { background: var(--green);  box-shadow: 0 0 5px var(--green); }
.token-status.refreshed { background: var(--yellow); box-shadow: 0 0 5px var(--yellow); }
.token-status.invalid   { background: var(--red);    box-shadow: 0 0 5px var(--red); }
.token-status.loading   { background: var(--border2); animation: livePulse 1s infinite; }
.token-wrap {
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: flex-start;
}
.token-wrap-top {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Pull status badge */
.pull-status-ok   { color: var(--green); font-size: 10px; font-weight: 600; }
.pull-status-fail { color: var(--red);   font-size: 10px; font-weight: 600; }

/* ── Token copy button ───────────────────────────────── */
.token-copy-btn {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  color: var(--text2);
  padding: 2px 3px;
  border-radius: 3px;
  transition: color 0.15s, background 0.15s;
  opacity: 0.6;
}
.token-copy-btn:hover {
  color: var(--accent-light);
  background: var(--accent-bg);
  opacity: 1;
}
