/* ==========================================================================
   Member Portal Global Theme (Bootstrap 5 base)
   File: /assets/css_new/member_portal_new_theme.css
   Scope: global variables, components, and auth layout
   ========================================================================== */

/* ---------- CSS Variables (light) ---------- */
:root {
  --brand: #0d6efd;            /* primary (can be overridden inline per tenant) */
  --brand-600: #0b5ed7;        /* hover/darker */
  --accent: #6610f2;

  --bg-page: #f6f8fa;
  --text-body: #212529;
  --text-muted: #6c757d;

  --border: #e5e7eb;
  --border-soft: #eef0f3;

  --card-radius: 12px;
  --shadow-soft: 0 2px 8px rgba(0,0,0,.05);
  --transition-fast: .15s ease-in-out;

  --font-family-sans: "Inter", "Segoe UI", Arial, sans-serif;
}

/* ---------- Base ---------- */
html, body {
  font-family: var(--font-family-sans);
  color: var(--text-body);
  background: var(--bg-page);
  line-height: 1.5;
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* Smooth hover transitions for links and buttons */
a, .btn, .quick-action { transition: all var(--transition-fast); }

/* ---------- Cards ---------- */
.card {
  border: 1px solid var(--border-soft);
  border-radius: var(--card-radius);
  box-shadow: var(--shadow-soft);
  background: #fff;
}
.card-header {
  background: #fff;
  border-bottom: 1px solid var(--border-soft);
}

/* ---------- Header Bar (app pages) ---------- */
.app-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.brand-pill {
  background: color-mix(in srgb, var(--brand) 12%, transparent);
  color: var(--brand);
  font-weight: 600;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 12px;
}

/* ---------- KPI Tiles ---------- */
.kpi {
  border-radius: var(--card-radius);
  background: #fff;
  padding: 16px;
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-soft);
}
.kpi .label {
  color: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.kpi .value {
  font-size: 24px;
  font-weight: 700;
}
.progress { height: 8px; }

/* ---------- Quick Actions ---------- */
.quick-action {
  border: 1px dashed #d0d7de;
  border-radius: 10px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
}
.quick-action:hover {
  border-color: var(--brand);
  text-decoration: none;
  box-shadow: var(--shadow-soft);
}

/* ---------- Status Dots ---------- */
.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 6px; }
.status-active { background: #16a34a; }
.status-pending { background: #f59e0b; }
.status-inactive { background: #dc2626; }

/* ---------- Avatars & Links ---------- */
.avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: #e9ecef; display: flex; align-items: center; justify-content: center;
  font-weight: 700;
}
.link-muted { color: var(--text-muted); text-decoration: none; }
.link-muted:hover { color: #111; }

/* ---------- Buttons ---------- */
.btn-brand {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.btn-brand:hover {
  background: var(--brand-600);
  border-color: var(--brand-600);
  color: #fff;
}

/* Subtle outline variant using brand color */
.btn-outline-brand {
  color: var(--brand);
  border-color: var(--brand);
  background: transparent;
}
.btn-outline-brand:hover {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
}

/* ---------- Forms ---------- */
.form-control:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 .2rem rgba(13,110,253,.25);
}

.input-group .btn {
  border-color: var(--border);
}
.input-group .btn:hover {
  border-color: var(--brand-600);
}

.invalid-feedback, .valid-feedback { font-size: 0.875rem; }

/* ---------- Tables ---------- */
.table thead th { border-bottom-color: var(--border-soft); }
.table tbody td { border-top-color: var(--border-soft); }

/* ==========================================================================
   AUTH PAGES (Login/Register)
   - Creates the split gradient layout with a left brand pane and right form
   ========================================================================== */

.auth-shell {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 100vh;
}
@media (min-width: 768px){
  .auth-shell { grid-template-columns: 1.2fr 1fr; }
}
.brand-pane { min-height: 100vh; }

/* Dark gradient + highlight (already in your theme, keep) */
.brand-pane {
  position: relative;
  color: #e5e7eb;
  background: linear-gradient(135deg, #0a0f1c 0%, #111827 100%);
}
.brand-pane .overlay {
  position: absolute; inset: 0;
  background: radial-gradient(1200px 600px at 10% 10%,
              color-mix(in srgb, var(--brand) 18%, transparent) 0%,
              transparent 60%);
  pointer-events: none;
}
.brand-pane .content { position: relative; z-index: 2; padding: 48px 40px; }
.tenant-badge {
  background: color-mix(in srgb, var(--brand) 12%, transparent);
  color: var(--brand-600);
  border-radius: 20px;
  padding: 4px 10px;
  font-weight: 600;
  font-size: 12px;
}

/* Right side card styling */
.card-auth {
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}
.hint { color: var(--text-muted); }

/* Optional: center the auth card better on tall screens */
.auth-center {
  min-height: 100vh;
  display: flex;
  align-items: center;
}

/* CAPTCHA placeholder styling */
.captcha-box {
  background: #f8f9fa;
  border: 1px dashed #d0d7de;
  border-radius: 8px;
  padding: 12px;
}

/* ==========================================================================
   UTILITIES
   ========================================================================== */
.rounded-2xl { border-radius: 1rem; }
.text-tiny { font-size: 12px; }
.shadow-soft { box-shadow: var(--shadow-soft) !important; }
.border-soft { border-color: var(--border-soft) !important; }

/* ==========================================================================
   DARK MODE (opt-in with html[data-theme="dark"])
   ========================================================================== */
html[data-theme="dark"] {
  --bg-page: #0e1117;
  --text-body: #cbd5e1;
  --text-muted: #94a3b8;
  --border: #263041;
  --border-soft: #1e2633;
}
html[data-theme="dark"] body {
  background: var(--bg-page);
  color: var(--text-body);
}
html[data-theme="dark"] .card,
html[data-theme="dark"] .kpi,
html[data-theme="dark"] .quick-action {
  background: #0f172a;
  border-color: var(--border);
}
html[data-theme="dark"] .card-header {
  background: #0f172a;
  border-color: var(--border);
}
html[data-theme="dark"] .brand-pill {
  background: rgba(13,110,253,.20);
}
.login-brand{
  display:inline-block;
  min-width:35vw;      /* control size */
  min-height:45vh;
  max-width:45vw;      /* control size */
  max-height:55vh;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,.35));
}