@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap");

:root {
  --color-primary: #0f172a;
  --color-primary-dark: #0b1120;
  --color-secondary: #6366f1;
  --color-secondary-dark: #4f46e5;
  --color-tertiary: #14b8a6;
  --color-background: #f4f6fb;
  --color-surface: rgba(255, 255, 255, 0.94);
  --color-text: #1f2937;
  --color-text-muted: #64748b;
  --color-success: #22c55e;
  --color-error: #ef4444;
  --color-border: rgba(15, 23, 42, 0.08);
  --color-shadow: rgba(15, 23, 42, 0.15);

  --transition-base: 0.25s ease;
}

* {
  box-sizing: border-box;
}

body {
  font-family: "Poppins", "Inter", sans-serif;
  background: linear-gradient(160deg, #eef2ff 0%, #f8fafc 55%, #ffffff 100%);
  color: var(--color-text);
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  animation: fadeIn 0.6s ease;
  line-height: 1.6;
}

main {
  flex: 1 0 auto;
}

footer {
  flex-shrink: 0;
}

h1,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6 {
  font-weight: 600;
  color: var(--color-primary);
}

.text-muted {
  color: var(--color-text-muted) !important;
}

/* Buttons */
.btn-brand,
.btn-primary {
  background: linear-gradient(135deg, var(--color-secondary), var(--color-secondary-dark));
  border-color: transparent;
  color: #fff;
  font-weight: 600;
  transition: transform var(--transition-base), box-shadow var(--transition-base),
    background-color var(--transition-base);
}

.btn-brand:hover,
.btn-brand:focus,
.btn-primary:hover,
.btn-primary:focus {
  background: linear-gradient(135deg, var(--color-secondary-dark), var(--color-secondary));
  border-color: transparent;
  box-shadow: 0 18px 35px rgba(99, 102, 241, 0.3);
  transform: translateY(-1px);
  color: #fff;
}

.btn-outline-light {
  color: #e0e7ff;
  border-color: rgba(226, 232, 240, 0.35);
  backdrop-filter: blur(4px);
}

.btn-outline-light:hover,
.btn-outline-light:focus {
  color: var(--color-primary);
  background-color: #ffffff;
  border-color: #ffffff;
  box-shadow: 0 15px 30px rgba(15, 23, 42, 0.18);
}

.btn-danger {
  background-color: rgba(239, 68, 68, 0.92);
  border-color: rgba(239, 68, 68, 0.92);
}

.btn-danger:hover,
.btn-danger:focus {
  background-color: #b91c1c;
  border-color: #b91c1c;
  box-shadow: 0 14px 28px rgba(185, 28, 28, 0.25);
}

.btn-light.text-brand {
  color: var(--color-primary) !important;
}

/* Login */
.login-body {
  min-height: 100vh;
  background: radial-gradient(circle at top left, rgba(99, 102, 241, 0.35), transparent 55%),
    radial-gradient(circle at bottom right, rgba(20, 184, 166, 0.25), transparent 45%),
    linear-gradient(160deg, #0f172a 0%, #1f2937 45%, #111827 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem 5rem;
  position: relative;
  overflow: hidden;
}

.login-body::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(148, 163, 184, 0.2), transparent 55%),
    radial-gradient(circle at bottom left, rgba(99, 102, 241, 0.2), transparent 45%);
  z-index: 0;
}

.login-wrapper {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
}

.login-card {
  border: none;
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.35);
  box-shadow: 0 35px 65px rgba(8, 15, 35, 0.55);
  overflow: hidden;
  backdrop-filter: blur(20px);
}

.login-card-header {
  padding: 2.8rem 2.4rem 2rem;
  text-align: center;
  background: linear-gradient(140deg, rgba(99, 102, 241, 0.35), rgba(20, 184, 166, 0.25));
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.login-logo {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.95), rgba(79, 70, 229, 0.95));
  display: grid;
  place-items: center;
  margin: 0 auto 1.25rem;
  color: #ffffff;
  font-size: 2.1rem;
  box-shadow: 0 20px 45px rgba(79, 70, 229, 0.45);
}

.login-card h1 {
  font-size: 1.7rem;
  margin-bottom: 0.35rem;
  color: #f8fafc;
}

.login-card p {
  margin-bottom: 0;
  color: rgba(226, 232, 240, 0.85);
}

.login-card .card-body {
  padding: 2.65rem 2.45rem;
  background: linear-gradient(160deg, rgba(15, 23, 42, 0.65), rgba(15, 23, 42, 0.35));
}

.login-card .form-label {
  font-weight: 600;
  color: rgba(226, 232, 240, 0.92);
}

.login-card .input-group-text {
  background-color: rgba(99, 102, 241, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-right: none;
  color: #eef2ff;
  border-radius: 14px 0 0 14px;
  transition: background-color var(--transition-base), color var(--transition-base),
    border-color var(--transition-base);
}

.login-card .form-control {
  border-radius: 0 14px 14px 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 0.8rem 1rem;
  font-size: 0.95rem;
  color: #f8fafc;
  background: rgba(15, 23, 42, 0.55);
  transition: border-color var(--transition-base), box-shadow var(--transition-base),
    background-color var(--transition-base);
}

.login-card .form-control::placeholder {
  color: rgba(226, 232, 240, 0.6);
}

.login-card .form-control:focus {
  border-color: rgba(99, 102, 241, 0.75);
  background-color: rgba(15, 23, 42, 0.75);
  box-shadow: 0 0 0 0.18rem rgba(99, 102, 241, 0.25);
}

.login-card .input-group:focus-within .input-group-text {
  background-color: rgba(99, 102, 241, 0.85);
  border-color: rgba(99, 102, 241, 0.65);
  color: #ffffff;
}

.login-card .btn-brand {
  border-radius: 14px;
  padding: 0.85rem;
  font-size: 1rem;
  letter-spacing: 0.02em;
  box-shadow: 0 25px 45px rgba(99, 102, 241, 0.35);
}

.login-info-box {
  display: grid;
  gap: 0.85rem;
}

.login-info-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.9rem 1rem;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(226, 232, 240, 0.95);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.login-info-item i {
  font-size: 1.35rem;
  color: rgba(99, 102, 241, 0.85);
}

.login-info-item strong {
  display: block;
  font-size: 0.92rem;
  color: #f8fafc;
}

.login-info-item span {
  font-size: 0.8rem;
  color: rgba(226, 232, 240, 0.7);
}

.footer-credits {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  text-align: center;
  padding: 0.75rem 1rem;
  font-size: 0.8rem;
  color: rgba(226, 232, 240, 0.6);
  background: transparent;
}

.footer-credits a {
  color: inherit;
  text-decoration: none;
}

/* Navbar */
.navbar-branding {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.8));
  color: #ffffff;
  padding: 1rem 1.75rem;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.navbar-branding .navbar-brand,
.navbar-branding .nav-link,
.navbar-branding .navbar-text {
  color: #ffffff !important;
  font-weight: 500;
}

.navbar-branding .nav-link.active,
.navbar-branding .nav-link:hover,
.navbar-branding .nav-link:focus {
  color: rgba(99, 102, 241, 0.9) !important;
}

.navbar-branding .navbar-toggler {
  border: 1px solid rgba(255, 255, 255, 0.45);
}

.navbar-branding .navbar-toggler-icon {
  filter: invert(1) brightness(2);
}

/* Layout */
.app-body {
  background: transparent;
  position: relative;
  min-height: 100vh;
  padding-top: 96px;
}

.app-body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(99, 102, 241, 0.25), transparent 55%),
    radial-gradient(circle at bottom left, rgba(20, 184, 166, 0.18), transparent 50%),
    linear-gradient(180deg, rgba(226, 232, 240, 0.4), transparent 65%);
  z-index: -1;
}

.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.75rem 1.75rem 4.5rem;
}

.modern-card {
  background: rgba(255, 255, 255, 0.85);
  border-radius: 20px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 25px 55px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(12px);
}

.modern-card .card-header {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.9), rgba(79, 70, 229, 0.9));
  color: #ffffff;
  border-radius: 20px 20px 0 0 !important;
  border-bottom: none;
  padding: 1.35rem 1.9rem;
}

.modern-card .card-body {
  padding: 2rem 1.9rem 1.9rem;
}

.modern-card .form-label {
  font-weight: 600;
  color: var(--color-primary);
}

.modern-card .form-control,
.modern-card .form-select {
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.9);
  color: var(--color-text);
  transition: border-color var(--transition-base), box-shadow var(--transition-base),
    background-color var(--transition-base);
}

.modern-card .form-control::placeholder {
  color: rgba(100, 116, 139, 0.65);
}

.modern-card .form-control:focus,
.modern-card .form-select:focus {
  border-color: rgba(99, 102, 241, 0.6);
  background-color: #ffffff;
  box-shadow: 0 0 0 0.18rem rgba(99, 102, 241, 0.18);
}

.glass-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.86));
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: 0 35px 65px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(16px);
}

.dashboard-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 2.5rem 2.75rem;
  position: relative;
  overflow: hidden;
}

.dashboard-hero::before,
.dashboard-hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(0px);
  opacity: 0.6;
}

.dashboard-hero::before {
  width: 220px;
  height: 220px;
  top: -80px;
  right: -60px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.35), transparent 70%);
}

.dashboard-hero::after {
  width: 260px;
  height: 260px;
  bottom: -120px;
  left: -80px;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.28), transparent 70%);
}

.dashboard-hero .hero-copy,
.dashboard-hero .hero-stats {
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(99, 102, 241, 0.12);
  color: rgba(79, 70, 229, 0.9);
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-title {
  font-size: 2.1rem;
  margin: 1rem 0 0.75rem;
  color: var(--color-primary);
  line-height: 1.3;
}

.hero-subtitle {
  font-size: 0.98rem;
  max-width: 520px;
  color: var(--color-text-muted);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  min-width: 260px;
}

.stat-card {
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.18);
  border-radius: 16px;
  padding: 1.1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(79, 70, 229, 0.75);
  font-weight: 600;
}

.stat-value {
  font-size: 1.45rem;
  color: var(--color-primary);
  font-weight: 700;
}

.custom-table {
  margin-bottom: 0;
}

.custom-table thead {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.95), rgba(79, 70, 229, 0.95));
  color: #ffffff;
  text-transform: uppercase;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
}

.custom-table thead th {
  border-bottom: none;
  padding: 1rem 1.1rem;
}

.custom-table tbody tr {
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.custom-table tbody tr:nth-child(even) {
  background: rgba(99, 102, 241, 0.04);
}

.custom-table tbody td {
  padding: 1.05rem 1.1rem;
  vertical-align: middle;
  border-top: none;
  color: var(--color-text);
}

.custom-table tbody tr:hover {
  background: rgba(99, 102, 241, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(15, 23, 42, 0.08);
}

.custom-table .badge {
  border-radius: 999px;
  background: rgba(79, 70, 229, 0.15);
  color: rgba(79, 70, 229, 0.95);
  font-weight: 600;
  text-transform: uppercase;
}

.table-responsive {
  border-radius: 0 0 20px 20px;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-top: none;
  box-shadow: 0 22px 45px rgba(15, 23, 42, 0.12);
}

.alert-success {
  background-color: rgba(34, 197, 94, 0.12);
  color: #15803d;
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.alert-danger,
.alert-error {
  background-color: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
  border: 1px solid rgba(239, 68, 68, 0.24);
}

.alert-info {
  background-color: rgba(99, 102, 241, 0.12);
  color: rgba(79, 70, 229, 0.95);
  border: 1px solid rgba(99, 102, 241, 0.24);
}

.alert-warning {
  background-color: rgba(245, 158, 11, 0.12);
  color: #b45309;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.alert-stack .alert + .alert {
  margin-top: 0.75rem;
}

.footer-app {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 0.75rem 0;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.82));
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  font-size: 0.85rem;
  color: rgba(226, 232, 240, 0.7);
}

.footer-app a {
  color: #c7d2fe;
  text-decoration: none;
}

.footer-app a:hover {
  color: #ffffff;
}

/* Alterar senha page */
.password-page {
  background: linear-gradient(150deg, #eef2ff 0%, #f8fafc 60%, #ffffff 100%);
  min-height: 100vh;
  padding-top: 90px;
}

.password-wrapper {
  max-width: 520px;
  margin: 0 auto;
}

.password-wrapper .card {
  border-radius: 20px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 25px 55px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(8px);
}

.password-wrapper .card-header {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.9), rgba(79, 70, 229, 0.9));
  color: #ffffff;
  border-radius: 20px 20px 0 0 !important;
  padding: 1.35rem 1.75rem;
}

.password-wrapper .form-label {
  font-weight: 600;
  color: var(--color-primary);
}

.password-wrapper .input-group-text {
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-right: none;
  color: rgba(79, 70, 229, 0.95);
}

.password-wrapper .form-control {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 0 14px 14px 0;
  padding: 0.85rem 1rem;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.password-wrapper .form-control:focus {
  border-color: rgba(99, 102, 241, 0.6);
  box-shadow: 0 0 0 0.18rem rgba(99, 102, 241, 0.2);
}

.password-wrapper .input-group:focus-within .input-group-text {
  background-color: rgba(99, 102, 241, 0.85);
  color: #ffffff;
}

/* Fade-in animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease both;
}

/* Responsive */
@media (max-width: 991px) {
  .main-content {
    padding: 2rem 1.25rem 4rem;
  }

  .navbar-branding .btn {
    font-size: 0.85rem;
  }

  .dashboard-hero {
    padding: 2rem 2.25rem;
  }

  .hero-title {
    font-size: 1.9rem;
  }
}

@media (max-width: 575px) {
  .login-card .card-body {
    padding: 1.85rem 1.6rem;
  }

  .login-card-header {
    padding: 2rem 1.6rem 1.5rem;
  }

  .navbar-branding .navbar-brand {
    font-size: 1rem;
  }

  .dashboard-hero {
    padding: 1.75rem 1.5rem;
  }

  .hero-title {
    font-size: 1.65rem;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .stat-card {
    padding: 1rem 1.1rem;
  }
}
