* {
     margin: 0;
     padding: 0;
     box-sizing: border-box;
 }

 body {
     background: #0F0D0B;
     font-family: 'Inter', sans-serif;
     padding: 20px;
     min-height: 100vh;
 }

.container {
     max-width: 100%;
     width: 100%;
     margin: 0 auto;

     display:flex;
     flex-direction:column;
     min-height:100vh;
}

 .tabs {
     display: flex;
     gap: 8px;
     flex-wrap: wrap;
     margin-bottom: 28px;
 }

 .tab-btn {
     background: #1C1713;
     border: 1px solid #C89A3D55;
     color: #EFE6D6;
     padding: 10px 18px;
     border-radius: 40px;
     font-weight: 600;
     cursor: pointer;
     font-size: 0.75rem;
     transition: 0.2s;
 }

 .tab-btn.active {
     background: #C89A3D;
     color: #0F0D0B;
 }

 .panel {
     background: #EFE6D6;
     border-radius: 28px;
     padding: 28px 32px;
     display: none;
     border: 1px solid #C89A3D88;
     width: 100%;
 }

 .panel.active {
     display: block;
 }

 h2 {
     font-family: 'Cormorant Garamond', serif;
     color: #8E6426;
     border-left: 5px solid #C89A3D;
     padding-left: 18px;
     margin-bottom: 24px;
     font-size: 1.4rem;
 }

 h3 {
     color: #5C3D1A;
     margin: 24px 0 16px;
     border-bottom: 2px solid #C89A3D55;
     font-size: 1.1rem;
     padding-bottom: 8px;
 }

 .form-grid {
     display: grid;
     grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
     gap: 20px;
     width: 100%;
 }

 .form-group {
     display: flex;
     flex-direction: column;
     gap: 6px;
 }

 label {
     font-weight: 600;
     font-size: 0.8rem;
     color: #2C241A;
 }

 input,
 textarea,
 select {
     padding: 10px 14px;
     border-radius: 14px;
     border: 1px solid #C89A3D88;
     background: white;
     font-family: inherit;
     font-size: 0.85rem;
     width: 100%;
 }

 textarea {
     resize: vertical;
     min-height: 80px;
 }

 button {
     background: #C89A3D;
     border: none;
     padding: 10px 28px;
     border-radius: 40px;
     font-weight: bold;
     cursor: pointer;
     margin-top: 20px;
     transition: 0.2s;
     color: #0F0D0B;
     font-size: 0.85rem;
 }

 button:hover {
     background: #B07E2F;
 }

 .btn-secondary {
     background: #6c757d;
     color: white;
 }

 

 table {
     width: 100%;
     border-collapse: collapse;
     background: white;
     border-radius: 14px;
     overflow-x: auto;
     display: table;
     margin: 15px 0;
 }

 th,
 td {
     border: 1px solid #E2D4C2;
     padding: 10px 12px;
     font-size: 0.75rem;
     text-align: left;
 }

 th {
     background: #E2D4C2;
     font-weight: 700;
 }

 .login-container {
     max-width: 500px;
     margin: 50px auto;
     width: 100%;
 }

 .login-card {
     background: #EFE6D6;
     border-radius: 32px;
     padding: 32px;
     border: 1px solid #C89A3D88;
 }

 .header-user {
     display: flex;
     justify-content: space-between;
     background: #1C1713;
     padding: 14px 28px;
     border-radius: 40px;
     color: #EFE6D6;
     margin-bottom: 24px;
     flex-wrap: wrap;
     gap: 15px;
     width: 100%;
 }

 @media (max-width: 900px) {
     .panel {
         padding: 20px;
     }

    

     .form-grid {
         grid-template-columns: 1fr;
     }
 }

 @media (max-width: 600px) {
     body {
         padding: 10px;
     }

     .panel {
         padding: 15px;
     }

     .tab-btn {
         padding: 6px 12px;
         font-size: 0.7rem;
     }
 }

 .small-btn {
     padding: 5px 10px;
     font-size: 0.7rem;
     margin: 2px;
     background: #6c757d;
     color: white;
     border-radius: 12px;
     cursor: pointer;
     border: none;
 }

 .error {
     color: #a52a2a;
     margin-top: 8px;
     text-align: center;
 }

 .risco-alto {
     background-color: #ffcccc;
     color: #a52a2a;
     padding: 4px 10px;
     border-radius: 12px;
     font-weight: bold;
     display: inline-block;
 }

 .risco-medio {
     background-color: #ffffcc;
     color: #8a6d00;
     padding: 4px 10px;
     border-radius: 12px;
     font-weight: bold;
     display: inline-block;
 }

 .risco-baixo {
     background-color: #ccffcc;
     color: #2c5f2d;
     padding: 4px 10px;
     border-radius: 12px;
     font-weight: bold;
     display: inline-block;
 }

 canvas {
     max-height: 280px;
     width: 100% !important;
 }

 .chart-caption {
     font-size: 0.7rem;
     color: #555;
     margin-top: 12px;
     padding-top: 8px;
     border-top: 1px solid #E2D4C2;
     font-style: italic;
     background: #f9f6f0;
     padding: 8px 12px;
     border-radius: 12px;
 }

 .success {
     color: #2c5f2d;
     margin-top: 10px;
     text-align: center;
 }

 .oficina-selector {
     background: #1C1713;
     padding: 15px 25px;
     border-radius: 45px;
     margin-bottom: 25px;
     display: flex;
     align-items: center;
     gap: 20px;
     flex-wrap: wrap;
     width: 100%;
 }

 .oficina-selector label {
     color: #EFE6D6;
     margin: 0;
     font-size: 0.9rem;
 }

 .oficina-selector select {
     background: #EFE6D6;
     padding: 10px 20px;
     border-radius: 40px;
     min-width: 250px;
     font-size: 0.85rem;
 }

 .chart-grid {
     display: grid;
     grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
     gap: 25px;
     width: 100%;
 }

 .os-selector {
     background: white;
     padding: 20px;
     border-radius: 20px;
     margin-bottom: 25px;
     width: 100%;
 }

 .badge-os {
     display: inline-block;
     padding: 4px 12px;
     border-radius: 20px;
     font-size: 0.7rem;
     font-weight: bold;
 }

 .status-select {
     padding: 5px 10px;
     border-radius: 20px;
     font-size: 0.7rem;
     cursor: pointer;
 }

 .table-wrapper {
     overflow-x: auto;
     width: 100%;
     margin: 15px 0;
 }

 .full-width {
     width: 100%;
 }

 .os-detail-tabs {
     display: flex;
     gap: 10px;
     margin-bottom: 20px;
     border-bottom: 2px solid #C89A3D55;
     padding-bottom: 10px;
     flex-wrap: wrap;
 }

 .os-detail-tab {
     background: none;
     border: none;
     padding: 8px 20px;
     cursor: pointer;
     font-weight: 600;
     color: #666;
     border-radius: 20px;
     transition: 0.2s;
     margin-top: 0;
 }

 .os-detail-tab.active {
     background: #C89A3D;
     color: #0F0D0B;
 }

 .os-detail-panel {
     display: none;
 }

 .os-detail-panel.active {
     display: block;
 }

 .readonly-row {
     background-color: #f5f5f5;
 }

 /* Modal */
 .modal-overlay {
     position: fixed;
     top: 0;
     left: 0;
     width: 100%;
     height: 100%;
     background-color: rgba(0, 0, 0, 0.8);
     display: flex;
     align-items: center;
     justify-content: center;
     z-index: 1000;
 }

 .modal-content {
     background: #EFE6D6;
     border-radius: 28px;
     max-width: 800px;
     width: 90%;
     max-height: 85vh;
     overflow-y: auto;
     padding: 28px;
     border: 1px solid #C89A3D;
     position: relative;
     box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
 }

 .modal-close {
     position: absolute;
     top: 15px;
     right: 20px;
     font-size: 22px;
     cursor: pointer;
     color: #8E6426;
     transition: 0.2s;
     background: none;
     border: none;
     padding: 0;
     margin: 0;
 }

 .modal-close:hover {
     color: #C89A3D;
 }

 .modal-section {
     margin-top: 20px;
     border-top: 1px solid #C89A3D55;
     padding-top: 15px;
 }

 .modal-section h4 {
     color: #5C3D1A;
     margin-bottom: 10px;
 }

 .modal-info {
     display: grid;
     grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
     gap: 10px;
     margin-top: 5px;
 }

 .modal-info p {
     font-size: 0.85rem;
     margin: 4px 0;
 }

 .modal-info strong {
     color: #2C241A;
 }

 .radio-group {
     display: flex;
     gap: 20px;
     align-items: center;
     margin-top: 5px;
 }

 .radio-group label {
     display: flex;
     align-items: center;
     gap: 5px;
     font-weight: normal;
 }

 .month-group {
     margin-top: 20px;
 }

 .month-title {
     background: #C89A3D;
     color: #0F0D0B;
     padding: 8px 16px;
     border-radius: 20px;
     display: inline-block;
     margin-bottom: 10px;
     font-weight: bold;
 }

 .kpi-grid,
 .stats-cards {
     display: flex;
     flex-wrap: wrap;
     gap: 20px;
     margin-bottom: 30px;
     width: 100%;
 }

 .kpi-card,
 .stat-card {
     background: white;
     border-radius: 18px;
     padding: 16px 20px;
     flex: 1;
     min-width: 160px;
     border-left: 5px solid #C89A3D;
 }

 .kpi-card h3,
 .stat-card h3 {
     font-size: 1.6rem;
     color: #C89A3D;
     margin: 0;
     border-bottom: 1px solid #C89A3D55;
     padding-bottom: 8px;
 }

 .kpi-card p,
 .stat-card p {
     font-size: 0.75rem;
     color: #555;
     margin-top: 8px;
 }

 .charts-grid,
 .chart-grid,
 .chart-container {
     display: grid;
     grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
     gap: 25px;
     width: 100%;
     margin: 25px 0;
 }

 .chart-card,
 .chart-box {
     background: white;
     border-radius: 18px;
     padding: 20px;
     min-height: 360px;
 }

 .chart-card.full-width {
     grid-column: 1 / -1;
 }

 .chart-card h3,
 .chart-box h3 {
     color: #5C3D1A;
     margin: 8px 0 16px;
     border-bottom: 2px solid #C89A3D55;
     font-size: 1.1rem;
     padding-bottom: 8px;
 }

 .chart-card canvas,
 .chart-box canvas {
     max-height: 280px;
     width: 100% !important;
 }

 @media (max-width: 900px) {

     .charts-grid,
     .chart-grid,
     .chart-container {
         grid-template-columns: 1fr;
     }

     .kpi-card,
     .stat-card {
         min-width: 140px;
     }
 }

 .login-container {
  max-width: 520px;
  margin: 70px auto;
  width: 100%;
}

.login-card {
  background: linear-gradient(145deg, #f3ead9, #e9dfce);
  border-radius: 30px;
  padding: 34px;
  border: 1px solid #c89a3d99;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
}

.login-card h2 {
  text-align: center;
  border-left: none;
  padding-left: 0;
  margin-bottom: 26px;
  font-size: 1.6rem;
}

.login-card .form-group {
  margin-bottom: 14px;
}

.login-card input {
  height: 42px;
  border-radius: 16px;
  font-size: 0.95rem;
}

.login-card button {
  display: block;
  margin: 22px auto 0 auto;
  min-width: 130px;
  height: 42px;
  border-radius: 22px;
}

.login-card button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.error {
  margin-top: 14px;
  font-weight: 600;
}

.modal-content {
  background: #f3ead9;
  border-radius: 24px;
  max-width: 850px;
  width: 92%;
  max-height: 88vh;
  overflow-y: auto;
  padding: 32px;
  border: 1px solid #c89a3d;
  box-shadow: 0 20px 60px rgba(0,0,0,0.55);
}

.modal-content h3 {
  font-size: 1.35rem;
  color: #5c3d1a;
  margin-bottom: 18px;
}

.modal-section {
  background: #fffaf1;
  border: 1px solid #e2d4c2;
  border-radius: 18px;
  padding: 18px;
  margin-top: 18px;
}

.modal-section h4 {
  color: #8e6426;
  margin-bottom: 12px;
  border-bottom: 1px solid #c89a3d55;
  padding-bottom: 8px;
}

.modal-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px 18px;
}

.modal-info-grid p {
  margin: 0;
  font-size: 0.9rem;
}

.modal-info-grid strong {
  color: #2c241a;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 18px;
}

.print-btn {
  background: #c89a3d;
  color: #0f0d0b;
}

.close-btn {
  background: #6c757d;
  color: white;
}

@media print {
  body * {
    visibility: hidden;
  }

  .modal-content,
  .modal-content * {
    visibility: visible;
  }

  .modal-overlay {
    position: static;
    background: white;
  }

  .modal-content {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    max-width: 100%;
    max-height: none;
    box-shadow: none;
    border: none;
    background: white;
  }

  .modal-actions,
  .modal-close {
    display: none !important;
  }
}

.footer-version{
  width:100%;
  text-align:center;
  padding:18px 10px;
  margin-top:auto;

  color:#a78b57;
  font-size:13px;
  opacity:.8;

  border-top:1px solid rgba(200,154,61,.15);

  background:#1C1713;
}