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

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            background: #f8fafc;
            color: #1f2937;
        }

        /* Header Navigation */
        .header-nav {
            background: #3b4050;
            padding: 0;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }

        .nav-container {
            max-width: 1200px;
            margin: 0 auto;
            display: flex;
            align-items: center;
        }

        .logo {
            color: white;
            font-weight: 600;
            font-size: 1.1em;
            padding: 16px 24px;
        }

        .nav-tabs {
            display: flex;
            margin-left: auto;
        }

        .nav-tab {
            color: #a0aec0;
            text-decoration: none;
            padding: 16px 20px;
            font-size: 0.9em;
            transition: all 0.2s ease;
            cursor: pointer;
            position: relative;
        }

        .nav-tab:hover {
            color: #e2e8f0;
        }

        .nav-tab.active {
            color: white;
            background: rgba(255, 255, 255, 0.1);
        }

        /* Main Container */
        .main-container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 32px 24px;
        }

        /* Tab Content */
        .tab-content {
            display: none;
        }

        .tab-content.active {
            display: block;
        }

        /* Page Headers */
        .page-header {
            margin-bottom: 32px;
        }

        .page-title {
            font-size: 1.875rem;
            font-weight: 600;
            color: #1f2937;
            margin-bottom: 8px;
        }

        .page-subtitle {
            color: #6b7280;
            font-size: 1rem;
        }

        /* Cards */
        .stats-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 20px;
            margin-bottom: 32px;
        }

        .stat-card {
            background: white;
            border: 1px solid #e5e7eb;
            border-radius: 8px;
            padding: 20px;
            text-align: center;
        }

        .stat-number {
            font-size: 2rem;
            font-weight: 700;
            margin-bottom: 4px;
        }

        .stat-label {
            color: #6b7280;
            font-size: 0.875rem;
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }

        /* Forms */
        .form-section {
            background: white;
            border: 1px solid #e5e7eb;
            border-radius: 8px;
            padding: 24px;
            margin-bottom: 24px;
        }

        .form-title {
            font-size: 1.25rem;
            font-weight: 600;
            color: #1f2937;
            margin-bottom: 20px;
        }

        .form-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 20px;
            margin-bottom: 20px;
        }

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

        .form-group label {
            color: #374151;
            font-size: 0.875rem;
            font-weight: 500;
            margin-bottom: 6px;
        }

        .form-group input,
        .form-group select {
            padding: 8px 12px;
            border: 1px solid #d1d5db;
            border-radius: 6px;
            font-size: 0.875rem;
            transition: border-color 0.2s ease;
        }

        .form-group input:focus,
        .form-group select:focus {
            outline: none;
            border-color: #3b82f6;
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
        }

        /* Buttons */
        .btn {
            background: #3b82f6;
            color: white;
            border: none;
            padding: 10px 20px;
            border-radius: 6px;
            font-size: 0.875rem;
            font-weight: 500;
            cursor: pointer;
            transition: background-color 0.2s ease;
        }

        .btn:hover {
            background: #2563eb;
        }

        /* Edit form */
    .form-section-edit {
  opacity: 0;
  transform: translateY(-20px);
  max-height: 0;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 24px;
  overflow: hidden;
  transition: all 0.3s ease;
  position: relative; /* necessário para o botão fechar */
}

.form-section-edit.open {
  opacity: 1;
  transform: translateY(0);
  max-height: 1000px; /* ajuste conforme o tamanho do formulário */
}

        .form-title-edit {
            font-size: 1.25rem;
            font-weight: 600;
            color: #1f2937;
            margin-bottom: 20px;
        }

        .form-grid-edit {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 20px;
            margin-bottom: 20px;
        }

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

        .form-group-edit label {
            color: #374151;
            font-size: 0.875rem;
            font-weight: 500;
            margin-bottom: 6px;
        }

        .form-group-edit input,
        .form-group-edit select {
            padding: 8px 12px;
            border: 1px solid #d1d5db;
            border-radius: 6px;
            font-size: 0.875rem;
            transition: border-color 0.2s ease;
        }

        .form-group-edit input:focus,
        .form-group-edit select:focus {
            outline: none;
            border-color: #3b82f6;
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
        }


 


.close-btn {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: #999;
  padding: 0;
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}
.close-btn:hover {
  color: #333;
  background-color: #f0f0f0;
}


        .btn-edit {
            background: #f59e0b;
            color: white;
            border: none;
            padding: 4px 8px;
            border-radius: 4px;
            font-size: 0.75rem;
            font-weight: 500;
            cursor: pointer;
            margin-right: 4px;
            transition: background-color 0.2s ease;
        }

        .btn-edit:hover {
            background: #d97706;
        }

        .btn-delete {
            background: #dc2626;
            color: white;
            border: none;
            padding: 4px 8px;
            border-radius: 4px;
            font-size: 0.75rem;
            font-weight: 500;
            cursor: pointer;
            transition: background-color 0.2s ease;
        }

        .btn-delete:hover {
            background: #b91c1c;
        }

        /* Tables */
        .table-container {
            background: white;
            border: 1px solid #e5e7eb;
            border-radius: 8px;
            overflow: hidden;
        }

        .table-header {
            background: #f9fafb;
            padding: 16px 20px;
            border-bottom: 1px solid #e5e7eb;
        }

        .table-title {
            font-size: 1.125rem;
            font-weight: 600;
            color: #1f2937;
        }

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

        .table th {
            background: #f9fafb;
            padding: 12px 20px;
            text-align: left;
            font-size: 0.75rem;
            font-weight: 600;
            color: #6b7280;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            border-bottom: 1px solid #e5e7eb;
        }

        .table td {
            padding: 12px 20px;
            border-bottom: 1px solid #f3f4f6;
            font-size: 0.875rem;
        }

        .table tbody tr:hover {
            background: #f9fafb;
        }

        /* Status indicators */
        .status-low {
            color: #dc2626;
            font-weight: 600;
        }

        .status-warning {
            color: #f59e0b;
            font-weight: 600;
        }

        .status-normal {
            color: #059669;
            font-weight: 600;
        }

        /* Charts */
        .charts-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 24px;
            margin-bottom: 32px;
        }

        .chart-card {
            background: white;
            border: 1px solid #e5e7eb;
            border-radius: 8px;
            padding: 20px;
        }

        .chart-title {
            font-size: 1.125rem;
            font-weight: 600;
            color: #1f2937;
            margin-bottom: 16px;
        }

        /* Prediction Section 
        .prediction-form {
            display: grid;
            grid-template-columns: 1fr 1fr auto;
            gap: 16px;
            align-items: end;
            margin-bottom: 20px;
        }

        .prediction-result {
            background: #059669;
            color: white;
            padding: 20px;
            border-radius: 8px;
            text-align: center;
            margin-top: 20px;
        }

        .prediction-value {
            font-size: 1.875rem;
            font-weight: 700;
            margin-bottom: 8px;
        }

        .prediction-recommendation {
            background: rgba(255,255,255,0.2);
            padding: 12px;
            border-radius: 6px;
            margin-top: 16px;
            font-size: 0.875rem;
        }

        */

/* Prediction Section */
.prediction-form {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 16px;
    align-items: end;
    margin-bottom: 20px;
}

.prediction-result {
    background: #f9fafb; 
    color: #1e3a8a;     
    padding: 24px;
    border-radius: 10px;
    text-align: center;
    margin-top: 20px;
    border: 1px solid #e5e7eb; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.08); 
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.prediction-result:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}

.prediction-value {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: #2563eb; 
}

.prediction-recommendation {
    background: #eef6ff; 
    padding: 14px;
    border-radius: 8px;
    margin-top: 16px;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #1e3a8a; 
    border-left: 4px solid #2563eb; 
}


#searchProduct {
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 0.875rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
    height: 40px; /* opcional: deixa a caixa maior */
}

#searchProduct:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

        /* Responsive */
        @media (max-width: 768px) {
            .form-grid {
                grid-template-columns: 1fr;
            }
            
            .charts-grid {
                grid-template-columns: 1fr;
            }
            
            .stats-grid {
                grid-template-columns: 1fr;
            }
            
            .prediction-form {
                grid-template-columns: 1fr;
            }
            
            .nav-tabs {
                overflow-x: auto;
                white-space: nowrap;
            }
        }