/* QUALIB — Design System */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/*
 * Paleta Oficial QUALIB
 * ─ Verde Primário  #15803D → logo, botões, títulos, navegação
 * ─ Azul Secundário #1E40AF → links, destaques, acentos
 * ─ Slate Neutro   #334155 → textos principais
 * ─ Fundos         #FFFFFF / #F8FAFC (branco e cinza claro)
 */
:root {
    --color-primary: #15803D;
    --color-primary-dark: #166534;
    --color-primary-soft: #F0FDF4;
    --color-accent: #1E40AF;
    --color-accent-dark: #1E3A8A;
    --color-accent-soft: #DBEAFE;
    --color-neutral: #334155;
    --color-bg: #FFFFFF;
    --color-warning: #F59E0B;
    --color-error: #EF4444;
    --color-white: #FFFFFF;
    --color-border: #E2E8F0;
    --color-muted: #64748B;
    --sidebar-width: 260px;
    --radius: 8px;
    --shadow: 0 1px 3px rgba(0,0,0,.08);
    --shadow-lg: 0 4px 16px rgba(0,0,0,.1);
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--color-bg);
    color: var(--color-neutral);
    line-height: 1.6;
    font-size: 14px;
}

/* ─── Buttons ─── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 10px 18px; border-radius: var(--radius); border: none;
    font-size: 14px; font-weight: 500; cursor: pointer;
    text-decoration: none; transition: all .15s;
}
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--color-primary-dark); }
.btn-accent { background: var(--color-accent); color: #fff; }
.btn-accent:hover { background: var(--color-accent-dark); }
.btn-secondary { background: var(--color-neutral); color: #fff; }
.btn-ghost { background: transparent; color: var(--color-neutral); border: 1px solid var(--color-border); }
.btn-ghost:hover { background: var(--color-bg); }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-block { width: 100%; }

/* ─── Forms ─── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.form-group { display: flex; flex-direction: column; gap: 4px; }
.form-group label { font-weight: 500; font-size: 13px; }
.field-label {
    display: inline-flex; align-items: center; gap: 6px;
    font-weight: 500; font-size: 13px; line-height: 1.3;
}
.field-label .req { color: var(--color-error); font-weight: 600; }
.field-help-btn {
    flex-shrink: 0; width: 16px; height: 16px; padding: 0;
    border-radius: 50%; border: 1px solid var(--color-border);
    background: var(--color-bg); color: var(--color-muted);
    font-size: 11px; font-weight: 700; line-height: 1; cursor: help;
    position: relative; transition: background .15s, color .15s, border-color .15s;
}
.field-help-btn:hover,
.field-help-btn:focus-visible,
.field-help-btn.is-open {
    background: var(--color-primary); color: #fff; border-color: var(--color-primary);
    outline: none;
}
.field-help-btn[data-help]::after {
    content: attr(data-help);
    position: absolute; left: 50%; bottom: calc(100% + 8px);
    transform: translateX(-50%);
    width: max-content; max-width: min(280px, 85vw);
    padding: 8px 10px; background: var(--color-neutral); color: #fff;
    font-size: 12px; font-weight: 400; line-height: 1.45; text-align: left;
    border-radius: 6px; white-space: normal;
    opacity: 0; visibility: hidden; pointer-events: none;
    z-index: 200; box-shadow: var(--shadow-lg);
}
.field-help-btn[data-help]::before {
    content: ''; position: absolute; left: 50%; bottom: calc(100% + 2px);
    transform: translateX(-50%);
    border: 6px solid transparent; border-top-color: var(--color-neutral);
    opacity: 0; visibility: hidden; z-index: 201;
}
.field-help-btn.is-open[data-help]::after,
.field-help-btn.is-open[data-help]::before,
.field-help-btn[data-help]:hover::after,
.field-help-btn[data-help]:hover::before,
.field-help-btn[data-help]:focus-visible::after,
.field-help-btn[data-help]:focus-visible::before {
    opacity: 1; visibility: visible;
}
@media (max-width: 640px) {
    .field-help-btn[data-help]:hover::after,
    .field-help-btn[data-help]:hover::before { opacity: 0; visibility: hidden; }
    .field-help-btn.is-open[data-help]::after,
    .field-help-btn.is-open[data-help]::before { opacity: 1; visibility: visible; }
}
.form-group input, .form-group select, .form-group textarea {
    padding: 10px 12px; border: 1px solid var(--color-border);
    border-radius: var(--radius); font-size: 14px; font-family: inherit;
    background: var(--color-white);
}
.form-group input:focus, .form-group select:focus { outline: 2px solid var(--color-primary); outline-offset: -1px; }
.form-group input.input-disabled, .form-group input:disabled {
    background: var(--color-bg); color: var(--color-muted); cursor: not-allowed;
}
.checkbox-inline { display: inline-flex; align-items: center; gap: 8px; font-weight: 400; }
.form-group textarea {
    padding: 10px 12px; border: 1px solid var(--color-border);
    border-radius: var(--radius); font-size: 14px; font-family: inherit;
    background: var(--color-white); resize: vertical; min-height: 80px;
}
.form-group textarea:focus { outline: 2px solid var(--color-primary); outline-offset: -1px; }
.form-group small { color: var(--color-muted); font-size: 12px; }
.checkbox-row { display: flex; gap: 24px; flex-wrap: wrap; }
.checkbox-row label { display: flex; align-items: center; gap: 8px; font-weight: 400; }
.form-actions { display: flex; gap: 10px; align-items: center; }

/* ─── Cards ─── */
.card { background: var(--color-white); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; }
.card-header { padding: 20px 24px; border-bottom: 1px solid var(--color-border); display: flex; align-items: center; justify-content: space-between; }
.card-header h2 { font-size: 16px; font-weight: 600; }
.card-body { padding: 24px; }
.mt-4 { margin-top: 24px; }

/* ─── Alerts ─── */
.alert { padding: 14px 18px; border-radius: var(--radius); margin-bottom: 16px; font-size: 13px; line-height: 1.5; }
.alert-error, .alert-fail { background: #fef2f2; color: var(--color-error); border: 1px solid #fecaca; }
.alert-success, .alert-ok { background: var(--color-accent-soft); color: var(--color-accent); border: 1px solid #93c5fd; }
.alert-warning { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.alert-info, .auth-info-box { background: #f0f9ff; color: #1e40af; border: 1px solid #bae6fd; }

/* ─── Sidebar Layout (3 divisões — padrão Expedio) ─── */
.app-shell { display: flex; min-height: 100vh; width: 100%; align-items: stretch; background: #FFFFFF; }
.has-sidebar { min-height: 100vh; }
.page-app { overflow-x: hidden; }

.sidebar {
    width: var(--sidebar-width);
    background: #fff;
    color: #fff;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: sticky;
    top: 8px;
    align-self: flex-start;
    height: calc(100vh - 16px);
    height: calc(100dvh - 16px);
    max-height: calc(100vh - 16px);
    max-height: calc(100dvh - 16px);
    margin: 8px 0 8px 8px;
    border-radius: 16px;
    overflow: hidden;
    z-index: 200;
    box-shadow: 0 4px 24px rgba(15, 23, 42, .12);
    --sidebar-pad-x: 16px;
}
.sidebar-brand {
    flex-shrink: 0;
    padding: 0 10px 4px;
    text-align: center;
    border-bottom: 1px solid var(--color-border, #e2e8f0);
    background: #fff;
    color: var(--color-neutral, #334155);
}
.sidebar-brand-stack-wrap { padding: 2px 8px 4px; background: #fff; }
.brand-stack { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.brand-stack--compact { gap: 4px; }
.brand-stack--sidebar-single { gap: 0; padding: 2px 0; }
.brand-stack__single { max-height: 36px; max-width: 140px; width: auto; height: auto; object-fit: contain; display: block; }
.brand-stack__qualib {
    height: auto; max-height: 72px; width: auto; max-width: 100%;
    object-fit: contain; display: block;
}
.brand-stack__client {
    height: auto; max-height: 48px; width: auto; max-width: 180px;
    object-fit: contain; display: block;
}
.brand-stack--sidebar .brand-stack__qualib {
    max-height: 112px;
    width: 100%;
    max-width: 210px;
    margin: 0 auto;
}
.brand-stack--sidebar .brand-stack__client {
    max-height: 40px;
    max-width: 150px;
    margin: 0 auto;
}
.sidebar-brand-stack-wrap .brand-stack__qualib { max-height: 32px; }
.sidebar-brand-stack-wrap .brand-stack--sidebar .brand-stack__qualib { max-height: 36px; }
.sidebar-brand-stack-wrap .brand-stack__client { max-height: 28px; max-width: 120px; }
.login-brand-stack .brand-stack__qualib { max-height: 80px; }
.login-brand-stack .brand-stack__client { max-height: 52px; max-width: 200px; }
.error-card .brand-stack { margin-bottom: 6px; gap: 4px; }
.error-card .brand-stack__qualib { max-height: 88px; max-width: 200px; }
.error-card .brand-stack__client { max-height: 44px; }
.sidebar-brand-qualib { padding-top: 22px; padding-bottom: 18px; }
.sidebar-logo { height: 36px; width: auto; max-width: 100%; object-fit: contain; }
.sidebar-logo-horizontal {
    height: auto; max-height: 174px; width: auto; max-width: 100%;
    margin: 0 auto 10px; display: block; object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,.2));
}
.sidebar-logo-vertical { height: auto; max-height: 72px; width: auto; max-width: 88px; margin: 0 auto 8px; display: block; }
.sidebar-brand-text strong { display: block; font-size: 14px; font-weight: 700; }
.sidebar-brand-text small { font-size: 10px; opacity: .8; line-height: 1.3; display: block; margin-top: 4px; }

.sidebar-nav {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
    background: linear-gradient(180deg, #1e40af 0%, #1e3a8a 100%);
    color: #fff;
}
.sidebar-nav-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px 0 12px;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.35) transparent;
    scrollbar-gutter: stable;
}
.sidebar-nav-scroll::-webkit-scrollbar { width: 6px; }
.sidebar-nav-scroll::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav-scroll::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,.28);
    border-radius: 999px;
}
.sidebar-nav-scroll::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.45); }
.sidebar-nav-group { border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar-nav-group:last-child { border-bottom: 0; }
.sidebar-group-toggle {
    list-style: none; cursor: pointer; padding: 10px var(--sidebar-pad-x, 16px);
    font-size: 11px; font-weight: var(--sidebar-group-fw, 700); font-style: var(--sidebar-group-fs, normal);
    text-transform: uppercase; letter-spacing: .06em;
    color: var(--sidebar-group-fg, rgba(255,255,255,.65)); user-select: none;
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.sidebar-group-toggle::-webkit-details-marker { display: none; }
.sidebar-group-toggle::after {
    content: '▾'; font-size: 10px; opacity: .7; transition: transform .15s;
}
.sidebar-nav-group:not([open]) .sidebar-group-toggle::after { transform: rotate(-90deg); }
.sidebar-group-toggle:hover {
    color: var(--sidebar-group-fg-hover, #fff);
    font-weight: var(--sidebar-group-fw-hover, 700);
    font-style: var(--sidebar-group-fs-hover, italic);
    background: rgba(255,255,255,.06);
}
.sidebar-nav-group[open] > .sidebar-group-toggle {
    color: var(--sidebar-group-fg-open, #fff);
    font-weight: var(--sidebar-group-fw-open, 700);
    font-style: var(--sidebar-group-fs-open, italic);
}
.sidebar-group-body { padding: 0 0 6px; }
.sidebar-link {
    display: block; padding: 8px var(--sidebar-pad-x, 16px); font-size: 13px; line-height: 1.35;
    font-weight: var(--sidebar-link-fw, 500); font-style: var(--sidebar-link-fs, normal);
    color: var(--sidebar-link-fg, rgba(255,255,255,.82)); text-decoration: none; transition: background .15s, color .15s;
    position: relative;
    box-sizing: border-box;
}
.sidebar-link::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
    background: transparent; transition: background .15s;
}
.sidebar-link:hover {
    background: rgba(255,255,255,.1);
    color: var(--sidebar-link-fg-hover, #fff);
    font-weight: var(--sidebar-link-fw-hover, 500);
    font-style: var(--sidebar-link-fs-hover, italic);
}
.sidebar-link-active {
    background: rgba(255,255,255,.12);
    color: var(--sidebar-link-fg-active, #fff);
    font-weight: var(--sidebar-link-fw-active, 600);
    font-style: var(--sidebar-link-fs-active, italic);
}
.sidebar-link-active::before { background: var(--color-accent); }

.sidebar-footer {
    flex-shrink: 0;
    margin-top: auto;
    padding: 12px var(--sidebar-pad-x, 16px) 14px;
    border-top: 1px solid rgba(255,255,255,.2);
    background: linear-gradient(180deg, #15803d 0%, #166534 100%);
    color: #fff;
}
.user-chip { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.user-avatar {
    width: 34px; height: 34px; border-radius: 50%; background: var(--color-accent);
    display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex-shrink: 0;
}
.user-avatar--photo { object-fit: cover; background: transparent; }
.user-photo-field { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.user-photo-preview {
    width: 96px; height: 96px; border-radius: 50%; overflow: hidden;
    border: 2px solid var(--color-border); background: var(--color-bg);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.user-photo-preview--empty { background: var(--color-primary-soft); }
.user-photo-preview__img { width: 100%; height: 100%; object-fit: cover; }
.user-photo-preview__placeholder { font-size: 36px; font-weight: 700; color: var(--color-primary); }
.user-photo-controls { flex: 1; min-width: 200px; }
.client-logo-slot { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 12px 0 0; text-align: center; }
.client-logo-slot--compact { margin: 8px 0 0; }
.client-logo-slot__img { max-width: 180px; max-height: 56px; object-fit: contain; }
.sidebar-client-brand .client-logo-slot__img { max-width: 140px; max-height: 44px; filter: brightness(1.05); }
.client-logo-slot__name { font-size: 12px; font-weight: 600; color: var(--color-primary); }
.sidebar-client-brand .client-logo-slot__name { color: rgba(255,255,255,.9); font-size: 11px; }
.user-chip-text { min-width: 0; flex: 1; }
.user-chip-text strong, .sidebar-foot-user { display: block; font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-chip-text small { display: block; font-size: 10px; opacity: .75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-foot-version {
    margin: 0 0 10px; padding: 0 2px; font-size: 11px; font-weight: 500;
    color: rgba(255,255,255,.55); letter-spacing: .02em;
}
.sidebar-logout-btn {
    display: block; width: 100%; box-sizing: border-box; padding: 8px 12px;
    border: 1px solid rgba(255,255,255,.22); border-radius: 8px;
    background: rgba(255,255,255,.08); color: #fff; font-size: 13px; font-weight: 600;
    text-align: center; text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s;
}
.sidebar-logout-btn:hover {
    background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.35); color: #fff;
}

/* Legado — links planos (fallback) */
.sidebar-nav a.nav-flat {
    display: flex; align-items: center; gap: 10px; padding: 10px 20px;
    color: rgba(255,255,255,.8); text-decoration: none; font-size: 13px; font-weight: 500;
}
.nav-icon { width: 20px; text-align: center; }

.main-content { flex: 1; min-width: 0; padding: 24px 32px; background: #FFFFFF; }

/* ─── Barra fixa de pendências ─── */
.pending-bar {
    position: sticky; top: 0; z-index: 120;
    margin: -24px -32px 20px; padding: 0;
    background: linear-gradient(135deg, #fff7ed 0%, #fffbeb 100%);
    border-bottom: 2px solid #f59e0b;
    box-shadow: 0 4px 12px rgba(245, 158, 11, .15);
}
.pending-bar-compact {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 10px 20px; flex-wrap: wrap;
}
.pending-bar-compact-left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.pending-bar-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 26px; height: 26px; border-radius: 50%;
    background: #f59e0b; color: #fff; font-weight: 800; font-size: 14px;
}
.pending-bar-title { font-size: 14px; font-weight: 700; color: #92400e; }
.pending-bar-total { font-size: 12px; color: #b45309; }
.pending-bar-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pending-chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 10px; border-radius: 999px; border: 1px solid #fcd34d;
    background: #fff; color: #92400e; font-size: 12px; font-weight: 600; cursor: pointer;
}
.pending-chip:hover, .pending-chip.is-active { background: #fef3c7; border-color: #f59e0b; }
.pending-chip-count {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
    background: #f59e0b; color: #fff; font-size: 11px; font-weight: 700;
}
.pending-bar-toggle {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 12px; border: 1px solid #fcd34d; border-radius: 8px;
    background: #fff; color: #92400e; font-size: 12px; font-weight: 600; cursor: pointer;
}
.pending-bar-toggle:hover { background: #fef3c7; }
.pending-bar.is-collapsed .pending-bar-toggle-icon { transform: rotate(180deg); }
.pending-bar-detail {
    padding: 0 20px 16px; border-top: 1px solid rgba(245, 158, 11, .25);
    max-height: min(50vh, 420px); overflow: auto;
}
.pending-bar.is-collapsed .pending-bar-detail { display: none; }
.pending-bar-hint { margin: 12px 0; font-size: 12px; color: #92400e; line-height: 1.5; }
.pending-bar-sections { display: grid; gap: 16px; }
.pending-section-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.pending-section-head h2 { font-size: 13px; font-weight: 700; color: #78350f; margin: 0; }
.pending-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pending-item {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
    padding: 10px 12px; border-radius: 10px; background: rgba(255,255,255,.85);
    border: 1px solid #fde68a;
}
.pending-item-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pending-item-body strong { font-size: 13px; color: #1e293b; }
.pending-item-body small { font-size: 12px; color: #64748b; }
.pending-item-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; flex-shrink: 0; }
.pending-chip-critical { border-color: #fecaca; background: #fef2f2; color: #991b1b; }
.pending-section-critical .pending-section-head h2 { color: #b91c1c; }
.pending-item-critical { border-color: #fca5a5; background: #fff1f2; }
.pending-item-aviation_tool strong, .pending-item-aviation_part strong { color: #991b1b; }
.aviation-login-alert { border-left: 4px solid #dc2626; }
.btn-danger { background: #dc2626; color: #fff; border: none; }
.btn-danger:hover { background: #b91c1c; color: #fff; }
.pending-ack-form { margin: 0; }
.nc-group-banner { margin-bottom: 16px; }
.form-hint { font-size: 12px; margin-top: 8px; }
.pending-section.is-highlight { animation: pending-flash .8s ease; }
@keyframes pending-flash { 0%,100% { background: transparent; } 50% { background: rgba(254,243,199,.6); } }
.page-app.has-pending-bar .main-content { padding-top: 16px; }

/* ─── Leitura obrigatória ─── */
.page-mandatory { background: var(--color-bg); min-height: 100vh; }
.mandatory-shell { min-height: 100vh; display: flex; flex-direction: column; }
.mandatory-topbar {
    background: linear-gradient(135deg, #1e3a5f 0%, #1e40af 100%);
    color: #fff; padding: 16px 24px; display: flex; flex-wrap: wrap; align-items: center;
    justify-content: space-between; gap: 12px;
}
.mandatory-brand { display: flex; align-items: center; gap: 14px; }
.mandatory-logo { height: 36px; filter: brightness(0) invert(1); }
.mandatory-topbar-hint { margin: 0; font-size: 13px; opacity: .9; max-width: 420px; }
.mandatory-main { flex: 1; padding: 24px; max-width: 960px; margin: 0 auto; width: 100%; }
.mandatory-queue h1 { font-size: 22px; margin-bottom: 8px; }
.mandatory-queue-intro { color: var(--color-muted); margin-bottom: 20px; line-height: 1.6; }
.mandatory-queue-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.mandatory-queue-item {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 16px; background: #fff; border-radius: 12px; border: 1px solid #e2e8f0;
    box-shadow: var(--shadow);
}
.mandatory-queue-item-body { display: flex; gap: 14px; align-items: flex-start; min-width: 0; }
.mandatory-queue-num {
    width: 32px; height: 32px; border-radius: 50%; background: #fef3c7; color: #92400e;
    display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0;
}
.mandatory-queue-item code { display: block; font-size: 12px; margin-bottom: 4px; }
.mandatory-queue-item strong { display: block; font-size: 15px; }
.mandatory-queue-item small { display: block; color: var(--color-muted); font-size: 12px; margin-top: 4px; }
.mandatory-reader { display: flex; flex-direction: column; height: calc(100vh - 100px); max-height: 900px; }
.mandatory-reader-head { flex-shrink: 0; margin-bottom: 12px; }
.mandatory-back-link { font-size: 13px; color: var(--color-accent); text-decoration: none; display: inline-block; margin-bottom: 8px; }
.mandatory-reader-head h1 { font-size: 20px; margin: 8px 0; }
.mandatory-reader-meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; align-items: center; }
.mandatory-scroll-panel {
    flex: 1; overflow-y: auto; background: #fff; border: 1px solid #e2e8f0;
    border-radius: 12px 12px 0 0; padding: 20px; min-height: 0;
}
.mandatory-scroll-panel.is-read-complete { border-color: #86efac; }
.mandatory-intro-block, .mandatory-pdf-block { margin-bottom: 24px; }
.mandatory-intro-block h2, .mandatory-pdf-block h2 { font-size: 14px; text-transform: uppercase; letter-spacing: .5px; color: var(--color-muted); margin-bottom: 10px; }
.mandatory-summary-text { line-height: 1.7; font-size: 14px; color: #334155; }
.mandatory-scroll-hint { font-size: 13px; margin-bottom: 12px; padding: 10px 12px; background: #fffbeb; border-radius: 8px; border: 1px solid #fde68a; }
.mandatory-pdf-pages { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.mandatory-pdf-page { max-width: 100%; box-shadow: 0 2px 8px rgba(0,0,0,.12); border-radius: 4px; }
.mandatory-html-frame { width: 100%; min-height: 70vh; border: 1px solid #e2e8f0; border-radius: 8px; }
.mandatory-loading { text-align: center; color: var(--color-muted); padding: 40px; }
.scroll-end-marker { text-align: center; padding: 32px 16px; color: var(--color-muted); font-size: 12px; border-top: 2px dashed #e2e8f0; margin-top: 16px; }
.mandatory-reader-footer {
    flex-shrink: 0; background: #fff; border: 1px solid #e2e8f0; border-top: none;
    border-radius: 0 0 12px 12px; padding: 16px 20px; display: flex; flex-wrap: wrap;
    align-items: center; justify-content: space-between; gap: 12px;
}
.mandatory-progress { flex: 1; min-width: 180px; }
.mandatory-progress-bar { display: block; height: 6px; background: #e2e8f0; border-radius: 999px; overflow: hidden; margin-bottom: 6px; }
.mandatory-progress-bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #f59e0b, #22c55e); transition: width .2s ease; }
.mandatory-progress small { font-size: 12px; color: var(--color-muted); }
#btn-mandatory-ack:disabled { opacity: .45; cursor: not-allowed; }
#btn-mandatory-ack.is-ready { animation: ack-pulse 1.5s ease infinite; }
@keyframes ack-pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(34,197,94,.4); } 50% { box-shadow: 0 0 0 8px rgba(34,197,94,0); } }

.page-header { margin-bottom: 24px; background: #FFFFFF; padding-bottom: 4px; }
.page-header h1 { font-size: 24px; font-weight: 700; color: var(--color-neutral); }
.page-actions { margin-bottom: 20px; }

/* ─── Dashboard ─── */
.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.stat-card {
    background: var(--color-white); border-radius: 12px; padding: 20px;
    box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 4px;
}
.stat-label { font-size: 12px; color: var(--color-muted); font-weight: 500; text-transform: uppercase; letter-spacing: .5px; }
.stat-value { font-size: 32px; font-weight: 700; color: var(--color-primary); }
.stat-link { font-size: 12px; color: var(--color-accent); text-decoration: none; margin-top: 8px; }
.feature-list { margin-top: 12px; padding-left: 20px; }
.feature-list li { margin-bottom: 6px; }
.quick-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.mb-4 { margin-bottom: 24px; }

/* ─── Painel Gerencial ─── */
.panel-hero {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
    flex-wrap: wrap; margin-bottom: 20px;
}
.panel-hero-title { font-size: 22px; font-weight: 700; color: var(--color-primary); margin-bottom: 4px; }
.panel-hero-meta { display: flex; gap: 8px; flex-wrap: wrap; }
.panel-alerts { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.panel-alert { text-decoration: none; margin-bottom: 0 !important; }
.panel-alert .alert-link { float: right; font-weight: 600; }
.panel-kpi-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px;
}
.kpi-card {
    background: var(--color-white); border-radius: 12px; padding: 18px;
    box-shadow: var(--shadow); display: flex; gap: 14px; align-items: flex-start;
    border-left: 4px solid var(--color-border);
}
.kpi-card.kpi-primary { border-left-color: var(--color-primary); }
.kpi-card.kpi-warning { border-left-color: var(--color-warning); }
.kpi-card.kpi-danger { border-left-color: var(--color-error); }
.kpi-card.kpi-accent { border-left-color: var(--color-accent); }
.kpi-icon { font-size: 24px; line-height: 1; }
.kpi-label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: var(--color-muted); font-weight: 600; }
.kpi-value { display: block; font-size: 28px; font-weight: 700; color: var(--color-neutral); line-height: 1.2; }
.kpi-sub { display: block; font-size: 12px; color: var(--color-muted); margin-top: 2px; }
.panel-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 960px) { .panel-two-col { grid-template-columns: 1fr; } }
.module-actions-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px;
}
.module-action {
    display: flex; flex-direction: column; gap: 2px; padding: 16px;
    background: var(--color-bg); border-radius: 10px; border: 1px solid var(--color-border);
    text-decoration: none; color: inherit; transition: border-color .15s, box-shadow .15s;
}
.module-action:hover { border-color: var(--color-primary); box-shadow: var(--shadow); }
.module-action strong { font-size: 13px; color: var(--color-neutral); }
.module-action small { font-size: 11px; color: var(--color-muted); }
.ma-icon { font-size: 20px; margin-bottom: 4px; }
.bar-chart { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 120px 1fr 36px; gap: 10px; align-items: center; }
.bar-label { font-size: 12px; color: var(--color-neutral); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { height: 8px; background: var(--color-bg); border-radius: 4px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 4px; background: var(--color-primary); min-width: 4px; }
.bar-fill.bar-publicado { background: var(--color-accent); }
.bar-fill.bar-rascunho { background: var(--color-muted); }
.bar-fill.bar-em_aprovacao, .bar-fill.bar-em_revisao { background: var(--color-warning); }
.bar-fill.bar-role { background: var(--color-primary); }
.bar-value { font-size: 12px; font-weight: 600; text-align: right; }
.drill-chart-card { margin-bottom: 0; }
.drill-chart { margin-top: 8px; }
.drill-bar-row {
    display: grid;
    grid-template-columns: 120px 1fr 36px;
    gap: 10px;
    align-items: center;
    text-decoration: none;
    color: inherit;
    padding: 6px 8px;
    margin: 0 -8px;
    border-radius: 8px;
    transition: background 0.15s, box-shadow 0.15s;
}
.drill-bar-row:hover {
    background: var(--color-primary-soft);
    box-shadow: inset 0 0 0 1px rgba(21, 128, 61, 0.2);
}
.drill-bar-row:hover .bar-fill { filter: brightness(1.08); }
.drill-bar-row:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}
.bar-fill.bar-nc { background: var(--color-primary); }
.bar-fill.bar-capa { background: var(--color-accent); }
.bar-fill.bar-severity { background: #dc2626; }
.bar-fill.bar-actions { background: var(--color-warning); }
.drill-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    margin-bottom: 16px;
    color: var(--color-muted);
}
.drill-breadcrumb a { color: var(--color-primary); text-decoration: none; font-weight: 500; }
.drill-breadcrumb a:hover { text-decoration: underline; }
.drill-hint { font-size: 12px; color: var(--color-muted); margin: 0 0 8px; }
.info-dl { display: grid; gap: 10px; }
.info-dl > div { display: grid; grid-template-columns: 140px 1fr; gap: 8px; font-size: 13px; }
.info-dl dt { color: var(--color-muted); font-weight: 500; }
.info-dl dd { color: var(--color-neutral); margin: 0; }
.activity-feed { list-style: none; display: flex; flex-direction: column; gap: 0; }
.activity-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--color-border); }
.activity-item:last-child { border-bottom: none; }
.activity-dot {
    width: 8px; height: 8px; border-radius: 50%; background: var(--color-primary);
    margin-top: 6px; flex-shrink: 0;
}
.activity-body { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.activity-body small { color: var(--color-muted); }
.panel-subtitle { font-size: 13px; font-weight: 600; color: var(--color-primary); margin-bottom: 10px; }
.mini-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.mini-list li { font-size: 13px; display: flex; flex-direction: column; gap: 2px; }
.mini-list a { color: var(--color-primary); text-decoration: none; }
.mini-list a:hover { text-decoration: underline; }
.mini-list small { color: var(--color-muted); font-size: 11px; }
.module-cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.module-card {
    padding: 18px; background: var(--color-bg); border-radius: 10px; border: 1px solid var(--color-border);
}
.module-card h3 { font-size: 14px; margin-bottom: 8px; }
.module-card p { font-size: 12px; color: var(--color-muted); margin-bottom: 12px; }
.badge-muted { background: #f1f5f9; color: var(--color-muted); }
.overview-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 640px) { .overview-grid { grid-template-columns: 1fr; } .bar-row { grid-template-columns: 90px 1fr 28px; } }

/* ─── Auth — login, recuperação, erros, instalador ─── */
.page-auth,
body.login-body {
    --auth-bg-deep: #0c2340;
    --auth-bg-mid: #14532d;
    min-height: 100vh;
    color: var(--color-neutral);
    background-color: var(--auth-bg-deep);
    background-image:
        radial-gradient(ellipse 110% 85% at 100% -10%, rgba(30, 64, 175, 0.55) 0%, transparent 52%),
        radial-gradient(ellipse 85% 65% at -5% 105%, rgba(34, 197, 94, 0.22) 0%, transparent 48%),
        radial-gradient(ellipse 70% 50% at 50% 0%, rgba(59, 130, 246, 0.35) 0%, transparent 55%),
        radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.06) 0%, transparent 55%),
        linear-gradient(155deg, #0c2340 0%, #14532d 32%, #15803d 55%, #166534 100%);
    background-attachment: fixed;
}
.page-auth::before,
body.login-body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.45;
    background-image:
        repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 14px),
        repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.02) 0 1px, transparent 1px 20px);
}
.login-page,
.error-page {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}
.login-card,
.error-card {
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.70);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 18px;
    padding: 28px 26px 22px;
    width: 100%;
    max-width: 400px;
    box-shadow:
        0 28px 56px rgba(15, 23, 42, 0.28),
        0 0 0 1px rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.35);
}
.login-card::before,
.error-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-accent) 100%);
}
.login-brand-stack { text-align: center; margin-bottom: 18px; }
.login-logo-qualib {
    max-width: min(320px, 100%);
    max-height: 96px;
    width: auto;
    height: auto;
    display: block;
    margin: 0 auto 12px;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(15, 23, 42, 0.08));
}
.login-slogan,
.login-company-name {
    font-size: 12px;
    color: var(--color-muted);
    margin: 6px 0 0;
    line-height: 1.45;
}
.login-company-name { font-weight: 600; color: var(--color-primary); font-size: 13px; }
.login-divider {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 10px 0 8px;
    color: rgba(100, 116, 139, 0.9);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}
.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-border), transparent);
}
.login-client-slot {
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 8px 0 6px;
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: none;
}
.login-client-slot--plain {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
}
.login-logo-client { max-width: 140px; max-height: 40px; object-fit: contain; }
.login-client-name { font-size: 12px; font-weight: 600; color: var(--color-primary); margin: 0; }
.login-client-placeholder {
    font-size: 11px;
    color: var(--color-muted);
    line-height: 1.4;
    text-align: center;
    padding: 4px 0;
}
.login-form { display: flex; flex-direction: column; gap: 14px; }
.login-body .form-group input {
    padding: 11px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.login-body .form-group input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(21, 128, 61, 0.15);
    outline: none;
}
.login-extras { display: flex; justify-content: center; margin-top: 6px; }
.login-forgot { font-size: 13px; color: var(--color-accent); text-decoration: none; font-weight: 500; }
.login-forgot:hover { text-decoration: underline; color: var(--color-accent-dark); }
.login-license {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    text-align: center;
    color: var(--color-muted);
    font-size: 11px;
    line-height: 1.35;
    margin: 20px 0 0;
}
.login-license__company { font-weight: 700; color: var(--color-primary); display: block; margin-top: 6px; }
.login-license__logo { max-width: 160px; max-height: 48px; object-fit: contain; display: block; margin: 8px auto 4px; }
.login-copyright {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 14px 0 0;
    padding-top: 14px;
    border-top: 1px solid var(--color-border);
    font-size: 11px;
    line-height: 1.45;
    text-align: center;
    color: var(--color-muted);
}
.login-copyright a { color: var(--color-accent); text-decoration: none; font-weight: 600; }
.login-copyright a:hover { text-decoration: underline; }
.login-body .btn-primary,
.login-body .btn:not(.btn-outline):not(.btn-ghost):not(.btn-compact) {
    background: linear-gradient(180deg, #16a34a 0%, var(--color-primary) 100%);
    box-shadow: 0 4px 14px rgba(21, 128, 61, 0.35);
}
.login-body .btn-primary:hover,
.login-body .btn:not(.btn-outline):not(.btn-ghost):not(.btn-compact):hover {
    background: linear-gradient(180deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
}
.auth-page-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--color-primary);
    margin: 0 0 10px;
    text-align: center;
}
.auth-page-text {
    font-size: 13px;
    line-height: 1.55;
    color: var(--color-muted);
    margin: 0 0 14px;
    text-align: center;
}
.btn-outline { background: #fff; border: 1px solid var(--color-primary); color: var(--color-primary); }
.btn-outline:hover { background: var(--color-primary-soft); }
.btn-compact {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
    border-radius: 6px;
    text-decoration: none;
    white-space: nowrap;
}
.inline-actions { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.login-logo-horizontal { max-width: min(300px, 100%); width: 100%; height: auto; margin-bottom: 12px; }
.login-brand { text-align: center; margin-bottom: 28px; }
.login-brand p { font-size: 13px; color: var(--color-muted); margin-top: 4px; }

/* ─── Install Wizard ─── */
.install-wizard { max-width: 680px; margin: 40px auto; padding: 0 20px; }
.install-header { text-align: center; margin-bottom: 32px; }
.install-logo { max-width: min(320px, 100%); width: 100%; height: auto; margin-bottom: 12px; }
.install-header h1 { font-size: 28px; color: var(--color-primary); }
.wizard-steps { display: flex; gap: 4px; margin-bottom: 28px; flex-wrap: wrap; }
.wizard-steps .step {
    flex: 1; min-width: 80px; text-align: center; padding: 8px 4px;
    font-size: 11px; font-weight: 500; color: var(--color-muted);
    border-bottom: 2px solid var(--color-border);
}
.wizard-steps .step.active { color: var(--color-primary); border-color: var(--color-primary); }
.wizard-steps .step.done { color: var(--color-accent); border-color: var(--color-accent); }
.wizard-panel { display: none; background: rgba(255, 255, 255, 0.70); backdrop-filter: blur(14px); border-radius: 12px; padding: 28px; box-shadow: var(--shadow); border: 1px solid rgba(255,255,255,.35); }
.wizard-panel.active { display: block; }
.wizard-panel h2 { font-size: 18px; margin-bottom: 20px; }
.wizard-actions { display: flex; gap: 10px; margin-top: 24px; justify-content: flex-end; }
.req-list { list-style: none; margin-bottom: 20px; }
.req-list li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--color-border); font-size: 13px; }
.req-list li.ok .req-icon { color: var(--color-accent); }
.req-list li.fail .req-icon { color: var(--color-error); }
.req-list small { margin-left: auto; color: var(--color-muted); }

/* ─── Empty State ─── */
.empty-state { text-align: center; padding: 48px 20px; }
.empty-icon { font-size: 48px; display: block; margin-bottom: 12px; }
.empty-state h3 { font-size: 18px; margin-bottom: 8px; }
.empty-state p { color: var(--color-muted); margin-bottom: 20px; }

/* ─── Error Pages ─── */
.page-error,
.page-error-fallback {
    min-height: 100vh;
}
.error-card {
    width: min(440px, 100%);
    max-width: 440px;
    padding: 36px 32px 28px;
    text-align: center;
}
.error-logo {
    max-width: min(260px, 100%);
    height: auto;
    margin: 0 auto 20px;
    display: block;
}
.error-code {
    display: inline-block;
    margin: 0 0 8px;
    padding: 4px 14px;
    border-radius: 999px;
    background: var(--color-primary-soft, #dbeafe);
    color: var(--color-primary);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .04em;
}
.error-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--color-neutral);
    margin: 0 0 10px;
}
.error-message {
    font-size: 14px;
    line-height: 1.55;
    color: var(--color-muted);
    margin: 0 0 24px;
}
.error-detail-box {
    text-align: left;
    margin: 0 0 20px;
    padding: 12px 14px;
    border-radius: var(--radius);
    background: #f8fafc;
    border: 1px solid var(--color-border);
    font-size: 12px;
}
.error-detail-box summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--color-muted);
    margin-bottom: 8px;
}
.error-detail-box pre,
.error-detail {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 11px;
    color: #475569;
}
.error-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 8px;
}
.error-slogan {
    margin: 16px 0 0;
    font-size: 12px;
    color: var(--color-muted);
}

/* ─── Misc ─── */
.text-muted { color: var(--color-muted); }
.search-input { padding: 8px 12px; border: 1px solid var(--color-border); border-radius: var(--radius); font-size: 13px; width: 260px; }
.brand-preview { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 20px; margin-top: 12px; padding: 16px; background: var(--color-bg); border-radius: var(--radius); }
.brand-preview-horizontal { max-width: 220px; max-height: 64px; width: auto; height: auto; object-fit: contain; }
.brand-preview-vertical { max-height: 88px; width: auto; object-fit: contain; }
.color-palette { display: flex; gap: 8px; margin-top: 12px; }
.color-swatch { width: 36px; height: 36px; border-radius: 6px; border: 1px solid var(--color-border); }
.config-section { margin-bottom: 24px; padding-bottom: 24px; border-bottom: 1px solid var(--color-border); }
.config-section h3 { font-size: 15px; margin-bottom: 8px; }

/* ─── Tables ─── */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th, .data-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--color-border); }
.data-table th { font-weight: 600; color: var(--color-muted); font-size: 11px; text-transform: uppercase; letter-spacing: .4px; background: var(--color-bg); }
.data-table tbody tr:hover { background: #f1f5f9; }
.data-table code { font-size: 12px; background: #e2e8f0; padding: 2px 6px; border-radius: 4px; }
.table-footer { margin-top: 12px; font-size: 12px; color: var(--color-muted); }

/* ─── Badges ─── */
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.badge-success { background: #dcfce7; color: var(--color-accent-dark); }
.badge-warning { background: #fef3c7; color: #b45309; }
.badge-error { background: #fee2e2; color: #b91c1c; }
.badge-info { background: var(--color-primary-soft); color: var(--color-primary); }
.badge-neutral { background: #e2e8f0; color: #475569; }
.badge-muted { background: #f1f5f9; color: #94a3b8; }

/* ─── Filters ─── */
.filter-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.filter-bar select { padding: 8px 10px; border: 1px solid var(--color-border); border-radius: var(--radius); font-size: 13px; }

/* ─── Document detail ─── */
.doc-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 24px; flex-wrap: wrap; }
.doc-code { font-size: 14px; background: #e2e8f0; padding: 4px 10px; border-radius: 4px; }
.doc-title { font-size: 22px; font-weight: 700; margin: 8px 0; }
.doc-meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--color-muted); }
.doc-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.btn-disabled, .btn.btn-disabled {
    opacity: .45; cursor: not-allowed; pointer-events: none;
    background: var(--color-bg); color: var(--color-muted); border: 1px solid var(--color-border);
}
.btn-danger-text { color: var(--color-error) !important; border-color: #fecaca !important; }
.btn-danger-text:hover { background: #fef2f2 !important; }
.version-actions { display: flex; gap: 8px; align-items: center; margin-top: 6px; flex-wrap: wrap; }
.text-sm { font-size: 12px; }

/* ─── Visualizador PDF ─── */
.doc-viewer-card { overflow: hidden; }
.doc-viewer-header { flex-wrap: wrap; gap: 12px; }
.doc-viewer-header h2 { margin-right: auto; }
.doc-viewer-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.viewer-version-label { font-size: 12px; color: var(--color-muted); display: flex; align-items: center; gap: 6px; }
.viewer-version-select {
    padding: 6px 10px; border: 1px solid var(--color-border); border-radius: 6px;
    font-size: 13px; background: var(--color-white);
}
.doc-viewer-body { padding: 0 !important; }
.doc-viewer-shell {
    position: relative; background: #475569; min-height: 560px;
}
.doc-viewer-pages {
    max-height: min(78vh, 900px);
    min-height: 560px;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.doc-viewer-page,
.qualib-pdf-page {
    max-width: 100%;
    height: auto !important;
    box-shadow: 0 2px 10px rgba(0,0,0,.25);
    border-radius: 4px;
    -webkit-user-drag: none;
    user-select: none;
    pointer-events: auto;
}
.doc-viewer-protected {
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}
.doc-viewer-frame {
    display: block; width: 100%; height: min(78vh, 900px); min-height: 560px;
    border: none; background: #334155;
}
.viewer-watermark {
    position: absolute; inset: 0; z-index: 2; pointer-events: none;
    display: flex; align-items: center; justify-content: center;
    font-size: clamp(24px, 5vw, 48px); font-weight: 700; color: rgba(255,255,255,.08);
    transform: rotate(-25deg); user-select: none;
}
.viewer-footnote { padding: 12px 20px; font-size: 12px; border-top: 1px solid var(--color-border); margin: 0; }
.viewer-mode-badge { background: #e2e8f0; color: #475569; }
@media print {
    .doc-viewer-card.viewer-no-print,
    .viewer-no-print .doc-viewer-frame,
    .doc-viewer-protected,
    .doc-viewer-protected *,
    .mandatory-pdf-pages,
    .mandatory-pdf-pages *,
    .page-mandatory .mandatory-scroll-panel {
        display: none !important;
        visibility: hidden !important;
    }
    body.page-mandatory::after,
    body.page-app:has(.doc-viewer-protected)::after {
        content: "Impressão não autorizada nesta visualização. Utilize o módulo de impressão do QUALIB.";
        display: block !important;
        visibility: visible !important;
        padding: 40px;
        font-size: 14pt;
        text-align: center;
    }
}
.inline-form { display: inline-flex; gap: 6px; align-items: center; }
.input-sm { padding: 8px 10px; border: 1px solid var(--color-border); border-radius: var(--radius); font-size: 13px; width: 180px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.detail-list { display: grid; grid-template-columns: 140px 1fr; gap: 8px 16px; font-size: 13px; }
.detail-list dt { color: var(--color-muted); font-weight: 500; }
.detail-list dd { margin: 0; }
.text-block { font-size: 14px; line-height: 1.7; margin-top: 8px; }
.version-list { list-style: none; }
.version-list li { padding: 12px 0; border-bottom: 1px solid var(--color-border); font-size: 13px; }
.version-list li p { margin: 6px 0; color: var(--color-muted); }
.version-list span { margin-right: 12px; color: var(--color-muted); font-size: 12px; }
.page-footer { margin-top: 24px; }
.overview-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.form-section { margin-bottom: 28px; padding-bottom: 20px; border-bottom: 1px solid var(--color-border); }
.form-section h3 { font-size: 15px; color: var(--color-primary); margin-bottom: 14px; }
.form-section:last-child { border-bottom: none; }
.company-form .form-grid { margin-top: 0; }

/* ─── Config tabs ─── */
.config-sticky-bar {
    position: sticky;
    top: 0;
    z-index: 120;
    background: color-mix(in srgb, var(--color-bg) 92%, #fff 8%);
    backdrop-filter: blur(8px);
    padding: 8px 0 12px;
    margin: -4px 0 0;
    border-bottom: 1px solid var(--color-border);
}
.config-tabs { display: flex; gap: 8px; margin-top: 0; flex-wrap: wrap; }
.config-tab { padding: 10px 16px; border-radius: var(--radius); background: var(--color-white); border: 1px solid var(--color-border); text-decoration: none; color: var(--color-neutral); font-size: 13px; font-weight: 500; }
.config-tab.active, .config-tab:hover { border-color: var(--color-primary); color: var(--color-primary); }
.config-panel { display: none; }
.config-panel.is-active { display: block; }
.brand-preview-system { opacity: .85; border: 1px dashed var(--color-border); padding: 8px; border-radius: 8px; }

.critical-alert-modal { position: fixed; inset: 0; z-index: 9000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.critical-alert-modal[hidden] { display: none !important; }
.critical-alert-backdrop { position: absolute; inset: 0; background: rgba(15,23,42,.55); }
.critical-alert-dialog {
    position: relative; width: min(520px, 100%); max-height: 85vh; overflow: auto;
    background: #fff; border-radius: 16px; box-shadow: 0 24px 48px rgba(0,0,0,.25);
    border-top: 5px solid #dc2626;
}
.critical-alert-head { display: flex; align-items: center; gap: 10px; padding: 16px 18px 8px; }
.critical-alert-head h2 { margin: 0; font-size: 18px; flex: 1; }
.critical-alert-close { border: none; background: none; font-size: 24px; cursor: pointer; color: var(--color-muted); }
.critical-alert-badge { font-size: 11px; font-weight: 800; padding: 4px 8px; border-radius: 6px; }
.critical-alert-level--critical { background: #fee2e2; color: #b91c1c; }
.critical-alert-level--high { background: #ffedd5; color: #c2410c; }
.critical-alert-level--warning { background: #fef9c3; color: #a16207; }
.critical-alert-body { padding: 8px 18px; display: flex; flex-direction: column; gap: 10px; }
.critical-alert-item { padding: 10px 12px; border-radius: 10px; border: 1px solid var(--color-border); }
.critical-alert-item-level { font-size: 10px; font-weight: 800; display: block; margin-bottom: 4px; }
.critical-alert-foot { padding: 12px 18px 18px; border-top: 1px solid var(--color-border); }
.menu-theme-grid { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.menu-theme-row { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(120px, 160px) minmax(140px, 180px); gap: 10px; align-items: center; font-size: 13px; }
.menu-theme-row strong { font-weight: 600; font-size: 12px; color: var(--color-muted); }
.table-actions { white-space: nowrap; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.package-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-top: 12px; }
.package-card { display: flex; flex-direction: column; gap: 6px; padding: 14px; border: 2px solid var(--color-border); border-radius: 12px; cursor: pointer; background: var(--color-white); transition: border-color .15s, box-shadow .15s; }
.package-card.is-selected, .package-card:has(input:checked) { border-color: var(--color-primary); box-shadow: 0 0 0 1px var(--color-primary); }
.package-card.is-disabled, .package-select-section.is-readonly .package-card { cursor: default; opacity: .92; }
.package-select-section.is-readonly .package-card:not(.is-selected) { opacity: .55; }
.package-readonly-banner { margin-bottom: 12px; padding: 12px 14px; background: var(--color-primary-soft); border-left: 4px solid var(--color-primary); border-radius: 0 8px 8px 0; font-size: 13px; }
.package-backup-meta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; color: var(--color-muted); }
.install-mode-select .mode-option { display: flex; align-items: center; gap: 8px; margin: 8px 0; font-weight: 500; }
.package-card input { position: absolute; opacity: 0; pointer-events: none; }
.package-icon { font-size: 1.5rem; }
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.detail-list { display: grid; grid-template-columns: 140px 1fr; gap: 8px 16px; font-size: 13px; }
.detail-list dt { color: var(--color-muted); font-weight: 600; }
.report-section-title { font-size: 1rem; font-weight: 700; margin: 24px 0 12px; color: var(--color-neutral); }
.report-section-title:first-child { margin-top: 8px; }
.aircraft-tab-bar { display: flex; gap: 4px; margin-bottom: 20px; border-bottom: 1px solid var(--color-border); flex-wrap: wrap; }
.aircraft-tab { border: 0; background: transparent; padding: 10px 16px; cursor: pointer; font-size: 14px; font-weight: 500; color: var(--color-muted); border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; align-items: center; gap: 6px; }
.aircraft-tab:hover { color: var(--color-neutral); }
.aircraft-tab.is-active { color: var(--color-primary); border-bottom-color: var(--color-primary); font-weight: 600; }
.tab-badge { display: inline-flex; min-width: 1.25rem; height: 1.25rem; padding: 0 5px; border-radius: 999px; background: var(--color-primary-soft); color: var(--color-primary); font-size: 11px; font-weight: 700; align-items: center; justify-content: center; }
.aircraft-tab-panel { display: none; }
.aircraft-tab-panel.is-active { display: block; }
.file-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--color-border); flex-wrap: wrap; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.toolbar-filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; text-transform: uppercase; }
.badge-active { background: #dcfce7; color: #15803d; }
.badge-aog { background: #fef2f2; color: #dc2626; }
.badge-storage { background: #fef9c3; color: #a16207; }
.badge-retired { background: #e2e8f0; color: #64748b; }
.field-guide-dock { position: fixed; z-index: 150; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; background: linear-gradient(165deg, #14532d 0%, #15803d 100%); color: #fff; box-shadow: 0 -6px 32px rgba(21,128,61,.35); border-top: 1px solid rgba(255,255,255,.12); font-size: .9rem; max-height: 3rem; transition: max-height .25s ease; }
.page-app.has-sidebar .field-guide-dock { left: var(--sidebar-width); }
.field-guide-dock.is-expanded { max-height: min(42vh, 320px); }
.field-guide-dock.is-empty .field-guide-dock-content { display: none; }
.field-guide-dock-bar { display: flex; align-items: center; gap: .5rem; min-height: 3rem; padding: .4rem 1rem; cursor: pointer; }
.field-guide-dock-summary { flex: 1; font-weight: 600; font-size: .88rem; }
.field-guide-dock-toggle { width: 2rem; height: 2rem; border: 0; border-radius: 8px; background: rgba(255,255,255,.12); color: #fff; cursor: pointer; }
.field-guide-dock-content { padding: 0 1rem 1rem; overflow-y: auto; flex: 1; }
.field-guide-title { margin: 0 0 .35rem; font-size: 1rem; }
.field-guide-hint { margin: 0 0 .5rem; opacity: .92; }
.field-with-guide.is-guided label { color: var(--color-primary); font-weight: 600; }
.page-app.has-sidebar .main-content { padding-bottom: 3.5rem; }
.palette-row { display: flex; gap: 8px; margin-top: 8px; }
.mb-4 { margin-bottom: 24px; }
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; }

/* ─── Perfis / RBAC ─── */
.roles-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 20px 0; }
.role-card { background: var(--color-bg); border-radius: var(--radius); padding: 16px; border: 1px solid var(--color-border); }
.role-card-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.role-user-count {
    border: none; background: none; padding: 0; font-size: 12px; color: var(--color-accent);
    font-weight: 600; cursor: help; text-decoration: underline dotted;
}
.role-users-popover {
    position: fixed; z-index: 500; width: 260px; padding: 12px;
    background: #fff; border: 1px solid var(--color-border); border-radius: 12px;
    box-shadow: 0 12px 32px rgba(15,23,42,.18);
}
.role-users-list { list-style: none; margin: 0; padding: 0; }
.role-users-list li { padding: 8px 0; border-bottom: 1px solid var(--color-border); }
.role-users-list li:last-child { border-bottom: none; }
.role-card h3 { font-size: 14px; margin-bottom: 6px; color: var(--color-primary); }
.role-card p { font-size: 12px; color: var(--color-muted); margin-bottom: 8px; }
.matrix-table .matrix-col { font-size: 11px; writing-mode: vertical-rl; text-orientation: mixed; max-width: 48px; }
.matrix-module td { background: var(--color-bg); font-weight: 700; font-size: 11px; letter-spacing: .5px; }
.matrix-check { text-align: center; }
.matrix-check .ok { color: var(--color-accent); font-weight: 700; }

/* ─── Governança / Aprovações ─── */
.approval-list { display: flex; flex-direction: column; gap: 16px; }
.approval-card { border: 1px solid var(--color-border); border-radius: var(--radius); padding: 16px; background: #fff; }
.approval-card-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.approval-meta { font-size: 13px; margin-bottom: 12px; }
.approval-payload { margin-bottom: 12px; font-size: 13px; }
.approval-payload-body { padding: 8px 0 4px; }
.approval-payload-dl { display: grid; grid-template-columns: minmax(120px, 38%) 1fr; gap: 6px 12px; margin: 0; }
.approval-payload-dl dt { font-weight: 600; color: var(--color-neutral); margin: 0; }
.approval-payload-dl dd { margin: 0; color: var(--color-text, #0f172a); }
.approval-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.filter-bar-stack { flex-wrap: wrap; gap: 8px; }

/* ─── Relatórios impressão A4 (padrão Expedio) ─── */
.report-print-area { border: none; box-shadow: none; }
.report-print-header {
    display: flex; flex-direction: column; align-items: center;
    gap: 10px; padding: 0 24px 14px; margin-bottom: 16px;
    border-bottom: 2px solid var(--color-primary);
}
.report-print-header__brands {
    display: flex; align-items: center; justify-content: center;
    gap: 20px; flex-wrap: wrap; width: 100%; max-width: 520px;
}
.report-print-header__qualib {
    height: 56px; width: auto; max-width: 200px; object-fit: contain; flex-shrink: 0;
}
.report-print-header__client {
    height: 48px; width: auto; max-width: 160px; object-fit: contain; flex-shrink: 0;
}
.report-print-header__titles { text-align: center; width: 100%; }
.report-print-header__title { font-size: 1.15rem; font-weight: 700; margin: 0 0 4px; color: var(--color-neutral); line-height: 1.25; }
.report-print-header__meta { font-size: 11px; color: var(--color-muted); margin: 0; }
.report-print-footer {
    margin-top: 20px; padding-top: 10px; border-top: 1px solid var(--color-border);
    font-size: 10px; color: var(--color-muted); text-align: center;
}
.report-print-table { font-size: 11px; }
.report-print-table th, .report-print-table td { padding: 6px 8px; }

@media print {
    @page { size: A4 portrait; margin: 18mm 15mm 20mm 15mm; }
    body.page-app { background: #fff !important; }
    .sidebar, .page-header, .page-actions, .no-print, .field-guide-dock, .pending-header-bar { display: none !important; }
    .main-content { margin: 0 !important; padding: 0 !important; max-width: none !important; }
    .app-shell { display: block !important; }
    .report-print-area { border: none !important; box-shadow: none !important; margin: 0 !important; }
    .report-print-area .card-body { padding: 0 !important; }
    .report-print-header { page-break-inside: avoid; }
    .report-print-table { width: 100% !important; border-collapse: collapse !important; }
    .report-print-table th, .report-print-table td { border: 1px solid #cbd5e1 !important; }
    .report-print-table thead { display: table-header-group; }
    .report-print-table tr { page-break-inside: avoid; }
    .report-print-footer {
        position: fixed; bottom: 0; left: 0; right: 0;
        border-top: 1px solid #cbd5e1; padding-top: 6px; font-size: 9pt;
    }
}

/* ─── Relatórios ─── */
.report-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.report-card { display: block; padding: 20px; background: #fff; border-radius: 12px; border: 1px solid var(--color-border); text-decoration: none; color: inherit; transition: box-shadow .15s; }
.report-card:hover { box-shadow: var(--shadow-lg); border-color: var(--color-primary-soft); }
.report-card h3 { font-size: 16px; color: var(--color-primary); margin-bottom: 8px; }
.report-card p { font-size: 13px; color: var(--color-muted); margin-bottom: 14px; }

/* ─── Links públicos ─── */
.public-link-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.public-link-card { display: flex; gap: 16px; align-items: flex-start; padding: 14px; border: 1px solid var(--color-border); border-radius: var(--radius); }
.public-qr { border: 1px solid var(--color-border); border-radius: 6px; background: #fff; }
.public-url-input { width: 100%; font-size: 11px; margin: 8px 0; }
.public-doc-page { max-width: 960px; margin: 0 auto; padding: 24px 16px; }
.public-doc-header { text-align: center; margin-bottom: 20px; }
.public-pdf-wrap { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-lg); }
.public-pdf-frame { width: 100%; min-height: 70vh; border: 0; display: block; }
.public-doc-footer { text-align: center; margin-top: 16px; color: var(--color-muted); }

/* ─── Tabelas responsivas (mobile/tablet) ─── */
@media (max-width: 768px) {
    .responsive-table thead { display: none; }
    .responsive-table tr { display: block; margin-bottom: 12px; border: 1px solid var(--color-border); border-radius: var(--radius); padding: 10px; background: #fff; }
    .responsive-table td { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border: 0; font-size: 13px; }
    .responsive-table td::before { content: attr(data-label); font-weight: 600; color: var(--color-muted); font-size: 11px; text-transform: uppercase; flex-shrink: 0; }
    .filter-bar, .page-actions { flex-direction: column; align-items: stretch; }
    .search-input { width: 100%; max-width: none; }
    .public-link-card { flex-direction: column; align-items: center; text-align: center; }
    .approval-form { flex-direction: column; align-items: stretch; }
    .approval-form .search-input { width: 100%; }
}

@media (max-width: 768px) {
    .app-shell, .has-sidebar { flex-direction: column; }
    .sidebar {
        position: relative;
        top: auto;
        width: 100%;
        height: auto;
        max-height: none;
        overflow: visible;
    }
    .sidebar-nav { max-height: none; }
    .sidebar-nav-scroll { max-height: 50vh; flex: none; }
    .sidebar-footer { margin-top: 0; }
    .page-app.has-sidebar .field-guide-dock { left: 0; }
    .form-grid { grid-template-columns: 1fr; }
    .grid-2, .overview-grid { grid-template-columns: 1fr; }
    .doc-header { flex-direction: column; }
}

/* ─── Password toggle (Expedio pattern) ─── */
.password-wrap {
    display: flex; align-items: stretch; width: 100%;
    border: 1px solid var(--color-border); border-radius: var(--radius);
    background: var(--color-white); overflow: hidden;
}
.password-wrap:focus-within { outline: 2px solid var(--color-primary); outline-offset: -1px; }
.password-wrap input { flex: 1; min-width: 0; border: 0 !important; background: transparent !important; box-shadow: none !important; border-radius: 0; }
.password-toggle {
    flex-shrink: 0; width: 2.75rem; display: flex; align-items: center; justify-content: center;
    border: 0; background: transparent; color: var(--color-muted); cursor: pointer; padding: 0;
}
.password-toggle:hover { color: var(--color-neutral); background: rgba(0,0,0,.04); }
.password-toggle svg { width: 1.2rem; height: 1.2rem; display: block; }

/* ─── Field guide dock (Expedio pattern) ─── */
.field-help-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--color-border);
    background: #fff; color: var(--color-primary); font-size: 11px; font-weight: 700;
    cursor: pointer; padding: 0; line-height: 1;
}
.field-help-icon:hover { background: var(--color-primary-soft); }
.field-with-guide.is-guided label { color: var(--color-primary); }
.field-guide-example, .field-guide-format { margin: .25rem 0; font-size: .85rem; }
.field-guide-required { display: inline-block; margin-top: .35rem; padding: .15rem .5rem; border-radius: 4px; background: rgba(21, 128, 61, .35); font-size: .75rem; }
.install-wizard { padding-bottom: 4rem; }

/* ─── Visualizador de arquivo in-app ─── */
.qualib-file-modal { position: fixed; inset: 0; z-index: 9000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.qualib-file-modal[hidden] { display: none !important; }
.qualib-file-modal__backdrop { position: absolute; inset: 0; background: rgba(15,23,42,.55); }
.qualib-file-modal__panel {
    position: relative; z-index: 1; width: min(960px, 96vw); max-height: 92vh;
    background: #fff; border-radius: 14px; box-shadow: 0 20px 50px rgba(0,0,0,.25);
    display: flex; flex-direction: column; overflow: hidden;
}
.qualib-file-modal__head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--color-border); }
.qualib-file-modal__body { flex: 1; min-height: 0; overflow: auto; background: #0f172a; display: flex; align-items: center; justify-content: center; padding: 12px; }
.qualib-file-modal__body iframe { width: 100%; min-height: 70vh; border: 0; background: #fff; }
.qualib-file-modal__body img { max-width: 100%; max-height: 80vh; object-fit: contain; display: block; }
body.qualib-modal-open { overflow: hidden; }

/* ─── RH / Pessoas — popups e onboarding ─── */
.people-popup-modal { position: fixed; inset: 0; z-index: 9100; display: flex; align-items: center; justify-content: center; padding: 20px; }
.people-popup-modal[hidden] { display: none !important; }
.people-popup-modal__backdrop { position: absolute; inset: 0; background: rgba(15,23,42,.45); backdrop-filter: blur(2px); }
.people-popup-modal__panel {
    position: relative; z-index: 1; max-width: 480px; width: 100%;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 28px 24px 20px; box-shadow: 0 24px 48px rgba(15,23,42,.18); text-align: center;
}
.people-popup-modal__message {
    white-space: pre-line; color: #475569; margin: 0 0 20px; line-height: 1.55;
    background: #f8fafc; border-radius: 10px; padding: 14px 16px; border: 1px solid #e2e8f0;
}
.people-popup-modal--warm .people-popup-modal__panel { background: linear-gradient(180deg, #fffbeb 0%, #ffffff 55%); }
.people-popup-modal--festive .people-popup-modal__panel { background: linear-gradient(180deg, #eff6ff 0%, #ffffff 55%); }
.people-popup-modal--team .people-popup-modal__panel { background: linear-gradient(180deg, #fdf2f8 0%, #ffffff 55%); }
.people-popup-modal--info .people-popup-modal__panel { background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 55%); }
.people-popup-modal__icon { font-size: 2.5rem; line-height: 1; margin-bottom: 8px; }
.people-popup-modal__title { font-size: 1.25rem; margin: 0 0 12px; color: var(--color-neutral, #334155); }
.people-popup-modal__actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.login-card--wide { max-width: 480px !important; }
.form-grid--auth { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }
.form-grid--auth .full { grid-column: 1 / -1; }
.auth-page-footnote { font-size: 12px; color: var(--color-muted); margin: 16px 0 12px; line-height: 1.5; }
.auth-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.auth-tab { flex: 1; padding: 10px; border: 1px solid var(--color-border); border-radius: 8px; background: #fff; cursor: pointer; font-weight: 600; font-size: 13px; }
.auth-tab.is-active { border-color: var(--color-primary); background: var(--color-primary-soft); color: var(--color-primary-dark); }
.auth-panel[hidden] { display: none !important; }
.qualib-captcha-field { margin: 12px 0; padding: 12px; background: #f8fafc; border: 1px solid var(--color-border); border-radius: 8px; }
.qualib-captcha-field__label { display: block; font-size: 12px; font-weight: 600; margin-bottom: 6px; color: var(--color-neutral); }
.qualib-captcha-field__row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.qualib-captcha-field__q { font-size: 13px; color: var(--color-muted); }
.qualib-captcha-field__input { width: 88px; padding: 8px 10px; border: 1px solid var(--color-border); border-radius: 6px; }
.wizard-captcha-form { margin: 12px 0 16px; }
@media (max-width: 520px) { .form-grid--auth { grid-template-columns: 1fr; } }
.onboarding-video-embed { position: relative; padding-bottom: 56.25%; height: 0; margin: 12px 0; border-radius: 8px; overflow: hidden; }
.onboarding-video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.onboarding-video-upload { width: 100%; max-height: 360px; border-radius: 8px; margin: 12px 0; }
.onboarding-step-card.is-done { opacity: .85; border-left: 4px solid #22c55e; }
.hr-ann-preview { padding: 10px 0; border-bottom: 1px solid var(--color-border, #e2e8f0); }
.hr-ann-preview:last-child { border-bottom: 0; }
.row-warning td { background: #fffbeb; }
.row-danger td { background: #fef2f2; }
.plain-list { margin: 0; padding-left: 1.2rem; }
.plain-list li { margin: 6px 0; }
.sidebar-subsection {
    margin: 10px 0 2px;
    padding: 4px var(--sidebar-pad-x, 16px) 2px;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: rgba(255,255,255,.55);
    line-height: 1.35;
}
.sidebar-subsection:first-child { margin-top: 4px; }
.sidebar-nav-group[open] .sidebar-subsection { color: rgba(255,255,255,.7); }
.flow-step { padding: 8px 0; border-left: 3px solid var(--color-accent, #1e40af); padding-left: 12px; margin: 8px 0; }

.approval-flow { margin: 0; padding-left: 1.2rem; }
.approval-flow li.done { color: #15803d; font-weight: 600; }
.approval-flow li.rejected { color: #dc2626; }
.roster-board-layout { display: grid; grid-template-columns: 220px 1fr; gap: 16px; margin-top: 16px; }
.roster-canvas { position: relative; min-height: 320px; background: linear-gradient(180deg, #f1f5f9 0%, #e2e8f0 100%); border-radius: 12px; border: 1px dashed #94a3b8; }
.roster-slot { position: absolute; width: 160px; }
.roster-slot__label { font-size: .75rem; font-weight: 600; color: #475569; margin-bottom: 4px; }
.roster-slot__drop { min-height: 56px; background: #fff; border: 2px dashed #cbd5e1; border-radius: 10px; padding: 6px; transition: border-color .15s; }
.roster-slot__drop.is-over { border-color: var(--color-accent, #1e40af); background: #eff6ff; }
.roster-chip { padding: 8px 10px; margin: 6px 0; background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; cursor: grab; font-size: .85rem; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.roster-chip.is-placed { cursor: grab; background: #eff6ff; border-color: #93c5fd; }
.row-danger td { background: #fef2f2; }
@media (max-width: 900px) { .roster-board-layout { grid-template-columns: 1fr; } }

/* ─── MRO fluxo ─── */
.mro-flow-board { display: flex; flex-direction: column; gap: 10px; }
.mro-flow-step { border: 1px solid var(--color-border); border-radius: 10px; padding: 10px 12px; background: var(--color-bg); }
.mro-flow-step--done { border-color: #86efac; }
.mro-flow-step--in_progress { border-color: #93c5fd; }
.mro-flow-canvas { margin-top: 8px; background: #fff; border-radius: 8px; border: 1px dashed var(--color-border); }
