/* Quantara Edge — Shared Auth Page Styles
   Matches the website's navy/blue design system (Website/beta/styles.css)
   Referenced by all pages in PROD/auth/
*/

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

html { scroll-behavior: smooth; }

body {
  font-family: Arial, Helvetica, sans-serif;
  color: #f5f7fb;
  min-height: 100vh;
  background:
    radial-gradient(circle at 80% 10%, rgba(39, 104, 222, 0.22), transparent 22%),
    radial-gradient(circle at 15% 70%, rgba(21, 67, 154, 0.16), transparent 25%),
    linear-gradient(180deg, #030712 0%, #040a16 35%, #030711 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

/* Subtle grid overlay matching website */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 120px 120px;
  opacity: 0.18;
}

/* Radial glow accent */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
  background:
    radial-gradient(circle at 50% 0%, rgba(63, 113, 255, 0.18), transparent 36%);
}

/* ------------------------------------------------------------------ */
/* Card                                                                  */
/* ------------------------------------------------------------------ */
.auth-card {
  background: linear-gradient(180deg, rgba(11, 22, 43, 0.94), rgba(9, 18, 36, 0.90));
  border: 1px solid rgba(86, 124, 201, 0.22);
  border-radius: 18px;
  padding: 40px 36px;
  width: 100%;
  max-width: 440px;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  position: relative;
  overflow: hidden;
}

/* Top edge glow like feature cards */
.auth-card::before {
  content: "";
  position: absolute;
  inset: auto -10% -40px;
  height: 120px;
  background: radial-gradient(circle at 50% 0%, rgba(70, 145, 255, 0.12), transparent 58%);
  pointer-events: none;
}

.auth-card-wide {
  max-width: 580px;
}

.auth-card-full {
  max-width: 960px;
}

/* ------------------------------------------------------------------ */
/* Logo                                                                  */
/* ------------------------------------------------------------------ */
.auth-logo {
  text-align: center;
  margin-bottom: 30px;
  background: #000;
  border: 1px solid rgba(86, 124, 201, 0.18);
  border-radius: 12px;
  padding: 16px 24px;
}

.auth-logo img {
  width: clamp(160px, 50%, 240px);
  height: auto;
  margin: 0 auto;
  display: block;
}

/* ------------------------------------------------------------------ */
/* Typography                                                            */
/* ------------------------------------------------------------------ */
.auth-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #f5f7fb;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.auth-subtitle {
  font-size: 0.9rem;
  color: #c7d0de;
  line-height: 1.6;
  margin-bottom: 24px;
}

.section-label {
  font-size: 10px;
  font-weight: 700;
  color: rgba(73, 122, 221, 0.7);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin: 22px 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(73, 122, 221, 0.15);
}

/* ------------------------------------------------------------------ */
/* Form Elements                                                         */
/* ------------------------------------------------------------------ */
label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #c7d0de;
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

label .req { color: #f87171; margin-left: 2px; }

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
select,
textarea {
  width: 100%;
  background: rgba(5, 12, 28, 0.85);
  border: 1px solid rgba(73, 122, 221, 0.28);
  border-radius: 8px;
  color: #f5f7fb;
  padding: 10px 13px;
  font-size: 14px;
  font-family: Arial, Helvetica, sans-serif;
  margin-bottom: 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #3384ff;
  box-shadow: 0 0 0 3px rgba(51, 132, 255, 0.12);
}

input::placeholder,
textarea::placeholder {
  color: rgba(199, 208, 222, 0.35);
}

select option { background: #071120; }
textarea { resize: vertical; min-height: 80px; }

.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }

/* ------------------------------------------------------------------ */
/* Buttons                                                               */
/* ------------------------------------------------------------------ */
.btn-auth {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  padding: 0 28px;
  border-radius: 8px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  border: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  margin-top: 6px;
  text-decoration: none;
}

.btn-auth:hover { transform: translateY(-1px); }

.btn-auth-primary {
  background: linear-gradient(180deg, #3c8cff 0%, #2f78ef 100%);
  color: #f8fbff;
  box-shadow: 0 12px 28px rgba(36, 110, 238, 0.28);
}

.btn-auth-primary:hover {
  box-shadow: 0 16px 36px rgba(36, 110, 238, 0.38);
}

.btn-auth-primary:disabled {
  background: linear-gradient(180deg, #1e3a6e 0%, #182d58 100%);
  color: #4a6a9a;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* ------------------------------------------------------------------ */
/* Alerts                                                                */
/* ------------------------------------------------------------------ */
.alert {
  border-radius: 8px;
  padding: 11px 14px;
  margin-bottom: 18px;
  font-size: 13px;
  line-height: 1.5;
}

.alert-error {
  background: rgba(42, 10, 10, 0.9);
  border: 1px solid rgba(180, 60, 60, 0.45);
  color: #f87171;
}

.alert-success {
  background: rgba(5, 30, 15, 0.9);
  border: 1px solid rgba(30, 110, 60, 0.45);
  color: #4ade80;
}

.alert-info {
  background: rgba(5, 20, 45, 0.9);
  border: 1px solid rgba(51, 100, 200, 0.4);
  color: #60a5fa;
}

/* ------------------------------------------------------------------ */
/* Links row                                                             */
/* ------------------------------------------------------------------ */
.auth-links {
  text-align: center;
  margin-top: 20px;
  font-size: 13px;
  color: rgba(199, 208, 222, 0.7);
  line-height: 1.8;
}

.auth-links a {
  color: #3384ff;
  text-decoration: none;
  transition: color 0.15s;
}

.auth-links a:hover { color: #60a5fa; }

.auth-divider {
  border: none;
  border-top: 1px solid rgba(73, 122, 221, 0.15);
  margin: 14px 0;
}

/* ------------------------------------------------------------------ */
/* Password strength                                                     */
/* ------------------------------------------------------------------ */
.pw-bar {
  height: 4px;
  border-radius: 2px;
  background: rgba(73, 122, 221, 0.15);
  margin-top: -10px;
  margin-bottom: 14px;
  overflow: hidden;
}

.pw-bar-fill {
  height: 100%;
  border-radius: 2px;
  width: 0%;
  transition: width 0.2s ease, background 0.2s ease;
}

.pw-bar-label {
  font-size: 11px;
  color: rgba(199, 208, 222, 0.5);
  margin-top: -12px;
  margin-bottom: 14px;
  text-align: right;
}

/* ------------------------------------------------------------------ */
/* Info box (next steps / how it works)                                  */
/* ------------------------------------------------------------------ */
.auth-info-box {
  background: rgba(7, 17, 32, 0.8);
  border: 1px solid rgba(73, 122, 221, 0.18);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 12px;
  color: #c7d0de;
  line-height: 1.7;
  margin-bottom: 22px;
}

.auth-info-box strong { color: #60a5fa; }

/* ------------------------------------------------------------------ */
/* Step list                                                             */
/* ------------------------------------------------------------------ */
.step-list { list-style: none; }

.step-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(73, 122, 221, 0.1);
  font-size: 13px;
  color: #c7d0de;
  line-height: 1.4;
}

.step-list li:last-child { border-bottom: none; }

.step-num {
  background: rgba(73, 122, 221, 0.18);
  color: #3384ff;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

.step-num.done {
  background: rgba(74, 222, 128, 0.15);
  color: #4ade80;
}

/* ------------------------------------------------------------------ */
/* Referral locked display                                              */
/* ------------------------------------------------------------------ */
.referral-locked {
  background: rgba(5, 12, 28, 0.85);
  border: 1px solid rgba(74, 222, 128, 0.3);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 15px;
  color: #4ade80;
  font-weight: 700;
  letter-spacing: 2px;
  margin-bottom: 14px;
}

/* ------------------------------------------------------------------ */
/* Dashboard specific                                                    */
/* ------------------------------------------------------------------ */
.dash-topbar {
  background: rgba(2, 8, 19, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(73, 122, 221, 0.18);
  padding: 0 28px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
}

.dash-topbar-logo img {
  height: 32px;
  width: auto;
}

.dash-topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.dash-user-name {
  font-size: 13px;
  color: rgba(199, 208, 222, 0.8);
}

.btn-nav-dash {
  display: inline-flex;
  align-items: center;
  background: rgba(11, 22, 43, 0.7);
  border: 1px solid rgba(86, 124, 201, 0.22);
  border-radius: 8px;
  color: #c7d0de;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
  font-family: Arial, Helvetica, sans-serif;
}

.btn-nav-dash:hover {
  background: rgba(51, 132, 255, 0.15);
  border-color: rgba(51, 132, 255, 0.4);
  color: #f5f7fb;
}

.btn-nav-danger {
  background: rgba(42, 10, 10, 0.6);
  border-color: rgba(180, 60, 60, 0.35);
  color: #f87171;
}

.btn-nav-danger:hover {
  background: rgba(60, 15, 15, 0.8);
  border-color: rgba(200, 80, 80, 0.5);
}

.dash-container {
  width: min(960px, calc(100% - 48px));
  margin: 0 auto;
  padding: 36px 0;
}

.dash-page-title {
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #f5f7fb;
  margin-bottom: 4px;
}

.dash-page-sub {
  font-size: 13px;
  color: rgba(199, 208, 222, 0.55);
  margin-bottom: 32px;
}

.dash-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.dash-card {
  background: linear-gradient(180deg, rgba(11, 22, 43, 0.88), rgba(9, 18, 36, 0.80));
  border: 1px solid rgba(86, 124, 201, 0.20);
  border-radius: 14px;
  padding: 22px 24px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

.dash-card-title {
  font-size: 10px;
  font-weight: 700;
  color: rgba(73, 122, 221, 0.6);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(73, 122, 221, 0.12);
}

.points-number {
  font-size: 52px;
  font-weight: 800;
  color: #f5f7fb;
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 4px;
}

.points-sub {
  font-size: 13px;
  color: rgba(199, 208, 222, 0.6);
  margin-bottom: 16px;
}

.points-sub strong { color: #4ade80; }

.redeem-row { display: flex; gap: 8px; align-items: flex-end; margin-top: 14px; }

.redeem-row input[type="number"] {
  flex: 1;
  margin-bottom: 0;
  -moz-appearance: textfield;
}

.redeem-row input::-webkit-inner-spin-button,
.redeem-row input::-webkit-outer-spin-button { -webkit-appearance: none; }

.btn-redeem {
  background: rgba(74, 222, 128, 0.15);
  border: 1px solid rgba(74, 222, 128, 0.35);
  color: #4ade80;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  font-family: Arial, Helvetica, sans-serif;
  transition: background 0.15s;
}

.btn-redeem:hover { background: rgba(74, 222, 128, 0.25); }

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 12px;
}

.status-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.badge-active   { background: rgba(5, 30, 15, 0.9); color: #4ade80; border: 1px solid rgba(30, 110, 60, 0.45); }
.badge-inactive { background: rgba(42, 10, 10, 0.9); color: #f87171; border: 1px solid rgba(180, 60, 60, 0.45); }
.badge-unknown  { background: rgba(20, 20, 30, 0.9); color: #94a3b8; border: 1px solid rgba(100, 120, 160, 0.3); }

.sub-detail { font-size: 13px; color: rgba(199, 208, 222, 0.7); line-height: 1.6; }
.sub-detail strong { color: #c7d0de; }
.sub-detail a { color: #3384ff; text-decoration: none; }

.ref-code-display {
  background: rgba(5, 12, 28, 0.85);
  border: 1px solid rgba(51, 132, 255, 0.3);
  border-radius: 8px;
  padding: 11px 14px;
  font-size: 18px;
  font-weight: 700;
  color: #3384ff;
  letter-spacing: 3px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.ref-url {
  font-size: 11px;
  color: rgba(199, 208, 222, 0.45);
  word-break: break-all;
  margin-bottom: 10px;
}

.ref-note { font-size: 12px; color: rgba(199, 208, 222, 0.6); }
.ref-note strong { color: #4ade80; }

.copy-btn {
  background: rgba(11, 22, 43, 0.8);
  border: 1px solid rgba(86, 124, 201, 0.22);
  color: rgba(199, 208, 222, 0.7);
  border-radius: 6px;
  padding: 4px 12px;
  font-size: 11px;
  font-family: Arial, Helvetica, sans-serif;
  cursor: pointer;
  transition: all 0.15s;
}

.copy-btn:hover { border-color: rgba(51, 132, 255, 0.5); color: #f5f7fb; }
.copy-btn.copied { background: rgba(74, 222, 128, 0.15); border-color: rgba(74, 222, 128, 0.4); color: #4ade80; }

/* Referral table */
.dash-table { width: 100%; border-collapse: collapse; font-size: 13px; }

.dash-table th {
  text-align: left;
  padding: 0 12px 10px 0;
  font-size: 10px;
  font-weight: 700;
  color: rgba(73, 122, 221, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  border-bottom: 1px solid rgba(73, 122, 221, 0.15);
}

.dash-table td {
  padding: 10px 12px 10px 0;
  color: rgba(199, 208, 222, 0.8);
  border-bottom: 1px solid rgba(73, 122, 221, 0.07);
  vertical-align: middle;
}

.dash-table tr:last-child td { border-bottom: none; }

.badge-complete { color: #4ade80; font-size: 11px; font-weight: 700; }
.badge-pending  { color: #facc15; font-size: 11px; font-weight: 700; }

.empty-state {
  text-align: center;
  padding: 32px 0;
  color: rgba(199, 208, 222, 0.3);
  font-size: 13px;
}

/* ------------------------------------------------------------------ */
/* Responsive                                                            */
/* ------------------------------------------------------------------ */
@media (max-width: 640px) {
  body { padding: 24px 16px; }
  .auth-card { padding: 28px 22px; border-radius: 14px; }
  .row-2, .row-3 { grid-template-columns: 1fr; }
  .dash-grid-2 { grid-template-columns: 1fr; }
  .dash-topbar { padding: 0 16px; }
  .dash-container { padding: 24px 0; }
}
