/* ============================================================
   Bingo Panel — Credentials pages (login, reset-key, etc.)
   White / light theme only.
   ============================================================ */

:root {
  --accent:        #7C3AED;
  --accent-bright: #8B5CF6;
  --accent-deep:   #5B21B6;
  --accent-rgb:    124,58,237;
  --cyan:          #0891B2;
  --magenta:       #DB2777;

  --success:  #16A34A;
  --danger:   #DC2626;
  --warning:  #EA580C;
  --info:     #0EA5E9;

  --bg-deep:    #F8FAFC;
  --bg-surface: #FFFFFF;
  --bg-input:   #F1F5F9;
  --border-line:#CBD5E1;
  --border-soft:#E2E8F0;

  --text:      #0F172A;
  --text-mute: #475569;
  --text-dim:  #94A3B8;

  --gradient-brand:   linear-gradient(135deg, var(--cyan), var(--accent) 50%, var(--magenta));
  --gradient-primary: linear-gradient(135deg, var(--accent-bright), var(--accent-deep));

  --r-sm: 6px; --r-md: 10px; --r-lg: 14px;
  --shadow-card:  0 1px 2px rgba(15,23,42,.04), 0 4px 14px rgba(15,23,42,.06);
  --shadow-modal: 0 8px 24px rgba(15,23,42,.10), 0 24px 60px rgba(15,23,42,.14);
}

/* ── Page shell ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

/* Ensure Bootstrap doesn't constrain the layout */
.cred-body > main {
  display: flex !important;
  width: 100% !important;
  justify-content: center !important;
}

.cred-body {
  font-family: -apple-system, 'Inter', 'Segoe UI', system-ui, sans-serif !important;
  background: var(--bg-deep) !important;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 32px 24px !important;
  margin: 0 !important;
  box-sizing: border-box;
}

/* ── Login shell — centered card ───────────────────────────── */
.login-shell {
  width: 100%;
  max-width: 1180px;
  min-height: 640px;
  display: grid !important;
  grid-template-columns: 5fr 7fr;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-modal);
  overflow: hidden;
  background: var(--bg-surface);
  box-sizing: border-box;
}

/* ── Left brand panel ───────────────────────────────────────── */
.brand-panel {
  background: var(--bg-deep);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 36px;
}
.brand-panel::before,
.brand-panel::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.brand-panel::before {
  width: 420px; height: 420px;
  top: -140px; left: -140px;
  background: radial-gradient(circle, rgba(var(--accent-rgb),.11) 0%, transparent 68%);
}
.brand-panel::after {
  width: 340px; height: 340px;
  bottom: -100px; right: -100px;
  background: radial-gradient(circle, rgba(8,145,178,.13) 0%, transparent 68%);
}

.brand-logo {
  width: 110px; height: 110px;
  border-radius: 20px;
  object-fit: cover;
  margin-bottom: 20px;
  box-shadow: 0 8px 28px rgba(0,0,0,.22);
  position: relative; z-index: 1;
  flex-shrink: 0;
}

/* Mobile inline logo (shown only when brand panel is hidden) */
.mobile-logo {
  display: none;
  width: 72px; height: 72px;
  border-radius: 16px;
  object-fit: cover;
  margin: 0 auto 18px;
  box-shadow: 0 6px 20px rgba(0,0,0,.16);
}

.brand-wordmark {
  display: flex; flex-direction: column; align-items: center;
  position: relative; z-index: 1; margin-bottom: 10px;
}
.brand-name {
  font-size: 34px; font-weight: 800; letter-spacing: -.5px;
  background: var(--gradient-brand);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; line-height: 1.05;
}
.brand-panel-sub {
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.4em; text-transform: uppercase;
  color: var(--text-dim); margin-top: 2px;
}
.brand-welcome {
  font-size: 22px; font-weight: 700; color: var(--text);
  margin-top: 20px; text-align: center;
  position: relative; z-index: 1;
}
.brand-tagline {
  font-size: 13px; color: var(--text-mute); margin-top: 6px;
  text-align: center; position: relative; z-index: 1;
}

.feature-grid {
  display: flex; gap: 10px; margin-top: 28px;
  position: relative; z-index: 1;
  width: 100%;
}
.feat-chip {
  flex: 1;
  background: var(--bg-surface); border: 1px solid var(--border-soft);
  border-radius: var(--r-md); padding: 14px 8px;
  display: flex; flex-direction: column; align-items: center;
  gap: 6px; box-shadow: var(--shadow-card);
}
.feat-icon {
  width: 34px; height: 34px; border-radius: 8px;
  background: rgba(var(--accent-rgb),.08);
  display: flex; align-items: center; justify-content: center; margin-bottom: 1px;
}
.feat-icon svg { width: 17px; height: 17px; }
.feat-title { font-size: 12px; font-weight: 700; color: var(--text); text-align: center; }
.feat-label { font-size: 10.5px; color: var(--text-dim); text-align: center; }

/* ── Right form panel ───────────────────────────────────────── */
.form-panel {
  background: var(--bg-surface);
  display: flex; flex-direction: column; justify-content: center;
  padding: 52px 56px;
  border-left: 1px solid var(--border-soft);
}
.form-inner { width: 100%; }
.form-avatar {
  width: 60px; height: 60px; border-radius: 50%;
  border: 1.5px solid var(--border-line);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 22px; background: var(--bg-input); color: var(--text-dim);
}
.form-avatar svg { width: 30px; height: 30px; }

.form-heading {
  text-align: center; font-size: 26px; font-weight: 700;
  color: var(--text); margin-bottom: 5px;
}
.form-heading span { color: var(--accent); }

.form-heading-rule {
  display: flex; align-items: center; gap: 10px;
  margin: 5px auto 28px; width: fit-content;
}
.fhr-line { width: 40px; height: 1.5px; background: var(--border-soft); }
.fhr-dot  { width: 7px; height: 7px; border-radius: 50%; background: var(--gradient-primary); }

/* Fields */
.cred-field { margin-bottom: 20px; }
.cred-label {
  display: block; font-size: 11.5px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--text-mute); margin-bottom: 7px;
}
.cred-input-wrap { position: relative; }
.cred-input-icon {
  position: absolute; left: 14px; top: 50%;
  transform: translateY(-50%); color: var(--text-dim);
  display: flex; align-items: center; pointer-events: none;
}
.cred-input-icon svg { width: 17px; height: 17px; }
.cred-input {
  width: 100%; background: var(--bg-input);
  border: 1.5px solid var(--border-soft);
  border-radius: var(--r-md); padding: 13px 16px 13px 43px;
  font-size: 14.5px; color: var(--text); font-family: inherit;
  outline: none; transition: border-color .15s, box-shadow .15s;
}
.cred-input::placeholder { color: var(--text-dim); }
.cred-input:focus {
  border-color: rgba(var(--accent-rgb),.45);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb),.08);
  background: #fff;
}
.cred-input.is-invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(220,38,38,.08);
}
.cred-input-pr { padding-right: 46px; }
.cred-error { font-size: 12px; color: var(--danger); margin-top: 5px; }

.eye-btn {
  position: absolute; right: 14px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  color: var(--text-dim); padding: 2px;
  display: flex; align-items: center; transition: color .15s;
}
.eye-btn:hover { color: var(--text-mute); }
.eye-btn svg { width: 17px; height: 17px; }

.cred-meta-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px; margin-top: -6px;
}
.remember-label {
  display: flex; align-items: center; gap: 8px;
  font-size: 13.5px; color: var(--text-mute); cursor: pointer; user-select: none;
}
.remember-cb {
  width: 15px; height: 15px;
  accent-color: var(--accent); cursor: pointer;
}
.forgot-link {
  font-size: 13.5px; font-weight: 500; color: var(--accent);
  text-decoration: none; transition: opacity .15s;
}
.forgot-link:hover { opacity: .75; }

/* Buttons */
.btn-cred-primary {
  width: 100%; background: var(--gradient-primary);
  color: #fff; border: none; border-radius: var(--r-md);
  padding: 15px 20px; font-size: 15px; font-weight: 700;
  letter-spacing: 0.05em; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  box-shadow: 0 4px 16px rgba(var(--accent-rgb),.30);
  transition: opacity .15s, transform .1s, box-shadow .15s;
  font-family: inherit; margin-bottom: 16px; text-decoration: none;
}
.btn-cred-primary:hover { opacity: .91; box-shadow: 0 6px 20px rgba(var(--accent-rgb),.38); color: #fff; }
.btn-cred-primary:active { transform: scale(.983); }
.btn-cred-primary svg { width: 17px; height: 17px; }

.cred-or {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 16px; color: var(--text-dim);
  font-size: 12px; font-weight: 500;
}
.cred-or::before, .cred-or::after { content: ''; flex: 1; height: 1px; background: var(--border-soft); }

.cred-action-row {
  display: flex; gap: 10px; width: 100%;
}

.btn-cred-demo {
  flex: 1; background: var(--accent); color: #fff;
  border: 1.5px solid var(--accent); border-radius: var(--r-md);
  padding: 13px 16px; font-size: 14px; font-weight: 600; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 9px;
  transition: background .15s, border-color .15s, opacity .15s;
  font-family: inherit; text-decoration: none;
}
.btn-cred-demo:hover { background: var(--accent-deep); border-color: var(--accent-deep); color: #fff; }
.btn-cred-demo.disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }
.btn-cred-demo svg { width: 16px; height: 16px; flex-shrink: 0; }

.btn-cred-setup {
  flex: 1; background: var(--cyan); color: #fff;
  border: 1.5px solid var(--cyan); border-radius: var(--r-md);
  padding: 13px 16px; font-size: 14px; font-weight: 600; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 9px;
  transition: background .15s, opacity .15s;
  font-family: inherit; text-decoration: none;
}
.btn-cred-setup:hover { background: #0e7490; border-color: #0e7490; color: #fff; }
.btn-cred-setup svg { width: 16px; height: 16px; flex-shrink: 0; }

/* Alert banners */
.cred-alert {
  border-radius: var(--r-md); padding: 11px 14px;
  font-size: 13px; margin-bottom: 16px;
  display: flex; align-items: flex-start; gap: 9px;
}
.cred-alert svg { width: 15px; height: 15px; flex-shrink: 0; margin-top: 1px; }
.cred-alert-danger  { background: rgba(220,38,38,.06);  color: var(--danger);  border: 1px solid rgba(220,38,38,.18); }
.cred-alert-success { background: rgba(22,163,74,.06);  color: var(--success); border: 1px solid rgba(22,163,74,.18); }
.cred-alert-warning { background: rgba(234,88,12,.06);  color: var(--warning); border: 1px solid rgba(234,88,12,.18); }
.cred-alert-info    { background: rgba(14,165,233,.06); color: var(--info);    border: 1px solid rgba(14,165,233,.18); }

/* Page footer */
.cred-footer { text-align: center; margin-top: 36px; font-size: 12px; color: var(--text-dim); }
.cred-footer strong {
  font-weight: 600;
  background: var(--gradient-brand);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

/* ── hCaptcha modal ─────────────────────────────────────────── */
.cred-modal-backdrop {
  display: none; position: fixed; inset: 0;
  background: rgba(15,23,42,.5); z-index: 9999;
  align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
}
.cred-modal-backdrop.open { display: flex; }
.cred-modal-card {
  background: var(--bg-surface); border-radius: var(--r-lg);
  padding: 32px; max-width: 440px; width: 92%;
  box-shadow: var(--shadow-modal);
}
.cred-modal-title { font-size: 17px; font-weight: 700; color: var(--text); margin-bottom: 6px; text-align: center; }
.cred-modal-desc  { font-size: 13px; color: var(--text-mute); text-align: center; margin-bottom: 20px; line-height: 1.5; }
.cred-modal-actions { display: flex; gap: 10px; margin-top: 20px; }
.cred-modal-cancel {
  flex: 1; background: var(--bg-input); border: 1.5px solid var(--border-line);
  border-radius: var(--r-md); padding: 10px;
  font-size: 13.5px; font-weight: 600; color: var(--text-mute);
  cursor: pointer; font-family: inherit; transition: background .15s;
}
.cred-modal-cancel:hover { background: var(--border-soft); }
.cred-modal-submit {
  flex: 2; background: var(--gradient-primary); border: none;
  border-radius: var(--r-md); padding: 10px;
  font-size: 13.5px; font-weight: 700; color: #fff;
  cursor: pointer; font-family: inherit;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  transition: opacity .15s;
}
.cred-modal-submit:hover { opacity: .88; }

/* ── Legacy shell (reset-key, other pages) ──────────────────── */
.cred-legacy-shell {
  width: 100%; max-width: 780px;
  background: var(--bg-surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-modal); overflow: hidden;
  display: grid; grid-template-columns: 1fr 2fr;
}
.cred-legacy-left {
  background: var(--gradient-primary); color: #fff;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 40px 28px; text-align: center;
}
.cred-legacy-left h2 { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.cred-legacy-left p  { font-size: 13.5px; opacity: .85; margin: 0; }
.cred-legacy-right   { padding: 36px; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 720px) {
  .login-shell     { grid-template-columns: 1fr; }
  .brand-panel     { display: none; }
  .form-panel      { padding: 36px 24px 32px; border-left: none; }
  .form-inner      { max-width: 100%; }
  .mobile-logo     { display: block; }
  .form-avatar     { display: none; }       /* logo already shows above */
  .form-heading    { font-size: 22px; }
  .form-heading-rule { margin-bottom: 20px; }
  .cred-footer     { margin-top: 24px; }
  .cred-legacy-shell { grid-template-columns: 1fr; }
  .cred-legacy-left  { display: none; }
  .cred-legacy-right { padding: 28px 20px; }
}
