:root {
  --bg-0: #000000;
  --bg-1: #0a0a0a;
  --bg-2: #111111;
  --bg-3: #181818;
  --bg-4: #1f1f1f;
  --bg-5: #262626;
  --white: #ffffff;
  --gray-50: #fafafa;
  --gray-100: #f5f5f5;
  --gray-200: #e5e5e5;
  --gray-300: #d4d4d4;
  --gray-400: #a3a3a3;
  --gray-500: #737373;
  --gray-600: #525252;
  --gray-700: #404040;
  --gray-800: #262626;
  --accent: #22d3ee;
  --accent-dim: rgba(34, 211, 238, 0.15);
  --accent-glow: rgba(34, 211, 238, 0.4);
  --green: #22c55e;
  --green-dim: rgba(34, 197, 94, 0.15);
  --red: #ef4444;
  --red-dim: rgba(239, 68, 68, 0.15);
  --yellow: #eab308;
  --yellow-dim: rgba(234, 179, 8, 0.15);
  --border: rgba(255,255,255,0.08);
  --border-hover: rgba(255,255,255,0.15);
  --radius: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', monospace;
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: var(--font);
  background: var(--bg-0);
  color: var(--gray-200);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection { background: var(--accent-dim); color: var(--white); }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-1); }
::-webkit-scrollbar-thumb { background: var(--bg-5); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-600); }

a { color: inherit; text-decoration: none; }

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 260px;
  height: 100vh;
  background: var(--bg-1);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform var(--transition);
}

.sidebar-brand {
  padding: 24px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-brand .brand-icon {
  width: 36px;
  height: 36px;
  background: var(--white);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-brand .brand-icon svg { color: var(--bg-0); }

.sidebar-brand h1 {
  font-size: 16px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.3px;
}

.sidebar-brand span {
  font-size: 11px;
  color: var(--gray-500);
  font-weight: 400;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-nav .nav-section {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gray-600);
  padding: 16px 12px 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-400);
  transition: all var(--transition);
  cursor: pointer;
}

.nav-item:hover {
  background: var(--bg-3);
  color: var(--white);
}

.nav-item.active {
  background: var(--white);
  color: var(--bg-0);
  font-weight: 600;
}

.nav-item.active svg { color: var(--bg-0); }

.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }

.nav-item .nav-badge {
  margin-left: auto;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 99px;
}

.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid var(--border);
}

.main-content {
  margin-left: 260px;
  min-height: 100vh;
  padding: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-title svg { width: 18px; height: 18px; color: var(--gray-500); }

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-content {
  padding: 32px;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.stat-card .stat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.stat-card .stat-header .stat-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-card .stat-header .stat-icon svg { width: 18px; height: 18px; }

.stat-card .stat-header .stat-icon.cyan { background: var(--accent-dim); color: var(--accent); }
.stat-card .stat-header .stat-icon.green { background: var(--green-dim); color: var(--green); }
.stat-card .stat-header .stat-icon.red { background: var(--red-dim); color: var(--red); }
.stat-card .stat-header .stat-icon.yellow { background: var(--yellow-dim); color: var(--yellow); }

.stat-card .stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -1px;
  line-height: 1;
  margin-bottom: 4px;
}

.stat-card .stat-label {
  font-size: 12px;
  color: var(--gray-500);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.card-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-header h2 {
  font-size: 14px;
  font-weight: 600;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-header h2 svg { width: 16px; height: 16px; color: var(--gray-500); }

.card-body { padding: 24px; }
.card-body.no-pad { padding: 0; }

.filter-bar {
  display: flex;
  gap: 12px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.filter-input {
  flex: 1;
  min-width: 180px;
  position: relative;
}

.filter-input svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: var(--gray-600);
  pointer-events: none;
}

.filter-input input,
.filter-input select {
  width: 100%;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px 8px 36px;
  color: var(--white);
  font-size: 13px;
  font-family: var(--font);
  transition: all var(--transition);
}

.filter-input select { padding-left: 36px; cursor: pointer; }

.filter-input input::placeholder { color: var(--gray-600); }

.filter-input input:focus,
.filter-input select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.data-table { width: 100%; border-collapse: collapse; table-layout: fixed; }

.data-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gray-500);
  background: var(--bg-3);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
}

.data-table tbody tr { transition: background var(--transition); }
.data-table tbody tr:hover { background: rgba(255,255,255,0.02); }
.data-table tbody tr:last-child td { border-bottom: none; }

.token-name-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--white);
}

.token-name-cell .avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--bg-5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--white);
  flex-shrink: 0;
}

.mono-text {
  font-family: var(--mono);
  font-size: 12px;
  background: var(--bg-4);
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--gray-400);
}

.mono-text:hover { background: var(--bg-5); color: var(--white); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-base {
  background: var(--bg-4);
  color: var(--gray-300);
  margin: 1px;
}

.badge-active { background: var(--green-dim); color: var(--green); }
.badge-inactive { background: var(--bg-5); color: var(--gray-500); }
.badge-expired { background: var(--red-dim); color: var(--red); }
.badge-never { background: var(--accent-dim); color: var(--accent); }

.progress-bar {
  width: 100%;
  height: 4px;
  background: var(--bg-4);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 6px;
}

.progress-bar .fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.5s ease;
  background: linear-gradient(90deg, var(--accent), var(--green));
}

.progress-bar .fill.warning { background: linear-gradient(90deg, var(--yellow), var(--red)); }

.action-group {
  display: flex;
  gap: 4px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
  line-height: 1;
}

.btn svg { width: 14px; height: 14px; flex-shrink: 0; }

.btn-primary {
  background: var(--white);
  color: var(--bg-0);
  border-color: var(--white);
  font-weight: 600;
}

.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); }

.btn-ghost {
  background: transparent;
  color: var(--gray-400);
  border-color: transparent;
}

.btn-ghost:hover { background: var(--bg-3); color: var(--white); }

.btn-secondary {
  background: var(--bg-3);
  color: var(--gray-300);
  border-color: var(--border);
}

.btn-secondary:hover { background: var(--bg-4); color: var(--white); border-color: var(--border-hover); }

.btn-danger {
  background: var(--red-dim);
  color: var(--red);
  border-color: transparent;
}

.btn-danger:hover { background: var(--red); color: var(--white); }

.btn-success {
  background: var(--green-dim);
  color: var(--green);
  border-color: transparent;
}

.btn-success:hover { background: var(--green); color: var(--white); }

.btn-warning {
  background: var(--yellow-dim);
  color: var(--yellow);
  border-color: transparent;
}

.btn-warning:hover { background: var(--yellow); color: var(--bg-0); }

.btn-accent {
  background: var(--accent-dim);
  color: var(--accent);
  border-color: transparent;
}

.btn-accent:hover { background: var(--accent); color: var(--bg-0); }

.btn-icon {
  padding: 7px;
  border-radius: 7px;
}

.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-lg { padding: 12px 24px; font-size: 14px; }

.form-section {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 20px;
}

.form-section h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-section h3 svg { width: 18px; height: 18px; color: var(--gray-500); }

.form-group { margin-bottom: 18px; }

.form-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-400);
  margin-bottom: 6px;
}

.form-group label svg { width: 14px; height: 14px; }

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--white);
  font-size: 14px;
  font-family: var(--font);
  transition: all var(--transition);
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--gray-600); }

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.form-group small {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--gray-600);
}

.limit-type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.limit-type-option {
  background: var(--bg-3);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}

.limit-type-option:hover { border-color: var(--gray-600); }

.limit-type-option.selected {
  border-color: var(--accent);
  background: var(--accent-dim);
}

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

.limit-type-title {
  font-weight: 600;
  color: var(--white);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
}

.limit-type-title svg { width: 16px; height: 16px; }

.limit-type-description {
  font-size: 11px;
  color: var(--gray-500);
}

.bases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.base-option {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 10px;
}

.base-option:hover { border-color: var(--border-hover); }

.base-option.selected {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.base-option input[type="checkbox"] { accent-color: var(--accent); }

.base-label { flex: 1; }
.base-label strong { display: block; color: var(--white); font-size: 13px; }
.base-label small { color: var(--gray-500); font-size: 11px; }

.per-base-card {
  padding: 12px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.per-base-card strong { color: var(--white); font-size: 13px; }

#perBaseConfig .btn { font-size: 11px; padding: 4px 8px; border-radius: 6px; }
#perBaseConfig label.btn:has(input:checked) { background: var(--accent); color: var(--bg-0); border-color: var(--accent); }
#perBaseConfig .per-base-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
#perBaseConfig .per-base-inputs .form-group { margin-bottom: 0; }
#perBaseConfig .per-base-inputs input[type="number"] { height: 34px; font-size: 13px; }

.alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
}

.alert svg { width: 16px; height: 16px; flex-shrink: 0; }

.alert-success { background: var(--green-dim); color: var(--green); }
.alert-error { background: var(--red-dim); color: var(--red); }
.alert-warning { background: var(--yellow-dim); color: var(--yellow); }
.alert-info { background: var(--accent-dim); color: var(--accent); }

.login-page {
  display: flex;
  min-height: 100vh;
  background: var(--bg-0);
}

.login-left {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  position: relative;
}

.login-left::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--accent-dim) 0%, transparent 70%);
  pointer-events: none;
}

.login-box {
  width: 100%;
  max-width: 380px;
  position: relative;
  z-index: 1;
}

.login-box .login-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 40px;
}

.login-box .login-logo .logo-icon {
  width: 40px;
  height: 40px;
  background: var(--white);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-box .login-logo .logo-icon svg { color: var(--bg-0); width: 20px; height: 20px; }

.login-box .login-logo h1 {
  font-size: 18px;
  font-weight: 700;
  color: var(--white);
}

.login-box h2 {
  font-size: 28px;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.login-box p.subtitle {
  color: var(--gray-500);
  font-size: 14px;
  margin-bottom: 32px;
}

.login-box .form-group input {
  background: var(--bg-2);
  border: 1px solid var(--border);
  padding: 12px 14px;
}

.login-box .btn-primary {
  width: 100%;
  padding: 12px;
  font-size: 14px;
  margin-top: 8px;
}

.login-right {
  flex: 1;
  background: var(--bg-1);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  border-left: 1px solid var(--border);
}

.login-right-content {
  position: relative;
  z-index: 1;
  padding: 60px;
  max-width: 460px;
}

.lr-glow {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(34,211,238,0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.lr-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--gray-400);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 5px 12px;
  border-radius: 99px;
  margin-bottom: 28px;
  text-transform: uppercase;
}

.lr-title {
  font-size: 40px;
  font-weight: 800;
  color: var(--white);
  line-height: 1.15;
  letter-spacing: -1.5px;
  margin-bottom: 16px;
}

.lr-desc {
  font-size: 15px;
  color: var(--gray-500);
  line-height: 1.6;
  margin-bottom: 48px;
}

.lr-features {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.lr-feature {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 18px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition);
}

.lr-feature:hover {
  border-color: var(--border-hover);
}

.lr-feature-icon {
  width: 36px;
  height: 36px;
  background: var(--bg-4);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent);
}

.lr-feature-icon svg { width: 16px; height: 16px; }

.lr-feature-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 3px;
}

.lr-feature-desc {
  font-size: 12px;
  color: var(--gray-500);
  line-height: 1.5;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.2s ease;
}

.modal-box {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px;
  max-width: 420px;
  width: 90%;
  text-align: center;
  animation: scaleIn 0.2s ease;
}

.modal-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.modal-icon.danger { background: var(--red-dim); color: var(--red); }
.modal-icon.warning { background: var(--yellow-dim); color: var(--yellow); }
.modal-icon svg { width: 24px; height: 24px; }

.modal-box h3 { font-size: 18px; font-weight: 700; color: var(--white); margin-bottom: 8px; }
.modal-box p { color: var(--gray-400); font-size: 14px; margin-bottom: 24px; line-height: 1.5; }
.modal-actions { display: flex; gap: 8px; justify-content: center; }

.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 99999;
  min-width: 300px;
  padding: 14px 18px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
  animation: slideIn 0.3s ease;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.toast svg { width: 18px; height: 18px; flex-shrink: 0; }
.toast.success { background: var(--bg-2); border: 1px solid var(--green); color: var(--green); }
.toast.error { background: var(--bg-2); border: 1px solid var(--red); color: var(--red); }

.expiration-text {
  font-size: 12px;
  color: var(--gray-500);
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  display: inline-block;
  width: 18ch;
  max-width: 18ch;
  overflow: hidden;
}

.expiration-date {
  font-size: 11px;
  color: var(--gray-600);
  white-space: nowrap;
}

.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--gray-500);
}

.empty-state svg { width: 48px; height: 48px; margin-bottom: 16px; color: var(--gray-700); }
.empty-state p { margin-bottom: 16px; font-size: 14px; }

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.info-card {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
}

.info-card .info-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gray-500);
  margin-bottom: 6px;
}

.info-card .info-label svg { width: 14px; height: 14px; }

.info-card .info-value {
  font-size: 14px;
  color: var(--white);
  font-weight: 500;
  word-break: break-all;
}

.info-card .info-value.mono {
  font-family: var(--mono);
  font-size: 12px;
}

.loading {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid var(--gray-600);
  border-radius: 50%;
  border-top-color: var(--white);
  animation: spin 0.6s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
@keyframes slideIn { from { opacity: 0; transform: translateY(-16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideOut { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(-16px); } }

.btn-outline {
  background: transparent;
  color: var(--gray-400);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  background: var(--bg-4);
  color: var(--white);
  border-color: var(--border-hover);
}

.btn-info {
  background: var(--accent-dim);
  color: var(--accent);
  border-color: transparent;
}

.btn-info:hover { background: var(--accent); color: var(--bg-0); }

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.page-header h1 {
  font-size: 22px;
  font-weight: 700;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.5px;
}

.page-header h1 svg { width: 22px; height: 22px; color: var(--gray-500); }

.time-adj-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.time-adj-card {
  text-align: center;
  padding: 16px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.time-adj-card .time-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 10px;
}

.time-adj-card .time-btns { display: flex; gap: 6px; justify-content: center; }

.btn-selected {
  background: var(--white) !important;
  color: var(--bg-0) !important;
  border-color: var(--white) !important;
}

.mobile-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--gray-400);
  cursor: pointer;
  transition: all var(--transition);
  flex-shrink: 0;
}

.mobile-toggle:hover { background: var(--bg-4); color: var(--white); }

.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 99;
}

.sidebar-overlay.active { display: block; }

@media (max-width: 1024px) {
  .mobile-toggle { display: flex; }
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); z-index: 200; }
  .main-content { margin-left: 0; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .login-right { display: none; }
}

.td-num {
  color: var(--gray-700);
  font-size: 12px;
  font-weight: 500;
  text-align: center;
}

.token-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 130px;
}

.token-type-badge {
  font-size: 10px;
  color: var(--gray-600);
  font-weight: 500;
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.bases-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  align-items: center;
}

.badge-xs {
  padding: 2px 7px;
  font-size: 10px;
  border-radius: 4px;
  background: var(--bg-4);
  color: var(--gray-400);
  font-weight: 500;
  white-space: nowrap;
}

.badge-more {
  padding: 2px 7px;
  font-size: 10px;
  border-radius: 4px;
  background: var(--bg-5);
  color: var(--gray-500);
  font-weight: 600;
}

.limit-cell { min-width: 0; }

.limit-info {
  font-size: 12px;
  color: var(--gray-400);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.status-pill::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-pill.active {
  background: var(--green-dim);
  color: var(--green);
}
.status-pill.active::before { background: var(--green); }

.status-pill.inactive {
  background: var(--bg-4);
  color: var(--gray-500);
}
.status-pill.inactive::before { background: var(--gray-600); }

.status-pill.expired {
  background: var(--red-dim);
  color: var(--red);
}
.status-pill.expired::before { background: var(--red); }

.stat-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  opacity: 0;
  transition: opacity var(--transition);
}

.stat-card:hover::after { opacity: 1; }
.stat-card:nth-child(1)::after { background: var(--accent); }
.stat-card:nth-child(2)::after { background: var(--green); }
.stat-card:nth-child(3)::after { background: var(--yellow); }
.stat-card:nth-child(4)::after { background: var(--red); }

.data-table tbody tr:hover .mono-text { background: var(--bg-5); }
.data-table tbody tr:hover { background: rgba(255,255,255,0.03); }

.action-group .btn-ghost { color: var(--gray-600); }
.action-group .btn-ghost:hover { background: var(--bg-4); color: var(--white); }

.card-header .count-badge {
  background: var(--bg-4);
  color: var(--gray-400);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 99px;
}

@media (max-width: 1280px) {
  .token-name { max-width: 100px; }
}

@media (max-width: 640px) {
  .stats-row { grid-template-columns: 1fr; }
  .page-content { padding: 16px; }
  .topbar { padding: 0 16px; }
  .filter-bar { flex-direction: column; }
}
