* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f3f5f7;
    color: #222;
}

header {
    background: #1976d2;
    color: #fff;
    padding: 16px;
    text-align: center;
    font-size: 20px;
    font-weight: bold;
}

.container {
    max-width: 650px;
    margin: auto;
    padding: 14px;
}

.today-banner {
    background: #e3f2fd;
    border-left: 4px solid #1976d2;
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 12px;
    font-size: 13px;
    color: #0d47a1;
    font-weight: bold;
}

.filter-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
}

.cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.card {
    background: #fff;
    border-radius: 12px;
    padding: 12px 8px;
    text-align: center;
    box-shadow: 0 2px 6px #0001;
}

.card span {
    font-size: 13px;
    color: #666;
}

.card b {
    display: block;
    font-size: 17px;
    margin-top: 4px;
}

.in { color: #16803c; }
.pending { color: #e65100; }
.out { color: #c62828; }
.profit { color: #1976d2; }

.buttons-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 8px;
}

.btn-full {
    width: 100%;
    margin-bottom: 12px;
    padding: 8px;
}

button {
    border: 0;
    border-radius: 10px;
    padding: 12px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
}

.primary { background: #1976d2; color: #fff; }
.secondary { background: #fff; color: #1976d2; border: 1px solid #1976d2; }
.danger { background: #fff; color: #c62828; border: 1px solid #c62828; }

section {
    background: #fff;
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 14px;
    box-shadow: 0 2px 6px #0001;
}

h2 {
    font-size: 17px;
    margin: 0 0 10px;
}

input, select {
    width: 100%;
    padding: 11px;
    margin: 4px 0 8px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 14px;
}

input[type="radio"], input[type="checkbox"] {
    width: 18px !important;
    height: 18px !important;
    padding: 0 !important;
    margin: 0 !important;
    cursor: pointer;
    accent-color: #2e7d32;
    flex-shrink: 0;
}

.radio-option {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12.5px;
    cursor: pointer;
    text-align: left;
    margin-bottom: 6px;
}

.radio-option input[type="radio"] {
    margin-top: 2px !important;
}

.row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.form-actions {
    margin-top: 6px;
}

.item {
    border-top: 1px solid #eee;
    padding: 10px 0;
    position: relative;
}

.item:first-child {
    border-top: 0;
}

.small {
    font-size: 12px;
    color: #666;
    margin: 2px 0;
}

.value {
    font-weight: bold;
    font-size: 15px;
    margin-top: 4px;
}

.tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
}

.tag-orcamento { background: #e0e0e0; color: #424242; }
.tag-agendado { background: #fff3e0; color: #e65100; }
.tag-realizado { background: #e3f2fd; color: #1565c0; }
.tag-pago { background: #e8f5e9; color: #2e7d32; }

.btn-action {
    display: inline-block;
    padding: 6px 10px;
    font-size: 12px;
    border-radius: 6px;
    margin-top: 6px;
    margin-right: 4px;
}

.item-actions {
    float: right;
    display: flex;
    gap: 4px;
}

.btn-mini {
    padding: 5px 8px;
    font-size: 11px;
    border-radius: 6px;
}

.btn-whatsapp {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 5px 8px;
    font-size: 11px;
    border-radius: 6px;
}

.btn-edit { background: #e3f2fd; color: #1976d2; }
.btn-delete { background: #fbe9e7; color: #c62828; }

.hidden { display: none !important; }

.tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 10px;
}

.tabs button {
    flex: 1;
    padding: 8px;
    font-size: 13px;
    white-space: nowrap;
}

.tabs button.active {
    background: #1976d2;
    color: #fff;
}

.backup-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 18px 0;
}

/* --- Estilos para Itens Dinâmicos do Serviço --- */
/* --- Estilos para Linhas de Itens Dinâmicos --- */
/* --- Estilos Responsivos para Itens do Serviço --- */
.items-section {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px;
    margin: 10px 0;
}

.items-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.item-row {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 10px;
}

.item-row-top {
    margin-bottom: 8px;
}

/* Agrupador de label e input */
.field-group {
    display: flex;
    flex-direction: column;
}

.field-group label {
    font-size: 11px;
    font-weight: bold;
    color: #666;
    margin-bottom: 2px;
}

/* Layout Desktop (Telas Maiores) */
.item-row-calc {
    display: grid;
    grid-template-columns: 1fr 1fr 0.8fr 1.2fr 0.8fr 1.2fr auto;
    gap: 6px;
    align-items: flex-end;
}

.btn-container {
    justify-content: flex-end;
}

.btn-remove-item {
    background: #fbe9e7;
    color: #c62828;
    border: 1px solid #ffcdd2;
    border-radius: 6px;
    padding: 8px;
    font-size: 14px;
    cursor: pointer;
    height: 38px;
}

/* Sub-filtros internos (Pills) */
.sub-filter-pills {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.btn-pill {
    flex: 1;
    padding: 8px 12px;
    font-size: 13px;
    border-radius: 20px;
    border: 1px solid #1976d2;
    background: #fff;
    color: #1976d2;
    cursor: pointer;
    font-weight: bold;
}

.btn-pill.active {
    background: #1976d2;
    color: #fff;
}

/* Modal de Transição de Status */
/* Modal de Transição de Status */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    padding: 16px;
}

/* Garante que o modal fique oculto por padrão */
.modal-overlay.hidden {
    display: none !important;
}

.modal-card {
    background: #fff;
    border-radius: 12px;
    padding: 18px;
    width: 100%;
    max-width: 360px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.modal-card-large {
    max-width: 480px;
    width: 100%;
}

.btn-close-modal {
    background: #f0f0f0;
    border: none;
    font-size: 16px;
    font-weight: bold;
    color: #555;
    cursor: pointer;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-close-modal:hover {
    background: #e0e0e0;
    color: #000;
}

.modal-card h3 {
    margin: 0 0 10px;
    font-size: 16px;
    color: #222;
}

/* Histórico de Datas no Card */
.service-history-log {
    background: #f8f9fa;
    border-left: 3px solid #1976d2;
    padding: 8px 12px;
    border-radius: 4px;
    margin: 8px 0 10px 0;
    font-size: 0.88em;
    color: #444;
}

.service-history-log div {
    margin-bottom: 3px;
}

.service-history-log div:last-child {
    margin-bottom: 0;
}

/* --- Validação Visual de Formulários --- */

/* Borda de destaque para campos inválidos */
input.input-error, select.input-error {
    border-color: #c62828 !important;
    background-color: #ffebee !important;
    animation: shakeInput 0.3s ease-in-out;
}

/* Texto de erro contextual abaixo do campo */
.error-msg {
    color: #c62828;
    font-size: 11px;
    font-weight: bold;
    margin: -4px 0 6px 2px;
    display: block;
}

/* Animação suave de vibração horizontal para chamar a atenção */
@keyframes shakeInput {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    50% { transform: translateX(4px); }
    75% { transform: translateX(-2px); }
}

/* --- Sub-aba de Gráficos e Indicadores no Extrato --- */

.chart-section {
    padding: 4px 0;
}

.chart-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 12px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.chart-card-title {
    font-size: 13px;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
}

/* Barra Proporcional de Entradas x Saídas */
.chart-bar-bg {
    background: #e0e0e0;
    border-radius: 8px;
    height: 18px;
    width: 100%;
    overflow: hidden;
    display: flex;
    margin: 8px 0;
}

.chart-bar-fill-in {
    background: #2e7d32;
    height: 100%;
    transition: width 0.3s ease;
}

.chart-bar-fill-out {
    background: #c62828;
    height: 100%;
    transition: width 0.3s ease;
}

.chart-legend {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #555;
    margin-top: 4px;
}

/* Distribuição de Despesas por Categoria */
.cat-item-row {
    margin-bottom: 8px;
}

.cat-item-row:last-child {
    margin-bottom: 0;
}

.cat-item-info {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    margin-bottom: 3px;
    font-weight: 500;
}

.cat-bar-bg {
    background: #f0f0f0;
    border-radius: 4px;
    height: 9px;
    width: 100%;
    overflow: hidden;
}

.cat-bar-fill {
    background: #1976d2;
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Layout Mobile (Celulares) */
@media (max-width: 600px) {
    .item-row-calc {
        grid-template-columns: 1fr 1fr; /* Organiza em 2 colunas bem espaçosas no celular */
        gap: 8px;
    }

    .btn-container {
        grid-column: span 2; /* Botão de excluir ocupa a largura total abaixo no celular */
    }

    .btn-remove-item {
        width: 100%;
        margin-top: 4px;
    }
}

/* --- Cards de Serviços Despoluídos e Expansíveis --- */
.item-card {
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.item-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.item-card-title {
    font-size: 1.1em;
    font-weight: bold;
    color: #222;
}

.item-card-body {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #ddd;
}

/* Botões com maior área de toque */
.btn-action-lg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 14px;
    font-size: 0.95em;
    font-weight: bold;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    margin-top: 6px;
    min-height: 44px;
}

.btn-whatsapp-lg {
    background: #25d366;
    color: #fff;
    width: 100%;
}
/* --- Card de Fundo de Caixa e Capital de Giro --- */
.caixa-summary-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.caixa-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 8px;
}

.caixa-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 8px;
    text-align: center;
}

.caixa-item span {
    font-size: 11px;
    color: #666;
    font-weight: bold;
    display: block;
}

.caixa-item b {
    font-size: 15px;
    color: #1976d2;
    display: block;
    margin-top: 2px;
}
/* --- Barra de Progresso e Metas de Caixa --- */
/* --- Painel de Metas de Fundo de Caixa e Capital de Giro --- */
.caixa-summary-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.caixa-meta-box {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 8px;
    border: 1px solid #eee;
}

.caixa-meta-header {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    font-weight: bold;
    color: #444;
    margin-bottom: 4px;
}

.caixa-progress-bg {
    background: #e0e0e0;
    border-radius: 6px;
    height: 10px;
    width: 100%;
    overflow: hidden;
    margin: 4px 0;
}

.caixa-progress-fill {
    height: 100%;
    background: #1976d2;
    transition: width 0.3s ease;
}

.caixa-progress-fill.meta-ok {
    background: #2e7d32;
}

.caixa-meta-status {
    font-size: 11px;
    font-weight: bold;
    margin-top: 4px;
    display: block;
    text-align: right;
}

.caixa-meta-status.ok { color: #2e7d32; }
.caixa-meta-status.pending { color: #e65100; }

/* --- Modo Privacidade (Ocultar / Mascarar Valores) --- */
.blur-values .value-maskable {
    filter: blur(6px);
    opacity: 0.6;
    user-select: none;
    transition: filter 0.2s ease, opacity 0.2s ease;
}

.header-btn-mask {
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- Banner de Alerta de Backup Manual --- */
.backup-alert-banner {
    background: #fff3e0;
    border-left: 4px solid #f57c00;
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 12px;
    font-size: 13px;
    color: #e65100;
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.backup-alert-banner a {
    color: #e65100;
    font-weight: bold;
    text-decoration: underline;
    cursor: pointer;
    white-space: nowrap;
}

/* --- Toast Flutuante de Desfazer Exclusão --- */
.undo-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: #212121;
    color: #fff;
    padding: 12px 18px;
    border-radius: 30px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    gap: 16px;
    z-index: 10000;
    font-size: 14px;
    animation: slideUpToast 0.3s ease-out;
}

.undo-toast.hidden {
    display: none !important;
}

.undo-toast button {
    background: #ffb74d;
    color: #000;
    border: none;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
}

@keyframes slideUpToast {
    from {
        transform: translate(-50%, 50px);
        opacity: 0;
    }
    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

/* --- Aba de Clientes e Histórico --- */
.client-sort-bar {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #444;
}

.client-sort-bar select {
    margin: 0;
    padding: 6px 10px;
    font-size: 13px;
    border-radius: 6px;
    border: 1px solid #ccc;
    background: #fdfdfd;
    max-width: 190px;
}

.client-card {
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.client-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.client-card-title {
    font-size: 1.1em;
    font-weight: bold;
    color: #222;
}

.client-card-meta {
    font-size: 12px;
    color: #666;
    margin-top: 2px;
}

.client-card-total {
    font-size: 1.15em;
    color: #1976d2;
    font-weight: bold;
}

.client-card-body {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #ddd;
}

.client-summary-box {
    background: #f8f9fa;
    border-left: 3px solid #1976d2;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 12px;
    color: #444;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.client-services-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 280px;
    overflow-y: auto;
    padding-right: 2px;
}

.client-service-item {
    background: #fdfdfd;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 8px 10px;
}

/* --- Menu Lateral (Drawer) --- */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1000;
    transition: opacity 0.25s ease;
}

.drawer-overlay.hidden {
    display: none !important;
}

.side-drawer {
    position: fixed;
    top: 0;
    left: -290px;
    width: 280px;
    height: 100vh;
    background: #fff;
    z-index: 1001;
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.25);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.side-drawer.open {
    transform: translateX(290px);
}

.drawer-header {
    padding: 16px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.drawer-menu {
    padding: 10px 8px;
    overflow-y: auto;
    flex: 1;
}

.drawer-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.drawer-item:active {
    background: #e3f2fd;
}

.drawer-icon {
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.drawer-text b {
    display: block;
    font-size: 14px;
    color: #222;
}

.drawer-text small {
    display: block;
    font-size: 11px;
    color: #666;
    margin-top: 1px;
}

.drawer-divider {
    border: none;
    border-top: 1px solid #eee;
    margin: 8px 12px;
}

/* --- Bloco de Notas & Tarefas --- */
.note-form-box {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 6px;
}

.note-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: opacity 0.2s ease, background 0.2s ease;
}

.note-item.note-done {
    opacity: 0.6;
    background: #f5f5f5;
}

.note-item.note-done .note-text {
    text-decoration: line-through;
    color: #777;
}

.note-checkbox {
    width: 20px;
    height: 20px;
    margin: 2px 0 0 0;
    cursor: pointer;
    accent-color: #1976d2;
}

.note-text {
    font-size: 14px;
    color: #222;
    word-break: break-word;
    line-height: 1.35;
}

.note-reminder-badge {
    display: inline-block;
    background: #fff3e0;
    color: #e65100;
    border: 1px solid #ffe0b2;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    padding: 2px 8px;
}

.btn-remove-note {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    opacity: 0.7;
    transition: opacity 0.15s ease;
}

.btn-remove-note:active {
    opacity: 1;
}

/* --- Painel Anual & Termômetro do MEI --- */
.mei-thermometer-card {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
}

.mei-progress-bg {
    background: #e0e0e0;
    border-radius: 6px;
    height: 12px;
    width: 100%;
    overflow: hidden;
    margin: 4px 0;
}

.mei-progress-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 0.3s ease;
}

.mei-status-msg {
    background: #fff;
    border-radius: 4px;
    padding: 8px 10px;
    font-size: 11.5px;
    color: #444;
    margin-top: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.annual-summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
}

.annual-stat-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.annual-stat-card small {
    font-size: 11px;
    color: #666;
}

.annual-stat-card b {
    font-size: 15px;
}

.annual-stat-card span {
    font-size: 11px;
    color: #777;
}

.annual-stat-card.card-green b { color: #2e7d32; }
.annual-stat-card.card-red b { color: #d32f2f; }
.annual-stat-card.card-blue b { color: #1976d2; }

.annual-months-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.annual-month-row {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    padding: 8px 10px;
}

.annual-month-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    font-weight: bold;
    color: #333;
}

.annual-month-lucro.lucro-pos { color: #2e7d32; }
.annual-month-lucro.lucro-neg { color: #d32f2f; }

.annual-month-details {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #666;
    margin: 4px 0;
}

.annual-mini-progress {
    background: #f0f0f0;
    border-radius: 3px;
    height: 4px;
    width: 100%;
    overflow: hidden;
}

.annual-mini-fill {
    height: 100%;
    background: #1976d2;
}

/* --- 13º Salário & Férias --- */
.decimo-progress-card {
    background: #f1f8e9;
    border: 1px solid #c5e1a5;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
}

.decimo-bar-bg {
    background: #e0e0e0;
    border-radius: 6px;
    height: 12px;
    width: 100%;
    overflow: hidden;
    margin: 6px 0;
}

.decimo-bar-fill {
    height: 100%;
    background: #2e7d32;
    border-radius: 6px;
    transition: width 0.3s ease;
}

.decimo-bar-fill.decimo-ok {
    background: linear-gradient(90deg, #2e7d32, #fbc02d);
}

.decimo-badge {
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 12px;
    margin-top: 10px;
    text-align: center;
}

.decimo-badge-info {
    background: #e3f2fd;
    color: #1565c0;
    border: 1px solid #bbdefb;
}

.decimo-badge-success {
    background: #e8f5e9;
    color: #1b5e20;
    border: 1px solid #a5d6a7;
    font-weight: bold;
}

.decimo-badge-pending {
    background: #fff3e0;
    color: #e65100;
    border: 1px solid #ffe0b2;
}

.decimo-flow-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px;
    margin-top: 10px;
}

.decimo-flow-item {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #555;
    margin-bottom: 6px;
}

.decimo-tip-box {
    background: #f8f9fa;
    border-left: 3px solid #2e7d32;
    border-radius: 4px;
    padding: 10px 12px;
    font-size: 11.5px;
    color: #555;
    line-height: 1.4;
    margin-top: 12px;
}

/* --- Controle de Estoque & Materiais --- */
.inv-stat-card {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.inv-stat-card small {
    font-size: 10.5px;
    color: #666;
}

.inv-stat-card b {
    font-size: 14px;
    color: #222;
}

.inv-item-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.inv-item-card.inv-card-low {
    border-color: #ffb74d;
    background: #fffdf9;
}

.inv-badge-cat {
    display: inline-block;
    background: #e3f2fd;
    color: #1976d2;
    border-radius: 4px;
    font-size: 10.5px;
    font-weight: bold;
    padding: 1px 6px;
}

.inv-badge-low {
    display: inline-block;
    background: #fff3e0;
    color: #e65100;
    border: 1px solid #ffe0b2;
    border-radius: 4px;
    font-size: 10.5px;
    font-weight: bold;
    padding: 1px 6px;
}

.inv-qty-box {
    background: #f5f5f5;
    border-radius: 6px;
    padding: 4px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
}

.btn-qty-mini {
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 24px;
    height: 24px;
    font-size: 14px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #444;
}

.btn-qty-mini:active {
    background: #e0e0e0;
}

.inv-item-actions {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    border-top: 1px dashed #eee;
    margin-top: 8px;
    padding-top: 6px;
}

/* ========================================== */
/* ESTILOS DE SEGURANÇA, PIN E LOCK SCREEN   */
/* ========================================== */

.lock-screen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #0f172a;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.lock-screen-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 24px 20px;
    width: 100%;
    max-width: 340px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.lock-icon {
    font-size: 36px;
    margin-bottom: 4px;
}

.pin-dots-container {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 20px;
}

.pin-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid #94a3b8;
    background: transparent;
    transition: all 0.2s ease;
}

.pin-dot.filled {
    background: #1976d2;
    border-color: #1976d2;
    transform: scale(1.15);
}

.lock-error-msg {
    color: #dc2626;
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 12px;
    min-height: 18px;
}

.pin-keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    max-width: 260px;
    margin: 0 auto;
}

.pin-key {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 50%;
    width: 62px;
    height: 62px;
    font-size: 22px;
    font-weight: bold;
    color: #1e293b;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s ease, transform 0.1s ease;
}

.pin-key:active {
    background: #cbd5e1;
    transform: scale(0.92);
}

.pin-key-action {
    background: #f1f5f9;
    font-size: 18px;
    color: #64748b;
}

/* Switch Toggle Slider */
.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: .3s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
}

input:checked + .slider {
    background-color: #16a34a;
}

input:checked + .slider:before {
    transform: translateX(22px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

/* ==========================================
   MÓDULO DE PENDÊNCIAS & FOTOS (Marcenaria)
   ========================================== */

/* Prévia da última pendência no card do serviço */
.service-pend-preview {
    background: #efebe9;
    border-left: 3px solid #6d4c41;
    padding: 8px 12px;
    border-radius: 4px;
    margin: 0 0 8px 0;
    font-size: 0.85em;
    color: #4e342e;
}

/* Item da timeline (registro de 1 visita/pendência) */
.pend-item {
    background: #fafafa;
    border: 1px solid #ececec;
    border-radius: 8px;
    padding: 8px 10px;
}

.pend-item-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    font-size: 0.85em;
    font-weight: bold;
    color: #5d4037;
    margin-bottom: 6px;
}

.pend-text {
    font-size: 13px;
    color: #444;
    margin-top: 6px;
    word-break: break-word;
}

/* Miniaturas de foto em pendências (prévia nova + timeline) */
.pend-thumb {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #ddd;
    cursor: pointer;
    display: block;
    margin-top: 6px;
}

/* Galeria de fotos de uma pendência na timeline */
.pend-photos {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.pend-photos .pend-thumb {
    margin-top: 0;
}

/* Contador de fotos da pendência (badge no cabeçalho do item) */
.pend-foto-count {
    font-size: 11px;
    color: #6d4c41;
    background: #e8ddd6;
    padding: 1px 7px;
    border-radius: 10px;
    font-weight: normal;
    margin-left: 4px;
}

/* Prévia da seleção de fotos ainda não salva */
.pend-photo-previews {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pend-photo-previews .pend-thumb {
    margin-top: 0;
}

.pend-photo-new {
    position: relative;
}

.pend-photo-rem {
    position: absolute;
    top: -7px;
    right: -7px;
    background: #c62828;
    color: #fff;
    border: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 11px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Botões de navegação do visualizador de fotos (tela cheia) */
.pend-foto-nav {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #fff;
    font-size: 18px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pend-del-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 15px;
    padding: 2px;
    line-height: 1;
    opacity: 0.75;
}

.pend-del-btn:hover {
    opacity: 1;
}