/* ============================================================
   DESIGN SYSTEM — Hokkaido (Fase 0)
   Paleta derivada da logo (preto + vermelho). Usar SEMPRE os tokens.
   ============================================================ */
:root {
    --hk-vermelho: #dc3545;        /* cor primária da marca */
    --hk-vermelho-hover: #c82333;  /* hover/active */
    --hk-vinho: #a01e2b;           /* vermelho escuro (barra da logo) — perigo/acento */
    --hk-preto: #1a1a1a;
    --hk-grafite: #2d2d2d;
    --hk-cinza: #6b7280;           /* texto secundário */
    --hk-cinza-claro: #e0e0e0;     /* bordas/divisórias */
    --hk-fundo: #f8f9fa;
    --hk-branco: #ffffff;
    --hk-sucesso: #1e7e34;         /* só para feedback de sucesso (não é cor de botão) */

    --hk-raio: 10px;               /* border-radius padrão */
    --hk-sombra: 0 2px 8px rgba(0,0,0,.08);

    /* Escala de espaçamento e tipografia (usar incrementalmente) */
    --hk-space-1: 4px; --hk-space-2: 8px; --hk-space-3: 12px;
    --hk-space-4: 16px; --hk-space-5: 24px; --hk-space-6: 32px;
    --hk-fs-sm: .85rem; --hk-fs-base: .95rem; --hk-fs-lg: 1.15rem; --hk-fs-xl: 1.5rem;
}

/* ===== ACESSIBILIDADE (Fase 3) ===== */
/* Foco visível consistente (teclado) em tudo que é interativo. */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible,
.btn:focus-visible, .btn-details:focus-visible, .ckc-btn:focus-visible {
    outline: 3px solid rgba(220,53,69,.5) !important;
    outline-offset: 2px !important;
    border-radius: 6px;
}

/* Alvo de toque mínimo em botões de ícone (tablet da recepção). */
.btn-details, .ckc-btn, .hk-toast-x, .hk-modal-close, .password-toggle {
    min-width: 40px; min-height: 40px;
    display: inline-flex; align-items: center; justify-content: center;
}

/* Respeita quem prefere menos movimento. */
@media (prefers-reduced-motion: reduce) {
    * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
    .btn:hover, .btn-save:hover, .btn-find:hover, .btn-color-firebrick:hover,
    .btn-new-client:hover, .hk-btn:hover { transform: none !important; }
}

/* ===== Base de botões (design system) — aplicado gradualmente na Fase 1 ===== */
.hk-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    min-height: 44px; padding: .55rem 1.1rem;
    border: 2px solid transparent; border-radius: var(--hk-raio);
    font-size: .95rem; font-weight: 600; line-height: 1;
    cursor: pointer; text-decoration: none;
    transition: background .2s ease, color .2s ease, border-color .2s ease, transform .15s ease, box-shadow .2s ease;
}
.hk-btn:hover { transform: translateY(-1px); }
.hk-btn:focus-visible { outline: 3px solid rgba(220,53,69,.45); outline-offset: 2px; }
.hk-btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.hk-btn i { font-size: .9em; }

/* Primário — ação principal (1 por tela) */
.hk-btn--primario { background: var(--hk-vermelho); color: #fff; box-shadow: 0 4px 12px rgba(220,53,69,.25); }
.hk-btn--primario:hover { background: var(--hk-vermelho-hover); }

/* Secundário — ação alternativa (Voltar/Cancelar) */
.hk-btn--secundario { background: #fff; color: var(--hk-vermelho); border-color: var(--hk-vermelho); }
.hk-btn--secundario:hover { background: rgba(220,53,69,.06); }

/* Perigo — destrutivo (Excluir), sempre com confirmação */
.hk-btn--perigo { background: var(--hk-vinho); color: #fff; }
.hk-btn--perigo:hover { background: #8a1a25; }

/* Neutro — fechar/dispensar */
.hk-btn--neutro { background: #fff; color: var(--hk-cinza); border-color: var(--hk-cinza-claro); }
.hk-btn--neutro:hover { background: var(--hk-fundo); }

/* Ícone — ação compacta em listas (só ícone + title/aria-label) */
.hk-btn--icone { min-width: 44px; padding: .5rem .6rem; background: transparent; color: var(--hk-cinza); border-radius: var(--hk-raio); }
.hk-btn--icone:hover { background: var(--hk-fundo); color: var(--hk-preto); }
.hk-btn--icone.is-perigo:hover { color: var(--hk-vinho); }

/* ===== Badge de contagem de fotos no botão da câmera ===== */
.hk-foto-btn { position: relative; overflow: visible; }
.hk-foto-badge {
    position: absolute; top: -6px; right: -6px;
    min-width: 18px; height: 18px; padding: 0 4px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--hk-vermelho); color: #fff;
    font-size: 0.68rem; font-weight: 700; line-height: 1;
    border-radius: 9px; border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,.25);
}

/* ===== Histórico de serviços (alinhamento e densidade) ===== */
.hk-hist th, .hk-hist td {
    vertical-align: middle !important;   /* texto e ícones na mesma linha */
    text-align: center;
    padding: 0.35rem 0.5rem !important;  /* linhas mais compactas */
}
.hk-hist .btn-details { margin: 0 auto; min-height: 32px; min-width: 32px; }
.hk-hist .icon-container { display: flex; align-items: center; justify-content: center; }

/* ===== TOAST (feedback global) ===== */
.hk-toast-host {
    position: fixed; top: 1rem; right: 1rem; z-index: 12000;
    display: flex; flex-direction: column; gap: .6rem; max-width: 360px;
}
.hk-toast {
    display: flex; align-items: center; gap: .6rem;
    background: #fff; color: var(--hk-preto);
    border-radius: var(--hk-raio); padding: .8rem 1rem;
    box-shadow: 0 8px 24px rgba(0,0,0,.18);
    border-left: 5px solid var(--hk-cinza);
    animation: hkToastIn .25s ease;
}
.hk-toast .hk-toast-msg { flex: 1; font-size: .92rem; font-weight: 500; }
.hk-toast i:first-child { font-size: 1.1rem; }
.hk-toast--sucesso { border-left-color: var(--hk-sucesso); }
.hk-toast--sucesso > i:first-child { color: var(--hk-sucesso); }
.hk-toast--erro { border-left-color: var(--hk-vermelho); }
.hk-toast--erro > i:first-child { color: var(--hk-vermelho); }
.hk-toast--info { border-left-color: var(--hk-preto); }
.hk-toast--info > i:first-child { color: var(--hk-preto); }
.hk-toast-x { background: none; border: none; color: var(--hk-cinza); cursor: pointer; padding: .2rem; }
.hk-toast-x:hover { color: var(--hk-preto); }
@keyframes hkToastIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }

/* ===== ESTADOS (carregando / vazio / erro) ===== */
.hk-estado {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; gap: .5rem; padding: 2.5rem 1rem; color: var(--hk-cinza);
}
.hk-estado-icone { font-size: 2rem; color: var(--hk-cinza-claro); }
.hk-estado-msg { margin: 0; font-size: .95rem; }
.hk-estado-acao { margin-top: .4rem; }

/* ===== SWITCH DE TEMA (liga/desliga claro/escuro) ===== */
.hk-theme-switch { display:inline-flex; align-items:center; cursor:pointer; margin-right:1rem; user-select:none; }
.hk-theme-switch input { position:absolute; opacity:0; width:0; height:0; }
.hk-theme-track {
    position:relative; width:54px; height:27px; border-radius:14px;
    background:rgba(255,255,255,.18); border:1px solid rgba(255,255,255,.25);
    display:inline-flex; align-items:center; justify-content:space-between;
    padding:0 7px; transition:background .25s ease;
}
.hk-theme-track i { font-size:.72rem; color:#fff; z-index:1; }
.hk-theme-knob {
    position:absolute; top:2px; left:2px; width:21px; height:21px; border-radius:50%;
    background:#fff; box-shadow:0 1px 3px rgba(0,0,0,.35); transition:transform .25s ease;
}
.hk-theme-switch input:checked + .hk-theme-track { background:var(--hk-vermelho); border-color:var(--hk-vermelho); }
.hk-theme-switch input:checked + .hk-theme-track .hk-theme-knob { transform:translateX(27px); }
.hk-theme-switch input:focus-visible + .hk-theme-track { outline:3px solid rgba(255,255,255,.6); outline-offset:2px; }

/* ============================================================
   TEMA ESCURO — cinzas neutros + acento vermelho da marca (sóbrio)
   ============================================================ */
:root[data-theme="dark"] {
    --hk-branco: #1e2127;        /* superfícies */
    --hk-fundo: #15171a;         /* fundo */
    --hk-cinza: #9aa1ab;         /* texto secundário */
    --hk-cinza-claro: #2e333c;   /* bordas */
    --hk-preto: #e7e9ec;         /* texto forte */
}

[data-theme="dark"] body,
[data-theme="dark"] .page,
[data-theme="dark"] main { background:#15171a !important; }

[data-theme="dark"] article.content,
[data-theme="dark"] .content {
    background:#15171a !important;   /* remove o painel branco das telas */
    box-shadow:none !important;
    color:#d8dbe0;
}
[data-theme="dark"] .content h1, [data-theme="dark"] .content h2,
[data-theme="dark"] .content h3, [data-theme="dark"] .content h4,
[data-theme="dark"] .content h5, [data-theme="dark"] .content h6,
[data-theme="dark"] .hk-page-title { color:#e7e9ec !important; }
[data-theme="dark"] .page-background { background:#15171a !important; }

/* Superfícies (cards, modais, barras, toasts) */
[data-theme="dark"] .action-card,
[data-theme="dark"] .cmp-card,
[data-theme="dark"] .hk-card,
[data-theme="dark"] .modal-content,
[data-theme="dark"] .sig-modal,
[data-theme="dark"] .hk-modal-box,
[data-theme="dark"] .hk-toast,
[data-theme="dark"] .agenda-hoje,
[data-theme="dark"] .hk-search-bar {
    background:#1e2127 !important;
    border-color:#2e333c !important;
    color:#d8dbe0;
}
[data-theme="dark"] .modal-body { background:#1e2127; color:#d8dbe0; }
[data-theme="dark"] .modal-footer { background:#191c21; border-color:#2e333c; }

/* Textos hardcoded (!important vence o CSS scoped dos componentes) */
[data-theme="dark"] .action-card h3,
[data-theme="dark"] .cmp-atual,
[data-theme="dark"] .cmp-secao-titulo,
[data-theme="dark"] .hk-form-section-title,
[data-theme="dark"] .agenda-hoje-header h2,
[data-theme="dark"] .content h3,
[data-theme="dark"] .modal-title { color:#e7e9ec !important; }
[data-theme="dark"] .action-card p,
[data-theme="dark"] .cmp-titulo,
[data-theme="dark"] .cmp-anterior,
[data-theme="dark"] .agenda-hoje-data,
[data-theme="dark"] .agenda-hoje-nome,
[data-theme="dark"] .hk-estado { color:#aeb4bd !important; }
[data-theme="dark"] .hk-label { color:#b9bec6 !important; }

/* Inputs */
[data-theme="dark"] .textBox,
[data-theme="dark"] .textBoxCaseSensitive,
[data-theme="dark"] .textBoxList,
[data-theme="dark"] .textBoxListcaseSensitive,
[data-theme="dark"] .customSelect,
[data-theme="dark"] .hk-modal-box input,
[data-theme="dark"] .modal-content input,
[data-theme="dark"] .modal-content select,
[data-theme="dark"] .modal-content textarea {
    background:#262a31 !important; color:#e7e9ec !important; border-color:#3a3f49 !important;
}
[data-theme="dark"] input::placeholder, [data-theme="dark"] textarea::placeholder { color:#6b727c; }

/* Tabelas */
[data-theme="dark"] .line-white { background:#1e2127 !important; }
[data-theme="dark"] .line-gray { background:#23272e !important; }
[data-theme="dark"] .table td, [data-theme="dark"] .table th,
[data-theme="dark"] table.table_client td { color:#d8dbe0; border-color:#2e333c; }
[data-theme="dark"] .hk-hist th, [data-theme="dark"] .hk-hist td { color:#d8dbe0; }

/* Divisórias/paragrafos genéricos claros */
[data-theme="dark"] .agenda-hoje-item { border-color:#2e333c; }

/* Botão neutro/secundário no escuro (fundo branco vira superfície) */
[data-theme="dark"] .close-btn, [data-theme="dark"] .btn.btn-secondary { background:#262a31; color:#c9ced6; border-color:#3a3f49; }
[data-theme="dark"] .close-btn:hover, [data-theme="dark"] .btn.btn-secondary:hover { background:#2e333c; color:#fff; }
[data-theme="dark"] .btn-find, [data-theme="dark"] .btn.btn-info { background:transparent; }

/* ===== IMPRESSÃO (checklist e demais relatórios em tela) ===== */
@page {
    size: A4 portrait;
    margin: 2mm 6mm; /* margem superior/rodapé pequenas para aproveitar a folha */
}

@media print {
    @page {
        size: A4 portrait;
        margin: 1.5mm;
    }

    html,
    body {
        margin: 0 !important;
        padding: 0 !important;
        background: #fff !important;
    }

    /* Abordagem à prova de falhas: esconde TUDO e mostra só a folha do checklist */
    body * {
        visibility: hidden !important;
    }

    .ck-folha,
    .ck-folha *,
    .orc-folha,
    .orc-folha * {
        visibility: visible !important;
    }

    .orc-folha {
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        box-shadow: none !important;
    }

    /* Posiciona a folha no topo da página, ignorando o layout (sidebar/topbar) */
    .ck-folha {
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        width: 104% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 1px solid #999 !important;
        box-shadow: none !important;
        transform: scale(0.96);
        transform-origin: top left;
    }

    .ckc-viewport {
        max-width: none !important;
        width: 100% !important;
        margin: 0 !important;
        overflow: visible !important;
    }

    /* Reforço: oculta de vez a navegação e elementos marcados */
    .sidebar,
    .top-row,
    .no-print,
    #blazor-error-ui {
        display: none !important;
    }

    .page { display: block !important; background: #fff !important; }
    body { background: #fff !important; }
}

/* ===== CARDS COMPARATIVOS (DASHBOARD) ===== */
.cmp-secao-titulo {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2d2d2d;
    margin: 0.5rem 0 0.75rem;
    border-left: 4px solid var(--hk-vermelho);
    padding-left: 0.6rem;
}

.cmp-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.cmp-card {
    background: #fff;
    border-radius: 16px;
    padding: 1.1rem 1.25rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    border: 1px solid #eee;
    border-top: 4px solid var(--hk-vermelho);
}

.cmp-titulo {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--hk-cinza);
    margin-bottom: 0.4rem;
}

.cmp-atual {
    font-size: 1.8rem;
    font-weight: 800;
    color: #1a1a1a;
    line-height: 1.1;
}

.cmp-anterior {
    font-size: 0.78rem;
    color: var(--hk-cinza);
    margin-top: 0.2rem;
}

.cmp-var {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.85rem;
    font-weight: 700;
    margin-top: 0.5rem;
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
}

.cmp-var.cmp-sobe { color: #1e7e34; background: rgba(40, 167, 69, 0.12); }
.cmp-var.cmp-desce { color: var(--hk-vermelho); background: rgba(220, 53, 69, 0.12); }
.cmp-var.cmp-neutro { color: #777; background: rgba(0, 0, 0, 0.06); }

.cmp-breakdown {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 0.7rem;
    padding-top: 0.6rem;
    border-top: 1px dashed #e0e0e0;
    font-size: 0.78rem;
    color: #555;
}

@media (max-width: 1024px) {
    .cmp-grid { grid-template-columns: 1fr; }
}

/* ===== UI DE RECONEXÃO DO CIRCUITO ===== */
#components-reconnect-modal {
    display: none;
}
#components-reconnect-modal.components-reconnect-show,
#components-reconnect-modal.components-reconnect-failed,
#components-reconnect-modal.components-reconnect-rejected {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 11000;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.55);
}
.hk-reconnect-box {
    background: #fff;
    border-radius: 14px;
    padding: 1.6rem 2rem;
    text-align: center;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
    max-width: 90vw;
}
.hk-reconnect-box p { margin: 0.5rem 0 0; font-size: 0.95rem; color: #333; }
.hk-reconnect-box button {
    margin-top: 1rem;
    background: var(--hk-vermelho);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.5rem 1.2rem;
    font-weight: 600;
    cursor: pointer;
}
.hk-reconnect-spinner {
    width: 34px;
    height: 34px;
    margin: 0 auto;
    border: 4px solid #eee;
    border-top-color: var(--hk-vermelho);
    border-radius: 50%;
    animation: hkReconnectSpin 0.9s linear infinite;
}
@keyframes hkReconnectSpin { to { transform: rotate(360deg); } }

/* Alterna as mensagens conforme o estado */
.hk-reconnect-falhou { display: none; }
#components-reconnect-modal.components-reconnect-failed .hk-reconnect-reconnectando,
#components-reconnect-modal.components-reconnect-rejected .hk-reconnect-reconnectando,
#components-reconnect-modal.components-reconnect-failed .hk-reconnect-spinner,
#components-reconnect-modal.components-reconnect-rejected .hk-reconnect-spinner { display: none; }
#components-reconnect-modal.components-reconnect-failed .hk-reconnect-falhou,
#components-reconnect-modal.components-reconnect-rejected .hk-reconnect-falhou { display: block; }
#components-reconnect-modal .hk-reconnect-box button { display: none; }
#components-reconnect-modal.components-reconnect-failed .hk-reconnect-box button,
#components-reconnect-modal.components-reconnect-rejected .hk-reconnect-box button { display: inline-block; }

/* ===== MODAL DE LOGIN ===== */
.hk-login-modal {
    background: #1a1a1a;
    border-radius: 16px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 32px 80px rgba(0,0,0,0.6);
    overflow: hidden;
    animation: hkLoginIn 0.3s cubic-bezier(.4,0,.2,1);
}

@keyframes hkLoginIn {
    from { opacity: 0; transform: translateY(-24px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.hk-login-modal-logo {
    background: #111;
    padding: 1.8rem 2rem 1.4rem;
    display: flex;
    justify-content: center;
    border-bottom: 2px solid #dc3545;
}

.hk-login-modal-logo img {
    max-height: 72px;
    max-width: 260px;
    object-fit: contain;
}

.hk-login-modal-body {
    padding: 1.8rem 2rem 2rem;
}

.hk-login-modal-body h2 {
    color: #fff;
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 0.2rem;
    text-align: center;
    background: none;
    -webkit-text-fill-color: unset;
}

.hk-login-modal-body p {
    color: var(--hk-cinza);
    font-size: 0.88rem;
    text-align: center;
    margin-bottom: 1.6rem;
}

.hk-login-field {
    margin-bottom: 1.1rem;
}

.hk-login-field label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: #d1d5db;
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.hk-login-field label i {
    margin-right: 6px;
    color: #dc3545;
}

.hk-login-field input {
    width: 100%;
    padding: 0.65rem 0.9rem;
    background: #2a2a2a;
    border: 1.5px solid #3a3a3a;
    border-radius: 8px;
    color: #fff;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.hk-login-field input:focus {
    border-color: #dc3545;
}

.hk-login-field input::placeholder {
    color: #6b7280;
}

.hk-login-password {
    position: relative;
    display: flex;
    align-items: center;
}

.hk-login-password input {
    padding-right: 2.8rem;
}

.hk-login-password button {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    font-size: 1rem;
    line-height: 1;
}

.hk-login-password button:hover { color: #dc3545; }

.hk-login-error {
    background: rgba(220,53,69,0.15);
    border: 1px solid rgba(220,53,69,0.4);
    border-radius: 8px;
    color: #f87171;
    font-size: 0.84rem;
    padding: 0.6rem 0.9rem;
    margin-bottom: 1rem;
}

.hk-login-actions {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-top: 1.4rem;
}

.hk-login-btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.78rem;
    background: linear-gradient(135deg, #dc3545, #b02a37);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.97rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
}

.hk-login-btn-primary:hover:not(:disabled) {
    opacity: 0.9;
    transform: translateY(-1px);
}

.hk-login-btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.hk-login-btn-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.72rem;
    background: transparent;
    color: var(--hk-cinza);
    border: 1.5px solid #3a3a3a;
    border-radius: 8px;
    font-size: 0.97rem;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}

.hk-login-btn-secondary:hover:not(:disabled) {
    border-color: #6b7280;
    color: #e5e7eb;
}

/* ===== PÁGINA DE SAÍDA ===== */
.saida-page {
    min-height: 100vh;
    background: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.saida-card {
    background: #1a1a1a;
    border-radius: 20px;
    padding: 3rem 2.5rem;
    max-width: 460px;
    width: 100%;
    text-align: center;
    box-shadow: 0 24px 60px rgba(0,0,0,0.5);
    border-top: 3px solid #dc3545;
}

.saida-logo img {
    max-height: 90px;
    max-width: 280px;
    object-fit: contain;
    margin-bottom: 1.5rem;
}

.saida-titulo {
    color: #fff;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    background: none;
    -webkit-text-fill-color: unset;
}

.saida-endereco, .saida-contato {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    color: var(--hk-cinza);
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

.saida-endereco i, .saida-contato i {
    color: #dc3545;
    font-size: 1rem;
}

.saida-social {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 2rem 0 1.5rem;
}

.saida-social-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.4rem;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s, transform 0.1s;
}

.saida-social-btn:hover {
    opacity: 0.88;
    transform: translateY(-2px);
}

.saida-instagram {
    background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045);
    color: #fff;
}

.saida-whatsapp {
    background: #25d366;
    color: #fff;
}

.saida-social-btn i { font-size: 1.2rem; }

.saida-voltar {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #6b7280;
    font-size: 0.88rem;
    text-decoration: none;
    transition: color 0.2s;
}

.saida-voltar:hover { color: #dc3545; }

/* ===== RESET E CONFIGURAÇÕES GERAIS ===== */
html, body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

* {
    box-sizing: border-box;
}

/* ===== TIPOGRAFIA ===== */
h1, h2, h3, h4, h5, h6 {
    color: #1a1a1a;
    font-weight: 600;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    margin: 2rem 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

h2 {
    font-size: 2rem;
    color: #2d2d2d;
    border-left: 4px solid #dc3545;
    padding-left: 1rem;
}

h3 {
    font-size: 1.5rem;
    color: #2d2d2d;
}

/* ===== LINKS E BOTÕES ===== */
a, .btn-link {
    color: #dc3545;
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover, .btn-link:hover {
    color: #c82333;
    text-decoration: none;
}

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    border: none;
    border-radius: 25px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
    color: white;
    text-decoration: none;
}

.btn-new-client {
    color: #fff;
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    border: none;
    border-radius: 25px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-new-client:hover {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
    color: white;
    text-decoration: none;
}

/* Primário (marca) — antes era verde off-brand */
.btn-save {
    color: #fff;
    background: var(--hk-vermelho);
    border: none;
    border-radius: 25px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.25);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-save:hover {
    background: var(--hk-vermelho-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.35);
    color: white;
    text-decoration: none;
}

/* Perigo (destrutivo) — vermelho escuro da barra da logo */
.btn-color-firebrick {
    color: #fff;
    background: var(--hk-vinho);
    border: none;
    border-radius: 25px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(160, 30, 43, 0.25);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-color-firebrick:hover {
    background: #8a1a25;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(160, 30, 43, 0.35);
    color: white;
    text-decoration: none;
}

/* Primário (marca) — antes era verde off-brand */
.btn-color-green {
    color: #fff;
    background: var(--hk-vermelho);
    border: none;
    border-radius: 25px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.25);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-color-green:hover {
    background: var(--hk-vermelho-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.35);
    color: white;
    text-decoration: none;
}

.btn-find {
    color: #dc3545;
    background: white;
    border: 2px solid #dc3545;
    border-radius: 25px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.1);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-find:hover {
    background: #dc3545;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.3);
    text-decoration: none;
}

/* Neutro — Fechar/Cancelar (sem competir com o primário) */
.close-btn {
    color: var(--hk-cinza);
    background: white;
    border: 2px solid var(--hk-cinza-claro);
    border-radius: 25px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.close-btn:hover {
    background: var(--hk-fundo);
    color: var(--hk-preto);
    border-color: var(--hk-cinza);
    text-decoration: none;
}

/* Secundário — contorno vermelho (Voltar/Avançar/ações alternativas).
   Sobrescreve o .btn-info do Bootstrap (ciano off-brand). */
.btn.btn-info {
    color: var(--hk-vermelho);
    background: #fff;
    border: 2px solid var(--hk-vermelho);
    border-radius: 25px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.btn.btn-info:hover {
    background: var(--hk-vermelho);
    color: #fff;
    transform: translateY(-2px);
}

/* Neutro — Cancelar/dispensar. Sobrescreve o cinza do Bootstrap. */
.btn.btn-secondary {
    color: var(--hk-cinza);
    background: #fff;
    border: 2px solid var(--hk-cinza-claro);
    border-radius: 25px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.btn.btn-secondary:hover {
    background: var(--hk-fundo);
    color: var(--hk-preto);
    border-color: var(--hk-cinza);
}

/* ===== FORMULÁRIOS - ESTRUTURA ===== */
.hk-form-section {
    margin-bottom: 1.5rem;
}

.hk-page-header {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.hk-page-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.hk-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 1.2rem 1.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Campo de data: texto (permite colar) + ícone que abre o calendário nativo */
.hk-data-campo { position: relative; display: block; }
.hk-data-campo .textBox { padding-right: 2.4rem; }
.hk-data-btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: #888;
    cursor: pointer;
    padding: 0.2rem;
    font-size: 0.95rem;
    line-height: 1;
}
.hk-data-btn:hover { color: var(--hk-vermelho); }
/* O input date fica invisível: serve só para abrir o seletor nativo */
.hk-data-oculto {
    position: absolute;
    right: 0.6rem;
    bottom: 0;
    width: 1px;
    height: 1px;
    opacity: 0;
    border: none;
    padding: 0;
    pointer-events: none;
}

/* ===== Quadro Kanban da equipe ===== */
.kb-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    align-items: start;
}
.kb-col {
    background: #f1f1ef;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 0.6rem;
    min-height: 160px;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.kb-col--alvo { background: #fdeaec; border-color: var(--hk-vermelho); }
.kb-col-head {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 0.5rem; padding: 0 0.15rem;
}
.kb-col-nome { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; color: #666; letter-spacing: 0.03em; }
.kb-col-contador { font-size: 0.75rem; color: #999; }
.kb-vazio { font-size: 0.8rem; color: #999; text-align: center; padding: 0.9rem 0; }

.kb-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 0.55rem 0.65rem;
    margin-bottom: 0.5rem;
    cursor: grab;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.kb-card:active { cursor: grabbing; }
.kb-card--feito { opacity: 0.72; }
.kb-card--feito .kb-card-titulo { text-decoration: line-through; }
.kb-card-titulo { font-size: 0.9rem; font-weight: 600; }
.kb-card-desc { font-size: 0.8rem; color: #777; margin-top: 0.2rem; white-space: pre-wrap; }
.kb-card-rodape {
    display: flex; align-items: center; justify-content: space-between;
    gap: 0.4rem; margin-top: 0.5rem;
}
.kb-mover { display: flex; gap: 0.25rem; }
.kb-btn {
    border: 1px solid #ddd; background: #fafafa; color: #555;
    border-radius: 6px; padding: 2px 8px; font-size: 0.72rem; cursor: pointer;
}
.kb-btn:hover:not(:disabled) { background: #efefef; }
.kb-btn:disabled { opacity: 0.35; cursor: default; }
.kb-btn--perigo { color: var(--hk-vermelho); }
.kb-pegar {
    border: 1px dashed #bbb; background: transparent; color: #777;
    border-radius: 12px; padding: 2px 10px; font-size: 0.72rem; cursor: pointer;
}
.kb-pegar:hover { border-color: var(--hk-vermelho); color: var(--hk-vermelho); }
.kb-avatar {
    width: 24px; height: 24px; border-radius: 50%;
    background: #888; color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 0.65rem; font-weight: 700; cursor: pointer; flex-shrink: 0;
}
.kb-avatar--meu { background: var(--hk-vermelho); }

[data-theme="dark"] .kb-col { background: #161f2a; border-color: #26313f; }
[data-theme="dark"] .kb-col--alvo { background: #2a1a1f; border-color: var(--hk-vermelho); }
[data-theme="dark"] .kb-col-nome { color: #9fb0c3; }
[data-theme="dark"] .kb-card { background: #1e2836; border-color: #2f3d4f; }
[data-theme="dark"] .kb-card-desc { color: #9fb0c3; }
[data-theme="dark"] .kb-btn { background: #26313f; border-color: #3a4a5e; color: #cfe; }
[data-theme="dark"] .kb-btn:hover:not(:disabled) { background: #2f3d4f; }
[data-theme="dark"] .kb-pegar { border-color: #4a5b6f; color: #9fb0c3; }

@media (max-width: 900px) {
    .kb-board { grid-template-columns: 1fr; }
}

/* ===== Prévia da mensagem no estilo WhatsApp (lembretes de revisão) ===== */
.wa-header {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #075e54;
    color: #fff;
    border-radius: 10px 10px 0 0;
    padding: 0.55rem 0.8rem;
}
.wa-avatar {
    width: 38px; height: 38px; border-radius: 50%;
    background: rgba(255,255,255,0.25);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.85rem;
}
.wa-nome { font-weight: 600; line-height: 1.2; }
.wa-fone { font-size: 0.78rem; opacity: 0.85; }

.wa-chat {
    background: #efeae2;
    border: 1px solid #d8d2c9;
    border-top: none;
    border-radius: 0 0 10px 10px;
    padding: 0.9rem 0.8rem;
    display: flex;
    justify-content: flex-end;
}
.wa-balao {
    position: relative;
    background: #d9fdd3;
    color: #111b21;
    border-radius: 10px 0 10px 10px;
    padding: 0.5rem 0.7rem 0.2rem;
    max-width: 88%;
    width: 100%;
    box-shadow: 0 1px 1px rgba(0,0,0,0.12);
}
/* "rabinho" do balão */
.wa-balao::after {
    content: "";
    position: absolute; top: 0; right: -8px;
    border-width: 0 0 10px 10px;
    border-style: solid;
    border-color: transparent transparent transparent #d9fdd3;
}
.wa-texto {
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 0.92rem;
    line-height: 1.5;
    resize: none;
    overflow: hidden;
    padding: 0;
}
.wa-texto:focus { outline: none; }
.wa-meta {
    text-align: right;
    font-size: 0.68rem;
    color: #667781;
    margin-top: 2px;
}
.wa-meta i { color: #53bdeb; margin-left: 3px; }

[data-theme="dark"] .wa-chat { background: #0b141a; border-color: #26313f; }
[data-theme="dark"] .wa-balao { background: #005c4b; color: #e9edef; }
[data-theme="dark"] .wa-balao::after { border-color: transparent transparent transparent #005c4b; }
[data-theme="dark"] .wa-meta { color: #a5b3bb; }

/* Etiquetas de situação (lembretes de revisão) */
.hk-tag {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    border-radius: 6px;
    padding: 2px 8px;
    white-space: nowrap;
}
.hk-tag--alerta { background: #fff3cd; color: #8a6100; }
.hk-tag--erro   { background: #fbe0e0; color: #a32d2d; }
.hk-tag--ok     { background: #e1f5ee; color: #0f6e56; }
.hk-tag--neutro { background: #e4e4e4; color: #5a5a5a; }
[data-theme="dark"] .hk-tag--neutro { background: #38414d; color: #c3ccd6; }

/* Tipo de OS (manutenção / retorno / garantia) no lançamento de serviço.
   Botões pequenos de propósito: o campo fica acima da lista de itens, que é o
   que o cliente mais preza — o seletor não pode roubar altura dela. */
.hk-tipo-os { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.hk-tipo-os-btn {
    font-size: 0.82rem;
    padding: 5px 14px;
    border-radius: 999px;
    border: 1px solid var(--hk-cinza-claro);
    background: transparent;
    color: var(--hk-cinza);
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s;
}
.hk-tipo-os-btn:hover { border-color: var(--hk-cinza); }
.hk-tipo-os-btn.ativo {
    background: #fbe0e0;
    border-color: var(--hk-vermelho);
    color: #7a1f29;
    font-weight: 600;
}
[data-theme="dark"] .hk-tipo-os-btn { border-color: #45505e; color: #aeb8c4; }
[data-theme="dark"] .hk-tipo-os-btn.ativo {
    background: rgba(220,53,69,.22);
    border-color: var(--hk-vermelho);
    color: #ffd4d8;
}

/* Navegação entre páginas (auditoria) */
.hk-paginacao {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 0.8rem;
}
.hk-paginacao-info { font-size: 0.85rem; color: #888; }
.hk-paginacao-botoes { display: flex; align-items: center; gap: 0.3rem; }
.hk-paginacao-atual {
    font-size: 0.85rem;
    padding: 0 0.6rem;
    white-space: nowrap;
}
.hk-paginacao .btn-details:disabled { opacity: 0.35; cursor: default; }
[data-theme="dark"] .hk-paginacao-info { color: #9fb0c3; }

@media (max-width: 640px) {
    .hk-paginacao { justify-content: center; }
}

/* Cartão de sessão ativa (painel de sessões) */
.hk-sessao-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 0.75rem 0.9rem;
}
.hk-sessao-card--alerta { border-color: var(--hk-vermelho); background: #fdf3f4; }
[data-theme="dark"] .hk-sessao-card { background: #1e2836; border-color: #2f3d4f; }
[data-theme="dark"] .hk-sessao-card--alerta { background: #2a1a1f; border-color: var(--hk-vermelho); }

/* Cartão de escolha do veículo (orçamento) */
.hk-veic-escolha {
    /* flex em coluna: sem isso o conteúdo do <button> fica na mesma linha,
       colando o modelo na placa */
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    width: 100%;
    text-align: left;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 0.7rem 0.9rem;
    min-height: 56px;          /* área de toque confortável no celular */
    cursor: pointer;
    line-height: 1.35;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.hk-veic-escolha > div { width: 100%; }
.hk-veic-escolha:hover { border-color: #bbb; background: #fafafa; }
.hk-veic-escolha--ativo {
    border: 2px solid var(--hk-vermelho);
    background: #fdf3f4;
}
[data-theme="dark"] .hk-veic-escolha { background: #1e2836; border-color: #2f3d4f; }
[data-theme="dark"] .hk-veic-escolha:hover { background: #24303f; }
[data-theme="dark"] .hk-veic-escolha--ativo { background: #2a1a1f; border-color: var(--hk-vermelho); }

/* Grade dos cartões: uma coluna no celular */
.hk-veic-grade {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.5rem;
}
@media (max-width: 640px) {
    .hk-veic-grade { grid-template-columns: 1fr; }
}

/* Card de veículo no cadastro — inativo fica visivelmente distinto */
.hk-veic-card {
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 0.7rem 0.85rem;
}
.hk-veic-card--inativo {
    border-style: dashed;
    border-color: #bdbdbd;
    background: repeating-linear-gradient(45deg, #f7f7f7, #f7f7f7 8px, #f2f2f2 8px, #f2f2f2 16px);
    opacity: 0.85;
}
.hk-veic-card--inativo .hk-veic-nome { color: #6b6b6b; }
[data-theme="dark"] .hk-veic-card { border-color: #2f3d4f; }
[data-theme="dark"] .hk-veic-card--inativo {
    border-color: #45505f;
    background: repeating-linear-gradient(45deg, #1a2330, #1a2330 8px, #172029 8px, #172029 16px);
}
[data-theme="dark"] .hk-tag--alerta { background: #3b2a10; color: #f0b429; }
[data-theme="dark"] .hk-tag--erro   { background: #3d1a1a; color: #f08a8a; }
[data-theme="dark"] .hk-tag--ok     { background: #10352b; color: #5dcaa5; }

/* Cartões de indicador (Prontuário veicular) */
.hk-metric {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 0.85rem 1rem;
}
.hk-metric-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.hk-metric-value {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.2;
    margin-top: 0.15rem;
}
.hk-metric-hint {
    font-size: 0.78rem;
    color: #888;
}
[data-theme="dark"] .hk-metric {
    background: #1e2836;
    border-color: #2f3d4f;
}
[data-theme="dark"] .hk-metric-label,
[data-theme="dark"] .hk-metric-hint { color: #9fb0c3; }

.hk-form-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a1a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-left: 3px solid #dc3545;
    padding-left: 0.6rem;
    margin: 1.25rem 0 0.75rem 0;
}

.hk-form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 0.85rem;
}

.hk-label {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 0.3rem;
}

.hk-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.hk-form-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
}

.hk-form-row-auto {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
}

/* ===== BARRA DE BUSCA - FIND ===== */
.hk-search-bar {
    display: flex;
    align-items: flex-end;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    background: white;
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.07);
}

.hk-search-bar .hk-form-group {
    flex: 1;
    min-width: 220px;
    margin-bottom: 0;
}

.hk-search-bar .hk-btn-group {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* ===== CAMPOS DE FORMULÁRIO ===== */
/* Alternância de tipo de busca (segmented control) */
.hk-busca-modos {
    display: inline-flex;
    gap: 4px;
    background: #f0f0f0;
    border-radius: 10px;
    padding: 4px;
    width: fit-content;
}
.hk-modo {
    border: none;
    background: transparent;
    padding: 6px 18px;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #555;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}
.hk-modo:hover { color: var(--hk-vermelho); }
.hk-modo.ativo {
    background: var(--hk-vermelho);
    color: #fff;
    box-shadow: 0 2px 6px rgba(220, 53, 69, 0.25);
}
.hk-modo.ativo:hover { color: #fff; }
[data-theme="dark"] .hk-busca-modos { background: #26313f; }
[data-theme="dark"] .hk-modo { color: #9fb0c3; }
[data-theme="dark"] .hk-modo.ativo { color: #fff; }

.textBox, .textBoxCaseSensitive, .textBoxList, .textBoxListcaseSensitive {
    padding: 0.6rem 0.9rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    outline: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    width: 100%;
}

.textBox:focus, .textBoxCaseSensitive:focus, .textBoxList:focus, .textBoxListcaseSensitive:focus {
    border-color: #dc3545;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.2);
    transform: translateY(-1px);
}

.textBoxList, .textBoxListcaseSensitive {
    resize: vertical;
    min-height: 150px;
}

.hk-textarea-tall {
    min-height: 380px;
}

.textBox-invalid {
    border-color: #dc3545;
    background: #fff5f5;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.1);
}

.textBox-disabled {
    background: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
    opacity: 0.7;
}

/* ===== VALIDAÇÃO ===== */
.valid.modified:not([type=checkbox]) {
    outline: 2px solid #28a745;
    border-color: #28a745;
}

.invalid {
    outline: 2px solid #dc3545;
    border-color: #dc3545;
}

.validation-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    font-weight: 500;
}

/* ===== CONTEÚDO PRINCIPAL ===== */
.content {
    padding: 2rem;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin: 1rem;
    min-height: calc(100vh - 8rem);
}

/* ===== PÁGINA DE FUNDO ===== */
.page-background {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 100vh;
    padding: 2rem;
}

.img-background {
    background-image: url('images/background.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
}

/* ===== TABELAS ===== */
.table_client-container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin: 1rem 0;
}

.table_client {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.table_client th, .table_client td {
    padding: 0.55rem 0.65rem;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
    font-size: 0.82rem;
}

/* E-mail em uma linha só (não quebra) — fica legível inteiro. As demais colunas
   podem quebrar normalmente. */
.table_client .email-cell {
    white-space: nowrap;
}

/* Colunas de ação (ícones) compactas: padding menor para não roubar espaço do
   e-mail e não empurrar/achatar o menu lateral. */
.table_client th.text-center,
.table_client td.td-acao {
    padding-left: 0.3rem;
    padding-right: 0.3rem;
    white-space: nowrap;
}
.table_client td.td-acao .btn-details { font-size: 0.95rem; }

.table_client th {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.74rem;
    letter-spacing: 0.3px;
}

.table_client tr:nth-child(even) {
    background: #f8f9fa;
}

.table_client tr:hover {
    background: rgba(220, 53, 69, 0.05);
    transform: scale(1.01);
    transition: all 0.3s ease;
}

/* ===== PAINÉIS E WIDGETS ===== */
.panel {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin: 1rem 0;
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
    flex: 1;
}

.panel:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.panel-header {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: white;
    padding: 1rem 2rem;
    border-radius: 15px 15px 0 0;
    margin: -2rem -2rem 2rem -2rem;
    font-weight: 600;
    font-size: 1.25rem;
}

.panel-content {
    padding: 1rem 0;
}

.widget {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
}

.widget:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-color: #dc3545;
}

.widget h2 {
    color: #2d2d2d;
    font-size: 1.25rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.widget p {
    font-size: 2.5rem;
    font-weight: 700;
    color: #dc3545;
    margin: 0;
    text-shadow: 0 2px 4px rgba(220, 53, 69, 0.2);
}

.widget2 {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
}

/* ===== MODAIS ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    margin: 3% auto;
    padding: 0;
    border-radius: 20px;
    width: 94%;
    max-width: 720px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

/* Bootstrap limita .modal-dialog a 500px (media ≥576px); libera o modal largo. */
.modal-dialog.modal-dialog-lg {
    max-width: 1100px;
    width: 92vw;
}

.modal-dialog-lg .modal-content {
    max-width: 1100px;
}

.modal-body {
    max-height: 72vh;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1.5rem 2rem;
    scrollbar-width: thin;
    scrollbar-color: #dc3545 #f1f1f1;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: white;
    padding: 1.5rem 2rem;
    border-radius: 20px 20px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header .modal-title,
.modal-header h5,
.modal-header h4 {
    color: white !important;
}

.modal-body {
    padding: 2rem;
}

.modal-body-error {
    padding: 2rem;
    text-align: center;
}

.modal-footer {
    background: #f8f9fa;
    padding: 1.5rem 2rem;
    border-radius: 0 0 20px 20px;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.close {
    color: white;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close:hover {
    color: #dc3545;
    transform: scale(1.1);
}

/* ===== ALERTAS ===== */
.alert {
    border-radius: 12px;
    border: none;
    padding: 1rem 1.5rem;
    margin: 1rem 0;
    font-weight: 500;
}

.alert-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.alert-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.alert-warning {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
}

.alert-info {
    background: linear-gradient(135deg, #17a2b8 0%, #6f42c1 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(23, 162, 184, 0.3);
}

/* ===== ANIMAÇÕES ===== */
.fade-in-out {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.fade-in-out.show {
    opacity: 1;
}

.fade-out {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.fade-in {
    opacity: 1;
    transition: opacity 0.3s ease;
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== LOADER ===== */
.loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #dc3545;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

@-webkit-keyframes spin {
    0% { -webkit-transform: rotate(0deg); }
    100% { -webkit-transform: rotate(360deg); }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes loading {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ===== SELECT CUSTOMIZADO ===== */
.customSelect {
    padding: 0.75rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    outline: none;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 1rem;
    width: 100%;
    max-width: 400px;
    cursor: pointer;
}

.customSelect:focus {
    border-color: #dc3545;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.2);
    transform: translateY(-1px);
}

/* ===== LOGIN ===== */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    padding: 2rem;
}

.login-paper {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 3rem;
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-button-container {
    margin-top: 2rem;
}

.centered-image {
    display: block;
    margin: 0 auto 2rem auto;
    max-width: 200px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.centered-text {
    text-align: center;
    margin: 2rem 0;
}

/* ===== MENU SANDUÍCHE (hamburger) ===== */
.hk-hamburger {
    display: flex; /* visível também no desktop (colapsa a sidebar) */
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    color: white;
    font-size: 1.4rem;
    padding: 0.4rem 0.7rem;
    margin-right: auto; /* empurra o restante (usuário/logout) para a direita */
    cursor: pointer;
    line-height: 1;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
}

/* Fundo da tela de login: branco com a logo gigante esmaecida (a app fica oculta) */
.hk-login-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9998; /* abaixo do modal de login (9999) */
    background: #f7f7f7;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hk-login-backdrop img {
    width: min(75vw, 760px);
    max-height: 70vh;
    object-fit: contain;
    opacity: 0.12;
}

.hk-hamburger-label { font-size: 0.95rem; font-weight: 600; letter-spacing: .3px; }

/* Logo fixa na barra superior (sempre visível), à esquerda do botão Menu. */
.hk-topbar-logo { display: inline-flex; align-items: center; margin-right: 1rem; text-decoration: none; flex-shrink: 0; }
.hk-topbar-logo img { height: 42px; width: auto; max-width: 190px; object-fit: contain; display: block; }
.hk-topbar-logo:hover { opacity: .85; }
@media (max-width: 640px) {
    .hk-topbar-logo { margin-right: 0.5rem; }
    .hk-topbar-logo img { height: 28px; max-width: 120px; }

    /* Esconder textos em mobile — ícones apenas */
    .btn-text { display: none; }
    .hk-hamburger-label { display: none; }
}

/* Overlay escuro por trás do menu (o elemento só é renderizado com o menu aberto) */
.mobile-menu-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 998;
}

/* ===== MENU DRAWER (todas as larguras — estilo globo.com) =====
   Sidebar escondida por padrão; hambúrguer desliza por cima do conteúdo. */
.sidebar {
    position: fixed !important;
    top: 0;
    left: 0;
    height: 100vh !important;
    width: 280px !important;
    z-index: 999;
    transform: translateX(-100%);
    transition: transform 0.28s ease;
    overflow-y: auto;
    box-shadow: none;
}

.sidebar.mobile-menu-open {
    transform: translateX(0);
    box-shadow: 4px 0 20px rgba(0,0,0,0.4);
}

main {
    margin-left: 0 !important;
    width: 100%;
}

/* ===== Rail lateral fixo (desktop ≥1025px) — expande no hover / fixa no ☰ =====
   No mobile mantém o drawer (regras acima). */
.hk-rail-toggle {
    display: none;
    width: 100%;
    height: 64px;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.10);
    color: #dc3545;
    font-size: 20px;
    cursor: pointer;
    align-items: center;
    justify-content: center;   /* recolhido: centralizado */
}
.hk-rail-toggle:hover { color: #fff; }

@media (min-width: 1025px) {
    .sidebar {
        transform: none !important;
        width: 50px !important;           /* faixa estreita (minimalista) */
        z-index: 90 !important;          /* abaixo do topbar (100): desliza por baixo do topo */
        overflow-x: hidden;
        overflow-y: auto;
        transition: width 0.22s ease;
    }
    .sidebar:hover,
    .page.rail-fixado .sidebar {
        width: 220px !important;
        box-shadow: 4px 0 22px rgba(0,0,0,0.35);
    }
    main {
        margin-left: 50px !important;
        width: auto !important;
        transition: margin-left 0.22s ease;
    }
    .page.rail-fixado main {
        margin-left: 220px !important;
    }
    .hk-rail-toggle { display: flex; }
    .hk-hamburger { display: none !important; }      /* o "Menu" do topo sai no desktop */
    .sidebar .hk-sidebar-header { display: none !important; }

    /* Recolhido: ícones centralizados, rótulo oculto (font-size:0) */
    .sidebar .nav-item { white-space: nowrap; padding: 0 !important; }
    .sidebar .nav-link { display: flex; align-items: center; justify-content: center; font-size: 0; padding: 0.5rem 0; border-radius: 8px; }
    .sidebar .nav-link i { font-size: 17px; margin: 0 !important; min-width: auto; }
    /* Recolhido: rótulo de seção some e o divisor fica curto e centralizado */
    .sidebar .nav-secao { display: none; }
    .sidebar .nav-sep { margin: 0.5rem auto; width: 24px; }

    /* Expandido (hover ou fixado): rótulos visíveis, alinhado à esquerda, com destaque no ativo */
    .sidebar:hover .nav-item,
    .page.rail-fixado .sidebar .nav-item { padding: 0 8px !important; }
    .sidebar:hover .nav-link,
    .page.rail-fixado .sidebar .nav-link { justify-content: flex-start; font-size: 0.95rem; padding: 0.5rem 12px; }
    .sidebar:hover .nav-link i,
    .page.rail-fixado .sidebar .nav-link i { margin-right: 12px !important; }
    .sidebar:hover .nav-link.active,
    .page.rail-fixado .sidebar .nav-link.active { background: rgba(255,255,255,0.10); }
    /* Expandido: rótulos das seções aparecem e o divisor volta a atravessar */
    .sidebar:hover .nav-secao,
    .page.rail-fixado .sidebar .nav-secao { display: block; }
    .sidebar:hover .nav-sep,
    .page.rail-fixado .sidebar .nav-sep { margin: 0.6rem 1rem; width: auto; }
    .sidebar:hover .hk-rail-toggle,
    .page.rail-fixado .hk-rail-toggle { justify-content: flex-start; padding-left: 18px; }

    /* Logo da empresa à esquerda no topbar */
    .hk-topbar-logo { margin-right: auto !important; }
}

/* Header da sidebar (logo) */
.hk-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
}

.hk-sidebar-header img {
    max-height: 90px;
    margin-top: -10px;
}

/* Tabela responsiva — wrapper com scroll horizontal */
.table-responsive-hk {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ===== RESPONSIVIDADE MOBILE / TABLET ===== */
@media (max-width: 1024px) {
    /* Layout principal — main ocupa toda a largura */
    .page {
        flex-direction: row;
        position: relative;
    }

    /* Top row */
    .top-row {
        flex-wrap: nowrap;
        gap: 0.4rem;
        padding: 0.5rem 0.75rem !important;
        justify-content: flex-start !important;
    }

    /* Ocultar Instagram e YouTube no mobile */
    .top-row a[href*="instagram"],
    .top-row a[href*="youtube"] {
        display: none !important;
    }

    /* Input de data alinhado como os demais */
    input[type="date"].textBox {
        text-align: left;
        -webkit-appearance: none;
        appearance: none;
        padding-right: 0.5rem;
    }

    /* Conteúdo */
    .content {
        padding: 0.75rem;
        margin: 0;
    }

    .panel {
        padding: 1rem;
        margin: 0.5rem 0;
    }

    .widget { padding: 1.2rem; }
    .widget h2 { font-size: 1rem; }
    .widget p { font-size: 1.8rem; }

    h1 { font-size: 1.6rem; }
    h2 { font-size: 1.3rem; }
    h3 { font-size: 1.1rem; }

    /* Botões — área de toque mínima 44px (Apple HIG) */
    .btn-primary, .btn-new-client, .btn-save,
    .btn-color-firebrick, .btn-color-green, .btn-find, .close-btn {
        padding: 0.7rem 1rem;
        font-size: 0.9rem;
        min-height: 44px;
        touch-action: manipulation;
    }

    /* Inputs — evitar zoom no iOS (font-size >= 16px) */
    .textBox, .textBoxCaseSensitive, .textBoxList,
    .textBoxListcaseSensitive, .customSelect {
        max-width: 100%;
        font-size: 16px !important;
        min-height: 44px;
    }

    /* Grids */
    .hk-form-row, .hk-form-row-3, .hk-form-row-auto {
        grid-template-columns: 1fr;
    }

    /* Barra de busca */
    .hk-search-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .hk-search-bar .hk-btn-group {
        display: flex;
        gap: 0.5rem;
    }

    .hk-search-bar .hk-btn-group .btn-find,
    .hk-search-bar .hk-btn-group .btn-new-client {
        flex: 1;
    }

    /* Colunas de texto secundário — ocultar */
    .col-hide-mobile {
        display: none !important;
    }

    /* ===== TABELA DE CLIENTES → CARDS no mobile ===== */
    .table-responsive-hk { overflow-x: visible; }

    .table_client,
    .table_client tbody {
        display: block;
        width: 100%;
    }

    /* Cabeçalho oculto — os labels aparecem via data-label */
    .table_client thead {
        display: none;
    }

    /* Cada linha vira um card */
    .table_client tr {
        display: flex !important;
        flex-wrap: wrap;
        align-items: center;
        background: #fff;
        border-radius: 10px;
        border: 1px solid #e4e4e4;
        box-shadow: 0 2px 6px rgba(0,0,0,0.06);
        margin-bottom: 0.65rem;
        padding: 0.65rem 0.75rem;
        gap: 0.2rem;
    }

    /* Nome — linha inteira no topo */
    .table_client td:nth-child(1) {
        flex: 0 0 100%;
        font-weight: 700;
        font-size: 0.95rem;
        color: #1a1a1a;
        padding: 0 0 0.3rem 0;
        border: none !important;
    }

    /* Telefone — ocupa o espaço restante antes dos botões */
    .table_client td.td-telefone {
        flex: 1 1 auto;
        font-size: 0.88rem;
        color: #555;
        padding: 0;
        border: none !important;
        display: flex;
        align-items: center;
    }

    /* Botões de ação — compactos lado a lado */
    .table_client td.td-acao {
        flex: 0 0 auto;
        padding: 0 !important;
        border: none !important;
        display: flex;
        align-items: center;
    }

    .table_client td.td-acao .btn-details {
        width: 38px;
        height: 38px;
        font-size: 0.95rem;
    }

    /* Modal */
    .modal-content {
        margin: 2% auto;
        width: 97%;
        max-height: 92vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Login modal */
    .hk-login-modal {
        width: 92vw !important;
        max-width: 380px;
        max-height: 90vh;
        overflow-y: auto;
    }

    .hk-login-modal-logo img {
        max-width: 120px !important;
    }

    /* Cards */
    .hk-card {
        padding: 1rem;
        margin: 0.5rem 0;
    }

    /* Página header */
    .hk-page-header { padding: 0.75rem 0; }
    .hk-page-title { font-size: 1.1rem !important; }
}

/* ===== TABLET ===== */
@media (min-width: 769px) and (max-width: 1024px) {
    .modal-content {
        width: 90%;
        max-width: 680px;
    }

    .hk-form-row-3 {
        grid-template-columns: 1fr 1fr;
    }
}

/* ===== UTILITÁRIOS ===== */
.text-fixed-header {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: #2d2d2d;
}

.btn-container {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 1rem 0;
}

.line-white {
    border-top: 2px solid white;
    margin: 1rem 0;
}

.line-gray {
    border-top: 2px solid #e0e0e0;
    margin: 1rem 0;
}

/* ===== DASHBOARD ESPECÍFICO ===== */
.dashboard {
    padding: 2rem;
}

/* ===== MODAL GENÉRICO (hk-modal) ===== */
.hk-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.hk-modal-box {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.hk-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e0e0e0;
    background: #1a1a1a;
    color: #fff;
    border-radius: 12px 12px 0 0;
}

.hk-modal-header h5 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.hk-modal-close {
    background: none;
    border: none;
    color: var(--hk-cinza);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    transition: color 0.15s;
}
.hk-modal-close:hover { color: #fff; }

.hk-modal-body {
    padding: 1.25rem;
    overflow-y: auto;
    flex: 1;
}

.hk-modal-footer {
    padding: 0.75rem 1.25rem;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
}

/* Badges de perfil */
.hk-badge-admin {
    background: #dc3545;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.2rem 0.55rem;
    border-radius: 20px;
    letter-spacing: 0.03em;
}

.hk-badge-op {
    background: #6c757d;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.2rem 0.55rem;
    border-radius: 20px;
    letter-spacing: 0.03em;
}

/* Botão excluir */
.hk-btn-delete { color: #dc3545 !important; }
.hk-btn-delete:hover { background: #fff0f0 !important; }

/* ===== RECONEXÃO BLAZOR ===== */
#blazor-error-ui {
    background: var(--hk-vermelho);
    color: white;
    padding: 0.75rem 1rem;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99999;
    display: none;
    text-align: center;
    font-size: 0.9rem;
}

#blazor-error-ui .reload {
    color: #ffe;
    text-decoration: underline;
    margin-left: 0.5rem;
}

#blazor-error-ui .dismiss {
    float: right;
    cursor: pointer;
    padding: 0 0.5rem;
}

/* ===== BLOCO DE ERRO ===== */
.blazor-error-boundary {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    padding: 2rem;
    border-radius: 15px;
    margin: 2rem;
    box-shadow: 0 10px 30px rgba(220, 53, 69, 0.3);
    text-align: center;
}

.blazor-error-boundary::after {
    content: "Ocorreu um erro inesperado. Por favor, recarregue a página.";
    display: block;
    margin-top: 1rem;
    font-weight: 500;
}

/* ===== FOCUS E ESTADOS ===== */
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
    outline: none;
}

.nav-link:hover {
    color: #dc3545;
}

/* ===== CHECKBOX CUSTOMIZADO ===== */
.darker-border-checkbox.form-check-input {
    border-color: #dc3545;
    border-width: 2px;
}

.darker-border-checkbox.form-check-input:checked {
    background-color: #dc3545;
    border-color: #dc3545;
}

/* ===== CLASSES DE ERRO ===== */
.clienteNomeErrorClass {
    border-color: #dc3545 !important;
    background: #fff5f5 !important;
}

/* ===== UPLOAD DE ARQUIVOS ===== */
.custom-file-input {
    border: 2px dashed #dc3545;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    background: rgba(220, 53, 69, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
}

.custom-file-input:hover {
    background: rgba(220, 53, 69, 0.1);
    border-color: #c82333;
}

/* ===== EMAIL ===== */
.email-container {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.email-box {
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 1.5rem;
    background: #f8f9fa;
    margin: 1rem 0;
}

/* ===== OVERLAY ===== */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== MUD BLAZOR CUSTOMIZAÇÕES ===== */
.mud-input-password input[type="password"] {
    border-radius: 12px !important;
    border: 2px solid #e0e0e0 !important;
    padding: 0.75rem 1rem !important;
}

.admin-panel-text {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2d2d2d;
    text-align: center;
    margin: 2rem 0;
}

/* ===== ÍCONES ===== */
.fa-duotone.fa-envelope {
    color: #dc3545;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.icon-container {
    text-align: center;
    margin: 2rem 0;
}



/* ===== OCR / Escanear placa ===== */
.ocr-wrap { max-width: 760px; margin: 0 auto; }
.ocr-hidden { display: none; }
.ocr-video-box {
    position: relative;
    width: 100%;
    max-width: 640px;
    aspect-ratio: 4 / 3;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 8px;
}
.ocr-video-box video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
/* faixa-guia central onde o usuário deve enquadrar a placa */
.ocr-guia {
    position: absolute;
    left: 8%;
    right: 8%;
    top: 50%;
    height: 22%;
    transform: translateY(-50%);
    border: 3px solid rgba(255,255,255,0.85);
    border-radius: 8px;
    box-shadow: 0 0 0 9999px rgba(0,0,0,0.35);
    pointer-events: none;
}

/* Regras da senha: cada linha acende ao ser cumprida, para o operador não
   descobrir o que falta só depois de enviar o formulário.
   Traço = pendente, check = atendida. Marcador leve de propósito: bolinha cheia
   pesa mais que o próprio texto e rouba a leitura. */
.hk-senha-regras {
    list-style: none;
    margin: 0.5rem 0 0.9rem;
    padding: 0;
    font-size: 0.86rem;
    line-height: 1.5;
}
.hk-senha-regras li {
    display: flex; align-items: baseline; gap: 0.5rem;
    padding: 3px 0;
    color: #6b7280;
}
.hk-senha-regras li i {
    font-size: 0.72rem;
    width: 0.9rem;            /* largura fixa alinha o texto entre as linhas */
    text-align: center;
    flex-shrink: 0;
    color: #9aa3ae;
}
.hk-senha-regras li.ok { color: #1e7e34; font-weight: 500; }
.hk-senha-regras li.ok i { color: #1e7e34; }

/* No modal de login o fundo é escuro sempre, independente do tema escolhido. */
.hk-login-modal .hk-senha-regras li { color: #c3ccd6; }
.hk-login-modal .hk-senha-regras li i { color: #7f8b99; }
.hk-login-modal .hk-senha-regras li.ok { color: #5fd39a; }
.hk-login-modal .hk-senha-regras li.ok i { color: #5fd39a; }

[data-theme="dark"] .hk-senha-regras li { color: #9fb0c3; }
[data-theme="dark"] .hk-senha-regras li i { color: #6f7d8c; }
[data-theme="dark"] .hk-senha-regras li.ok { color: #5fd39a; }
[data-theme="dark"] .hk-senha-regras li.ok i { color: #5fd39a; }

/* Abas da tela de Configurações. Rolagem horizontal no celular em vez de quebrar
   em duas linhas: com poucas abas, rolar é mais previsível que ver a barra mudar
   de altura conforme a largura. */
.hk-abas {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1.2rem;
    overflow-x: auto;
    /* Sem isto o navegador calcula overflow-y como auto e desenha uma barra
       VERTICAL ao lado das abas. */
    overflow-y: hidden;
    /* A linha de base fica como sombra interna, não como border-bottom: borda
       entraria no cálculo da caixa e o sublinhado da aba ativa precisaria de
       margem negativa, que volta a estourar a altura e traz a barra de novo. */
    box-shadow: inset 0 -2px 0 var(--hk-cinza-claro);
    scrollbar-width: none;        /* Firefox */
    -ms-overflow-style: none;     /* Edge antigo */
    -webkit-overflow-scrolling: touch;
}
.hk-abas::-webkit-scrollbar { display: none; }
.hk-aba {
    display: inline-flex; align-items: center; gap: 0.45rem;
    padding: 0.6rem 1rem;
    border: none;
    border-bottom: 3px solid transparent;
    background: transparent;
    color: var(--hk-cinza);
    font-size: 0.9rem;
    white-space: nowrap;
    cursor: pointer;
    transition: color .15s, border-color .15s;
}
.hk-aba i { font-size: 0.9rem; }
.hk-aba:hover { color: var(--hk-preto); }
.hk-aba.ativa {
    color: var(--hk-vermelho);
    border-bottom-color: var(--hk-vermelho);
    font-weight: 600;
}
.hk-aba-conteudo { min-height: 180px; }

/* Texto de apoio abaixo dos campos. */
.hk-ajuda {
    display: block;
    font-size: 0.78rem;
    color: var(--hk-cinza);
    margin-top: 3px;
    line-height: 1.5;
}
.hk-saida-teste {
    margin-top: 0.6rem; padding: 0.6rem 0.8rem;
    background: #f4f4f4; border: 1px solid #e0e0e0; border-radius: 8px;
    font-size: 0.8rem; white-space: pre-wrap;
}

[data-theme="dark"] .hk-abas { box-shadow: inset 0 -2px 0 #2f3d4f; }
[data-theme="dark"] .hk-aba { color: #9fb0c3; }
[data-theme="dark"] .hk-aba:hover { color: #e6edf5; }
[data-theme="dark"] .hk-ajuda { color: #9fb0c3; }
[data-theme="dark"] .hk-saida-teste { background: #1e2836; border-color: #2f3d4f; color: #c3ccd6; }

@media (max-width: 640px) {
    .hk-aba { padding: 0.55rem 0.7rem; font-size: 0.85rem; }
    .hk-aba span { display: none; }   /* no celular só o ícone, para caber tudo */
    .hk-aba.ativa span { display: inline; }
}

/* ===== Novidades da versão ===== */
.hk-novidades-fundo {
    position: fixed; inset: 0; z-index: 9998;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,.6);
    padding: 1rem;
}
.hk-novidades-modal {
    background: var(--hk-branco);
    border-radius: var(--hk-raio);
    box-shadow: 0 8px 30px rgba(0,0,0,.25);
    width: 100%; max-width: 620px;
    display: flex; flex-direction: column;
    max-height: 88vh;              /* nota longa rola por dentro, não pela página */
}
.hk-novidades-topo {
    padding: 1rem 1.25rem 0.6rem;
    border-bottom: 1px solid var(--hk-cinza-claro);
}
.hk-novidades-topo h2 {
    margin: 0; font-size: 1.15rem; color: var(--hk-preto);
}
.hk-novidades-topo h2 i { color: var(--hk-vermelho); margin-right: 8px; }
.hk-novidades-corpo { padding: 1rem 1.25rem; overflow-y: auto; }
.hk-novidades-rodape {
    padding: 0.85rem 1.25rem;
    border-top: 1px solid var(--hk-cinza-claro);
    display: flex; justify-content: flex-end;
}

.hk-novidades-cabecalho {
    display: flex; align-items: baseline; gap: 0.6rem; margin-bottom: 0.5rem;
}
.hk-novidades-versao {
    font-size: 0.78rem; font-weight: 700; letter-spacing: .03em;
    background: #fbe0e0; color: #7a1f29;
    padding: 2px 10px; border-radius: 999px;
}
.hk-novidades-data { font-size: 0.78rem; color: var(--hk-cinza); }
.hk-novidades-resumo {
    font-size: 0.92rem; color: var(--hk-cinza); margin: 0 0 0.9rem; line-height: 1.55;
}
.hk-novidades-lista { list-style: none; margin: 0; padding: 0; }
.hk-novidades-lista li {
    display: flex; gap: 0.8rem; padding: 0.65rem 0;
    border-top: 1px solid var(--hk-cinza-claro);
}
.hk-novidades-lista li:first-child { border-top: none; }
.hk-novidades-lista li i {
    color: var(--hk-vermelho); font-size: 1rem;
    width: 1.4rem; text-align: center; flex-shrink: 0; margin-top: 2px;
}
/* Cor explícita no título: sem ela ele herda o texto escuro padrão e some no
   fundo escuro do modal. A descrição já tinha tratamento; o título não. */
.hk-novidades-lista li strong {
    display: block; font-size: 0.92rem; margin-bottom: 2px;
    color: var(--hk-preto);
}
.hk-novidades-lista li span { font-size: 0.85rem; color: var(--hk-cinza); line-height: 1.55; }

/* Na página /novidades as versões anteriores ficam recuadas, para a atual se destacar. */
.hk-novidades-bloco { margin-bottom: 1.6rem; }
.hk-novidades-bloco.antiga { opacity: .78; }

.nav-versao {
    margin-top: auto; padding: 0.8rem 1.5rem 1rem;
    font-size: 0.72rem; color: #8b96a3; letter-spacing: .03em;
}

[data-theme="dark"] .hk-novidades-modal { background: #16202b; }
[data-theme="dark"] .hk-novidades-topo,
[data-theme="dark"] .hk-novidades-rodape { border-color: #2f3d4f; }
[data-theme="dark"] .hk-novidades-topo h2 { color: #e6edf5; }
[data-theme="dark"] .hk-novidades-versao { background: rgba(220,53,69,.22); color: #ffd4d8; }
[data-theme="dark"] .hk-novidades-data,
[data-theme="dark"] .hk-novidades-resumo,
[data-theme="dark"] .hk-novidades-lista li span { color: #9fb0c3; }
[data-theme="dark"] .hk-novidades-lista li { border-color: #2f3d4f; }
[data-theme="dark"] .hk-novidades-lista li strong { color: #e6edf5; }

/* ===== Despesas: resumo do mês ===== */
.hk-desp-resumo { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0.4rem 0 1.1rem; }
.hk-desp-total, .hk-desp-cat {
    background: #f1f1ef; border-radius: var(--hk-raio);
    padding: 0.55rem 0.9rem; min-width: 140px;
}
/* O total ganha peso visual: é o número que responde "quanto gastei este mês". */
.hk-desp-total { background: #fbe0e0; }
.hk-desp-total-rotulo, .hk-desp-cat-nome {
    display: block; font-size: 0.72rem; text-transform: uppercase;
    letter-spacing: .03em; color: var(--hk-cinza);
}
.hk-desp-total-valor { font-size: 1.25rem; font-weight: 700; color: #7a1f29; }
.hk-desp-cat-valor { font-size: 1rem; font-weight: 600; color: var(--hk-preto); }

[data-theme="dark"] .hk-desp-total, [data-theme="dark"] .hk-desp-cat { background: #1e2836; }
[data-theme="dark"] .hk-desp-total { background: rgba(220,53,69,.18); }
[data-theme="dark"] .hk-desp-total-rotulo, [data-theme="dark"] .hk-desp-cat-nome { color: #9fb0c3; }
[data-theme="dark"] .hk-desp-total-valor { color: #ffd4d8; }
[data-theme="dark"] .hk-desp-cat-valor { color: #e6edf5; }
