:root {
  --brand-primary: #2c3e91;
  --brand-primary-dark: #1f2b6b;
  --brand-accent: #22c55e;
  --brand-danger: #ef4444;
  --bg-soft: #f4f6fb;
}

[data-bs-theme="dark"] {
  --bg-soft: #12141c;
  --bs-card-bg: #212529;
}

#themeToggleBtn .fa-moon {
  color: #fff;
}

#themeToggleBtn .fa-sun {
  color: var(--bs-warning);
}

body {
  background-color: var(--bg-soft);
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

[data-bs-theme="dark"] .summary-card,
[data-bs-theme="dark"] .auth-card {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

[data-bs-theme="dark"] .app-navbar {
  background: var(--bs-card-bg) !important;
}

[data-bs-theme="dark"] .app-sidebar {
  --bs-offcanvas-bg: var(--bs-card-bg);
  background: var(--bs-card-bg) !important;
  border-right-color: rgba(255, 255, 255, 0.08);
}

[data-bs-theme="dark"] .app-sidebar .nav-link:hover {
  background: rgba(255, 255, 255, 0.06);
}

[data-bs-theme="dark"] .app-sidebar .nav-link.active {
  background: var(--brand-primary);
}

[data-bs-theme="dark"] .btn-light {
  background-color: var(--bs-tertiary-bg, #2b2f36);
  border-color: rgba(255, 255, 255, 0.12);
}

[data-bs-theme="dark"] .btn-light:not(.text-danger) {
  color: #e9ecef;
}

[data-bs-theme="dark"] .btn-light:hover,
[data-bs-theme="dark"] .btn-light:focus {
  background-color: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.2);
}

[data-bs-theme="dark"] .btn-light .fa-pen {
  color: #f5c518;
}

.app-navbar {
  background: linear-gradient(
    90deg,
    var(--brand-primary),
    var(--brand-primary-dark)
  );
  min-height: 60px;
}

.app-shell {
  display: flex;
  align-items: flex-start;
}

.app-sidebar {
  background: linear-gradient(
    180deg,
    var(--brand-primary),
    var(--brand-primary-dark)
  );
  border-right: 1px solid rgba(0, 0, 0, 0.08);
}

.app-sidebar .offcanvas-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.app-sidebar .offcanvas-title {
  color: #fff;
}

.app-sidebar .sidebar-body {
  padding: 1rem 0.75rem;
}

.app-sidebar .nav-link {
  color: rgba(255, 255, 255, 0.85);
  border-radius: 0.5rem;
  padding: 0.6rem 0.9rem;
  margin-bottom: 0.25rem;
  font-weight: 500;
}

.app-sidebar .nav-link:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.app-sidebar .nav-link.active {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.app-content {
  flex: 1 1 auto;
  min-width: 0;
}

@media (min-width: 992px) {
  .app-sidebar {
    width: 240px;
    flex: 0 0 240px;
    position: sticky;
    top: 60px;
    height: calc(100vh - 60px);
    overflow-y: auto;
  }
}

.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    135deg,
    var(--brand-primary),
    var(--brand-primary-dark)
  );
  padding: 1.5rem;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  border: none;
  border-radius: 1rem;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.25);
}

.auth-card .card-body {
  padding: 2.5rem;
}

.auth-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(44, 62, 145, 0.1);
  color: var(--brand-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin: 0 auto 1rem;
}

.summary-card {
  border: none;
  border-radius: 0.75rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.summary-card .icon-badge {
  width: 48px;
  height: 48px;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: #fff;
}

.installment-progress {
  height: 8px;
  border-radius: 4px;
}

.card-visual {
  border-radius: 1rem;
  padding: 1.25rem;
  color: #fff;
  background: linear-gradient(135deg, #2c3e91, #5b6fd8);
  min-height: 150px;
  position: relative;
  overflow: hidden;
}
