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

:root {
  --bg: #080808;
  --bg2: #0f0f0f;
  --bg3: #161616;
  --border: rgba(255,255,255,0.06);
  --border2: rgba(255,255,255,0.12);
  --text: #e8e8e8;
  --muted: #555;
  --muted2: #888;
  --accent: #fff;
  --primary-red: #ff3e3e;
  --primary-glow: rgba(255, 62, 62, 0.3);
  --danger: #ff4444;
  --success: #3ddc84;
  --warn: #f5a623;
  --mono: 'Space Mono', monospace;
  --sans: 'DM Sans', sans-serif;
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: 44px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
}
.nav-left { display: flex; align-items: center; gap: 20px; }
.nav-brand { font-family: var(--mono); font-size: 11px; letter-spacing: 0.15em; color: var(--accent); display: flex; align-items: center; }
.brand-logo-small { height: 28px; width: auto; filter: drop-shadow(0 0 5px var(--primary-glow)); transition: transform 0.2s; }
.brand-logo-small:hover { transform: scale(1.05); }
.nav-sep { color: var(--border2); }
.nav-team { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; color: var(--muted2); }
.nav-right { display: flex; align-items: center; gap: 20px; }
.nav-btn {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em;
  color: var(--muted2); background: none; border: none; cursor: pointer;
  padding: 0; transition: color 0.15s;
}
.nav-btn:hover { color: var(--accent); }
.nav-btn.primary {
  color: var(--primary-red); border: 1px solid rgba(255,62,62,0.3);
  padding: 5px 12px; border-radius: 2px;
}
.nav-btn.primary:hover { background: rgba(255,62,62,0.1); border-color: var(--primary-red); box-shadow: 0 0 10px var(--primary-glow); }

.auth-screen {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
  z-index: 200;
  animation: fadeIn 0.4s ease-out;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); filter: blur(5px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}
.login-box {
  width: 360px;
  border: 1px solid var(--border2);
  padding: 40px;
  background: var(--bg2);
  position: relative;
  overflow: hidden;
}
.login-box::before {
  content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary-red), transparent);
  animation: borderScan 3s linear infinite;
}
@keyframes borderScan {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
.login-logo { margin-bottom: 32px; display: flex; justify-content: center; }
.brand-logo-large { height: 80px; max-height: 80px; width: auto; max-width: 100%; display: block; margin: 0 auto 24px auto; object-fit: contain; filter: drop-shadow(0 0 10px rgba(255,62,62,0.4)); animation: logoPulse 4s infinite ease-in-out; }
@keyframes logoPulse {
  0%, 100% { filter: drop-shadow(0 0 8px rgba(255,62,62,0.4)); transform: scale(1); }
  50% { filter: drop-shadow(0 0 15px rgba(255,62,62,0.6)); transform: scale(1.02); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 5px var(--primary-glow); }
  50% { box-shadow: 0 0 20px var(--primary-glow), 0 0 30px rgba(255,62,62,0.5); }
}

@keyframes shimmer {
  0% { background-position: -200px 0; }
  100% { background-position: calc(200px + 100%) 0; }
}

.page {
  animation: slideInUp 0.5s ease-out;
}

.sidebar-item {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.sidebar-item::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,62,62,0.1), transparent);
  transition: left 0.5s ease;
}

.sidebar-item:hover::before {
  left: 100%;
}

.sidebar-item:hover {
  transform: translateX(3px);
  background: rgba(255,62,62,0.05);
}

.btn {
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 0; height: 0;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.3s, height 0.3s;
}

.btn:active::after {
  width: 300px; height: 300px;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255,62,62,0.3);
}

.btn.success-btn:hover {
  box-shadow: 0 4px 12px rgba(61,220,132,0.3);
}

.btn.danger:hover {
  box-shadow: 0 4px 12px rgba(255,68,68,0.3);
}

.modal {
  animation: slideInUp 0.3s ease-out;
}

.modal-overlay {
  backdrop-filter: blur(5px);
  transition: backdrop-filter 0.3s ease;
}

.modal-overlay:not(.open) {
  backdrop-filter: blur(0);
}

.table-container {
  animation: slideInRight 0.4s ease-out;
  animation-fill-mode: both;
}

.table-container:nth-child(1) { animation-delay: 0.1s; }
.table-container:nth-child(2) { animation-delay: 0.2s; }
.table-container:nth-child(3) { animation-delay: 0.3s; }

.stat-card {
  transition: all 0.3s ease;
  cursor: pointer;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255,62,62,0.2);
}

.form-input {
  transition: all 0.2s ease;
}

.form-input:focus {
  transform: translateY(-1px);
  box-shadow: 0 0 0 2px rgba(255,62,62,0.3);
}

.action-btn {
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.action-btn:hover {
  transform: scale(1.05);
}

.action-btn.red:hover {
  box-shadow: 0 0 15px rgba(255,68,68,0.5);
}

.badge {
  animation: slideInUp 0.3s ease-out;
}

.toast {
  animation: slideInRight 0.3s ease-out;
}
.login-title { font-size: 20px; font-weight: 300; margin-bottom: 8px; }
.login-sub { font-size: 12px; color: var(--muted2); margin-bottom: 32px; }
.form-group { margin-bottom: 16px; }
.form-label { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; color: var(--muted2); display: block; margin-bottom: 8px; }
.form-input {
  width: 100%; padding: 10px 12px;
  background: var(--bg); border: 1px solid var(--border2);
  color: var(--text); font-family: var(--mono); font-size: 12px;
  outline: none; transition: border-color 0.15s;
}
.form-input:focus { border-color: rgba(255,255,255,0.3); }
.form-input::placeholder { color: var(--muted); }
.btn {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em;
  padding: 10px 20px; border: 1px solid var(--border2);
  background: none; color: var(--text); cursor: pointer;
  transition: all 0.15s; display: inline-flex; align-items: center; gap: 8px;
}
.btn:hover { 
  background: rgba(255,62,62,0.05); 
  border-color: var(--primary-red); 
  color: var(--primary-red);
  box-shadow: 0 0 15px var(--primary-glow);
  transform: translateY(-1px);
}
.btn:active { transform: translateY(0); }
.btn.full { width: 100%; justify-content: center; }
.btn.danger { border-color: rgba(255,68,68,0.3); color: var(--danger); }
.btn.danger:hover { background: rgba(255,68,68,0.05); }
.btn.success-btn { border-color: rgba(61,220,132,0.3); color: var(--success); }
.login-error { font-size: 11px; color: var(--danger); margin-top: 12px; display: none; font-family: var(--mono); }

.app { display: none; padding-top: 44px; height: 100vh; }
.app.visible { display: flex; }

.sidebar {
  width: 240px; min-width: 240px;
  background: var(--bg);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
}

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

.brand-name {
  font-family: var(--mono);
  font-weight: 700;
  letter-spacing: 0.15em;
  font-size: 13px;
  color: var(--accent);
  text-shadow: 0 0 10px var(--primary-glow);
}
.sidebar-section { margin-bottom: 24px; padding: 0 12px; }
.sidebar-label { font-family: var(--mono); font-size: 9px; letter-spacing: 0.15em; color: var(--muted); padding: 0 12px; margin-bottom: 12px; }
.sidebar-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; cursor: pointer;
  color: var(--muted2); font-size: 12px;
  transition: all 0.15s; border-radius: 4px; border: none; background: none; width: 100%; text-align: left;
  margin-bottom: 2px;
}
.sidebar-item:hover { color: var(--text); background: rgba(255,255,255,0.03); transform: translateX(4px); }
.sidebar-item.active { 
  color: var(--primary-red); 
  background: rgba(255,62,62,0.04); 
  border-right: 2px solid var(--primary-red); 
}
.sidebar-icon { width: 14px; height: 14px; opacity: 0.6; }
.sidebar-item.active .sidebar-icon { opacity: 1; }

.main { flex: 1; overflow-y: auto; padding: 32px; background: var(--bg); }

.page-header { margin-bottom: 28px; }
.page-title { font-size: 18px; font-weight: 300; margin-bottom: 4px; }
.page-sub { font-size: 12px; color: var(--muted2); font-family: var(--mono); }

.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 28px; }
.stat-card { 
  background: var(--bg2); 
  border: 1px solid var(--border); 
  padding: 20px; 
  transition: all 0.2s;
  position: relative;
}
.stat-card:hover {
  border-color: var(--primary-red);
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.stat-label { font-family: var(--mono); font-size: 9px; letter-spacing: 0.12em; color: var(--muted2); margin-bottom: 12px; }
.stat-value { font-family: var(--mono); font-size: 22px; color: var(--accent); transition: color 0.2s; }
.stat-card:hover .stat-value { color: var(--primary-red); }
.stat-sub { font-size: 11px; color: var(--muted2); margin-top: 6px; }

.table-container { background: var(--bg2); border: 1px solid var(--border); }
.table-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.table-title { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; color: var(--muted2); }
.table-actions { display: flex; gap: 10px; }
table { width: 100%; border-collapse: collapse; }
th { font-family: var(--mono); font-size: 9px; letter-spacing: 0.1em; color: var(--muted); font-weight: 400; text-align: left; padding: 10px 20px; border-bottom: 1px solid var(--border); }
td { padding: 12px 20px; font-size: 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr { animation: slideIn 0.3s ease-out forwards; opacity: 0; }
@keyframes slideIn {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: translateX(0); }
}
tr:nth-child(1) { animation-delay: 0.05s; }
tr:nth-child(2) { animation-delay: 0.1s; }
tr:nth-child(3) { animation-delay: 0.15s; }
tr:nth-child(4) { animation-delay: 0.2s; }
tr:nth-child(5) { animation-delay: 0.25s; }
tr:hover td { background: rgba(255,255,255,0.01); }
.key-mono { font-family: var(--mono); font-size: 11px; color: var(--muted2); letter-spacing: 0.05em; }
.badge {
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.08em;
  padding: 3px 8px; border-radius: 2px; display: inline-block;
}
.badge-active { background: rgba(61,220,132,0.1); color: var(--success); border: 1px solid rgba(61,220,132,0.2); }
.badge-expired { background: rgba(255,68,68,0.1); color: var(--danger); border: 1px solid rgba(255,68,68,0.2); }
.badge-paused { background: rgba(245,166,35,0.08); color: var(--warn); border: 1px solid rgba(245,166,35,0.2); }

.search-bar {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg); border: 1px solid var(--border2);
  padding: 8px 14px; margin-bottom: 20px;
}
.search-bar input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--text); font-family: var(--mono); font-size: 11px;
}
.search-bar input::placeholder { color: var(--muted); }
.search-icon { color: var(--muted); font-size: 11px; }

.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.7);
  display: none; align-items: center; justify-content: center;
  z-index: 300;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--bg2); border: 1px solid var(--border2);
  width: 480px; max-height: 90vh; overflow-y: auto;
  animation: modalIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-head { padding: 20px 24px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.modal-title { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; color: var(--muted2); }
.modal-close { background: none; border: none; color: var(--muted2); cursor: pointer; font-family: var(--mono); font-size: 16px; line-height: 1; }
.modal-close:hover { color: var(--accent); }
.modal-body { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
select.form-input { cursor: pointer; }
option { background: var(--bg2); }

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

.hwid-chip {
  font-family: var(--mono); font-size: 10px; 
  background: rgba(255,255,255,0.04); border: 1px solid var(--border2);
  padding: 3px 8px; display: inline-block; margin: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px;
}

.code-block {
  background: var(--bg3); border: 1px solid var(--border);
  padding: 16px 20px; font-family: var(--mono); font-size: 11px;
  color: var(--muted2); line-height: 1.8; overflow-x: auto;
  margin-bottom: 16px; position: relative;
}
.code-block .kw { color: #cc99cd; }
.code-block .str { color: #7ec8a0; }
.code-block .num { color: #f5a623; }
.code-block .comment { color: #555; }
.copy-btn {
  position: absolute; top: 10px; right: 10px;
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.08em;
  background: var(--bg2); border: 1px solid var(--border2);
  color: var(--muted2); padding: 4px 10px; cursor: pointer;
}
.copy-btn:hover { color: var(--accent); }
.endpoint-card { background: var(--bg2); border: 1px solid var(--border); padding: 16px 20px; margin-bottom: 12px; }
.endpoint-method { font-family: var(--mono); font-size: 10px; color: var(--success); margin-right: 10px; }
.endpoint-path { font-family: var(--mono); font-size: 11px; color: var(--muted2); }
.endpoint-desc { font-size: 11px; color: var(--muted2); margin-top: 6px; }
.api-key-display {
  font-family: var(--mono); font-size: 11px;
  background: var(--bg3); border: 1px solid var(--border);
  padding: 12px 16px; word-break: break-all; color: var(--muted2);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border2); }

.action-btn {
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.08em;
  background: none; border: 1px solid var(--border);
  color: var(--muted2); padding: 4px 10px; cursor: pointer;
  transition: all 0.1s;
}
.action-btn:hover { border-color: var(--border2); color: var(--accent); }
.action-btn.red { color: rgba(255,68,68,0.7); border-color: rgba(255,68,68,0.2); }
.action-btn.red:hover { background: rgba(255,68,68,0.05); color: var(--danger); }

.toast {
  position: fixed; bottom: 24px; right: 24px;
  background: var(--bg2); border: 1px solid var(--border2);
  padding: 12px 18px; font-family: var(--mono); font-size: 11px; color: var(--muted2);
  transform: translateY(100px); opacity: 0; transition: all 0.2s;
  z-index: 999;
}
.toast.show { transform: translateY(0); opacity: 1; }

.empty { text-align: center; padding: 60px 20px; color: var(--muted); font-family: var(--mono); font-size: 11px; }

.auth-link {
  font-size: 11px; color: var(--muted2); text-align: center; margin-top: 20px; cursor: pointer;
}
.auth-link:hover { color: var(--accent); }

/* ── Liquid Glass Effect ──────────────────────────────────────── */
.auth-screen {
  background: radial-gradient(ellipse at 30% 20%, rgba(255,62,62,0.08) 0%, transparent 50%),
              radial-gradient(ellipse at 70% 80%, rgba(120,80,255,0.06) 0%, transparent 50%),
              var(--bg);
}
.login-box {
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  background: rgba(15, 15, 15, 0.65);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5),
              inset 0 1px 0 rgba(255,255,255,0.06),
              inset 0 -1px 0 rgba(0,0,0,0.3);
  border-radius: 16px;
  position: relative;
  overflow: hidden;
}
.login-box::after {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(ellipse at 30% 30%, rgba(255,255,255,0.03) 0%, transparent 60%);
  pointer-events: none;
}

/* ── Registration Wizard ─────────────────────────────────────── */
.reg-wizard { width: 400px; }
.wizard-progress { margin-bottom: 24px; }
.wizard-bar {
  height: 3px; background: rgba(255,255,255,0.06); border-radius: 2px; overflow: hidden;
}
.wizard-bar-fill {
  height: 100%; width: 20%;
  background: linear-gradient(90deg, var(--primary-red), #ff6b6b);
  border-radius: 2px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.wizard-steps-label {
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.1em;
  color: var(--muted); margin-top: 8px; text-align: center;
}
.wizard-container { position: relative; overflow: hidden; min-height: 140px; }
.wizard-step {
  display: none; opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.wizard-step.active {
  display: block; opacity: 1; transform: translateX(0);
}
.wizard-step.exit-left {
  display: block; opacity: 0; transform: translateX(-30px);
  position: absolute; top: 0; left: 0; right: 0;
}
.wizard-step.enter-right {
  display: block; opacity: 0; transform: translateX(30px);
}

/* Avatar Preview */
.avatar-preview {
  width: 100px; height: 100px; border-radius: 50%;
  background: rgba(255,255,255,0.04); border: 2px solid rgba(255,62,62,0.3);
  display: inline-flex; align-items: center; justify-content: center;
  overflow: hidden; position: relative;
  box-shadow: 0 0 20px rgba(255,62,62,0.15);
  transition: border-color 0.3s, box-shadow 0.3s;
}
.avatar-preview:hover {
  border-color: rgba(255,62,62,0.6);
  box-shadow: 0 0 30px rgba(255,62,62,0.25);
}
.avatar-preview span {
  font-size: 32px; color: var(--muted); font-family: var(--mono);
}
.avatar-preview img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
}

/* Glass effect on stat cards too */
.stat-card {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(15,15,15,0.5);
}

/* Glass effect on modals */
.modal {
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  background: rgba(15,15,15,0.7);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
}

/* ── iOS 26 Liquid Glass System ───────────────────────────────── */

/* Shared glass surface */
.btn,
.action-btn,
.nav-btn,
.sidebar-item,
.form-input,
select.form-input {
  border-radius: 10px;
}

/* ─── Buttons (.btn) ─── */
.btn {
  backdrop-filter: blur(16px) saturate(1.6) brightness(1.1);
  -webkit-backdrop-filter: blur(16px) saturate(1.6) brightness(1.1);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 1px 3px rgba(0,0,0,0.3),
              inset 0 1px 0 rgba(255,255,255,0.06),
              inset 0 -1px 0 rgba(0,0,0,0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(255,255,255,0.08) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  border-radius: inherit;
}
.btn:hover {
  background: rgba(255,62,62,0.08);
  border-color: rgba(255,62,62,0.25);
  box-shadow: 0 4px 20px rgba(255,62,62,0.15),
              0 0 40px rgba(255,62,62,0.06),
              inset 0 1px 0 rgba(255,255,255,0.1),
              inset 0 -1px 0 rgba(0,0,0,0.1);
  transform: translateY(-1px);
}
.btn:hover::before { opacity: 1; }
.btn:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 1px 8px rgba(255,62,62,0.2),
              inset 0 2px 4px rgba(0,0,0,0.2);
  transition-duration: 0.1s;
}

.btn.success-btn {
  border-color: rgba(61,220,132,0.15);
}
.btn.success-btn:hover {
  background: rgba(61,220,132,0.08);
  border-color: rgba(61,220,132,0.3);
  box-shadow: 0 4px 20px rgba(61,220,132,0.15),
              0 0 40px rgba(61,220,132,0.06),
              inset 0 1px 0 rgba(255,255,255,0.1);
}

.btn.danger {
  border-color: rgba(255,68,68,0.15);
}
.btn.danger:hover {
  background: rgba(255,68,68,0.08);
  border-color: rgba(255,68,68,0.3);
  box-shadow: 0 4px 20px rgba(255,68,68,0.15),
              0 0 40px rgba(255,68,68,0.06),
              inset 0 1px 0 rgba(255,255,255,0.1);
}

/* ─── Action Buttons ─── */
.action-btn {
  backdrop-filter: blur(10px) saturate(1.4);
  -webkit-backdrop-filter: blur(10px) saturate(1.4);
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 1px 2px rgba(0,0,0,0.2),
              inset 0 1px 0 rgba(255,255,255,0.04);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 8px;
}
.action-btn:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.15);
  box-shadow: 0 4px 16px rgba(255,255,255,0.05),
              inset 0 1px 0 rgba(255,255,255,0.08);
  transform: translateY(-1px) scale(1.02);
}
.action-btn:active {
  transform: scale(0.96);
  transition-duration: 0.08s;
}
.action-btn.red {
  border-color: rgba(255,68,68,0.15);
}
.action-btn.red:hover {
  background: rgba(255,68,68,0.08);
  border-color: rgba(255,68,68,0.3);
  box-shadow: 0 4px 16px rgba(255,68,68,0.15),
              0 0 30px rgba(255,68,68,0.05),
              inset 0 1px 0 rgba(255,255,255,0.06);
}

/* ─── Nav Buttons ─── */
.nav-btn {
  border-radius: 8px;
  padding: 5px 12px;
  backdrop-filter: blur(10px) saturate(1.3);
  -webkit-backdrop-filter: blur(10px) saturate(1.3);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-btn:hover {
  background: rgba(255,255,255,0.06);
  box-shadow: 0 2px 12px rgba(255,255,255,0.04),
              inset 0 1px 0 rgba(255,255,255,0.06);
}
.nav-btn.primary {
  background: rgba(255,62,62,0.06);
  backdrop-filter: blur(12px) saturate(1.5);
  border-radius: 8px;
}
.nav-btn.primary:hover {
  background: rgba(255,62,62,0.12);
  box-shadow: 0 4px 20px rgba(255,62,62,0.2),
              0 0 40px rgba(255,62,62,0.08),
              inset 0 1px 0 rgba(255,255,255,0.08);
  transform: translateY(-1px);
}

/* ─── Sidebar Items ─── */
.sidebar-item {
  border-radius: 8px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.sidebar-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(255,62,62,0.12) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
  border-radius: inherit;
}
.sidebar-item:hover {
  background: rgba(255,255,255,0.04);
  box-shadow: 0 2px 10px rgba(0,0,0,0.15),
              inset 0 1px 0 rgba(255,255,255,0.04);
  transform: translateX(3px);
}
.sidebar-item:hover::before { opacity: 1; }
.sidebar-item.active {
  background: rgba(255,62,62,0.06);
  border: 1px solid rgba(255,62,62,0.12);
  border-right: 2px solid var(--primary-red);
  box-shadow: 0 2px 16px rgba(255,62,62,0.08),
              inset 0 1px 0 rgba(255,255,255,0.04);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.sidebar-item.active::before { opacity: 0.6; }
.sidebar-item:active {
  transform: scale(0.97);
  transition-duration: 0.08s;
}

/* ─── Stat Cards ─── */
.stat-card {
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  background: rgba(15,15,15,0.5);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3),
              inset 0 1px 0 rgba(255,255,255,0.04);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.stat-card::after {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(ellipse at 30% 20%, rgba(255,255,255,0.03) 0%, transparent 50%);
  pointer-events: none;
  transition: opacity 0.35s ease;
  opacity: 0;
}
.stat-card:hover {
  border-color: rgba(255,62,62,0.2);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4),
              0 0 30px rgba(255,62,62,0.06),
              inset 0 1px 0 rgba(255,255,255,0.08);
}
.stat-card:hover::after { opacity: 1; }

/* ─── Table Containers ─── */
.table-container {
  backdrop-filter: blur(12px) saturate(1.3);
  -webkit-backdrop-filter: blur(12px) saturate(1.3);
  background: rgba(15,15,15,0.55);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25),
              inset 0 1px 0 rgba(255,255,255,0.03);
  overflow: hidden;
}

/* ─── Badges ─── */
.badge {
  border-radius: 6px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: all 0.2s ease;
}
.badge-active {
  background: rgba(61,220,132,0.08);
  border: 1px solid rgba(61,220,132,0.15);
  box-shadow: 0 0 8px rgba(61,220,132,0.08);
}
.badge-expired {
  background: rgba(255,68,68,0.08);
  border: 1px solid rgba(255,68,68,0.15);
  box-shadow: 0 0 8px rgba(255,68,68,0.08);
}
.badge-paused {
  background: rgba(245,166,35,0.06);
  border: 1px solid rgba(245,166,35,0.15);
  box-shadow: 0 0 8px rgba(245,166,35,0.06);
}

/* ─── Form Inputs ─── */
.form-input {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: rgba(8,8,8,0.7);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.3),
              inset 0 0 0 rgba(255,62,62,0);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.form-input:focus {
  border-color: rgba(255,62,62,0.3);
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.2),
              0 0 0 3px rgba(255,62,62,0.08),
              0 0 20px rgba(255,62,62,0.05);
  transform: none;
}
.form-input:hover:not(:focus) {
  border-color: rgba(255,255,255,0.1);
}

/* ─── Toast ─── */
.toast {
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  background: rgba(15,15,15,0.7);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4),
              inset 0 1px 0 rgba(255,255,255,0.06);
}

/* ─── Login Box refinements ─── */
.login-box {
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.07);
  box-shadow: 0 16px 64px rgba(0,0,0,0.6),
              0 0 80px rgba(255,62,62,0.04),
              inset 0 1px 0 rgba(255,255,255,0.06),
              inset 0 -1px 0 rgba(0,0,0,0.4);
}

/* ─── Nav Bar ─── */
nav {
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  background: rgba(8,8,8,0.75);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 1px 12px rgba(0,0,0,0.3);
}

/* ─── Sidebar ─── */
.sidebar {
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  background: rgba(8,8,8,0.8);
  border-right: 1px solid rgba(255,255,255,0.05);
}

/* ─── Search Bar ─── */
.search-bar {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: rgba(8,8,8,0.6);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  transition: all 0.25s ease;
}
.search-bar:focus-within {
  border-color: rgba(255,62,62,0.2);
  box-shadow: 0 0 0 3px rgba(255,62,62,0.06),
              0 0 20px rgba(255,62,62,0.04);
}

/* ─── HWID Chip ─── */
.hwid-chip {
  border-radius: 6px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* ─── Code Block ─── */
.code-block {
  border-radius: 10px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: rgba(22,22,22,0.7);
}
.copy-btn {
  border-radius: 6px;
  backdrop-filter: blur(8px);
  transition: all 0.2s ease;
}
.copy-btn:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.15);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* ─── Endpoint Cards ─── */
.endpoint-card {
  border-radius: 10px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: rgba(15,15,15,0.5);
  border: 1px solid rgba(255,255,255,0.05);
  transition: all 0.2s ease;
}
.endpoint-card:hover {
  border-color: rgba(255,255,255,0.1);
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}

/* ─── Modal glass refinement ─── */
.modal {
  border-radius: 16px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6),
              0 0 60px rgba(255,62,62,0.03),
              inset 0 1px 0 rgba(255,255,255,0.06);
}
.modal-overlay {
  backdrop-filter: blur(8px) brightness(0.6);
  -webkit-backdrop-filter: blur(8px) brightness(0.6);
}

/* ─── Wizard Glass ─── */
.wizard-bar {
  border-radius: 4px;
  overflow: hidden;
  background: rgba(255,255,255,0.04);
}
.wizard-bar-fill {
  box-shadow: 0 0 12px rgba(255,62,62,0.4);
}

/* ─── Avatar Preview Glass ─── */
.avatar-preview {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: rgba(255,255,255,0.03);
  border: 2px solid rgba(255,62,62,0.2);
  box-shadow: 0 4px 24px rgba(255,62,62,0.1),
              inset 0 1px 0 rgba(255,255,255,0.04);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.avatar-preview:hover {
  border-color: rgba(255,62,62,0.5);
  box-shadow: 0 8px 32px rgba(255,62,62,0.2),
              0 0 50px rgba(255,62,62,0.08),
              inset 0 1px 0 rgba(255,255,255,0.06);
  transform: scale(1.03);
}

/* ─── API Key Display ─── */
.api-key-display {
  border-radius: 10px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: rgba(22,22,22,0.6);
  border: 1px solid rgba(255,255,255,0.06);
}
