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

body {
    font-family: 'Poppins', sans-serif;
    background: #f4f6f9;
    color: #495057;
    line-height: 1.6;
}

/* Dashboard Layout */
.dashboard {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: width 0.3s ease;
    position: fixed;
    height: 100vh;
    z-index: 1000;
}

.sidebar.collapsed {
    width: 70px;
}

.sidebar-header {
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
    position: relative;
}

.sidebar-toggle {
    position: absolute;
    right: -12px;
    top: 20px;
    background: white;
    border: 1px solid #dee2e6;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #495057;
    transition: all 0.3s ease;
    z-index: 1001;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.sidebar-toggle:hover {
    background: #f8f9fa;
    color: #007bff;
}

.sidebar.collapsed .sidebar-toggle i {
    transform: rotate(180deg);
}

/* Logo e Container */
.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 0.5rem;
}

.logo-image {
    max-width: 80%;
    height: auto;
    margin-bottom: -15px;
}

.logo-text {
    text-align: center;
    color: #38598b;
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
    font-size: 36px;
    margin-top: 0;
    padding-top: 0;
    line-height: 1;
}

/* Menu de Navegação */
.nav-menu {
    padding: 1rem 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: #495057;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.nav-item:hover,
.nav-item.active {
    background: #f8f9fa;
    color: #007bff;
    border-left-color: #007bff;
}

.nav-item i {
    width: 20px;
    margin-right: 1rem;
}

/* Comportamento quando retraído */
.sidebar.collapsed .nav-item span,
.sidebar.collapsed .logo-text {
    display: none;
}

.sidebar.collapsed .logo-image {
    max-width: 60%;
    margin-bottom: 0;
}
/* Main Content */
.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 2rem;
    transition: margin-left 0.3s ease;
}

.main-content.expanded {
    margin-left: 70px;
}

/* Page Header */
.page-header {
    margin-bottom: 2rem;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-header h2 {
    color: #212529;
    margin-bottom: 0.5rem;
}

.page-header p {
    color: #6c757d;
}

/* Grid Layout */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Card Styles */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.card-header {
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    margin: 0;
    color: #212529;
    font-size: 1.25rem;
    font-weight: 600;
}

.card-content {
    padding: 1.5rem;
}

/* Stat Cards */
.stat-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.stat-icon.blue { background: #007bff; }
.stat-icon.green { background: #28a745; }
.stat-icon.yellow { background: #ffc107; }

.stat-info h3 {
    font-size: 1.5rem;
    color: #212529;
    margin: 0;
}

.stat-info p {
    color: #6c757d;
    margin: 0;
}
/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #212529;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #007bff;
}

.form-control + .form-control {
    margin-top: 10px;
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
}

.btn-secondary {
    background: #f8f9fa;
    color: #495057;
}

.btn-secondary:hover {
    background: #e2e6ea;
}

/* Table Styles */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

th {
    background: #f8f9fa;
    font-weight: 600;
    color: #212529;
}

/* Status Styles */
.truck-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-loading { background: #cce5ff; color: #004085; }
.status-route { background: #d4edda; color: #155724; }
.status-unloading { background: #fff3cd; color: #856404; }
.status-returning { background: #e2e3e5; color: #383d41; }
.status-waiting { background: #f8f9fa; color: #6c757d; }

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    transition: width 0.3s ease;
}

.progress-fill.status-loading { background: #007bff; }
.progress-fill.status-route { background: #28a745; }
.progress-fill.status-unloading { background: #ffc107; }
.progress-fill.status-returning { background: #6c757d; }

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow-y: auto;
    padding: 20px;
    backdrop-filter: blur(2px);
}

.modal.show {
    display: block !important;
}

.modal-content {
    position: relative;
    background: white;
    margin: 8vh auto;
    width: 90%;
    max-width: 500px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    animation: fadeIn 0.3s ease-out;
}

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

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.close-modal {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.5rem;
    color: #666;
    transition: all 0.2s ease;
    background: transparent;
    border: none;
}

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

#truck-number-inputs {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 60vh;
    overflow-y: auto;
}

.truck-number-input {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.truck-number-input:hover {
    background: #f0f0f0;
}

.truck-number-input label {
    flex: 1;
    font-weight: 500;
    color: #444;
    margin-right: 1rem;
}

.truck-number-input input {
    width: 120px;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.2s ease;
}

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

.truck-number-form {
    padding-bottom: 0.5rem;  /* Adiciona padding no form */
}

.truck-number-form .btn-primary {
    margin: 2rem 1.5rem;  /* Aumenta as margins uniformemente */
    width: calc(100% - 3rem);
    padding: 0.75rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: 8px;  /* Torna os cantos mais suaves */
}

.time-confirmation-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.time-confirmation-modal.show {
    display: flex;
}

.time-confirmation-modal-content {
    background: white;
    border-radius: 8px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    animation: timeConfirmationModalSlideIn 0.3s ease-out;
}

.time-confirmation-modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #eaeaea;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.time-confirmation-modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.time-confirmation-close-modal {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.5rem;
    color: #666;
    transition: all 0.2s ease;
    background: transparent;
    border: none;
}

.time-confirmation-close-modal:hover {
    background: #f5f5f5;
    color: #333;
}

.time-confirmation-modal-body {
    padding: 1.5rem;
}

.time-confirmation-time-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.time-confirmation-time-detail {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.time-confirmation-time-detail i {
    color: #007bff;
    font-size: 1.5rem;
    width: 2rem;
    text-align: center;
}

.time-confirmation-time-detail div {
    flex-grow: 1;
}

.time-confirmation-time-detail label {
    display: block;
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 0.25rem;
}

.time-confirmation-time-detail span {
    font-size: 1rem;
    color: #333;
    font-weight: 500;
}

.time-confirmation-modal-message {
    text-align: center;
    color: #666;
    margin-bottom: 1.5rem;
}

.time-confirmation-modal-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

@keyframes timeConfirmationModalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.doc-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 2000;
  }
  
  .doc-content {
    background: white;
    margin: 5% auto;
    padding: 20px;
    width: 90%;
    max-width: 1200px;
    height: 85%;
    border-radius: 8px;
    overflow-y: auto;
  }
  
  .doc-close {
    float: right;
    font-size: 28px;
    cursor: pointer;
  }
  
  .doc-nav {
    margin: 20px 0;
    border-bottom: 1px solid #dee2e6;
  }
  
  .doc-nav-btn {
    padding: 10px 20px;
    border: none;
    background: none;
    cursor: pointer;
  }
  
  .doc-nav-btn.active {
    border-bottom: 3px solid #007bff;
    color: #007bff;
  }
  
  .doc-section {
    display: none;
  }
  
  .doc-section.active {
    display: block !important;
  }
  
  .doc-section h2 {
    color: #333;
    margin-bottom: 1.5rem;
  }
  
  .doc-section p {
    line-height: 1.6;
    margin: 1rem 0;
    color: #4a4a4a;
  }
  
  .doc-section ul {
    padding-left: 1.5rem;
    margin: 1rem 0;
  }
  
  .doc-section li {
    margin: 0.5rem 0;
  }
  
  .info-block {
    background: #f8f9fa;
    border-left: 4px solid #007bff;
    padding: 1rem;
    margin: 1.5rem 0;
    border-radius: 0 4px 4px 0;
  }
  
  .doc-images {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin: 1.5rem 0;
   }
   
   .doc-images img {
    width: 32%;
    max-width: 400px;
    height: auto;
   }

   .doc-single-image {
    margin: 1.5rem 0;
    text-align: center;
  }
  
  .doc-single-image img {
    max-width: 800px;
    width: 100%;
    height: auto;
  }

  .pro-content {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    margin: 1.5rem 0;
  }
  
  .pro-image {
    flex: 1;
  }
  
  .pro-text {
    flex: 2;
  }
  
  .pro-image img {
    width: 80%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  }

  .nav-item.functional {
    color: #007bff;
    border-left: 3px solid #007bff;
}

.nav-item.disabled {
    opacity: 0.6;
    cursor: default;
}