:root {
    --primary-color: #d88998;
    --primary-dark: #c06c7d;
    --secondary-color: #f7e6ea;
    --text-color: #4a4a4a;
    --bg-color: #ffffff;
    --border-color: #e0e0e0;
    --success-color: #28a745;
    --info-color: #17a2b8;
    --cash-color: #155724;
    --danger-color: #dc3545;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--secondary-color);
    color: var(--text-color);
    margin: 0; padding: 20px;
    display: flex; justify-content: center;
    min-height: 100vh;
}

#login-screen {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: var(--secondary-color);
    display: flex; justify-content: center; align-items: center;
    z-index: 9999;
}
.login-box {
    background: white; padding: 40px; border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1); width: 300px; text-align: center;
}
.login-box h2 { color: var(--primary-color); margin-bottom: 20px; }
.btn-sair {
    background: transparent; border: 1px solid white; color: white;
    padding: 5px 15px; border-radius: 5px; cursor: pointer;
}
.btn-sair:hover { background: rgba(255,255,255,0.2); }

.container {
    background-color: var(--bg-color);
    width: 100%; max-width: 800px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    overflow: hidden;
    height: fit-content; margin-bottom: 50px;
}

header {
    background-color: var(--primary-color);
    color: white; padding: 20px; text-align: center;
}
header h1 { margin: 0; font-size: 1.5rem; }

.tabs {
    display: flex; background: #fff; overflow-x: auto;
    border-bottom: 1px solid #eee;
    -webkit-overflow-scrolling: touch; 
}

.tab-button {
    flex: 1; padding: 15px 10px; border: none; background: none;
    cursor: pointer; font-weight: 600; color: #999;
    white-space: nowrap; transition: 0.3s;
}

.tab-button:hover { background-color: #fff5f7; }
.tab-button.active {
    color: var(--primary-color);
    border-bottom: 3px solid var(--primary-color);
    background-color: #fff0f3;
}

.content { padding: 20px; display: none; }
.content.active { display: block; animation: fadeIn 0.4s; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

h2 { color: var(--primary-color); border-bottom: 1px solid #eee; padding-bottom: 10px; margin-top: 0; }
h3 { font-size: 1.1rem; margin-top: 30px; margin-bottom: 10px; color: #666; border-bottom: 1px dotted #ccc; padding-bottom: 5px;}

label { display: block; margin-top: 10px; font-weight: 600; font-size: 0.9rem; }

input, select, textarea {
    width: 100%; padding: 10px; border: 1px solid var(--border-color);
    border-radius: 8px; box-sizing: border-box; margin-top: 5px;
    font-size: 1rem;
}
input:focus, select:focus { outline: none; border-color: var(--primary-color); }
textarea { resize: vertical; }

.btn-salvar {
    margin-top: 25px; width: 100%; padding: 14px;
    background-color: var(--primary-color); color: white;
    border: none; border-radius: 8px; font-weight: bold; cursor: pointer;
    font-size: 1.1rem;
}
.btn-salvar:hover { background-color: var(--primary-dark); }
#btn-cancelar-edicao { display: none; background-color: #6c757d; margin-top: 10px; }

.btn-receber { background-color: var(--success-color); color: white; border: none; padding: 5px 10px; border-radius: 4px; cursor: pointer; font-size: 0.8rem; }
.btn-filtro { padding: 9px 15px; background-color: var(--info-color); color: white; border: none; border-radius: 6px; cursor: pointer; height: 38px; }
.btn-limpar { background-color: #6c757d; }

.servicos-list { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.checkbox-item { display: flex; align-items: center; margin: 0; padding: 12px; border: 1px solid var(--border-color); border-radius: 8px; cursor: pointer; transition: 0.2s; }
.checkbox-item input { width: auto; margin: 0 15px 0 0; transform: scale(1.3); cursor: pointer; }

.price-display { margin-top: 20px; font-size: 1.5rem; color: var(--primary-color); font-weight: 800; text-align: right; }

.tabela-financeira { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 0.9rem; }
.tabela-financeira th, .tabela-financeira td { text-align: left; padding: 10px; border-bottom: 1px solid #eee; }
.tabela-financeira th { background-color: #f9f9f9; color: #666; }
.table-responsive { width: 100%; overflow-x: auto; }

.tag { padding: 3px 8px; border-radius: 12px; font-size: 0.75rem; color: white; }
.tag-pix { background-color: #32bcad; }
.tag-cartao { background-color: #556ee6; }
.tag-prazo { background-color: #f1b44c; }
.tag-dinheiro { background-color: var(--cash-color); }

.resumo-caixa { background-color: var(--secondary-color); padding: 15px; border-radius: 8px; text-align: center; font-weight: bold; margin-bottom: 20px; color: var(--primary-dark); }

.historico-box { margin-top: 20px; background-color: #fcfcfc; border: 1px solid #eee; border-radius: 8px; padding: 10px; max-height: 300px; overflow-y: auto; }
.historico-item { border-bottom: 1px dashed #ddd; padding: 10px 0; font-size: 0.9rem; }
.historico-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; }
.historico-data { font-weight: bold; color: var(--primary-color); font-size: 0.8rem; }
.historico-texto { white-space: pre-wrap; color: #333; background: #fafafa; padding: 8px; border-radius: 5px; }

.btn-acao-mini { border: none; background: none; cursor: pointer; font-size: 1rem; padding: 0 5px; opacity: 0.7; transition: 0.2s; }
.btn-acao-mini:hover { opacity: 1; transform: scale(1.1); }

.filtro-box { background-color: #f8f9fa; padding: 15px; border-radius: 8px; border: 1px solid #eee; margin-top: 10px; display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.filtro-box div { flex: 1; min-width: 120px; }
.filtro-box label { margin-top: 0; margin-bottom: 5px; font-size: 0.8rem; }
.filtro-box input { margin-top: 0; padding: 8px; font-size: 0.9rem; }

.row { display: flex; gap: 10px; }
.col-grow { flex: 1; } .col-fixed { width: 80px; }

.divider { height: 20px; }
.checkbox-group { display: flex; gap: 15px; flex-wrap: wrap; }
.checkbox-group label { margin-top: 0; font-weight: normal; display: flex; align-items: center; gap: 5px; }
.checkbox-group input { width: auto; margin: 0; }

.health-list { display: flex; flex-direction: column; gap: 0; }
.question-row { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #f0f0f0; padding: 10px 5px; flex-wrap: wrap; }
.question-row > label { margin: 0; min-width: 180px; flex: 1;}
.right-side { display: flex; align-items: center; gap: 15px; }
.radio-options { display: flex; gap: 15px; margin: 0; }
.radio-options label { font-weight: normal; display: flex; align-items: center; gap: 5px; margin-top: 0; }
.radio-options input { width: auto; margin: 0; }
.input-inline { width: 200px; margin: 0; padding: 5px; border: none; border-bottom: 1px solid #ccc; border-radius: 0; background: transparent; }

.checkbox-grid { display: flex; flex-direction: column; gap: 0; margin-top: 10px; }
.check-pair { display: flex; justify-content: flex-start; align-items: center; border-bottom: 1px solid #f0f0f0; padding: 8px 5px; gap: 30px; }
.check-pair label { margin-top: 0; min-width: 150px; }
.check-pair span { display: flex; gap: 15px; }
.check-pair input { width: auto; margin: 0; }

@media (max-width: 600px) {
    body { padding: 10px; }
    .container { margin-bottom: 20px; border-radius: 10px; }
    .row { flex-direction: column; }
    .col-fixed, .col-grow { width: 100%; }
    .question-row { flex-direction: column; align-items: flex-start; gap: 10px; }
    .right-side { width: 100%; justify-content: space-between; flex-wrap: wrap; }
    .input-inline { width: 100%; margin-top: 5px; }
    .check-pair { justify-content: space-between; gap: 10px; }
    .check-pair label { min-width: auto; }
    .filtro-box { flex-direction: column; align-items: stretch; }
    .btn-filtro { width: 100%; margin-top: 5px; }
    .tab-button { font-size: 0.9rem; padding: 12px 8px; }
}