/* ============================================
   CSS PROFISSIONAL PARA LISTAS SALVAS
   Design limpo, moderno e responsivo
   ============================================ */

/* RESET E CONFIGURAÇÕES GERAIS */
.lista-supermercado-container * {
    margin: 5px;
    padding: 0px;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body.lista-supermercado-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f8fafc;
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
    color: #374151;
}

/* CONTAINER PRINCIPAL */
.lista-supermercado-container {
    max-width: 100%;
    min-height: 100vh;
    padding: 24px 16px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.lista-supermercado-container h2 {
    color: #1e293b;
    font-size: 28px;
    font-weight: 700;
    text-align: center;
    margin: 0 0 32px 0;
    letter-spacing: -0.5px;
    position: relative;
    padding-bottom: 16px;
}

.lista-supermercado-container h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    border-radius: 2px;
}

/* FILTRO MODERNO */
.filtro-listas-container {
    background: white;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
}

.filtro-listas-container h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.filtro-listas-container h3::before {
    content: '🔍';
    font-size: 20px;
}

#form-filtrar-listas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.filtro-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filtro-field label {
    font-size: 14px;
    font-weight: 500;
    color: #4b5563;
}

.filtro-field input {
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 15px;
    background: white;
    transition: all 0.2s ease;
    color: #1f2937;
}

.filtro-field input:focus {
    border-color: #3b82f6;
    background: white;
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.filtro-buttons {
    grid-column: 1 / -1;
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.filtro-buttons button {
    flex: 1;
    padding: 14px 24px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.filtro-buttons button:hover {
    transform: translateY(-1px);
}

.filtro-buttons button:active {
    transform: translateY(0);
}

#btn-filtrar {
    background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
    color: white;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.2);
}

#btn-filtrar:hover {
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

#btn-limpar-filtros {
    background: white;
    color: #4b5563;
    border: 1px solid #d1d5db;
}

#btn-limpar-filtros:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

#status-filtro {
    padding: 14px 18px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.5;
    display: none;
    margin-top: 16px;
    border: 1px solid transparent;
}

#status-filtro.success {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}

#status-filtro.error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

/* AVISO DE LIMITE */
.notice {
    background: white;
    border-radius: 12px;
    padding: 18px 22px;
    margin-bottom: 24px;
    border-left: 4px solid;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
}

.notice-warning {
    background: #fffbeb;
    border-color: #f59e0b;
    color: #92400e;
    border-left-color: #f59e0b;
}

.notice-error {
    background: #fef2f2;
    border-color: #ef4444;
    color: #991b1b;
    border-left-color: #ef4444;
}

/* CONTAINER DE LISTAS */
.listas-salvas-container {
    background: white;
    border-radius: 16px;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

#listas-salvas {
    padding: 24px;
    margin: 0;
}

/* CARDS DE LISTA */
.lista-salva-item {
    background: white;
    border-radius: 14px;
    padding: 0;
    margin-bottom: 20px;
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
    overflow: hidden;
}

.lista-salva-item:hover {
    border-color: #c7d2fe;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.08);
}

/* CABEÇALHO DA LISTA */
.lista-salva-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
    gap: 16px;
}

.lista-salva-header > div:first-child {
    flex: 1;
    min-width: 0;
}

.lista-salva-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 6px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.lista-salva-header h3::before {
    content: '🏪';
    font-size: 18px;
    opacity: 0.8;
}

.lista-salva-header p {
    margin: 4px 0 0 0;
    color: #6b7280;
    font-size: 14px;
}

.total-cabecalho-lista {
    margin-top: 8px !important;
    color: #059669 !important;
    font-size: 15px !important;
    font-weight: 600 !important;
}

.lista-salva-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.lista-salva-actions button {
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.lista-salva-actions button:hover {
    transform: translateY(-1px);
}

.btn-ver-lista {
    background: #f0f9ff;
    color: #0369a1;
    border: 1px solid #bae6fd;
}

.btn-compartilhar {
    background: #f0fdf4;
    color: #059669;
    border: 1px solid #bbf7d0;
}

.btn-excluir-lista {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

/* CONTEÚDO DA LISTA */
.lista-salva-conteudo {
    padding: 24px;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* CONTROLES DA LISTA */
.lista-salva-conteudo > div:first-child {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    flex-wrap: wrap;
    gap: 12px;
}

.lista-salva-conteudo > div:first-child > div {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* BOTÕES DE AÇÃO */
.btn-adicionar-item,
.btn-escanear-lista {
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.btn-adicionar-item {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.2);
}

.btn-adicionar-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
}

.btn-escanear-lista {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.2);
}

.btn-escanear-lista:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
}

/* BOTÕES DE ORDENAÇÃO */
.lista-salva-ordem-btn {
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid #d1d5db;
    background: white;
    color: #4b5563;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.lista-salva-ordem-btn:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.lista-salva-ordem-btn.active {
    background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.2);
}

/* TABELA */
.tabela-lista-editavel {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    background: white;
    margin-bottom: 20px;
}

.tabela-lista-editavel thead {
    background: #f8fafc;
}

.tabela-lista-editavel th {
    padding: 16px 20px;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #f8fafc;
}

.tabela-lista-editavel tbody tr {
    transition: all 0.2s ease;
    border-bottom: 1px solid #f3f4f6;
}

.tabela-lista-editavel tbody tr:last-child {
    border-bottom: none;
}

.tabela-lista-editavel tbody tr:hover {
    background: #f9fafb;
}

.tabela-lista-editavel tbody tr.item-alterado {
    background: #f0f9ff;
    border-left: 3px solid #3b82f6;
}

.tabela-lista-editavel tbody tr.comprado {
    background: #f0fdf4 !important;
    border-left: 3px solid #10b981 !important;
}

.tabela-lista-editavel td {
    padding: 16px 20px;
    vertical-align: middle;
    font-size: 14px;
    color: #4b5563;
}

/* COLUNAS ESPECÍFICAS */
.item-imagem {
    width: 80px;
    text-align: center;
}

.imagem-produto-container {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9fafb;
    margin: 0 auto;
}

.imagem-produto-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.imagem-produto-container div {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 11px;
    text-align: center;
    padding: 5px;
}

.item-nome {
    min-width: 200px;
}

.nome-texto {
    font-weight: 500;
    color: #1f2937;
}

tr.comprado .nome-texto {
    text-decoration: line-through;
    text-decoration-color: #10b981;
    text-decoration-thickness: 2px;
    color: #047857;
}

.item-quantidade,
.item-valor-unitario {
    width: 140px;
}

.item-valor-total {
    width: 120px;
    font-weight: 600;
    color: #059669;
}

.item-actions {
    width: 120px;
}

/* INPUTS */
.quantidade-input,
.valor-unitario-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    transition: all 0.2s ease;
    color: #1f2937;
}

.quantidade-input:focus,
.valor-unitario-input:focus {
    border-color: #3b82f6;
    background: white;
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* BOTÕES DE ITEM */
.item-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.item-actions button {
    width: 100%;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.item-actions button:hover {
    transform: translateY(-1px);
}

.btn-comprado-item {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.2);
}

.btn-comprado-item:hover {
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
}

.btn-salvar-item {
    background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
    color: white;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.2);
}

.btn-cancelar-item {
    background: #f3f4f6;
    color: #4b5563;
    border: 1px solid #d1d5db;
}

.btn-excluir-item {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

/* RODAPÉ DA TABELA */
.tabela-lista-editavel tfoot {
    background: #f8fafc;
    border-top: 2px solid #e5e7eb;
}

.tabela-lista-editavel tfoot td {
    padding: 18px 20px;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

.total-geral-text {
    color: #059669;
    font-size: 18px;
}

/* MENSAGEM DE ATUALIZAÇÃO */
.mensagem-atualizacao {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-top: 16px;
    display: none;
    border: 1px solid transparent;
}

.mensagem-sucesso {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}

.mensagem-erro {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.auto-saving {
    background: #f0f9ff;
    border-color: #bae6fd;
    color: #0369a1;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* BOTÃO CARREGAR MAIS */
.carregar-mais-container {
    text-align: center;
    padding: 24px;
    border-top: 1px solid #e5e7eb;
    background: #f8fafc;
}

#carregar-mais-listas {
    background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.2);
}

#carregar-mais-listas:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

#carregar-mais-listas:active {
    transform: translateY(0);
}

/* ESTADOS DE CARREGAMENTO */
.carregando-listas {
    text-align: center;
    padding: 60px 20px;
}

.carregando-listas .spinner {
    margin: 0 auto 20px auto;
    width: 40px;
    height: 40px;
    border: 3px solid #e0e7ff;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.carregando-listas p {
    color: #6b7280;
    font-size: 15px;
    font-weight: 500;
}

/* MENSAGEM SEM LISTAS */
.sem-listas {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

.sem-listas .icon {
    font-size: 48px;
    margin-bottom: 16px;
    color: #d1d5db;
}

.sem-listas h3 {
    color: #4b5563;
    font-size: 18px;
    margin-bottom: 8px;
    font-weight: 600;
}

.sem-listas p {
    color: #6b7280;
    font-size: 15px;
    line-height: 1.5;
}

/* MODAIS */
.modal-adicionar-item,
.scanner-modal-lista {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease-out;
}

/* RESPONSIVIDADE MOBILE */
@media (max-width: 768px) {
    .lista-supermercado-container {
        padding: 16px 12px;
    }
    
    .lista-supermercado-container h2 {
        font-size: 24px;
        margin-bottom: 24px;
    }
    
    .filtro-listas-container {
        padding: 20px;
    }
    
    #form-filtrar-listas {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .filtro-buttons {
        flex-direction: column;
    }
    
    .filtro-buttons button {
        width: 100%;
    }
    
    /* HEADER DA LISTA MOBILE */
    .lista-salva-header {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        padding: 16px;
    }
    
    .lista-salva-actions {
        width: 100%;
        justify-content: stretch;
        flex-direction: column;
    }
    
    .lista-salva-actions button {
        flex: 1;
        justify-content: center;
        padding: 12px 16px;
    }
    
    /* CONTROLES DA LISTA MOBILE */
    .lista-salva-conteudo > div:first-child {
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
    }
    
    .lista-salva-conteudo > div:first-child > div {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-adicionar-item,
    .btn-escanear-lista,
    .lista-salva-ordem-btn {
        width: 100%;
        justify-content: center;
    }
    
    /* TABELA MOBILE */
    .tabela-lista-editavel {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .tabela-lista-editavel thead th {
        padding: 12px 16px;
        font-size: 12px;
    }
    
    .tabela-lista-editavel td {
        padding: 12px 16px;
        font-size: 13px;
    }
    
    .item-imagem {
        width: 60px;
    }
    
    .imagem-produto-container {
        width: 50px;
        height: 50px;
    }
    
    .item-nome {
        min-width: 150px;
    }
    
    .item-actions {
        width: 100px;
    }
    
    .item-actions button {
        padding: 6px 10px;
        font-size: 11px;
    }
    
    /* MODAIS MOBILE */
    .modal-adicionar-item,
    .scanner-modal-lista {
        padding: 16px;
        align-items: flex-end;
    }
    
    .modal-adicionar-content,
    .scanner-modal-lista-content {
        width: 100%;
        max-width: 100%;
        max-height: 80vh;
        border-radius: 20px 20px 0 0;
        animation: slideUp 0.3s ease-out;
    }
    
    @keyframes slideUp {
        from {
            opacity: 0;
            transform: translateY(100%);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

@media (max-width: 480px) {
    .lista-supermercado-container h2 {
        font-size: 22px;
    }
    
    .lista-salva-header h3 {
        font-size: 16px;
    }
    
    .lista-salva-header p {
        font-size: 13px;
    }
    
    .total-cabecalho-lista {
        font-size: 14px !important;
    }
    
    .btn-adicionar-item,
    .btn-escanear-lista {
        font-size: 13px;
        padding: 10px 14px;
    }
    
    .lista-salva-ordem-btn {
        font-size: 12px;
        padding: 8px 12px;
    }
    
    .quantidade-input,
    .valor-unitario-input {
        padding: 8px 10px;
        font-size: 13px;
    }
    
    .tabela-lista-editavel th,
    .tabela-lista-editavel td {
        padding: 10px 12px;
    }
}

/* ANIMAÇÕES ADICIONAIS */
.lista-salva-item {
    animation: slideIn 0.4s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* SCROLL PERSONALIZADO */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* PREVENIR ZOOM EM INPUTS EM MOBILE */
@media screen and (max-width: 768px) {
    input, select, textarea {
        font-size: 16px !important;
    }
}

/* ============================================
   MODAL ADICIONAR ITEM - CORRIGIDO
   ============================================ */

.modal-adicionar-item {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: modalFadeIn 0.2s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-adicionar-content {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 500px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    animation: modalSlideUp 0.3s ease-out;
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-adicionar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    background: #f8fafc;
    border-radius: 16px 16px 0 0;
}

.modal-adicionar-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-adicionar-header h3 img.emoji {
    width: 18px;
    height: 18px;
    vertical-align: middle;
}

.btn-fechar-modal {
    background: #f3f4f6;
    color: #4b5563;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    padding: 0;
    transition: all 0.2s ease;
}

.btn-fechar-modal:hover {
    background: #e5e7eb;
    transform: translateY(-1px);
}

.btn-fechar-modal img.emoji {
    width: 16px;
    height: 16px;
}

.modal-adicionar-body {
    padding: 24px;
}

.modal-field {
    margin-bottom: 20px;
}

.modal-field label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #4b5563;
    margin-bottom: 8px;
}

.modal-field input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 15px;
    background: white;
    transition: all 0.2s ease;
    color: #1f2937;
}

.modal-field input:focus {
    border-color: #3b82f6;
    background: white;
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.modal-fields-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.modal-adicionar-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 24px;
}

.modal-adicionar-buttons button {
    padding: 14px 20px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.modal-adicionar-buttons button:hover {
    transform: translateY(-1px);
}

.modal-adicionar-buttons button:active {
    transform: translateY(0);
}

.btn-confirmar-adicionar {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.2);
}

.btn-confirmar-adicionar:hover {
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
}

.btn-cancelar-adicionar {
    background: #f3f4f6;
    color: #4b5563;
    border: 1px solid #d1d5db;
}

.btn-cancelar-adicionar:hover {
    background: #e5e7eb;
    border-color: #9ca3af;
}

/* ÍCONES EMOJI NOS BOTÕES */
.modal-adicionar-buttons button img.emoji {
    width: 16px;
    height: 16px;
    vertical-align: middle;
}

/* RESPONSIVIDADE DO MODAL */
@media (max-width: 768px) {
    .modal-adicionar-item {
        padding: 16px;
        align-items: flex-end;
    }
    
    .modal-adicionar-content {
        max-width: 100%;
        max-height: 80vh;
        border-radius: 16px 16px 0 0;
        animation: modalSlideUpMobile 0.3s ease-out;
    }
    
    @keyframes modalSlideUpMobile {
        from {
            opacity: 0;
            transform: translateY(100%);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    .modal-fields-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .modal-adicionar-buttons {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .modal-adicionar-header {
        padding: 16px 20px;
    }
    
    .modal-adicionar-body {
        padding: 20px;
    }
    
    .modal-field input {
        font-size: 16px; /* Prevenir zoom em iOS */
    }
}

@media (max-width: 480px) {
    .modal-adicionar-header h3 {
        font-size: 16px;
    }
    
    .modal-adicionar-buttons button {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .modal-field input {
        padding: 10px 14px;
    }
}

/* SCROLL PERSONALIZADO NO MODAL */
.modal-adicionar-content::-webkit-scrollbar {
    width: 6px;
}

.modal-adicionar-content::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.modal-adicionar-content::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.modal-adicionar-content::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}