/* ============================================================
   Code Vault FX — Portal Stylesheet v3
   Direction: Cyber (navy #050B18, gold #FFD700, cyan #00F5FF)
   Shared by: frontend/ admin/ reseller/
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Rajdhani:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── Tokens ─────────────────────────────────────────────── */
:root {
  --gold:       #FFD700;
  --gold-dim:   #FFE44D;
  --gold-faint: rgba(255,215,0,.07);
  --cyan:       #00F5FF;
  --cyan-faint: rgba(0,245,255,.07);
  --primary:    #FFD700;
  --primary-dk: #FFE44D;
  --bg:         #050B18;
  --surface:    #070D20;
  --surface2:   #0A1428;
  --card:       #070D20;
  --card-bg:    #070D20;
  --input-bg:   #0A1428;
  --border:     rgba(0,245,255,.12);
  --border-gold:rgba(255,215,0,.2);
  --muted:      #9ca3af;
  --text:       #e5e7eb;
  --text-muted: #9ca3af;
  --heading:    #ffffff;
  --sidebar-bg: #070D20;
  --sidebar-txt:#9ca3af;
  --success:    #22C55E;
  --warning:    #FFD700;
  --danger:     #ef4444;
  --info:       #00F5FF;
  --radius:     4px;
  --shadow:     0 4px 24px rgba(0,0,0,.5);
}

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }

body {
  font-family: 'Rajdhani', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.65;
}
h1,h2,h3,h4,h5 {
  font-family: 'Orbitron', sans-serif;
  color: var(--heading);
  line-height: 1.2;
}
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-dim); }

/* ── Auth Wrapper ────────────────────────────────────────── */
.auth-wrapper {
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  background: var(--bg);
  padding: 2rem 1rem 4rem;
  position: relative; overflow: hidden;
}
/* Cyan grid background */
.auth-wrapper::before {
  content: '';
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  opacity: .08;
  background-image:
    linear-gradient(rgba(0,245,255,.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,245,255,.5) 1px, transparent 1px);
  background-size: 60px 60px;
}
/* Gold radial glow */
.auth-wrapper::after {
  content: '';
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 0%,
    rgba(255,215,0,.07) 0%, transparent 65%);
}

/* ── Auth Card ───────────────────────────────────────────── */
.auth-card {
  position: relative; z-index: 1;
  background: var(--card);
  border: 1px solid var(--border-gold);
  padding: 2.5rem 2rem 2rem;
  width: 100%; max-width: 440px;
  box-shadow: 0 0 0 1px rgba(255,215,0,.05), 0 32px 80px rgba(0,0,0,.6);
  clip-path: polygon(12px 0%, 100% 0%, calc(100% - 12px) 100%, 0% 100%);
}

/* Vault icon */
.vault-icon {
  width: 64px; height: 64px; margin: 0 auto 1.25rem;
  display: flex; align-items: center; justify-content: center;
}
.vault-icon svg { width: 64px; height: 64px; }

/* Wordmark */
.auth-wordmark {
  text-align: center; margin-bottom: .75rem;
  font-family: 'Orbitron', sans-serif;
  font-size: .75rem; font-weight: 700;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--gold);
}
.auth-wordmark em { font-style: normal; color: var(--cyan); }

/* Headings inside card */
.auth-heading {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.5rem; font-weight: 900;
  color: var(--heading); text-align: center;
  letter-spacing: -.01em; margin-bottom: .35rem;
}
.auth-sub {
  font-size: .9rem; color: var(--muted);
  text-align: center; margin-bottom: 1.5rem;
  font-family: 'Rajdhani', sans-serif; font-weight: 500;
}

/* ── Auth Tab Switcher ────────────────────────────────────── */
.auth-tabs {
  display: flex;
  background: rgba(0,245,255,.04);
  border: 1px solid var(--border);
  padding: 3px; gap: 2px;
  margin-bottom: 1.5rem;
  clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
}
.auth-tab {
  flex: 1; text-align: center; padding: .42rem .25rem;
  font-family: 'Orbitron', sans-serif;
  font-size: .6rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted);
  text-decoration: none; transition: background .2s, color .2s;
}
.auth-tab:hover:not(.auth-tab--active) { color: var(--cyan); }
.auth-tab--active {
  background: var(--gold); color: #050B18;
  clip-path: polygon(6px 0%, 100% 0%, calc(100% - 6px) 100%, 0% 100%);
}

/* ── Form Elements ────────────────────────────────────────── */
.form-group { margin-bottom: 1rem; }
.form-group label {
  display: block; font-size: .65rem; font-weight: 700;
  color: var(--muted); margin-bottom: .35rem;
  text-transform: uppercase; letter-spacing: .12em;
  font-family: 'JetBrains Mono', monospace;
}
.form-control {
  width: 100%; padding: .65rem .9rem;
  border: 1px solid var(--border);
  font-size: .9rem; color: var(--heading);
  background: var(--input-bg);
  font-family: 'Rajdhani', sans-serif;
  transition: border-color .2s, box-shadow .2s;
  border-radius: 0;
}
.form-control:focus {
  outline: none;
  border-color: rgba(0,245,255,.5);
  box-shadow: 0 0 0 3px rgba(0,245,255,.08);
}
.form-control::placeholder { color: rgba(156,163,175,.4); }

input[type="text"][name="account_number"],
input[type="text"][name="ip_address"] {
  font-family: 'JetBrains Mono', monospace;
  font-size: .875rem;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }

.form-check-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.25rem; font-size: .85rem;
}
.form-check-row label {
  display: flex; align-items: center; gap: .45rem;
  color: var(--text); cursor: pointer; font-size: .85rem;
  text-transform: none; letter-spacing: 0; font-weight: 500; margin: 0;
  font-family: 'Rajdhani', sans-serif;
}
.form-check-row a { color: var(--cyan); font-size: .85rem; }
.form-check-row a:hover { color: var(--gold); }

.form-terms {
  display: flex; align-items: flex-start; gap: .5rem;
  margin-bottom: 1.25rem; font-size: .85rem; color: var(--text);
}
.form-terms a { color: var(--cyan); }

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .55rem 1.25rem;
  font-family: 'Orbitron', sans-serif;
  font-size: .7rem; font-weight: 700; cursor: pointer;
  border: 1px solid transparent; letter-spacing: .1em; text-transform: uppercase;
  transition: filter .2s, transform .1s;
  text-decoration: none; white-space: nowrap;
  clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
}
.btn:active { transform: scale(.97); }

.btn-primary {
  background: var(--gold); border-color: var(--gold);
  color: #050B18; font-weight: 700;
  box-shadow: 0 0 20px rgba(255,215,0,.25);
}
.btn-primary:hover { background: var(--gold-dim); color: #050B18; }

.btn-success  { background: var(--success); color: #050B18; border-color: var(--success); }
.btn-danger   { background: var(--danger);  color: #fff;    border-color: var(--danger); }
.btn-warning  { background: var(--warning); color: #050B18; border-color: var(--warning); }

.btn-outline {
  background: transparent; border-color: var(--border); color: var(--text);
  clip-path: polygon(6px 0%, 100% 0%, calc(100% - 6px) 100%, 0% 100%);
}
.btn-outline:hover { border-color: var(--cyan); color: var(--cyan); }

.btn-sm   { padding: .28rem .6rem; font-size: .6rem; }
.btn-block { width: 100%; }

/* Full-width auth CTA button */
.btn-vault {
  width: 100%; padding: .85rem 1.5rem;
  background: var(--gold);
  border: 1px solid var(--gold);
  color: #050B18; font-weight: 700; font-size: .75rem;
  font-family: 'Orbitron', sans-serif;
  letter-spacing: .15em; text-transform: uppercase;
  cursor: pointer; transition: background .2s, box-shadow .2s;
  margin-top: .25rem;
  clip-path: polygon(12px 0%, 100% 0%, calc(100% - 12px) 100%, 0% 100%);
  box-shadow: 0 0 24px rgba(255,215,0,.3);
}
.btn-vault:hover { background: var(--gold-dim); box-shadow: 0 0 32px rgba(255,215,0,.45); }

/* ── Theme Toggle Pill (kept for compat, hidden in cyber theme) */
.theme-pill {
  position: relative; z-index: 1;
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .28rem .8rem .28rem .55rem;
  border: 1px solid var(--border); background: var(--card);
  color: var(--muted); font-size: .75rem; font-weight: 500; cursor: pointer;
  font-family: 'Rajdhani', sans-serif;
  margin-top: 1.5rem; transition: border-color .2s;
}
.theme-pill:hover { border-color: var(--gold); }
.theme-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); flex-shrink: 0; }

/* ── Alerts ───────────────────────────────────────────────── */
.alert {
  padding: .75rem 1rem;
  font-size: .875rem; margin-bottom: 1rem;
  border: 1px solid transparent;
  font-family: 'JetBrains Mono', monospace; font-size: .8rem;
}
.alert-success { background: rgba(34,197,94,.08);  color: #4ade80; border-color: rgba(34,197,94,.2); }
.alert-danger  { background: rgba(239,68,68,.08);  color: #f87171; border-color: rgba(239,68,68,.2); }
.alert-warning { background: rgba(255,215,0,.08);  color: #FFD700; border-color: rgba(255,215,0,.2); }
.alert-info    { background: rgba(0,245,255,.08);  color: #00F5FF; border-color: rgba(0,245,255,.2); }

/* ── Status Badges ────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .2rem .6rem;
  font-size: .65rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em;
  font-family: 'JetBrains Mono', monospace;
  clip-path: polygon(6px 0%, 100% 0%, calc(100% - 6px) 100%, 0% 100%);
}
.badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; }
.badge-approved { background: rgba(34,197,94,.1);  color: #4ade80; border: 1px solid rgba(34,197,94,.2); }
.badge-approved::before { background: #4ade80; }
.badge-pending  { background: rgba(255,215,0,.1);  color: #FFD700; border: 1px solid rgba(255,215,0,.2); }
.badge-pending::before  { background: #FFD700; }
.badge-blocked  { background: rgba(239,68,68,.1);  color: #f87171; border: 1px solid rgba(239,68,68,.2); }
.badge-blocked::before  { background: #f87171; }

/* ── Layout ───────────────────────────────────────────────── */
.layout { display: flex; min-height: 100vh; }

/* ── Sidebar ──────────────────────────────────────────────── */
.sidebar {
  width: 210px; flex-shrink: 0;
  background: linear-gradient(180deg, #070D20 0%, #050B18 100%);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  border-right: 1px solid rgba(255,215,0,.12);
}

.sidebar-brand {
  padding: 1.25rem 1rem 1rem;
  display: flex; align-items: center; gap: .6rem;
  border-bottom: 1px solid rgba(0,245,255,.08);
}
.sidebar-brand svg { flex-shrink: 0; }
.sidebar-brand img { width: 36px; height: 36px; object-fit: contain; flex-shrink: 0; }
.sidebar-brand-text {
  font-family: 'Orbitron', sans-serif;
  font-size: .68rem; font-weight: 700; letter-spacing: .15em;
  text-transform: uppercase; color: var(--gold); line-height: 1.2;
}
.sidebar-brand-text em { font-style: normal; color: var(--cyan); }

.sidebar-section {
  padding: 1.1rem 1rem .35rem;
  font-size: .55rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .2em;
  color: rgba(0,245,255,.35);
  font-family: 'JetBrains Mono', monospace;
}

.sidebar-nav { flex: 1; padding: .25rem 0; }
.sidebar-nav a {
  display: flex; align-items: center; gap: .6rem;
  padding: .6rem 1rem;
  color: var(--sidebar-txt); font-size: .78rem; font-weight: 600;
  transition: background .15s, color .15s;
  text-decoration: none; position: relative;
  font-family: 'Rajdhani', sans-serif;
  letter-spacing: .05em;
}
.sidebar-nav a svg { width: 15px; height: 15px; flex-shrink: 0; opacity: .5; }
.sidebar-nav a:hover { background: rgba(0,245,255,.04); color: var(--cyan); }
.sidebar-nav a:hover svg { opacity: .85; }
.sidebar-nav a.active {
  background: rgba(255,215,0,.06);
  color: var(--gold);
}
.sidebar-nav a.active svg { opacity: 1; }
.sidebar-nav a.active::before {
  content: ''; position: absolute; left: 0; top: 20%; bottom: 20%;
  width: 2px; background: var(--gold);
}

.sidebar-badge {
  margin-left: auto; background: var(--gold); color: #050B18;
  font-size: .6rem; font-weight: 800;
  padding: .05rem .4rem; min-width: 18px; text-align: center;
  font-family: 'JetBrains Mono', monospace;
}

.sidebar-footer {
  padding: .85rem 1rem;
  border-top: 1px solid rgba(0,245,255,.08);
  display: flex; flex-direction: column; gap: .6rem;
}
.sidebar-userrow { display: flex; align-items: center; gap: .6rem; min-width: 0; }
.sidebar-avatar {
  width: 30px; height: 30px;
  background: rgba(255,215,0,.1); border: 1px solid rgba(255,215,0,.3);
  display: flex; align-items: center; justify-content: center;
  font-size: .72rem; font-weight: 700; color: var(--gold); flex-shrink: 0;
  font-family: 'Orbitron', sans-serif;
}
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-info strong {
  display: block; font-size: .75rem; color: #e5e7eb;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-family: 'Rajdhani', sans-serif; font-weight: 600;
}
.sidebar-user-info span { display: block; font-size: .65rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-signout {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: .4rem;
  background: rgba(239,68,68,.08); border: 1px solid rgba(239,68,68,.35);
  color: #f87171; font-size: .78rem; font-weight: 600;
  cursor: pointer; padding: .5rem; border-radius: 4px; font-family: inherit; white-space: nowrap;
  transition: background .15s;
}
.sidebar-signout svg { width: 14px; height: 14px; flex-shrink: 0; }
.sidebar-signout:hover { background: rgba(239,68,68,.16); color: #f87171; }

/* ── Main Content ─────────────────────────────────────────── */
.main-content { flex: 1; padding: 2rem; overflow-y: auto; min-width: 0; background: var(--bg); }

.page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 1.75rem; gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(0,245,255,.08);
}
.page-header-left h2 {
  font-size: 1.3rem; font-weight: 900; letter-spacing: .05em; color: var(--heading);
  font-family: 'Orbitron', sans-serif;
}
.page-header-left h2 em { font-style: normal; color: var(--gold); }
.page-header-left p { font-size: .85rem; color: var(--muted); margin-top: .25rem; }
.page-header h2 {
  font-size: 1.1rem; font-weight: 900; color: var(--heading);
  font-family: 'Orbitron', sans-serif; letter-spacing: .05em;
}
.page-header-actions { display: flex; gap: .6rem; align-items: center; flex-shrink: 0; }

/* ── Cards ────────────────────────────────────────────────── */
.card {
  background: var(--card); border: 1px solid var(--border);
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}
.card-header {
  padding: .85rem 1.25rem;
  border-bottom: 1px solid var(--border);
  font-weight: 700; font-size: .8rem; color: var(--heading);
  display: flex; align-items: center; justify-content: space-between;
  font-family: 'Orbitron', sans-serif; letter-spacing: .05em;
}
.card-body { padding: 1.25rem; }

/* ── Stats Grid ───────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem; margin-bottom: 1.75rem;
}
.stat-card {
  background: var(--card); border: 1px solid var(--border);
  padding: 1.25rem; box-shadow: var(--shadow);
  transition: border-color .2s;
}
.stat-card:hover { border-color: rgba(255,215,0,.25); }
.stat-card .label {
  font-size: .6rem; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .12em; margin-bottom: .5rem;
  font-family: 'JetBrains Mono', monospace;
}
.stat-card .value {
  font-family: 'Orbitron', sans-serif;
  font-size: 2rem; font-weight: 900; color: var(--heading); line-height: 1;
}
.stat-card .value-sub { font-size: .75rem; color: var(--muted); margin-top: .3rem; }
.stat-card .value-up { color: var(--success); }

/* ── Table ────────────────────────────────────────────────── */
.table-wrapper { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .875rem; }
th {
  background: rgba(255,215,0,.04);
  text-align: left; padding: .6rem .9rem;
  font-size: .6rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .12em;
  color: var(--gold); border-bottom: 1px solid var(--border);
  white-space: nowrap; font-family: 'JetBrains Mono', monospace;
}
td {
  padding: .72rem .9rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle; color: var(--text);
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(0,245,255,.02); }
td code, td .mono {
  font-family: 'JetBrains Mono', monospace;
  font-size: .82rem; color: var(--gold);
}

/* ── Plan Toggle ────────────────────────────────────────── */
.plan-toggle { display: flex; gap: .5rem; }
.plan-toggle label {
  display: flex; align-items: center; gap: .4rem;
  padding: .35rem .9rem;
  border: 1px solid var(--border); cursor: pointer;
  font-size: .85rem; color: var(--text);
  transition: border-color .2s, background .2s;
  font-family: 'Rajdhani', sans-serif;
}
.plan-toggle label:has(input:checked) {
  border-color: rgba(255,215,0,.45);
  background: rgba(255,215,0,.07);
  color: var(--gold); font-weight: 600;
}
#fields-account, #fields-ip { display: none; margin-top: .75rem; }

/* ── Status text colours ─────────────────────────────────── */
.status-active    { color: #4ade80; font-weight: 600; }
.status-pending   { color: #FFD700; }
.status-rejected  { color: #f87171; }
.status-suspended { color: #f87171; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .layout { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; border-right: none; border-bottom: 1px solid rgba(255,215,0,.12); }
  .sidebar-nav { display: flex; flex-wrap: wrap; padding: .5rem; }
  .sidebar-nav a { flex: none; border-left: none; border-bottom: 2px solid transparent; }
  .sidebar-nav a.active::before { display: none; }
  .sidebar-nav a.active { border-bottom-color: var(--gold); }
  .main-content { padding: 1.25rem; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
}

/* ── Lang switcher ─────────────────────────────────────────── */
.lang-switcher {
  display: inline-flex; align-items: center; gap: .3rem;
}
.ls-btn {
  font-family: 'Orbitron', 'JetBrains Mono', monospace;
  font-size: .6rem; font-weight: 700; letter-spacing: .1em;
  color: var(--muted, #9ca3af); text-decoration: none;
  padding: .2rem .4rem;
  transition: color .2s;
}
.ls-btn:hover { color: var(--cyan, #00F5FF); }
.ls-btn.ls-active { color: var(--gold, #FFD700); }
.ls-sep { color: var(--border, rgba(0,245,255,.2)); font-size: .7rem; }
.auth-lang {
  position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%);
  z-index: 10;
}
.hub-lang { margin: .5rem auto 0; }
.sidebar-lang { margin-top: .75rem; justify-content: center; }

