/* RESET E ESTILOS GERAIS */
* { box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f0f2f5;
    color: #333;
    margin: 0;
    padding: 20px 10px;
}
.container {
    max-width: 800px;
    margin: 0 auto;
}
h1, h2, h3 {
    color: #1c2b4c;
    margin-top: 0;
}
h1 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 30px;
}
h2 .emoji {
    display: inline-block;
    transform: rotate(-5deg);
    margin-right: 10px;
}

/* CARDS */
.card {
    background: #ffffff;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

/* FORMULÁRIOS */
.form-group { margin-bottom: 15px; }
.form-group.calculated input { background-color: #e9ecef; font-weight: bold; }
label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}
input[type="text"],
input[type="number"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.25);
}
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

/* BOTÕES */
.btn {
    background-color: #007bff;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    text-align: center;
    transition: background-color 0.3s, transform 0.2s, box-shadow 0.2s;
}
.btn:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,123,255,0.3);
}
.btn-secondary { background-color: #6c757d; }
.btn-secondary:hover { background-color: #5a6268; box-shadow: 0 4px 10px rgba(108,117,125,0.3); }

/* CLASSIFICAÇÃO DOS GUIAS */
.hidden { display: none; }
#guias-classificacao { margin-top: 20px; }
.guia-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
    padding: 15px 10px;
    border-bottom: 1px solid #eee;
}
.guia-item:last-child { border-bottom: none; }
.guia-nome { font-weight: 500; flex-grow: 1; min-width: 150px; }
.guia-opcoes { display: flex; align-items: center; gap: 10px; }
.guia-tipos { display: flex; border: 1px solid #ccc; border-radius: 8px; overflow: hidden; }
.btn-toggle {
    background-color: #f0f2f5;
    color: #555;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.3s;
}
.guia-tipos .btn-toggle { border-left: 1px solid #ccc; }
.guia-tipos .btn-toggle:first-child { border-left: none; }
.btn-toggle.active {
    background-color: #28a745;
    color: white;
    font-weight: bold;
}
.separar-btn { border: 1px solid #ccc; border-radius: 8px; }
.separar-btn.active { background-color: #fd7e14; border-color: #fd7e14; color: white; }
.guia-agencia-valor { max-width: 100px; }

/* TOTAIS */
.total-plantao { text-align: right; margin-top: 20px; padding-top: 20px; border-top: 2px solid #f0f2f5; }
.total-plantao h3 { display: inline-block; margin-right: 15px; }
.total-plantao span { font-size: 2rem; font-weight: bold; color: #007bff; }

/* RESUMO */
.summary .valores-calculados { display: flex; justify-content: space-around; background: #f0f2f5; padding: 15px; border-radius: 8px; margin-bottom: 15px; text-align: center; }
.summary .valores-calculados p { margin: 0; font-size: 1.1rem; }
.summary .valores-calculados strong { color: #1c2b4c; }
#resumo-whatsapp { background-color: #e9ecef; font-family: "Courier New", monospace; line-height: 1.5; margin-bottom: 15px; }
#save-status { text-align: center; margin-top: 10px; font-weight: bold; transition: opacity 0.5s; }

/* SEÇÃO 'S' */
#guias-separacao-container .card { border-left: 5px solid #fd7e14; }
.voucher-item { display: flex; gap: 10px; margin-bottom: 10px; align-items: center; }
.voucher-item input { flex: 1; }
.btn-remove-voucher { background: #dc3545; color: white; border: none; border-radius: 50%; width: 30px; height: 30px; cursor: pointer; font-weight: bold; flex-shrink: 0; }
.soma-container { text-align: right; font-size: 1.2rem; margin-top: 15px; padding-top: 10px; border-top: 1px dashed #ccc; display: flex; flex-direction: column; gap: 5px; }
.soma-container span { font-weight: normal; }
.soma-container strong { font-weight: bold; }
.diff.red { color: #dc3545; }
.diff.green { color: #28a745; }
.diff.blue { color: #007bff; }