/* deldown account - clean modern design */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --bg-tertiary: #1a1a1a;
  --bg-hover: #1f1f1f;
  --border: #2a2a2a;
  --border-hover: #3a3a3a;
  --text-primary: #f5f5f5;
  --text-secondary: #a0a0a0;
  --text-muted: #606060;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --accent-light: #60a5fa;
  --accent-dim: rgba(59, 130, 246, 0.12);
  --accent-dim-hover: rgba(59, 130, 246, 0.2);
  --success: #22c55e;
  --success-dim: rgba(34, 197, 94, 0.1);
  --success-border: rgba(34, 197, 94, 0.25);
  --danger: #ef4444;
  --danger-dim: rgba(239, 68, 68, 0.1);
  --danger-border: rgba(239, 68, 68, 0.25);
  --warning: #f59e0b;
  --warning-dim: rgba(245, 158, 11, 0.1);
  --warning-border: rgba(245, 158, 11, 0.25);
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 48px rgba(0, 0, 0, 0.6);
}

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  font-size: 14px;
}

/* ============================================
   NAVIGATION
   ============================================ */
.navbar {
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.navbar-brand .logo-mark {
  width: 28px;
  height: 28px;
  background: var(--accent);
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.navbar-brand .logo-mark svg {
  width: 16px;
  height: 16px;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
}

.navbar-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  transition: color 0.15s, background 0.15s;
}

.navbar-nav a:hover {
  color: var(--text-primary);
  background: var(--bg-tertiary);
}

/* ============================================
   LAYOUT
   ============================================ */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 28px;
}

.container-sm {
  max-width: 440px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================
   CARDS
   ============================================ */
.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.card-sm {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

/* ============================================
   AUTH PAGES
   ============================================ */
.auth-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 32px 24px;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px 36px;
  box-shadow: var(--shadow-lg);
}

.auth-logo {
  text-align: center;
  margin-bottom: 32px;
}

.auth-logo .logo-mark {
  width: 48px;
  height: 48px;
  background: var(--accent);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  box-shadow: 0 0 0 8px var(--accent-dim);
}

.auth-logo .logo-mark svg {
  width: 24px;
  height: 24px;
}

.auth-logo h1 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.auth-logo p {
  color: var(--text-secondary);
  font-size: 13px;
}

/* ============================================
   FORMS
   ============================================ */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.form-control {
  width: 100%;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  padding: 10px 13px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
  appearance: none;
}

.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.form-control::placeholder {
  color: var(--text-muted);
}

.form-control:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

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

.form-text {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 5px;
  line-height: 1.5;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
  white-space: nowrap;
  letter-spacing: 0.01em;
  line-height: 1;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  box-shadow: 0 2px 12px rgba(59, 130, 246, 0.35);
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-color: var(--border);
}

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

.btn-success {
  background: transparent;
  color: var(--success);
  border-color: rgba(34, 197, 94, 0.35);
}

.btn-success:hover:not(:disabled) {
  background: var(--success-dim);
}

.btn-danger {
  background: transparent;
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.35);
}

.btn-danger:hover:not(:disabled) {
  background: var(--danger-dim);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
}

.btn-ghost:hover:not(:disabled) {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.btn-sm {
  padding: 5px 11px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 11px 24px;
  font-size: 14px;
}

.btn-block {
  width: 100%;
}

/* Spinner inside button */
.btn .spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.25);
  border-top-color: rgba(255,255,255,0.85);
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
  flex-shrink: 0;
}

/* ============================================
   ALERTS
   ============================================ */
.alert {
  padding: 11px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 16px;
  border: 1px solid transparent;
  line-height: 1.5;
}

.alert:empty {
  display: none;
}

.alert-error {
  background: var(--danger-dim);
  border-color: var(--danger-border);
  color: #fca5a5;
}

.alert-success {
  background: var(--success-dim);
  border-color: var(--success-border);
  color: #86efac;
}

.alert-info {
  background: var(--accent-dim);
  border-color: rgba(59, 130, 246, 0.25);
  color: var(--accent-light);
}

.alert-warning {
  background: var(--warning-dim);
  border-color: var(--warning-border);
  color: #fcd34d;
}

/* ============================================
   DIVIDERS
   ============================================ */
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

hr.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 24px 0;
  display: block;
}

hr.divider::before,
hr.divider::after {
  display: none;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  padding: 96px 0 72px;
  text-align: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-dim);
  border: 1px solid rgba(59, 130, 246, 0.25);
  color: var(--accent-light);
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 24px;
  letter-spacing: 0.02em;
}

.hero h1 {
  font-size: 52px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.hero h1 span {
  background: linear-gradient(135deg, #60a5fa, #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  color: var(--text-secondary);
  font-size: 17px;
  max-width: 520px;
  margin: 0 auto 36px;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================
   FEATURES GRID
   ============================================ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 48px 0;
}

.feature-card {
  background: var(--bg-secondary);
  padding: 28px;
  transition: background 0.15s;
}

.feature-card:hover {
  background: var(--bg-tertiary);
}

.feature-icon-wrap {
  width: 36px;
  height: 36px;
  background: var(--accent-dim);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.feature-icon-wrap svg {
  width: 18px;
  height: 18px;
  color: var(--accent-light);
  stroke: currentColor;
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature-card h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.6;
}

/* ============================================
   PROFILE PAGE
   ============================================ */
.profile-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 40px 0 28px;
}

.avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 2px solid var(--border);
  object-fit: cover;
  background: var(--bg-tertiary);
}

.avatar-lg {
  width: 84px;
  height: 84px;
}

.profile-info h2 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.profile-info .username {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 2px;
}

.profile-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
}

.profile-tab {
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.15s;
  text-decoration: none;
  display: block;
}

.profile-tab:hover {
  color: var(--text-secondary);
}

.profile-tab.active {
  color: var(--text-primary);
  border-bottom-color: var(--accent);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* ============================================
   BADGES
   ============================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.badge-success {
  background: var(--success-dim);
  color: #86efac;
  border-color: var(--success-border);
}

.badge-danger {
  background: var(--danger-dim);
  color: #fca5a5;
  border-color: var(--danger-border);
}

.badge-info {
  background: var(--accent-dim);
  color: var(--accent-light);
  border-color: rgba(59, 130, 246, 0.25);
}

.badge-neutral {
  background: var(--bg-tertiary);
  color: var(--text-muted);
  border-color: var(--border);
}

/* ============================================
   TABLES
   ============================================ */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

thead th {
  text-align: left;
  padding: 10px 14px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border);
  background: var(--bg-primary);
}

tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}

tbody tr:hover {
  background: var(--bg-tertiary);
}

tbody td {
  padding: 11px 14px;
  color: var(--text-primary);
  vertical-align: middle;
}

tbody tr:last-child {
  border-bottom: none;
}

/* ============================================
   2FA / QR
   ============================================ */
.qr-container {
  text-align: center;
  padding: 16px 0;
}

.qr-container img {
  border-radius: var(--radius);
  background: white;
  padding: 10px;
  box-shadow: 0 0 0 1px var(--border);
}

.backup-codes {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.backup-code {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  text-align: center;
  font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--text-secondary);
}

/* ============================================
   SPINNER
   ============================================ */
@keyframes spin {
  to { transform: rotate(360deg); }
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.25);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
  display: inline-block;
}

/* ============================================
   STATS GRID (ADMIN)
   ============================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.stat-card .stat-value {
  font-size: 30px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  line-height: 1;
}

.stat-card .stat-label {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 6px;
}

/* ============================================
   PAGE HEADER
   ============================================ */
.page-header {
  padding: 36px 0 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
}

.page-header h1 {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.page-header p {
  color: var(--text-secondary);
  font-size: 13px;
  margin-top: 4px;
}

/* ============================================
   SEARCH BOX
   ============================================ */
.search-box {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}

.search-box .form-control {
  flex: 1;
}

/* ============================================
   MODAL
   ============================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 24px;
}

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px;
  max-width: 480px;
  width: 100%;
  box-shadow: var(--shadow-lg);
}

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

.modal-header h2 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 18px;
  padding: 4px;
  line-height: 1;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}

.modal-close:hover {
  color: var(--text-primary);
  background: var(--bg-tertiary);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  border-top: 1px solid var(--border);
  padding: 20px 28px;
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 64px;
}

.footer a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.footer a:hover {
  color: var(--text-secondary);
}

/* ============================================
   DISCOVERY CODE BLOCK
   ============================================ */
.code-block {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  font-size: 12px;
  color: var(--accent-light);
  word-break: break-all;
  letter-spacing: 0.01em;
}

/* ============================================
   UTILITY
   ============================================ */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-muted  { color: var(--text-secondary); font-size: 13px; }
.mt-1 { margin-top: 6px; }
.mt-2 { margin-top: 12px; }
.mt-3 { margin-top: 20px; }
.mt-4 { margin-top: 28px; }
.mb-1 { margin-bottom: 6px; }
.mb-2 { margin-bottom: 12px; }
.mb-3 { margin-bottom: 20px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 6px; }
.gap-2 { gap: 12px; }
.w-100 { width: 100%; }
.hidden { display: none !important; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 640px) {
  .hero h1 { font-size: 34px; }
  .hero p { font-size: 15px; }
  .auth-card { padding: 28px 22px; }
  .profile-header { flex-direction: column; text-align: center; }
  .backup-codes { grid-template-columns: 1fr; }
  .navbar { padding: 0 18px; }
  .container { padding: 0 18px; }
  .features-grid { grid-template-columns: 1fr; }
}
