/* Reset e estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #ffffff;
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 40px;
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    padding: 30px 20px;
    border-radius: 15px;
    color: white;
    box-shadow: 0 10px 30px rgba(220, 38, 38, 0.2);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Seções principais */
section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

section:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

section h2 {
    color: #333;
    margin-bottom: 25px;
    font-size: 1.8rem;
    border-bottom: 3px solid #dc2626;
    padding-bottom: 10px;
}

/* Formulário */
.form-group {
    margin-bottom: 20px;
}

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

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

input[type="text"],
input[type="number"],
input[type="date"],
input[type="time"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="time"]:focus {
    outline: none;
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

/* Botões */
.btn-primary,
.btn-secondary {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, #991b1b 0%, #7f1d1d 100%);
    color: white;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(153, 27, 27, 0.3);
}

/* Controles de relatório */
.report-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    align-items: end;
}

.report-controls input[type="date"] {
    flex: 1;
    max-width: 200px;
}

/* Conteúdo do relatório */
.report-content {
    background: #f7fafc;
    border-radius: 10px;
    padding: 20px;
    border-left: 5px solid #dc2626;
}

.report-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.summary-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.summary-card h3 {
    color: #dc2626;
    font-size: 2rem;
    margin-bottom: 5px;
}

.summary-card p {
    color: #333;
    font-weight: 600;
}

/* Lista de saídas */
.exits-list {
    display: grid;
    gap: 15px;
}

.exit-item {
    background: #f7fafc;
    padding: 20px;
    border-radius: 10px;
    border-left: 5px solid #48bb78;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 15px;
    align-items: center;
    transition: transform 0.2s ease;
}

.exit-item:hover {
    transform: translateX(5px);
    background: #edf2f7;
}

.exit-product {
    font-weight: 600;
    color: #333;
    font-size: 1.1rem;
}

.exit-quantity {
    background: #dc2626;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    text-align: center;
    font-weight: 600;
}

.exit-date,
.exit-time {
    color: #333;
    font-size: 0.9rem;
}

/* Tabela de produtos no relatório */
.products-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.products-table th,
.products-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.products-table th {
    background: #dc2626;
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.products-table tr:hover {
    background: #f7fafc;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    position: relative;
    animation: slideIn 0.3s ease;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 15px;
}

.close:hover {
    color: #dc2626;
}

/* Animações */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* Estados de carregamento */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #dc2626;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsividade */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .report-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .exit-item {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .summary-card h3 {
        font-size: 1.5rem;
    }
    
    section {
        padding: 20px;
    }
}

/* Estados de sucesso e erro */
.success {
    background: #48bb78;
    color: white;
}

.error {
    background: #f56565;
    color: white;
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: #333;
}

.empty-state h3 {
    margin-bottom: 10px;
    color: #333;
}





/* Estilos para os botões de modo de entrada */
.input-mode-toggle {
    display: flex;
    margin-bottom: 25px;
    background: #f8fafc;
    border-radius: 12px;
    padding: 4px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border: 1px solid #e2e8f0;
    position: relative;
}

.input-mode-toggle::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    width: calc(50% - 4px);
    height: calc(100% - 8px);
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    border-radius: 8px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
    z-index: 1;
}

.input-mode-toggle.manual-active::before {
    transform: translateX(100%);
}

.input-mode-toggle .btn-toggle {
    flex: 1;
    padding: 14px 20px;
    background: transparent;
    color: #333;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 8px;
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.input-mode-toggle .btn-toggle:hover {
    color: #111;
    transform: translateY(-1px);
}

.input-mode-toggle .btn-toggle.active {
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.input-mode-toggle .btn-toggle::before {
    content: '';
    font-size: 1.2em;
    margin-right: 4px;
}

.input-mode-toggle #mode-select-product::before {
    content: '🛒';
}

.input-mode-toggle #mode-manual-input::before {
    content: '✏️';
}



/* Estilos para a navegação */
nav {
    display: flex;
    gap: 15px;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
    flex-wrap: wrap;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.4);
}

