:root {
    --primary: #0d6efd;
    --secondary: #6c757d;
    --success: #198754;
    --danger: #dc3545;
    --warning: #ffc107;
    --dark: #212529;
    --light: #f8f9fa;
    --bg: #eef2f5;
}

body {
    font-family: 'Segoe UI', Tahoma, sans-serif;
    background: var(--bg);
    margin: 0;
    padding: 10px;
    font-size: 13.5px;
    color: #333;
}

.container {
    max-width: 1250px;
    margin: 0 auto;
    background: white;
    padding: 15px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.split-layout { display: flex; gap: 20px; align-items: flex-start; }
.side-left { flex: 0 0 40%; }
.side-right { flex: 1; background: #fdfdfd; padding: 15px; border-radius: 8px; border: 1px solid #e0e0e0; }

@media (max-width: 900px) {
    .split-layout { flex-direction: column; }
    .side-left, .side-right { width: 100%; flex: none; }
}

.top-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; padding-bottom: 10px; border-bottom: 1px solid #eee; }

.tab-header { display: flex; gap: 5px; margin-bottom: 15px; flex-wrap: wrap; }
.tab-btn { padding: 8px 15px; border: 1px solid #dee2e6; background: var(--light); cursor: pointer; border-radius: 4px; font-weight: 600; font-size: 0.95em; color: #555; transition: 0.2s; }
.tab-btn:hover { background: #e2e6ea; }
.tab-btn.active { background: var(--primary); color: white; border-color: var(--primary); }

.tab-content { display: none; animation: fadeIn 0.3s; }
.tab-content.active { display: block; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.form-row { display: flex; gap: 10px; flex-wrap: wrap; }
.compact-row { gap: 5px; margin-bottom: 5px; }
.form-group { margin-bottom: 10px; flex: 1; min-width: 150px; }
.half { flex: 0 0 49%; }

label { display: block; margin-bottom: 3px; font-weight: 600; font-size: 0.9em; color: #555; }
input, select, textarea { width: 100%; padding: 8px; border: 1px solid #ced4da; border-radius: 3px; box-sizing: border-box; font-size: 1em; font-family: inherit; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); }

button { cursor: pointer; border: none; border-radius: 3px; font-weight: 600; transition: 0.2s; }
.btn-save { width: 100%; padding: 10px; background: var(--success); color: white; margin-top: 5px; }
.btn-save:hover { background: #157347; }
.btn-add-item { width: 100%; padding: 8px; background: var(--primary); color: white; margin-top: 5px; }
.btn-serv { background: #6610f2; }
.btn-warning { background: var(--warning); color: #000; padding: 5px 10px; font-size: 0.85em; }
.btn-remove { background: var(--danger); color: white; padding: 5px 10px; font-size: 0.85em; }
.btn-search { background: var(--primary); color: white; padding: 8px; }
.btn-logout { background: var(--danger); color: white; padding: 5px 12px; font-size: 0.85em; }
.btn-add { background: var(--success); color: white; width: 32px; height: 32px; font-size: 1.2em; display: flex; justify-content: center; align-items: center; }
.small-btn { padding: 4px 8px; font-size: 0.85em; }
.full-width { width: 100%; margin-top: 5px; }

.box-bg { background: #f8f9fa; border: 1px solid #dee2e6; padding: 12px; border-radius: 5px; margin-bottom: 10px; }
.box-selection { background: #f8f9fa; border: 1px solid #dee2e6; padding: 12px; border-radius: 5px; margin-bottom: 10px; border-top: 3px solid var(--primary); }
.service-box { border-top-color: #6610f2; }

ul { list-style: none; padding: 0; margin: 0; }
li { background: #fff; border: 1px solid #eee; padding: 8px 12px; margin-bottom: 5px; display: flex; justify-content: space-between; align-items: center; border-radius: 3px; border-left: 4px solid var(--secondary); }

.cart-container { margin-top: 15px; border: 1px solid #dee2e6; border-radius: 4px; background: white; }
.cart-table { width: 100%; border-collapse: collapse; font-size: 0.95em; }
.cart-table th { background: #f1f3f5; padding: 8px; text-align: left; border-bottom: 1px solid #ddd; }
.cart-table td { padding: 8px; border-bottom: 1px solid #eee; }
.cart-total { text-align: right; padding: 10px; font-weight: bold; background: #fff; font-size: 1.1em; border-top:1px solid #eee; }

.finance-dashboard { display: flex; gap: 10px; margin-bottom: 15px; }
.card { flex: 1; padding: 15px; border-radius: 5px; color: white; text-align: center; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.card p { font-size: 1.4em; margin: 5px 0 0 0; font-weight: bold; }
.card-caixa { background: var(--primary); }
.card-receber { background: var(--success); }
.card-pagar { background: var(--danger); }

.finance-grid { display: flex; gap: 15px; }
.col-left, .col-right { flex: 1; display: flex; flex-direction: column; gap: 15px; }
.panel { background: white; border: 1px solid #dee2e6; padding: 15px; border-radius: 5px; }
.panel h3 { margin-top: 0; border-bottom: 1px solid #eee; padding-bottom: 8px; font-size: 1.1em; }
.table-container { max-height: 250px; overflow-y: auto; }
.finance-table { width: 100%; font-size: 0.85em; border-collapse: collapse; }
.finance-table td { padding: 6px; border-bottom: 1px solid #eee; }

.charts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; }
.chart-box { background: white; border: 1px solid #dee2e6; padding: 15px; border-radius: 8px; min-height: 300px; }
.chart-box h4 { margin-top: 0; text-align: center; color: #555; border-bottom: 1px solid #eee; padding-bottom: 10px; }
@media (max-width: 900px) { .charts-grid { grid-template-columns: 1fr; } }
.simple-list li { border-left: none; border-bottom: 1px solid #eee; background: none; }

.badge-status { padding: 4px 8px; border-radius: 4px; font-size: 0.85em; font-weight: bold; color: white; }
.st-Pendente { background: #6c757d; }
.st-EmAndamento { background: #0d6efd; }
.st-Concluido { background: #198754; }
.st-Entregue { background: #0dcaf0; color: #000; }

.hidden { display: none !important; }
.aviso-edicao { background: #fff3cd; color: #856404; padding: 10px; border-radius: 4px; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; }
.full-select { width: 100%; background: #fff; padding: 8px; border: 1px solid #ccc; font-weight: 500; }

#login-screen { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(135deg, #0d6efd, #0dcaf0); display: flex; justify-content: center; align-items: center; z-index: 9999; }
.login-box { background: white; padding: 30px; border-radius: 8px; width: 300px; text-align: center; box-shadow: 0 10px 25px rgba(0,0,0,0.2); }
.login-box h2 { margin-top: 0; color: #333; }
.login-box input { margin-bottom: 10px; }

.modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); display: flex; justify-content: center; align-items: center; z-index: 5000; backdrop-filter: blur(2px); }
.modal-content { background: white; padding: 20px; border-radius: 6px; width: 350px; max-width: 95%; box-shadow: 0 5px 15px rgba(0,0,0,0.3); }
.modal-actions { display: flex; justify-content: space-between; margin-top: 20px; }
.btn-confirm { background: var(--success); color: white; padding: 8px 15px; border-radius: 3px; }
.btn-cancel { background: var(--secondary); color: white; padding: 8px 15px; border-radius: 3px; }