/*
 * Design tokens — tema escuro navy + laranja, alinhado à identidade visual
 * em EstiloVorbiELogos/ e à tela de login (login.css). Aplicado globalmente
 * a todos os painéis (Admin, Cliente, Profissional) e à página pública de
 * solicitação de reforma.
 */
:root {
    --vb-navy-950: #070f1c;
    --vb-navy-900: #0a1626;
    --vb-navy-850: #0d1f36;
    --vb-navy-800: #10233c;
    --vb-navy-700: #16304f;
    --vb-line: rgba(255, 255, 255, .08);
    --vb-text: #f3f5f7;
    --vb-text-muted: #93a2b8;
    --vb-placeholder: #5f6c7d;

    --vb-orange: #ef6b2b;
    --vb-orange-dark: #e2551a;

    --vb-success: #4ade80;
    --vb-success-bg: rgba(74, 222, 128, .12);
    --vb-warning: #ff9a5c;
    --vb-warning-bg: rgba(255, 154, 92, .12);
    --vb-danger: #f87171;
    --vb-danger-bg: rgba(248, 113, 113, .12);
    --vb-info: #60a5fa;

    --vb-radius: 10px;
    --vb-shadow: 0 8px 24px rgba(0, 0, 0, .28);
    --vb-font: 'Segoe UI', Roboto, -apple-system, BlinkMacSystemFont, sans-serif;

    /* Aliases legados: mantidos porque algumas views referenciam estes nomes
       diretamente em style="" (ex.: publico/reformas/form.php). */
    --vb-primary: var(--vb-text);
    --vb-gray-500: var(--vb-text-muted);
    --vb-gray-900: var(--vb-text);
}

* { box-sizing: border-box; }

body {
    font-family: var(--vb-font);
    background: var(--vb-navy-950);
    color: var(--vb-text);
    margin: 0;
}

a { color: var(--vb-orange); text-decoration: none; }
a:hover { color: #ff9a5c; text-decoration: underline; }

.vb-layout { display: flex; min-height: 100vh; }

.vb-sidebar {
    width: 264px;
    background: linear-gradient(180deg, var(--vb-navy-900), var(--vb-navy-850));
    color: #fff;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}
.vb-sidebar__brand {
    padding: 24px 20px;
    border-bottom: 1px solid var(--vb-line);
}
.vb-sidebar__brand { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.vb-sidebar__brand img { display: block; width: 140px; height: auto; }
.vb-sidebar__close { display: none; flex-shrink: 0; background: none; border: none; color: var(--vb-text-muted); padding: 6px; border-radius: 8px; cursor: pointer; }
.vb-sidebar__close:hover { color: #fff; background: rgba(255,255,255,.06); }
.vb-sidebar__brand strong { display: block; font-size: 18px; font-weight: 700; color: #fff; }
.vb-sidebar__brand small { display: block; font-size: 11px; color: var(--vb-text-muted); font-weight: 400; margin-top: 2px; }

.vb-sidebar__nav { flex: 1; padding: 12px 0; overflow-y: auto; }
.vb-sidebar__nav .vb-nav-section {
    padding: 18px 20px 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #5b6b82;
}
.vb-sidebar__nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px 10px 17px;
    margin: 1px 10px 1px 0;
    border-radius: 0 8px 8px 0;
    color: #c2cbd8;
    font-size: 14px;
    border-left: 3px solid transparent;
}
.vb-sidebar__nav a svg { flex-shrink: 0; opacity: .85; }
.vb-sidebar__nav a:hover { background: rgba(255,255,255,.05); color: #fff; text-decoration: none; }
.vb-sidebar__nav a.active {
    background: rgba(239,107,43,.14);
    color: #ff9a5c;
    border-left-color: var(--vb-orange);
    font-weight: 600;
}
.vb-sidebar__nav a.active svg { opacity: 1; }

.vb-sidebar__footer {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    border-top: 1px solid var(--vb-line);
    font-size: 13px;
}
.vb-sidebar__footer a { color: #d7dade; }
.vb-sidebar__user { flex: 1; min-width: 0; line-height: 1.35; }
.vb-sidebar__user strong { display: block; font-size: 13px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vb-sidebar__user span { font-size: 11px; color: var(--vb-text-muted); }
.vb-sidebar__logout { color: var(--vb-text-muted); display: inline-flex; padding: 6px; border-radius: 6px; }
.vb-sidebar__logout:hover { color: #fff; background: rgba(255,255,255,.06); }

.vb-avatar {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--vb-orange), var(--vb-orange-dark));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}
.vb-avatar--sm { width: 28px; height: 28px; font-size: 11px; }

.vb-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.vb-topbar {
    background: var(--vb-navy-900);
    border-bottom: 1px solid var(--vb-line);
    padding: 16px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.vb-topbar__left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.vb-topbar__menu-btn { display: none; flex-shrink: 0; background: none; border: none; color: var(--vb-text); padding: 6px; border-radius: 8px; cursor: pointer; }
.vb-topbar__menu-btn:hover { background: rgba(255,255,255,.06); }
.vb-topbar h1 { font-size: 20px; margin: 0; color: #fff; }
.vb-topbar__subtitle { margin: 2px 0 0; font-size: 13px; color: var(--vb-text-muted); }
.vb-topbar__actions { display: flex; align-items: center; gap: 18px; }
.vb-topbar__bell {
    position: relative;
    background: none;
    border: none;
    color: var(--vb-text-muted);
    cursor: pointer;
    display: inline-flex;
    padding: 6px;
    border-radius: 8px;
}
.vb-topbar__bell:hover { background: rgba(255,255,255,.06); color: #fff; }
.vb-topbar__badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--vb-orange);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    padding: 3px 5px;
    border-radius: 999px;
}
.vb-topbar__user {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #dfe4ea;
    font-size: 13px;
    background: none;
    border: none;
    padding: 4px 6px;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
}
.vb-topbar__user:hover { background: rgba(255,255,255,.06); }
.vb-topbar__user svg { color: var(--vb-text-muted); }

.vb-user { position: relative; }
.vb-user__panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 200px;
    background: var(--vb-navy-800);
    border: 1px solid var(--vb-line);
    border-radius: var(--vb-radius);
    box-shadow: var(--vb-shadow);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity .12s ease, transform .12s ease;
}
.vb-user__panel.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
.vb-user__list { list-style: none; margin: 0; padding: 6px; }
.vb-user__list a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 8px;
    color: #dfe4ea;
    font-size: 13px;
    text-decoration: none;
}
.vb-user__list a:hover { background: rgba(255,255,255,.06); color: #fff; }
.vb-user__icon { flex-shrink: 0; width: 16px; height: 16px; color: var(--vb-text-muted); }

.vb-notif { position: relative; }
.vb-notif__panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 340px;
    max-width: calc(100vw - 32px);
    background: var(--vb-navy-800);
    border: 1px solid var(--vb-line);
    border-radius: var(--vb-radius);
    box-shadow: var(--vb-shadow);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity .12s ease, transform .12s ease;
}
.vb-notif__panel.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
.vb-notif__header { padding: 14px 16px; border-bottom: 1px solid var(--vb-line); font-size: 13px; font-weight: 700; color: #fff; }
.vb-notif__list { list-style: none; margin: 0; padding: 6px; max-height: 360px; overflow-y: auto; }
.vb-notif__item { display: flex; align-items: stretch; border-radius: 8px; }
.vb-notif__item a {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px;
    border-radius: 8px;
    color: inherit;
    text-decoration: none;
    flex: 1;
    min-width: 0;
}
.vb-notif__item a:hover { background: rgba(255,255,255,.06); }
.vb-notif__dismiss {
    flex-shrink: 0;
    align-self: center;
    width: 22px;
    height: 22px;
    margin-right: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    border-radius: 6px;
    color: var(--vb-text-muted);
    cursor: pointer;
}
.vb-notif__dismiss:hover { background: rgba(255,255,255,.1); color: #fff; }
.vb-notif__icon { flex-shrink: 0; width: 18px; height: 18px; margin-top: 2px; color: var(--vb-text-muted); }
.vb-notif__icon--ocorrencia { color: #ff8a5c; }
.vb-notif__icon--vistoria { color: #7aa7ff; }
.vb-notif__icon--aniversario { color: #f2c14e; }
.vb-notif__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.vb-notif__text strong { font-size: 13px; color: #fff; font-weight: 600; }
.vb-notif__text small { font-size: 12px; color: var(--vb-text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vb-notif__empty { margin: 0; padding: 20px 16px; font-size: 13px; color: var(--vb-text-muted); text-align: center; }

.vb-content { padding: 24px; flex: 1; }

.vb-card { background: var(--vb-navy-800); border: 1px solid var(--vb-line); border-radius: var(--vb-radius); box-shadow: var(--vb-shadow); margin-bottom: 20px; }
.vb-card__header { padding: 16px 20px; border-bottom: 1px solid var(--vb-line); display: flex; justify-content: space-between; align-items: center; }
.vb-card__header h2 { font-size: 15px; margin: 0; color: #fff; }
.vb-card__body { padding: 20px; }

.vb-btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: var(--vb-radius);
    border: 1px solid transparent;
    font-size: 14px;
    cursor: pointer;
    background: var(--vb-orange);
    color: #fff;
}
.vb-btn:hover { background: var(--vb-orange-dark); text-decoration: none; color: #fff; }
.vb-btn--accent { background: var(--vb-orange); color: #fff; }
.vb-btn--accent:hover { background: var(--vb-orange-dark); color: #fff; }
.vb-btn--outline { display: inline-flex; align-items: center; gap: 4px; background: transparent; color: var(--vb-text); border-color: var(--vb-line); }
.vb-btn--outline:hover { background: rgba(255,255,255,.06); color: #fff; }
.vb-btn--danger { background: #b3261e; color: #fff; }
.vb-btn--danger:hover { background: #941f19; }
.vb-btn--sm { padding: 4px 10px; font-size: 12px; }

.vb-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid var(--vb-line);
    background: rgba(255,255,255,.03);
    cursor: pointer;
    color: var(--vb-text);
    vertical-align: middle;
}
.vb-icon-btn svg { width: 16px; height: 16px; }
.vb-icon-btn--edit { color: #7aa7ff; }
.vb-icon-btn--edit:hover { background: rgba(239,107,43,.15); border-color: var(--vb-orange); color: var(--vb-orange); }
.vb-icon-btn--danger { color: #ff5c5c; }
.vb-icon-btn--danger:hover { background: rgba(255,92,92,.15); border-color: #ff5c5c; }
.vb-icon-btn--whatsapp { color: #25D366; }
.vb-icon-btn--whatsapp:hover { background: rgba(37,211,102,.15); border-color: #25D366; }
.vb-icon-btn--disabled { color: var(--vb-text-muted); opacity: .5; cursor: not-allowed; }

.vb-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(4, 9, 16, .6);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity .15s ease;
}
.vb-modal-overlay.is-open { opacity: 1; visibility: visible; }
.vb-modal {
    background: var(--vb-navy-800);
    border: 1px solid var(--vb-line);
    border-radius: var(--vb-radius);
    box-shadow: var(--vb-shadow);
    width: 100%;
    max-width: 480px;
    transform: translateY(-8px);
    transition: transform .15s ease;
}
.vb-modal-overlay.is-open .vb-modal { transform: translateY(0); }
.vb-modal__body { padding: 28px; }
.vb-modal__message { margin: 0; color: var(--vb-text); font-size: 16px; line-height: 1.6; }
.vb-modal__actions { display: flex; justify-content: flex-end; gap: 10px; padding: 0 28px 28px; }
.vb-modal__actions .vb-btn { padding: 10px 20px; font-size: 14px; }

.vb-modal--preview { max-width: 880px; }
.vb-modal--usuario { max-width: 420px; }
.vb-modal--usuario .vb-modal__body { padding: 18px 20px; }
.vb-user-detalhe { display: flex; flex-direction: column; gap: 10px; }
.vb-user-detalhe__linha { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 13px; }
.vb-user-detalhe__linha span { color: var(--vb-text-muted); flex-shrink: 0; }
.vb-user-detalhe__linha strong { color: #fff; font-weight: 600; text-align: right; word-break: break-word; }
.vb-user-detalhe__linha--observacoes { align-items: flex-start; }
.vb-user-detalhe__senha {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    padding: 12px 14px;
    background: rgba(255,255,255,.04);
    border: 1px solid var(--vb-line);
    border-radius: var(--vb-radius);
}
.vb-user-detalhe__senha span { font-size: 13px; color: var(--vb-text-muted); flex-shrink: 0; }
.vb-user-detalhe__senha code { flex: 1; font-size: 14px; color: var(--vb-orange); word-break: break-all; }
.vb-user-detalhe__senha .vb-btn { flex-shrink: 0; }
.vb-modal__header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--vb-line); }
.vb-modal__header strong { color: #fff; font-size: 15px; font-weight: 600; }
.vb-modal__close { flex-shrink: 0; background: none; border: none; color: var(--vb-text-muted); font-size: 22px; line-height: 1; cursor: pointer; padding: 4px 10px; border-radius: 6px; }
.vb-modal__close:hover { color: #fff; background: rgba(255,255,255,.06); }
.vb-modal__body--preview { padding: 16px; max-height: 80vh; overflow: auto; display: flex; align-items: center; justify-content: center; }
.vb-modal__body--preview img { max-width: 100%; max-height: 76vh; border-radius: 6px; display: block; }
.vb-modal__body--preview iframe { width: 100%; height: 76vh; border: none; border-radius: 6px; background: #fff; }

.vb-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.vb-table th { text-align: left; padding: 10px 12px; background: rgba(255,255,255,.03); color: var(--vb-text-muted); font-weight: 600; border-bottom: 1px solid var(--vb-line); }
.vb-table td { padding: 10px 12px; border-bottom: 1px solid var(--vb-line); vertical-align: middle; color: #dfe4ea; }
.vb-table tr:hover td { background: rgba(255,255,255,.03); }
.vb-table a { color: #fff; font-weight: 600; }
.vb-table a:hover { color: var(--vb-orange); }

.vb-badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; color: #fff; }

/* Controles de formulário — estilo aplicado tanto dentro de .vb-form-group
   quanto a inputs/selects soltos (filtros de listagem, buscas inline etc.),
   para que nenhum campo escape do tema escuro. */
input[type="text"], input[type="search"], input[type="email"], input[type="password"],
input[type="tel"], input[type="number"], input[type="date"], input[type="url"],
select, textarea {
    padding: 9px 12px;
    background: rgba(6, 14, 26, .4);
    border: 1px solid var(--vb-line);
    border-radius: var(--vb-radius);
    color: var(--vb-text);
    font-size: 14px;
    font-family: inherit;
}
select { accent-color: var(--vb-orange); }
select option { background: var(--vb-navy-800); color: var(--vb-text); }
input::placeholder, textarea::placeholder { color: var(--vb-placeholder); }
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--vb-orange);
    box-shadow: 0 0 0 3px rgba(239,107,43,.16);
}

input[type="file"] {
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    background: rgba(6, 14, 26, .4);
    border: 1px solid var(--vb-line);
    border-radius: var(--vb-radius);
    color: var(--vb-text-muted);
    font-size: 14px;
    box-sizing: border-box;
}
input[type="file"]::file-selector-button {
    padding: 8px 14px;
    margin-right: 12px;
    background: var(--vb-navy-700);
    color: var(--vb-text);
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
}
input[type="file"]::file-selector-button:hover {
    background: rgba(255,255,255,.06);
    color: var(--vb-orange);
}
input[type="file"]:focus {
    outline: none;
    border-color: var(--vb-orange);
    box-shadow: 0 0 0 3px rgba(239,107,43,.16);
}

/* Alternativa ao input[type=file] nativo (botao-dentro-de-input) — o input
   real fica oculto e um <label> estilizado dispara o seletor de arquivo,
   com o nome do arquivo escolhido exibido a parte via JS. Ver admin.js. */
.vb-file-input { display: flex; align-items: center; gap: 12px; }
.vb-file-input__native { position: absolute; opacity: 0; width: 1px; height: 1px; overflow: hidden; }
.vb-file-input__button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    padding: 9px 16px;
    background: var(--vb-navy-700);
    border: 1px solid var(--vb-line);
    border-radius: var(--vb-radius);
    color: var(--vb-orange);
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
}
.vb-file-input__button:hover { background: rgba(255,255,255,.06); border-color: var(--vb-orange); }
.vb-file-input__native:focus-visible + .vb-file-input__button { outline: 2px solid var(--vb-orange); outline-offset: 2px; }
.vb-file-input__name { min-width: 0; font-size: 13px; color: var(--vb-text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.vb-form-group { margin-bottom: 16px; }
.vb-form-group label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; color: var(--vb-text-muted); }
.vb-form-group label.vb-checkbox-label { display: inline-flex; margin-bottom: 0; }
.vb-form-group .vb-checkbox-group { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }

.vb-form-group label.vb-icon-toggle { display: inline-flex; margin-bottom: 0; cursor: pointer; }
.vb-icon-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.vb-icon-toggle__box {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: 1px solid var(--vb-line);
    border-radius: var(--vb-radius);
    background: rgba(255,255,255,.02);
    color: var(--vb-text-muted);
    font-size: 13px;
    transition: border-color .12s ease, background .12s ease, color .12s ease;
}
.vb-icon-toggle__box svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--vb-orange); }
.vb-icon-toggle input:checked + .vb-icon-toggle__box { border-color: var(--vb-orange); background: rgba(239,107,43,.12); color: var(--vb-orange); }
.vb-icon-toggle input:focus-visible + .vb-icon-toggle__box { outline: 2px solid var(--vb-orange); outline-offset: 2px; }
.vb-icon-toggle:hover .vb-icon-toggle__box { border-color: rgba(239,107,43,.5); }

/* Painel de secoes liberadas por usuario (estagiario/funcionario_vorbi) —
   ver admin/usuarios/form.php e PermissaoService. */
.vb-permissoes {
    background: rgba(255,255,255,.02);
    border: 1px solid var(--vb-line);
    border-radius: var(--vb-radius);
    padding: 16px 18px;
}
.vb-permissoes__grupo { margin-bottom: 16px; }
.vb-permissoes__grupo:last-child { margin-bottom: 0; }
.vb-permissoes__grupo-titulo {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: var(--vb-orange);
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: 8px;
}
.vb-form-group input:not([type="checkbox"]):not([type="radio"]), .vb-form-group select, .vb-form-group textarea { width: 100%; }
.vb-form-row { display: flex; gap: 16px; }
.vb-form-row > .vb-form-group { flex: 1; }

/* Campo de texto com sugestões vindas do servidor (ex.: nome do condomínio no
   formulário público de reforma) — ver data-role="condominio-autocomplete" em admin.js. */
.vb-autocomplete { position: relative; }
.vb-autocomplete__list {
    position: absolute;
    z-index: 20;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    margin: 0;
    padding: 6px;
    list-style: none;
    max-height: 240px;
    overflow-y: auto;
    background: var(--vb-navy-800);
    border: 1px solid var(--vb-line);
    border-radius: var(--vb-radius);
    box-shadow: 0 12px 28px rgba(0,0,0,.35);
}
.vb-autocomplete__item {
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    color: var(--vb-text);
}
.vb-autocomplete__item:hover, .vb-autocomplete__item.is-active { background: rgba(239,107,43,.14); }
.vb-autocomplete__item small { display: block; margin-top: 2px; font-size: 12px; color: var(--vb-text-muted); }
.vb-autocomplete__empty { padding: 8px 10px; font-size: 13px; color: var(--vb-text-muted); }

/* Alinha a altura de select/input/botao na linha de upload de evidencias —
   sem isso o input[type=file] nativo renderiza mais baixo que os demais campos. */
.vb-anexo-form { align-items: stretch; }
.vb-anexo-form select,
.vb-anexo-form input[type="text"] { height: 40px; box-sizing: border-box; }
.vb-anexo-form .vb-file-input__button { height: 40px; box-sizing: border-box; }
.vb-anexo-form .vb-btn { height: 40px; box-sizing: border-box; display: inline-flex; align-items: center; }

.vb-checkbox-label { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 400; color: var(--vb-text); margin: 0 16px 0 0; }
.vb-checkbox-label input[type="checkbox"] { width: auto; }

.vb-alert { padding: 12px 16px; border-radius: var(--vb-radius); margin-bottom: 16px; font-size: 14px; }
.vb-alert--erro { background: var(--vb-danger-bg); color: var(--vb-danger); border: 1px solid rgba(248,113,113,.4); }
.vb-alert--sucesso { background: var(--vb-success-bg); color: var(--vb-success); border: 1px solid rgba(74,222,128,.4); }
.vb-alert--aviso { background: var(--vb-warning-bg); color: var(--vb-warning); border: 1px solid rgba(255,154,92,.4); display: flex; align-items: flex-start; gap: 10px; }
.vb-alert--aviso a { color: inherit; font-weight: 700; text-decoration: underline; }

.vb-empty { text-align: center; padding: 40px 20px; color: var(--vb-text-muted); }

/* Caixa de destaque para sugestões de IA dentro de formulários — usada em
   profissional/ocorrencias/nova.php para dar mais peso visual à opção
   "Sugerir com IA" em vez de um botão pequeno perdido dentro do campo. */
.vb-ia-suggest {
    margin: 4px 0 16px;
    padding: 16px;
    background: rgba(239, 107, 43, .08);
    border: 1px solid rgba(239, 107, 43, .35);
    border-radius: var(--vb-radius);
}
.vb-ia-suggest__row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.vb-ia-suggest__icon {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(239, 107, 43, .16);
    color: var(--vb-orange);
    display: flex;
    align-items: center;
    justify-content: center;
}
.vb-ia-suggest__text { flex: 1; min-width: 200px; }
.vb-ia-suggest__text strong { display: block; color: #fff; font-size: 14px; }
.vb-ia-suggest__text span { display: block; font-size: 12px; color: var(--vb-text-muted); margin-top: 2px; line-height: 1.5; }
.vb-ia-suggest__nota {
    margin-top: 12px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, .04);
    border-radius: 8px;
    font-size: 13px;
    color: var(--vb-text);
    line-height: 1.5;
}
.vb-ia-suggest__nota:empty { display: none; }

.vb-kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 20px; }
.vb-kpi { background: var(--vb-navy-800); border: 1px solid var(--vb-line); border-radius: var(--vb-radius); padding: 16px; }
.vb-kpi__value { font-size: 26px; font-weight: 700; color: #fff; }
.vb-kpi__label { font-size: 12px; color: var(--vb-text-muted); text-transform: uppercase; letter-spacing: .03em; }

/* Conteúdo do Dashboard — cartões, gráficos e tabela */
.vb-dashboard { color: var(--vb-text); }

.vb-dash-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin-bottom: 20px; }
.vb-dash-kpi {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: var(--vb-navy-800);
    border: 1px solid var(--vb-line);
    border-radius: 14px;
    padding: 18px;
}
.vb-dash-kpi__icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.vb-dash-kpi__value { font-size: 26px; font-weight: 700; color: #fff; line-height: 1.1; }
.vb-dash-kpi__label { font-size: 12px; color: var(--vb-text-muted); margin-top: 2px; }
.vb-dash-kpi__delta { display: block; font-size: 12px; margin-top: 6px; font-weight: 600; }
.vb-dash-kpi__delta--up { color: var(--vb-success); }
.vb-dash-kpi__delta--warn { color: var(--vb-warning); }

/* Linha do tempo do condominio — ver admin/condominios/linha_do_tempo.php e
   App\Services\CondominioTimelineService. Um item por evento, com um "no"
   (circulo colorido por tipo) ligado por uma linha vertical continua. */
.vb-timeline { display: flex; flex-direction: column; }
.vb-timeline__item { display: flex; gap: 16px; position: relative; padding-bottom: 26px; }
.vb-timeline__item:last-child { padding-bottom: 0; }
.vb-timeline__item:not(:last-child)::before {
    content: "";
    position: absolute;
    left: 19px;
    top: 40px;
    bottom: 0;
    width: 2px;
    background: var(--vb-line);
}
.vb-timeline__node {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--vb-navy-700);
    border: 1px solid var(--vb-line);
    z-index: 1;
}
.vb-timeline__node svg { width: 18px; height: 18px; }
.vb-timeline__content { flex: 1; min-width: 0; padding-top: 7px; }
.vb-timeline__data { display: block; font-size: 12px; color: var(--vb-text-muted); margin-bottom: 2px; }
.vb-timeline__titulo { display: block; color: #fff; font-size: 14px; font-weight: 600; }
.vb-timeline__titulo a { color: inherit; text-decoration: none; }
.vb-timeline__titulo a:hover { color: var(--vb-orange); }
.vb-timeline__detalhe { margin: 4px 0 0; font-size: 13px; color: var(--vb-text-muted); line-height: 1.5; }

.vb-timeline__node--cadastro,
.vb-timeline__node--inicio { background: var(--vb-orange); border-color: var(--vb-orange); color: #fff; }
.vb-timeline__node--fase { color: var(--vb-orange); }
.vb-timeline__node--profissional { color: #7aa7ff; }
.vb-timeline__node--profissional_revogado { color: #ff5c5c; }
.vb-timeline__node--vistoria { color: #7aa7ff; }
.vb-timeline__node--documento { color: #2dd4bf; }
.vb-timeline__node--documento_publicado { color: #4ade80; }
.vb-timeline__node--ocorrencia { color: #ff8a5c; }
.vb-timeline__node--ocorrencia_fechada { color: #4ade80; }
.vb-timeline__node--os { color: #b98cf0; }
.vb-timeline__node--os_fechada { color: #4ade80; }
.vb-timeline__node--aniversario { background: rgba(242,193,78,.14); border-color: #f2c14e; color: #f2c14e; }
.vb-timeline__node--ia { color: #b98cf0; }

.vb-timeline-legenda { display: flex; flex-wrap: wrap; gap: 12px 18px; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--vb-line); }
.vb-timeline-legenda__item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--vb-text-muted); }
.vb-timeline-legenda__dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }

.vb-dash-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 18px; margin-bottom: 18px; align-items: stretch; }
@media (min-width: 1101px) { .vb-dash-grid--2col { grid-template-columns: 1fr 1fr; } }
@media (max-width: 1100px) { .vb-dash-grid { grid-template-columns: 1fr; } }

.vb-dash-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin-bottom: 18px; align-items: stretch; }

.vb-dash-card {
    background: var(--vb-navy-800);
    border: 1px solid var(--vb-line);
    border-radius: 14px;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
}
.vb-dash-card__header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; gap: 10px; }
.vb-dash-card__header h2 { font-size: 14px; margin: 0; color: #fff; font-weight: 600; }
.vb-dash-card__link { font-size: 12px; color: var(--vb-orange); display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.vb-dash-card__link:hover { color: #ff9a5c; }
.vb-dash-card__body { flex: 1; display: flex; flex-direction: column; }

.vb-dash-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--vb-text-muted);
    font-size: 13px;
    text-align: center;
    padding: 20px 10px;
    min-height: 140px;
}
.vb-dash-empty svg { color: #3a4a63; }

.vb-dash-linechart { width: 100%; height: 150px; }

.vb-dash-legend { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.vb-dash-legend__item { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #c2cbd8; }
.vb-dash-legend__dot { width: 9px; height: 9px; border-radius: 999px; flex-shrink: 0; }
.vb-dash-legend__pct { margin-left: auto; color: var(--vb-text-muted); }

.vb-dash-radial { display: flex; flex-direction: column; align-items: center; justify-content: center; flex: 1; gap: 10px; }
.vb-dash-radial__value { font-size: 26px; font-weight: 700; fill: #fff; }
.vb-dash-radial__caption { font-size: 12px; color: var(--vb-text-muted); text-align: center; }

.vb-dash-table-card { background: var(--vb-navy-800); border: 1px solid var(--vb-line); border-radius: 14px; margin-bottom: 18px; }
.vb-dash-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.vb-dash-table th { text-align: left; padding: 10px 16px; color: var(--vb-text-muted); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--vb-line); }
.vb-dash-table td { padding: 12px 16px; border-bottom: 1px solid var(--vb-line); vertical-align: middle; color: #dfe4ea; }
.vb-dash-table tr:last-child td { border-bottom: none; }
.vb-dash-table tr:hover td { background: rgba(255,255,255,.02); }
.vb-dash-table a { color: #fff; font-weight: 600; }
.vb-dash-table a:hover { color: var(--vb-orange); }

.vb-dash-progress { display: flex; align-items: center; gap: 10px; }
.vb-dash-progress__track { flex: 1; height: 6px; border-radius: 999px; background: rgba(255,255,255,.08); overflow: hidden; min-width: 70px; }
.vb-dash-progress__fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--vb-orange), var(--vb-orange-dark)); }
.vb-dash-progress__label { font-size: 12px; color: var(--vb-text-muted); width: 34px; text-align: right; flex-shrink: 0; }

.vb-dash-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; }
.vb-dash-status::before { content: ''; width: 8px; height: 8px; border-radius: 999px; background: currentColor; }
.vb-dash-status--progress { color: var(--vb-info); }
.vb-dash-status--done { color: var(--vb-success); }

.vb-dash-badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; color: #fff; }

.vb-table__th-icon { vertical-align: -3px; margin-right: 6px; color: var(--vb-text-muted); }

.vb-icon-row { display: flex; align-items: center; gap: 12px; }
.vb-icon-row--top { align-items: flex-start; }
.vb-icon-row__icon { flex-shrink: 0; width: 40px; height: 40px; border-radius: 10px; background: rgba(239,107,43,.14); color: var(--vb-orange); display: flex; align-items: center; justify-content: center; }
.vb-icon-row__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.vb-icon-row__text strong { font-size: 14px; color: #fff; }
.vb-icon-row__text small { font-size: 12px; color: var(--vb-text-muted); line-height: 1.5; }

.vb-matrix-progress { display: flex; flex-direction: column; gap: 6px; min-width: 200px; }
.vb-matrix-progress__label { font-size: 13px; color: var(--vb-text); }
.vb-dash-progress--accent .vb-dash-progress__label { color: var(--vb-orange); font-weight: 600; }

.vb-prompt-preview { display: flex; align-items: flex-start; gap: 8px; color: var(--vb-text-muted); font-size: 13px; line-height: 1.5; }
.vb-prompt-preview__quote { flex-shrink: 0; color: var(--vb-orange); font-size: 20px; line-height: 1; font-weight: 700; }
.vb-prompt-details { margin-top: 8px; }
.vb-prompt-details summary { display: inline-flex; align-items: center; gap: 6px; color: var(--vb-orange); font-size: 12px; cursor: pointer; list-style: none; }
.vb-prompt-details summary::-webkit-details-marker { display: none; }
.vb-prompt-details summary:hover { text-decoration: underline; }
.vb-prompt-details__full { margin-top: 8px; padding: 12px; background: rgba(255,255,255,.02); border: 1px solid var(--vb-line); border-radius: var(--vb-radius); font-size: 12px; color: var(--vb-text); line-height: 1.6; white-space: pre-wrap; }

.vb-updated { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.vb-updated__icon { flex-shrink: 0; width: 28px; height: 28px; border-radius: 8px; background: rgba(239,107,43,.14); color: var(--vb-orange); display: flex; align-items: center; justify-content: center; }
.vb-updated__icon svg { width: 14px; height: 14px; }
.vb-updated__text strong { display: block; color: var(--vb-orange); font-weight: 600; }
.vb-updated__text span { color: var(--vb-text-muted); }

.vb-btn--outline-accent { display: inline-flex; align-items: center; gap: 6px; background: transparent; color: var(--vb-orange); border-color: var(--vb-orange); }
.vb-btn--outline-accent:hover, .vb-table a.vb-btn--outline-accent:hover { background: rgba(239,107,43,.14); color: var(--vb-orange); }

.vb-dash-solutions { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.vb-dash-solution {
    background: var(--vb-navy-800);
    border: 1px solid var(--vb-line);
    border-radius: 14px;
    padding: 20px;
}
.vb-dash-solution__icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(239,107,43,.14);
    color: var(--vb-orange);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}
.vb-dash-solution h3 { margin: 0 0 6px; font-size: 14px; color: #fff; }
.vb-dash-solution p { margin: 0 0 12px; font-size: 12px; color: var(--vb-text-muted); line-height: 1.5; }
.vb-dash-solution a { font-size: 12px; color: var(--vb-orange); font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.vb-dash-solution a:hover { color: #ff9a5c; }

/* Layout responsivo dos painéis de Profissional e Cliente — sidebar vira menu
   off-canvas abaixo de 880px, acionado pelo botão hamburguer na topbar
   (reaproveita o mecanismo data-dropdown-toggle/panel de admin.js). Restrito
   a body.vb-app--profissional/--cliente para não alterar o Admin, que não
   tem o botão hamburguer nem o id #vb-sidebar. */
@media (max-width: 880px) {
    body:is(.vb-app--profissional, .vb-app--cliente) .vb-topbar__menu-btn { display: inline-flex; align-items: center; justify-content: center; }

    body:is(.vb-app--profissional, .vb-app--cliente) .vb-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100dvh;
        width: 264px;
        max-width: 82vw;
        z-index: 300;
        transform: translateX(-100%);
        transition: transform .25s ease;
    }
    body:is(.vb-app--profissional, .vb-app--cliente) .vb-sidebar.is-open {
        transform: translateX(0);
        box-shadow: var(--vb-shadow);
    }
    body:is(.vb-app--profissional, .vb-app--cliente) .vb-sidebar__close { display: inline-flex; align-items: center; justify-content: center; }

    body:is(.vb-app--profissional, .vb-app--cliente):has(.vb-sidebar.is-open) { overflow: hidden; }
    body:is(.vb-app--profissional, .vb-app--cliente):has(.vb-sidebar.is-open)::before {
        content: '';
        position: fixed;
        inset: 0;
        background: rgba(4, 9, 16, .6);
        z-index: 290;
    }

    body:is(.vb-app--profissional, .vb-app--cliente) .vb-topbar { padding: 14px 16px; }
    body:is(.vb-app--profissional, .vb-app--cliente) .vb-topbar__user span { display: none; }
    body:is(.vb-app--profissional, .vb-app--cliente) .vb-content { padding: 16px; }

    body:is(.vb-app--profissional, .vb-app--cliente) .vb-card__header { flex-wrap: wrap; gap: 10px; }

    body:is(.vb-app--profissional, .vb-app--cliente) .vb-form-row { flex-direction: column; gap: 0; }

    body:is(.vb-app--profissional, .vb-app--cliente) .vb-kpi-grid,
    body:is(.vb-app--profissional, .vb-app--cliente) .vb-dash-kpis,
    body:is(.vb-app--profissional, .vb-app--cliente) .vb-dash-charts,
    body:is(.vb-app--profissional, .vb-app--cliente) .vb-dash-solutions {
        grid-template-columns: 1fr;
    }

    body:is(.vb-app--profissional, .vb-app--cliente) .vb-card__body,
    body:is(.vb-app--profissional, .vb-app--cliente) .vb-dash-table-card {
        overflow-x: auto;
    }
    body:is(.vb-app--profissional, .vb-app--cliente) .vb-table:not(.vb-table--cards),
    body:is(.vb-app--profissional, .vb-app--cliente) .vb-dash-table:not(.vb-table--cards) {
        min-width: 480px;
    }

    /* Tabelas simples de listagem (.vb-table--cards) viram cards empilhados
       em vez de rolar na horizontal — cada <td data-label="..."> exibe o
       rótulo da coluna via CSS, sem duplicar o cabeçalho da tabela. */
    body:is(.vb-app--profissional, .vb-app--cliente) .vb-table--cards { min-width: 0; }
    body:is(.vb-app--profissional, .vb-app--cliente) .vb-table--cards thead { display: none; }
    body:is(.vb-app--profissional, .vb-app--cliente) .vb-table--cards,
    body:is(.vb-app--profissional, .vb-app--cliente) .vb-table--cards tbody,
    body:is(.vb-app--profissional, .vb-app--cliente) .vb-table--cards tr,
    body:is(.vb-app--profissional, .vb-app--cliente) .vb-table--cards td {
        display: block;
        width: 100%;
    }
    body:is(.vb-app--profissional, .vb-app--cliente) .vb-table--cards tbody {
        display: flex;
        flex-direction: column;
        gap: 12px;
        padding: 12px;
    }
    body:is(.vb-app--profissional, .vb-app--cliente) .vb-table--cards tr {
        background: var(--vb-navy-800);
        border: 1px solid var(--vb-line);
        border-radius: var(--vb-radius);
        padding: 4px 14px;
    }
    body:is(.vb-app--profissional, .vb-app--cliente) .vb-table--cards tr:hover td { background: none; }
    body:is(.vb-app--profissional, .vb-app--cliente) .vb-table--cards td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 10px 0;
        border-bottom: 1px solid var(--vb-line);
        text-align: right;
    }
    body:is(.vb-app--profissional, .vb-app--cliente) .vb-table--cards td:last-child { border-bottom: none; }
    body:is(.vb-app--profissional, .vb-app--cliente) .vb-table--cards td[data-label]::before {
        content: attr(data-label);
        flex-shrink: 0;
        font-size: 12px;
        font-weight: 600;
        color: var(--vb-text-muted);
        text-align: left;
    }
    body:is(.vb-app--profissional, .vb-app--cliente) .vb-table--cards td:not([data-label]) {
        justify-content: center;
        padding-top: 12px;
    }
    body:is(.vb-app--profissional, .vb-app--cliente) .vb-table--cards td:not([data-label]) .vb-btn {
        width: 100%;
        justify-content: center;
        text-align: center;
        background: var(--vb-orange);
        border-color: transparent;
        color: #fff;
    }
    body:is(.vb-app--profissional, .vb-app--cliente) .vb-table--cards td:not([data-label]) .vb-btn:hover {
        background: var(--vb-orange-dark);
        color: #fff;
    }
}

/* Fundo com foto cobrindo a pagina inteira, mesmo tratamento visual da tela
   de login (ver login.css .vb-login--photo) — a imagem em si vem via style
   inline no view, isso aqui so cuida do enquadramento/overlay. Usado no
   formulario publico de reformas na rota generica (sem condominio
   pre-cadastrado) — ver publico/reformas/form.php. */
.vb-photo-page {
    min-height: 100vh;
    background-size: cover;
    background-position: center;
    padding: 40px 20px;
}

/* Banner com foto + gradiente azulado no topo de um card (telas dentro do
   painel, com sidebar — nao tem como usar .vb-photo-page ai). A imagem vem
   via style inline no view; aqui so o enquadramento/overlay. Ver
   cliente/reformas/nova.php. */
.vb-card-hero {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: 160px;
    background-size: cover;
    background-position: center;
    border-radius: var(--vb-radius) var(--vb-radius) 0 0;
    overflow: hidden;
}
.vb-card-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10,22,38,.35) 0%, rgba(10,22,38,.92) 100%);
}
.vb-card-hero__content { position: relative; padding: 18px 22px; }
.vb-card-hero__content h2 { margin: 0; color: #fff; }
.vb-card-hero__content p { margin: 4px 0 0; color: var(--vb-text-muted); font-size: 13px; }
