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

body, html {
    height: 100%;
    font-family: 'Inter', sans-serif;
}


/* -------------------------------------------------------------------------- LOGIN PAGE ------------------------------------------- */

.login-page {
    background-color: black; /* fundo base */
    background-image: linear-gradient(rgba(5, 113, 225, 0.2), rgba(5, 113, 225, 0.2)); /* camada azul 20% */
    background-blend-mode: normal; /* mantém as duas cores */
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 100vh;
}


/* Container principal */
.login-page .login-container {
    display: flex;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    justify-content: center;
    align-items: center;
    max-width: 800px;
    width: 100%;
    border-radius: 40px;
    background-color: #fff;
    overflow: hidden;
}

.login-page .vertical-line {
    width: 6px;
    height: 400px;
    background-color: #029ECE;
    margin-left: 60px;
}

.login-page .button-line {
    width: 100%;
    height: 2px;
    background-color: #CCCCCC;
    margin: 6px 0;
}

.login-page .footer-text {
    text-align: center;
    font-size: 12px;
    color: #666666;
    margin-top: 3px;
    font-weight: 400;
}

/* Painel esquerdo */
.login-page .left-panel {
    width: 361px;
    height: 480px;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-page .left-panel .logo {
    display: flex;
    align-items: center;
    gap: 16px;
}

.login-page .left-panel img {
    width: 200px;
    margin-bottom: 20px;
}

.login-page .dap-title {
    font-size: 36px;
    color: #00b0f0;
    margin-bottom: 8px;
    text-align: center;
}

.login-page .dap-subtitle {
    font-size: 18px;
    color: #00b0f0;
    text-align: center;
}

/* Painel direito */
.login-page .right-panel {
    width: 361px;
    height: 480px;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 60px 50px 0 50px;
}

.login-page .right-panel h1 {
    font-size: 28px;
    margin-bottom: 30px;
    color: #000;
    font-weight: 600;
}

/* Formulário */
.login-page .login-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.login-page .form-group {
    display: flex;
    flex-direction: column;
}

.login-page .login-form label {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 6px;
    color: #333;
}

.login-page .input-group {
    position: relative;
}

.login-page .input-group input {
    width: 100%;
    padding: 12px 40px 12px 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    background-color: #e8e8e8;
    color: #000;
    font-size: 14px;
    transition: all 0.3s ease;
}

.login-page .input-group input:focus {
    outline: none;
    border-color: #00b0f0;
    background-color: #fff;
    box-shadow: 0 0 0 2px rgba(0, 176, 240, 0.2);
}

.login-page .clear-btn, 
.login-page .toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 18px;
    color: #666;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

/* garante que só o botão certo aparece na posição esperada */
.login-page .input-group .clear-btn {
    right: 12px;
}

.login-page .input-group .toggle-password {
    right: 12px;
    z-index: 2;
}

.login-page .toggle-password svg {
    width: 18px;
    height: 18px;
}

.login-page .password-visible .toggle-password svg path:nth-child(2) {
    display: none;
}

.login-page .login-btn {
    margin-top: 10px;
    padding: 12px;
    background-color: #0082B6;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.login-page .login-btn:hover {
    background-color: #056A92;
}

.login-page .login-btn:active {
    transform: translateY(1px);
}

.login-page .error-message {
    color: #d32f2f;
    font-size: 14px;
    margin-top: -145px; /* valor negativo aproxima o texto do elemento acima */
    min-height: 20px;
    margin-left: 50px; /* aumenta o valor para mover mais à direita */
    visibility: hidden;
}

.login-page .error-message.visible {
    visibility: visible;
}

/* Responsivo login */
@media (max-width: 768px) {
    .login-page .login-container {
        flex-direction: column;
        max-width: 360px;
        height: auto;
    }
    
    .login-page .left-panel, 
    .login-page .right-panel {
        width: 100%;
        height: auto;
    }
    
    .login-page .left-panel {
        padding: 40px 20px;
    }
    
    .login-page .right-panel {
        padding: 30px 25px;
    }
}

/* --------------------------------------------------------------- OVERVIEW - PAGE ADMIN ------------------------------------------- */

/* ==============================================
   CORREÇÃO PARA FUNDO DA PÁGINA DE ROTAS/ENTREGAS
============================================== */

#rotas.page-container {
    background: #f8f9fa !important; /* Mantém o fundo cinza */
    min-height: 100vh;
    padding: 20px;
}

#rotas .card {
    background: white !important;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

#rotas .form-section {
    background: transparent !important; /* Remove fundo branco duplicado */
    border: 1px solid #e9ecef;
}

/* Garante que o fundo cinza seja visível */
body {
    background-color: #f8f9fa !important;
}

.page-container {
    background-color: #f8f9fa !important;
}


.overview-page {
  width: 100%;
  height: 100%;
  color: #333;
  background-color: #f5f5f5;
  font-family: 'Inter', sans-serif;
}


/* Layout geral */
.overview-page .layout-container {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

/* Sidebar FIXO */
.overview-page .sidebar {
  width: 250px;
  background: #80808038;
  border-right: 1px solid #ddd;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1rem;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 900;
  margin-top: 80px;
  height: calc(100vh - 80px);
  overflow-y: auto;
}

.overview-page .sidebar .logo {
  text-align: center;
  margin: 40px 0 2rem 0;
  margin-bottom: 4rem;
  padding-left: 0;
}

.overview-page .sidebar .logo img {
  display: block;
  margin: 0 auto;
  width: 100px;
}

.overview-page .sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
}

.overview-page .sidebar ul li {
  margin: 0.5rem 0;
  width: 100%;
}

.overview-page .sidebar ul li a {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.8rem;
  text-decoration: none;
  color: #333;
  font-weight: 500;
  padding: 0.8rem 1rem;
  border-radius: 8px;
  transition: background 0.3s;
  width: 100%;
  box-sizing: border-box;
}

.overview-page .sidebar ul li a:hover {
  background: #4e5b645d;
}

/* Indicador lateral do item ativo */
.overview-page .sidebar ul li a {
  position: relative;
}

/* Barrinha do lado esquerdo */
.overview-page .sidebar ul li a.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 6px;
  background-color: #4a90e2;
  border-radius: 2px;
}

.menu-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.overview-page .sidebar .footer {
  font-size: 0.8rem;
  color: #999;
  text-align: center;
  margin-top: auto;
}

/* Header FIXO */
.overview-page .header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 90px;
  display: flex;
  align-items: center;
  z-index: 1000;
}

.overview-page .header .red-block {
  background: #aaaaaa;
  width: 250px;
  height: 100%;
  position: relative;
}

.overview-page .header .red-block::after {
  content: "";
  position: absolute;
  left: 100%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 60px solid transparent;
  border-right: 60px solid transparent;
  border-top: 90px solid #8d8d8d;
}

.overview-page .header .blue-block {
  background: #BBBBBB;
  flex: 1;
  height: 100%;
}

.overview-page .header .user {
  position: absolute;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgb(0, 0, 0);
  font-size: 1.1rem;
  background-color: #f1f1f14b;
  padding: 10px 20px;
  border-radius: 23px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  min-width: 180px;
  justify-content: right;
}

.overview-page .header .avatar {
  background: #4a90e2;
  color: #fff;
  border-radius: 50%;
  padding: 10px;
}

/* Username e logout em coluna */
.user-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
}

.overview-page .header .logout {
  color: blue;
  font-size: 1rem;
  text-decoration: none;
  right: 20px;
}

/* Main Content - COMPENSA SIDEBAR */
.overview-page .main {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: calc(100% - 250px);
  margin-left: 250px;
  padding-top: 80px;
  min-height: 100vh;
}

/* Dashboard */
.overview-page .dashboard {
  flex: 1;
  padding: 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  grid-gap: 20px;
  align-content: start;
}

.overview-page .card {
  background: #fff;
  padding: 4.5rem;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

/* Container para os 3 cards de baixo */
.overview-page .stats-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  grid-column: 1 / -1;
}

/* Responsividade para o stats-container */
@media (max-width: 1144px) {
  .overview-page .stats-container {
    grid-template-columns: 1fr;
  }
}

.overview-page .stats-container .card.stats-card {
  display: flex;
  flex-direction: column;
  min-height: 200px;
  padding: 4rem;
}

.stats-card p {
  margin-bottom: 12px;
}

.stats-card p:last-child {
  margin-bottom: 24px;
}

.overview-page .card.big {
  grid-column: 1 / -1;
}

.overview-page .card h3 {
  margin: 0 0 2rem;
  font-size: 1.6rem;
  color: #116896;
}

.overview-page .deliveries {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  font-size: 1.0rem;
}

/* Aumenta os textos dentro das entregas */
.card.big .delivery {
  font-size: 1.3rem;
}

.overview-page .delivery {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 15px;
  padding: 1rem;
  border-bottom: 1px solid #eee;
  align-items: start;
}

.overview-page .delivery:last-child {
  border-bottom: none;
}

.overview-page .delivery strong {
  display: block;
  margin-bottom: 0.5rem;
  color: black;
  font-size: 1.3rem;
}

.overview-page .delivery a {
  color: #007bff;
  text-decoration: none;
  font-weight: 800;
}

/* Progress Bars */
.overview-page .progress {
  width: 100%;
  height: 10px;
  background: #d5ecfc;
  border-radius: 5px;
  overflow: hidden;
  margin: 0.5rem 0;
}

.overview-page .progress-bar {
  height: 100%;
  background: #4a90e2;
  transition: width 0.5s;
}

.overview-page .p30 { width: 30%; }
.overview-page .p70 { width: 70%; }

.overview-page .legend {
  font-size: 1.3rem;
  color: #666;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 0.5rem;
}

.overview-page .legend span {
  display: inline-block;
  width: 12px;
  height: 8px;
  border-radius: 2px;
}

.overview-page .legend .filled { background: #4a90e2; }
.overview-page .legend .pending { background: #bcd3f5; }

/* Responsividade */
@media (max-width: 768px) {
  .overview-page .sidebar {
    width: 100%;
    height: 60px;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    padding: 0 1rem;
    position: fixed;
    top: 80px;
    left: 0;
    z-index: 900;
    margin-top: 0;
    height: 60px;
    overflow-x: auto;
  }

  .overview-page .sidebar ul {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
  }

  .overview-page .sidebar ul li {
    margin: 0;
    width: auto;
  }

  .overview-page .sidebar ul li a {
    white-space: nowrap;
    padding: 0.5rem 1rem;
  }

  .overview-page .sidebar .logo,
  .overview-page .sidebar .footer {
    display: none;
  }

  .overview-page .main {
    width: 100%;
    margin-left: 0;
    padding-top: 140px;
  }

  .overview-page .delivery {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

/* Controlador de paginas */
.page-container {
  flex: 1;
  padding: 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  grid-gap: 20px;
  align-content: start;
}

.page-container.active {
  opacity: 1;
  visibility: visible;
}

/* ----------------------------------------------------------- OUTRAS CONFIGS - PAGE ADMIN ------------------------------------------- */

.rota-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 54px 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-weight: 600;
  margin-bottom: 4px;
  color: #333;
}

.form-group input,
.form-group select {
  padding: 12px 10px;
  border: 1px solid #ddd;
  border-radius: 11px;
  font-family: inherit;
  background-color: #f0f0f0;
  max-width: 100%;
  height: 50px;
  box-sizing: border-box;
  appearance: none;
}

.form-group input:focus {
  border-color: #007bff;
  outline: none;
  box-shadow: 0 0 3px rgba(0, 123, 255, 0.5);
}

.form-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  margin-top: 1rem;
}

.btn {
  background: #4a90e2;
  color: #fff;
  border: none;
  padding: 18px 32px;
  border-radius: 15px;
  cursor: pointer;
  font-weight: 700;
  font-size: 18px;
  min-width: 150px;
  margin-right: 15px;
}

/* botao de imprimir entrega */
.btn-print {
  display: none;
  background: #28a745;
  color: #fff;
  border: none;
  padding: 18px 32px;
  border-radius: 15px;
  cursor: pointer;
  margin-bottom: 15px;
  float: right;
  font-weight: 700;
  font-size: 18px;
}

.btn-print:hover {
    background: #218838;
}

.btn-print:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.btn:hover {
  background: #357ab7;
}

.input-checkbox {
  display: flex;
  align-items: center;
  gap: 15px;
  width: 100%;
}

.input-checkbox input[type="number"] {
  flex: 1;
}

.checkbox-label input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 50px;
  height: 50px;
  border: 1px solid #ddd;
  border-radius: 12px;
  background-color: #f1f1f1;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
  top: 2.5px;
}

/* Efeito ao passar o mouse */
.checkbox-label input[type="checkbox"]:hover {
  background-color: #e0e0e0;
}

/* Quando marcado */
.checkbox-label input[type="checkbox"]:checked {
  background-color: #4a90e2;
  border-color: #4a90e2;
}

/* Check customizado */
.checkbox-label input[type="checkbox"]:checked::after {
  content: "✔";
  color: white;
  font-size: 19px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  line-height: 1; 
}

.checkbox-label span {
  font-size: 17px;
  display: flex;
  align-items: center;
}

.select-wrapper {
  position: relative;
  display: inline-block;
  width: 100%;
}

.select-wrapper select {
  width: 100%;
  padding: 10px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  border-radius: 12px;
  background-color: #f0f0f0;
  font-size: 16px;
  cursor: pointer;
  border: 1px solid #ddd;
  outline: none;
  transition: border 0.2s;
}

/* Borda azul ao focar */
.select-wrapper select:focus {
  border-color: #007BFF;
  box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}

/* Setinha personalizada */
.select-wrapper::after {
  content: "▼";
  font-size: 14px;
  color: #555;
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

/* ----------------------------------------------------------- TABELA - PAGE ADMIN ------------------------------------------- */

/* ==============================================
   SCROLL NAS TABELAS COM CABEÇALHO FIXO - SOLUÇÃO DEFINITIVA
============================================== */

.table-container {
  position: relative;
  max-height: 500px;
  overflow: auto;
  border-radius: 15px;
  border: 1px solid #ddd;
  margin-bottom: 20px;
  background: white;
  
  /* IMPORTANTE: Garantir contexto de stacking */
  transform: translateZ(0);
}

/* TABELA NORMAL - SEM display: block que quebra o sticky */
.styled-table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  background: white;
  font-size: 16px;
  min-width: 600px;
}

/* CABEÇALHO FIXO - SOLUÇÃO DEFINITIVA */
.styled-table thead {
  position: sticky;
  top: -1px; /* Compensa possíveis bordas */
  z-index: 1000;
  background: #8080809d;
}

.styled-table thead tr {
  background: #8080809d;
}

/* CÉLULAS DO CABEÇALHO */
.styled-table th {
  font-weight: 700;
  font-size: 20px;
  text-align: center;
  padding: 16px 15px;
  background: #8080809d;
  border-bottom: 2px solid #666;
  color: black;
  position: sticky;
  top: -1px; /* Mesmo valor do thead */
  z-index: 1001;
  
  /* Garantir que o fundo cubra tudo */
  box-shadow: 0 1px 0 #666;
}

/* Ajuste para tabelas dentro de containers de veículos */
.vehicle-table-container .table-container {
  max-height: 400px;
}

/* Ajuste para tabela de relatórios */
#relatorios .table-container {
  max-height: 600px;
}

/* Estilos normais das células */
.styled-table td {
  padding: 8px 10px;
  border: 1px solid #ddd;
  text-align: center;
  vertical-align: middle;
}

.styled-table tbody tr:nth-child(even) {
  background-color: #f3f3f3;
}

.styled-table tbody tr:hover {
  background-color: #d0e7ff;
}

/* Botão de lixeira */
.action-cell {
  text-align: center;
  vertical-align: middle;
  padding: 8px;
}

/* Deixa os nomes azuis */
.styled-table tbody tr td:first-child {
  color: #0415ac;
  font-weight: 500;
  text-decoration: underline;
}

.styled-table tbody tr:hover td {
    background-color: #cfe4ff !important;

}
.delete-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.delete-btn img {
  width: 48px;
  height: 48px;
  vertical-align: middle;
  position: relative;
  top: 7px;
  transition: transform 0.2s;
}

.delete-btn:hover img {
  transform: scale(1.2);
}

.client-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.client-img {
  width: 28px;
  height: 28px;
  object-fit: cover;
  flex-shrink: 0;
}

.filter-label {
  font-weight: 500;
  font-size: 14px;
  color: #333;
}

.filter-select {
  margin-left: 5px;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid #ccc;
  background-color: #f0f0f0;
  font-size: 14px;
  cursor: pointer;
}

.filter-select:focus {
  outline: none;
  border-color: #4a90e2;
  box-shadow: 0 0 5px rgba(74,144,226,0.5);
}

.filter-btn {
  background-color: #4a90e2;
  color: white;
  border: none;
  border-radius: 10px;
  padding: 6px 20px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.filter-btn:hover {
  background-color: #357ab8;
}

/* Input de filtro */
.filter-input {
    padding: 7px 10px;
    border: 1px solid #ced4da;
    border-radius: 12px;
    background: #f0f0f0;
    min-width: 150px;
    font-size: 14px;
}

.filter-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.filter-input::placeholder {
    color: black;
    opacity: 0.7;
}

.btn-clear-filters {
    transition: background-color 0.3s;
    font-size: 14px;
}

.btn-clear-filters:hover {
    background-color: #5a6268 !important;
}

/* Ajuste para layout responsivo dos filtros */
@media (max-width: 768px) {
    .filters {
        flex-direction: column;
        gap: 10px;
    }
    
    .filter-label {
        width: 100%;
    }
    
    .filter-select, .filter-input {
        min-width: 100%;
    }
    
    .btn-clear-filters {
        align-self: flex-start;
        margin-top: 10px;
    }
}

/* Manter a margem entre as seções */
#inicio .deliveries {
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

#inicio .stats-container {
    margin-top: 20px;
}

/* CSS para as seções do motorista */
.page-container-driver {
    display: none;
}

.page-container-driver.active {
    display: block;
}

/* =========================
   MODAL - ESTILOS GERAIS
========================= */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-container {
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.25s ease;
}

/* =========================
   CABEÇALHO
========================= */

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
}

.modal-header h3 {
    margin: 0;
    color: #0082B6;
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #333;
}

/* =========================
   CORPO
========================= */

.modal-body {
    padding: 20px;
}

/* =========================
   RODAPÉ
========================= */

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 20px;
    border-top: 1px solid #e0e0e0;
}

/* =========================
   BOTÕES
========================= */

.btn-buscar {
  background: #4a90e2;
  color: #fff;
  border: none;
  padding: 15px 30px;
  border-radius: 15px;
  cursor: pointer;
  font-weight: 700;
  font-size: 18px;
  min-width: 150px;
  margin-right: 15px;
}

.btn-buscar:hover {
    background: #006a96;
}

.btn-buscar:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.btn-secondary {
    background: #6c757d;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-secondary:hover {
    background: #545b62;
}

.btn-primary {
    background: #28a745;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:hover:not(:disabled) {
    background: #218838;
}

.btn-primary:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

/* =========================
   FORMULÁRIOS
========================= */

.form-group {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-weight: 500;
    color: #333;
}

/* Alinhamento horizontal do input + botão */
.input-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.input-group input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 14px;
}

.input-group input:focus {
    outline: none;
    border-color: #007bff;
}

/* Campos padrões */
.form-group textarea,
.form-group select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 14px;
}

.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #007bff;
}

/* =========================
   GRID DE INFORMAÇÕES
========================= */

.info-grid {
    font-size: 14px;
}

.info-grid strong {
    color: #555;
}

/* =========================
   ANIMAÇÃO
========================= */

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Estilo para campo desabilitado */
#waterCounter:disabled {
    background-color: #f5f5f5;
    border-color: #ddd;
    color: #999;
    cursor: not-allowed;
}

/* Estilo para campo habilitado */
#waterCounter:enabled {
    background-color: #fff;
    border-color: #007bff;
    color: #333;
}

/* Estilo visual com classes */
#waterCounter.disabled {
    background-color: #f8f9fa;
    border-color: #dee2e6;
    color: #6c757d;
}

#waterCounter.enabled {
    background-color: #ffffff;
    border-color: #007bff;
    color: #212529;
}

/* Melhorar a aparência do scroll */
.table-container::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.table-container::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 0 15px 15px 0;
}

.table-container::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* Responsividade para tabelas */
@media (max-width: 768px) {
  .table-container {
    max-height: 400px;
  }
  
  .styled-table {
    min-width: 800px;
  }
  
  .vehicle-table-container .table-container {
    max-height: 350px;
  }
  
  #relatorios .table-container {
    max-height: 500px;
  }
}


/* Adicione estilos para o botão de copiar */
.copy-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.copy-btn:hover {
    background-color: #e9ecef;
}

.copy-btn img {
    width: 20px;
    height: 20px;
}

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

.observacao-cell:hover {
    white-space: normal;
    overflow: visible;
    position: relative;
    z-index: 10;
}


/* Estilos para o Modal de Cancelamento */
.modal {
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background-color: white;
  padding: 0;
  border-radius: 8px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #e0e0e0;
  background-color: #f8f9fa;
  border-radius: 8px 8px 0 0;
}

.modal-header h3 {
  margin: 0;
  color: #1079be;
  font-size: 18px;
  font-weight: bold;

}

.close-modal {
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  color: #666;
}

.close-modal:hover {
  color: #000;
}

.modal-body {
  padding: 20px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 15px 20px;
  border-top: 1px solid #e0e0e0;
  background-color: #f8f9fa;
  border-radius: 10px;
}

.btn-danger {
  background-color: #dc3545;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
}

.btn-danger:hover {
  background-color: #c82333;
}

.btn-secondary {
  background-color: #6c757d;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 500;
}

.btn-secondary:hover {
  background-color: #5a6268;
}


/* Progress Bars Dinâmicas */
.progress-bar {
  height: 20px;
  background-color: #007bff;
  border-radius: 10px;
  transition: width 0.3s ease;
}

.progress-bar.p0 { width: 0%; background-color: #65aeee; }
.progress-bar.p10 { width: 10%; background-color: #195287; }
.progress-bar.p20 { width: 20%; background-color: #195287; }
.progress-bar.p30 { width: 30%; background-color: #195287; }
.progress-bar.p40 { width: 40%; background-color: #195287; }
.progress-bar.p50 { width: 50%; background-color: #195287; }
.progress-bar.p60 { width: 60%; background-color: #195287; }
.progress-bar.p70 { width: 70%; background-color: #195287; }
.progress-bar.p80 { width: 80%; background-color: #195287; }
.progress-bar.p90 { width: 90%; background-color: #195287; }
.progress-bar.p100 { width: 100%; background-color: #195287; }

.legend {
  margin-top: 10px;
  font-size: 12px;
}

.legend span {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 5px;
  border-radius: 2px;
}

.legend .filled {
  background-color: #198754;
}

.legend .pending {
  background-color: #ffc107;
}


/* Estilo para campos obrigatórios */
.form-group label[for*="*"]::after,
.form-group label:contains("*")::after {
    content: "*";
    color: #dc3545;
    margin-left: 3px;
    font-weight: bold;
}

/* Destaque visual para campos obrigatórios */
input:required,
select:required,
textarea:required {
    border-left: 3px solid #007bff;
}

/* Estilo para validação */
input:invalid:not(:focus):not(:placeholder-shown),
select:invalid:not(:focus),
textarea:invalid:not(:focus):not(:placeholder-shown) {
    border-color: #dc354675;
    background-color: rgba(220, 53, 69, 0.05);
}

/* Mensagem de erro */
.form-group {
    position: relative;
}

.form-group .error-message {
    display: none;
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
}

input:invalid:not(:focus):not(:placeholder-shown) + .error-message,
select:invalid:not(:focus) + .error-message {
    display: block;
}

/* Adicione estas regras no seu CSS */
.field-error,
input:invalid:not(:focus):not(:placeholder-shown),
select:invalid:not(:focus),
textarea:invalid:not(:focus):not(:placeholder-shown),
input[type="number"]:invalid:not(:focus),
input[type="date"]:invalid:not(:focus),
input[type="time"]:invalid:not(:focus) {
    border-color: #dc354675;
    background-color: rgba(220, 53, 69, 0.05);
    border-width: 2px !important;
}

/* Estilo específico para campos numéricos */
input[type="number"].field-error {
    border-color: #dc3545 !important;
    background-color: rgba(220, 53, 69, 0.05) !important;
}


