body { background-color: #f4f6f9; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }
.card { border: none; box-shadow: 0 4px 6px rgba(0,0,0,0.1); border-radius: 10px; }
.navbar-brand { font-weight: 700; letter-spacing: -0.02em; }
.status-badge { padding: 5px 10px; border-radius: 20px; font-size: 0.85em; }

/* —— Index / login landing (animated) —— */
.login-landing {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 45%, #0c4a6e 100%);
  background-size: 400% 400%;
  animation: login-gradient-shift 18s ease infinite;
}

@keyframes login-gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.login-landing__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(64px);
  opacity: 0.45;
  pointer-events: none;
  animation: login-float 12s ease-in-out infinite;
}

.login-landing__orb--1 {
  width: min(420px, 70vw);
  height: min(420px, 70vw);
  background: radial-gradient(circle, #38bdf8 0%, transparent 70%);
  top: -10%;
  right: -5%;
  animation-delay: 0s;
}

.login-landing__orb--2 {
  width: min(360px, 60vw);
  height: min(360px, 60vw);
  background: radial-gradient(circle, #818cf8 0%, transparent 70%);
  bottom: -15%;
  left: -10%;
  animation-delay: -4s;
}

.login-landing__orb--3 {
  width: min(280px, 50vw);
  height: min(280px, 50vw);
  background: radial-gradient(circle, #22d3ee 0%, transparent 70%);
  top: 40%;
  left: 35%;
  opacity: 0.25;
  animation-delay: -8s;
}

@keyframes login-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(2%, -3%) scale(1.05); }
  66% { transform: translate(-3%, 2%) scale(0.95); }
}

.login-landing__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black 20%, transparent 70%);
  pointer-events: none;
}

.login-landing__card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 1.25rem;
  box-shadow:
    0 25px 50px -12px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.08) inset;
  padding: 2rem;
  animation: login-card-in 0.85s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes login-card-in {
  from {
    opacity: 0;
    transform: translateY(28px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.login-landing__brand {
  text-align: center;
  margin-bottom: 1.5rem;
  animation: login-fade-up 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
}

.login-landing__brand-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(56, 189, 248, 0.35), rgba(129, 140, 248, 0.35));
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #e0f2fe;
  font-size: 1.5rem;
  animation: login-icon-pulse 3s ease-in-out infinite;
}

@keyframes login-icon-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.35); }
  50% { box-shadow: 0 0 0 12px rgba(56, 189, 248, 0); }
}

.login-landing__title {
  color: #0f172a;
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  margin: 0;
}

.login-landing__title.text-primary {
  color: #0d6efd !important;
}

.login-landing__subtitle {
  color: #64748b;
  font-size: 0.875rem;
  margin-top: 0.35rem;
}

.login-landing__tabs {
  animation: login-fade-up 0.65s cubic-bezier(0.22, 1, 0.36, 1) 0.22s both;
}

.login-landing__tabs .nav-tabs {
  border-bottom-color: #e2e8f0;
}

.login-landing__tabs .nav-link {
  color: #64748b;
  border: none;
  border-radius: 0.5rem 0.5rem 0 0;
  transition: color 0.2s ease, background 0.2s ease;
}

.login-landing__tabs .nav-link:hover {
  color: #0f172a;
  background: rgba(15, 23, 42, 0.05);
}

.login-landing__tabs .nav-link.active {
  color: #fff;
  background: #0d6efd;
  font-weight: 600;
}

.login-landing__body {
  animation: login-fade-up 0.65s cubic-bezier(0.22, 1, 0.36, 1) 0.32s both;
}

@keyframes login-fade-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-landing__card .form-control {
  border-radius: 0.5rem;
  border: 1px solid rgba(15, 23, 42, 0.12);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.login-landing__card .form-control:focus {
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2);
  transform: translateY(-1px);
}

.login-landing__card label {
  color: rgba(15, 23, 42, 0.75);
  font-weight: 500;
  font-size: 0.875rem;
}

.login-landing__card .btn {
  border-radius: 0.5rem;
  font-weight: 600;
  padding: 0.6rem 1rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.login-landing__card .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(14, 165, 233, 0.35);
}

.login-landing__card .btn-dark:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.login-landing__card .alert-danger {
  border-radius: 0.5rem;
  animation: login-shake 0.5s ease;
}

@keyframes login-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

.login-landing__card a {
  color: #0284c7;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
}

.login-landing__card a:hover {
  color: #0369a1;
  text-decoration: underline;
}

.login-landing__card .text-center small {
  color: rgba(15, 23, 42, 0.65);
}

@media (prefers-reduced-motion: reduce) {
  .login-landing,
  .login-landing__orb,
  .login-landing__brand-icon,
  .login-landing__card,
  .login-landing__brand,
  .login-landing__tabs,
  .login-landing__body,
  .login-landing__card .alert-danger {
    animation: none !important;
  }
  .login-landing {
    background-size: 100% 100%;
  }
  .login-landing__card .btn:hover,
  .login-landing__card .form-control:focus {
    transform: none;
  }
}

/* —— Admin & user app shell —— */
.app-admin {
  min-height: 100vh;
  background: linear-gradient(180deg, #e8ecf3 0%, #f0f2f7 40%, #f4f6f9 100%);
}

.app-admin__main {
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}

.navbar-admin {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.navbar-admin .navbar-brand {
  color: #f8fafc !important;
  font-size: 1.1rem;
}

.navbar-admin__logo {
  display: inline-flex;
  width: 2.25rem;
  height: 2.25rem;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  font-size: 1.1rem;
}

.nav-link-admin {
  color: rgba(248, 250, 252, 0.85) !important;
  border-radius: 8px;
  padding: 0.45rem 0.75rem !important;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-link-admin:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff !important;
}

.nav-link-admin--logout {
  color: #fca5a5 !important;
}

.nav-link-admin--logout:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #fecaca !important;
}

.navbar-admin .navbar-toggler-icon {
  filter: invert(1);
}

.app-user {
  min-height: 100vh;
  background: linear-gradient(180deg, #eff6ff 0%, #f8fafc 35%, #f1f5f9 100%);
}

.navbar-user {
  background: #fff;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.navbar-user .navbar-brand {
  color: #0f172a !important;
  font-size: 1.1rem;
}

.navbar-user__logo {
  display: inline-flex;
  width: 2.25rem;
  height: 2.25rem;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff;
  font-size: 1.1rem;
}

.nav-link-user {
  color: #475569 !important;
  border-radius: 8px;
  padding: 0.45rem 0.75rem !important;
  font-weight: 500;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-link-user:hover {
  background: rgba(37, 99, 235, 0.08);
  color: #1d4ed8 !important;
}

.nav-link-user--logout {
  color: #b91c1c !important;
}

.nav-link-user--logout:hover {
  background: rgba(220, 38, 38, 0.08);
  color: #991b1b !important;
}

.page-head__title {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #0f172a;
  margin: 0;
}

.page-head__sub {
  font-size: 0.95rem;
  margin-top: 0.35rem;
}

.panel-card {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

.panel-card__header {
  font-weight: 600;
  font-size: 0.9rem;
  background: #fff;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  padding: 0.85rem 1.25rem;
}

.panel-card--user .panel-card__header--user {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-bottom-color: rgba(15, 23, 42, 0.06);
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.35rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.08);
  background: #fff;
  height: 100%;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.1);
}

.stat-card__icon {
  width: 3rem;
  height: 3rem;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}

.stat-card--indigo .stat-card__icon {
  background: rgba(99, 102, 241, 0.15);
  color: #4f46e5;
}

.stat-card--teal .stat-card__icon {
  background: rgba(20, 184, 166, 0.15);
  color: #0d9488;
}

.stat-card--amber .stat-card__icon {
  background: rgba(245, 158, 11, 0.18);
  color: #d97706;
}

.stat-card--green .stat-card__icon {
  background: rgba(34, 197, 94, 0.15);
  color: #16a34a;
}

.stat-card__label {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  font-weight: 600;
}

.stat-card__value {
  display: block;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0f172a;
  line-height: 1.2;
}

.quick-action {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.15rem;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  color: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.quick-action:hover {
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.12);
  transform: translateY(-1px);
  color: inherit;
}

.quick-action--primary {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(59, 130, 246, 0.05));
}

.quick-action--slate {
  background: #f8fafc;
}

.quick-action__icon {
  font-size: 1.5rem;
  color: #3b82f6;
}

.quick-action--slate .quick-action__icon {
  color: #64748b;
}

.quick-action__arrow {
  margin-left: auto;
  color: #94a3b8;
}

.btn-admin-primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border: none;
  color: #fff;
  font-weight: 600;
  padding: 0.5rem 1.25rem;
  border-radius: 10px;
}

.btn-admin-primary:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  color: #fff;
}

.table-admin thead th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  font-weight: 600;
  border-bottom-width: 1px;
  background: #f8fafc;
  white-space: nowrap;
}

.table-admin tbody td {
  font-size: 0.9rem;
  vertical-align: middle;
}

.user-hero {
  border-radius: 16px;
  background: linear-gradient(125deg, #1d4ed8 0%, #3b82f6 45%, #0ea5e9 100%);
  padding: 1.75rem 1.5rem;
  box-shadow: 0 16px 40px rgba(37, 99, 235, 0.25);
}

.user-hero__name {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.user-metric {
  padding: 0.75rem 1rem;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.user-metric__label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  font-weight: 600;
}

.user-metric__value {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
}

.user-empty-icon {
  font-size: 2.5rem;
  color: #cbd5e1;
}

.btn-user-primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border: none;
  color: #fff;
  font-weight: 600;
  padding: 0.5rem 1.15rem;
  border-radius: 10px;
}

.btn-user-primary:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  color: #fff;
}

.running-loan-metric {
  min-height: 7.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

#upiQrHost img,
#upiQrHost canvas {
  display: block;
  margin: 0 auto;
}

@media (prefers-reduced-motion: reduce) {
  .stat-card:hover,
  .quick-action:hover {
    transform: none;
  }
}
