/* ============================
  VARIÁVEIS GLOBAIS
============================= */
:root {
  --color-primary: #154A99;
  --color-secondary: #031D42;
  --color-accent: #154A99;

  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
}

* {
  box-sizing: border-box;
}

/* ============================
  TIPOGRAFIA GLOBAL E SUAVE
============================= */

body {
  font-family: 'Inter', sans-serif;
  font-size: 0.9375rem;
  /* 15px — base mais compacta */
  line-height: 1.55;
  color: #374151;
  /* Gray-700 suave */
  letter-spacing: -0.006em;
}

/* Títulos principais */
h1,
h2,
h3,
h4,
h5,

/* h1 um pouco maior */
h1 {
  font-size: 1.5rem;
  /* 24px */
  letter-spacing: -0.01em;
}

/* h2 padrão de seção */
h2 {
  font-size: 1.125rem;
  /* 18px */
}



/* Textos menores tipo legenda, descrição etc. */
small,
.text-muted {
  color: #6b7280;
  /* Gray-500 */
  font-size: 0.875rem;
}


/* ============================
  COMPONENTES
============================= */

/* Inputs */
.input {
  height: 2.125rem;
  width: 100%;
  padding: 0 0.75rem;
  font-size: 0.8125rem;
  background-color: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: var(--radius-md);
  transition: all 0.2s ease-in-out;
}

.input:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--color-primary);
}

/* Botões */
.btn {
  height: 2.25rem;
  width: 100%;
  font-weight: 600;
  font-size: 0.8125rem;
  color: white;
  background-color: var(--color-primary);
  border-radius: var(--radius-md);
  transition: background-color 0.2s ease-in-out;
  border: none;
  cursor: pointer;
}


.btn:hover {
  background-color: var(--color-primary);
}

/* Botão tipo link */
.btn-link {
  color: var(--color-primary);
}

.btn-link:hover {
  text-decoration: underline;
}

/* Labels */
.label {
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
  color: #4b5563;
  display: block;
}

/* ============================
  GRID E FORMULÁRIOS
============================= */

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .form-grid.form-col-2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .form-grid.form-col-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .form-full {
    grid-column: span 2;
  }

  .form-span-3 {
    grid-column: span 3;
  }
}

/* ============================
  ESTILOS VISUAIS
============================= */

.gradient-bg {
  background: linear-gradient(135deg, #154A99 0%, #031D42 100%);
}

.hero-gradient {
  background: linear-gradient(135deg, #154A99 0%, #031D42 50%, #154A99 100%);
}

.glass-effect {
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.1);
}

.transition-all {
  transition-property: all;
  transition-duration: 0.2s;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================
  SIDEBAR
============================= */
.sidebar-header {
  display: flex;
  align-items: center;
  height: 4rem;
  gap: 0.75rem;
  padding: 1rem;
}

.sidebar-logo {
  object-fit: contain;
  width: 2.5rem;
  height: 2.5rem;
}

.sidebar-title {
  font-size: 1rem;
  font-weight: 600;
}

.sidebar-link {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  transition: all 0.2s ease-in-out;
}

.sidebar-link i {
  stroke-width: 2.5;
}

.sidebar-link:hover {
  background-color: #0F3A78;
}

.sidebar-subitem {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  border-radius: var(--radius-md);
  transition: all 0.2s ease-in-out;
}

.sidebar-subitem:hover {
  background-color: #0F3A78;
}

/* ============================
  HEADER
============================= */
.header-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background-color: white;
  border-bottom: 1px solid #e5e7eb;
  min-height: 4rem;
  flex-shrink: 0;
}

.header-container {
  min-height: 4rem;
  flex-shrink: 0;
}

/* ============================
  SIDEBAR TRANSITION & STATES
============================= */
.sidebar-transition {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (max-width: 767px) {
  .sidebar-collapsed {
    transform: translateX(-100%);
  }

  .sidebar-open {
    transform: translateX(0);
  }
}

@media (min-width: 768px) {
  .sidebar-collapsed {
    margin-left: -16rem;
  }

  .sidebar-open {
    margin-left: 0;
  }
}

/* ============================
  COLLAPSIBLE BEHAVIOR
============================= */
.collapsible-trigger:hover {
  display: flex;
}

.collapsibble-menu-icons {
  color: white;
}

.collapsible-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
  opacity: 0;
}

.collapsible-content.open {
  max-height: 500px;
  opacity: 1;
}

.dropdown-transition {
  transition: transform 0.2s ease, opacity 0.2s ease;
  color: white;
}

.rotate-180 {
  transform: rotate(180deg);
}

/* ============================
  UX SAFE
============================= */
body {
  overflow-x: hidden;
}

/* ============================
  MAIN CONTENT AREA
============================= */

.main-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  background-color: #f9fafb;
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background-color: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  min-height: 4rem;
  flex-shrink: 0;
}

#sidebar-toggle {
  width: 1rem;
  height: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background-color 0.2s ease-in-out;
  border-radius: var(--radius-md);
}

#sidebar-toggle:hover {
  background-color: #f3f4f6;
}

.bg-border {
  background-color: #e5e7eb;
}

/* ============================
  OVERLAY PARA MOBILE
============================= */
#mobile-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  background-color: rgba(0, 0, 0, 0.5);
  transition: opacity 0.3s ease;
  display: none;
}

@media (max-width: 767px) {
  #mobile-overlay.hidden {
    display: none;
  }

  #mobile-overlay.show {
    display: block;
  }
}


/* ============================
  PADDING GERAL DE PÁGINAS
============================= */
.page-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* ============================
  Tabelas
============================= */


/* celulas */
td {
  padding: 0.75rem;
  font-size: 0.8125rem;
}

/* cabeçalho */
thead {
  font-size: 0.6875rem;
  line-height: 1rem;
  letter-spacing: 0.02em;
  border-bottom-width: 1px;
  color: var(--color-secondary);
}

th {
  padding: 0.625rem 0.75rem;
}

/* Linhas */
tr:hover {
  background: #f9fafb;
}

/* ============================
  Tabs
============================= */
.tab-content {
  animation: fade 0.8s ease-in-out;
}

@keyframes fade {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modal {
  display: none;
}

.modal.is-open {
  display: block;
}