/* Reset e configurações básicas */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Sistema de telas */
.screen {
    display: none;
    min-height: 100vh;
    flex-direction: column;
}

.screen.active {
    display: flex;
}

/* Header */
.header {
    background: linear-gradient(135deg, #6b9b7a, #4a7c59);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: relative;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.header .subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

.header-auth {
    display: flex;
    align-items: center;
}

.auth-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info-text {
    color: white;
    font-weight: 500;
    font-size: 0.9rem;
}

.btn-auth {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-auth:hover {
    background: rgba(255,255,255,0.3);
}

.btn-logout {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-logout:hover {
    background: rgba(255,255,255,0.3);
}

.btn-voltar {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.btn-voltar:hover {
    background: rgba(255,255,255,0.3);
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 2rem 0;
}

/* Hero Section - Tela Inicial */
.hero-section {
    text-align: center;
    padding: 3rem 0;
}

.hero-content h2 {
    font-size: 2.5rem;
    color: #6b9b7a;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.hero-description {
    font-size: 1.2rem;
    color: #666;
    max-width: 800px;
    margin: 0 auto 3rem;
    line-height: 1.8;
}

.benefits {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.benefit {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.benefit:hover {
    transform: translateY(-5px);
}

.benefit i {
    font-size: 3rem;
    color: #6b9b7a;
    margin-bottom: 1rem;
}

.benefit h3 {
    font-size: 1.3rem;
    color: #6b9b7a;
    margin-bottom: 0.5rem;
}

.benefit p {
    color: #666;
}

/* Botões */
.btn-primary {
    background: linear-gradient(135deg, #6b9b7a, #4a7c59);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    pointer-events: auto;
    z-index: 100;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(74, 124, 89, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    pointer-events: auto;
    z-index: 100;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
    position: relative;
    z-index: 1;
}

.hero-actions button {
    position: relative;
    z-index: 10;
    pointer-events: auto;
}

/* Formulário de Contagem */
.contagem-form {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.form-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #eee;
}

.form-section:last-child {
    border-bottom: none;
}

.form-section h2 {
    color: #6b9b7a;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #6b9b7a;
    box-shadow: 0 0 0 3px rgba(107, 155, 122, 0.1);
}

/* Produtos */
.produto-item {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid #4a7c59;
}

.produto-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.produto-nome {
    font-weight: 600;
    color: #6b9b7a;
}

.produto-codigo {
    font-size: 0.9rem;
    color: #666;
    background: #e9ecef;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
}

.produto-detalhes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.produto-info {
    font-size: 0.9rem;
    color: #666;
}

.produto-quantidade {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.produto-quantidade input {
    width: 100px;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
}

/* Form Actions */
.form-actions {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

/* 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);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 10px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-large {
    max-width: 600px;
    text-align: left;
    margin: 2% auto;
    max-height: 95vh;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #ecf0f1;
}

.modal-header h3 {
    margin: 0;
    color: #6b9b7a;
}

.btn-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #95a5a6;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.btn-close:hover {
    background-color: #ecf0f1;
    color: #e74c3c;
}

/* Formulário de Produto */
#form-produto .form-group {
    margin-bottom: 1.5rem;
}

#form-produto label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #6b9b7a;
}

#form-produto input,
#form-produto select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ecf0f1;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

#form-produto input:focus,
#form-produto select:focus {
    outline: none;
    border-color: #27ae60;
}

#form-produto small {
    display: block;
    margin-top: 0.25rem;
    color: #7f8c8d;
    font-size: 0.875rem;
}

#form-produto .form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #ecf0f1;
}

/* Seção de Filtro */
.filter-section {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    border: 1px solid #e9ecef;
}

.filter-section .form-group {
    margin-bottom: 0;
}


.filter-section label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #6b9b7a;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #27ae60;
}

/* Responsividade do Modal */
@media (max-width: 768px) {
    .modal-content {
        margin: 1% auto;
        width: 95%;
        padding: 1rem;
        max-height: 98vh;
    }
    
    .modal-large {
        margin: 1% auto;
        width: 95%;
        padding: 1rem;
        max-height: 98vh;
    }
    
    .modal-header {
        margin-bottom: 1rem;
        padding-bottom: 0.5rem;
    }
    
    #form-produto .form-group {
        margin-bottom: 1rem;
    }
    
    #form-produto .form-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    #form-produto .form-actions button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .modal-content {
        margin: 0;
        width: 100%;
        height: 100vh;
        border-radius: 0;
        max-height: 100vh;
    }
    
    .modal-large {
        margin: 0;
        width: 100%;
        height: 100vh;
        border-radius: 0;
        max-height: 100vh;
    }
}

.modal-content h3 {
    color: #6b9b7a;
    margin-bottom: 1rem;
}

.modal-content p {
    color: #666;
    margin-bottom: 2rem;
}

/* Footer */
.footer {
    background: #4a7c59;
    color: white;
    text-align: center;
    padding: 1rem 0;
    margin-top: auto;
}

/* Responsividade */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-content h2 {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .benefits {
        grid-template-columns: 1fr;
    }
    
    .produto-detalhes {
        grid-template-columns: 1fr;
    }
    
    .contagem-form {
        padding: 1rem;
    }
}

/* Loading */
.loading {
    text-align: center;
    padding: 2rem;
    color: #666;
}

.loading i {
    font-size: 2rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mensagens de erro */
.error-message {
    background: #f8d7da !important;
    color: #721c24 !important;
    padding: 1rem !important;
    border-radius: 5px !important;
    margin: 1rem 0 !important;
    border: 1px solid #f5c6cb !important;
    display: block !important;
    position: fixed !important;
    top: 15% !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 90% !important;
    max-width: 500px !important;
    z-index: 99999 !important;
    font-weight: 500 !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3) !important;
}

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 1rem;
    border-radius: 5px;
    margin: 1rem 0;
    border: 1px solid #c3e6cb;
}

/* Estilos para itens de administração */
.admin-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    gap: 20px;
}

.admin-item:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.item-info {
    flex: 1;
}

.item-info h4 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 1.2em;
}

.item-info p {
    margin: 5px 0;
    color: #666;
    font-size: 0.9em;
}

.item-info strong {
    color: #2c3e50;
}

.item-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.btn-edit, .btn-delete {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.btn-edit {
    background: linear-gradient(135deg, #6b9b7a, #4a7c59);
    color: white;
}

.btn-edit:hover {
    background: linear-gradient(135deg, #4a7c59, #2c5530);
    transform: translateY(-1px);
}

.btn-delete {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

.btn-delete:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    transform: translateY(-1px);
}

.no-data {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #dee2e6;
}

/* Estilos específicos para modal de usuário */
#modal-usuario .modal-content {
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

#modal-usuario .form-group {
    margin-bottom: 1.5rem;
}

#modal-usuario .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2c3e50;
}

#modal-usuario .form-group input,
#modal-usuario .form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

#modal-usuario .form-group input:focus,
#modal-usuario .form-group select:focus {
    outline: none;
    border-color: #6b9b7a;
    box-shadow: 0 0 0 3px rgba(107, 155, 122, 0.1);
}

#modal-usuario .modal-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e0e0e0;
}

#modal-usuario .modal-actions button {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 120px;
    justify-content: center;
}

/* Responsividade para itens de administração */
@media (max-width: 768px) {
    .admin-item {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .item-actions {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .btn-edit, .btn-delete {
        flex: 1;
        min-width: 120px;
        justify-content: center;
    }
    
    /* Modal de usuário responsivo */
    #modal-usuario .modal-content {
        width: 95%;
        margin: 2% auto;
        padding: 1.5rem;
    }
    
    #modal-usuario .modal-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    #modal-usuario .modal-actions button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .admin-item {
        padding: 15px;
    }
    
    .item-info h4 {
        font-size: 1.1em;
    }
    
    .item-info p {
        font-size: 0.85em;
    }
    
    .btn-edit, .btn-delete {
        padding: 10px 12px;
        font-size: 0.85em;
    }
    
    /* Modal de usuário mobile */
    #modal-usuario .modal-content {
        width: 100%;
        height: 100vh;
        margin: 0;
        border-radius: 0;
        padding: 1rem;
    }
    
    #modal-usuario .form-group input,
    #modal-usuario .form-group select {
        padding: 15px;
        font-size: 16px; /* Previne zoom no iOS */
    }
}

/* Tela de Login */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 2rem 0;
}

.login-form {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.login-form h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #6b9b7a;
}

.login-form .form-group {
    margin-bottom: 1.5rem;
}

.login-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.login-form input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.login-form input:focus {
    outline: none;
    border-color: #6b9b7a;
}

/* Área Administrativa */
.admin-menu {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.admin-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.admin-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.admin-card i {
    font-size: 3rem;
    color: #6b9b7a;
    margin-bottom: 1rem;
}

.admin-card h3 {
    color: #6b9b7a;
    margin-bottom: 1rem;
}

.admin-card p {
    color: #666;
    line-height: 1.5;
}

.admin-section {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin: 2rem 0;
}

.admin-section h2 {
    color: #6b9b7a;
    margin-bottom: 2rem;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 1rem;
}

.section-actions {
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.usuario-item, .produto-item-admin {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.usuario-info, .produto-info-admin {
    flex: 1;
}

.usuario-info h4, .produto-info-admin h4 {
    color: #6b9b7a;
    margin-bottom: 0.5rem;
}

.usuario-info p, .produto-info-admin p {
    color: #666;
    margin: 0.25rem 0;
}

.usuario-actions, .produto-actions-admin {
    display: flex;
    gap: 0.5rem;
}

.btn-edit, .btn-delete {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-edit {
    background: #007bff;
    color: white;
}

.btn-edit:hover {
    background: #0056b3;
}

.btn-delete {
    background: #dc3545;
    color: white;
}

.btn-delete:hover {
    background: #c82333;
}

/* Responsividade para área administrativa */
@media (max-width: 768px) {
    .admin-menu {
        grid-template-columns: 1fr;
    }
    
    .usuario-item, .produto-item-admin {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .usuario-actions, .produto-actions-admin {
        width: 100%;
        justify-content: flex-end;
    }
    
    .header .container {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .header-left {
        width: 100%;
        justify-content: space-between;
    }
    
    .header-auth {
        width: 100%;
        justify-content: flex-end;
    }
    
    .header h1 {
        font-size: 1.5rem;
    }
    
    .user-info-text {
        font-size: 0.8rem;
    }
    
    .btn-auth {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
}

/* Combo Box Pesquisável */
.searchable-combobox {
    position: relative;
    display: inline-block;
    width: 100%;
}

.searchable-combobox-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    background-color: white;
    cursor: pointer;
    position: relative;
}

.searchable-combobox-input:focus {
    outline: none;
    border-color: #28a745;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.2);
}

.searchable-combobox-arrow {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #666;
    font-size: 0.8rem;
}

.searchable-combobox-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 200px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 1000;
    display: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overscroll-behavior: contain;
}

.searchable-combobox-dropdown.show {
    display: block;
}

.searchable-combobox-option {
    padding: 0.75rem;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
    pointer-events: auto;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

.searchable-combobox-option:last-child {
    border-bottom: none;
}

.searchable-combobox-option:hover {
    background-color: #f8f9fa;
}

.searchable-combobox-option.selected {
    background-color: #e3f2fd;
    color: #1976d2;
}

.searchable-combobox-option.highlighted {
    background-color: #28a745;
    color: white;
}

.searchable-combobox-no-results {
    padding: 0.75rem;
    color: #666;
    font-style: italic;
    text-align: center;
}

/* Responsividade para combo box */
@media (max-width: 768px) {
    .searchable-combobox-dropdown {
        max-height: 250px;
        min-height: 100px;
        overflow-y: scroll !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    .searchable-combobox-option {
        padding: 1rem;
        font-size: 1rem;
        min-height: 50px;
        display: flex;
        align-items: center;
    }
}

/* Estilos para Consulta de Lançamentos */
#modal-consulta-lancamentos .modal-content {
    width: 98%;
    max-width: 1400px;
    max-height: 95vh;
    overflow-y: auto;
}

.filters-section {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    border: 1px solid #e9ecef;
}

.filters-section h3 {
    margin-bottom: 1rem;
    color: #495057;
    font-size: 1.2rem;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.filter-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-start;
}

.results-section {
    margin-top: 2rem;
}

.results-section h3 {
    margin-bottom: 1rem;
    color: #495057;
    font-size: 1.2rem;
}

.lancamento-group {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.lancamento-group-header {
    background: linear-gradient(135deg, #6b9b7a, #4a7c59);
    color: white;
    padding: 1rem 1.5rem;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.lancamento-group-header:hover {
    background: linear-gradient(135deg, #5a8a6a, #3a6c49);
}

.lancamento-group-title {
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.grupo-arrow {
    transition: transform 0.3s ease;
    font-size: 0.9rem;
}

.lancamento-group-count {
    background: rgba(255,255,255,0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

.lancamento-item {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f1f3f4;
    display: grid;
    grid-template-columns: 1.2fr 2fr 0.8fr 1fr 1fr 1fr 1.2fr;
    gap: 1rem;
    align-items: center;
}

.lancamento-item:last-child {
    border-bottom: none;
}

.lancamento-item:hover {
    background: #f8f9fa;
}

.lancamento-produto {
    font-weight: 500;
    color: #495057;
}

.lancamento-quantidade {
    text-align: center;
    font-weight: 600;
    color: #28a745;
}

.lancamento-unidade {
    text-align: center;
    color: #6c757d;
    font-size: 0.9rem;
}

.lancamento-peso {
    text-align: center;
    color: #6c757d;
    font-size: 0.9rem;
}

.lancamento-nome-produto {
    color: #495057;
    font-weight: 500;
    font-size: 0.95rem;
}

.lancamento-kg {
    text-align: center;
    font-weight: 600;
    color: #28a745;
    font-size: 0.9rem;
}

.lancamento-colaborador {
    text-align: right;
    color: #6c757d;
    font-size: 0.9rem;
}

.lancamento-header {
    background: #f8f9fa;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    color: #495057;
    border-bottom: 1px solid #e9ecef;
    display: grid;
    grid-template-columns: 1.2fr 2fr 0.8fr 1fr 1fr 1fr 1.2fr;
    gap: 1rem;
    align-items: center;
    font-size: 0.9rem;
}

.no-results {
    text-align: center;
    padding: 3rem;
    color: #6c757d;
    font-style: italic;
}

.no-results i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #dee2e6;
}

/* Responsividade para consulta */
@media (max-width: 768px) {
    .filters-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-actions {
        flex-direction: column;
    }
    
    .lancamento-item,
    .lancamento-header {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        text-align: left;
    }
    
    .lancamento-nome-produto {
        font-size: 0.9rem;
    }
    
    .lancamento-kg {
        text-align: left;
        font-size: 0.85rem;
    }
    
    .lancamento-quantidade,
    .lancamento-unidade,
    .lancamento-peso,
    .lancamento-colaborador {
        text-align: left;
    }
    
    .lancamento-group-header {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}

/* Cards de Produtos Simplificados para Contagem */
.produto-item-simples {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.produto-item-simples:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.produto-info-simples {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.produto-nome-simples {
    font-size: 1.4rem;
    font-weight: 600;
    color: #2c3e50;
    line-height: 1.3;
    flex: 1;
}

.produto-detalhes-simples {
    font-size: 1.1rem;
    color: #7f8c8d;
    font-weight: 500;
    white-space: nowrap;
}

.produto-quantidade-simples {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: 1rem;
}

.qtd-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: #28a745;
    min-width: 35px;
}

.quantidade-input-simples {
    width: 80px;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    background: #f8f9fa;
    transition: all 0.3s ease;
}

.quantidade-input-simples:focus {
    outline: none;
    border-color: #28a745;
    background: white;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}

.quantidade-input-simples:hover {
    border-color: #28a745;
    background: white;
}

/* Responsividade para cards simplificados */
@media (max-width: 768px) {
    .produto-item-simples {
        padding: 1.25rem;
        margin-bottom: 0.75rem;
        gap: 0.75rem;
    }
    
    .produto-info-simples {
        gap: 0.75rem;
    }
    
    .produto-nome-simples {
        font-size: 1.3rem;
    }
    
    .produto-detalhes-simples {
        font-size: 1rem;
    }
    
    .produto-quantidade-simples {
        margin-left: 0.5rem;
    }
    
    .quantidade-input-simples {
        width: 80px;
        padding: 0.7rem;
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .produto-item-simples {
        padding: 1rem;
        margin-bottom: 0.5rem;
        gap: 0.5rem;
    }
    
    .produto-info-simples {
        gap: 0.5rem;
    }
    
    .produto-nome-simples {
        font-size: 1.2rem;
    }
    
    .produto-detalhes-simples {
        font-size: 0.95rem;
    }
    
    .qtd-label {
        font-size: 1rem;
    }
    
    .quantidade-input-simples {
        width: 70px;
        padding: 0.6rem;
        font-size: 1rem;
    }
}

