/* ============================= */
/* RESET E TIPOGRAFIA            */
/* ============================= */
*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:"Segoe UI", Roboto, Arial, sans-serif;
}

body{
    background:#eef1f5; /* fundo ERP */
    color:#333;
    padding-bottom:40px;
}

hr{
    border:none;
    border-top:1px solid #eaeaea;
    margin:25px auto;
    max-width:1100px;
}

h2, h3, h4{
    text-align:center;
    margin:20px 0;
    font-weight:600;
}

.btn-desativado{
    background:#dcdcdc;
    color:#888;
    cursor:not-allowed;
    pointer-events:none;
    opacity:0.6;
}

/* ============================= */
/* MENU ERP                       */
/* ============================= */
.menu{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    padding:8px 12px; /* reduz um pouco a altura */
    background:#ffffff;
    border-bottom:1px solid #dcdcdc;
    justify-content:center;
    align-items:center; /* alinha logo e botões */
    box-shadow:0 2px 5px rgba(0,0,0,0.05);
}

.menu button{
    border:none;
    padding:6px 12px; /* botão um pouco menor */
    border-radius:5px;
    font-size:13px;
    font-weight:600;
    cursor:pointer;
    transition:0.2s;
}

.menu button:hover{
    transform:translateY(-1px);
    box-shadow:0 2px 6px rgba(0,0,0,0.12);
}

/* Logo */
.menu .logo{
    display:flex;
    align-items:center;
}

.menu .logo img{
    width:auto;   /* reduz logo */
    height:40px;
    object-fit:contain;
}

/* CORES MENU */
.prestador{background:#27ae60;color:white;}
.usuario{background:#2980b9;color:white;}
.logout{background:#e74c3c;color:white;}

/* ============================= */
/* FORMULÁRIO ERP                */
/* ============================= */
.form-container{
    background:#E8E8E8;
    max-width:1000px;
    margin:auto;
    padding:20px;
    border-radius:6px;
    border:1px solid #e2e6ea;
    box-shadow:0 2px 6px rgba(0,0,0,0.05);
}

.form-row{
    display:flex;
    flex-wrap:wrap;
    gap:12px;
    margin-bottom:12px;
}

.form-group{
    flex:1;
    min-width:180px;
    display:flex;
    flex-direction:column;
}

label{
    font-size:12px;
    margin-bottom:4px;
    color:#555;
    font-weight:600;
}

/* INPUTS MENORES */
input, select, textarea{
    padding:7px 8px;
    border-radius:5px;
    border:1px solid #cfd4da;
    font-size:13px;
    transition:0.2s;
    background:#fafafa;
}

input:focus,
select:focus,
textarea:focus{
    outline:none;
    border-color:#3498db;
    background:#fff;
    box-shadow:0 0 0 2px rgba(52,152,219,0.12);
}

textarea{resize:vertical;}

form button[type="submit"]{
    background:#27ae60;
    color:white;
    border:none;
    padding:9px 16px;
    font-size:14px;
    border-radius:5px;
    cursor:pointer;
    margin-top:8px;
    font-weight:600;
}

form button[type="submit"]:hover{
    background:#219150;
}

/* ============================= */
/* TITULO NFS-e                    */
/* ============================= */
.emitirnfse-titulo-container{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:20px;
    width:100%;
    margin:auto;
    flex-wrap:nowrap;
    text-align:center;
}

.emitirnfse-titulo-container h1{margin:0;font-size:24px;}
.emitirnfse-numero-dps{font-size:18px;font-weight:600;}

/* BOTÕES ALTERAR NÚMERO */
.emitirnfse-btn-alterar{
    padding:6px 12px;
    border:none;
    background:#007bff;
    color:#fff;
    border-radius:6px;
    cursor:pointer;
    font-size:14px;
}

.emitirnfse-btn-alterar:hover{background:#0056b3;}

/* EDITAR NÚMERO */
.emitirnfse-editar-box{
    display:flex;
    align-items:center;
    gap:10px;
}

.emitirnfse-input-numero{
    width:120px;
    padding:8px;
    border:1px solid #ccc;
    border-radius:6px;
    margin-top:10px;
}

.emitirnfse-btn-salvar{
    background:#28a745;
    color:#fff;
    border:none;
    padding:8px 14px;
    border-radius:6px;
    cursor:pointer;
}

.emitirnfse-btn-salvar:hover{background:#1e7e34;}

/* ============================= */
/* MODAL                           */
/* ============================= */
.emitirnfse-modal{
    display:none;
    position:fixed;
    z-index:9999;
    left:0;
    top:0;
    width:100%;
    height:100%;
    background:rgba(0,0,0,0.5);
    justify-content:center;
    align-items:center;
}

.emitirnfse-modal-box{
    background:#fff;
    padding:25px;
    border-radius:10px;
    box-shadow:0 10px 30px rgba(0,0,0,0.2);
    text-align:center;
    min-width:260px;
}

.emitirnfse-modal-botoes{
    margin-top:15px;
    display:flex;
    justify-content:center;
    gap:10px;
}

.emitirnfse-btn-cancelar{
    background:#dc3545;
    color:#fff;
    border:none;
    padding:8px 14px;
    border-radius:6px;
    cursor:pointer;
}

/* ============================= */
/* Login                         */
/* ============================= */

/* Container do login */
.login-container {
    background: #ffffff;
    padding: 30px 40px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
    text-align: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Arial', sans-serif;
}

/* Logo centralizada */
.login-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

.login-logo img {
    width: auto;
    height: 40px;
    object-fit: contain;
}

/* Título */
.login-container h2 {
    margin-bottom: 20px;
    font-size: 22px;
    color: #333;
}

/* Mensagens de erro */
.erro {
    background: #ffdddd;
    color: #a33;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 20px;
}

/* Input group */
.input-group {
    position: relative;
    margin-bottom: 15px;
}

.input-group i {
    position: absolute;
    top: 50%;
    left: 12px;
    transform: translateY(-50%);
    color: #888;
}

.input-group input {
    width: 100%;
    padding: 10px 10px 10px 38px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 16px;
}

/* Botão */
.button-nfse-login {
    width: 100%;
    background: #6c5ce7;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 12px 0;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

.button-nfse-login:hover {
    background: #5b4bd8;
}

.g-recaptcha{
    width:200px;
    display:block;
    margin-left:auto;
    margin-right:auto;
    margin-top:10px;
}

.erro {
    background:#f8d7da;
    color:#721c24;
    padding:10px;
    border-radius:5px;
    margin-bottom:15px;
    text-align:center;
    border:1px solid #f5c2c7;
}

/* ============================= */
/* ALERTAS                        */
/* ============================= */
#msg-alerta{
    position:fixed;
    top:20px;
    left:50%;
    transform:translateX(-50%);
    padding:20px 40px;
    border-radius:12px;
    box-shadow:0 6px 20px rgba(0,0,0,0.25);
    font-size:1.1em;
    font-weight:bold;
    color:#fff;
    z-index:9999;
    max-width:90%;
    text-align:center;
}

#msg-alerta.sucesso{background:#28a745;}
#msg-alerta.erro{background:#dc3545;}

.alertaemitirnfse{
    max-width:50%;
    width:100%;
    padding:14px;
    border-radius:8px;
    margin:20px auto;
    font-family:"Segoe UI", Roboto, Arial, sans-serif;
    font-size:15px;
    border:1px solid transparent;
    transition:all 0.3s ease;
    box-shadow:0 4px 8px rgba(0,0,0,0.1);
}

.alertaemitirnfse.success{background:#d4edda;color:#155724;border-color:#c3e6cb;}
.alertaemitirnfse.danger{background:#f8d7da;color:#721c24;border-color:#f5c6cb;}
.alertaemitirnfse:hover{opacity:0.95;}

#msg-sucesso{
    position:fixed;
    top:50%;
    left:50%;
    transform:translate(-50%,-50%);
    background-color:#4CAF50;
    color:white;
    padding:20px 35px;
    border-radius:8px;
    box-shadow:0 4px 8px rgba(0,0,0,0.3);
    font-weight:bold;
    z-index:9999;
    opacity:0;
    animation:fadeinout 0.5s ease forwards, fadeout 0.5s ease 4s forwards;
}

@keyframes fadeinout{
    from{opacity:0;}
    to{opacity:1;}
}

@keyframes fadeout{
    to{opacity:0;visibility:hidden;}
}

/* ============================= */
/* FORM PRESTADOR (ISOLADO)     */
/* ============================= */

.form_prestador{
max-width:800px;
margin:auto;
}

.form_prestador .form-grid{
display:grid;
grid-template-columns:repeat(3,1fr);
gap:15px;
}

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

.form_prestador label{
font-size:13px;
font-weight:600;
margin-bottom:4px;
}

.form_prestador input,
.form_prestador select{
padding:8px;
border:1px solid #ccc;
border-radius:4px;
font-size:14px;
width:100%;
}

.form_prestador .form-full{
grid-column:1 / -1;
}

.form_prestador button{
margin-top:15px;
padding:10px 18px;
background:#2563eb;
color:#fff;
border:none;
border-radius:6px;
font-weight:600;
cursor:pointer;
}

.form_prestador button:hover{
background:#1d4ed8;
}

/* ============================= */
/* PAGINAÇÃO ERP                 */
/* ============================= */
.paginacao{
    text-align:center;
    margin:20px 0;
}

.paginacao a{
    display:inline-block;
    padding:6px 10px;
    margin:3px;
    background:#ffffff;
    border:1px solid #dcdcdc;
    border-radius:4px;
    text-decoration:none;
    color:#333;
    font-weight:600;
    font-size:13px;
}

.paginacao a:hover{
    background:#3498db;
    color:white;
    border-color:#3498db;
}

.paginacao .ativo{
    background:#3498db;
    color:white;
    border-color:#3498db;
}

/* ============================= */
/* NFSE BUTTONS FILTROS          */
/* ============================= */
.nfse_button_filtros{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    height:34px;
    padding:0 14px;
    border-radius:6px;
    font-size:12px;
    color:#fff;
    line-height:1;
    border:none;
    text-decoration:none;
    cursor:pointer;
    box-sizing:border-box;
    vertical-align:middle;
    transition:0.2s;
    font-weight:600;
}

/* BUSCAR */
.nfse_button_filtros.buscar{
    background:#2980b9;
    margin-top: auto;
}

.nfse_button_filtros.buscar:hover{
    background:#27ae60;
}

/* LIMPAR */
.nfse_button_filtros.limpar{
    background:#2980b9;
    margin-top: auto;
}

.nfse_button_filtros.limpar:hover{
    background:#27ae60;
}

/* FORMULARIO FILTRO */
.emitirnfse-filtro-form{
    display:flex;
    align-items:center;
    gap:10px;
    flex-wrap:wrap;
    justify-content:center;
}

.emitirnfse-input{
    padding:8px 10px;
    border:1px solid #ccc;
    border-radius:6px;
    font-size:14px;
    min-width:220px;
}

.emitirnfse-select{
    padding:8px 10px;
    border:1px solid #ccc;
    border-radius:6px;
    font-size:14px;
}

/* ============================= */
/* TABELA ERP                    */
/* ============================= */
.tablelistarnfse{
    width:85%;
    border-collapse:collapse;
    margin:20px auto;
    font-family:Arial, sans-serif;
    font-size:13px;
    text-align:center;
    table-layout:auto;
    background:#fff;
    border:1px solid #e2e6ea;
}

.tablelistarnfse th,
.tablelistarnfse td{
    padding:8px 10px;
    border-bottom:1px solid #e6e6e6;
    vertical-align:middle;
}

.tablelistarnfse th{
    background:#34495e;
    color:#fff;
    font-weight:600;
    text-align:center;
    white-space:nowrap;
}
.tablelistarnfse tr:nth-child(even){background:#fafafa;}
.tablelistarnfse tr:hover{background:#eef5ff;}

/* STATUS */
.status_emitida{background:#28a745;color:#fff;padding:3px 8px;border-radius:4px;font-size:12px;font-weight:500;white-space:nowrap;}
.status_cancelada{background:#dc3545;color:#fff;padding:3px 8px;border-radius:4px;font-size:12px;font-weight:500;white-space:nowrap;}
.status_erro{background:#ffc107;color:#000;padding:3px 8px;border-radius:4px;font-size:12px;font-weight:500;white-space:nowrap;}

/* BOTOES TABELA */
.tablelistarnfse .btn{
    display:inline-block;
    padding:4px 8px;
    margin:1px 3px 3px 0;
    border-radius:4px;
    font-size:12px;
    text-decoration:none;
    cursor:pointer;
    color:#fff;
    transition:all .2s ease;
}

.tablelistarnfse .btn.pdf{background:#007bff;}
.tablelistarnfse .btn.pdf:hover{background:#0056b3;}

.tablelistarnfse .btn.xml{background:#6c757d;}
.tablelistarnfse .btn.xml:hover{background:#545b62;}

.tablelistarnfse .btn.cancel{background:#dc3545;}
.tablelistarnfse .btn.cancel:hover{background:#a71d2a;}

/* ============================= */
/* RESPONSIVO MOBILE              */
/* ============================= */
@media screen and (max-width:768px){
    
.menu{
    display:flex;
    flex-wrap:wrap;
    justify-content:center;
    align-items:center;
}

/* logo ocupa linha inteira */
.menu .logo{
    flex-basis:100%;
    display:flex;
    justify-content:center;
    margin-bottom:10px;
}

/* botões */
.menu button{
    flex:0 0 auto;
}

.form_prestador .form-grid{
grid-template-columns:1fr;
}

.tablelistarnfse{
    display:block;
    width:calc(100% - 20px);
    margin:0 auto;
    text-align:left;
}

.tablelistarnfse thead{display:none;}

.tablelistarnfse tbody,
.tablelistarnfse tr,
.tablelistarnfse td{
    display:block;
    width:100%;
}

.tablelistarnfse tr{
    border:1px solid #ddd;
    border-radius:6px;
    margin-bottom:15px;
    padding:10px;
    background:#fff;
    box-sizing:border-box;
    text-align:left;
}

.tablelistarnfse td{
    padding:6px 0;
    border-bottom:1px solid #eee;
    font-size:13px;
    word-break:break-word;
    display:flex;
    justify-content:space-between;
}

.tablelistarnfse td:last-child{border-bottom:none;}

.tablelistarnfse td::before{
    content:attr(data-label);
    font-weight:600;
    flex:1;
    color:#555;
    margin-right:10px;
}

.tablelistarnfse .btn{
    margin:4px 4px 0 0;
    padding:4px 8px;
    font-size:12px;
}

/* BOTOES TABELA */
.tablelistarnfse .btn{

    font-size:16px;
}

/* ============================= */
/* FORMULÁRIO                     */
/* ============================= */
.form-container{
    background:#E8E8E8;
    max-width:95%;
    margin:auto;
    padding:25px;
    border-radius:8px;
    box-shadow:0 2px 10px rgba(0,0,0,0.05);
}

.form-row{
    display:flex;
    flex-wrap:wrap;
    gap:15px;
    margin-bottom:15px;
}

.form-group{
    flex:1;
    min-width:200px;
    display:flex;
    flex-direction:column;
}

label{
    font-size:13px;
    margin-bottom:5px;
    color:#555;
    font-weight:600;
}

input, select, textarea{
    padding:10px;
    border-radius:6px;
    border:1px solid #dcdcdc;
    font-size:14px;
    transition:0.2s;
}

input:focus,
select:focus,
textarea:focus{
    outline:none;
    border-color:#3498db;
    box-shadow:0 0 0 2px rgba(52,152,219,0.15);
}

textarea{resize:vertical;}

form button[type="submit"]{
    background:#27ae60;
    color:white;
    border:none;
    padding:12px 20px;
    font-size:15px;
    border-radius:6px;
    cursor:pointer;
    margin-top:10px;
    font-weight:600;
}

form button[type="submit"]:hover{
    background:#219150;
}

.emitirnfse-filtro-form{
    flex-direction:column;
    align-items:stretch;
}

.emitirnfse-input,
.emitirnfse-select{
    width:100%;
}

}