:root {
  --portal-primary: #4f46e5;
  --portal-primary-dark: #3730a3;
  --portal-bg: #f4f6fb;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

.auth-body {
  min-height: 100vh;
  background: linear-gradient(135deg, #eef2ff 0%, #f8fafc 50%, #e0e7ff 100%);
}

.auth-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem 1rem;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  border-radius: 1rem;
}

.auth-body-wide .auth-card {
  max-width: 650px;
}

.auth-logo {
  width: 4rem;
  height: 4rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-logo img {
  width: 64px;
  height: 64px;
  border-radius: 0.75rem;
  display: block;
}

.portal-body {
  background: var(--portal-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.portal-body > main {
  flex: 1 0 auto;
}

.portal-navbar {
  background: linear-gradient(90deg, var(--portal-primary-dark), var(--portal-primary));
  box-shadow: 0 4px 20px rgba(79, 70, 229, 0.25);
}

.portal-navbar .navbar-toggler {
  border-color: rgba(255, 255, 255, 0.45);
}

.portal-navbar .navbar-toggler-icon {
  filter: invert(1) grayscale(100%) brightness(200%);
}

.portal-navbar .navbar-brand,
.portal-navbar .nav-link,
.portal-navbar .navbar-text {
  color: rgba(255, 255, 255, 0.92) !important;
}

.portal-navbar .navbar-brand-logo {
  height: 32px;
  width: auto;
  display: block;
}

.portal-navbar .nav-link.active {
  font-weight: 600;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 0.5rem;
}

.portal-navbar .dropdown-menu {
  border: none;
  border-radius: 0.75rem;
  box-shadow: 0 0.5rem 1.25rem rgba(15, 23, 42, 0.12);
}

.stat-card {
  border-radius: 1rem;
  padding: 1.25rem;
  color: #fff;
  position: relative;
  overflow: hidden;
  min-height: 120px;
}

.stat-card-primary { background: linear-gradient(135deg, #4f46e5, #6366f1); }
.stat-card-success { background: linear-gradient(135deg, #059669, #10b981); }
.stat-card-warning { background: linear-gradient(135deg, #d97706, #f59e0b); }
.stat-card-info { background: linear-gradient(135deg, #0284c7, #38bdf8); }

.stat-icon {
  position: absolute;
  right: 1rem;
  top: 1rem;
  font-size: 1.75rem;
  opacity: 0.35;
}

.stat-label {
  font-size: 0.85rem;
  opacity: 0.9;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.2;
}

.badge.status-paid { background: #10b981; }
.badge.status-pending { background: #f59e0b; }
.badge.status-overdue { background: #ef4444; }
.badge.status-draft { background: #94a3b8; }
.badge.status-failed { background: #dc2626; }
.badge.status-cancelled { background: #64748b; }
.badge.status-active { background: #10b981; }
.badge.status-inactive { background: #94a3b8; }
.badge.status-paid_provisioning { background: #0ea5e9; }
.badge.status-pending_payment { background: #f59e0b; }
.badge.status-provisioned { background: #10b981; }

.card {
  border-radius: 0.875rem;
}

.portal-footer {
  margin-top: auto;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.7);
}

.portal-footer a {
  color: var(--portal-primary);
  text-decoration: none;
  font-weight: 600;
}

.portal-footer a:hover {
  text-decoration: underline;
}

.portal-footer-heart {
  color: #e11d48;
  font-size: 0.75em;
  vertical-align: -0.05em;
}

.auth-wrapper .portal-footer-heart,
.auth-wrapper a {
  color: var(--portal-primary);
  font-weight: 600;
  text-decoration: none;
}

.auth-wrapper a:hover {
  text-decoration: underline;
}

@media (max-width: 991px) {
  .portal-navbar .navbar-collapse {
    margin-top: 0.75rem;
  }
}

@media print {
  .portal-navbar,
  .portal-footer,
  .btn,
  form {
    display: none !important;
  }
}
