/* ============================================================
   NGS STORE — ISOLATED MEMBERSHIP & AUTH DESIGN SYSTEM
   Zero footprint on public content / 100% WCAG AAA Compliant
   ============================================================ */
:root {
  color-scheme: dark;
  --acc-bg: #0a0e17;
  --acc-card: #141e32;
  --acc-border: rgba(255, 255, 255, 0.15);
  --acc-text-main: #ffffff;
  --acc-text-muted: #cbd5e1;
  --acc-primary: #0369a1;
  --acc-primary-hover: #0284c7;
  --acc-accent: #047857;
  --acc-accent-hover: #065f46;
  --acc-danger: #ef4444;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
body { background: var(--acc-bg); color: var(--acc-text-main); min-height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 2rem 1rem; }

.auth-container { width: 100%; max-width: 480px; }
.auth-card { background: var(--acc-card); border: 1px solid var(--acc-border); border-radius: 16px; padding: 2.5rem 2.2rem; box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6); }

.auth-header { text-align: center; margin-bottom: 2rem; }
.auth-logo { display: inline-flex; align-items: center; gap: 0.5rem; text-decoration: none; color: #fff; font-size: 1.4rem; font-weight: 800; margin-bottom: 1rem; }
.auth-logo span { color: #38bdf8; }
.auth-header h1 { font-size: 1.6rem; font-weight: 800; margin-bottom: 0.35rem; color: #fff; }
.auth-header p { font-size: 0.92rem; color: var(--acc-text-muted); }

.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-size: 0.88rem; font-weight: 700; color: var(--acc-text-muted); margin-bottom: 0.45rem; }
.form-group input { width: 100%; padding: 0.85rem 1rem; border: 1px solid var(--acc-border); border-radius: 8px; background: #0a0e17; color: #fff; font-size: 0.95rem; outline: none; transition: border-color 0.2s; }
.form-group input:focus { border-color: #38bdf8; box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2); }

/* Password field with integrated show/hide toggle */
.password-input-wrap { position: relative; width: 100%; display: flex; align-items: center; }
.password-input-wrap input { width: 100%; padding-right: 2.85rem !important; }
.btn-toggle-pass {
  position: absolute;
  right: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #38bdf8;
  cursor: pointer;
  padding: 0.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.18s, transform 0.15s;
  outline: none;
  z-index: 2;
  border-radius: 4px;
}
.btn-toggle-pass:hover {
  color: #7dd3fc;
  transform: translateY(-50%) scale(1.08);
}
.btn-toggle-pass svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

/* Hide native Edge eye icon on wrapped inputs so only our themed eye is displayed */
.password-input-wrap input[type="password"]::-ms-reveal,
.password-input-wrap input[type="password"]::-ms-clear {
  display: none !important;
}

/* Fallback for unwrapped password fields: make native eye bright white/cyan */
input[type="password"]::-ms-reveal {
  filter: invert(100%) sepia(100%) saturate(300%) hue-rotate(170deg) brightness(1.2);
  cursor: pointer;
}


.btn-auth-primary { width: 100%; padding: 0.95rem; background: var(--acc-primary); color: #fff; border: none; border-radius: 8px; font-weight: 700; font-size: 1rem; cursor: pointer; transition: background 0.18s; display: flex; align-items: center; justify-content: center; gap: 0.5rem; text-decoration: none; }
.btn-auth-primary:hover { background: var(--acc-primary-hover); }

.btn-google { width: 100%; padding: 0.85rem 1rem; background: #ffffff; color: #1e293b; border: 1px solid #cbd5e1; border-radius: 8px; font-weight: 700; font-size: 0.95rem; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 0.75rem; text-decoration: none; transition: background 0.18s; margin-bottom: 1.25rem; }
.btn-google:hover { background: #f8fafc; }
.btn-google svg { width: 20px; height: 20px; }

.divider-row { display: flex; align-items: center; gap: 1rem; margin: 1.5rem 0; color: #94a3b8; font-size: 0.85rem; }
.divider-row::before, .divider-row::after { content: ""; flex: 1; height: 1px; background: var(--acc-border); }

.auth-alert { padding: 0.85rem 1.15rem; border-radius: 8px; font-size: 0.9rem; font-weight: 600; margin-bottom: 1.5rem; line-height: 1.5; }
.auth-alert.error { background: rgba(239, 68, 68, 0.15); border: 1px solid var(--acc-danger); color: #fca5a5; }
.auth-alert.success { background: rgba(5, 150, 105, 0.15); border: 1px solid #059669; color: #34d399; }

.auth-footer-links { margin-top: 1.75rem; text-align: center; font-size: 0.9rem; color: var(--acc-text-muted); }
.auth-footer-links a { color: #38bdf8; text-decoration: none; font-weight: 700; }
.auth-footer-links a:hover { text-decoration: underline; }

.trusted-badge-box { background: rgba(56, 189, 248, 0.08); border: 1px solid rgba(56, 189, 248, 0.2); border-radius: 8px; padding: 0.85rem 1rem; font-size: 0.82rem; color: #cbd5e1; margin-bottom: 1.5rem; line-height: 1.5; }
.trusted-badge-box strong { color: #38bdf8; }

/* Dashboard Specific */
.dashboard-container { width: 100%; max-width: 800px; }
.dashboard-card { background: var(--acc-card); border: 1px solid var(--acc-border); border-radius: 16px; padding: 2.5rem; }
.dash-user-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1.5rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--acc-border); margin-bottom: 1.5rem; }
.dash-avatar { width: 64px; height: 64px; border-radius: 50%; background: #0369a1; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.75rem; font-weight: 800; border: 2px solid #38bdf8; }
.dash-meta { flex: 1; min-width: 200px; }
.dash-meta h2 { font-size: 1.4rem; font-weight: 800; color: #fff; margin-bottom: 0.25rem; }
.dash-meta p { font-size: 0.92rem; color: var(--acc-text-muted); }
.dash-badge { display: inline-block; padding: 0.3rem 0.75rem; background: rgba(5, 150, 105, 0.2); border: 1px solid #059669; color: #34d399; font-size: 0.8rem; font-weight: 700; border-radius: 9999px; margin-top: 0.35rem; }
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.25rem; margin-bottom: 2rem; }
.dash-stat-box { background: #0a0e17; border: 1px solid var(--acc-border); border-radius: 10px; padding: 1.25rem; }
.dash-stat-box span { font-size: 0.82rem; color: #94a3b8; font-weight: 700; text-transform: uppercase; }
.dash-stat-box strong { display: block; font-size: 1.35rem; color: #fff; margin-top: 0.35rem; }


/* License Section Styles in Dashboard */
.dash-license-section { margin: 2rem 0; border-top: 1px solid var(--acc-border); padding-top: 2rem; }
.license-empty-box { background: #0a0e17; border: 1px dashed var(--acc-border); border-radius: 12px; padding: 2.5rem 1.5rem; text-align: center; }
.license-list { display: flex; flex-direction: column; gap: 1.25rem; }
.license-card { background: #0d172a; border: 1px solid var(--acc-border); border-radius: 12px; padding: 1.5rem; }
.lic-card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1.25rem; border-bottom: 1px solid rgba(255,255,255,0.08); padding-bottom: 1rem; }
.lic-status-badge { display: inline-block; padding: 0.25rem 0.65rem; border-radius: 9999px; font-size: 0.78rem; font-weight: 700; }
.lic-status-badge.active { background: rgba(5, 150, 105, 0.2); border: 1px solid #059669; color: #34d399; }
.lic-status-badge.suspended { background: rgba(251, 191, 36, 0.2); border: 1px solid #fbbf24; color: #fcd34d; }
.lic-status-badge.expired { background: rgba(239, 68, 68, 0.2); border: 1px solid #ef4444; color: #fca5a5; }
.lic-key-box { margin-bottom: 1.25rem; }
.lic-key-input { flex: 1; padding: 0.75rem 1rem; background: #060b13; border: 1px solid #1e3a8a; border-radius: 8px; color: #38bdf8; font-family: monospace; font-size: 1.05rem; font-weight: 700; letter-spacing: 0.05em; outline: none; }
.btn-copy-key { padding: 0.75rem 1.25rem; background: var(--acc-primary); color: #fff; border: none; border-radius: 8px; font-weight: 700; cursor: pointer; transition: background 0.18s; white-space: nowrap; }
.btn-copy-key:hover { background: var(--acc-primary-hover); }
.lic-device-box { background: #080f1e; border: 1px solid rgba(255,255,255,0.08); border-radius: 8px; padding: 1rem; }
.active-devices-list { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.5rem; }
.active-dev-item { display: flex; justify-content: space-between; align-items: center; background: #0a1324; padding: 0.5rem 0.75rem; border-radius: 6px; font-size: 0.85rem; }

@media (max-width: 640px) {
  body { padding: 1rem 0.7rem; }
  .auth-card, .dashboard-card { padding: 1.25rem; border-radius: 12px; }
  .dash-user-row, .lic-card-header, .active-dev-item { align-items: flex-start; flex-direction: column; }
  .dash-meta { min-width: 0; width: 100%; }
  .dash-meta p, .lic-key-input { overflow-wrap: anywhere; }
  .dash-grid { grid-template-columns: 1fr; }
  .license-card { padding: 1rem; }
  .lic-key-box > div { align-items: stretch !important; flex-direction: column; }
  .btn-copy-key { width: 100%; }
}
