body {
    background-color: #f5f7fa;
}

.card {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.hover-shadow:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    transition: box-shadow .2s ease;
}

.badge-priority-critical { background-color: #dc3545; }
.badge-priority-high     { background-color: #fd7e14; }
.badge-priority-medium   { background-color: #0d6efd; }
.badge-priority-low      { background-color: #6c757d; }

/* Base de Conhecimento */
.kb-body { line-height: 1.8; font-size: 1rem; }
.kb-body h1, .kb-body h2, .kb-body h3 { margin-top: 1.5rem; }
.kb-body code {
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: .9em;
}
.kb-body pre {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 1rem;
    border-radius: 6px;
    overflow-x: auto;
}
.kb-body img { max-width: 100%; border-radius: 6px; }
.kb-body blockquote {
    border-left: 4px solid #0d6efd;
    padding-left: 1rem;
    color: #555;
    margin: 1rem 0;
}
.kb-body ul, .kb-body ol { padding-left: 1.5rem; }
.kb-body table { width:100%; border-collapse:collapse; margin:1rem 0; }
.kb-body table th, .kb-body table td {
    border:1px solid #dee2e6;
    padding:.5rem .75rem;
}
.kb-body table th { background:#f8f9fa; }

/* Editor da KB */
#kbBodyEditor:empty::before {
    content: attr(placeholder);
    color: #aaa;
}
#kbBodyEditor:focus { outline: none; }
#kbBodyEditor code {
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 4px;
}

/* Drag-and-drop de campos */
.field-row { transition: opacity .15s; }
.field-row[draggable="true"]:hover { background: #f8f9ff !important; }

/* Campo de chamado em formulario de abertura */
#dynamicFieldsContainer .form-label { font-weight: 500; }

/* ─── DARK MODE ──────────────────────────────────────────────────────────── */
[data-bs-theme="dark"] body                 { background-color: #0d1117; }
[data-bs-theme="dark"] .card               { background-color: #161b22; border-color: #30363d; }
[data-bs-theme="dark"] .card-header        { background-color: #1c2128; border-color: #30363d; }
[data-bs-theme="dark"] .list-group-item    { background-color: #161b22; border-color: #30363d; }
[data-bs-theme="dark"] .table             { --bs-table-bg: #161b22; --bs-table-striped-bg: #1c2128; }
[data-bs-theme="dark"] .bg-light          { background-color: #1c2128 !important; }
[data-bs-theme="dark"] .bg-white          { background-color: #161b22 !important; }
[data-bs-theme="dark"] .border            { border-color: #30363d !important; }
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select       { background-color: #0d1117; border-color: #30363d; color: #c9d1d9; }
[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus { background-color: #0d1117; border-color: #58a6ff; color: #c9d1d9; }
[data-bs-theme="dark"] .nav-tabs .nav-link         { color: #8b949e; }
[data-bs-theme="dark"] .nav-tabs .nav-link.active  { background-color: #161b22; border-color: #30363d #30363d #161b22; color: #c9d1d9; }
[data-bs-theme="dark"] .tab-content.border         { border-color: #30363d !important; background-color: #161b22; }
[data-bs-theme="dark"] .kb-body code              { background: #2d333b; color: #adbac7; }
[data-bs-theme="dark"] .kb-body pre               { background: #2d333b; color: #adbac7; }
[data-bs-theme="dark"] .kb-body blockquote        { border-left-color: #58a6ff; color: #8b949e; }
[data-bs-theme="dark"] #kbBodyEditor              { background-color: #0d1117; color: #c9d1d9; }
[data-bs-theme="dark"] .fields-sortable .field-row { background-color: #1c2128 !important; }
[data-bs-theme="dark"] .bg-warning-subtle          { background-color: #2d2a00 !important; }
[data-bs-theme="dark"] .bg-light.rounded           { background-color: #1c2128 !important; }

/* ─── ACESSIBILIDADE ─────────────────────────────────────────────────────── */
/* Skip-to-content: aparece ao usar Tab */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    padding: .5rem 1rem;
    background: #0d6efd;
    color: #fff;
    font-weight: 600;
    z-index: 10000;
    transition: top .1s;
}
.skip-link:focus { top: 0; }

/* Focus ring visível em modo de teclado */
:focus-visible {
    outline: 3px solid #0d6efd;
    outline-offset: 2px;
}

/* Contraste mínimo para badges em modo claro */
.badge.bg-light { color: #212529 !important; }

/* Tamanho mínimo de area clicavel (WCAG 2.5.5) */
.btn-sm { min-height: 32px; }

/* Animação reduzida para usuários que preferem */
@media (prefers-reduced-motion: reduce) {
    *, ::before, ::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
