/* ==========================================================================
   Ingwe Digital Solutions — Client Portal Design System
   Layers on top of huraga.css. Dark OLED is the default experience.
   Brand: Ingwe Blue #0062FF · Cyan #00D4FF · BG #020617 · Surface #0D1424
   Typeface: Plus Jakarta Sans
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

:root {
  --ingwe-blue:      #0062FF;
  --ingwe-blue-dim:  rgba(0, 98, 255, .12);
  --ingwe-cyan:      #00D4FF;
  --ingwe-success:   #22C55E;
  --ingwe-bg:        #020617;
  --ingwe-surface:   #0D1424;
  --ingwe-surface-2: #111A2E;

  /* Bootstrap/huraga primary override */
  --bs-primary:      #0062FF;
  --bs-primary-rgb:  0, 98, 255;
  --bs-link-color:   #3382FF;
  --bs-link-hover-color: #00D4FF;
  --bs-font-sans-serif: 'Plus Jakarta Sans', ui-sans-serif, system-ui, sans-serif;
  --bs-border-radius: .75rem;
}

body {
  font-family: 'Plus Jakarta Sans', ui-sans-serif, system-ui, sans-serif !important;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  font-weight: 700;
  letter-spacing: -0.01em;
}

::selection { background: rgba(0, 98, 255, .35); color: #fff; }

/* ─── Dark mode surfaces (Ingwe OLED) ─────────────────────────────────────── */
[data-bs-theme="dark"] {
  --bs-body-bg: #020617;
  --bs-body-color: #E2E8F0;
  --bs-emphasis-color: #F8FAFC;
  --bs-secondary-color: #94A3B8;
  --bs-secondary-bg: #0D1424;
  --bs-tertiary-bg: #111A2E;
  --bs-border-color: rgba(255, 255, 255, .08);
  --bs-link-color: #3382FF;
  --bs-link-hover-color: #00D4FF;
  --bs-heading-color: #F8FAFC;
}
[data-bs-theme="dark"] body {
  background:
    radial-gradient(1100px 500px at 85% -10%, rgba(0, 98, 255, .09), transparent 60%),
    radial-gradient(800px 420px at -10% 100%, rgba(0, 212, 255, .05), transparent 55%),
    #020617 !important;
  background-attachment: fixed;
  color: #E2E8F0;
}

/* Cards become bento tiles */
[data-bs-theme="dark"] .card {
  background: linear-gradient(180deg, rgba(255, 255, 255, .025) 0%, rgba(255, 255, 255, 0) 45%), #0D1424;
  border: 1px solid rgba(255, 255, 255, .07);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .4);
}
[data-bs-theme="dark"] .card-header {
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  color: #F8FAFC;
}
[data-bs-theme="dark"] .list-group-item {
  background: transparent;
  border-color: rgba(255, 255, 255, .06);
  color: #E2E8F0;
}
[data-bs-theme="dark"] .list-group-item:hover {
  background: rgba(0, 98, 255, .07);
}
[data-bs-theme="dark"] .table {
  --bs-table-bg: transparent;
  --bs-table-striped-bg: rgba(255, 255, 255, .02);
  --bs-table-hover-bg: rgba(0, 98, 255, .06);
}
[data-bs-theme="dark"] .modal-content {
  background: #0D1424;
  border: 1px solid rgba(255, 255, 255, .1);
}
[data-bs-theme="dark"] .dropdown-menu {
  background: #111A2E;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 1rem;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .55);
}
[data-bs-theme="dark"] .dropdown-item { color: #E2E8F0; }
[data-bs-theme="dark"] .dropdown-item:hover {
  background: rgba(0, 98, 255, .15);
  color: #fff;
}
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
  background: #0A101F;
  border-color: rgba(255, 255, 255, .1);
  color: #F1F5F9;
}
[data-bs-theme="dark"] .form-control::placeholder { color: #64748B; }
[data-bs-theme="dark"] .breadcrumb,
[data-bs-theme="dark"] .breadcrumb a { color: #94A3B8; }
[data-bs-theme="dark"] .text-muted,
[data-bs-theme="dark"] .text-secondary { color: #94A3B8 !important; }

/* The dashboard showcase becomes a hero banner */
[data-bs-theme="dark"] .alert-info {
  background:
    radial-gradient(600px 220px at 90% 0%, rgba(0, 212, 255, .12), transparent 60%),
    linear-gradient(135deg, rgba(0, 98, 255, .18) 0%, rgba(0, 71, 204, .08) 100%);
  border: 1px solid rgba(0, 98, 255, .35);
  border-radius: 1.5rem;
  color: #E2E8F0;
  padding: 1.75rem 2rem;
}
[data-bs-theme="dark"] .alert-info h2 {
  background: linear-gradient(90deg, #FFFFFF 0%, #7EB6FF 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
}
[data-bs-theme="dark"] .alert-info a.btn { margin-top: .25rem; }

/* ─── Buttons (pill-shaped across the system) ─────────────────────────────── */
.btn { font-weight: 600; border-radius: 50rem; padding-inline: 1.15rem; }
.btn-primary {
  background: linear-gradient(135deg, #0062FF 0%, #0047CC 100%) !important;
  border: none !important;
  box-shadow: 0 2px 12px rgba(0, 98, 255, .3);
  transition: box-shadow .2s ease, transform .2s ease, background .2s ease;
}
.btn-primary:hover {
  background: linear-gradient(135deg, #3382FF 0%, #0062FF 100%) !important;
  box-shadow: 0 4px 20px rgba(0, 98, 255, .45);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }

.btn-outline-primary {
  color: #3382FF !important;
  border-color: rgba(0, 98, 255, .55) !important;
}
.btn-outline-primary:hover {
  background: #0062FF !important;
  border-color: #0062FF !important;
  color: #fff !important;
}
[data-bs-theme="dark"] .btn-dark {
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .12);
  color: #E2E8F0;
}
[data-bs-theme="dark"] .btn-dark:hover {
  background: rgba(255, 255, 255, .12);
  border-color: rgba(255, 255, 255, .2);
  color: #fff;
}

/* ─── Cards (hover lift, both modes) ──────────────────────────────────────── */
.card {
  border-radius: 1.25rem;
  transition: box-shadow .2s ease, border-color .2s ease, transform .2s ease;
}
.card:hover {
  border-color: rgba(0, 98, 255, .35);
  box-shadow: 0 8px 28px rgba(0, 98, 255, .12);
}

/* ─── Navbar ──────────────────────────────────────────────────────────────── */
.navbar-brand img {
  height: 64px !important;
  width: auto !important;
  max-width: 300px !important;
}
/* huraga.css forces .nav-link to #000 !important — restore readable links on dark */
[data-bs-theme="dark"] .nav-link { color: #CBD5E1 !important; }
[data-bs-theme="dark"] .nav-link:hover { color: #00D4FF !important; }
[data-bs-theme="dark"] .nav-link.active { color: #3382FF !important; }
.nav-link { font-weight: 500; }
.nav-link.active,
.navbar .nav-link.active {
  color: #3382FF !important;
  font-weight: 700;
}
.navbar .nav-link.active {
  background: rgba(0, 98, 255, .12);
  border-radius: 50rem;
  padding-inline: 1.05rem;
}
.nav-link:hover { color: #00D4FF; }
[data-bs-theme="dark"] .navbar-toggler {
  border-color: rgba(255, 255, 255, .15);
}
[data-bs-theme="dark"] .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28241, 245, 249, 0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Sidebar menu */
[data-bs-theme="dark"] .list-group a.list-group-item.active {
  background: linear-gradient(135deg, rgba(0, 98, 255, .25), rgba(0, 98, 255, .1));
  border-color: rgba(0, 98, 255, .4);
  color: #fff;
}

/* ─── Forms & focus ───────────────────────────────────────────────────────── */
.form-control, .form-select { border-radius: .9rem; padding: .6rem .9rem; }
.form-control:focus,
.form-select:focus {
  border-color: #0062FF;
  box-shadow: 0 0 0 3px rgba(0, 98, 255, .2);
}

/* ─── Badges & status ─────────────────────────────────────────────────────── */
.badge { font-weight: 600; border-radius: .5rem; }
.badge.bg-primary { background: var(--ingwe-blue-dim) !important; color: #3382FF !important; }
.badge.bg-success { background: rgba(34, 197, 94, .14) !important; color: #22C55E !important; }
.badge.bg-warning { background: rgba(245, 158, 11, .14) !important; color: #F59E0B !important; }
.badge.bg-danger  { background: rgba(239, 68, 68, .14)  !important; color: #F87171 !important; }

/* ─── Pagination / progress / footer ──────────────────────────────────────── */
.page-item.active .page-link { background: #0062FF; border-color: #0062FF; }
.page-link { color: #3382FF; }
[data-bs-theme="dark"] .page-link {
  background: #0D1424;
  border-color: rgba(255, 255, 255, .08);
}
.progress-bar { background: linear-gradient(90deg, #0062FF, #00D4FF); }
#footer { color: #94A3B8; text-align: center; }
#footer a { color: inherit; }
#footer a:hover { color: #00D4FF; }

/* ─── Auth pages — split-screen shell (login / signup / password reset) ────
   One large floating panel: form pane on the left, leopard wallpaper visual
   with floating glass cards on the right. Inspired-by-Crextio layout. */
.ingwe-auth {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 3vw, 2.5rem);
}
.ingwe-auth-shell {
  display: grid;
  grid-template-columns: minmax(400px, 480px) 1fr;
  width: 100%;
  max-width: 1280px;
  min-height: min(800px, 92vh);
  background: linear-gradient(180deg, rgba(255, 255, 255, .03) 0%, rgba(255, 255, 255, 0) 40%), #0D1424;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 2rem;
  box-shadow: 0 48px 120px rgba(0, 0, 0, .65), 0 0 60px rgba(0, 98, 255, .1);
  overflow: hidden;
}
.ingwe-auth-pane {
  display: flex;
  flex-direction: column;
  padding: clamp(1.75rem, 3vw, 3rem);
}
.ingwe-auth-brand { display: inline-flex; align-self: center; }
.ingwe-auth-brand img { height: 64px !important; width: auto !important; max-width: 280px !important; }
.ingwe-auth-body {
  width: 100%;
  max-width: 410px;
  margin: auto;
  padding-block: 2.25rem;
}
.ingwe-auth-body--wide { max-width: 100%; }
.ingwe-auth-title {
  font-size: clamp(1.7rem, 2.4vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -.02em;
  color: #F8FAFC;
  margin-bottom: .5rem;
}
.ingwe-auth-sub { color: #94A3B8; margin-bottom: 2rem; }
.ingwe-auth-body .form-label { color: #CBD5E1; font-weight: 600; font-size: .875rem; }
.ingwe-auth-body .form-control,
.ingwe-auth-body .form-select {
  background: rgba(2, 6, 23, .55);
  border-color: rgba(255, 255, 255, .12);
  color: #F1F5F9;
  padding: .8rem 1.15rem;
}
.ingwe-auth-body .input-group-text {
  background: rgba(2, 6, 23, .55);
  border-color: rgba(255, 255, 255, .12);
  color: #94A3B8;
}
.ingwe-auth-body .btn-primary { padding: .85rem 1.5rem; font-size: 1.02rem; }
.ingwe-auth-minor {
  color: #94A3B8;
  font-size: .82rem;
  font-weight: 600;
  text-decoration: none;
}
.ingwe-auth-minor:hover { color: #00D4FF; }
.ingwe-auth-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  color: #64748B;
  font-size: .875rem;
}
.ingwe-auth-foot a { color: #3382FF; font-weight: 600; text-decoration: none; }
.ingwe-auth-foot a:hover { color: #00D4FF; }

.ingwe-auth-visual {
  position: relative;
  margin: 1rem;
  border-radius: 1.5rem;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(10, 16, 31, .98) 0%, rgba(10, 16, 31, .82) 16%, rgba(10, 16, 31, 0) 48%),
    linear-gradient(180deg, rgba(2, 6, 23, 0) 35%, rgba(2, 6, 23, .55) 100%),
    #0A101F url('/public/branding/login-wallpaper.jpg') right center / cover no-repeat;
}
.ingwe-glass-chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .65rem 1.1rem;
  border-radius: 50rem;
  background: rgba(13, 20, 36, .55);
  border: 1px solid rgba(255, 255, 255, .14);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  color: #F1F5F9;
  font-size: .875rem;
  font-weight: 600;
  white-space: nowrap;
}
.ingwe-chip-status { top: 1.75rem; left: 1.75rem; }
.ingwe-chip-region { top: 4.6rem; left: 3.5rem; color: #CBD5E1; background: rgba(2, 6, 23, .45); }
.ingwe-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #22C55E;
  box-shadow: 0 0 10px rgba(34, 197, 94, .9);
}
.ingwe-glass-card {
  position: absolute;
  left: 1.75rem;
  bottom: 1.75rem;
  min-width: 250px;
  padding: 1.25rem 1.5rem;
  border-radius: 1.25rem;
  background: rgba(13, 20, 36, .6);
  border: 1px solid rgba(255, 255, 255, .14);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  color: #E2E8F0;
}
.ingwe-glass-kpi {
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -.02em;
  background: linear-gradient(90deg, #FFFFFF 0%, #7EB6FF 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.ingwe-glass-label { font-weight: 600; color: #F1F5F9; margin-bottom: .35rem; }
.ingwe-glass-meta {
  display: flex;
  align-items: center;
  gap: .45rem;
  color: #94A3B8;
  font-size: .8rem;
}
.ingwe-glass-meta svg { flex: none; }

@media (max-width: 991.98px) {
  .ingwe-auth { padding: .9rem; }
  .ingwe-auth-shell {
    grid-template-columns: 1fr;
    min-height: auto;
    border-radius: 1.5rem;
  }
  .ingwe-auth-visual {
    order: -1;
    height: 230px;
    margin: .8rem .8rem 0;
    border-radius: 1.1rem;
    background:
      linear-gradient(180deg, rgba(2, 6, 23, 0) 45%, rgba(2, 6, 23, .5) 100%),
      #0A101F url('/public/branding/login-wallpaper.jpg') right center / cover no-repeat;
  }
  .ingwe-chip-status { top: 1.1rem; left: 1.1rem; }
  .ingwe-chip-region { display: none; }
  .ingwe-glass-card { display: none; }
  .ingwe-auth-body { padding-block: 1.25rem; }
}

/* ─── Scrollbar (dark) ────────────────────────────────────────────────────── */
[data-bs-theme="dark"] ::-webkit-scrollbar { width: 10px; height: 10px; }
[data-bs-theme="dark"] ::-webkit-scrollbar-track { background: #020617; }
[data-bs-theme="dark"] ::-webkit-scrollbar-thumb {
  background: #1E293B;
  border-radius: 6px;
  border: 2px solid #020617;
}
[data-bs-theme="dark"] ::-webkit-scrollbar-thumb:hover { background: #334155; }

/* ─── Accessibility ───────────────────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid #00D4FF;
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
