.card-tile {
  cursor: pointer;
  transition: transform 0.05s ease-in-out, box-shadow 0.05s ease-in-out;
}

.card-tile:hover {
  transform: translateY(-1px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.06);
}

.table td {
  vertical-align: middle;
}

.crud-sortable {
  cursor: pointer;
  user-select: none;
}

.navbar {
  background-color: var(--app-navbar-bg, var(--bs-primary)) !important;
}

body {
  background-color: var(--app-body-bg, var(--bs-body-bg)) !important;
}

.app-topbar {
  background-color: var(--app-navbar-bg, var(--bs-primary)) !important;
  box-shadow: 0 0.5rem 1.25rem rgba(0, 0, 0, 0.08);
}

.app-topbar .navbar-brand {
  cursor: pointer;
}

.nav-quick-select {
  min-width: 220px;
  max-width: 320px;
}

.app-topbar-brand {
  line-height: 1.1;
}

.app-topbar-brand-title {
  font-weight: 700;
  font-size: 0.95rem;
}

.app-topbar-brand-subtitle {
  font-size: 0.7rem;
  opacity: 0.85;
  letter-spacing: 0.08em;
}

.login-layout {
  min-height: 100vh;
  background: #f4f6f8;
}

.login-hero {
  position: relative;
  min-height: 100vh;
  background:
    linear-gradient(100deg, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.12)),
    radial-gradient(1000px 800px at 20% 30%, rgba(13, 110, 253, 0.25), rgba(13, 110, 253, 0)),
    linear-gradient(120deg, #0b1f14, #102a1a 40%, #0e2a22);
  overflow: hidden;
}

.login-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 120px);
  opacity: 0.35;
  pointer-events: none;
}

.login-panel {
  min-height: 100vh;
  background: #f4f6f8;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 420px;
  border: 0;
  border-radius: 16px;
  box-shadow: 0 1.25rem 3rem rgba(0, 0, 0, 0.08);
}

.login-title {
  font-size: 1.55rem;
  font-weight: 800;
  color: #1b5e20;
}

.login-subtitle {
  color: #6c757d;
  font-size: 0.9rem;
}

.menu-wrap {
  max-width: 1200px;
  margin: 0 auto;
}

.menu-section-title {
  font-weight: 800;
  font-size: 1.35rem;
  margin: 14px 0 10px;
}

.menu-tile {
  border: 0;
  border-radius: 16px;
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.06);
  width: 100%;
}

.menu-tile:hover {
  box-shadow: 0 0.75rem 2rem rgba(0, 0, 0, 0.08);
}

.menu-tile-body {
  min-height: 132px;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.menu-tile-head {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  width: 100%;
}

.menu-tile-text {
  flex: 1 1 auto;
  min-width: 0;
}

.menu-tile-icon {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff;
  flex: 0 0 auto;
}

.menu-tile-icon.cad {
  background: #0d6efd;
}

.menu-tile-icon.op {
  background: #198754;
}

.menu-tile-icon.cfg {
  background: #fd7e14;
}

.menu-tile-title {
  font-weight: 700;
}

.menu-tile-sub {
  color: #6c757d;
  font-size: 0.9rem;
}

.menu-tile-actions {
  margin-top: auto;
  padding-top: 1rem;
  display: flex;
  justify-content: flex-end;
}

.menu-tile-go {
  font-weight: 600;
  color: var(--bs-primary);
  text-decoration: none;
}

.menu-tile-go:hover {
  text-decoration: underline;
}

.app-loader {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease-in-out;
  z-index: 2000;
}

.app-loader.show {
  opacity: 1;
  pointer-events: auto;
}

.app-loader-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0.75rem 2rem rgba(0, 0, 0, 0.12);
}

.modal {
  --bs-modal-width: 80vw;
  --bs-modal-margin: 10vh;
}

.modal .modal-dialog {
  max-width: 80vw;
  width: 80vw;
  height: 80vh;
  margin: 10vh auto;
}

.modal .modal-content {
  height: 80vh;
}

.modal .modal-body {
  overflow: auto;
}

.modal.modal-compact .modal-dialog {
  max-width: 80vw;
  width: 80vw;
  height: 80vh;
  margin: 10vh auto;
}

.bg-purple {
  background-color: #9333ea !important;
}

.z-1 { z-index: 1; }
.z-2 { z-index: 2; }
.end-1 { inset-inline-end: 0.25rem; right: 0.25rem; }
.end-2 { inset-inline-end: 0.5rem; right: 0.5rem; }
.end-3 { inset-inline-end: 1rem; right: 1rem; }
.end-4 { inset-inline-end: 1.5rem; right: 1.5rem; }
.bottom-1 { bottom: 0.25rem; }
.bottom-2 { bottom: 0.5rem; }
.bottom-3 { bottom: 1rem; }
.bottom-4 { bottom: 1.5rem; }

.brasil-svg-map path.br-uf-path {
  transition: fill 140ms ease, stroke-width 120ms ease, filter 120ms ease;
}

.brasil-svg-map path.br-uf-path:hover {
  stroke: rgba(15,23,42,0.55);
}

@media (max-width: 991.98px) {
  .brasil-svg-map text { font-size: 0.9em; }
}

@media (max-width: 767.98px) {
  #main > .row > .col-xl-6 > .card {
    min-height: 440px !important;
  }
  .brasil-svg-map text { letter-spacing: 0 !important; }
}

.app-loader-logo-wrap {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: rgba(13, 110, 253, 0.08);
}

.app-loader-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
  animation: app-loader-pulse 1.1s ease-in-out infinite;
}

.app-loader-spinner {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid rgba(0, 0, 0, 0.15);
  border-top-color: rgba(0, 0, 0, 0.65);
  animation: app-loader-spin 0.8s linear infinite;
}

@keyframes app-loader-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes app-loader-pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.95;
  }
  50% {
    transform: scale(1.06);
    opacity: 1;
  }
}
