/* NexusCorp Design System */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,600;9..40,700&display=swap');

:root {
  --color-bg: #0b0f1a;
  --color-surface: #111827;
  --color-surface-2: #1a2235;
  --color-border: #1e2d47;
  --color-accent: #3b82f6;
  --color-accent-hover: #2563eb;
  --color-accent-subtle: rgba(59,130,246,0.12);
  --color-text: #f1f5f9;
  --color-text-muted: #94a3b8;
  --color-text-dim: #64748b;
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-danger: #ef4444;
  --radius: 10px;
  --radius-lg: 16px;
  --font-body: 'Inter', sans-serif;
  --font-display: 'DM Sans', sans-serif;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-card: 0 1px 3px rgba(0,0,0,0.3), 0 8px 32px rgba(0,0,0,0.2);
}

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

html { scroll-behavior: smooth; }

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

a { color: var(--color-accent); text-decoration: none; }
a:hover { color: var(--color-accent-hover); }

/* ─── NAV ─── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(11,15,26,0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-border);
  padding: 0 2rem;
  height: 64px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-weight: 700; font-size: 1.2rem;
  color: var(--color-text); letter-spacing: -0.02em;
}
.nav-links { display: flex; gap: 2rem; align-items: center; }
.nav-links a { color: var(--color-text-muted); font-size: 0.9rem; font-weight: 500; transition: color 0.2s; }
.nav-links a:hover { color: var(--color-text); }
.nav-cta {
  background: var(--color-accent); color: #fff !important; 
  padding: 8px 18px; border-radius: 8px; font-weight: 600; font-size: 0.85rem !important;
  transition: background 0.2s, transform 0.15s !important;
}
.nav-cta:hover { background: var(--color-accent-hover) !important; transform: translateY(-1px); }

/* ─── HERO ─── */
.hero {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 120px 2rem 80px;
  position: relative; overflow: hidden;
  text-align: center;
}
.hero-glow {
  position: absolute; top: -200px; left: 50%; transform: translateX(-50%);
  width: 900px; height: 600px;
  background: radial-gradient(ellipse at center, rgba(59,130,246,0.15) 0%, transparent 70%);
  pointer-events: none;
}
.hero-grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(30,45,71,0.4) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30,45,71,0.4) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black, transparent);
  pointer-events: none;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--color-accent-subtle); border: 1px solid rgba(59,130,246,0.3);
  color: #93c5fd; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.05em;
  padding: 5px 14px; border-radius: 999px; margin-bottom: 1.5rem; text-transform: uppercase;
}
.hero h1 {
  font-family: var(--font-display); font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700; line-height: 1.1; letter-spacing: -0.03em;
  margin-bottom: 1.25rem; max-width: 800px;
}
.hero h1 span { color: var(--color-accent); }
.hero p {
  color: var(--color-text-muted); font-size: clamp(1rem, 2vw, 1.2rem);
  max-width: 560px; margin: 0 auto 2.5rem;
}
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: 8px; font-weight: 600; font-size: 0.95rem;
  cursor: pointer; border: none; transition: all 0.2s; text-decoration: none;
  font-family: var(--font-body);
}
.btn-primary { background: var(--color-accent); color: #fff; }
.btn-primary:hover { background: var(--color-accent-hover); transform: translateY(-1px); box-shadow: 0 4px 20px rgba(59,130,246,0.4); color: #fff; }
.btn-outline { background: transparent; color: var(--color-text); border: 1px solid var(--color-border); }
.btn-outline:hover { background: var(--color-surface); color: var(--color-text); border-color: var(--color-text-dim); }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }

/* ─── SECTIONS ─── */
.section { padding: 100px 2rem; max-width: 1200px; margin: 0 auto; }
.section-label {
  color: var(--color-accent); font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 0.75rem;
}
.section-title {
  font-family: var(--font-display); font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 700; letter-spacing: -0.025em; margin-bottom: 1rem;
}
.section-subtitle { color: var(--color-text-muted); font-size: 1.05rem; max-width: 560px; }

/* ─── STATS ─── */
.stats-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem; margin-top: 4rem;
}
.stat-card {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: 2rem; text-align: center;
  transition: border-color 0.2s, transform 0.2s;
}
.stat-card:hover { border-color: var(--color-accent); transform: translateY(-2px); }
.stat-card .number {
  font-family: var(--font-display); font-size: 2.5rem; font-weight: 700;
  color: var(--color-accent); letter-spacing: -0.03em;
}
.stat-card .label { color: var(--color-text-muted); font-size: 0.9rem; margin-top: 0.25rem; }

/* ─── SERVICES ─── */
.services-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem; margin-top: 3rem;
}
.service-card {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: 2rem;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  position: relative; overflow: hidden;
}
.service-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--color-accent), transparent);
  opacity: 0; transition: opacity 0.2s;
}
.service-card:hover { border-color: rgba(59,130,246,0.4); transform: translateY(-3px); box-shadow: var(--shadow-card); }
.service-card:hover::before { opacity: 1; }
.service-icon {
  width: 48px; height: 48px; background: var(--color-accent-subtle);
  border-radius: 12px; display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.25rem; font-size: 1.4rem;
}
.service-card h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 0.5rem; }
.service-card p { color: var(--color-text-muted); font-size: 0.9rem; line-height: 1.6; }

/* ─── TEAM ─── */
.team-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem; margin-top: 3rem;
}
.team-card {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: 1.75rem; text-align: center;
  transition: border-color 0.2s, transform 0.2s;
}
.team-card:hover { border-color: var(--color-accent); transform: translateY(-2px); }
.team-avatar {
  width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 1rem;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem; font-weight: 700; font-family: var(--font-display);
  background: var(--color-surface-2); border: 2px solid var(--color-border);
}
.team-card h3 { font-size: 1rem; font-weight: 600; }
.team-card .role { color: var(--color-accent); font-size: 0.82rem; font-weight: 500; margin-top: 0.25rem; }
.team-card .bio { color: var(--color-text-muted); font-size: 0.84rem; margin-top: 0.75rem; line-height: 1.5; }

/* ─── DIVIDER ─── */
.divider { border: none; border-top: 1px solid var(--color-border); margin: 0; }

/* ─── FOOTER ─── */
.footer {
  background: var(--color-surface); border-top: 1px solid var(--color-border);
  padding: 3rem 2rem; text-align: center;
}
.footer-logo { margin-bottom: 1rem; }
.footer p { color: var(--color-text-dim); font-size: 0.85rem; }
.footer-links { display: flex; gap: 1.5rem; justify-content: center; margin-top: 1rem; flex-wrap: wrap; }
.footer-links a { color: var(--color-text-dim); font-size: 0.85rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--color-text); }

/* ─── LOGIN PAGE ─── */
.login-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 2rem; position: relative; overflow: hidden;
}
.login-glow {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -60%);
  width: 700px; height: 700px;
  background: radial-gradient(ellipse at center, rgba(59,130,246,0.08) 0%, transparent 65%);
  pointer-events: none;
}
.login-card {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: 2.5rem; width: 100%; max-width: 440px;
  box-shadow: var(--shadow); position: relative;
}
.login-header { text-align: center; margin-bottom: 2rem; }
.login-header h1 { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; margin-bottom: 0.4rem; }
.login-header p { color: var(--color-text-muted); font-size: 0.9rem; }
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-size: 0.85rem; font-weight: 500; margin-bottom: 0.5rem; color: var(--color-text-muted); }
.form-input {
  width: 100%; background: var(--color-bg); border: 1px solid var(--color-border);
  border-radius: 8px; padding: 11px 14px; color: var(--color-text);
  font-family: var(--font-body); font-size: 0.95rem; outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-input:focus { border-color: var(--color-accent); box-shadow: 0 0 0 3px rgba(59,130,246,0.15); }
.form-input::placeholder { color: var(--color-text-dim); }
.login-hint {
  background: var(--color-surface-2); border: 1px solid var(--color-border);
  border-radius: 8px; padding: 10px 14px; margin-bottom: 1.5rem;
  font-size: 0.82rem; color: var(--color-text-muted); line-height: 1.5;
}
.login-hint strong { color: var(--color-text); }
.btn-login {
  width: 100%; background: var(--color-accent); color: #fff; padding: 12px;
  border: none; border-radius: 8px; font-size: 1rem; font-weight: 600;
  font-family: var(--font-body); cursor: pointer; transition: background 0.2s, transform 0.15s;
}
.btn-login:hover { background: var(--color-accent-hover); transform: translateY(-1px); }
.btn-login:active { transform: none; }
.login-error {
  background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3);
  color: #fca5a5; border-radius: 8px; padding: 10px 14px;
  font-size: 0.85rem; margin-bottom: 1rem; display: none;
}
.login-back { text-align: center; margin-top: 1.5rem; }
.login-back a { color: var(--color-text-muted); font-size: 0.85rem; }
.login-back a:hover { color: var(--color-text); }

/* ─── DASHBOARD ─── */
.dash-layout { display: flex; min-height: 100vh; }
.dash-sidebar {
  width: 260px; background: var(--color-surface); border-right: 1px solid var(--color-border);
  position: fixed; top: 0; left: 0; bottom: 0; display: flex; flex-direction: column;
  padding: 0;
}
.dash-sidebar-header {
  padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--color-border);
  display: flex; align-items: center; gap: 10px;
}
.dash-nav { padding: 1rem; flex: 1; }
.dash-nav-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border-radius: 8px; color: var(--color-text-muted); font-size: 0.9rem; font-weight: 500;
  cursor: pointer; transition: background 0.15s, color 0.15s; margin-bottom: 2px;
  border: none; background: none; width: 100%; text-align: left; font-family: var(--font-body);
}
.dash-nav-item:hover { background: var(--color-surface-2); color: var(--color-text); }
.dash-nav-item.active { background: var(--color-accent-subtle); color: var(--color-accent); }
.dash-nav-item svg { opacity: 0.7; flex-shrink: 0; }
.dash-nav-item.active svg { opacity: 1; }
.dash-sidebar-footer {
  padding: 1rem 1.5rem; border-top: 1px solid var(--color-border);
  font-size: 0.82rem; color: var(--color-text-dim);
}
.dash-main { margin-left: 260px; flex: 1; padding: 2rem 2.5rem; }
.dash-topbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--color-border);
}
.dash-topbar h1 { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; }
.dash-topbar .user-pill {
  display: flex; align-items: center; gap: 8px;
  background: var(--color-surface-2); border: 1px solid var(--color-border);
  border-radius: 999px; padding: 6px 14px 6px 8px; font-size: 0.85rem;
}
.user-pill-avatar {
  width: 28px; height: 28px; border-radius: 50%; background: var(--color-accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700; color: #fff;
}
.dash-section { margin-bottom: 2.5rem; }
.dash-section-title {
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--color-text-dim); margin-bottom: 1rem;
}
.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; }
.kpi-card {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius); padding: 1.25rem;
}
.kpi-card .kpi-label { color: var(--color-text-muted); font-size: 0.8rem; font-weight: 500; margin-bottom: 0.4rem; }
.kpi-card .kpi-value { font-size: 1.6rem; font-weight: 700; font-family: var(--font-display); letter-spacing: -0.02em; }
.kpi-card .kpi-sub { color: var(--color-text-dim); font-size: 0.78rem; margin-top: 0.25rem; }
.kpi-card.accent { border-color: rgba(59,130,246,0.3); background: var(--color-accent-subtle); }
.kpi-card.accent .kpi-value { color: var(--color-accent); }

/* ─── DATA TABLE ─── */
.data-card {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); overflow: hidden;
}
.data-card-header {
  padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--color-border);
  display: flex; align-items: center; justify-content: space-between;
}
.data-card-header h3 { font-size: 0.95rem; font-weight: 600; }
.data-card-header .badge {
  background: rgba(239,68,68,0.15); color: #fca5a5; border: 1px solid rgba(239,68,68,0.3);
  border-radius: 999px; padding: 3px 10px; font-size: 0.75rem; font-weight: 600;
  display: flex; align-items: center; gap: 4px;
}
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  text-align: left; font-size: 0.75rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.07em; color: var(--color-text-dim); padding: 10px 16px;
  border-bottom: 1px solid var(--color-border);
}
.data-table td {
  padding: 13px 16px; font-size: 0.88rem; border-bottom: 1px solid rgba(30,45,71,0.6);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--color-surface-2); }
.pii-chip {
  display: inline-flex; align-items: center; gap: 5px; font-family: monospace;
  background: rgba(30,45,71,0.8); border: 1px solid var(--color-border);
  border-radius: 5px; padding: 2px 8px; font-size: 0.82rem; color: var(--color-text-muted);
}
.cc-chip {
  font-family: monospace; color: #fbbf24; letter-spacing: 0.05em; font-size: 0.84rem;
}
.hkid-chip {
  font-family: monospace; color: #a78bfa; font-size: 0.84rem;
}
.status-badge {
  display: inline-flex; align-items: center; gap: 4px;
  border-radius: 999px; padding: 3px 10px; font-size: 0.76rem; font-weight: 600;
}
.status-active { background: rgba(16,185,129,0.12); color: #6ee7b7; }
.status-inactive { background: rgba(100,116,139,0.15); color: #94a3b8; }
.sensitive-warning {
  background: rgba(245,158,11,0.08); border: 1px solid rgba(245,158,11,0.25);
  border-radius: 8px; padding: 10px 16px; display: flex; align-items: center; gap: 10px;
  font-size: 0.84rem; color: #fcd34d; margin-bottom: 1.25rem;
}
.logout-btn {
  background: none; border: 1px solid var(--color-border); color: var(--color-text-muted);
  border-radius: 7px; padding: 7px 14px; font-size: 0.84rem; font-weight: 500;
  cursor: pointer; font-family: var(--font-body); transition: all 0.2s;
}
.logout-btn:hover { background: rgba(239,68,68,0.1); border-color: rgba(239,68,68,0.4); color: #fca5a5; }

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hero h1 { font-size: 2.2rem; }
  .dash-sidebar { display: none; }
  .dash-main { margin-left: 0; padding: 1.25rem; }
  .data-table { font-size: 0.78rem; }
  .data-table th, .data-table td { padding: 10px 10px; }
  .section { padding: 60px 1.25rem; }
}

/* ─── CVV mask cell ──────────────────────────────────────────────────────────── */
.cvv-mask {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: 'DM Mono', monospace;
  font-size: 0.88rem;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
}
.cvv-reveal-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.78rem;
  padding: 1px 3px;
  line-height: 1;
  opacity: 0.6;
  transition: opacity 0.15s;
}
.cvv-reveal-btn:hover { opacity: 1; }
