/* assets/css/layout.css */
@import url("https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500;9..40,600&display=swap");

/* ========================================
   VARIÁVEIS CSS
======================================== */
:root {
  --sidebar-width: 260px;
  --primary-color: #2c3e50;
  --secondary-color: #6c757d;
  --success-color: #10b981;
  --danger-color: #ef4444;
  --warning-color: #ffc107;
  --info-color: #2c3e50;
  --light-color: #f8f9fa;
  --dark-color: #1f2937;
  --bg-light: #f8f9fa;
  --sidebar-bg: #1a252f;
  --sidebar-hover: #2c3e50;
  --text-primary: #2c3e50;
  --text-secondary: #6c757d;
  --text-muted: #7f8c8d;
  --border-color: #e0e0e0;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 5px 15px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "DM Sans", sans-serif;
  font-size: 15px;
  font-weight: 400;
  background-color: #f8f9fa;
}

body.login {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f6f9fc;
  padding: 20px;
  flex-direction: column;
  gap: 40px;
}

.nav-link {
  color: #19344e;
}

.grid-container {
  display: grid;
  grid-template-columns: 250px 1fr;
  /* Sidebar fixa em 250px, conteúdo flexível */
  grid-template-rows: auto 1fr;
  /* Navbar com altura automática, conteúdo expansível */
  grid-template-areas:
    "sidebar navbar"
    "sidebar content";
  min-height: 100vh;
}

.sidebar {
  grid-area: sidebar;
  background-color: #0b1c2d;
  color: white;
}

.sidebar .nav-link {
  color: #adb5bd;
  padding: 10px 20px;
  display: flex;
  gap: 10px;
}

.sidebar .nav-link i {
  width: 20px;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
  color: white;
  background-color: #213d59;
  border-left-color: #426282;
}

.sidebar-menu .nav-section-item {
  padding: 15px 20px 8px 20px !important;
  color: #95a5a6;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 10px;
  padding: 0;
}

.sidebar .sidebar-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-menu a,
.sidebar .nav li a {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  border-left: 3px solid transparent;
}

.sidebar .nav li.mt-auto {
  margin-top: auto !important;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 10px;
}

.sidebar-menu a i,
.sidebar .nav li a i {
  margin-right: 0;
  font-size: 1rem;
  width: 22px;
}

.sidebar .nav li a.text-danger:hover {
  background: rgba(231, 76, 60, 0.1);
  border-left-color: #e74c3c;
}

.content {
  grid-area: content;
  padding: 20px;
}

.navbar-top {
  grid-area: navbar;
  background-color: #ffffff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 15px 20px;
  min-height: 60px;
  display: flex;
  align-items: center;
  gap: 30px;
  justify-content: space-between;
}

.navbar-top .btn {
  background-color: #0b1c2d;
  color: white;
}

.login-container {
  background-color: #ffffff;
  max-width: 400px;
  width: 100%;
  border: solid 1px #e6eaee;
  border-radius: 8px;
  padding: 40px;
  box-shadow: 0px 10px 34px -15px rgba(0, 0, 0, 0.24);
}

.login-container .form-control {
  height: 50px;
  background-color: #f8f9fa;
}

.password-container {
  position: relative;
}

.password-container .toggle-password {
  position: absolute;
  right: 15px;
  bottom: 18px;
  cursor: pointer;
  color: #6c757d;
}

.password-wrapper .input-group-text {
  cursor: pointer;
  user-select: none;
}

.password-wrapper .fa-eye-slash {
  color: #0d6efd;
}

.colaborador-row td {
  background-color: #eaf2fb;
  font-weight: 600;
  /* Ajustado de bold para 600 para combinar com Open Sans */
  color: #19344e;
}

.text-autorizado {
  color: #fd7e14 !important;
  background-color: #fff4e6 !important;
  text-align: center;
}

.text-recusado {
  color: #dc3545 !important;
  background-color: #fdecea !important;
  text-align: center;
}

.text-aguardando {
  color: #007bff !important;
  background-color: #e6f0ff !important;
  text-align: center;
}

.text-success {
  color: #198754 !important;
  background-color: #e6f4ea !important;
  text-align: center;
}

.alert-dismissible {
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 1050;
}

.tooltip-inner {
  max-width: 300px;
}

.table-responsive th,
.table-responsive td {
  border: 1px solid #dee2e6;
}

/* Ajustar o Select2 para parecer com form-select do Bootstrap */
.select2-container--default .select2-selection--single {
  height: calc(1.5em + 0.75rem + 2px);
  /* Altura padrão do form-select */
  padding: 0.375rem 0.75rem;
  /* Padding interno */
  font-size: 1rem;
  /* Tamanho da fonte */
  line-height: 1.5;
  /* Alinhamento vertical */
  color: #212529;
  /* Cor do texto */
  background-color: #fff;
  /* Fundo branco */
  border: 1px solid #ced4da;
  /* Borda padrão */
  border-radius: 0.25rem;
  /* Bordas arredondadas */
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.075);
  /* Sombra interna opcional */
}

/* Ajustar a seta do dropdown */
.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: calc(1.5em + 0.75rem + 2px);
  /* Alinhar com a altura */
  width: 20px;
  /* Largura da seta */
  right: 5px;
  /* Posicionamento */
}

/* Estilo quando o campo está focado */
.select2-container--default.select2-container--focus .select2-selection--single {
  border-color: #86b7fe;
  /* Cor do foco do Bootstrap */
  outline: 0;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
  /* Sombra de foco */
}

/* Ajustar o placeholder */
.select2-container--default .select2-selection--single .select2-selection__placeholder {
  color: #6c757d;
  /* Cor do placeholder do Bootstrap */
}

/* Ajustar o texto selecionado */
.select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 1.5;
  /* Centralizar verticalmente */
  color: #212529;
  /* Cor do texto */
}

label .fas.fa-info-circle {
  margin-left: 5px;
  color: #b7c1c7;
  cursor: pointer;
}

.col-permissoes {
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.foto-colaborador {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 50%;
}

.foto-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-tabs .nav-link.active {
  color: #0068b1 !important;
  font-weight: 600;
}

.nav-tabs,
.nav-tabs .nav-link:focus,
.nav-tabs .nav-link:hover {
  border-bottom: none !important;
  margin-bottom: -1px;
  position: relative;
  z-index: 999;
}

/* Ajustar elementos do Bootstrap para evitar bold indesejado */
h1,
h2,
h3,
h4,
h5,
h6,
.btn,
.card-title {
  font-weight: 600;
  /* Garante peso regular */
}

.descricao-col {
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modal-dialog {
  max-width: 800px;
}

/* Media query para responsividade */
@media (max-width: 991px) {
  .grid-container {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    grid-template-areas:
      "navbar"
      "content";
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: -250px;
    width: 250px;
    height: 100vh;
    z-index: 1040;
    transition: left 0.3s ease-in-out;
    overflow-y: auto;
  }

  .sidebar.collapse:not(.show) {
    display: block;
  }

  .sidebar.collapsing,
  .sidebar.collapse.show {
    left: 0;
  }

  /* Overlay para fechar o menu ao clicar fora */
  .sidebar.collapse.show::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: -1;
  }

}

.navbar-top .message span {
  display: none;
}

.navbar-top .message {
  font-size: 18px;
}

.card-body h5 {
  margin-bottom: 20px;
}

/*========================================TOP BAR========================================*/

.top-bar-left,
.top-bar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-bar-greeting {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  color: var(--text-primary);
}

.top-bar-greeting i {
  font-size: 1.4rem;
  animation: pulse 2s ease-in-out infinite;
}

.top-bar-greeting strong {
  font-weight: 600;
}

.top-bar-datetime {
  padding: 8px 15px;
  background: var(--light-color);
  border-radius: 20px;
  border: 1px solid #e9ecef;
  font-size: .9rem;
  gap: 10px;
  align-items: center;
}

.top-bar-datetime i {
  color: var(--primary-color);
}

.btn-user-topbar {
  background: var(--light-color);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 10px 15px;
  border-radius: 25px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s;
  cursor: pointer;
  font-size: 14px;
}

.btn-user-topbar:hover {
  background: #e9ecef;
  color: var(--primary-color);
  border-color: var(--primary-color);
  transform: translateY(0) !important;
}

.list-horas {
  list-style: none;
  padding: 0;
  margin: 20px 0 0 0;
}

.list-horas li {
  padding: 5px 0;
  border-bottom: 1px solid #e9ecef;
}

.list-horas li:last-child {
  border-bottom: none;
}

/* ========================================
   TOP BAR - CLIMA SÃO PAULO
======================================== */
.top-bar-weather {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 15px;
  background: linear-gradient(135deg, #0b1c2d 0%, #4c637b 100%);
  border-radius: 20px;
  color: white;
  font-size: 14px;
  font-weight: 500;
  cursor: help;
  transition: all 0.3s ease;
}

.weather-icon {
  font-size: 1.5rem;
  line-height: 1;
  animation: weatherPulse 3s ease-in-out infinite;
}

@keyframes weatherPulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.1);
  }
}

.weather-temp {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.5px;
}

.weather-city {
  font-size: 0.85rem;
  opacity: 0.95;
  padding-left: 8px;
  border-left: 1px solid rgba(255, 255, 255, 0.3);
}

.horas-lista {
  list-style: none;
  padding: 0;
  margin: 0;
}

.horas-lista li {
  padding: 6px 0;
  border-bottom: 1px solid #eee;
}

.horas-lista li:last-child {
  border-bottom: none;
}

.horas-lista strong {
  display: inline-block;
  color: #000000;
}