﻿/* Reset e Configurações Globais */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* Light Theme (Padrão) */
:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;
    --background: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #0f172a;
    --text-muted: #475569;
    --text-light: #94a3b8;
    --border: #e2e8f0;
    --border-hover: #cbd5e1;
    --error: #ef4444;
    --success: #22c55e;
    
    /* Variáveis do App Shell */
    --app-bg: #f1f5f9;
    --sidebar-bg: #ffffff;
    --header-bg: #ffffff;
    --p-card-bg: #ffffff;
    --p-chart-bg: #f8fafc;
    --p-chart-border: #cbd5e1;
    --input-bg: #fafafa;
    
    /* Layout */
    --header-height: 70px;

    /* Outros */
    --radius-lg: 16px;
    --radius-md: 10px;
    --radius-sm: 6px;
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.08);
}

/* Dark Theme (Modo Escuro) */
[data-theme="dark"] {
    --primary: #3b82f6;
    --primary-hover: #60a5fa;
    --primary-light: rgba(59, 130, 246, 0.15);
    --background: #0b111e;
    --card-bg: #151c2c;
    --text-main: #f9fafb;
    --text-muted: #9ca3af;
    --text-light: #6b7280;
    --border: #2d3748;
    --border-hover: #4a5568;
    --error: #f87171;
    --success: #4ade80;
    
    /* Variáveis do App Shell no Dark Mode */
    --app-bg: #0b111e;
    --sidebar-bg: #111625;
    --header-bg: #111625;
    --p-card-bg: #151c2c;
    --p-chart-bg: #111625;
    --p-chart-border: #2d3748;
    --input-bg: #1e2538;
}

body {
    background-color: var(--background);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
}

/* App Shell - Override body flex for app pages */
body.app-shell {
    display: block;
    align-items: unset;
    justify-content: unset;
}

/* Container Principal (Split Screen) */
.login-container {
    display: flex;
    width: 100%;
    min-height: 100vh;
    background-color: var(--card-bg);
}

/* ================= LADO ESQUERDO: INFORMATIVO ================= */
.login-info-side {
    flex: 1.1;
    background: radial-gradient(circle at 10% 20%, rgb(4, 32, 66) 0%, rgb(12, 12, 12) 100%);
    color: #ffffff;
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

/* Elementos decorativos de fundo */
.login-info-side::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(37, 99, 235, 0.15);
    filter: blur(80px);
    border-radius: 50%;
    top: -50px;
    left: -50px;
}

.login-info-side::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: rgba(37, 99, 235, 0.1);
    filter: blur(100px);
    border-radius: 50%;
    bottom: -100px;
    right: -50px;
}

.info-content {
    max-width: 520px;
    z-index: 2;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 80px;
}

.logo-icon {
    width: 32px;
    height: 32px;
    color: var(--primary);
}

.login-info-side .logo {
    color: #ffffff;
}

/* Textos do Painel Informativo */
.login-info-side h1 {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -1px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-info-side p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #94a3b8;
    margin-bottom: 40px;
}

/* Lista de Features */
.features-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    color: #cbd5e1;
}

.feature-icon {
    color: var(--primary);
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

.info-footer {
    z-index: 2;
    font-size: 0.85rem;
    color: #64748b;
}

/* ================= LADO DIREITO: FORMULÁRIO ================= */
.login-form-side {
    flex: 0.9;
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: var(--card-bg);
}

.form-header-mobile {
    display: none; /* Oculto por padrão no Desktop */
    width: 100%;
    margin-bottom: 40px;
}

.form-container {
    width: 100%;
    max-width: 420px;
}

.form-title {
    margin-bottom: 35px;
}

.form-title h2 {
    font-size: 1.85rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.5px;
    margin-bottom: 8px;
}

.form-title p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Inputs e Grupos de Entrada */
.input-group {
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
}

/* Inputs diretos dentro de .input-group (usado na OS e formulários internos) */
.input-group > input:not([type="checkbox"]):not([type="color"]):not([type="range"]) {
    width: 100%;
    padding: 12px 14px;
    font-size: 0.95rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background-color: var(--input-bg);
    color: var(--text-main);
    outline: none;
    transition: all 0.2s ease;
}

.input-group > input:not([type="checkbox"]):not([type="color"]):not([type="range"])::placeholder {
    color: var(--text-light);
}

.input-group > input:not([type="checkbox"]):not([type="color"]):not([type="range"]):focus {
    background-color: var(--card-bg);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

.input-group textarea {
    width: 100%;
    padding: 12px 14px;
    font-size: 0.95rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background-color: var(--input-bg);
    color: var(--text-main);
    outline: none;
    resize: vertical;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
    line-height: 1.5;
}

.input-group textarea::placeholder {
    color: var(--text-light);
}

.input-group textarea:focus {
    background-color: var(--card-bg);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

.label-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.forgot-password {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

.forgot-password:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 14px;
    color: var(--text-light);
    width: 20px;
    height: 20px;
    pointer-events: none;
    transition: color 0.2s;
}

.input-wrapper input {
    width: 100%;
    padding: 14px 14px 14px 46px;
    font-size: 0.95rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background-color: var(--input-bg);
    outline: none;
    color: var(--text-main);
    transition: all 0.2s ease;
}

.input-wrapper input::placeholder {
    color: var(--text-light);
}

/* Focus States */
.input-wrapper input:focus {
    background-color: var(--card-bg);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.input-wrapper input:focus + .input-icon,
.input-wrapper input:focus ~ .input-icon {
    color: var(--primary);
}

/* Mostrar/Ocultar Senha */
.toggle-password {
    position: absolute;
    right: 14px;
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 50%;
    transition: all 0.2s;
}

.toggle-password:hover {
    color: var(--text-muted);
    background-color: var(--app-bg);
}

.toggle-password svg {
    width: 20px;
    height: 20px;
}

/* Custom Checkbox (Lembrar-me) */
.form-options {
    margin-bottom: 24px;
}

.checkbox-container {
    display: block;
    position: relative;
    padding-left: 28px;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-muted);
    user-select: none;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 2px;
    left: 0;
    height: 18px;
    width: 18px;
    background-color: var(--app-bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    transition: all 0.2s;
}

.checkbox-container:hover input ~ .checkmark {
    background-color: var(--border-hover);
    border-color: var(--border-hover);
}

.checkbox-container input:checked ~ .checkmark {
    background-color: var(--primary);
    border-color: var(--primary);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 5px;
    top: 2px;
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Botão de Envio */
.btn-submit {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: var(--radius-md);
    background-color: var(--primary);
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2);
    transition: all 0.2s ease;
}

.btn-submit:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(37, 99, 235, 0.3);
}

.btn-submit:active {
    transform: translateY(0);
}

.btn-submit svg {
    width: 18px;
    height: 18px;
    transition: transform 0.2s ease;
}

.btn-submit:hover svg {
    transform: translateX(3px);
}

/* Rodapé do Formulário */
.form-footer-register {
    margin-top: 35px;
    text-align: center;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.form-footer-register a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}

.form-footer-register a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.mobile-footer {
    display: none;
    margin-top: 40px;
    font-size: 0.8rem;
    color: var(--text-light);
}

/* ================= RESPONSIVIDADE (MEDIA QUERIES) ================= */

/* Tablet e Telas Médias */
@media (max-width: 1024px) {
    .login-info-side {
        padding: 40px;
    }
    .login-form-side {
        padding: 40px;
    }
    .login-info-side h1 {
        font-size: 2rem;
    }
}

/* ===================================================================   MODAIS E OVERLAYS
   ========================================================================== */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 500px;
    box-shadow: var(--shadow-lg);
    transform: translateY(-20px);
    transition: transform 0.3s ease;
    position: relative;
}

.modal.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
}

.btn-close-modal {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.btn-close-modal:hover {
    background-color: var(--background);
    color: var(--text-main);
}

.btn-close-modal svg {
    width: 24px;
    height: 24px;
}

.modal-form .input-group {
    margin-bottom: 20px;
}

.modal-form label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 6px;
    display: block;
}

.modal-form input[type="text"],
.modal-form input[type="date"],
.modal-form input[type="time"],
.modal-form select {
    width: 100%;
    padding: 12px;
    font-size: 0.95rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background-color: var(--input-bg);
    color: var(--text-main);
    outline: none;
    transition: all 0.2s ease;
}

.modal-form input:focus,
.modal-form select:focus {
    background-color: var(--card-bg);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

.modal-form select.tag-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"lucide lucide-chevron-down\"%3e%3cpath d=\"m6 9 6 6 6-6\"/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px;
    padding-right: 40px; /* Espaço para o ícone */
}

.manage-tags-link {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: none;
    margin-top: 10px;
    transition: color 0.2s;
}

.manage-tags-link:hover {
    color: var(--primary);
}

.manage-tags-link svg {
    width: 16px;
    height: 16px;
}

/* Responsividade para Modais */
@media (max-width: 600px) {
    .modal-content {
        padding: 20px;
    }
    .modal-header {
        margin-bottom: 20px;
    }
    .modal-header h2 {
        font-size: 1.3rem;
    }
}

/* Celular (Hiding the Info side completely) */
@media (max-width: 868px) {
    .login-container {
        flex-direction: column;
    }

    .login-info-side {
        display: none; /* Oculta o lado esquerdo em celular */
    }

    .login-form-side {
        flex: 1;
        width: 100%;
        min-height: 100vh;
        justify-content: space-between;
        padding: 40px 24px;
    }

    .form-header-mobile {
        display: block; /* Exibe o logo no celular acima do formulário */
    }

    .form-container {
        margin: auto 0; /* Centraliza verticalmente o formulário no celular */
    }

    .mobile-footer {
        display: block; /* Rodapé exibido apenas no celular */
        text-align: center;
    }
}

/* Pequenos Dispositivos */
@media (max-width: 400px) {
    .form-title h2 {
        font-size: 1.6rem;
    }
    .input-wrapper input {
        padding: 12px 12px 12px 42px;
    }
    .btn-submit {
        padding: 12px;
    }
}


/* ================= SIDEBAR (MENU LATERAL FIXO) ================= */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 260px;
    background-color: var(--sidebar-bg); /* Fundo Branco conforme requisito */
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-top {
    height: var(--header-height);
    min-height: var(--header-height);
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.sidebar-top .logo {
    margin-bottom: 0;
    font-size: 1.35rem;
    color: var(--text-main);
}

.btn-close-sidebar {
    display: none; /* Oculto no desktop */
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.btn-close-sidebar:hover {
    background-color: var(--app-bg);
}

/* Navegação da Sidebar */
.sidebar-nav {
    flex: 1;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    overflow-y: auto;
}

.nav-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.nav-item svg {
    width: 20px;
    height: 20px;
    color: var(--text-light);
    transition: color 0.2s;
}

/* Estados de Hover e Active */
.nav-item:hover {
    background-color: var(--background);
    color: var(--text-main);
}

.nav-item:hover svg {
    color: var(--text-main);
}

.nav-item.active {
    background-color: var(--primary-light);
    color: var(--primary);
}

.nav-item.active svg {
    color: var(--primary);
}

.nav-divider {
    height: 1px;
    background-color: var(--border);
    margin: 8px 16px;
}

/* Rodapé da Sidebar */
.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border);
}

.logout-btn {
    color: var(--error);
}

.logout-btn svg {
    color: var(--error);
}

.logout-btn:hover {
    background-color: #fef2f2;
    color: #dc2626;
}

.logout-btn:hover svg {
    color: #dc2626;
}

/* Overlay para Mobile */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(15, 23, 42, 0.4);
    z-index: 99;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    pointer-events: auto;
}


/* ================= APP CONTAINER (ÁREA PRINCIPAL) ================= */
.app-container {
    margin-left: 260px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    width: calc(100% - 260px);
}

/* ================= HEADER (BARRA SUPERIOR) ================= */
.header {
    height: var(--header-height);
    min-height: var(--header-height);
    background-color: var(--header-bg);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 90;
    flex-wrap: nowrap;
    width: 100%;
    overflow: hidden;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
}

.btn-menu-hamburger {
    display: none; /* Oculto no desktop */
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: background-color 0.2s;
}

.btn-menu-hamburger:hover {
    background-color: var(--app-bg);
}

.btn-menu-hamburger svg {
    width: 24px;
    height: 24px;
}

/* Barra de Busca */
.header-search {
    position: relative;
    flex: 1;
    min-width: 0;
    max-width: 380px;
    display: flex;
    align-items: center;
    flex-shrink: 1;
}

.search-icon {
    position: absolute;
    left: 14px;
    color: var(--text-light);
    width: 18px;
    height: 18px;
    pointer-events: none;
}

.header-search input {
    width: 100%;
    padding: 10px 14px 10px 42px;
    font-size: 0.9rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background-color: var(--background);
    outline: none;
    color: var(--text-main);
    transition: all 0.2s ease;
}

.header-search input:focus {
    background-color: var(--card-bg);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

/* Lado Direito do Header */
.header-right {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-shrink: 0;
    white-space: nowrap;
}

.header-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    position: relative;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-btn:hover {
    background-color: var(--app-bg);
    color: var(--text-main);
}

.header-btn svg {
    width: 20px;
    height: 20px;
}

/* Badge de Notificação */
.notification-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    background-color: var(--error);
    border-radius: 50%;
    border: 2px solid var(--header-bg);
}

/* Perfil */
.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-md);
    transition: background-color 0.2s;
}

.user-profile:hover {
    background-color: var(--background);
}

.user-avatar {
    width: 36px;
    height: 36px;
    background-color: var(--primary-light);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.88rem;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.2;
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-light);
}


/* ================= MAIN CONTENT (ÁREA CENTRAL) ================= */
.main-content {
    flex: 1;
    padding: 40px;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
}

.content-header {
    margin-bottom: 32px;
}

.content-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.5px;
    margin-bottom: 6px;
}

.content-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ── Header chips (subtítulo visual das páginas) ── */
.header-chips {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    flex-wrap: wrap;
}
.hchip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 9px 3px 7px;
    border-radius: 20px;
    letter-spacing: 0.02em;
}
.hchip svg { width: 12px; height: 12px; flex-shrink: 0; }
.hchip.green  { background: #dcfce7; color: #15803d; }
.hchip.red    { background: #fee2e2; color: #dc2626; }
.hchip.blue   { background: #dbeafe; color: #1d4ed8; }
.hchip.amber  { background: #fef9c3; color: #a16207; }
.hchip.violet { background: #ede9fe; color: #6d28d9; }
[data-theme="dark"] .hchip.green  { background: #14532d; color: #86efac; }
[data-theme="dark"] .hchip.red    { background: #450a0a; color: #fca5a5; }
[data-theme="dark"] .hchip.blue   { background: #1e3a5f; color: #93c5fd; }
[data-theme="dark"] .hchip.amber  { background: #422006; color: #fde68a; }
[data-theme="dark"] .hchip.violet { background: #2e1065; color: #c4b5fd; }


/* --- Grid de Placeholders --- */
.dashboard-grid-placeholder {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.placeholder-card-row {
    display: grid;
    grid-template-columns: repeat(3, 1px);
    grid-auto-rows: minmax(1px, auto);
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.p-card {
    background-color: var(--p-card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-md);
    transition: transform 0.2s, box-shadow 0.2s;
}

.p-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.p-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.p-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
}

.p-icon {
    width: 22px;
    height: 22px;
    color: var(--primary);
}

.p-card-desc {
    font-size: 0.88rem;
    line-height: 1.5;
    color: var(--text-muted);
}

/* Gráfico */
.placeholder-chart-row {
    display: flex;
    width: 100%;
}

.chart-large {
    width: 100%;
}

.p-chart-mock {
    width: 100%;
    height: 240px;
    background-color: var(--p-chart-bg);
    border: 2px dashed var(--p-chart-border);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: 500;
    margin-top: 16px;
}


/* =====================================================   NOTIFICATION PANEL
============================================================ */
.notif-wrapper { position: relative; }
.notif-panel {
    position: absolute; top: calc(100% + 10px); right: -8px;
    width: 340px; background: var(--card-bg);
    border: 1px solid var(--border); border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px rgba(0,0,0,.14); z-index: 200;
    display: none; flex-direction: column; overflow: hidden;
    animation: notifIn .18s ease;
}
.notif-panel.open { display: flex; }
@keyframes notifIn { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:translateY(0); } }
.notif-panel-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 16px 10px; border-bottom: 1px solid var(--border);
}
.notif-panel-title { font-size: .875rem; font-weight: 700; color: var(--text-main); }
.notif-mark-btn { font-size: .73rem; color: var(--primary); font-weight: 600; background: none; border: none; cursor: pointer; padding: 0; transition: opacity .15s; }
.notif-mark-btn:hover { opacity: .7; }
.notif-list { max-height: 360px; overflow-y: auto; }
.notif-item { display: flex; align-items: flex-start; gap: 10px; padding: 11px 16px; border-bottom: 1px solid var(--border); transition: background .12s; cursor: pointer; }
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--hover-bg); }
.notif-item.read { opacity: .6; }
.notif-item-icon { width: 32px; height: 32px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 1px; }
.notif-item-icon i { width: 14px; height: 14px; }
.notif-item-icon.red    { background: #fee2e2; color: #dc2626; }
.notif-item-icon.amber  { background: #fffbeb; color: #d97706; }
.notif-item-icon.blue   { background: #eff6ff; color: #2563eb; }
.notif-item-icon.green  { background: #f0fdf4; color: #16a34a; }
[data-theme="dark"] .notif-item-icon.red   { background: rgba(220,38,38,.18); }
[data-theme="dark"] .notif-item-icon.amber { background: rgba(217,119,6,.18); }
[data-theme="dark"] .notif-item-icon.blue  { background: rgba(37,99,235,.18); }
[data-theme="dark"] .notif-item-icon.green { background: rgba(22,163,74,.18); }
.notif-item-body { flex: 1; min-width: 0; }
.notif-item-title { font-size: .82rem; font-weight: 600; color: var(--text-main); line-height: 1.3; }
.notif-item-sub   { font-size: .72rem; color: var(--text-muted); margin-top: 1px; }
.notif-item-time  { font-size: .67rem; color: var(--text-light); white-space: nowrap; flex-shrink: 0; margin-top: 2px; }
.notif-unread-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); flex-shrink: 0; margin-top: 5px; }
.notif-panel-footer { padding: 10px 16px; border-top: 1px solid var(--border); text-align: center; }
.notif-panel-footer a { font-size: .78rem; color: var(--primary); font-weight: 600; text-decoration: none; }
.notif-panel-footer a:hover { text-decoration: underline; }
.notif-badge-num {
    position: absolute; top: 3px; right: 3px;
    background: #ef4444; color: #fff; font-size: .58rem; font-weight: 800;
    min-width: 15px; height: 15px; border-radius: 999px; padding: 0 3px;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid var(--card-bg); line-height: 1;
}

/* =====================================================   FAB — FLOATING ACTION BUTTON (mobile only)
============================================================ */
.app-fab {
    position: fixed; bottom: 22px; right: 18px; z-index: 88;
    width: 52px; height: 52px; border-radius: 50%;
    background: var(--primary); color: #fff; border: none; cursor: pointer;
    display: none; align-items: center; justify-content: center;
    box-shadow: 0 4px 16px rgba(37,99,235,.45);
    transition: transform .18s, box-shadow .18s;
}
.app-fab:hover  { transform: scale(1.07); box-shadow: 0 6px 20px rgba(37,99,235,.55); }
.app-fab:active { transform: scale(.94); }
.app-fab i { width: 22px; height: 22px; }
@media (max-width: 768px) { .app-fab { display: flex; } }

/* =====================================================   EXPORT BUTTON
============================================================ */
.btn-export {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 8px 14px; border-radius: var(--radius-md);
    border: 1px solid var(--border); background: var(--card-bg);
    color: var(--text-main); font-size: .82rem; font-weight: 600;
    cursor: pointer; transition: background .15s, border-color .15s, color .15s; white-space: nowrap;
}
.btn-export:hover { background: var(--primary-light); border-color: var(--primary); color: var(--primary); }
.btn-export i { width: 15px; height: 15px; }

/* =====================================================   TOAST
============================================================ */
.app-toast {
    position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(16px);
    background: #1e293b; color: #fff; padding: 10px 20px;
    border-radius: var(--radius-md); font-size: .82rem; font-weight: 500;
    z-index: 9999; opacity: 0; transition: opacity .22s, transform .22s;
    display: flex; align-items: center; gap: 8px; white-space: nowrap; pointer-events: none;
}
.app-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.app-toast i { width: 15px; height: 15px; color: #4ade80; }
[data-theme="dark"] .app-toast { background: #f1f5f9; color: #1e293b; }
[data-theme="dark"] .app-toast i { color: #16a34a; }
/* Botão mobile de acesso rápido às OS (Dashboard) */
.dash-mobile-os-btn {
    display: none;
    text-decoration: none;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    background-color: var(--p-card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: transform 0.2s, box-shadow 0.2s;
    margin-bottom: 24px;
}
.dash-mobile-os-btn:active {
    transform: scale(0.98);
    box-shadow: var(--shadow-lg);
}
.dash-mobile-os-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.dash-mobile-os-icon svg { width: 22px; height: 22px; color: #fff; }
.dash-mobile-os-text { flex: 1; }
.dash-mobile-os-title {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 3px;
}
.dash-mobile-os-sub {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
}
.dash-mobile-os-arrow { width: 20px; height: 20px; color: var(--text-light); flex-shrink: 0; }

/* =====================================================   DASHBOARD — PAINEL GERAL (implementação completa)
============================================================ */

/* Greeting */
.dash-greeting { display:flex; align-items:baseline; justify-content:space-between; margin-bottom:20px; flex-wrap:wrap; gap:8px; }
.dash-greeting-text { font-size:1.2rem; font-weight:700; color:var(--text-main); }
.dash-greeting-text em { font-style:normal; color:var(--primary); }
.dash-date { font-size:0.8rem; color:var(--text-muted); }

/* KPI Grid */
.dash-kpi-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:14px; margin-bottom:18px; }
.dash-kpi-card {
    background:var(--card-bg); border:1px solid var(--border); border-radius:var(--radius-lg);
    padding:18px 20px; display:flex; flex-direction:column; gap:10px;
    box-shadow:var(--shadow-sm); transition:transform 0.2s, box-shadow 0.2s;
}
.dash-kpi-card:hover { transform:translateY(-2px); box-shadow:var(--shadow-md); }
.dash-kpi-top { display:flex; align-items:flex-start; justify-content:space-between; }
.dash-kpi-icon {
    width:40px; height:40px; border-radius:var(--radius-md);
    display:flex; align-items:center; justify-content:center; flex-shrink:0;
}
.dash-kpi-icon i { width:20px; height:20px; }
.dash-kpi-icon.blue   { background:#eff6ff; color:#2563eb; }
.dash-kpi-icon.green  { background:#f0fdf4; color:#16a34a; }
.dash-kpi-icon.amber  { background:#fffbeb; color:#d97706; }
.dash-kpi-icon.violet { background:#f5f3ff; color:#7c3aed; }
[data-theme="dark"] .dash-kpi-icon.blue   { background:rgba(37,99,235,.15); }
[data-theme="dark"] .dash-kpi-icon.green  { background:rgba(22,163,74,.15); }
[data-theme="dark"] .dash-kpi-icon.amber  { background:rgba(217,119,6,.15); }
[data-theme="dark"] .dash-kpi-icon.violet { background:rgba(124,58,237,.15); }
.dash-kpi-trend {
    display:inline-flex; align-items:center; gap:3px;
    font-size:0.7rem; font-weight:700; padding:3px 7px; border-radius:999px;
}
.dash-kpi-trend i { width:11px; height:11px; }
.dash-kpi-trend.up     { background:#dcfce7; color:#16a34a; }
.dash-kpi-trend.down   { background:#fee2e2; color:#dc2626; }
.dash-kpi-trend.neutral{ background:var(--hover-bg); color:var(--text-muted); }
[data-theme="dark"] .dash-kpi-trend.up   { background:rgba(22,163,74,.18); }
[data-theme="dark"] .dash-kpi-trend.down { background:rgba(220,38,38,.18); }
.dash-kpi-value { font-size:1.55rem; font-weight:800; color:var(--text-main); line-height:1; }
.dash-kpi-label { font-size:0.73rem; color:var(--text-muted); font-weight:500; }

/* Main grid layout */
.dash-main-grid { display:grid; grid-template-columns:3fr 2fr; gap:14px; margin-bottom:14px; }

/* Generic dash card */
.dash-card {
    background:var(--card-bg); border:1px solid var(--border); border-radius:var(--radius-lg);
    box-shadow:var(--shadow-sm); display:flex; flex-direction:column; overflow:hidden;
}
.dash-card-header {
    display:flex; align-items:center; justify-content:space-between;
    padding:14px 20px 12px; border-bottom:1px solid var(--border); flex-shrink:0;
}
.dash-card-title { font-size:0.875rem; font-weight:700; color:var(--text-main); display:flex; align-items:center; gap:8px; }
.dash-card-title i { width:15px; height:15px; color:var(--primary); flex-shrink:0; }
.dash-card-link {
    font-size:0.73rem; color:var(--primary); font-weight:600; text-decoration:none;
    display:flex; align-items:center; gap:3px; transition:opacity .15s;
}
.dash-card-link:hover { opacity:.7; }
.dash-card-link i { width:13px; height:13px; }
.dash-card-empty {
    flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center;
    gap:8px; padding:28px; color:var(--text-muted); font-size:0.85rem; text-align:center;
}
.dash-card-empty i { width:28px; height:28px; opacity:.3; }

/* OS list */
.dash-os-item {
    display:flex; align-items:center; gap:10px; padding:10px 20px;
    border-bottom:1px solid var(--border); transition:background .12s; cursor:pointer;
}
.dash-os-item:last-child { border-bottom:none; }
.dash-os-item:hover { background:var(--hover-bg); }
.dash-os-num {
    font-size:0.7rem; font-weight:700; color:var(--text-muted);
    background:var(--hover-bg); border:1px solid var(--border);
    border-radius:var(--radius-sm); padding:2px 6px; white-space:nowrap; flex-shrink:0;
}
.dash-os-info { flex:1; min-width:0; }
.dash-os-name { font-size:0.84rem; font-weight:600; color:var(--text-main); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.dash-os-desc { font-size:0.73rem; color:var(--text-muted); }
.dash-os-pill {
    font-size:0.68rem; font-weight:700; padding:2px 8px; border-radius:999px;
    white-space:nowrap; flex-shrink:0;
}
.dash-os-pill.aberto    { background:#fef9c3; color:#a16207; }
.dash-os-pill.andamento { background:#dbeafe; color:#1d4ed8; }
.dash-os-pill.concluida { background:#dcfce7; color:#15803d; }
.dash-os-pill.aguardando{ background:#f3e8ff; color:#7e22ce; }
.dash-os-pill.atrasada  { background:#fee2e2; color:#dc2626; }
[data-theme="dark"] .dash-os-pill.aberto    { background:#422006; color:#fde68a; }
[data-theme="dark"] .dash-os-pill.andamento { background:#1e3a5f; color:#93c5fd; }
[data-theme="dark"] .dash-os-pill.concluida { background:#14532d; color:#86efac; }
[data-theme="dark"] .dash-os-pill.aguardando{ background:#3b0764; color:#d8b4fe; }
[data-theme="dark"] .dash-os-pill.atrasada  { background:#450a0a; color:#fca5a5; }
.dash-os-val { font-size:0.82rem; font-weight:700; color:var(--text-main); white-space:nowrap; flex-shrink:0; }

/* Agenda */
.dash-agenda-item {
    display:flex; align-items:center; gap:10px; padding:10px 20px;
    border-bottom:1px solid var(--border); transition:background .12s;
}
.dash-agenda-item:last-child { border-bottom:none; }
.dash-agenda-item:hover { background:var(--hover-bg); }
.dash-agenda-time {
    font-size:0.73rem; font-weight:700; color:var(--primary);
    background:var(--primary-light); border-radius:var(--radius-sm);
    padding:3px 7px; white-space:nowrap; flex-shrink:0; min-width:48px; text-align:center;
}
.dash-agenda-dot { width:7px; height:7px; border-radius:50%; flex-shrink:0; }
.dash-agenda-info { flex:1; min-width:0; }
.dash-agenda-name { font-size:0.84rem; font-weight:600; color:var(--text-main); }
.dash-agenda-desc { font-size:0.73rem; color:var(--text-muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

/* Financial */
.dash-fin-body { padding:16px 20px; display:flex; flex-direction:column; gap:14px; }
.dash-fin-summary { display:grid; grid-template-columns:1fr 1fr 1fr; gap:10px; }
.dash-fin-stat { display:flex; flex-direction:column; gap:2px; }
.dash-fin-stat-val { font-size:1rem; font-weight:700; line-height:1.2; }
.dash-fin-stat-val.rec { color:#16a34a; }
.dash-fin-stat-val.des { color:#dc2626; }
.dash-fin-stat-val.sal { color:var(--primary); }
.dash-fin-stat-lbl { font-size:0.68rem; color:var(--text-muted); font-weight:500; }
.dash-fin-bars { display:flex; flex-direction:column; gap:10px; }
.dash-fin-bar-item { display:flex; flex-direction:column; gap:4px; }
.dash-fin-bar-meta { display:flex; justify-content:space-between; align-items:center; }
.dash-fin-bar-lbl { font-size:0.73rem; font-weight:600; color:var(--text-main); }
.dash-fin-bar-amt { font-size:0.7rem; color:var(--text-muted); }
.dash-fin-track { height:6px; background:var(--hover-bg); border-radius:999px; overflow:hidden; }
.dash-fin-fill { height:100%; border-radius:999px; transition:width .8s cubic-bezier(.4,0,.2,1); }
.dash-fin-fill.rec { background:#16a34a; }
.dash-fin-fill.des { background:#ef4444; }
.dash-chart-wrap { padding:0 20px 18px; }
.dash-chart-lbl { font-size:0.67rem; font-weight:700; text-transform:uppercase; letter-spacing:.06em; color:var(--text-muted); margin-bottom:10px; }
.dash-chart-mini { display:flex; align-items:flex-end; gap:5px; height:72px; }
.dash-chart-col { flex:1; display:flex; flex-direction:column; align-items:center; gap:3px; }
.dash-chart-bars-wrap { flex:1; width:100%; display:flex; align-items:flex-end; gap:1px; }
.dash-chart-bar-r { flex:1; background:#bbf7d0; border-radius:2px 2px 0 0; min-height:2px; }
.dash-chart-bar-d { flex:1; background:#fecaca; border-radius:2px 2px 0 0; min-height:2px; }
.dash-chart-month { font-size:0.6rem; color:var(--text-muted); font-weight:600; }
.dash-chart-legend { display:flex; gap:12px; margin-top:8px; }
.dash-chart-leg { display:flex; align-items:center; gap:5px; font-size:0.7rem; color:var(--text-muted); }
.dash-chart-leg-dot { width:10px; height:10px; border-radius:2px; }

/* Alerts */
.dash-alerta-item {
    display:flex; align-items:center; gap:12px; padding:11px 20px;
    border-bottom:1px solid var(--border); transition:background .12s; cursor:pointer;
}
.dash-alerta-item:last-child { border-bottom:none; }
.dash-alerta-item:hover { background:var(--hover-bg); }
.dash-alerta-icon {
    width:34px; height:34px; border-radius:var(--radius-md);
    display:flex; align-items:center; justify-content:center; flex-shrink:0;
}
.dash-alerta-icon i { width:16px; height:16px; }
.dash-alerta-icon.red   { background:#fee2e2; color:#dc2626; }
.dash-alerta-icon.amber { background:#fffbeb; color:#d97706; }
.dash-alerta-icon.blue  { background:#eff6ff; color:#2563eb; }
.dash-alerta-icon.green { background:#f0fdf4; color:#16a34a; }
[data-theme="dark"] .dash-alerta-icon.red   { background:rgba(220,38,38,.18); }
[data-theme="dark"] .dash-alerta-icon.amber { background:rgba(217,119,6,.18); }
[data-theme="dark"] .dash-alerta-icon.blue  { background:rgba(37,99,235,.18); }
[data-theme="dark"] .dash-alerta-icon.green { background:rgba(22,163,74,.18); }
.dash-alerta-info { flex:1; min-width:0; }
.dash-alerta-title { font-size:0.84rem; font-weight:600; color:var(--text-main); }
.dash-alerta-sub   { font-size:0.73rem; color:var(--text-muted); }
.dash-alerta-badge {
    font-size:0.68rem; font-weight:700; padding:2px 8px;
    border-radius:999px; white-space:nowrap; flex-shrink:0;
}
.dash-alerta-badge.red   { background:#fee2e2; color:#dc2626; }
.dash-alerta-badge.amber { background:#fffbeb; color:#d97706; }
.dash-alerta-badge.blue  { background:#eff6ff; color:#2563eb; }
.dash-alerta-badge.green { background:#dcfce7; color:#15803d; }
[data-theme="dark"] .dash-alerta-badge.red   { background:rgba(220,38,38,.18); color:#fca5a5; }
[data-theme="dark"] .dash-alerta-badge.amber { background:rgba(217,119,6,.18); color:#fcd34d; }
[data-theme="dark"] .dash-alerta-badge.blue  { background:rgba(37,99,235,.18); color:#93c5fd; }
[data-theme="dark"] .dash-alerta-badge.green { background:rgba(22,163,74,.18); color:#86efac; }

/* Dashboard responsive */
@media (max-width:1024px) {
    .dash-kpi-grid { grid-template-columns:repeat(2,1fr); }
    .dash-main-grid { grid-template-columns:1fr; }
}
@media (max-width:640px) {
    .dash-kpi-grid { grid-template-columns:repeat(2,1fr); gap:10px; }
    .dash-kpi-value { font-size:1.3rem; }
    .dash-fin-summary { grid-template-columns:1fr 1fr; }
}

/* ================= RESPONSIVIDADE DO APP SHELL ================= */

/* Telas médias (Ajusta margens do Header e Conteúdo) */
@media (max-width: 1024px) {
    .app-container {
        margin-left: 240px;
        width: calc(100% - 240px);
    }
    .sidebar {
        width: 240px;
    }
    .header {
        padding: 0 24px;
    }
    .main-content {
        padding: 32px 24px;
    }
}

/* Celular (Design Mobile-First / Sidebar Invisível) */
@media (max-width: 868px) {
    .app-container {
        margin-left: 0; /* Remove margem lateral no Mobile */
        width: 100%;
    }

    .sidebar {
        transform: translateX(-100%); /* Esconde sidebar fora da tela */
        box-shadow: none;
    }

    .sidebar.active {
        transform: translateX(0); /* Desliza para dentro da tela */
        box-shadow: 10px 0 30px rgba(15, 23, 42, 0.15);
    }

    .btn-close-sidebar {
        display: flex; /* Exibe fechar no menu mobile */
        align-items: center;
        justify-content: center;
    }

    .btn-menu-hamburger {
        display: flex; /* Exibe botão hamburger no Mobile */
        align-items: center;
        justify-content: center;
    }

    .header-search {
        display: none; /* Oculta a busca no header móvel para economizar espaço */
    }

    .user-info {
        display: none; /* Oculta o texto do usuário mantendo apenas avatar */
    }
    
    .header-right {
        gap: 12px;
    }

    .dash-mobile-os-btn {
        display: flex;
    }
}

/* ===================================================================   ESTILOS ESPECÍFICOS DO MÓDULO DE AGENDA - AGENDAPRO
   ========================================================================== */

/* Cabeçalho da Agenda (com botão alinhado) */
.agenda-header-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 32px;
    flex-wrap: wrap; /* Permite quebra de linha no Mobile */
}

.agenda-header-wrapper .content-header {
    margin-bottom: 0;
}

/* Ações do header da Agenda (busca + botão) */
.agenda-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.agenda-search-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--card-bg);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    padding: 8px 12px;
    width: 230px;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.agenda-search-wrap:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.08);
}
.agenda-search-icon {
    width: 15px;
    height: 15px;
    color: var(--text-muted);
    flex-shrink: 0;
}
.agenda-search-input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.875rem;
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    width: 100%;
}
.agenda-search-input::placeholder { color: var(--text-muted); }

/* Desktop: mostra a busca no header; Mobile: oculta e mostra dentro do conteúdo */
.agenda-search-desktop { display: flex; }
.agenda-search-mobile  { display: none; }

@media (max-width: 600px) {
    .agenda-header-actions  { flex-direction: column; align-items: stretch; }
    .agenda-search-wrap     { width: 100%; }
    .agenda-search-desktop  { display: none; }
    .agenda-search-mobile   { display: flex; width: 100%; margin-bottom: 12px; }
}

/* Botão de Ação Primária (+ Nova OS) */
.btn-action-primary {
    background-color: var(--primary);
    color: #ffffff;
    border: none;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.15);
    transition: all 0.2s ease;
}

.btn-action-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(37, 99, 235, 0.25);
}

.btn-action-primary svg {
    width: 18px;
    height: 18px;
}

/* Layout em Duas Colunas */
.agenda-layout-grid {
    display: grid;
    grid-template-columns: 320px 1fr; /* Coluna esquerda fixa de 320px (~30%), direita fluida */
    gap: 32px;
    align-items: start;
}

/* --- COLUNA ESQUERDA: CALENDÁRIO --- */
.calendar-card {
    padding: 20px;
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.current-month-year {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
}

.btn-cal-nav {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-cal-nav:hover {
    background-color: var(--background);
    color: var(--text-main);
    border-color: var(--border-hover);
}

.btn-cal-nav svg {
    width: 16px;
    height: 16px;
}

/* Grade do Calendário */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    text-align: center;
}

.cal-day-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-light);
    padding-bottom: 8px;
}

.cal-day {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-main);
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
    position: relative; /* necessário para posicionar o .cal-dot */
}

.cal-day:hover:not(.active-day) {
    background-color: var(--background);
}

/* Estados especiais dos dias */
.cal-day.prev-month,
.cal-day.next-month {
    color: var(--text-light);
    opacity: 0.5;
}

.cal-day.active-day {
    background-color: var(--primary);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}

/* Dia de hoje quando não está selecionado */
.cal-day.today {
    color: var(--primary);
    font-weight: 700;
}

/* Ponto indicador de serviços agendados no dia */
.cal-dot {
    position: absolute;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: transparent;
    transition: background 0.2s;
}

.cal-day.tem-servico .cal-dot {
    background: var(--primary);
}

/* Ponto branco quando o dia está selecionado (fundo azul) */
.cal-day.active-day.tem-servico .cal-dot {
    background: rgba(255, 255, 255, 0.85);
}

/* Estado vazio: nenhuma visita no dia selecionado */
.no-services-msg {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 56px 24px;
    color: var(--text-light);
    text-align: center;
}

.no-services-msg svg {
    width: 42px;
    height: 42px;
    opacity: 0.45;
}

.no-services-msg p {
    font-size: 0.9rem;
    font-weight: 500;
}

/* --- COLUNA DIREITA: COMPROMISSOS --- */
.appointments-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.appointments-section-header h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
}

.appointment-count {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    background-color: var(--background);
    padding: 4px 12px;
    border-radius: 50px;
    border: 1px solid var(--border);
}

/* Lista de Cartões de Visita */
.appointments-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.appointment-card {
    background-color: var(--p-card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    box-shadow: var(--shadow-md);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.appointment-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Horários */
.app-card-time {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
    width: 140px; /* Largura fixa no desktop para alinhamento */
    flex-shrink: 0;
}

.time-icon {
    width: 18px;
    height: 18px;
    color: var(--text-light);
}

/* Detalhes do Cliente/Serviço */
.app-card-details {
    flex: 1;
}

.client-name {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 4px;
}

.service-type {
    font-size: 0.88rem;
    color: var(--text-muted);
}

/* Status Badges */
.badge {
    font-size: 0.78rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.badge-pending {
    background-color: #fef3c7; /* Fundo Amarelo */
    color: #d97706; /* Texto Amarelo Escuro */
}

.badge-in-progress {
    background-color: #dbeafe; /* Fundo Azul */
    color: #2563eb; /* Texto Azul Escuro */
}

.badge-completed {
    background-color: #dcfce7; /* Fundo Verde */
    color: #16a34a; /* Texto Verde Escuro */
}

/* Bordas de Destaque Esquerda nos Cards (Opcional, dá um excelente acabamento visual) */
.appointment-card.border-pending {
    border-left: 4px solid #f59e0b;
}

.appointment-card.border-in-progress {
    border-left: 4px solid #3b82f6;
}

.appointment-card.border-completed {
    border-left: 4px solid #10b981;
}

/* Adaptação para Dark Mode das Badges */
[data-theme="dark"] .badge-pending {
    background-color: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
}

[data-theme="dark"] .badge-in-progress {
    background-color: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

[data-theme="dark"] .badge-completed {
    background-color: rgba(16, 185, 129, 0.15);
    color: #34d399;
}


/* ================= RESPONSIVIDADE DA AGENDA (MOBILE-FIRST) ================= */

/* Ajustes para Telas de Tablets e abaixo */
@media (max-width: 1024px) {
    .agenda-layout-grid {
        grid-template-columns: 1fr; /* Força empilhamento vertical das colunas */
        gap: 24px;
    }
    
    .agenda-left-col {
        max-width: 360px; /* Evita que o calendário fique excessivamente largo */
        width: 100%;
        margin: 0 auto; /* Centraliza o calendário */
    }
}

/* Ajustes para Celulares */
@media (max-width: 600px) {
    .agenda-header-wrapper {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-action-primary {
        justify-content: center; /* Centraliza o texto do botão móvel */
        width: 100%;
    }

    .appointment-card {
        flex-direction: column; /* Empilha dados do agendamento no celular */
        align-items: flex-start;
        gap: 12px;
        padding: 16px;
    }

    .app-card-time {
        width: 100%;
    }

    .app-card-status {
        align-self: flex-end; /* Coloca o badge no canto inferior direito */
    }
}

/* ════════════════════════════════════════════════════════════════
   AGENDA PRO — Toolbar, visões Dia/Semana/Mês e dossier
   (HORA_PX em agenda.js = 56px; manter sincronizado com o gradiente)
════════════════════════════════════════════════════════════════ */

/* ── Toolbar ── */
.agenda-toolbar {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; flex-wrap: wrap; margin-bottom: 14px;
}
.agenda-toolbar-sub { margin-bottom: 12px; }
.agenda-toolbar-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.agenda-view-switcher {
    display: inline-flex; gap: 3px; background: var(--background);
    border: 1px solid var(--border); border-radius: var(--radius-md); padding: 3px;
}
.agenda-view-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 14px; border: none; background: transparent;
    font-family: 'Inter', sans-serif; font-size: 0.82rem; font-weight: 500;
    color: var(--text-muted); cursor: pointer; border-radius: calc(var(--radius-md) - 2px);
    transition: background .15s, color .15s, box-shadow .15s;
}
.agenda-view-btn svg { width: 15px; height: 15px; }
.agenda-view-btn:hover { color: var(--text-main); }
.agenda-view-btn.active { background: var(--card-bg); color: var(--primary); font-weight: 600; box-shadow: 0 1px 4px rgba(0,0,0,0.1); }

.agenda-nav { display: inline-flex; align-items: center; gap: 6px; }
.agenda-today-btn {
    padding: 7px 14px; border: 1px solid var(--border); background: var(--card-bg);
    color: var(--text-main); font-family: 'Inter', sans-serif; font-size: 0.8rem; font-weight: 600;
    border-radius: var(--radius-sm); cursor: pointer; transition: all .15s;
}
.agenda-today-btn:hover { border-color: var(--primary); color: var(--primary); }
.agenda-date-label { font-size: 0.95rem; font-weight: 600; color: var(--text-main); text-transform: capitalize; }

.agenda-colorby { display: inline-flex; align-items: center; gap: 4px; }
.agenda-colorby-label { font-size: 0.74rem; color: var(--text-muted); margin-right: 2px; }
.agenda-colorby-btn {
    padding: 5px 10px; border: 1px solid var(--border); background: var(--card-bg);
    color: var(--text-muted); font-family: 'Inter', sans-serif; font-size: 0.74rem; font-weight: 600;
    border-radius: var(--radius-sm); cursor: pointer; transition: all .15s;
}
.agenda-colorby-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ── Grade Dia/Semana ── */
/* min-width:0 evita que a coluna 1fr "estoure" a página com muitos técnicos;
   assim o scroll horizontal fica contido em .agenda-day-wrap. */
.agenda-right-col { min-width: 0; }
.agenda-day-wrap { overflow-x: auto; scrollbar-width: thin; max-width: 100%; }
.agenda-grid-head {
    display: grid; position: sticky; top: 0; z-index: 5; background: var(--card-bg);
    border: 1px solid var(--border); border-bottom: none;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}
.agenda-grid-body {
    display: grid; position: relative; background: var(--card-bg);
    border: 1px solid var(--border); border-radius: 0 0 var(--radius-md) var(--radius-md);
}
.agenda-corner { border-right: 1px solid var(--border); }
.agenda-col-head {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 10px 6px; text-align: center; border-left: 1px solid var(--border);
}
.agenda-col-head-name { font-size: 0.82rem; font-weight: 600; color: var(--text-main); }
.agenda-col-head-meta { font-size: 0.68rem; color: var(--text-muted); }
.agenda-col-head .tecnico-avatar { width: 26px; height: 26px; font-size: 0.72rem; }

.agenda-time-col { position: relative; }
.agenda-time-cell { position: relative; }
.agenda-time-cell span {
    position: absolute; top: 2px; right: 7px; font-size: 0.66rem; color: var(--text-light);
    background: var(--card-bg); padding: 0 3px;
}
.agenda-col {
    position: relative; border-left: 1px solid var(--border); cursor: pointer;
    background-image: repeating-linear-gradient(
        to bottom,
        var(--border) 0, var(--border) 1px,
        transparent 1px, transparent 56px);
}
.agenda-col:hover { background-color: rgba(37,99,235,0.02); }

/* Eventos */
.agenda-event {
    position: absolute; border-radius: 6px; padding: 3px 7px; overflow: hidden;
    cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    transition: transform .12s, box-shadow .12s;
}
.agenda-event:hover { transform: translateY(-1px); box-shadow: 0 5px 14px rgba(0,0,0,0.16); z-index: 3; }
.agenda-event-time  { font-size: 0.63rem; font-weight: 600; color: var(--text-muted); }
.agenda-event-title { font-size: 0.76rem; font-weight: 600; color: var(--text-main); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agenda-event-sub   { font-size: 0.67rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agenda-event.is-concluido { opacity: 0.6; }
.agenda-event.is-cancelado { opacity: 0.5; }
.agenda-event.is-cancelado .agenda-event-title { text-decoration: line-through; }
.agenda-event.is-reaberta  { border-left-style: dashed !important; }

/* Linha do "agora" */
.agenda-now-line { position: absolute; left: 0; right: 0; height: 2px; background: #ef4444; z-index: 4; pointer-events: none; }
.agenda-now-line--day { left: 64px; }
.agenda-now-dot { position: absolute; left: -4px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: #ef4444; }

/* Cabeçalhos da semana */
.agenda-week-head { cursor: pointer; }
.agenda-week-head:hover { background: var(--background); }
.agenda-week-dow { font-size: 0.7rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; }
.agenda-week-num { font-size: 1rem; font-weight: 700; color: var(--text-main); }
.agenda-week-head.is-today .agenda-week-num { background: var(--primary); color: #fff; width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }

/* ── Grade Mês ── */
.agenda-month { border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; background: var(--card-bg); }
.agenda-month-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.agenda-month-names { border-bottom: 1px solid var(--border); }
.agenda-month-name { padding: 8px; text-align: center; font-size: 0.72rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; }
.agenda-month-cell { min-height: 104px; padding: 6px; border-top: 1px solid var(--border); border-left: 1px solid var(--border); display: flex; flex-direction: column; gap: 3px; cursor: pointer; transition: background .12s; }
.agenda-month-cell:nth-child(7n+1) { border-left: none; }
.agenda-month-cell.is-empty { background: var(--background); cursor: default; }
.agenda-month-cell:not(.is-empty):hover { background: rgba(37,99,235,0.04); }
.agenda-month-daynum { font-size: 0.78rem; font-weight: 600; color: var(--text-main); align-self: flex-end; }
.agenda-month-cell.is-today .agenda-month-daynum { background: var(--primary); color: #fff; width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.agenda-month-chip { font-size: 0.68rem; padding: 2px 6px; border-radius: 4px; color: var(--text-main); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.agenda-month-chip span { font-weight: 700; }
.agenda-month-more { font-size: 0.66rem; color: var(--text-muted); font-weight: 600; padding-left: 2px; }

/* ── Dossier de agendamento: campos específicos ── */
.ag-row-3 { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 10px; }
.ag-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }
.ag-btn-secondary, .ag-btn-danger {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 10px 16px; border-radius: var(--radius-md); font-family: 'Inter', sans-serif;
    font-size: 0.82rem; font-weight: 600; cursor: pointer; border: 1px solid var(--border);
    background: var(--card-bg); color: var(--text-main); transition: all .15s;
}
.ag-btn-secondary svg, .ag-btn-danger svg { width: 15px; height: 15px; }
.ag-btn-secondary:hover { border-color: var(--primary); color: var(--primary); }
.ag-btn-danger { color: #dc2626; border-color: #fecaca; background: #fef2f2; }
.ag-btn-danger:hover { background: #fee2e2; }
[data-theme="dark"] .ag-btn-danger { color: #fca5a5; border-color: #7f1d1d; background: rgba(127,29,29,0.2); }

/* ── Responsivo ── */
@media (max-width: 1024px) {
    .agenda-right-col .agenda-toolbar { gap: 8px; }
}
@media (max-width: 600px) {
    .agenda-view-btn span { display: none; }
    .agenda-view-btn { padding: 8px 12px; }
    .agenda-toolbar, .agenda-toolbar-sub { justify-content: flex-start; }
    .agenda-toolbar-right { width: 100%; }
    .agenda-search-wrap { flex: 1; }
    .ag-row-3 { grid-template-columns: 1fr; }
    .agenda-event-sub { display: none; }
}

/* ── Seção "Visitas / Agenda" no dossiê da OS (Etapa 6) ── */
.ag-os-wrap { display: flex; flex-direction: column; gap: 8px; padding: 6px 16px 14px; }
.btn-agendar-visita {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    padding: 10px 14px; border: 1px dashed var(--primary); border-radius: var(--radius-md);
    background: var(--primary-light); color: var(--primary);
    font-family: 'Inter', sans-serif; font-size: 0.84rem; font-weight: 600; cursor: pointer;
    transition: background .15s;
}
.btn-agendar-visita:hover { background: rgba(37,99,235,0.12); }
.btn-agendar-visita svg { width: 15px; height: 15px; }
.ag-os-empty { font-size: 0.82rem; color: var(--text-muted); text-align: center; padding: 8px 0 2px; }
.ag-os-row {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-md);
    cursor: pointer; transition: border-color .15s, background .15s;
}
.ag-os-row:hover { border-color: var(--primary); background: var(--background); }
.ag-os-row-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ag-os-row-date { display: flex; align-items: center; gap: 6px; font-size: 0.82rem; font-weight: 600; color: var(--text-main); }
.ag-os-row-tec  { display: flex; align-items: center; gap: 6px; font-size: 0.75rem; color: var(--text-muted); }
.ag-os-row-date svg, .ag-os-row-tec svg { width: 13px; height: 13px; flex-shrink: 0; }
.ag-os-row-tag { margin-left: 6px; font-size: 0.66rem; font-weight: 700; padding: 1px 7px; border-radius: 99px; background: #ede9fe; color: #7c3aed; }
[data-theme="dark"] .ag-os-row-tag { background: #2e1065; color: #c4b5fd; }
.ag-os-row-badge { flex-shrink: 0; font-size: 0.72rem; font-weight: 700; padding: 4px 10px; border-radius: 99px; white-space: nowrap; }

/* ── Foco visível (acessibilidade — Etapa 9.4) ── */
.agenda-event:focus-visible,
.agenda-month-chip:focus-visible,
.appointment-card:focus-visible,
.tecnico-chip:focus-visible,
.ag-os-row:focus-visible,
.agenda-view-btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ── Edição de itens da OS (add/remove) — Integração Parte 2 ── */
.os-item-rm {
    flex-shrink: 0; margin-left: 8px; width: 24px; height: 24px;
    border: none; background: transparent; color: var(--text-light);
    border-radius: var(--radius-sm); cursor: pointer; display: inline-flex;
    align-items: center; justify-content: center; transition: background .15s, color .15s;
}
.os-item-rm svg { width: 14px; height: 14px; }
.os-item-rm:hover { background: #fee2e2; color: #dc2626; }
[data-theme="dark"] .os-item-rm:hover { background: rgba(127,29,29,0.3); color: #fca5a5; }

.os-add-box { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border); display: flex; flex-direction: column; gap: 8px; }
.os-add-row { display: flex; gap: 8px; align-items: center; }
.os-add-input {
    flex: 1; min-width: 0; padding: 8px 10px; border: 1px solid var(--border);
    border-radius: var(--radius-sm); background: var(--input-bg); color: var(--text-main);
    font-family: 'Inter', sans-serif; font-size: 0.82rem;
}
.os-add-input:focus { outline: none; border-color: var(--primary); }
.os-add-qtd { width: 76px; flex-shrink: 0; padding: 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--input-bg); color: var(--text-main); font-family: 'Inter', sans-serif; font-size: 0.82rem; text-align: center; }
.os-add-btn {
    flex-shrink: 0; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
    padding: 8px 12px; border: 1px solid var(--primary); background: var(--primary-light);
    color: var(--primary); border-radius: var(--radius-sm); font-family: 'Inter', sans-serif;
    font-size: 0.8rem; font-weight: 600; cursor: pointer; transition: background .15s;
}
.os-add-btn svg { width: 14px; height: 14px; }
.os-add-btn:hover { background: rgba(37,99,235,0.12); }
@media (max-width: 600px) { .os-add-row { flex-wrap: wrap; } .os-add-input { flex-basis: 100%; } }

/* ===================================================================   ESTILOS ESPECÍFICOS DO MÓDULO DE CONFIGURAÇÕES - AGENDAPRO
   ========================================================================== */

.settings-section {
    margin-bottom: 40px;
}

.settings-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 12px;
}

.settings-section .section-description {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 24px;
}

/* Gerenciador de Tags */
.tags-manager-card {
    padding: 24px;
}

.tags-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.tags-count {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
}

/* Botão de Adicionar Tag desabilitado */
.btn-action-primary.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.btn-action-primary.disabled:hover {
    background-color: var(--primary);
    transform: none;
    box-shadow: none;
}

.tags-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tag-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    gap: 16px;
    transition: background-color 0.2s, border-color 0.2s;
}

.tag-item:hover {
    background-color: var(--app-bg);
    border-color: var(--border-hover);
}

.tag-name {
    flex: 1;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-main);
    outline: none;
}

.tag-name-input {
    flex: 1;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-main);
    background-color: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 6px 10px;
    outline: none;
    transition: all 0.2s ease;
}

.tag-name-input:focus {
    background-color: var(--card-bg);
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-light);
}

/* Visualização de cor estática para tags salvas */
.tag-color-preview {
    width: 30px;
    height: 30px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    display: inline-block;
}

.tag-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tag-color-input {
    width: 30px;
    height: 30px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: transparent;
    cursor: pointer;
    padding: 0;
    -webkit-appearance: none;
    appearance: none;
}

.tag-color-input::-webkit-color-swatch-wrapper {
    padding: 0;
}
.tag-color-input::-webkit-color-swatch {
    border: none;
    border-radius: var(--radius-sm);
}

.tag-color-input::-moz-color-swatch-wrapper {
    padding: 0;
}
.tag-color-input::-moz-color-swatch {
    border: none;
    border-radius: var(--radius-sm);
}

.btn-remove-tag {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-remove-tag:hover {
    color: var(--error);
    background-color: #fef2f2; /* Red Light */
}

.btn-remove-tag svg {
    width: 18px;
    height: 18px;
}

/* Responsividade para configurações */
@media (max-width: 600px) {
    .tags-header {
        flex-direction: column;
        align-items: stretch;
    }
    .tags-count {
        text-align: center;
    }
    .tag-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 16px;
    }
    .tag-name {
        margin-bottom: 12px;
    }
    .tag-actions {
        width: 100%;
        justify-content: flex-end; /* Alinha ações à direita no mobile */
    }
}


/* ===================================================================   ESTILOS ESPECÍFICOS DO MÓDULO DE ORDEM DE SERVIÇO - AGENDAPRO
   ========================================================================== */

/* Layout de Grade para os Cards */
.os-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-top: 8px;
}

.os-card-full {
    grid-column: 1 / -1; /* Ocupa a largura total da linha (Materiais e Custos) */
}

/* Estrutura interna dos Cards de OS */
.os-card {
    padding: 28px;
}

.os-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 12px;
}

.os-card-header h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
}

.os-card-icon {
    width: 22px;
    height: 22px;
    color: var(--primary);
}

.os-card-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Área de Textarea */
.input-group textarea {
    width: 100%;
    padding: 12px 14px;
    font-size: 0.95rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background-color: var(--input-bg);
    color: var(--text-main);
    outline: none;
    resize: vertical;
    transition: all 0.2s ease;
}

.input-group textarea:focus {
    background-color: var(--card-bg);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

/* --- TABELA DE MATERIAIS --- */
.table-container {
    width: 100%;
    overflow-x: auto;
}

.os-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
}

.os-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border);
}

.os-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

/* Inputs da Tabela */
.os-table input {
    width: 100%;
    padding: 8px 12px;
    font-size: 0.9rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background-color: var(--input-bg);
    color: var(--text-main);
    outline: none;
    transition: all 0.2s;
}

.os-table input:focus {
    border-color: var(--primary);
    background-color: var(--card-bg);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.08);
}

/* Botão de Excluir Linha */
.btn-delete-row {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-delete-row:hover {
    color: var(--error);
    background-color: #fef2f2;
}

.btn-delete-row svg {
    width: 18px;
    height: 18px;
}

/* Ações da Tabela (Adicionar Item) */
.table-actions {
    margin-top: 16px;
}

.btn-add-item {
    background-color: var(--background);
    color: var(--text-main);
    border: 1px dashed var(--border-hover);
    padding: 10px 16px;
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-add-item:hover {
    background-color: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
}

.btn-add-item svg {
    width: 16px;
    height: 16px;
}

/* Resumo de Custos */
.costs-summary-wrapper {
    display: flex;
    justify-content: flex-end;
    margin-top: 24px;
}

.costs-summary {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    max-width: 320px;
}

.total-summary-highlight {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--primary-light);
    padding: 16px 20px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(37, 99, 235, 0.15);
}

.total-label {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary);
}

.total-value {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--primary);
}

/* Rodapé de Ações do Formulário */
.form-actions-footer {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    margin-top: 32px;
}

/* Botões do Rodapé */
.btn-print {
    background-color: var(--background);
    color: var(--text-main);
    border: 1px solid var(--border);
    padding: 12px 20px;
    border-radius: var(--radius-md);
    font-size: 0.92rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-print:hover {
    background-color: var(--app-bg);
    border-color: var(--border-hover);
}

.btn-print svg {
    width: 18px;
    height: 18px;
}

.btn-submit-os {
    background-color: var(--primary);
    color: #ffffff;
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-size: 0.92rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.15);
    transition: all 0.2s;
}

.btn-submit-os:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(37, 99, 235, 0.25);
}

.btn-submit-os svg {
    width: 18px;
    height: 18px;
}


/* ===================================================================   ESTILOS DE IMPRESSÃO (Folha A4 Limpa e Otimizada)
   ========================================================================== */

@media print {
    /* Ocultar elementos desnecessários de navegação e ações de tela */
    .sidebar,
    .sidebar-overlay,
    .header,
    .no-print,
    .form-actions-footer,
    .table-actions,
    .btn-add-item,
    .btn-delete-row,
    .btn-cal-nav {
        display: none !important;
    }

    /* Container ocupa toda a largura sem barras laterais */
    .app-container {
        margin-left: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
    }

    /* Ajustar corpo da página */
    body {
        background-color: #ffffff !important;
        color: #000000 !important;
        min-height: auto !important;
        display: block !important;
    }

    .main-content {
        padding: 0 !important;
        margin: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    /* Modificar a Grade de OS para fluxo vertical fluído na impressão */
    .os-grid {
        display: flex;
        flex-direction: column;
        gap: 20px;
        margin-top: 16px;
    }

    /* Ajustar estilo dos Cards na impressão para parecer folha de papel física */
    .os-card {
        padding: 20px !important;
        background-color: #ffffff !important;
        border: 1px solid #cbd5e1 !important;
        box-shadow: none !important;
        border-radius: 8px !important;
        page-break-inside: avoid; /* Evita quebra de página no meio de um card */
    }

    .os-card-header {
        margin-bottom: 12px !important;
        padding-bottom: 8px !important;
        border-bottom: 2px solid #334155 !important;
    }

    .os-card-header h2 {
        color: #000000 !important;
        font-size: 1.1rem !important;
    }

    .os-card-icon {
        color: #000000 !important;
    }

    /* Formatação dos campos na impressão */
    .input-group label {
        color: #475569 !important;
        font-size: 0.8rem !important;
    }

    /* Ocultar bordas e preenchimento de inputs para documento limpo */
    .input-group input,
    .input-group textarea,
    .os-table input {
        border: none !important;
        background-color: transparent !important;
        color: #000000 !important;
        padding: 4px 0 !important;
        font-size: 0.95rem !important;
        font-weight: 500 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        resize: none !important;
        outline: none !important;
    }

    /* Adicionar um sutil sublinhado nos campos para escrita/leitura física */
    .input-group input,
    .input-group textarea {
        border-bottom: 1px dashed #94a3b8 !important;
    }

    /* Tabela de Materiais */
    .os-table {
        margin-top: 4px !important;
    }

    .os-table th {
        border-bottom: 2px solid #000000 !important;
        color: #000000 !important;
        font-weight: 700 !important;
        padding: 8px 12px !important;
    }

    .os-table td {
        border-bottom: 1px solid #e2e8f0 !important;
        padding: 8px 12px !important;
    }

    /* Sublinhado na descrição do item de material na impressão */
    .os-table input.item-desc {
        border-bottom: 1px dashed #94a3b8 !important;
    }

    .os-table input.item-qty,
    .os-table input.item-unit-price {
        text-align: left !important;
    }

    /* Destacar Resumo de Custos de forma limpa */
    .costs-summary-wrapper {
        margin-top: 16px !important;
    }

    .costs-summary {
        max-width: 280px !important;
    }

    .total-summary-highlight {
        background-color: #f1f5f9 !important;
        border: 1.5px solid #0f172a !important;
        color: #000000 !important;
        padding: 12px 16px !important;
    }

    .total-label {
        color: #000000 !important;
        font-weight: 700 !important;
    }

    .total-value {
        color: #000000 !important;
        font-weight: 800 !important;
        font-size: 1.25rem !important;
    }
}


/* ================= RESPONSIVIDADE ADICIONAL DA OS ================= */
@media (max-width: 900px) {
    .os-grid {
        grid-template-columns: 1fr; /* Empilha os cards no tablet/mobile */
        gap: 20px;
    }
}

@media (max-width: 600px) {
    .os-card {
        padding: 16px;
    }

    .form-actions-footer {
        flex-direction: column-reverse;
    }

    .btn-print,
    .btn-submit-os {
        width: 100%;
        justify-content: center;
    }
}


/* ===================================================================   ESTILOS DA PÁGINA DE LISTAGEM DE ORDENS DE SERVIÇO
   ========================================================================== */

/* --- Tabs --- */
.os-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--border);
    padding-bottom: 0;
}

.os-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-muted);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.os-tab svg {
    width: 18px;
    height: 18px;
}

.os-tab:hover {
    color: var(--text-main);
}

.os-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* --- Toolbar --- */
.os-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.os-search-expansible {
    position: relative;
    flex: 1;
    min-width: 200px;
    max-width: 400px;
    display: flex;
    align-items: center;
}

.os-search-icon {
    position: absolute;
    left: 14px;
    color: var(--text-light);
    width: 18px;
    height: 18px;
    pointer-events: none;
}

.os-search-field {
    width: 100%;
    padding: 10px 14px 10px 42px;
    font-size: 0.9rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background-color: var(--input-bg);
    color: var(--text-main);
    outline: none;
    transition: all 0.2s;
}

.os-search-field::placeholder {
    color: var(--text-light);
}

.os-search-field:focus {
    border-color: var(--primary);
    background-color: var(--card-bg);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

.os-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.btn-os-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-main);
    background-color: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-os-filter:hover {
    background-color: var(--background);
    border-color: var(--border-hover);
}

.btn-os-filter svg {
    width: 18px;
    height: 18px;
}

.btn-modo-estoque {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #0d9488;
    background-color: #f0fdfa;
    border: 1px solid #99f6e4;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}
.btn-modo-estoque:hover { background-color: #ccfbf1; border-color: #2dd4bf; }
.btn-modo-estoque.active { background-color: #0d9488; color: #fff; border-color: #0d9488; }
.btn-modo-estoque svg { width: 18px; height: 18px; }

/* --- Feed de Cards de OS --- */
.os-feed-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.os-feed-card {
    display: flex;
    align-items: stretch;
    background-color: var(--p-card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: transform 0.15s, box-shadow 0.15s;
    overflow: hidden;
}

.os-feed-card:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

/* Ponto de status lateral */
.os-feed-status {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    min-width: 56px;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-pending {
    background-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.status-in-progress {
    background-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.status-completed {
    background-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}

/* Conteúdo do card */
.os-feed-content {
    flex: 1;
    padding: 20px 24px;
    min-width: 0;
}

.os-feed-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 12px;
}

.os-feed-client {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 4px;
}

.os-feed-service {
    font-size: 0.88rem;
    color: var(--text-muted);
}

.os-feed-value {
    text-align: right;
    flex-shrink: 0;
}

.os-feed-value span {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
}

/* Meta信息 (Nº OS, Data, Badge) */
.os-feed-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 0.82rem;
    color: var(--text-light);
}

.os-feed-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.meta-icon {
    width: 14px;
    height: 14px;
}

/* --- Responsividade da Listagem --- */
@media (max-width: 900px) {
    .os-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .os-search-expansible {
        max-width: 100%;
    }

    .os-toolbar-actions {
        justify-content: space-between;
    }
}

@media (max-width: 600px) {
    .os-tabs {
        gap: 0;
    }

    .os-tab {
        padding: 10px 12px;
        font-size: 0.85rem;
    }

    .os-tab svg {
        display: none;
    }

    .os-feed-card {
        flex-direction: column;
    }

    .os-feed-status {
        padding: 12px 20px 0;
        justify-content: flex-start;
    }

    .os-feed-content {
        padding: 12px 20px 20px;
    }

    .os-feed-top {
        flex-direction: column;
        gap: 8px;
    }

    .os-feed-value {
        text-align: left;
    }

    .os-feed-meta {
        gap: 10px;
    }

    .os-toolbar-actions {
        flex-wrap: wrap;
    }

    .btn-os-filter {
        flex: 1;
        justify-content: center;
    }

    .filter-panel-grid {
        grid-template-columns: 1fr;
    }

    .os-chip {
        font-size: 0.8rem;
        padding: 6px 12px;
    }

    .os-status-chips {
        gap: 6px;
    }
}


/* --- Status Chips (Aba "OS por status") --- */
.os-status-chips {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.os-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    background-color: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.os-chip:hover {
    border-color: var(--border-hover);
    background-color: var(--background);
}

.os-chip.active {
    background-color: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

.os-chip.active .chip-dot {
    background-color: #ffffff;
}

.chip-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.chip-dot-pending {
    background-color: #f59e0b;
}

.chip-dot-in-progress {
    background-color: #3b82f6;
}

.chip-dot-completed {
    background-color: #22c55e;
}

.os-chip.active .chip-dot-pending,
.os-chip.active .chip-dot-in-progress,
.os-chip.active .chip-dot-completed {
    background-color: #ffffff;
}


/* --- Painel de Filtros --- */
.os-filter-panel {
    background-color: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-md);
}

.filter-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.filter-panel-header h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
}

.filter-panel-header h3 svg {
    width: 20px;
    height: 20px;
    color: var(--primary);
}

.btn-clear-filters {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.btn-clear-filters:hover {
    color: var(--error);
    background-color: #fef2f2;
}

.btn-clear-filters svg {
    width: 16px;
    height: 16px;
}

.filter-panel-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-group label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.filter-group select,
.filter-group input {
    padding: 10px 12px;
    font-size: 0.9rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background-color: var(--input-bg);
    color: var(--text-main);
    outline: none;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}

.filter-group select:focus,
.filter-group input:focus {
    border-color: var(--primary);
    background-color: var(--card-bg);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.08);
}

.filter-group select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='m6 9 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    padding-right: 36px;
    cursor: pointer;
}

/* Badge do contador de filtros */
.filter-count {
    background-color: #ffffff;
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}


/* --- Contador de Resultados --- */
.os-results-count {
    margin-bottom: 16px;
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 500;
}


/* --- Estado Vazio --- */
.os-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.os-empty-state .empty-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
    opacity: 0.4;
}

.os-empty-state h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.os-empty-state p {
    font-size: 0.9rem;
}


/* ===================================================================   ESTILOS DA PÁGINA NOVA OS (APLICATIVO MÓVEL / LISTAS E ACORDEÕES)
   ========================================================================== */

.nova-os-main {
    position: relative;
    padding-bottom: 0 !important;
}

/* --- Cabeçalho da OS --- */
.nova-os-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
}

.nova-os-header h1 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.5px;
    margin-bottom: 4px;
}

.os-number {
    color: var(--primary);
}

.nova-os-date {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.nova-os-date .meta-icon {
    width: 16px;
    height: 16px;
}

.btn-icon-edit {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background-color: var(--card-bg);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-icon-edit:hover {
    background-color: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}

.btn-icon-edit svg {
    width: 18px;
    height: 18px;
}


/* --- Inputs Principais --- */
.nova-os-inputs {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background-color: var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 24px;
}

.nova-os-input-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background-color: var(--card-bg);
}

.nova-os-input-icon {
    width: 20px;
    height: 20px;
    color: var(--text-light);
    flex-shrink: 0;
}

.nova-os-input {
    flex: 1;
    border: none;
    background: none;
    font-size: 0.95rem;
    color: var(--text-main);
    outline: none;
    font-family: 'Inter', sans-serif;
    padding: 0;
}

.nova-os-input::placeholder {
    color: var(--text-light);
}

.nova-os-input:focus {
    color: var(--text-main);
}

.nova-os-input-arrow {
    width: 20px;
    height: 20px;
    color: var(--text-light);
    flex-shrink: 0;
    cursor: pointer;
}


/* --- Acordeões --- */
.accordion-section {
    background-color: var(--card-bg);
    border-radius: var(--radius-lg);
    margin-bottom: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.accordion-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    background: none;
    border: none;
    cursor: pointer;
    transition: background-color 0.15s;
    font-family: 'Inter', sans-serif;
}

.accordion-header:hover {
    background-color: var(--background);
}

.accordion-header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.accordion-icon {
    width: 20px;
    height: 20px;
    color: var(--primary);
    flex-shrink: 0;
}

.accordion-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
}

.accordion-chevron {
    width: 20px;
    height: 20px;
    color: var(--text-light);
    transition: transform 0.25s ease;
    flex-shrink: 0;
}

/* Corpo do acordeão (colapsável) */
.accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}



/* --- Linhas dentro dos acordeões --- */
.accordion-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-top: 1px solid var(--border);
    transition: background-color 0.15s;
}

.accordion-row:hover {
    background-color: var(--background);
}

.accordion-row-left {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 0.92rem;
    color: var(--text-main);
    font-weight: 500;
}

.accordion-row-icon {
    width: 20px;
    height: 20px;
    color: var(--text-light);
    flex-shrink: 0;
}

.accordion-row-text-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.accordion-row-subtitle {
    font-size: 0.78rem;
    color: var(--text-light);
    font-weight: 400;
}

.accordion-row-arrow {
    width: 20px;
    height: 20px;
    color: var(--text-light);
    flex-shrink: 0;
}

/* Botão circular de adicionar */
.btn-circle-add {
    width: 34px;
    height: 34px;
    min-width: 34px;
    border-radius: 50%;
    border: none;
    background-color: var(--primary);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

.btn-circle-add:hover {
    background-color: var(--primary-hover);
    transform: scale(1.08);
}

.btn-circle-add svg {
    width: 18px;
    height: 18px;
}


/* --- Barra de Total dentro de "Itens da OS" --- */
.accordion-total-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    background-color: var(--background);
    border-top: 1px solid var(--border);
    font-weight: 600;
}

.total-bar-label {
    font-size: 0.92rem;
    color: var(--text-main);
}

.total-bar-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
}


/* --- Rodapé Fixo --- */
.nova-os-spacer {
    height: 100px;
}

.nova-os-footer {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 20px;
    background-color: var(--card-bg);
    border-top: 1px solid var(--border);
    z-index: 10;
    display: flex;
    justify-content: flex-end;
}

.btn-save-os {
    width: auto;
    padding: 10px 24px;
    border: none;
    border-radius: var(--radius-md);
    background-color: var(--primary);
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
    transition: all 0.2s;
}

.btn-save-os:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35);
}

.btn-save-os:active {
    transform: translateY(0);
}

.btn-save-os svg {
    width: 20px;
    height: 20px;
}


/* --- Responsividade da Nova OS --- */
@media (max-width: 600px) {
    .nova-os-header h1 {
        font-size: 1.35rem;
    }

    .nova-os-inputs {
        border-radius: var(--radius-md);
    }

    .accordion-section {
        border-radius: var(--radius-md);
    }

    .nova-os-footer {
        padding: 12px 16px;
    }
    .btn-save-os {
        width: 100%;
        padding: 14px;
    }
}

/* =====================================================   CLIENTES — clientes.html
============================================================ */
        /* ─────────────────────────────────────────────
           STATS STRIP  (clientes, estoque, OS)
        ───────────────────────────────────────────── */
        .stats-strip,
        .clientes-stats-strip {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
            background: var(--card-bg);
            border: 1px solid var(--border);
            border-radius: var(--radius-lg);
            overflow: hidden;
            margin: 10px 0 28px;
            box-shadow: var(--shadow-sm);
        }
        .stat-item {
            padding: 20px 24px;
            display: flex;
            flex-direction: row;
            align-items: center;
            gap: 14px;
            border-left: 1px solid var(--border);
            transition: background 0.15s;
        }
        .stat-item:hover { background: var(--hover-bg); }
        .stat-item:first-child { border-left: none; }
        .stat-icon {
            width: 22px;
            height: 22px;
            color: var(--primary);
            opacity: 0.8;
            flex-shrink: 0;
        }
        .stat-icon.green  { color: #16a34a; }
        .stat-icon.amber  { color: #d97706; }
        .stat-icon.red    { color: #dc2626; }
        .stat-icon.violet { color: #7c3aed; }
        .stat-icon.gray   { color: var(--text-muted); }
        .stat-item-text {
            display: flex;
            flex-direction: column;
            gap: 2px;
        }
        .stat-value {
            font-size: 1.35rem;
            font-weight: 700;
            color: var(--text-main);
            line-height: 1;
        }
        .stat-label {
            font-size: 0.7rem;
            font-weight: 500;
            color: var(--text-muted);
            line-height: 1.3;
            white-space: nowrap;
        }

        /* ─────────────────────────────────────────────
           AVATAR COLOR PALETTE  (data-color="0..7")
        ───────────────────────────────────────────── */
        [data-color="0"] { --av-bg:#dbeafe; --av-text:#1d4ed8; }
        [data-color="1"] { --av-bg:#ede9fe; --av-text:#7c3aed; }
        [data-color="2"] { --av-bg:#d1fae5; --av-text:#065f46; }
        [data-color="3"] { --av-bg:#fef9c3; --av-text:#854d0e; }
        [data-color="4"] { --av-bg:#fce7f3; --av-text:#be185d; }
        [data-color="5"] { --av-bg:#ccfbf1; --av-text:#0f766e; }
        [data-color="6"] { --av-bg:#ffedd5; --av-text:#c2410c; }
        [data-color="7"] { --av-bg:#e0e7ff; --av-text:#3730a3; }
        [data-theme="dark"] [data-color="0"] { --av-bg:#1e3a5f; --av-text:#93c5fd; }
        [data-theme="dark"] [data-color="1"] { --av-bg:#2e1065; --av-text:#c4b5fd; }
        [data-theme="dark"] [data-color="2"] { --av-bg:#064e3b; --av-text:#6ee7b7; }
        [data-theme="dark"] [data-color="3"] { --av-bg:#431407; --av-text:#fde68a; }
        [data-theme="dark"] [data-color="4"] { --av-bg:#500724; --av-text:#f9a8d4; }
        [data-theme="dark"] [data-color="5"] { --av-bg:#042f2e; --av-text:#5eead4; }
        [data-theme="dark"] [data-color="6"] { --av-bg:#431407; --av-text:#fdba74; }
        [data-theme="dark"] [data-color="7"] { --av-bg:#1e1b4b; --av-text:#a5b4fc; }

        /* ─────────────────────────────────────────────
           CARDS DA LISTA DE CLIENTES
        ───────────────────────────────────────────── */
        .clientes-feed {
            display: flex;
            flex-direction: column;
            gap: 6px;
        }

        .cliente-feed-card {
            display: flex;
            align-items: center;
            gap: 14px;
            padding: 14px 18px;
            background: var(--p-card-bg);
            border: 1px solid var(--border);
            border-radius: var(--radius-lg);
            cursor: pointer;
            transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
        }

        .cliente-feed-card:hover {
            transform: translateY(-1px);
            box-shadow: var(--shadow-lg);
            border-color: var(--primary);
        }

        .cliente-avatar {
            width: 46px;
            height: 46px;
            border-radius: 50%;
            background: var(--av-bg, var(--primary-light));
            color: var(--av-text, var(--primary));
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.875rem;
            font-weight: 700;
            flex-shrink: 0;
        }

        .cliente-feed-info {
            flex: 1;
            min-width: 0;
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .cliente-feed-top-row {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .cliente-feed-nome {
            font-size: 0.95rem;
            font-weight: 600;
            color: var(--text-main);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .cliente-type-badge {
            font-size: 0.65rem;
            font-weight: 700;
            padding: 2px 7px;
            border-radius: 20px;
            background: var(--primary-light);
            color: var(--primary);
            flex-shrink: 0;
            letter-spacing: 0.05em;
        }

        .cliente-type-badge.pj {
            background: #fef9c3;
            color: #854d0e;
        }

        [data-theme="dark"] .cliente-type-badge.pj {
            background: #422006;
            color: #fde047;
        }

        .cliente-feed-contacts {
            display: flex;
            align-items: center;
            gap: 6px;
            flex-wrap: wrap;
        }

        .cliente-feed-detalhe {
            font-size: 0.8rem;
            color: var(--text-muted);
            display: flex;
            align-items: center;
            gap: 4px;
        }

        .cliente-contact-dot {
            color: var(--border);
            font-size: 0.75rem;
            line-height: 1;
            flex-shrink: 0;
        }

        .cliente-contact-email {
            font-size: 0.8rem;
            color: var(--text-muted);
            display: flex;
            align-items: center;
            gap: 4px;
            min-width: 0;
            overflow: hidden;
        }

        .cliente-feed-detalhe svg,
        .cliente-contact-email svg { width: 12px; height: 12px; flex-shrink: 0; }

        .cliente-origin-chip {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            font-size: 0.7rem;
            font-weight: 500;
            color: var(--text-light);
            background: var(--app-bg);
            border: 1px solid var(--border);
            border-radius: 20px;
            padding: 2px 9px;
            align-self: flex-start;
        }

        .cliente-origin-chip svg { width: 11px; height: 11px; flex-shrink: 0; }

        .cliente-feed-arrow { color: var(--text-light); width: 16px; height: 16px; flex-shrink: 0; }

        /* ─────────────────────────────────────────────
           BASE DOS MODAIS (LAYER 1 — z:1000)
        ───────────────────────────────────────────── */
        .modal-overlay {
            display: none;
            position: fixed;
            inset: 0;
            z-index: 1000;
            background: rgba(0,0,0,0.45);
            align-items: center;
            justify-content: center;
            padding: 16px;
            box-sizing: border-box;
        }
        .modal-overlay.active { display: flex; }

        .modal-sheet {
            background: var(--card-bg);
            width: 100%;
            max-width: 480px;
            max-height: 90vh;
            border-radius: 20px;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            box-shadow: 0 24px 64px rgba(0,0,0,0.22);
            animation: modalFadeIn 0.2s ease;
        }

        @keyframes modalFadeIn {
            from { opacity:0; transform: scale(0.96) translateY(10px); }
            to   { opacity:1; transform: scale(1)    translateY(0);    }
        }

        @media (max-width: 540px) {
            .modal-overlay { align-items: flex-end; padding: 0; }
            .modal-sheet {
                border-radius: 20px 20px 0 0;
                max-width: 100%;
                max-height: 95vh;
                animation: modalSlideUp 0.25s ease;
            }
            @keyframes modalSlideUp {
                from { transform: translateY(40px); opacity:0; }
                to   { transform: translateY(0);    opacity:1; }
            }
        }

        .modal-header {
            display: flex;
            align-items: center;
            padding: 16px 20px;
            border-bottom: 1px solid var(--border);
            flex-shrink: 0;
        }
        .modal-close-btn {
            background: none; border: none; cursor: pointer;
            color: var(--text-muted); display: flex; align-items: center;
            padding: 4px; border-radius: 8px; transition: background 0.15s;
        }
        .modal-close-btn:hover { background: var(--border); }
        .modal-title {
            flex: 1; text-align: center;
            font-size: 1rem; font-weight: 600; color: var(--text-main);
        }
        .modal-header-spacer { width: 28px; }

        .modal-body {
            padding: 20px;
            display: flex;
            flex-direction: column;
            gap: 14px;
            overflow-y: auto;
            flex: 1;
        }
        .modal-footer {
            padding: 16px 20px;
            border-top: 1px solid var(--border);
            flex-shrink: 0;
            background: var(--card-bg);
        }

        .modal-field { display: flex; flex-direction: column; gap: 6px; }
        .modal-field label { font-size: 0.8rem; font-weight: 500; color: var(--text-muted); }
        .modal-input {
            width: 100%; padding: 10px 14px;
            border: 1px solid var(--border); border-radius: var(--radius-md);
            font-size: 0.9rem; color: var(--text-main);
            background: var(--input-bg); outline: none;
            transition: border-color 0.15s; font-family: inherit;
        }
        .modal-input:focus { border-color: var(--primary); }
        .modal-textarea { min-height: 90px; resize: vertical; }

        .btn-modal-save {
            width: 100%; padding: 14px; background: var(--primary);
            color: #fff; border: none; border-radius: var(--radius-md);
            font-size: 0.95rem; font-weight: 600; cursor: pointer;
            transition: background 0.15s; font-family: inherit;
        }
        .btn-modal-save:hover { background: var(--primary-hover); }

        /* Tabs do filtro */
        .modal-tabs { display: flex; border-bottom: 1px solid var(--border); flex-shrink: 0; }
        .modal-tab {
            flex: 1; background: none; border: none;
            border-bottom: 2px solid transparent; padding: 12px;
            font-size: 0.875rem; font-weight: 500; color: var(--text-muted);
            cursor: pointer; transition: color 0.15s, border-color 0.15s;
            margin-bottom: -1px; font-family: inherit;
        }
        .modal-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
        .modal-tab-content { display: none; flex-direction: column; overflow: hidden; }
        .modal-tab-content.active { display: flex; }

        /* Listas do filtro */
        .filter-nav-list { display: flex; flex-direction: column; }
        .filter-nav-item {
            display: flex; align-items: center; justify-content: space-between;
            padding: 16px 20px; border-bottom: 1px solid var(--border);
            cursor: pointer; transition: background 0.1s;
        }
        .filter-nav-item:last-child { border-bottom: none; }
        .filter-nav-item:hover { background: var(--primary-light); }
        .filter-nav-item span { font-size: 0.9rem; color: var(--text-main); }
        .filter-nav-item svg { color: var(--text-light); width: 16px; height: 16px; }

        .radio-list { display: flex; flex-direction: column; padding: 8px 0; }
        .radio-item {
            display: flex; align-items: center; gap: 14px;
            padding: 14px 20px; cursor: pointer; transition: background 0.1s;
        }
        .radio-item:hover { background: var(--primary-light); }
        .radio-item input[type="radio"] { width:18px; height:18px; accent-color: var(--primary); cursor:pointer; flex-shrink:0; }
        .radio-item span { font-size: 0.9rem; color: var(--text-main); }

        .filter-details-hint { font-size:0.82rem; color: var(--text-muted); padding: 14px 20px 0; line-height:1.5; }
        .checkbox-list { display: flex; flex-direction: column; padding: 4px 0; }
        .checkbox-item {
            display: flex; align-items: center; gap: 14px;
            padding: 13px 20px; cursor: pointer; transition: background 0.1s;
        }
        .checkbox-item:hover { background: var(--primary-light); }
        .checkbox-item input[type="checkbox"] { width:18px; height:18px; accent-color: var(--primary); cursor:pointer; flex-shrink:0; }
        .checkbox-item span { font-size:0.9rem; color: var(--text-main); }

        .modal-footer-split {
            display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
            padding: 16px 20px; border-top: 1px solid var(--border);
            flex-shrink: 0; background: var(--card-bg);
        }
        .btn-footer-outline {
            padding: 12px; background: transparent; border: 1.5px solid var(--border);
            border-radius: var(--radius-md); font-size:0.9rem; font-weight:500;
            color: var(--text-muted); cursor:pointer; font-family:inherit;
            transition: border-color 0.15s, color 0.15s;
        }
        .btn-footer-outline:hover { border-color: var(--text-main); color: var(--text-main); }
        .btn-footer-solid {
            padding: 12px; background: var(--primary); border: none;
            border-radius: var(--radius-md); font-size:0.9rem; font-weight:600;
            color:#fff; cursor:pointer; font-family:inherit; transition: background 0.15s;
        }
        .btn-footer-solid:hover { background: var(--primary-hover); }

        /* Acordeões do Novo Cliente */
        .nc-accordion { border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; }
        .nc-accordion-header {
            width:100%; display:flex; align-items:center; justify-content:space-between;
            padding: 14px 16px; background: var(--input-bg); border:none; cursor:pointer;
            font-family:inherit; font-size:0.9rem; font-weight:600; color: var(--text-main);
            transition: background 0.15s;
        }
        .nc-accordion-header:hover { background: var(--border); }
        .nc-acc-chevron { color: var(--text-muted); transition: transform 0.2s; flex-shrink:0; width:18px; height:18px; }
        .nc-accordion.open .nc-acc-chevron { transform: rotate(180deg); }
        .nc-accordion-body { max-height:0; overflow:hidden; transition: max-height 0.28s ease; }
        .nc-accordion-inner { display:flex; flex-direction:column; gap:14px; padding:16px; border-top: 1px solid var(--border); }
        .tipo-radio-group { display:flex; flex-direction:column; gap:10px; }
        .tipo-radio-item { display:flex; align-items:center; gap:10px; cursor:pointer; }
        .tipo-radio-item input[type="radio"] { width:17px; height:17px; accent-color: var(--primary); cursor:pointer; }
        .tipo-radio-item span { font-size:0.9rem; color: var(--text-main); }
        .nc-row-action { display:flex; align-items:center; justify-content:space-between; }
        .nc-row-label { font-size:0.9rem; color: var(--text-main); }
        .nc-row-split { display:grid; grid-template-columns:1fr 1fr; gap:12px; }

        /* Btn circle leve (novo cliente) */
        .btn-nc-add {
            width:32px; height:32px; border-radius:50%; border: 1.5px solid var(--border);
            background: var(--card-bg); color: var(--text-muted);
            display:flex; align-items:center; justify-content:center;
            cursor:pointer; transition: border-color 0.15s, background 0.15s, color 0.15s;
        }
        .btn-nc-add:hover { border-color: var(--primary); background: var(--primary-light); color: var(--primary); }
        .btn-nc-add svg { width:16px; height:16px; }

        /* ─────────────────────────────────────────────
           DOSSIÊ DO CLIENTE — ocupa apenas a área do
           app-container (respeita sidebar e header)
        ───────────────────────────────────────────── */
        .dossier-overlay {
            display: none;
            position: fixed;
            top: var(--header-height);
            left: 260px;     /* largura do .sidebar (desktop) */
            right: 0;
            bottom: 0;
            z-index: 500;
            background: var(--app-bg);
            flex-direction: column;
            overflow: hidden;
        }
        .dossier-overlay.active { display: flex; }

        /* Tela média — sidebar encolhe para 240px */
        @media (max-width: 1024px) {
            .dossier-overlay { left: 240px; }
        }

        /* Mobile — sidebar some, header mantém 70px */
        @media (max-width: 868px) {
            .dossier-overlay { left: 0; }
        }

        /* Cabeçalho do dossiê */
        .dossier-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 16px;
            height: 58px;
            min-height: 58px;
            background: var(--card-bg);
            border-bottom: 1px solid var(--border);
            flex-shrink: 0;
        }

        .dossier-icon-btn {
            width: 38px; height: 38px; border-radius: 50%;
            background: none; border: none; cursor: pointer;
            color: var(--text-muted); display: flex; align-items: center;
            justify-content: center; transition: background 0.15s, color 0.15s;
        }
        .dossier-icon-btn:hover { background: var(--app-bg); color: var(--text-main); }
        .dossier-icon-btn svg { width: 20px; height: 20px; }

        .dossier-header-title {
            font-size: 1rem; font-weight: 600; color: var(--text-main);
            flex: 1; text-align: center;
            white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
            padding: 0 8px;
        }

        /* Corpo scrollável */
        .dossier-overlay .dossier-body {
            flex: 1;
            min-height: 0;
            overflow-y: auto;
            padding: 40px 11% 48px;
            display: flex;
            flex-direction: column;
            gap: 0;
            box-sizing: border-box;
        }
        .dossier-overlay .dossier-body > * { flex-shrink: 0; }

        /* Perfil topo */
        .dossier-profile {
            display: flex;
            align-items: center;
            gap: 16px;
            padding: 4px 0 24px;
        }

        .dossier-avatar-lg {
            width: 64px; height: 64px; border-radius: 50%;
            background: var(--av-bg, var(--primary-light)); color: var(--av-text, var(--primary));
            display: flex; align-items: center; justify-content: center;
            font-size: 1.35rem; font-weight: 700; flex-shrink: 0;
        }

        .dossier-profile-info { display: flex; flex-direction: column; gap: 4px; }

        .dossier-profile-name {
            font-size: 1.2rem; font-weight: 700; color: var(--text-main); line-height: 1.2;
        }

        .dossier-profile-sub { font-size: 0.85rem; color: var(--text-muted); }

        /* Info rows (modo leitura) */
        .info-row {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 12px;
            padding: 11px 0;
            border-bottom: 1px solid var(--border);
        }
        .info-row:last-child { border-bottom: none; }
        .info-label { font-size: 0.8rem; color: var(--text-muted); flex-shrink: 0; min-width: 90px; padding-top: 1px; }
        .info-value { font-size: 0.88rem; font-weight: 500; color: var(--text-main); text-align: right; }
        .info-divider { height: 1px; background: var(--border); margin: 4px 0; }
        .info-detalhes-block { padding: 12px 0 4px; }
        .info-detalhes-label { font-size: 0.78rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 6px; display: block; }
        .info-detalhes-text { font-size: 0.87rem; color: var(--text-main); line-height: 1.6; }
        .dossier-tag-chip {
            display: inline-flex; align-items: center; gap: 5px;
            background: #ede9fe; color: #7c3aed; border-radius: 20px;
            padding: 3px 10px 3px 7px; font-size: 0.78rem; font-weight: 600;
        }
        .dossier-tag-chip svg { width: 13px; height: 13px; }

        /* Linhas de pagamento */
        .pay-row {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 12px 0;
            border-bottom: 1px solid var(--border);
        }
        .pay-row:last-child { border-bottom: none; }

        .pay-dot {
            width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
        }
        .pay-dot-green  { background: #22c55e; }
        .pay-dot-yellow { background: #f59e0b; }
        .pay-dot-red    { background: #ef4444; }

        .pay-info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
        .pay-desc { font-size: 0.88rem; font-weight: 500; color: var(--text-main); }
        .pay-date { font-size: 0.78rem; color: var(--text-muted); }
        .pay-val { font-size: 0.9rem; font-weight: 700; color: var(--text-main); flex-shrink: 0; }

        /* Atalhos (grade 3 colunas) */
        .shortcut-section { margin-top: 20px; }

        .shortcut-label {
            font-size: 0.72rem; font-weight: 700;
            color: var(--text-muted); text-transform: uppercase;
            letter-spacing: 0.07em; margin-bottom: 12px;
            display: block;
        }

        .shortcut-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 10px;
        }

        @media (max-width: 500px) {
            .shortcut-grid { grid-template-columns: repeat(2, 1fr); }
        }

        .shortcut-card {
            display: flex; flex-direction: column;
            align-items: center; justify-content: center;
            gap: 10px; padding: 18px 10px;
            background: var(--card-bg);
            border: 1px solid var(--border);
            border-radius: var(--radius-lg);
            cursor: pointer; font-family: inherit;
            transition: border-color 0.15s, background 0.15s, transform 0.1s;
            text-align: center;
        }
        .shortcut-card:hover {
            border-color: var(--primary);
            background: var(--primary-light);
            transform: translateY(-1px);
        }
        .shortcut-card svg { width: 22px; height: 22px; color: var(--primary); }
        .shortcut-card span { font-size: 0.78rem; font-weight: 600; color: var(--text-main); line-height: 1.3; }

        /* Rodapé do dossiê */
        .dossier-footer {
            padding: 12px 20px;
            border-top: 1px solid var(--border);
            background: var(--card-bg);
            flex-shrink: 0;
            display: flex;
            justify-content: flex-end;
        }

        .btn-dossier-primary {
            width: auto; padding: 8px 18px;
            background: var(--primary); color: #fff;
            border: none; border-radius: var(--radius-md);
            font-size: 0.875rem; font-weight: 600;
            cursor: pointer; font-family: inherit;
            display: flex; align-items: center; justify-content: center; gap: 7px;
            transition: background 0.15s, transform 0.1s;
        }
        .btn-dossier-primary:hover { background: var(--primary-hover); transform: translateY(-1px); }
        .btn-dossier-primary svg { width: 18px; height: 18px; }

        /* ─────────────────────────────────────────────
           ACTION SHEETS (LAYER z:1000 — sobre o dossiê)
        ───────────────────────────────────────────── */
        .sheet-overlay {
            display: none;
            position: fixed;
            inset: 0;
            z-index: 1000;
            background: rgba(0,0,0,0.5);
            align-items: flex-end;
        }
        .sheet-overlay.active { display: flex; }

        .action-sheet {
            background: var(--card-bg);
            width: 100%;
            max-height: 88vh;
            border-radius: 20px 20px 0 0;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            animation: sheetUp 0.25s ease;
        }
        @keyframes sheetUp {
            from { transform: translateY(50px); opacity: 0; }
            to   { transform: translateY(0);    opacity: 1; }
        }

        @media (min-width: 769px) {
            .sheet-overlay {
                align-items: center;
                justify-content: center;
                padding: 24px;
            }
            .action-sheet {
                max-width: 520px;
                border-radius: 16px;
                animation: modalFadeIn 0.2s ease;
            }
        }

        .sheet-handle {
            width: 40px; height: 4px;
            background: var(--border); border-radius: 4px;
            margin: 12px auto 0; flex-shrink: 0;
        }

        /* Campo com botão + inline */
        .field-with-btn {
            display: flex; align-items: stretch;
            border: 1px solid var(--border); border-radius: var(--radius-md);
            background: var(--input-bg); overflow: hidden;
        }
        .field-with-btn-text {
            flex: 1; padding: 10px 14px;
            font-size: 0.9rem; color: var(--text-light);
            display: flex; align-items: center;
        }
        .field-add-btn {
            padding: 0 14px; background: none; border: none;
            border-left: 1px solid var(--border);
            color: var(--text-muted); cursor: pointer;
            display: flex; align-items: center;
            transition: background 0.15s, color 0.15s;
        }
        .field-add-btn:hover { background: var(--primary-light); color: var(--primary); }
        .field-add-btn svg { width: 16px; height: 16px; }

        /* Campo de navegação > */
        .field-nav-row {
            display: flex; align-items: center; justify-content: space-between;
            padding: 10px 14px;
            border: 1px solid var(--border); border-radius: var(--radius-md);
            background: var(--input-bg); cursor: pointer;
            transition: border-color 0.15s;
        }
        .field-nav-row:hover { border-color: var(--primary); }
        .field-nav-row-info { display: flex; flex-direction: column; gap: 1px; }
        .field-nav-lbl { font-size: 0.75rem; color: var(--text-muted); }
        .field-nav-val { font-size: 0.9rem; font-weight: 500; color: var(--text-main); }
        .field-nav-row svg { color: var(--text-light); width: 16px; height: 16px; flex-shrink: 0; }

/* =====================================================   NOVA_OS — nova_os.html
============================================================ */
        /* ===== MODAIS ===== */
        .modal-overlay {
            display: none;
            position: fixed;
            inset: 0;
            z-index: 1000;
            background: rgba(0, 0, 0, 0.45);
            align-items: center;
            justify-content: center;
            padding: 16px;
            box-sizing: border-box;
        }
        .modal-overlay.active {
            display: flex;
        }
        .modal-sheet {
            background: var(--card-bg);
            width: 100%;
            max-width: 480px;
            max-height: 90vh;
            border-radius: 20px;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            box-shadow: 0 24px 64px rgba(0, 0, 0, 0.22);
            animation: modalFadeIn 0.2s ease;
        }
        @keyframes modalFadeIn {
            from { opacity: 0; transform: scale(0.96) translateY(10px); }
            to   { opacity: 1; transform: scale(1)    translateY(0);    }
        }
        /* Mobile: bottom sheet */
        @media (max-width: 540px) {
            .modal-overlay {
                align-items: flex-end;
                padding: 0;
            }
            .modal-sheet {
                border-radius: 20px 20px 0 0;
                max-width: 100%;
                max-height: 95vh;
                animation: modalSlideUp 0.25s ease;
            }
            @keyframes modalSlideUp {
                from { transform: translateY(40px); opacity: 0; }
                to   { transform: translateY(0);    opacity: 1; }
            }
        }

        /* Header */
        .modal-header {
            display: flex;
            align-items: center;
            padding: 16px 20px;
            border-bottom: 1px solid var(--border);
            flex-shrink: 0;
        }
        .modal-close-btn {
            background: none;
            border: none;
            cursor: pointer;
            color: var(--text-muted);
            display: flex;
            align-items: center;
            padding: 4px;
            border-radius: 8px;
            transition: background 0.15s;
        }
        .modal-close-btn:hover { background: var(--border); }
        .modal-title {
            flex: 1;
            text-align: center;
            font-size: 1rem;
            font-weight: 600;
            color: var(--text-main);
        }
        .modal-header-spacer { width: 28px; }

        /* Tabs */
        .modal-tabs {
            display: flex;
            border-bottom: 1px solid var(--border);
            flex-shrink: 0;
        }
        .modal-tab {
            flex: 1;
            background: none;
            border: none;
            border-bottom: 2px solid transparent;
            padding: 12px;
            font-size: 0.875rem;
            font-weight: 500;
            color: var(--text-muted);
            cursor: pointer;
            transition: color 0.15s, border-color 0.15s;
            margin-bottom: -1px;
        }
        .modal-tab.active {
            color: var(--primary);
            border-bottom-color: var(--primary);
        }

        /* Tab content */
        .modal-tab-content {
            display: none;
            flex-direction: column;
            flex: 1;
            overflow: hidden;
        }
        .modal-tab-content.active { display: flex; }

        /* Body */
        .modal-body {
            padding: 20px;
            display: flex;
            flex-direction: column;
            gap: 16px;
            overflow-y: auto;
            flex: 1;
        }

        /* Fields */
        .modal-field {
            display: flex;
            flex-direction: column;
            gap: 6px;
        }
        .modal-field label {
            font-size: 0.8rem;
            font-weight: 500;
            color: var(--text-muted);
        }
        .modal-input {
            width: 100%;
            padding: 10px 14px;
            border: 1px solid var(--border);
            border-radius: var(--radius-md);
            font-size: 0.9rem;
            color: var(--text-main);
            background: var(--input-bg);
            outline: none;
            transition: border-color 0.15s;
            font-family: inherit;
        }
        .modal-input:focus { border-color: var(--primary); }
        .modal-textarea {
            min-height: 80px;
            resize: vertical;
        }

        /* Toggle (switch) */
        .modal-field-toggle {
            flex-direction: row;
            align-items: center;
            justify-content: space-between;
            padding: 4px 0;
        }
        .modal-field-toggle > span {
            font-size: 0.9rem;
            color: var(--text-main);
        }
        .toggle-switch {
            position: relative;
            width: 44px;
            height: 24px;
            flex-shrink: 0;
        }
        .toggle-switch input { opacity: 0; width: 0; height: 0; }
        .toggle-slider {
            position: absolute;
            inset: 0;
            background: var(--border);
            border-radius: 24px;
            cursor: pointer;
            transition: background 0.2s;
        }
        .toggle-slider::before {
            content: '';
            position: absolute;
            width: 18px;
            height: 18px;
            left: 3px;
            top: 3px;
            background: #fff;
            border-radius: 50%;
            transition: transform 0.2s;
        }
        .toggle-switch input:checked + .toggle-slider { background: var(--primary); }
        .toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }

        /* Search */
        .modal-search {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 12px 16px;
            border-bottom: 1px solid var(--border);
            flex-shrink: 0;
        }
        .modal-search svg { color: var(--text-light); flex-shrink: 0; }
        .modal-search input {
            border: none;
            background: none;
            outline: none;
            font-size: 0.9rem;
            color: var(--text-main);
            width: 100%;
            font-family: inherit;
        }
        .modal-search input::placeholder { color: var(--text-light); }

        /* Catalog list */
        .modal-catalog-list { overflow-y: auto; flex: 1; }
        .catalog-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 14px 16px;
            border-bottom: 1px solid var(--border);
            gap: 12px;
            cursor: pointer;
            transition: background 0.1s;
        }
        .catalog-item:hover { background: var(--primary-light); }
        .catalog-item-info { display: flex; flex-direction: column; gap: 2px; }
        .catalog-item-name { font-size: 0.9rem; font-weight: 500; color: var(--text-main); }
        .catalog-item-price { font-size: 0.8rem; color: var(--text-muted); }
        .catalog-checkbox {
            width: 18px;
            height: 18px;
            accent-color: var(--primary);
            cursor: pointer;
            flex-shrink: 0;
        }

        /* Row split */
        .modal-row-split {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 12px;
        }

        /* Quantity control */
        .qty-control {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-top: 4px;
            height: 42px;
        }
        .qty-btn {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            border: 1.5px solid var(--border);
            background: var(--card-bg);
            color: var(--text-main);
            font-size: 1.1rem;
            font-weight: 500;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: border-color 0.15s, background 0.15s, color 0.15s;
            flex-shrink: 0;
        }
        .qty-btn:hover {
            border-color: var(--primary);
            background: var(--primary-light);
            color: var(--primary);
        }
        .qty-value {
            font-size: 1rem;
            font-weight: 600;
            color: var(--text-main);
            min-width: 24px;
            text-align: center;
        }

        /* Value bar */
        .modal-value-bar {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 12px 14px;
            background: var(--app-bg);
            border-radius: var(--radius-md);
            font-size: 0.9rem;
            font-weight: 500;
            color: var(--text-muted);
        }
        .modal-value-bar span:last-child {
            font-weight: 600;
            color: var(--text-main);
        }

        /* Checkbox inline */
        .modal-field-checkbox {
            flex-direction: row;
            align-items: center;
            gap: 10px;
        }
        .modal-field-checkbox input[type="checkbox"] {
            width: 16px;
            height: 16px;
            accent-color: var(--primary);
            flex-shrink: 0;
            cursor: pointer;
        }
        .modal-field-checkbox label {
            font-size: 0.875rem;
            color: var(--text-muted);
            cursor: pointer;
        }

        /* Acordeões internos dos modais */
        .modal-accordion {
            border: 1px solid var(--border);
            border-radius: var(--radius-md);
            overflow: hidden;
        }
        .modal-accordion-header {
            width: 100%;
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 12px 14px;
            background: var(--input-bg);
            border: none;
            cursor: pointer;
            font-size: 0.875rem;
            font-weight: 500;
            color: var(--text-main);
            transition: background 0.15s;
        }
        .modal-accordion-header:hover { background: var(--border); }
        .modal-acc-chevron {
            color: var(--text-muted);
            transition: transform 0.2s;
            flex-shrink: 0;
        }
        .modal-accordion.open .modal-acc-chevron { transform: rotate(180deg); }
        .modal-accordion-body {
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.25s ease;
            display: flex;
            flex-direction: column;
            gap: 12px;
        }
        .modal-accordion.open .modal-accordion-body { padding: 14px; }

        /* Footer */
        .modal-footer {
            padding: 16px 20px;
            border-top: 1px solid var(--border);
            flex-shrink: 0;
            background: var(--card-bg);
        }
        .btn-modal-save {
            width: 100%;
            padding: 14px;
            background: var(--primary);
            color: #fff;
            border: none;
            border-radius: var(--radius-md);
            font-size: 0.95rem;
            font-weight: 600;
            cursor: pointer;
            transition: background 0.15s;
            font-family: inherit;
        }
        .btn-modal-save:hover { background: var(--primary-hover); }

        /* === Toggle group buttons === */
        .btn-toggle-group {
            display: flex;
            border: 1px solid var(--border);
            border-radius: var(--radius-md);
            overflow: hidden;
        }
        .btn-toggle-opt {
            flex: 1;
            padding: 9px 10px;
            background: var(--card-bg);
            border: none;
            border-right: 1px solid var(--border);
            font-size: 0.875rem;
            font-weight: 500;
            color: var(--text-muted);
            cursor: pointer;
            transition: background 0.15s, color 0.15s;
            font-family: inherit;
        }
        .btn-toggle-opt:last-child { border-right: none; }
        .btn-toggle-opt.active { background: var(--primary); color: #fff; }

        /* === Choice buttons === */
        .choice-btn {
            width: 100%;
            padding: 15px 16px;
            background: var(--card-bg);
            border: 1.5px solid var(--border);
            border-radius: var(--radius-md);
            font-size: 0.9rem;
            font-weight: 500;
            color: var(--text-main);
            cursor: pointer;
            text-align: left;
            transition: border-color 0.15s, background 0.15s, color 0.15s;
            font-family: inherit;
        }
        .choice-btn:hover { border-color: var(--primary); background: var(--primary-light); }
        .choice-btn.active { border-color: var(--primary); background: var(--primary-light); color: var(--primary); font-weight: 600; }

        /* === Payment list === */
        .payment-list { overflow-y: auto; flex: 1; }
        .payment-item {
            display: flex;
            align-items: center;
            gap: 14px;
            padding: 15px 20px;
            border-bottom: 1px solid var(--border);
            cursor: pointer;
            transition: background 0.1s;
        }
        .payment-item:hover { background: var(--primary-light); }
        .payment-item input[type="checkbox"] {
            width: 18px;
            height: 18px;
            accent-color: var(--primary);
            flex-shrink: 0;
            cursor: pointer;
        }
        .payment-item span {
            font-size: 0.9rem;
            color: var(--text-main);
            flex: 1;
        }

        /* === Section label === */
        .modal-section-label {
            font-size: 0.75rem;
            font-weight: 700;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.06em;
        }

        /* === Value bar negative === */
        .modal-value-bar-negative .modal-negative-val { color: #ef4444; font-weight: 700; }

        /* === Large textarea === */
        .modal-textarea-large {
            min-height: 220px;
            resize: vertical;
            flex: 1;
        }

        /* === Hint text === */
        .modal-hint {
            font-size: 0.8rem;
            color: var(--text-light);
            text-align: center;
            padding: 4px;
            background: var(--app-bg);
            border-radius: var(--radius-sm);
        }

        /* === AI generate button === */
        .btn-ai-generate {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            width: 100%;
            padding: 12px 16px;
            background: var(--primary-light);
            border: 1.5px dashed var(--primary);
            border-radius: var(--radius-md);
            color: var(--primary);
            font-size: 0.875rem;
            font-weight: 500;
            cursor: pointer;
            transition: background 0.15s, color 0.15s;
            font-family: inherit;
        }
        .btn-ai-generate:hover { background: var(--primary); color: #fff; }

        /* Barra de retorno */
        .back-bar { padding: 8px 0 2px; }
        .btn-back {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            background: none;
            border: none;
            cursor: pointer;
            font-family: inherit;
            font-size: 0.875rem;
            font-weight: 500;
            color: var(--primary);
            padding: 6px 8px;
            border-radius: var(--radius-md);
            transition: background 0.15s;
        }
        .btn-back:hover { background: var(--primary-light); }
        .btn-back svg { width: 16px; height: 16px; }

/* =====================================================   ORDENS_DE_SERVICO — ordens_de_servico.html
============================================================ */
        /* ═══════════════════════════════════════════
           DOSSIER — OS
        ═══════════════════════════════════════════ */
        .os-dossier {
            display: none;
            position: fixed;
            top: var(--header-height);
            left: 260px; right: 0; bottom: 0;
            z-index: 9999;
            background: var(--app-bg);
            flex-direction: column;
            overflow: hidden;
        }
        .os-dossier.active { display: flex; }
        @media (max-width: 1024px) { .os-dossier { left: 240px; } }
        @media (max-width: 868px)  { .os-dossier { left: 0; } }

        /* ── Cabeçalho ── */
        .dossier-head {
            display: flex; align-items: center; justify-content: space-between;
            padding: 0 16px; height: 58px; min-height: 58px;
            background: var(--card-bg); border-bottom: 1px solid var(--border);
            flex-shrink: 0;
        }
        .dossier-icon-btn {
            width: 38px; height: 38px; border-radius: 50%;
            background: none; border: none; cursor: pointer;
            color: var(--text-muted); display: flex; align-items: center;
            justify-content: center; transition: background 0.15s, color 0.15s;
            position: relative;
        }
        .dossier-icon-btn:hover { background: var(--app-bg); color: var(--text-main); }
        .dossier-icon-btn svg { width: 20px; height: 20px; }
        .dossier-head-center {
            flex: 1; text-align: center; padding: 0 8px;
        }
        .dossier-head-title {
            font-size: 1rem; font-weight: 600; color: var(--text-main);
            white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
        }
        .dossier-head-number {
            font-size: 0.75rem; color: var(--text-muted); margin-top: 1px;
        }

        /* ── Dropdown menu ⋮ ── */
        .dossier-dropdown {
            position: absolute; top: calc(100% + 6px); right: 0;
            background: var(--card-bg); border: 1px solid var(--border);
            border-radius: var(--radius-lg); box-shadow: 0 8px 24px rgba(0,0,0,0.12);
            min-width: 180px; z-index: 600; overflow: hidden; display: none;
        }
        .dossier-dropdown.open { display: block; }
        .dd-item {
            display: flex; align-items: center; gap: 10px;
            width: 100%; padding: 12px 16px;
            background: none; border: none; cursor: pointer;
            font-size: 0.875rem; font-weight: 500; color: var(--text-main);
            font-family: inherit; transition: background 0.12s; text-align: left;
        }
        .dd-item:hover { background: var(--app-bg); }
        .dd-item svg { width: 16px; height: 16px; color: var(--text-muted); flex-shrink: 0; }
        .dd-item.danger { color: #dc2626; }
        .dd-item.danger svg { color: #dc2626; }
        .dd-item.danger:hover { background: #fee2e2; }
        [data-theme="dark"] .dd-item.danger:hover { background: #450a0a; }
        .dd-divider { height: 1px; background: var(--border); margin: 4px 0; }

        /* ── Body rolável ── */
        .os-dossier .dossier-body {
            flex: 1;
            min-height: 0;
            overflow-y: auto;
            padding: 20px 11% 32px;
            display: flex;
            flex-direction: column;
            gap: 0;
        }
        .os-dossier .dossier-body > * { flex-shrink: 0; }

        /* ── Strip de info (sem caixas) ── */
        .dossier-strip {
            padding: 4px 2px 20px;
        }
        .dossier-strip-service {
            font-size: 1.1rem; font-weight: 700; color: var(--text-main);
            line-height: 1.3; margin-bottom: 8px;
        }
        .dossier-strip-meta {
            display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
        }
        .dossier-strip-meta-item {
            font-size: 0.8rem; color: var(--text-muted);
            display: flex; align-items: center; gap: 4px;
        }
        .dossier-strip-meta-item svg { width: 12px; height: 12px; flex-shrink: 0; }
        .dossier-strip-meta-item.value { font-weight: 700; color: #15803d; }
        [data-theme="dark"] .dossier-strip-meta-item.value { color: #86efac; }
        .strip-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--border); }

        /* ── Badge de status ── */
        .dossier-status-badge {
            display: inline-flex; align-items: center; gap: 5px;
            font-size: 0.7rem; font-weight: 700;
            padding: 4px 10px; border-radius: 20px; letter-spacing: 0.02em;
        }
        .dossier-status-badge .dot { width: 6px; height: 6px; border-radius: 50%; }

        /* Status toggle — mesmo padrão visual do btn-dos-edit */
        .btn-status-toggle {
            display: inline-flex; align-items: center; gap: 7px;
            height: 30px; padding: 0 10px;
            border-radius: var(--radius-md);
            border: 1.5px solid var(--border);
            background: var(--p-card-bg);
            color: var(--text-main);
            font-size: 0.78rem; font-weight: 600;
            cursor: pointer; white-space: nowrap;
            transition: border-color 0.15s, background 0.15s;
        }
        .btn-status-toggle:hover { border-color: var(--border); background: var(--background); }
        .status-toggle-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
        .status-toggle-chev { width: 12px; height: 12px; color: var(--text-muted); flex-shrink: 0; }
        .status-dropdown-menu { position: absolute; top: 100%; right: 0; background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); z-index: 1000; min-width: 180px; overflow: hidden; }
        .status-dropdown-menu .status-opt { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border: none; background: transparent; color: var(--text-main); font-size: 0.83rem; width: 100%; text-align: left; cursor: pointer; transition: background 0.1s; }
        .status-dropdown-menu .status-opt:hover { background: var(--background); }
        .status-dropdown-menu .status-opt .status-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

        .dsb-completed   { background: #dcfce7; color: #15803d; }
        .dsb-completed .dot   { background: #15803d; }
        .dsb-in-progress { background: #dbeafe; color: #1d4ed8; }
        .dsb-in-progress .dot { background: #1d4ed8; }
        .dsb-pending     { background: #fef9c3; color: #a16207; }
        .dsb-pending .dot     { background: #a16207; }
        [data-theme="dark"] .dsb-completed   { background: #14532d; color: #86efac; }
        [data-theme="dark"] .dsb-in-progress { background: #1e3a5f; color: #93c5fd; }
        [data-theme="dark"] .dsb-pending     { background: #422006; color: #fde68a; }

        /* ── Sub-linhas dos acordeões ── */
        .dacc-row {
            display: flex; align-items: center;
            padding: 13px 18px; border-top: 1px solid var(--border);
        }
        .dacc-row-left {
            display: flex; align-items: center;
            gap: 12px; flex: 1; min-width: 0;
        }
        .dacc-row-icon { width: 18px; height: 18px; color: var(--text-muted); flex-shrink: 0; }
        .dacc-row-texts { flex: 1; min-width: 0; }
        .dacc-row-label { font-size: 0.875rem; font-weight: 500; color: var(--text-main); }
        .dacc-row-sub {
            font-size: 0.72rem; color: var(--text-muted); margin-top: 1px;
            white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px;
        }
        .dacc-row-price {
            font-size: 0.875rem; font-weight: 600; color: var(--text-main);
            white-space: nowrap; flex-shrink: 0;
        }
        .dacc-nav { width: 18px; height: 18px; color: var(--text-muted); flex-shrink: 0; }

        /* Botão circular azul (+) */
        .btn-dacc-add {
            width: 32px; height: 32px; border-radius: 50%;
            background: var(--primary); color: #fff;
            border: none; cursor: pointer; flex-shrink: 0;
            display: flex; align-items: center; justify-content: center;
            transition: background 0.15s, transform 0.1s;
        }
        .btn-dacc-add:hover { background: var(--primary-hover); transform: scale(1.08); }
        .btn-dacc-add svg { width: 16px; height: 16px; }

        /* Label de seção no dossier */
        .dossier-section-label {
            font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
            letter-spacing: 0.06em; color: var(--text-muted);
            padding: 18px 16px 6px; display: block;
        }

        /* Linha de Total */
        .dacc-total-row {
            display: flex; align-items: center; justify-content: space-between;
            padding: 14px 18px; border-top: 1px solid var(--border);
        }
        .dacc-total-label { font-size: 0.9rem; font-weight: 700; color: var(--text-main); }
        .dacc-total-value { font-size: 1rem; font-weight: 700; color: var(--primary); }

        /* ── Categorias de itens da OS ── */
        .itens-cat-row {
            display: flex; align-items: center; justify-content: space-between;
            padding: 13px 18px;
            background: var(--card-bg);
            border-bottom: 1px solid var(--border);
        }
        .itens-cat-left { display: flex; align-items: center; gap: 12px; }
        .itens-cat-icon { width: 18px; height: 18px; color: var(--text-light); flex-shrink: 0; }
        .itens-cat-label { font-size: 0.875rem; font-weight: 500; color: var(--text-main); }
        .itens-sub-row {
            display: flex; align-items: center; justify-content: space-between;
            padding: 9px 18px 9px 48px;
            background: var(--app-bg);
            border-bottom: 1px solid var(--border);
        }
        .itens-sub-texts { flex: 1; min-width: 0; }
        .itens-sub-label {
            font-size: 0.9rem;
            font-weight: 600;
            color: var(--text-main);
            display: block;
            letter-spacing: -0.1px;
        }
        .itens-sub-qty {
            font-size: 0.78rem;
            color: var(--text-muted);
            display: block;
            margin-top: 2px;
        }
        .itens-sub-price {
            font-size: 0.9rem;
            font-weight: 600;
            color: var(--text-main);
            flex-shrink: 0;
            margin-left: 16px;
        }
        .det-row-sub {
            font-size: 0.78rem;
            color: var(--text-muted);
            display: block;
            margin-top: 2px;
        }
        .det-row-arrow {
            width: 16px; height: 16px;
            color: var(--text-light);
            flex-shrink: 0;
        }

        /* ── Cabeçalho da OS no dossier ── */
        .dos-os-head {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 16px;
            margin-bottom: 20px;
        }
        .dos-os-title-row {
            display: flex;
            align-items: flex-start;
            gap: 10px;
            margin-bottom: 6px;
        }
        .dos-os-title {
            font-size: 1.4rem;
            font-weight: 700;
            color: var(--text-main);
            letter-spacing: -0.3px;
            line-height: 1.3;
            flex: 1;
        }
        .btn-dos-edit {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            height: 30px;
            padding: 0 10px 0 8px;
            border-radius: var(--radius-md);
            border: 1.5px solid var(--border);
            background: var(--p-card-bg);
            color: var(--text-muted);
            cursor: pointer;
            flex-shrink: 0;
            margin-top: 5px;
            font-size: 0.78rem;
            font-weight: 600;
            white-space: nowrap;
            transition: border-color 0.15s, color 0.15s, background 0.15s;
        }
        .btn-dos-edit:hover {
            border-color: var(--primary);
            color: var(--primary);
            background: var(--primary-light);
        }
        .btn-dos-edit svg { width: 13px; height: 13px; }
        .dos-os-date {
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 0.875rem;
            color: var(--text-muted);
        }
        .dos-os-date-icon {
            width: 15px;
            height: 15px;
            flex-shrink: 0;
        }

        /* ── Campos de dados da OS no dossier ── */
        .dos-os-fields {
            display: flex;
            flex-direction: column;
            gap: 1px;
            background-color: var(--border);
            border-radius: var(--radius-lg);
            overflow: hidden;
            margin-bottom: 16px;
        }
        .dos-os-field-row {
            display: flex;
            align-items: center;
            gap: 14px;
            padding: 16px 18px;
            background-color: var(--card-bg);
        }
        .dos-os-field-icon {
            width: 20px;
            height: 20px;
            color: var(--text-light);
            flex-shrink: 0;
        }
        .dos-os-field-value {
            flex: 1;
            font-size: 0.95rem;
            color: var(--text-main);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .dos-os-field-arrow {
            width: 20px;
            height: 20px;
            color: var(--text-light);
            flex-shrink: 0;
        }

        /* ── Footer de ação dentro do dossier ── */
        .dos-os-footer {
            margin-top: 20px;
            padding-bottom: 12px;
        }

/* =====================================================   ESTOQUE — estoque.html
============================================================ */
        /* ─────────────────────────────────────────────
           BANNER MODO ESTOQUE
        ───────────────────────────────────────────── */
        .estoque-banner {
            display: flex;
            align-items: center;
            gap: 16px;
            padding: 14px 18px;
            background: var(--primary-light);
            border: 1.5px solid var(--primary);
            border-radius: var(--radius-lg);
            cursor: pointer;
            transition: box-shadow 0.15s, transform 0.15s;
        }
        .estoque-banner:hover {
            box-shadow: var(--shadow-lg);
            transform: translateY(-1px);
        }
        .estoque-banner-icon {
            width: 46px;
            height: 46px;
            border-radius: var(--radius-md);
            background: var(--primary);
            color: #fff;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }
        .estoque-banner-icon svg { width: 22px; height: 22px; }
        .estoque-banner-text { flex: 1; }
        .estoque-banner-title {
            font-size: 0.95rem;
            font-weight: 700;
            color: var(--primary);
            display: block;
        }
        .estoque-banner-sub {
            font-size: 0.78rem;
            color: var(--primary);
            opacity: 0.75;
            display: block;
            margin-top: 2px;
        }
        .estoque-banner-arrow { color: var(--primary); flex-shrink: 0; }
        .estoque-banner-arrow svg { width: 18px; height: 18px; }

        /* ─────────────────────────────────────────────
           PALETA DE ÍCONES DOS CARDS  (dark-mode aware)
        ───────────────────────────────────────────── */
        .icon-blue    { background: #dbeafe; color: #1d4ed8; }
        .icon-violet  { background: #ede9fe; color: #7c3aed; }
        .icon-emerald { background: #d1fae5; color: #065f46; }
        .icon-amber   { background: #fef9c3; color: #854d0e; }
        .icon-pink    { background: #fce7f3; color: #be185d; }
        .icon-teal    { background: #ccfbf1; color: #0f766e; }
        .icon-orange  { background: #ffedd5; color: #c2410c; }
        .icon-indigo  { background: #e0e7ff; color: #3730a3; }

        [data-theme="dark"] .icon-blue    { background: #1e3a5f; color: #93c5fd; }
        [data-theme="dark"] .icon-violet  { background: #2e1065; color: #c4b5fd; }
        [data-theme="dark"] .icon-emerald { background: #064e3b; color: #6ee7b7; }
        [data-theme="dark"] .icon-amber   { background: #431407; color: #fde68a; }
        [data-theme="dark"] .icon-pink    { background: #500724; color: #f9a8d4; }
        [data-theme="dark"] .icon-teal    { background: #042f2e; color: #5eead4; }
        [data-theme="dark"] .icon-orange  { background: #431407; color: #fdba74; }
        [data-theme="dark"] .icon-indigo  { background: #1e1b4b; color: #a5b4fc; }

        /* ─────────────────────────────────────────────
           LISTA DE PRODUTOS
        ───────────────────────────────────────────── */
        .estoque-lista {
            display: flex;
            flex-direction: column;
            gap: 8px;
            padding-bottom: 16px;
        }

        .estoque-card {
            display: flex;
            align-items: center;
            gap: 14px;
            padding: 14px 16px;
            background: var(--p-card-bg);
            border: 1px solid var(--border);
            border-radius: var(--radius-lg);
            cursor: pointer;
            transition: box-shadow 0.15s, border-color 0.15s, transform 0.15s;
        }
        .estoque-card:hover {
            box-shadow: var(--shadow-lg);
            border-color: var(--primary);
            transform: translateY(-1px);
        }

        .estoque-card-icon {
            width: 48px;
            height: 48px;
            border-radius: var(--radius-md);
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }
        .estoque-card-icon svg { width: 22px; height: 22px; }

        .estoque-card-body {
            flex: 1;
            min-width: 0;
            display: flex;
            flex-direction: column;
            gap: 3px;
        }
        .estoque-card-nome {
            font-size: 0.95rem;
            font-weight: 600;
            color: var(--text-main);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .estoque-card-sub {
            font-size: 0.78rem;
            color: var(--text-muted);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .estoque-card-right {
            display: flex;
            flex-direction: column;
            align-items: flex-end;
            gap: 5px;
            flex-shrink: 0;
        }
        .estoque-card-preco {
            font-size: 1rem;
            font-weight: 700;
            color: var(--text-main);
            line-height: 1;
        }

        /* ─────────────────────────────────────────────
           BADGES DE QUANTIDADE
        ───────────────────────────────────────────── */
        .estoque-badge {
            font-size: 0.68rem;
            font-weight: 700;
            padding: 3px 9px;
            border-radius: 20px;
            letter-spacing: 0.02em;
            white-space: nowrap;
        }
        .badge-ok       { background: #dcfce7; color: #15803d; }
        .badge-low      { background: #fef9c3; color: #a16207; }
        .badge-critical { background: #fee2e2; color: #dc2626; }

        [data-theme="dark"] .badge-ok       { background: #14532d; color: #86efac; }
        [data-theme="dark"] .badge-low      { background: #422006; color: #fde68a; }
        [data-theme="dark"] .badge-critical { background: #450a0a; color: #fca5a5; }

        /* ─────────────────────────────────────────────
           MODO ESTOQUE — edição inline de quantidades
        ───────────────────────────────────────────── */
        .estoque-inline-qty {
            display: none;
            align-items: center;
            gap: 8px;
        }
        .estoque-lista.modo-bulk .estoque-card { cursor: default; }
        .estoque-lista.modo-bulk .estoque-card:hover {
            transform: none;
            box-shadow: var(--shadow-md);
            border-color: var(--border);
        }
        .estoque-lista.modo-bulk .estoque-card-right { display: none; }
        .estoque-lista.modo-bulk .estoque-inline-qty { display: flex; }
        .eq-btn {
            width: 30px; height: 30px;
            border-radius: 50%;
            border: 1.5px solid var(--border);
            background: var(--p-card-bg);
            color: var(--text-main);
            cursor: pointer;
            font-size: 1rem; font-weight: 700;
            display: flex; align-items: center; justify-content: center;
            transition: background 0.15s, border-color 0.15s, color 0.15s;
            flex-shrink: 0;
        }
        .eq-btn svg { width: 14px; height: 14px; }
        .eq-btn:hover { background: var(--primary); border-color: var(--primary); color: #fff; }
        .eq-val {
            font-size: 1rem; font-weight: 700;
            color: var(--text-main);
            min-width: 32px; text-align: center;
        }
        .modo-estoque-bar {
            display: none;
            position: fixed;
            bottom: 24px; left: calc(130px + 50vw); transform: translateX(-50%);
            padding: 10px 14px 10px 16px;
            background: var(--primary);
            align-items: center;
            border-radius: 40px;
            z-index: 300;
            box-shadow: 0 4px 20px rgba(124,58,237,0.35);
            gap: 10px;
            width: auto;
        }
        .modo-estoque-bar.active { display: flex; }
        .modo-estoque-bar-text {
            font-size: 0.82rem; font-weight: 600; color: rgba(255,255,255,0.9);
            white-space: nowrap;
        }
        .modo-estoque-bar-actions { display: flex; gap: 8px; flex-shrink: 0; }
        .btn-modo-cancel {
            padding: 6px 14px;
            border-radius: 20px;
            border: 1.5px solid rgba(255,255,255,0.45);
            background: transparent; color: #fff;
            cursor: pointer; font-weight: 600; font-size: 0.8rem;
            font-family: 'Inter', sans-serif;
            transition: background 0.15s;
        }
        .btn-modo-cancel:hover { background: rgba(255,255,255,0.15); }
        .btn-modo-save {
            padding: 6px 14px;
            border-radius: 20px;
            border: none; background: #fff; color: var(--primary);
            cursor: pointer; font-weight: 700; font-size: 0.8rem;
            font-family: 'Inter', sans-serif;
            transition: background 0.15s;
        }
        .btn-modo-save:hover { background: #ede9fe; }
        .estoque-banner.banner-active {
            background: var(--primary);
            border-color: var(--primary);
        }
        .estoque-banner.banner-active .estoque-banner-title,
        .estoque-banner.banner-active .estoque-banner-sub,
        .estoque-banner.banner-active .estoque-banner-arrow { color: #fff; }
        .estoque-banner.banner-active .estoque-banner-sub { opacity: 1; }
        .estoque-banner.banner-active .estoque-banner-icon {
            background: rgba(255,255,255,0.22);
        }

        /* ─────────────────────────────────────────────
           PRODUTO DOSSIER — ícone grande no overlay fullscreen
        ───────────────────────────────────────────── */
        .dossier-prod-icon {
            width: 64px; height: 64px;
            border-radius: var(--radius-lg);
            display: flex; align-items: center; justify-content: center;
            flex-shrink: 0;
        }
        .dossier-prod-icon svg { width: 30px; height: 30px; }

        /* Controle de quantidade (dentro do dossier) */
        .prod-qty-section {
            background: var(--app-bg);
            border: 1px solid var(--border);
            border-radius: var(--radius-lg);
            padding: 16px 16px 20px;
            margin-bottom: 0;
        }
        .prod-qty-label {
            font-size: 0.7rem; font-weight: 600;
            color: var(--text-muted);
            text-transform: uppercase; letter-spacing: 0.05em;
            margin-bottom: 16px;
            display: block;
        }
        .prod-qty-row {
            display: flex; align-items: center;
            justify-content: center; gap: 24px;
        }
        .prod-qty-btn {
            width: 44px; height: 44px;
            border-radius: 50%;
            border: 1.5px solid var(--border);
            background: var(--p-card-bg);
            color: var(--text-main);
            cursor: pointer;
            display: flex; align-items: center; justify-content: center;
            transition: background 0.15s, border-color 0.15s, color 0.15s;
            flex-shrink: 0;
        }
        .prod-qty-btn:hover { background: var(--primary); border-color: var(--primary); color: #fff; }
        .prod-qty-btn svg { width: 20px; height: 20px; }
        .prod-qty-display {
            display: flex; align-items: baseline; gap: 6px;
        }
        .prod-qty-value {
            font-size: 2.6rem; font-weight: 800;
            color: var(--text-main); line-height: 1;
            min-width: 72px; text-align: center;
        }
        .prod-qty-unit {
            font-size: 0.9rem; color: var(--text-muted); font-weight: 500;
        }

        /* ─────────────────────────────────────────────
           MODAL FILTROS ESTOQUE
        ───────────────────────────────────────────── */
        .modal-filter-group {
            margin-bottom: 20px;
        }
        .modal-filter-title {
            font-size: 0.78rem; font-weight: 700;
            color: var(--text-muted);
            text-transform: uppercase; letter-spacing: 0.05em;
            margin-bottom: 10px; display: block;
        }
        .filter-chip-group {
            display: flex; flex-wrap: wrap; gap: 8px;
        }
        .filter-chip {
            padding: 6px 14px;
            border-radius: 20px;
            border: 1.5px solid var(--border);
            background: var(--p-card-bg);
            color: var(--text-muted);
            font-size: 0.8rem; font-weight: 500;
            cursor: pointer;
            transition: border-color 0.15s, background 0.15s, color 0.15s;
            user-select: none;
        }
        .filter-chip:hover { border-color: var(--primary); color: var(--primary); }
        .filter-chip.selected {
            border-color: var(--primary);
            background: var(--primary-light);
            color: var(--primary);
            font-weight: 600;
        }
        .modal-filter-actions {
            display: flex; gap: 10px; margin-top: 8px;
        }
        .btn-filter-clear {
            flex: 1; padding: 10px;
            border-radius: var(--radius-md);
            border: 1.5px solid var(--border);
            background: transparent;
            color: var(--text-muted);
            cursor: pointer; font-weight: 600; font-size: 0.85rem;
            transition: border-color 0.15s, color 0.15s;
        }
        .btn-filter-clear:hover { border-color: var(--primary); color: var(--primary); }
        .btn-filter-apply {
            flex: 2; padding: 10px;
            border-radius: var(--radius-md);
            border: none;
            background: var(--primary); color: #fff;
            cursor: pointer; font-weight: 700; font-size: 0.85rem;
        }

        @media (max-width: 868px) {
            .modo-estoque-bar { bottom: 16px; left: 50%; }
        }

/* =====================================================   ESTOQUE — NOVA PEÇA (Tela 1) e STATUS ESTOQUE (Tela 2)
============================================================ */
        /* ── Tela 1: body e campos ── */
        .npc-body {
            flex: 1; min-height: 0; overflow-y: auto;
            padding: 28px 11% 0;
            display: flex; flex-direction: column;
            box-sizing: border-box;
        }
        .npc-body > * { flex-shrink: 0; }

        .npc-field-group { margin-bottom: 22px; }

        .npc-label {
            display: block; font-size: 0.78rem; font-weight: 600;
            color: var(--text-muted); margin-bottom: 8px; letter-spacing: 0.04em;
            text-transform: uppercase;
        }
        .npc-input {
            width: 100%; padding: 12px 14px;
            border: 1.5px solid var(--border); border-radius: var(--radius-md);
            background: var(--card-bg); color: var(--text-main);
            font-size: 0.95rem; font-family: 'Inter', sans-serif;
            transition: border-color 0.15s; box-sizing: border-box;
            outline: none;
        }
        .npc-input:focus { border-color: var(--primary); }

        .npc-input-wrapper { position: relative; }
        .npc-input-wrapper .npc-input { padding-right: 82px; }
        .npc-badge-top {
            position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
            background: #7c3aed; color: #fff;
            font-size: 0.68rem; font-weight: 700;
            padding: 3px 9px 3px 6px; border-radius: 20px;
            display: flex; align-items: center; gap: 4px; pointer-events: none;
        }
        .npc-badge-top svg { width: 11px; height: 11px; }

        .npc-label-row {
            display: flex; align-items: center; gap: 6px; margin-bottom: 8px;
        }
        .npc-label-row .npc-label { margin-bottom: 0; }
        .npc-info-btn {
            width: 17px; height: 17px; border-radius: 50%; border: none;
            background: none; cursor: pointer; color: var(--text-light);
            display: flex; align-items: center; justify-content: center;
            padding: 0; flex-shrink: 0;
        }
        .npc-info-btn svg { width: 14px; height: 14px; }
        .npc-info-btn:hover { color: var(--primary); }

        .npc-section-title {
            font-size: 1rem; font-weight: 700; color: var(--text-main);
            margin: 4px 0 20px; padding-top: 4px;
        }

        /* ── Tela 1: acordeões internos ── */
        .npc-accordion {
            border: 1.5px solid var(--border); border-radius: var(--radius-lg);
            overflow: hidden; margin-bottom: 12px;
        }
        .npc-acc-header {
            width: 100%; display: flex; align-items: center;
            justify-content: space-between; padding: 16px 18px;
            background: var(--card-bg); border: none; cursor: pointer;
            font-size: 0.92rem; font-weight: 600; color: var(--text-main);
            font-family: 'Inter', sans-serif; text-align: left;
            transition: background 0.15s;
        }
        .npc-acc-header:hover { background: var(--app-bg); }
        .npc-acc-chevron {
            width: 18px; height: 18px; color: var(--text-muted);
            transition: transform 0.2s; flex-shrink: 0;
        }
        .npc-acc-body {
            max-height: 0; overflow: hidden;
            transition: max-height 0.25s ease;
            padding: 0 24px;
        }

        /* ── Tela 1: rodapé ── */
        .npc-footer {
            padding: 12px 20px 16px; background: var(--card-bg);
            border-top: 1px solid var(--border); flex-shrink: 0;
            display: flex; justify-content: flex-end;
        }
        .npc-btn-save {
            width: auto; padding: 10px 28px; background: #7c3aed; color: #fff;
            border: none; border-radius: var(--radius-md); font-size: 0.9rem;
            font-weight: 700; font-family: 'Inter', sans-serif; cursor: pointer;
            transition: background 0.15s; letter-spacing: 0.01em;
        }
        .npc-btn-save:hover { background: #6d28d9; }

        /* ── Picker de tags — sanfona externa ── */
        .npc-tag-outer {
            border: 1.5px solid var(--border); border-radius: var(--radius-md);
            overflow: hidden; margin-top: 4px;
        }
        .npc-tag-outer-header {
            width: 100%; display: flex; align-items: center; justify-content: space-between;
            padding: 13px 16px; border: none; background: var(--card-bg); cursor: pointer;
            font-family: 'Inter', sans-serif; gap: 12px; transition: background 0.12s;
        }
        .npc-tag-outer-header:hover { background: var(--app-bg); }
        .npc-tag-outer-left { display: flex; align-items: center; gap: 12px; }
        .npc-tag-outer-icon { width: 18px; height: 18px; color: var(--text-muted); flex-shrink: 0; }
        .npc-tag-outer-texts { display: flex; flex-direction: column; gap: 1px; text-align: left; }
        .npc-tag-outer-title { font-size: 0.9rem; font-weight: 600; color: var(--text-main); }
        .npc-tag-outer-hint { font-size: 0.76rem; color: var(--text-muted); }
        .npc-tag-outer-chevron {
            width: 17px; height: 17px; color: var(--text-muted);
            transition: transform 0.2s; flex-shrink: 0;
        }
        .npc-tag-outer-body {
            max-height: 0; overflow-y: hidden; overflow-x: hidden;
            transition: max-height 0.3s ease;
            border-top: 0px solid var(--border);
        }
        .npc-tag-outer-body.open {
            overflow-y: auto;
            border-top-width: 1px;
        }
        .npc-tag-outer-body.open { border-top-width: 1px; }

        /* mini cabeçalho interno */
        .npc-tag-inner-head {
            display: flex; align-items: center; justify-content: space-between;
            padding: 10px 14px 9px; background: var(--app-bg);
            border-bottom: 1px solid var(--border);
        }
        .npc-tag-inner-head-text {
            font-size: 0.76rem; color: var(--text-muted); font-weight: 500;
        }
        .npc-tag-inner-head-clear {
            font-size: 0.72rem; color: #7c3aed; background: none; border: none;
            cursor: pointer; font-family: 'Inter', sans-serif; padding: 0; font-weight: 600;
        }
        .npc-tag-inner-head-clear:hover { text-decoration: underline; }
        .npc-tag-preview-chip {
            display: inline-flex; align-items: center; gap: 5px;
            background: #ede9fe; color: #7c3aed; border-radius: 20px;
            padding: 2px 8px 2px 5px; font-size: 0.72rem; font-weight: 600;
        }
        .npc-tag-preview-chip svg { width: 12px; height: 12px; }

        /* categorias internas */
        .npc-tag-picker { overflow: hidden; }
        .npc-tagcat { border-bottom: 1px solid var(--border); }
        .npc-tagcat:last-child { border-bottom: none; }
        .npc-tagcat-header {
            width: 100%; display: flex; align-items: center; justify-content: space-between;
            padding: 10px 14px; border: none; background: var(--card-bg); cursor: pointer;
            font-family: 'Inter', sans-serif; text-align: left; transition: background 0.12s;
        }
        .npc-tagcat-header:hover { background: var(--app-bg); }
        .npc-tagcat-title {
            font-size: 0.72rem; font-weight: 700; color: var(--text-muted);
            text-transform: uppercase; letter-spacing: 0.07em;
        }
        .npc-tagcat-chevron {
            width: 14px; height: 14px; color: var(--text-light);
            transition: transform 0.2s; flex-shrink: 0;
        }
        .npc-tagcat-body { max-height: 0; overflow: hidden; transition: max-height 0.25s ease; }
        .npc-tag-grid { display: flex; flex-wrap: wrap; gap: 7px; padding: 10px 14px 12px; }
        .npc-tag-btn {
            width: 40px; height: 40px; flex-shrink: 0;
            border: 1.5px solid var(--border); border-radius: var(--radius-md);
            background: var(--card-bg); cursor: pointer; color: var(--text-muted);
            display: flex; align-items: center; justify-content: center;
            transition: border-color 0.15s, background 0.15s, color 0.15s; padding: 0;
        }
        .npc-tag-btn svg { width: 16px; height: 16px; }
        .npc-tag-btn:hover { border-color: #7c3aed; color: #7c3aed; }
        .npc-tag-btn.selected { border-color: #7c3aed; background: #7c3aed; color: #fff; }

        /* ── Campo de foto da peça ── */
        .npc-photo-zone {
            border: 2px dashed var(--border); border-radius: var(--radius-md);
            padding: 28px 16px; text-align: center; cursor: pointer;
            transition: border-color 0.15s, background 0.15s;
            display: flex; flex-direction: column; align-items: center; gap: 8px;
        }
        .npc-photo-zone:hover { border-color: #7c3aed; background: #f5f3ff; }
        .npc-photo-zone-icon { width: 28px; height: 28px; color: var(--text-muted); }
        .npc-photo-zone-text {
            font-size: 0.84rem; color: var(--text-muted); line-height: 1.5;
        }
        .npc-photo-zone-text strong { color: #7c3aed; font-weight: 600; }

        .npc-photo-or {
            display: flex; align-items: center; gap: 10px; margin: 10px 0 6px;
        }
        .npc-photo-or-line { flex: 1; height: 1px; background: var(--border); }
        .npc-photo-or-btn {
            font-size: 0.78rem; color: #7c3aed; background: none; border: none;
            cursor: pointer; white-space: nowrap; font-family: 'Inter', sans-serif;
            padding: 0; font-weight: 500;
        }
        .npc-photo-or-btn:hover { text-decoration: underline; }

        .npc-photo-link-wrap { margin-top: 2px; }

        .npc-photo-preview {
            position: relative; border-radius: var(--radius-md); overflow: hidden;
            width: 100%; background: var(--app-bg);
            border: 1.5px solid var(--border);
        }
        .npc-photo-preview img {
            width: 100%; max-height: 200px;
            object-fit: contain; display: block;
        }
        .npc-photo-remove {
            position: absolute; top: 8px; right: 8px;
            width: 28px; height: 28px; border-radius: 50%;
            background: rgba(0,0,0,0.55); border: none; color: #fff;
            cursor: pointer; display: flex; align-items: center; justify-content: center;
            padding: 0;
        }
        .npc-photo-remove svg { width: 14px; height: 14px; }
        .npc-photo-remove:hover { background: rgba(0,0,0,0.75); }

        /* ── Stepper de quantidade ── */
        .npc-stepper-group { margin-bottom: 20px; }
        .npc-stepper-group:last-child { margin-bottom: 0; }
        .npc-stepper-label {
            font-size: 0.88rem; font-weight: 600; color: var(--text-main);
            margin-bottom: 4px; display: block;
        }
        .npc-stepper-hint {
            font-size: 0.78rem; color: var(--text-muted); margin-bottom: 10px;
            display: block; line-height: 1.5;
        }
        .npc-stepper {
            display: flex; align-items: stretch;
            border: 1.5px solid #7c3aed; border-radius: var(--radius-md);
            overflow: hidden; height: 44px;
        }
        .npc-stepper-btn {
            width: 44px; flex-shrink: 0; border: none; cursor: pointer;
            background: #7c3aed; color: #fff;
            font-size: 1.25rem; font-weight: 400; line-height: 1;
            display: flex; align-items: center; justify-content: center;
            transition: background 0.15s; user-select: none;
        }
        .npc-stepper-btn:hover { background: #6d28d9; }
        .npc-stepper-btn:active { background: #5b21b6; }
        .npc-stepper-val {
            flex: 1; text-align: center; border: none;
            background: var(--card-bg); color: var(--text-main);
            font-size: 0.95rem; font-weight: 500; font-family: 'Inter', sans-serif;
            border-left: 1.5px solid #7c3aed; border-right: 1.5px solid #7c3aed;
            outline: none; min-width: 0;
        }

        /* ── Tela 2: status estoque ── */
        .sse-body {
            flex: 1; min-height: 0; overflow-y: auto;
            padding: 32px 20px 0; display: flex; flex-direction: column;
            box-sizing: border-box;
        }
        .sse-body > * { flex-shrink: 0; }
        .sse-title {
            font-size: 1.15rem; font-weight: 700; color: var(--text-main);
            line-height: 1.45; margin-bottom: 12px;
        }
        .sse-subtitle {
            font-size: 0.85rem; color: var(--text-muted);
            line-height: 1.65; margin-bottom: 28px;
        }
        .sse-list {
            display: flex; flex-direction: column;
            border: 1.5px solid var(--border); border-radius: var(--radius-lg);
            overflow: hidden;
        }
        .sse-item {
            display: flex; align-items: center; gap: 14px;
            padding: 15px 18px; background: var(--card-bg);
            border-bottom: 1px solid var(--border); cursor: pointer;
            transition: background 0.12s;
        }
        .sse-item:last-child { border-bottom: none; }
        .sse-item:hover { background: var(--app-bg); }
        .sse-dot {
            width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
        }
        .sse-dot-yellow { background: #d97706; }
        .sse-dot-blue   { background: #2563eb; }
        .sse-dot-green  { background: #16a34a; }
        .sse-dot-red    { background: #dc2626; }
        .sse-text {
            flex: 1; font-size: 0.92rem; color: var(--text-main);
        }
        .sse-checkbox {
            width: 20px; height: 20px; border-radius: 6px;
            border: 2px solid var(--border); background: var(--card-bg);
            appearance: none; -webkit-appearance: none;
            cursor: pointer; flex-shrink: 0;
            transition: background 0.15s, border-color 0.15s;
            position: relative;
        }
        .sse-checkbox:checked { background: #7c3aed; border-color: #7c3aed; }
        .sse-checkbox:checked::after {
            content: ''; position: absolute;
            left: 5px; top: 2px; width: 5px; height: 9px;
            border: 2px solid #fff; border-top: none; border-left: none;
            transform: rotate(45deg);
        }

        /* ── Tela 2: rodapé dividido ── */
        .npc-footer-split {
            display: flex; border-top: 1px solid var(--border); flex-shrink: 0;
        }
        .npc-btn-back {
            flex: 1; padding: 16px; background: transparent;
            border: none; border-right: 1px solid var(--border);
            color: #7c3aed; font-size: 0.95rem; font-weight: 700;
            font-family: 'Inter', sans-serif; cursor: pointer;
            transition: background 0.15s;
        }
        .npc-btn-back:hover { background: #f3e8ff; }
        .npc-btn-save-status {
            flex: 1; padding: 16px; background: #7c3aed; color: #fff;
            border: none; font-size: 0.95rem; font-weight: 700;
            font-family: 'Inter', sans-serif; cursor: pointer;
            transition: background 0.15s;
        }
        .npc-btn-save-status:hover { background: #6d28d9; }

/* =====================================================   FINANCEIRO — financeiro.html
============================================================ */
        /* ─────────────────────────────────────────────
           PAINEL DE RESUMO
        ───────────────────────────────────────────── */
        .fin-summary-grid {
            display: grid;
            grid-template-columns: 1fr 1fr 1fr;
            gap: 12px;
            margin-bottom: 4px;
        }

        @media (max-width: 640px) {
            .fin-summary-grid {
                grid-template-columns: 1fr;
                grid-template-rows: auto auto auto;
            }
            .fin-summary-card.saldo { grid-column: 1; }
        }

        @media (min-width: 641px) and (max-width: 900px) {
            .fin-summary-grid { grid-template-columns: 1fr 1fr; }
            .fin-summary-card.saldo { grid-column: 1 / -1; }
        }

        .fin-summary-card {
            background: var(--p-card-bg);
            border: 1px solid var(--border);
            border-radius: var(--radius-lg);
            padding: 18px 20px;
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .fin-summary-top {
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .fin-summary-label {
            font-size: 0.78rem;
            font-weight: 600;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }

        .fin-summary-icon {
            width: 36px;
            height: 36px;
            border-radius: var(--radius-md);
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }
        .fin-summary-icon svg { width: 18px; height: 18px; }

        .fin-summary-value {
            font-size: 1.6rem;
            font-weight: 700;
            line-height: 1;
            letter-spacing: -0.02em;
        }

        .fin-summary-trend {
            font-size: 0.75rem;
            font-weight: 500;
            color: var(--text-muted);
            display: flex;
            align-items: center;
            gap: 4px;
        }
        .fin-summary-trend svg { width: 13px; height: 13px; }

        /* Variantes de cor */
        .fin-summary-card.saldo .fin-summary-icon  { background: #dbeafe; color: #1d4ed8; }
        .fin-summary-card.saldo .fin-summary-value  { color: var(--primary); }
        .fin-summary-card.entradas .fin-summary-icon { background: #dcfce7; color: #15803d; }
        .fin-summary-card.entradas .fin-summary-value { color: #15803d; }
        .fin-summary-card.saidas .fin-summary-icon   { background: #fee2e2; color: #dc2626; }
        .fin-summary-card.saidas .fin-summary-value  { color: #dc2626; }

        [data-theme="dark"] .fin-summary-card.saldo .fin-summary-icon    { background: #1e3a5f; color: #93c5fd; }
        [data-theme="dark"] .fin-summary-card.saldo .fin-summary-value    { color: #93c5fd; }
        [data-theme="dark"] .fin-summary-card.entradas .fin-summary-icon  { background: #14532d; color: #86efac; }
        [data-theme="dark"] .fin-summary-card.entradas .fin-summary-value { color: #86efac; }
        [data-theme="dark"] .fin-summary-card.saidas .fin-summary-icon    { background: #450a0a; color: #fca5a5; }
        [data-theme="dark"] .fin-summary-card.saidas .fin-summary-value   { color: #fca5a5; }

        /* ─────────────────────────────────────────────
           ABAS DE NAVEGAÇÃO
        ───────────────────────────────────────────── */
        .fin-tabs {
            display: flex;
            border-bottom: 2px solid var(--border);
            margin-bottom: 12px;
        }

        .fin-tab {
            flex: 1;
            background: none;
            border: none;
            border-bottom: 2px solid transparent;
            margin-bottom: -2px;
            padding: 11px 8px;
            font-size: 0.875rem;
            font-weight: 500;
            color: var(--text-muted);
            cursor: pointer;
            transition: color 0.15s, border-color 0.15s;
            font-family: inherit;
        }
        .fin-tab.active {
            color: var(--primary);
            border-bottom-color: var(--primary);
            font-weight: 600;
        }
        .fin-tab:hover:not(.active) { color: var(--text-main); }

        /* ─────────────────────────────────────────────
           CONTEÚDO DAS ABAS
        ───────────────────────────────────────────── */
        .fin-tab-content {
            display: none;
            flex-direction: column;
            gap: 8px;
        }
        .fin-tab-content.active { display: flex; }

        /* ─────────────────────────────────────────────
           CARTÕES DE MOVIMENTAÇÃO
        ───────────────────────────────────────────── */
        .fin-card {
            display: flex;
            align-items: center;
            gap: 14px;
            padding: 14px 16px;
            background: var(--p-card-bg);
            border: 1px solid var(--border);
            border-radius: var(--radius-lg);
            cursor: pointer;
            transition: box-shadow 0.15s, border-color 0.15s, transform 0.15s;
        }
        .fin-card:hover {
            box-shadow: var(--shadow-lg);
            border-color: var(--primary);
            transform: translateY(-1px);
        }

        /* Indicador lateral colorido */
        .fin-card-indicator {
            width: 4px;
            min-width: 4px;
            height: 40px;
            border-radius: 4px;
            flex-shrink: 0;
        }
        .ind-entrada { background: #22c55e; }
        .ind-saida   { background: #ef4444; }
        .ind-neutro  { background: var(--border); }

        .fin-card-body {
            flex: 1;
            min-width: 0;
            display: flex;
            flex-direction: column;
            gap: 5px;
        }

        .fin-card-title {
            font-size: 0.925rem;
            font-weight: 600;
            color: var(--text-main);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .fin-card-meta {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
        }

        .fin-card-date {
            font-size: 0.75rem;
            color: var(--text-muted);
            display: flex;
            align-items: center;
            gap: 3px;
        }
        .fin-card-date svg { width: 11px; height: 11px; flex-shrink: 0; }

        .fin-card-cat {
            font-size: 0.68rem;
            font-weight: 600;
            padding: 2px 7px;
            border-radius: 20px;
            background: var(--app-bg);
            border: 1px solid var(--border);
            color: var(--text-muted);
            letter-spacing: 0.02em;
        }

        .fin-card-right {
            display: flex;
            flex-direction: column;
            align-items: flex-end;
            gap: 6px;
            flex-shrink: 0;
        }

        .fin-card-value {
            font-size: 1rem;
            font-weight: 700;
            line-height: 1;
        }
        .fin-card-value.entrada { color: #15803d; }
        .fin-card-value.saida   { color: #dc2626; }
        .fin-card-value.neutro  { color: var(--text-main); }

        [data-theme="dark"] .fin-card-value.entrada { color: #86efac; }
        [data-theme="dark"] .fin-card-value.saida   { color: #fca5a5; }

        /* ─────────────────────────────────────────────
           PÍLULAS DE STATUS
        ───────────────────────────────────────────── */
        .fin-pill {
            font-size: 0.68rem;
            font-weight: 700;
            padding: 3px 9px;
            border-radius: 20px;
            letter-spacing: 0.02em;
            white-space: nowrap;
        }
        .pill-pago      { background: #dcfce7; color: #15803d; }
        .pill-pendente  { background: #fef9c3; color: #a16207; }
        .pill-atrasado  { background: #fee2e2; color: #dc2626; }
        .pill-agendado  { background: #dbeafe; color: #1d4ed8; }

        [data-theme="dark"] .pill-pago     { background: #14532d; color: #86efac; }
        [data-theme="dark"] .pill-pendente { background: #422006; color: #fde68a; }
        [data-theme="dark"] .pill-atrasado { background: #450a0a; color: #fca5a5; }
        [data-theme="dark"] .pill-agendado { background: #1e3a5f; color: #93c5fd; }

        /* ─────────────────────────────────────────────
           TOOLBAR FINANCEIRO
        ───────────────────────────────────────────── */
        .fin-page-header {
            display: flex;
            align-items: flex-end;
            justify-content: space-between;
            gap: 16px;
            margin-bottom: 24px;
            flex-wrap: wrap;
        }
        .fin-toolbar-right {
            display: flex;
            align-items: center;
            gap: 10px;
            flex-shrink: 0;
        }
        .fin-search-wrap {
            display: flex; align-items: center; gap: 8px;
            background: var(--card-bg);
            border: 1.5px solid var(--border);
            border-radius: var(--radius-md);
            padding: 0 14px;
            height: 40px;
            width: 210px;
            transition: border-color 0.15s, box-shadow 0.15s;
        }
        .fin-search-wrap:focus-within {
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(37,99,235,0.08);
        }
        .fin-search-icon { width: 15px; height: 15px; color: var(--text-muted); flex-shrink: 0; }
        .fin-search-input {
            border: none; background: transparent; outline: none;
            font-size: 0.875rem; font-family: 'Inter', sans-serif;
            color: var(--text-main); width: 100%;
        }
        .fin-search-input::placeholder { color: var(--text-muted); }

        /* footer do modal de filtros */
        .fin-filter-footer {
            padding: 14px 24px 20px;
            border-top: 1px solid var(--border);
            display: flex; gap: 10px;
        }
        .fin-filter-footer .btn-filter-clear { margin-top: 0; }
        .fin-filter-footer .btn-filter-apply { margin-top: 0; }

        .fin-filter-badge {
            display: inline-flex; align-items: center; justify-content: center;
            width: 18px; height: 18px; border-radius: 50%;
            background: var(--primary); color: #fff;
            font-size: 0.68rem; font-weight: 700; margin-left: 2px;
        }

        /* modal-sheet scroll area */
        .modal-sheet-scroll {
            flex: 1; overflow-y: auto;
            padding: 20px 24px 4px;
        }
        .fin-filter-last { margin-bottom: 0; }

        @media (max-width: 860px) {
            .fin-page-header { align-items: flex-start; }
            .fin-toolbar-right { width: 100%; flex-wrap: wrap; }
            .fin-search-wrap { flex: 1; width: auto; min-width: 140px; }
        }
        @media (max-width: 520px) {
            .btn-nova-mov span { display: none; }
            .btn-nova-mov { padding: 9px 12px; }
        }

        /* ─────────────────────────────────────────────
           RODAPÉ FIXO
        ───────────────────────────────────────────── */
        .btn-nova-mov {
            display: inline-flex;
            align-items: center;
            gap: 7px;
            padding: 9px 16px;
            background: var(--primary);
            color: #fff;
            border: none;
            border-radius: var(--radius-md);
            font-size: 0.875rem;
            font-weight: 600;
            cursor: pointer;
            font-family: inherit;
            white-space: nowrap;
            transition: background 0.15s, transform 0.1s;
            flex-shrink: 0;
        }
        .btn-nova-mov:hover { background: var(--primary-hover); transform: translateY(-1px); }
        .btn-nova-mov svg { width: 16px; height: 16px; }

        /* ─────────────────────────────────────────────
           MODAL NOVA MOVIMENTAÇÃO
        ───────────────────────────────────────────── */
        .modal-overlay {
            display: none;
            position: fixed;
            inset: 0;
            z-index: 1000;
            background: rgba(0,0,0,0.45);
            align-items: center;
            justify-content: center;
            padding: 16px;
            box-sizing: border-box;
        }
        .modal-overlay.active { display: flex; }

        .modal-sheet {
            background: var(--card-bg);
            width: 100%;
            max-width: 480px;
            max-height: 92vh;
            border-radius: 20px;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            box-shadow: 0 24px 64px rgba(0,0,0,0.22);
            animation: modalFadeIn 0.2s ease;
        }
        @keyframes modalFadeIn {
            from { opacity: 0; transform: scale(0.96) translateY(10px); }
            to   { opacity: 1; transform: scale(1) translateY(0); }
        }
        @media (max-width: 540px) {
            .modal-overlay { align-items: flex-end; padding: 0; }
            .modal-sheet {
                border-radius: 20px 20px 0 0;
                max-width: 100%;
                max-height: 95vh;
            }
        }

        .modal-header {
            display: flex;
            align-items: center;
            padding: 16px 20px;
            border-bottom: 1px solid var(--border);
            flex-shrink: 0;
        }
        .modal-close-btn {
            background: none; border: none; cursor: pointer;
            color: var(--text-muted); display: flex; align-items: center;
            padding: 4px; border-radius: 8px; transition: background 0.15s;
        }
        .modal-close-btn:hover { background: var(--border); }
        .modal-title {
            flex: 1; text-align: center;
            font-size: 1rem; font-weight: 600; color: var(--text-main);
        }
        .modal-header-spacer { width: 28px; }

        .modal-body {
            padding: 20px;
            display: flex;
            flex-direction: column;
            gap: 16px;
            overflow-y: auto;
            flex: 1;
        }
        .modal-footer {
            padding: 16px 20px;
            border-top: 1px solid var(--border);
            flex-shrink: 0;
            background: var(--card-bg);
        }

        .modal-field { display: flex; flex-direction: column; gap: 6px; }
        .modal-field label { font-size: 0.8rem; font-weight: 500; color: var(--text-muted); }
        .modal-input {
            width: 100%; padding: 10px 14px;
            border: 1px solid var(--border); border-radius: var(--radius-md);
            font-size: 0.9rem; color: var(--text-main);
            background: var(--input-bg); outline: none;
            transition: border-color 0.15s; font-family: inherit;
            box-sizing: border-box;
        }
        .modal-input:focus { border-color: var(--primary); }
        .modal-textarea { min-height: 80px; resize: vertical; }

        .btn-modal-save {
            width: 100%; padding: 14px;
            background: var(--primary); color: #fff;
            border: none; border-radius: var(--radius-md);
            font-size: 0.95rem; font-weight: 600; cursor: pointer;
            transition: background 0.15s; font-family: inherit;
        }
        .btn-modal-save:hover { background: var(--primary-hover); }

        /* ─────────────────────────────────────────────
           TOGGLE RECEITA / DESPESA
        ───────────────────────────────────────────── */
        .type-toggle {
            display: grid;
            grid-template-columns: 1fr 1fr;
            background: var(--app-bg);
            border: 1px solid var(--border);
            border-radius: var(--radius-md);
            padding: 4px;
            gap: 4px;
        }
        .type-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 7px;
            padding: 10px;
            border: none;
            border-radius: calc(var(--radius-md) - 2px);
            background: transparent;
            font-size: 0.875rem;
            font-weight: 600;
            cursor: pointer;
            font-family: inherit;
            color: var(--text-muted);
            transition: background 0.18s, color 0.18s, box-shadow 0.18s;
        }
        .type-btn svg { width: 16px; height: 16px; }

        .type-btn.active-receita {
            background: #dcfce7;
            color: #15803d;
            box-shadow: 0 1px 4px rgba(0,0,0,0.08);
        }
        .type-btn.active-despesa {
            background: #fee2e2;
            color: #dc2626;
            box-shadow: 0 1px 4px rgba(0,0,0,0.08);
        }
        [data-theme="dark"] .type-btn.active-receita { background: #14532d; color: #86efac; }
        [data-theme="dark"] .type-btn.active-despesa { background: #450a0a; color: #fca5a5; }

        /* ─────────────────────────────────────────────
           LINHA SEPARADORA DO EXTRATO
        ───────────────────────────────────────────── */
        .extrato-sep {
            font-size: 0.7rem;
            font-weight: 700;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.07em;
            padding: 4px 2px 2px;
        }

/* =====================================================   FINANCEIRO — NOVA MOVIMENTAÇÃO (dossier full-screen)
============================================================ */
        /* ── Tipo: Receita / Despesa ── */
        .nmov-type-grid {
            display: grid; grid-template-columns: 1fr 1fr;
            gap: 12px; margin-bottom: 32px;
        }
        .nmov-type-card {
            display: flex; flex-direction: column; align-items: center;
            gap: 8px; padding: 22px 16px;
            border: 2px solid var(--border);
            border-radius: var(--radius-lg);
            background: var(--card-bg); cursor: pointer;
            transition: border-color 0.15s, background 0.15s;
            font-family: 'Inter', sans-serif;
        }
        .nmov-type-card:hover { border-color: var(--primary); }
        .nmov-type-icon {
            width: 52px; height: 52px; border-radius: 50%;
            display: flex; align-items: center; justify-content: center;
            background: var(--app-bg); transition: background 0.15s, color 0.15s;
        }
        .nmov-type-icon svg { width: 24px; height: 24px; }
        .nmov-type-label { font-size: 1rem; font-weight: 700; color: var(--text-main); transition: color 0.15s; }
        .nmov-type-sub   { font-size: 0.75rem; color: var(--text-muted); }

        .nmov-type-receita.active { border-color: #16a34a; background: #f0fdf4; }
        .nmov-type-receita.active .nmov-type-icon  { background: #dcfce7; color: #16a34a; }
        .nmov-type-receita.active .nmov-type-label { color: #16a34a; }

        .nmov-type-despesa.active { border-color: #dc2626; background: #fef2f2; }
        .nmov-type-despesa.active .nmov-type-icon  { background: #fee2e2; color: #dc2626; }
        .nmov-type-despesa.active .nmov-type-label { color: #dc2626; }

        [data-theme="dark"] .nmov-type-receita.active { background: #052e16; border-color: #16a34a; }
        [data-theme="dark"] .nmov-type-receita.active .nmov-type-icon { background: #14532d; }
        [data-theme="dark"] .nmov-type-despesa.active { background: #2d0a0a; border-color: #dc2626; }
        [data-theme="dark"] .nmov-type-despesa.active .nmov-type-icon { background: #450a0a; }

        /* ── Valor ── */
        .nmov-valor-block { margin-bottom: 24px; }
        .nmov-field-label {
            display: flex; align-items: center; gap: 7px;
            font-size: 0.8rem; font-weight: 600; color: var(--text-muted);
            text-transform: uppercase; letter-spacing: 0.05em;
            margin-bottom: 8px;
        }
        .nmov-field-label svg { width: 13px; height: 13px; }
        .nmov-label-optional {
            font-size: 0.72rem; font-weight: 400; text-transform: none;
            letter-spacing: 0; color: var(--text-light); margin-left: 2px;
        }
        .nmov-valor-wrap {
            display: flex; align-items: center;
            border: 2px solid var(--border); border-radius: var(--radius-md);
            overflow: hidden; transition: border-color 0.15s;
        }
        .nmov-valor-wrap:focus-within { border-color: var(--primary); }
        .nmov-valor-prefix {
            padding: 0 16px; font-size: 1rem; font-weight: 700;
            color: var(--text-muted); background: var(--app-bg);
            border-right: 2px solid var(--border);
            height: 54px; display: flex; align-items: center; flex-shrink: 0;
        }
        .nmov-valor-input {
            flex: 1; height: 54px; border: none; outline: none;
            padding: 0 18px; font-size: 1.35rem; font-weight: 700;
            color: var(--text-main); background: var(--card-bg);
            font-family: 'Inter', sans-serif;
        }
        .nmov-valor-input::placeholder { color: var(--text-light); font-weight: 400; font-size: 1.1rem; }

        /* ── Fields ── */
        .nmov-field-group { margin-bottom: 20px; }
        .nmov-input {
            width: 100%; height: 46px; padding: 0 14px;
            border: 1.5px solid var(--border); border-radius: var(--radius-md);
            background: var(--card-bg); color: var(--text-main);
            font-size: 0.92rem; font-family: 'Inter', sans-serif;
            outline: none; transition: border-color 0.15s; box-sizing: border-box;
        }
        .nmov-input:focus { border-color: var(--primary); }
        .nmov-input-search-wrap { position: relative; }
        .nmov-input-search-icon {
            position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
            width: 15px; height: 15px; color: var(--text-muted); pointer-events: none;
        }
        .nmov-input-search-wrap .nmov-input { padding-left: 38px; }
        .nmov-textarea { height: 88px; padding: 12px 14px; resize: vertical; line-height: 1.6; }

        /* ── Status pills ── */
        .nmov-status-row { display: flex; gap: 8px; }
        .nmov-status-pill {
            flex: 1; padding: 9px 8px;
            border: 1.5px solid var(--border); border-radius: 24px;
            background: var(--card-bg); color: var(--text-muted);
            font-size: 0.83rem; font-weight: 600; cursor: pointer;
            font-family: 'Inter', sans-serif; transition: all 0.15s;
            text-align: center;
        }
        .nmov-status-pill:hover { border-color: var(--primary); color: var(--primary); }
        .nmov-status-pill.active { border-color: var(--primary); background: var(--primary-light); color: var(--primary); }

        .nmov-btn-save {
            padding: 7px 18px; background: var(--primary); color: #fff;
            border: none; border-radius: var(--radius-md);
            font-size: 0.82rem; font-weight: 700;
            font-family: 'Inter', sans-serif; cursor: pointer;
            transition: background 0.15s; white-space: nowrap; flex-shrink: 0;
            margin-right: 12%;
        }
        .nmov-btn-save:hover { background: var(--primary-hover); }

/* =====================================================   FINANCEIRO — DOSSIER DE MOVIMENTAÇÃO
============================================================ */

        /* ── Hero card ── */
        .movd-hero-card {
            border-radius: var(--radius-lg);
            border: 1.5px solid var(--border);
            border-top-width: 4px;
            padding: 20px 22px 22px;
            margin-bottom: 16px;
            background: var(--card-bg);
            box-shadow: var(--shadow-sm);
        }
        .movd-hero-card.tipo-receita { border-top-color: #16a34a; }
        .movd-hero-card.tipo-despesa { border-top-color: #dc2626; }

        .movd-hero-top {
            display: flex; align-items: center;
            justify-content: space-between; margin-bottom: 18px;
        }
        .movd-hero-icon {
            width: 44px; height: 44px; border-radius: 50%;
            display: flex; align-items: center; justify-content: center; flex-shrink: 0;
        }
        .movd-hero-icon svg { width: 22px; height: 22px; }
        .movd-hero-icon.tipo-receita { background: #dcfce7; color: #16a34a; }
        .movd-hero-icon.tipo-despesa { background: #fee2e2; color: #dc2626; }

        .movd-hero-badges {
            display: flex; gap: 8px; align-items: center;
            flex-wrap: wrap; justify-content: flex-end;
        }
        .movd-badge-tipo {
            padding: 3px 11px; border-radius: 999px;
            font-size: 0.75rem; font-weight: 600; border: 1.5px solid transparent;
        }
        .movd-badge-tipo.tipo-receita { background: #dcfce7; color: #16a34a; border-color: #86efac; }
        .movd-badge-tipo.tipo-despesa { background: #fee2e2; color: #dc2626; border-color: #fca5a5; }

        .movd-hero-valor {
            font-size: 2.4rem; font-weight: 800; line-height: 1; margin-bottom: 6px;
        }
        .movd-hero-valor.tipo-receita { color: #16a34a; }
        .movd-hero-valor.tipo-despesa { color: #dc2626; }

        .movd-hero-titulo {
            font-size: 0.92rem; color: var(--text-muted); font-weight: 500; line-height: 1.4;
        }

        [data-theme="dark"] .movd-hero-icon.tipo-receita  { background: #14532d; color: #86efac; }
        [data-theme="dark"] .movd-hero-icon.tipo-despesa  { background: #450a0a; color: #fca5a5; }
        [data-theme="dark"] .movd-hero-valor.tipo-receita { color: #4ade80; }
        [data-theme="dark"] .movd-hero-valor.tipo-despesa { color: #f87171; }
        [data-theme="dark"] .movd-badge-tipo.tipo-receita { background: #14532d; color: #86efac; border-color: #166534; }
        [data-theme="dark"] .movd-badge-tipo.tipo-despesa { background: #450a0a; color: #fca5a5; border-color: #7f1d1d; }

        /* ── Stats grid ── */
        .movd-stats-grid {
            display: grid; grid-template-columns: 1fr 1fr;
            gap: 10px; margin-bottom: 10px;
        }
        .movd-stat {
            background: var(--card-bg); border: 1px solid var(--border);
            border-radius: var(--radius-md); padding: 14px 16px;
        }
        .movd-stat-full { grid-column: 1 / -1; }
        .movd-stat-label {
            display: block; font-size: 0.7rem; font-weight: 700;
            text-transform: uppercase; letter-spacing: 0.06em;
            color: var(--text-muted); margin-bottom: 5px;
        }
        .movd-stat-value {
            display: block; font-size: 0.92rem; font-weight: 600; color: var(--text-main);
        }
        .movd-stat-muted {
            color: var(--text-muted) !important;
            font-style: italic; font-weight: 400 !important;
        }

        /* ── Descrição ── */
        .movd-desc-block {
            background: var(--card-bg); border: 1px solid var(--border);
            border-radius: var(--radius-md); padding: 14px 16px; margin-bottom: 4px;
        }
        .movd-desc-label {
            display: block; font-size: 0.7rem; font-weight: 700;
            text-transform: uppercase; letter-spacing: 0.06em;
            color: var(--text-muted); margin-bottom: 6px;
        }
        .movd-desc-text {
            font-size: 0.92rem; color: var(--text-main); line-height: 1.6; margin: 0;
        }

        /* ── Actions ── */
        .movd-actions { display: flex; gap: 10px; margin-top: 24px; }
        .movd-btn-edit {
            flex: 1; display: flex; align-items: center; justify-content: center;
            gap: 8px; padding: 11px 16px;
            border: 1.5px solid var(--border); border-radius: var(--radius-md);
            background: var(--card-bg); color: var(--text-main);
            font-size: 0.88rem; font-weight: 600;
            font-family: 'Inter', sans-serif; cursor: pointer; transition: all 0.15s;
        }
        .movd-btn-edit:hover { border-color: var(--primary); color: var(--primary); }
        .movd-btn-edit svg { width: 15px; height: 15px; }
        .movd-btn-delete {
            display: flex; align-items: center; justify-content: center;
            gap: 8px; padding: 11px 18px;
            border: 1.5px solid #fecaca; border-radius: var(--radius-md);
            background: #fff5f5; color: #dc2626;
            font-size: 0.88rem; font-weight: 600;
            font-family: 'Inter', sans-serif; cursor: pointer; transition: all 0.15s;
        }
        .movd-btn-delete:hover { background: #fee2e2; border-color: #dc2626; }
        .movd-btn-delete svg { width: 15px; height: 15px; }
        [data-theme="dark"] .movd-btn-delete { background: #2d0a0a; border-color: #7f1d1d; color: #fca5a5; }
        [data-theme="dark"] .movd-btn-delete:hover { background: #450a0a; }

/* =====================================================   CONFIGURAÇÕES — LAYOUT & COMPONENTES
============================================================ */
.cfg-layout {
    display: grid;
    grid-template-columns: 210px 1fr;
    gap: 24px;
    align-items: start;
}
.cfg-sidenav {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 8px;
    display: flex; flex-direction: column; gap: 2px;
    position: sticky;
    top: calc(64px + 24px);
}
.cfg-nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    border: none; background: transparent;
    color: var(--text-muted);
    font-size: 0.875rem; font-weight: 500;
    font-family: 'Inter', sans-serif;
    cursor: pointer; text-align: left; width: 100%;
    transition: all 0.15s;
}
.cfg-nav-item:hover { background: var(--hover-bg); color: var(--text-main); }
.cfg-nav-item.active { background: var(--primary-light); color: var(--primary); font-weight: 600; }
.cfg-nav-item svg { width: 16px; height: 16px; flex-shrink: 0; }

.cfg-content { min-width: 0; }
.cfg-section { display: none; }
.cfg-section.active { display: block; }

/* ── Card ── */
.cfg-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.cfg-card-header {
    display: flex; align-items: flex-start;
    justify-content: space-between; gap: 16px;
    padding: 22px 24px 18px;
    border-bottom: 1px solid var(--border);
}
.cfg-card-title { font-size: 1rem; font-weight: 700; color: var(--text-main); margin-bottom: 3px; }
.cfg-card-desc  { font-size: 0.82rem; color: var(--text-muted); line-height: 1.4; max-width: 380px; }
.cfg-card-header-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; padding-top: 2px; }
.cfg-count { font-size: 0.78rem; color: var(--text-muted); font-weight: 500; white-space: nowrap; }

/* ── Item list ── */
.cfg-item {
    display: flex; align-items: center; gap: 14px;
    padding: 13px 24px;
    border-bottom: 1px solid var(--border);
    transition: background 0.12s;
}
.cfg-item:last-child { border-bottom: none; }
.cfg-item:hover { background: var(--hover-bg); }

.cfg-item-icon {
    width: 38px; height: 38px; border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.cfg-item-icon svg { width: 17px; height: 17px; }

.cfg-item-name { flex: 1; font-size: 0.9rem; font-weight: 600; color: var(--text-main); min-width: 0; }

.cfg-item-preset {
    font-size: 0.67rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.05em; color: var(--text-muted);
    background: var(--hover-bg); padding: 2px 9px;
    border-radius: 999px; border: 1px solid var(--border);
    white-space: nowrap; flex-shrink: 0;
}
.cfg-item-actions { display: flex; gap: 4px; flex-shrink: 0; }
.cfg-item-btn {
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius-md); border: none; background: transparent;
    cursor: pointer; color: var(--text-muted); transition: all 0.15s;
}
.cfg-item-btn:hover { background: var(--hover-bg); color: var(--text-main); }
.cfg-item-btn.del:hover { background: #fee2e2; color: #dc2626; }
.cfg-item-btn svg { width: 15px; height: 15px; }
[data-theme="dark"] .cfg-item-btn.del:hover { background: #450a0a; color: #fca5a5; }

.cfg-empty {
    padding: 40px 24px; text-align: center;
    color: var(--text-muted); font-size: 0.875rem; font-style: italic;
}

/* ── Add/Edit Modal ── */
.cfg-modal-sheet { max-width: 420px; }
.cfg-modal-body {
    padding: 20px 24px; display: flex; flex-direction: column; gap: 20px;
    overflow-y: auto; max-height: calc(min(90vh, 640px) - 160px);
}
.cfg-field-label {
    display: block; font-size: 0.72rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.06em;
    color: var(--text-muted); margin-bottom: 8px;
}
.cfg-name-input {
    width: 100%; padding: 10px 14px; box-sizing: border-box;
    border: 1.5px solid var(--border); border-radius: var(--radius-md);
    font-size: 0.9rem; font-family: 'Inter', sans-serif;
    background: var(--card-bg); color: var(--text-main);
    outline: none; transition: border-color 0.15s, box-shadow 0.15s;
}
.cfg-name-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.08);
}

/* Icon picker */
.cfg-icon-top { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.cfg-icon-preview-btn {
    width: 52px; height: 52px; border-radius: var(--radius-md);
    border: 1.5px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; transition: background 0.15s, border-color 0.15s;
}
.cfg-icon-preview-btn svg { width: 24px; height: 24px; }
.cfg-icon-hint { font-size: 0.8rem; color: var(--text-muted); }

.cfg-icon-grid {
    display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px;
    padding: 10px; background: var(--hover-bg);
    border-radius: var(--radius-md); border: 1px solid var(--border);
}
.cfg-icon-opt {
    height: 42px;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius-md); border: 1.5px solid transparent;
    cursor: pointer; color: var(--text-muted);
    transition: all 0.12s; background: transparent;
}
.cfg-icon-opt:hover { background: var(--card-bg); color: var(--text-main); border-color: var(--border); }
.cfg-icon-opt.active { background: var(--primary-light); color: var(--primary); border-color: var(--primary); }
.cfg-icon-opt svg { width: 18px; height: 18px; }

/* Color picker */
.cfg-color-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cfg-color-swatch {
    width: 28px; height: 28px; border-radius: 50%;
    border: 2px solid transparent; cursor: pointer;
    transition: transform 0.12s, box-shadow 0.12s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.cfg-color-swatch:hover { transform: scale(1.2); }
.cfg-color-swatch.active {
    box-shadow: 0 0 0 2px var(--card-bg), 0 0 0 4px var(--text-main);
    transform: scale(1.1);
}
.cfg-color-custom {
    width: 28px; height: 28px; border-radius: 50%;
    border: 2px dashed var(--border); cursor: pointer;
    padding: 0; background: none;
    appearance: none; -webkit-appearance: none;
    overflow: hidden; flex-shrink: 0;
}

/* Modal footer */
.cfg-modal-footer {
    padding: 14px 24px 20px; border-top: 1px solid var(--border);
    display: flex; gap: 10px;
}

/* Responsive */
@media (max-width: 720px) {
    .cfg-layout { grid-template-columns: 1fr; gap: 16px; }
    .cfg-sidenav {
        flex-direction: row; flex-wrap: wrap;
        position: static; padding: 6px; gap: 4px;
    }
    .cfg-nav-item { flex: 1 0 auto; justify-content: center; padding: 9px 10px; }
    .cfg-card-header { flex-direction: column; gap: 12px; }
    .cfg-card-header-right { align-self: flex-end; }
    .cfg-item { padding: 12px 16px; }
    .cfg-card-header { padding: 16px 16px 14px; }
}

/* ── CONFIGURAÇÕES — MINHA CONTA ── */
.cfg-profile-hero {
    display: flex; align-items: center; gap: 18px;
    padding: 22px 24px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(120deg, var(--primary-light) 0%, var(--card-bg) 70%);
}
[data-theme="dark"] .cfg-profile-hero {
    background: linear-gradient(120deg, rgba(37,99,235,0.12) 0%, var(--card-bg) 70%);
}
.cfg-profile-avatar-lg {
    width: 62px; height: 62px; border-radius: 50%;
    background: var(--primary); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; font-weight: 700; flex-shrink: 0;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.18);
}
.cfg-profile-name { font-size: 1.1rem; font-weight: 700; color: var(--text-main); margin-bottom: 3px; }
.cfg-profile-meta { font-size: 0.82rem; color: var(--text-muted); }
.cfg-form-body { padding: 20px 24px; display: flex; flex-direction: column; gap: 16px; }
.cfg-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cfg-form-grid .cfg-input-group.full { grid-column: 1 / -1; }
.cfg-input-group { display: flex; flex-direction: column; gap: 5px; }
.cfg-input-group label {
    font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.07em; color: var(--text-muted);
}
.cfg-input {
    padding: 9px 13px;
    border: 1.5px solid var(--border); border-radius: var(--radius-md);
    font-size: 0.875rem; font-family: 'Inter', sans-serif;
    background: var(--card-bg); color: var(--text-main);
    outline: none; transition: border-color 0.15s, box-shadow 0.15s;
    width: 100%; box-sizing: border-box;
}
.cfg-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,0.08); }
.cfg-input[disabled] { opacity: 0.55; cursor: not-allowed; background: var(--hover-bg); }
.cfg-form-footer {
    padding: 4px 24px 20px;
    display: flex; justify-content: flex-end; gap: 10px;
}

/* ── CONFIGURAÇÕES — EQUIPE ── */
.cfg-section-gap { display: flex; flex-direction: column; gap: 18px; }
.cfg-colab-item {
    display: flex; align-items: center; gap: 14px;
    padding: 11px 24px;
    border-bottom: 1px solid var(--border);
    transition: background 0.12s;
}
.cfg-colab-item:last-child { border-bottom: none; }
.cfg-colab-item:hover { background: var(--hover-bg); }
.cfg-colab-avatar {
    width: 38px; height: 38px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.8rem; font-weight: 700; color: #fff; flex-shrink: 0;
}
.cfg-colab-info { flex: 1; min-width: 0; }
.cfg-colab-name { font-size: 0.875rem; font-weight: 600; color: var(--text-main); }
.cfg-colab-sub  { font-size: 0.775rem; color: var(--text-muted); }
.cfg-colab-email {
    font-size: 0.8rem; color: var(--text-muted);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 190px;
}
.cfg-status-pill-badge {
    padding: 3px 10px; border-radius: 999px;
    font-size: 0.7rem; font-weight: 700; white-space: nowrap;
}
.cfg-status-pill-badge.ativo   { background: #dcfce7; color: #16a34a; }
.cfg-status-pill-badge.inativo { background: var(--hover-bg); color: var(--text-muted); border: 1px solid var(--border); }
[data-theme="dark"] .cfg-status-pill-badge.ativo { background: rgba(22,163,74,0.18); color: #86efac; }

/* Modal colaborador */
.cfg-select {
    padding: 9px 34px 9px 13px;
    border: 1.5px solid var(--border); border-radius: var(--radius-md);
    font-size: 0.875rem; font-family: 'Inter', sans-serif;
    background: var(--card-bg); color: var(--text-main);
    outline: none; cursor: pointer; width: 100%; box-sizing: border-box;
    transition: border-color 0.15s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center;
}
.cfg-select:focus { border-color: var(--primary); }
.cfg-status-toggle { display: flex; gap: 8px; }
.cfg-status-opt {
    padding: 7px 18px; border-radius: 999px;
    border: 1.5px solid var(--border); background: transparent;
    font-size: 0.85rem; font-weight: 500; cursor: pointer;
    color: var(--text-muted); font-family: 'Inter', sans-serif;
    transition: all 0.15s;
}
.cfg-status-opt.sel-ativo   { border-color: #16a34a; background: #dcfce7; color: #16a34a; font-weight: 600; }
.cfg-status-opt.sel-inativo { border-color: var(--border); background: var(--hover-bg); color: var(--text-main); font-weight: 600; }
[data-theme="dark"] .cfg-status-opt.sel-ativo { background: rgba(22,163,74,0.18); color: #86efac; }

/* Campo com botão interno (senha + chave) */
.cfg-input-eye {
    position: relative; display: flex; align-items: center;
}
.cfg-input-eye .cfg-input { padding-right: 40px; }
.cfg-eye-btn {
    position: absolute; right: 10px;
    background: none; border: none; cursor: pointer;
    color: var(--text-muted); padding: 4px;
    display: flex; align-items: center;
    transition: color 0.15s;
}
.cfg-eye-btn:hover { color: var(--primary); }
.cfg-eye-btn i { width: 16px; height: 16px; }

/* Chave monospaced */
.cfg-chave-input { font-family: 'Courier New', monospace; letter-spacing: 0.1em; font-weight: 600; }

/* Badge da chave na lista */
.cfg-chave-badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 9px; border-radius: var(--radius-sm);
    background: var(--hover-bg); border: 1px solid var(--border);
    font-family: 'Courier New', monospace; font-size: 0.75rem;
    font-weight: 700; color: var(--text-muted); white-space: nowrap;
    letter-spacing: 0.06em; cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    user-select: none;
}
.cfg-chave-badge:hover { background: var(--primary-light); border-color: var(--primary); color: var(--primary); }
.cfg-chave-badge.copiado { background: #dcfce7; border-color: #86efac; color: #16a34a; }
[data-theme="dark"] .cfg-chave-badge.copiado { background: rgba(22,163,74,0.18); border-color: #166534; color: #86efac; }
.cfg-chave-badge i { width: 12px; height: 12px; flex-shrink: 0; }

/* Modal largo para cargos */
.cfg-modal-sheet.wide { max-width: 600px; }
.cfg-modal-sheet.wide .cfg-modal-body { max-height: 70vh; overflow-y: auto; }

/* ── Permissões de cargo ── */
.cfg-perm-wrap {
    border-top: 1px solid var(--border);
    padding: 18px 0 4px;
    display: flex; flex-direction: column; gap: 6px;
}
.cfg-perm-wrap-title {
    font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.07em; color: var(--text-muted); margin-bottom: 4px;
}
.cfg-perm-section {
    border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden;
}
.cfg-perm-header {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 13px; cursor: pointer; background: none;
    width: 100%; text-align: left; border: none;
    font-family: 'Inter', sans-serif;
    transition: background 0.12s;
}
.cfg-perm-header:hover { background: var(--hover-bg); }
.cfg-perm-header-icon { width: 15px; height: 15px; color: var(--text-muted); flex-shrink: 0; }
.cfg-perm-header-label { flex: 1; font-size: 0.85rem; font-weight: 600; color: var(--text-main); }
.cfg-perm-all-label {
    display: flex; align-items: center; gap: 5px;
    font-size: 0.75rem; color: var(--text-muted); white-space: nowrap;
    cursor: pointer; margin-right: 4px;
}
.cfg-perm-all-label input { accent-color: var(--primary); cursor: pointer; }
.cfg-perm-chevron {
    width: 14px; height: 14px; color: var(--text-muted);
    transition: transform 0.2s ease; flex-shrink: 0;
}
.cfg-perm-section.open .cfg-perm-chevron { transform: rotate(180deg); }
.cfg-perm-body {
    max-height: 0; overflow: hidden;
    transition: max-height 0.25s ease;
}
.cfg-perm-section.open .cfg-perm-body { max-height: 300px; }
.cfg-perm-items {
    padding: 6px 14px 12px;
    display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px;
    background: var(--hover-bg);
    border-top: 1px solid var(--border);
}
.cfg-perm-item {
    display: flex; align-items: center; gap: 7px;
    font-size: 0.82rem; color: var(--text-main);
}
.cfg-perm-item input[type="checkbox"] {
    accent-color: var(--primary); width: 14px; height: 14px;
    cursor: pointer; flex-shrink: 0;
}
.cfg-perm-item label { cursor: pointer; line-height: 1.3; }
.cfg-perm-item input:disabled + label { opacity: 0.5; cursor: not-allowed; }

/* Divider no sidenav */
.cfg-nav-divider { border: none; border-top: 1px solid var(--border); margin: 4px 0; }

/* ── Sanfona / Accordion ── */
.cfg-accordion {
    border-top: 1px solid var(--border);
    margin: 0 24px;
}
.cfg-accordion-toggle {
    display: flex; align-items: center; justify-content: space-between;
    width: 100%; padding: 13px 0;
    background: none; border: none; cursor: pointer;
    color: var(--text-main); font-family: 'Inter', sans-serif;
    font-size: 0.875rem; font-weight: 600;
    transition: color 0.15s;
}
.cfg-accordion-toggle:hover { color: var(--primary); }
.cfg-accordion-toggle-left { display: flex; align-items: center; gap: 8px; color: var(--text-muted); }
.cfg-accordion-toggle-left i { width: 16px; height: 16px; }
.cfg-accordion-toggle:hover .cfg-accordion-toggle-left { color: var(--primary); }
.cfg-accordion-chevron {
    width: 16px; height: 16px; color: var(--text-muted);
    transition: transform 0.22s ease;
    flex-shrink: 0;
}
.cfg-accordion.open .cfg-accordion-chevron { transform: rotate(180deg); }
.cfg-accordion-body {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease, opacity 0.25s ease;
    opacity: 0;
}
.cfg-accordion.open .cfg-accordion-body {
    max-height: 600px;
    opacity: 1;
}
.cfg-accordion-inner {
    padding-bottom: 20px;
    display: flex; flex-direction: column; gap: 16px;
}

@media (max-width: 720px) {
    .cfg-form-grid { grid-template-columns: 1fr; }
    .cfg-colab-email { display: none; }
    .cfg-nav-divider { display: none; }
    .cfg-accordion { margin: 0 16px; }
}
