@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --brand: #6366f1;
  --brand-hover: #4f46e5;
  --brand-soft: rgba(99, 102, 241, 0.12);
  --brand-glow: rgba(99, 102, 241, 0.45);
  --sidebar-bg: #0b1220;
  --sidebar-border: rgba(255, 255, 255, 0.06);
  --sidebar-text: #94a3b8;
  --sidebar-text-active: #fff;
  --surface: #ffffff;
  --surface-muted: #f8fafc;
  --page-bg: #f1f5f9;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.12);
  --sidebar-width: 268px;
  --sidebar-collapsed-width: 72px;
}

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

body {
  font-family: var(--font);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}
@keyframes pulse-glow {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50%      { opacity: 0.7; transform: scale(1.05); }
}
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

.animate-in {
  animation: fadeUp 0.5s ease both;
}
.animate-in-delay-1 { animation-delay: 0.08s; }
.animate-in-delay-2 { animation-delay: 0.16s; }
.animate-in-delay-3 { animation-delay: 0.24s; }
.animate-in-delay-4 { animation-delay: 0.32s; }

/* ── Buttons ── */
.btn-primary {
  background: linear-gradient(135deg, var(--brand), #818cf8);
  border: none;
  font-weight: 600;
  border-radius: 10px;
  padding: 0.55rem 1.1rem;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}
.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  background-size: 200% 100%;
  opacity: 0;
  transition: opacity 0.2s;
}
.btn-primary:hover::after { opacity: 1; animation: shimmer 1.2s ease; }
.btn-primary:hover, .btn-primary:focus {
  background: linear-gradient(135deg, var(--brand-hover), #6366f1);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary.copied { background: linear-gradient(135deg, var(--success), #34d399) !important; }

.btn-outline-primary {
  color: var(--brand);
  border-color: var(--border);
  font-weight: 500;
  border-radius: 10px;
}
.btn-outline-primary:hover {
  background: var(--brand-soft);
  border-color: var(--brand);
  color: var(--brand-hover);
}
.btn-light, .btn-outline-secondary {
  border-radius: 10px;
  font-weight: 500;
  border-color: var(--border);
  transition: all 0.15s ease;
}
.btn-light:hover { background: var(--surface-muted); border-color: #cbd5e1; }
.btn-dark { border-radius: 10px; font-weight: 600; }
.btn-danger, .btn-outline-danger { border-radius: 10px; font-weight: 500; }

/* ── Forms ── */
.form-control, .form-select, .input-group-text {
  border-color: var(--border);
  border-radius: 10px;
  font-size: 0.925rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-control:focus, .form-select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.form-control-lg { border-radius: 12px; padding: 0.75rem 1rem; }
.form-label { font-weight: 600; font-size: 0.875rem; color: var(--text); margin-bottom: 0.4rem; }
.form-text { color: var(--text-muted); font-size: 0.8125rem; }
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }

.url-input-wrap { position: relative; }
.url-input-wrap .form-control { padding-right: 5rem; }
.btn-paste {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.3rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
  z-index: 5;
}
.btn-paste:hover { background: var(--brand-soft); color: var(--brand); border-color: var(--brand); }

/* ── Admin shell ── */
.admin-bg {
  background: var(--page-bg);
  background-image: radial-gradient(ellipse 60% 40% at 100% 0%, rgba(99,102,241,0.04) 0%, transparent 60%);
  min-height: 100vh;
}

.admin-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background: var(--sidebar-bg);
  background-image: linear-gradient(180deg, rgba(99,102,241,0.06) 0%, transparent 40%);
  border-right: 1px solid var(--sidebar-border);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1040;
  display: flex;
  flex-direction: column;
  transition: width 0.25s ease, transform 0.25s ease;
  overflow: visible;
}

.sidebar-brand {
  padding: 1.5rem 1.25rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.sidebar-brand-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--brand), #818cf8);
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.1rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}
.sidebar-brand-text {
  color: #fff;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.sidebar-brand-sub {
  color: var(--sidebar-text);
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.sidebar-nav { padding: 0.5rem 0.75rem; flex: 1; }
.sidebar-section {
  color: #475569;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 1rem 0.75rem 0.4rem;
}
.sidebar .nav-link {
  color: var(--sidebar-text);
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
  font-size: 0.875rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 2px;
  transition: all 0.15s ease;
}
.sidebar .nav-link i { font-size: 1.05rem; opacity: 0.85; width: 1.25rem; text-align: center; }
.sidebar .nav-link:hover {
  color: var(--sidebar-text-active);
  background: rgba(255, 255, 255, 0.06);
}
.sidebar .nav-link.active {
  color: #fff;
  background: var(--brand-soft);
  box-shadow: inset 3px 0 0 var(--brand);
}
.sidebar .nav-link.active i { opacity: 1; color: #a5b4fc; }
.sidebar .nav-link.text-danger { color: #f87171 !important; }
.sidebar .nav-link.text-danger:hover { background: rgba(239, 68, 68, 0.1); }

.sidebar-footer {
  padding: 1rem 0.75rem 1.25rem;
  border-top: 1px solid var(--sidebar-border);
}

.admin-main {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.admin-topbar {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 1.25rem;
  height: 48px;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  position: sticky;
  top: 0;
  z-index: 1020;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
.topbar-left {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
  flex: 1;
}
.topbar-heading { min-width: 0; flex: 1; }
.topbar-titles {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}
.topbar-title-sep {
  color: #cbd5e1;
  font-size: 0.875rem;
  flex-shrink: 0;
  line-height: 1;
}
.admin-topbar-title {
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
  max-width: 100%;
}
.admin-topbar-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}
.topbar-btn {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.12s ease;
  text-decoration: none;
  flex-shrink: 0;
}
.topbar-btn:hover {
  background: var(--surface-muted);
  border-color: var(--border);
  color: var(--text);
}
.topbar-icon-group {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}
.topbar-divider {
  width: 1px;
  height: 24px;
  background: var(--border);
  margin: 0 0.25rem;
}
.topbar-cta {
  border-radius: 9px;
  font-size: 0.8125rem;
  padding: 0.4rem 0.85rem;
  white-space: nowrap;
}
.topbar-user {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.25rem 0.65rem 0.25rem 0.3rem;
  cursor: pointer;
  transition: all 0.12s;
}
.topbar-user:hover, .topbar-user.show {
  border-color: rgba(99, 102, 241, 0.35);
  background: #fff;
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.topbar-user.dropdown-toggle::after { display: none; }
.topbar-user-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.topbar-dropdown {
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  padding: 0.35rem;
  min-width: 200px;
  margin-top: 0.5rem !important;
}
.topbar-dropdown .dropdown-item {
  border-radius: 8px;
  font-size: 0.8125rem;
  padding: 0.45rem 0.75rem;
  font-weight: 500;
}
.topbar-dropdown .dropdown-item i { opacity: 0.7; }
.topbar-dropdown .dropdown-header {
  padding: 0.5rem 0.75rem 0.35rem;
  font-size: 0.8125rem;
}
.admin-topbar-actions { display: flex; align-items: center; gap: 0.75rem; }
.admin-user-pill {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.35rem 0.85rem 0.35rem 0.45rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
}
.admin-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), #818cf8);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}
.admin-content { padding: 1.75rem; flex: 1; }

.sidebar-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.4rem 0.6rem;
  color: var(--text);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1035;
}

/* ── Stat cards ── */
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.35rem 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s;
  height: 100%;
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand), #818cf8);
  opacity: 0;
  transition: opacity 0.2s;
}
.stat-card:hover::before { opacity: 1; }
.stat-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
  border-color: rgba(99, 102, 241, 0.2);
}
.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}
.stat-icon.indigo { background: rgba(99, 102, 241, 0.12); color: var(--brand); }
.stat-icon.emerald { background: rgba(16, 185, 129, 0.12); color: var(--success); }
.stat-icon.amber { background: rgba(245, 158, 11, 0.12); color: var(--warning); }
.stat-icon.sky { background: rgba(14, 165, 233, 0.12); color: #0ea5e9; }
.stat-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}
.stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text);
}
.stat-trend {
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: 0.35rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.stat-trend.up { color: var(--success); }
.stat-trend.neutral { color: var(--text-muted); }

/* ── Data cards & tables ── */
.data-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.data-card:hover { box-shadow: var(--shadow); }
.data-card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.data-card-title {
  font-size: 0.9375rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.01em;
}
.data-card-body { padding: 0; }
.data-card-body.padded { padding: 1.5rem; }

.table { margin-bottom: 0; font-size: 0.875rem; }
.table > thead th {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  background: var(--surface-muted);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1.25rem;
  white-space: nowrap;
}
.table > tbody td {
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--text);
  transition: background 0.12s;
}
.table > tbody tr:last-child td { border-bottom: none; }
.table > tbody tr:hover td { background: #fafbfc; }
.table .link-code {
  font-family: ui-monospace, 'Cascadia Code', monospace;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--brand);
  text-decoration: none;
  padding: 0.2rem 0.5rem;
  background: var(--brand-soft);
  border-radius: 6px;
  transition: all 0.15s;
}
.table .link-code:hover {
  color: var(--brand-hover);
  background: rgba(99, 102, 241, 0.18);
  text-decoration: none;
}
.table .url-cell {
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-muted);
  font-size: 0.8125rem;
  display: inline-block;
  vertical-align: bottom;
}
.table a.url-cell.url-link {
  color: var(--text-muted);
  text-decoration: none;
}
.table a.url-cell.url-link:hover {
  color: var(--brand);
  text-decoration: underline;
}

.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-status.on { background: rgba(16, 185, 129, 0.12); color: #059669; }
.badge-status.off { background: rgba(100, 116, 139, 0.12); color: #64748b; }
.badge-status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.badge-status.on::before { animation: pulse-glow 2s ease infinite; }

.action-group { display: flex; gap: 0.35rem; justify-content: flex-end; }
.btn-action {
  padding: 0.3rem 0.65rem;
  font-size: 0.8125rem;
  border-radius: 8px;
  font-weight: 500;
}

.search-bar { display: flex; gap: 0.5rem; align-items: center; }
.search-bar .form-control {
  min-width: 240px;
  padding-left: 2.25rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85zm-5.242 1.1a5.5 5.5 0 1 1 0-11 5.5 5.5 0 0 1 0 11z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 0.75rem center;
}

/* ── Alerts ── */
.alert {
  border-radius: 12px;
  border: none;
  font-size: 0.875rem;
  font-weight: 500;
}
.alert-danger { background: rgba(239, 68, 68, 0.1); color: #b91c1c; }
.alert-success { background: rgba(16, 185, 129, 0.1); color: #047857; }

.copy-box {
  background: linear-gradient(135deg, rgba(16,185,129,0.06), rgba(99,102,241,0.04));
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 14px;
  padding: 1.15rem;
  animation: fadeUp 0.4s ease;
}
.copy-box-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--success);
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* ── Toast ── */
.toast-copy {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: var(--text);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  opacity: 0;
  transform: translateY(12px);
  transition: all 0.25s ease;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 420px;
}
.toast-copy.show {
  opacity: 1;
  transform: translateY(0);
}

/* ── Landing page ── */
.landing-bg {
  min-height: 100vh;
  background: #0b1220;
  position: relative;
  overflow-x: hidden;
}
.landing-bg::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(99, 102, 241, 0.35) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 90% 80%, rgba(129, 140, 248, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse 40% 30% at 10% 60%, rgba(99, 102, 241, 0.1) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}
.landing-bg::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

.landing-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  animation: pulse-glow 6s ease-in-out infinite;
}
.landing-orb-1 { width: 400px; height: 400px; background: rgba(99,102,241,0.15); top: -100px; right: -100px; }
.landing-orb-2 { width: 300px; height: 300px; background: rgba(129,140,248,0.1); bottom: 10%; left: -80px; animation-delay: 3s; }

.landing-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0.5rem 0;
  border-bottom: 1px solid transparent;
  transition: all 0.25s ease;
}
.landing-nav.scrolled {
  background: rgba(11, 18, 32, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: rgba(255, 255, 255, 0.06);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
}
.landing-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.landing-brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}
.landing-nav-links {
  display: flex;
  gap: 1.5rem;
}
.landing-nav-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 500;
  transition: color 0.12s;
}
.landing-nav-links a i {
  font-size: 0.9rem;
  opacity: 0.85;
}
.landing-nav-links a:hover { color: #fff; }
.landing-brand .brand-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--brand), #818cf8);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}
.landing-card-icon i,
.lf-icon,
.lf-paste i,
.landing-features li i,
.preview-arrow i {
  display: inline-block;
  line-height: 1;
}
.landing-nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s;
}
.landing-nav-cta:hover {
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.2);
  color: #fff;
}
.landing-badge-dot {
  width: 6px;
  height: 6px;
  background: #34d399;
  border-radius: 50%;
  animation: pulse-glow 2s ease infinite;
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.6);
}

/* Landing card v2 */
.landing-card {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.3);
  padding: 1.15rem;
  backdrop-filter: blur(20px);
}
.landing-card-top {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}
.landing-card-icon {
  width: 36px;
  height: 36px;
  background: var(--brand-soft);
  color: var(--brand);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.landing-card-icon i { color: var(--brand); }
.landing-card-top h2 {
  font-size: 0.9375rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.01em;
}
.landing-card-top p {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0;
}

.landing-preview-track {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.preview-chip {
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 500;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.preview-from {
  background: #f1f5f9;
  color: var(--text-muted);
  text-decoration: line-through;
}
.preview-to {
  background: var(--brand-soft);
  color: var(--brand);
  font-family: ui-monospace, monospace;
  font-weight: 600;
}
.preview-arrow { color: var(--brand); font-size: 0.85rem; }

.landing-alert {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.75rem 0.9rem;
  border-radius: 11px;
  font-size: 0.8125rem;
  font-weight: 500;
  margin-bottom: 1rem;
}
.landing-alert-error {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #b91c1c;
}
.landing-alert i { flex-shrink: 0; margin-top: 0.1rem; }

/* Result box */
.result-box {
  background: linear-gradient(135deg, rgba(16,185,129,0.08), rgba(99,102,241,0.05));
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 14px;
  padding: 1rem;
  margin-bottom: 1.25rem;
}
.result-box-head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}
.result-box-head > i { color: var(--success); font-size: 1.35rem; }
.result-box-head strong { display: block; font-size: 0.875rem; color: var(--text); }
.result-box-head span { font-size: 0.75rem; color: var(--text-muted); }
.result-url-row {
  display: flex;
  gap: 0.5rem;
}
.result-url-input {
  flex: 1;
  padding: 0.6rem 0.85rem;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 0.8125rem;
  font-family: ui-monospace, monospace;
  font-weight: 600;
  color: var(--brand);
  background: #fff;
  min-width: 0;
}
.result-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.6rem 1rem;
  background: linear-gradient(135deg, var(--brand), #818cf8);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}
.result-copy-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(99,102,241,0.35); }
.result-copy-btn.copied { background: linear-gradient(135deg, var(--success), #34d399); }
.result-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.75rem;
}
.result-action {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0;
  transition: color 0.12s;
}
.result-action:hover { color: var(--brand); }

/* Landing form */
.landing-form { margin-top: 0; }
.lf-field { margin-bottom: 0.75rem; }
.lf-field label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
  color: var(--text);
}
.lf-input-wrap { position: relative; display: flex; align-items: center; }
.lf-icon {
  position: absolute;
  left: 0.85rem;
  color: var(--text-muted);
  font-size: 1rem;
  pointer-events: none;
  z-index: 1;
}
.lf-input {
  width: 100%;
  padding: 0.55rem 2.5rem 0.55rem 2.25rem;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 0.8125rem;
  background: var(--surface-muted);
  transition: all 0.15s;
  color: var(--text);
}
.lf-input:focus {
  outline: none;
  border-color: var(--brand);
  background: #fff;
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.lf-input.valid { border-color: var(--success); }
.lf-input.invalid { border-color: var(--danger); }
.lf-paste {
  position: absolute;
  right: 0.5rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.3rem 0.55rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.12s;
}
.lf-paste:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.lf-prefix-wrap { display: flex; align-items: stretch; }
.lf-prefix {
  display: flex;
  align-items: center;
  padding: 0 0.75rem;
  background: #f1f5f9;
  border: 1.5px solid var(--border);
  border-right: none;
  border-radius: 12px 0 0 12px;
  font-size: 0.8125rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.lf-input-prefix {
  border-radius: 0 12px 12px 0;
  padding-left: 0.85rem;
}
.lf-hint {
  font-size: 0.6875rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  min-height: 0.875rem;
}
.lf-hint.ok { color: var(--success); }
.lf-hint.err { color: var(--danger); }
.lf-submit {
  width: 100%;
  padding: 0.6rem;
  margin-top: 0.15rem;
  background: linear-gradient(135deg, var(--brand), #818cf8);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lf-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
}
.lf-submit:disabled { opacity: 0.7; cursor: not-allowed; }
.lf-kbd-hint {
  text-align: center;
  font-size: 0.6875rem;
  color: var(--text-muted);
  margin: 0.75rem 0 0;
}
.lf-kbd-hint kbd {
  background: #f1f5f9;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.1rem 0.35rem;
  font-size: 0.625rem;
}

/* How it works */
.how-section {
  padding: 2rem 0 2.5rem;
  border-top: 1px solid rgba(255,255,255,0.06);
  margin-top: 0.5rem;
}
.how-title {
  text-align: center;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  letter-spacing: -0.01em;
}
.how-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
}
.how-step {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
  transition: all 0.2s;
}
.how-step:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(99,102,241,0.25);
  transform: translateY(-2px);
}
.how-step-num {
  width: 36px;
  height: 36px;
  background: var(--brand-soft);
  color: #a5b4fc;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.875rem;
  margin: 0 auto 0.85rem;
}
.how-step h4 {
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}
.how-step p {
  color: #64748b;
  font-size: 0.8125rem;
  margin: 0;
  line-height: 1.5;
}

.landing-footer-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.landing-footer-inner a {
  color: #64748b;
  text-decoration: none;
  transition: color 0.12s;
}
.landing-footer-inner a:hover { color: #a5b4fc; }
.landing-footer-sep { color: #334155; }

.page-404-icon {
  width: 64px;
  height: 64px;
  background: rgba(99,102,241,0.15);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  color: #818cf8;
  margin: 0 auto 1.25rem;
}
.page-404 code {
  background: rgba(255,255,255,0.08);
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  color: #a5b4fc;
  font-size: 0.875rem;
}
.btn-ghost {
  border: 1px solid rgba(255,255,255,0.15) !important;
  color: #94a3b8 !important;
  border-radius: 10px;
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.08) !important;
  color: #fff !important;
}

.toast-copy.toast-error { background: #b91c1c; }

/* A11y & motion */
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

.landing-main { position: relative; z-index: 1; }

.landing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
  min-height: calc(100vh - 72px);
  padding: 1.5rem 0 2.5rem;
}

.landing-hero {
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 520px;
}
.landing-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #c7d2fe;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 0.85rem;
}
.landing-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 0.75rem;
}
.landing-hero h1 .gradient-text {
  background: linear-gradient(135deg, #a5b4fc, #818cf8, #6366f1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.landing-hero p {
  font-size: 0.9375rem;
  color: #94a3b8;
  max-width: 440px;
  line-height: 1.55;
  margin-bottom: 1.1rem;
}

.landing-stats {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  width: 100%;
  max-width: 440px;
}
.landing-stat {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  text-align: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 0.65rem 0.5rem;
  min-width: 0;
  backdrop-filter: blur(8px);
}
.landing-stat-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(99, 102, 241, 0.18);
  color: #a5b4fc;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.landing-stat-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}
.landing-stat-value {
  display: block;
  font-size: 1.125rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-align: center;
}
.landing-stat-label {
  display: block;
  font-size: 0.65rem;
  color: #64748b;
  font-weight: 500;
  margin-top: 0.1rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  text-align: center;
}

.landing-features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.85rem 0 0;
  padding: 0;
  list-style: none;
}
.landing-features li {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.6rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 999px;
  font-size: 0.72rem;
  color: #94a3b8;
  font-weight: 500;
  white-space: nowrap;
}
.landing-features li i {
  color: #818cf8;
  font-size: 0.78rem;
  flex-shrink: 0;
}

.landing-card {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(20px);
}
.landing-card-header {
  padding: 1.25rem 1.5rem 0;
  border-bottom: none;
}
.landing-card-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
  letter-spacing: -0.01em;
}
.landing-card-header p {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 0;
}

.landing-preview {
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  margin-bottom: 0.85rem;
}
.landing-preview-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}
.landing-preview-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  padding: 0.4rem 0;
}
.landing-preview-row .from { color: var(--text-muted); text-decoration: line-through; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.landing-preview-row .arrow { color: var(--brand); font-size: 1rem; flex-shrink: 0; }
.landing-preview-row .to { color: var(--brand); font-weight: 700; font-family: ui-monospace, monospace; flex-shrink: 0; }

.landing-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 1.25rem 0;
  text-align: center;
  color: #475569;
  font-size: 0.8125rem;
}

/* ── 404 page ── */
.page-404 {
  text-align: center;
  color: #fff;
  padding: 4rem 1rem;
  position: relative;
  z-index: 1;
}
.page-404-code {
  font-size: 6rem;
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1;
  background: linear-gradient(135deg, #6366f1, #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
}
.page-404 h2 { font-weight: 700; margin-bottom: 0.75rem; }
.page-404 p { color: #94a3b8; margin-bottom: 2rem; }

/* ── Login page ── */
.login-bg {
  min-height: 100vh;
  background: #0b1220;
  position: relative;
  overflow: hidden;
}
.login-bg::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(ellipse 70% 50% at 20% 40%, rgba(99, 102, 241, 0.2) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 80% 70%, rgba(129, 140, 248, 0.12) 0%, transparent 50%);
  pointer-events: none;
}
.login-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  animation: pulse-glow 8s ease-in-out infinite;
}
.login-orb-1 { width: 360px; height: 360px; background: rgba(99,102,241,0.12); top: -80px; left: -80px; }
.login-orb-2 { width: 280px; height: 280px; background: rgba(129,140,248,0.08); bottom: 5%; right: 10%; animation-delay: 4s; }

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  position: relative;
  z-index: 1;
}
.login-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  max-width: 920px;
  min-height: 520px;
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255,255,255,0.06);
}

.login-brand-panel {
  background: linear-gradient(145deg, #4f46e5 0%, #6366f1 40%, #818cf8 100%);
  padding: 2.5rem;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.login-brand-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.login-brand-inner { position: relative; color: #fff; }
.login-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: #fff;
  margin-bottom: 2rem;
}
.login-logo-icon {
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.2);
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  backdrop-filter: blur(8px);
}
.login-logo-text { font-weight: 800; font-size: 1.15rem; letter-spacing: -0.02em; }
.login-brand-title {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 1rem;
}
.gradient-text-light {
  background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.login-brand-desc {
  font-size: 0.875rem;
  opacity: 0.85;
  line-height: 1.65;
  margin-bottom: 1.75rem;
  max-width: 300px;
}
.login-features {
  list-style: none;
  padding: 0;
  margin: 0;
}
.login-features li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.8125rem;
  font-weight: 500;
  opacity: 0.9;
  margin-bottom: 0.65rem;
}
.login-features li i { color: #a5f3fc; font-size: 0.9rem; }

.login-form-panel {
  padding: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-form-inner { width: 100%; max-width: 340px; }
.login-form-head { margin-bottom: 1.75rem; }
.login-form-head h1 {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 0.35rem;
  color: var(--text);
}
.login-form-head p {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 0;
}

.login-alert {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #b91c1c;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  font-size: 0.8125rem;
  font-weight: 500;
  margin-bottom: 1.25rem;
}
.login-alert i { font-size: 1rem; flex-shrink: 0; }

.login-field { margin-bottom: 1.15rem; }
.login-field label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.4rem;
}
.login-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.login-input-icon {
  position: absolute;
  left: 0.85rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  pointer-events: none;
  z-index: 1;
}
.login-input {
  width: 100%;
  padding: 0.65rem 0.85rem 0.65rem 2.5rem;
  border: 1.5px solid var(--border);
  border-radius: 11px;
  font-size: 0.875rem;
  color: var(--text);
  background: var(--surface-muted);
  transition: all 0.15s ease;
}
.login-input-pwd { padding-right: 2.85rem; }
.login-input::placeholder { color: #94a3b8; }
.login-input:focus {
  outline: none;
  border-color: var(--brand);
  background: #fff;
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.login-toggle-pwd {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  border-radius: 8px;
  z-index: 2;
  transition: all 0.12s ease;
}
.login-toggle-pwd:hover,
.login-toggle-pwd.is-visible {
  color: var(--brand);
  border-color: var(--brand);
  background: var(--brand-soft);
}

.login-submit {
  width: 100%;
  padding: 0.7rem 1rem;
  margin-top: 0.5rem;
  background: linear-gradient(135deg, var(--brand), #818cf8);
  border: none;
  border-radius: 11px;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}
.login-submit:disabled { opacity: 0.75; cursor: not-allowed; }

.login-footer {
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}
.login-footer a {
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.12s;
}
.login-footer a:hover { color: var(--brand); }

@media (max-width: 767px) {
  .login-split { grid-template-columns: 1fr; min-height: auto; max-width: 420px; }
  .login-brand-panel { display: none; }
  .login-form-panel { padding: 2rem 1.75rem; }
}

/* legacy login classes kept for compat */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  position: relative;
  z-index: 1;
}
.login-card {
  width: 100%;
  max-width: 420px;
  background: rgba(255, 255, 255, 0.98);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  animation: fadeUp 0.5s ease;
}
.login-card-header {
  background: linear-gradient(135deg, var(--brand), #818cf8);
  padding: 2rem 2rem 1.5rem;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.login-card-body { padding: 2rem; }

/* ── Empty state ── */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-muted);
}
.empty-state i { font-size: 2.5rem; opacity: 0.4; margin-bottom: 0.75rem; display: block; }

/* ── Responsive ── */
@media (max-width: 991px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.open { display: block; }
  .admin-main { margin-left: 0; }
  .sidebar-toggle, .topbar-btn#sidebarToggle { display: inline-flex; align-items: center; }
  .admin-content { padding: 1rem; }
  .admin-topbar { padding: 0 1rem; }
  .search-bar .form-control { min-width: 160px; }
  .landing-grid { grid-template-columns: 1fr; gap: 1.25rem; min-height: auto; padding: 1rem 0 2rem; }
  .landing-hero { text-align: center; align-items: center; max-width: none; margin: 0 auto; }
  .landing-hero p { margin-left: auto; margin-right: auto; }
  .landing-stats { justify-content: center; max-width: 100%; margin: 0 auto; }
  .landing-features { justify-content: center; }
  .how-steps { grid-template-columns: 1fr; max-width: 360px; margin: 0 auto; }
  .landing-nav-links { display: none !important; }
}

@media (max-width: 575px) {
  .topbar-cta span { display: none !important; }
  .topbar-divider { display: none; }
  .admin-topbar-sub,
  .topbar-title-sep { display: none; }
  .landing-stats { gap: 0.4rem; }
  .landing-stat { flex: 1 1 calc(33.333% - 0.35rem); padding: 0.55rem 0.4rem; }
  .landing-stat-icon { width: 26px; height: 26px; font-size: 0.75rem; }
  .landing-features li { font-size: 0.68rem; }
}

/* ── Sidebar collapsed ── */
html.sidebar-collapsed {
  --sidebar-width: var(--sidebar-collapsed-width);
}
html.sidebar-collapsed .sidebar-brand-info,
html.sidebar-collapsed .sidebar-section,
html.sidebar-collapsed .nav-label { display: none; }
html.sidebar-collapsed .sidebar-brand {
  justify-content: center;
  padding: 1.15rem 0.5rem 0.75rem;
}
html.sidebar-collapsed .sidebar-collapse-btn i { transform: rotate(180deg); }
html.sidebar-collapsed .sidebar .nav-link {
  justify-content: center;
  padding: 0.65rem;
}
html.sidebar-collapsed .sidebar .nav-link i { margin: 0; font-size: 1.15rem; }
html.sidebar-collapsed .sidebar-footer .nav-link { justify-content: center; }

.sidebar-brand-info { min-width: 0; flex: 1; }

.sidebar-collapse-btn {
  position: absolute;
  top: 1.35rem;
  right: -12px;
  z-index: 1045;
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1e293b;
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: #94a3b8;
  cursor: pointer;
  font-size: 0.7rem;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  transition: all 0.15s ease;
}
.sidebar-collapse-btn i {
  display: block;
  transition: transform 0.2s ease;
}
.sidebar-collapse-btn:hover {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 2px 12px rgba(99, 102, 241, 0.45);
  transform: scale(1.08);
}
.sidebar-collapse-btn:active { transform: scale(0.96); }
html.sidebar-collapsed .sidebar-collapse-btn {
  top: 1.35rem;
  right: -12px;
  transform: none;
}
html.sidebar-collapsed .sidebar-collapse-btn:hover {
  transform: scale(1.08);
}
html.sidebar-collapsed .sidebar-collapse-btn:active {
  transform: scale(0.96);
}

.nav-label { white-space: nowrap; }

/* ── Compact admin ── */
.admin-content { padding: 1.25rem 1.5rem; }

.stat-card { padding: 1rem 1.15rem; }
.stat-card.compact .stat-value { font-size: 1.4rem; }
.stat-icon { width: 40px; height: 40px; font-size: 1.1rem; border-radius: 11px; }

.data-card-header { padding: 0.75rem 1.15rem; }
.data-card-header.py-2 { padding-top: 0.65rem !important; padding-bottom: 0.65rem !important; }
.data-card-body.padded { padding: 1.15rem; }
.data-card-body.padded.compact-form { padding: 1rem; }

.table-compact > thead th { padding: 0.5rem 1rem; font-size: 0.625rem; }
.table-compact > tbody td { padding: 0.55rem 1rem; font-size: 0.8125rem; }

.bulk-actions-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--brand-soft);
  border-bottom: 1px solid var(--border);
}
.bulk-actions-bar.d-none { display: none !important; }
.bulk-actions-bar:not(.d-none) { display: flex; }

.btn-copy-inline {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 0.15rem 0.35rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.75rem;
  vertical-align: middle;
  transition: all 0.12s;
}
.btn-copy-inline:hover { color: var(--brand); background: var(--brand-soft); }

.admin-user-avatar.sm { width: 26px; height: 26px; font-size: 0.65rem; }

.modal-compact { border-radius: 14px; border: none; }

.admin-user-pill { transition: border-color 0.15s; color: inherit; }
.admin-user-pill:hover { border-color: var(--brand); color: var(--text); }

.form-full .data-card-body.padded { padding: 1.5rem 1.75rem; }
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
  margin-top: 0.25rem;
}

@media (max-width: 991px) {
  html.sidebar-collapsed { --sidebar-width: var(--sidebar-collapsed-width); }
  .sidebar-collapse-btn { display: none !important; }
}

.perm-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}
.perm-check {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8125rem;
  margin-bottom: 0.25rem;
  cursor: pointer;
}
.perm-check input { margin: 0; }
.perm-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}
.perm-tag {
  display: inline-block;
  font-size: 0.68rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 500;
  white-space: nowrap;
}

/* ── Profile page ── */
.profile-page { max-width: 1080px; }
.profile-hero { margin-bottom: 1rem; overflow: hidden; }
.profile-hero-body {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.35rem 1.5rem;
  background: linear-gradient(135deg, rgba(99,102,241,0.08) 0%, rgba(255,255,255,0) 55%);
}
.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--brand), #818cf8);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.35);
}
.profile-hero-main { flex: 1; min-width: 0; }
.profile-hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.65rem;
}
.profile-name {
  font-size: 1.25rem;
  font-weight: 800;
  margin: 0 0 0.15rem;
  letter-spacing: -0.02em;
}
.profile-sub {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
}
.profile-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}
.profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}
.profile-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.profile-meta i { color: #94a3b8; }
.profile-hint {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 0;
}
.profile-pwd-wrap { position: relative; }
.profile-pwd-input { padding-right: 2.5rem; }
.profile-pwd-toggle {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #fff;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.12s ease;
}
.profile-pwd-toggle:hover,
.profile-pwd-toggle.is-visible {
  color: var(--brand);
  border-color: var(--brand);
  background: var(--brand-soft);
}
.profile-info-list { padding-top: 0.85rem !important; padding-bottom: 0.85rem !important; }
.profile-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.8125rem;
}
.profile-info-row:last-child { border-bottom: none; }
.profile-info-label { color: var(--text-muted); font-weight: 500; }
.profile-info-value { font-weight: 600; text-align: right; }
.profile-actions {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.profile-action {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 500;
  transition: all 0.12s ease;
}
.profile-action i {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--surface-muted);
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}
.profile-action:hover {
  border-color: rgba(99, 102, 241, 0.35);
  background: var(--brand-soft);
  color: var(--brand);
}

@media (max-width: 767px) {
  .profile-hero-body { flex-direction: column; align-items: flex-start; }
  .profile-hero-top { flex-direction: column; align-items: flex-start; }
  .profile-info-row { flex-direction: column; align-items: flex-start; gap: 0.25rem; }
  .profile-info-value { text-align: left; }
}
