/* ============================================================
   GED — TEMA GLOBAL do design system (Figma "GED — Redesign
   Documentos QA/UX"). Carregado após o Velzon: re-tokeniza e
   re-estiliza TODAS as telas com a linguagem visual do Figma.

   Tokens (frame "Análise QA/UX — TOKENS"):
   Primário #4f46e5 · Fundo #f4f6fa · Borda #e4e7ec
   Texto #101828 / Muted #667085 · Sucesso #22c55e
   Alerta #f59e0b · Perigo #ef4444 · Radius 10–14 · Inter
   ============================================================ */

:root, [data-bs-theme=light] {
    /* Paleta Figma → variáveis do tema Velzon */
    --vz-primary: #4f46e5;
    --vz-primary-rgb: 79, 70, 229;
    --vz-link-color: #4f46e5;
    --vz-link-hover-color: #4338ca;
    --vz-body-bg: #f4f6fa;
    --vz-body-color: #101828;
    --vz-border-color: #e4e7ec;
    --vz-secondary-bg: #ffffff;
    --vz-card-bg: #ffffff;
    --vz-header-bg: #ffffff;
    --vz-topbar-search-bg: #f4f6fa;
    --vz-light: #f2f4f7;
    --vz-light-rgb: 242, 244, 247;
    --vz-border-radius: 10px;
    --vz-border-radius-lg: 14px;
    /* Equivalentes Bootstrap */
    --bs-primary: #4f46e5;
    --bs-primary-rgb: 79, 70, 229;
    --bs-link-color: #4f46e5;
    --bs-link-hover-color: #4338ca;
    --bs-body-bg: #f4f6fa;
    --bs-body-color: #101828;
    --bs-border-color: #e4e7ec;
}

body { background-color: #f4f6fa; color: #101828; }

/* ------------------------------------------------------------
   Cartões
   ------------------------------------------------------------ */
/* A sutileza do DS: ANEL INTERNO de 1px + sombra suave — sem border.
   (--ring-card/--shadow-card vêm de ged-tokens.css) */
.card {
    border: 0; border-radius: var(--radius-card, 14px);
    box-shadow: var(--ring-card, inset 0 0 0 1px #e4e7ec), var(--shadow-card, 0 2px 10px -2px rgba(10, 18, 38, .10));
}
.card .card-header { background: transparent; border-bottom-color: #eff1f5; }
.card-title { font-weight: 600; color: #101828; }

/* ------------------------------------------------------------
   Botões
   ------------------------------------------------------------ */
.btn { border-radius: 10px; font-weight: 500; }
.btn-sm, .btn-group-sm > .btn { border-radius: 8px; }
.btn-primary {
    background-color: #4f46e5; border-color: #4f46e5; font-weight: 600;
    box-shadow: 0 2px 10px -2px rgba(79, 70, 229, .45);
}
.btn-primary:hover, .btn-primary:focus, .btn-primary:active,
.btn-primary:first-child:active, .btn-check:checked + .btn-primary {
    background-color: #4338ca !important; border-color: #4338ca !important;
}
.btn-soft-primary { background-color: #eef2ff; color: #4338ca; border-color: transparent; }
.btn-soft-primary:hover, .btn-soft-primary:focus { background-color: #e0e7ff; color: #3730a3; }
.btn-soft-secondary { background-color: #f2f4f7; color: #344054; border-color: transparent; }
.btn-soft-secondary:hover, .btn-soft-secondary:focus { background-color: #e9ecf2; color: #101828; }
.btn-light { border-color: #d0d5dd; }
.btn-outline-primary { color: #4f46e5; border-color: #c7d2fe; }
.btn-outline-primary:hover { background-color: #4f46e5; border-color: #4f46e5; }

/* ------------------------------------------------------------
   Formulários
   ------------------------------------------------------------ */
.form-control, .form-select { border-radius: 10px; border-color: #e4e7ec; color: #101828; }
.form-control:focus, .form-select:focus {
    border-color: #4f46e5; box-shadow: 0 0 0 3px rgba(79, 70, 229, .12);
}
.form-label { font-weight: 500; color: #344054; }
.form-check-input:checked { background-color: #4f46e5; border-color: #4f46e5; }
.form-check-input:focus { box-shadow: 0 0 0 3px rgba(79, 70, 229, .12); }
.input-group-text { border-color: #e4e7ec; }
.input-group .form-control { border-radius: 10px; }
.input-group > :first-child { border-top-left-radius: 10px; border-bottom-left-radius: 10px; }
.input-group > :last-child { border-top-right-radius: 10px; border-bottom-right-radius: 10px; }

/* ------------------------------------------------------------
   Tabelas
   ------------------------------------------------------------ */
.table thead th, .table .table-light th {
    background-color: #f9fafb !important; color: #667085;
    font-size: .68rem; text-transform: uppercase; letter-spacing: .04em;
    border-bottom: 1px solid #e4e7ec;
}
.table td { border-color: #eff1f5; }
.table-hover > tbody > tr:hover > * { background-color: #f9fafb; --vz-table-accent-bg: transparent; }

/* ------------------------------------------------------------
   Badges, alertas, progresso
   ------------------------------------------------------------ */
.badge { border-radius: 99px; font-weight: 500; }
.alert { border-radius: 10px; }
.progress { border-radius: 99px; background-color: #f2f4f7; }
.progress-bar { background-color: #4f46e5; }

/* ------------------------------------------------------------
   Modais, dropdowns, offcanvas, toasts
   ------------------------------------------------------------ */
.modal-content { border-radius: 16px; border: 1px solid #e4e7ec; box-shadow: 0 24px 60px -12px rgba(2, 6, 23, .25); }
.uk-modal-dialog { border-radius: 16px; }
.dropdown-menu {
    border-radius: 12px; border: 1px solid #e4e7ec; padding: .4rem;
    box-shadow: 0 14px 34px -10px rgba(2, 6, 23, .18);
}
.dropdown-item { border-radius: 8px; font-size: .82rem; }
.dropdown-item:hover, .dropdown-item:focus { background-color: #f2f4f7; }
.offcanvas-end { border-radius: 16px 0 0 16px; }
.toast { border-radius: 12px; }

/* ------------------------------------------------------------
   Abas, paginação, breadcrumb
   ------------------------------------------------------------ */
.nav-tabs-custom .nav-link.active { color: #101828; }
.nav-tabs-custom .nav-link::after { background: #4f46e5; }
.nav-pills .nav-link.active { background-color: #4f46e5; border-radius: 10px; }
.pagination .page-link { border-radius: 8px; margin: 0 2px; border-color: #e4e7ec; color: #475467; }
.page-item.active .page-link { background-color: #4f46e5; border-color: #4f46e5; }
.breadcrumb-item + .breadcrumb-item::before { color: #98a2b3; }

/* ------------------------------------------------------------
   Topbar e rodapé
   ------------------------------------------------------------ */
#page-topbar { background-color: #fff; border-bottom: 1px solid #e4e7ec; box-shadow: none !important; }
#page-topbar .app-search .form-control {
    background-color: #f4f6fa; border: 1px solid #e4e7ec; border-radius: 10px;
}
#page-topbar .app-search .form-control:focus { background-color: #fff; border-color: #4f46e5; }
.topbar-avatar { background-color: #7c6ff0; color: #fff; font-weight: 700; }
.footer { background: transparent; color: #98a2b3; border-top: 1px solid #e9eef5; }

/* ------------------------------------------------------------
   Títulos de página (telas que ainda usam o padrão do tema)
   ------------------------------------------------------------ */
.page-title-box h4 { font-weight: 600; color: #101828; }
.page-title-box .text-muted { color: #667085 !important; }

/* ------------------------------------------------------------
   Barras de rolagem discretas
   ------------------------------------------------------------ */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #d6dae1; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: #c3c9d3; }
::-webkit-scrollbar-track { background: transparent; }
