/*
 * ÁTOMO Manager — tema visual.
 *
 * Mesma estrutura de design do painel VIZRIDE (sidebar escura, topbar fixa,
 * cartões sem cantos, tabelas com cabeçalho em maiúsculas, badges "fundo
 * suave + texto na cor", filtros em pílula), com a cor da marca ÁTOMO:
 * o gradiente azul → roxo do logo.
 *
 * Carregado depois do Bootstrap e do fq-style.css: redefine as variáveis do
 * Bootstrap e os componentes que as páginas usam, para todas as vistas
 * mudarem sem as editar uma a uma.
 */

/* ── TOKENS ──────────────────────────────────────────────────────────────── */
:root {
    --atomo-blue: #4a7be6;
    --atomo-indigo: #6366f1;
    --atomo-violet: #8b55e8;
    --atomo-gradient: linear-gradient(135deg, #4a7be6 0%, #8b55e8 100%);
    --atomo-gradient-hover: linear-gradient(135deg, #3d6bd6 0%, #7a45d8 100%);
    --atomo-primary: #5b67e6;          /* meio do gradiente: cor sólida da marca */
    --atomo-primary-dark: #4a54d1;
    --atomo-soft: #eef0fe;             /* fundo suave da marca */
    --atomo-soft-2: #e4e7fd;

    --atomo-ink: #0f172a;
    --atomo-text: #334155;
    --atomo-muted: #64748b;
    --atomo-faint: #94a3b8;
    --atomo-line: #e2e8f0;
    --atomo-line-soft: #f1f5f9;
    --atomo-surface: #f4f5fb;          /* fundo da página, levemente azulado */
    --atomo-white: #ffffff;

    --atomo-sidebar: #0f1433;          /* azul-noite da marca */
    --atomo-sidebar-2: #151b45;

    --atomo-success: #16a34a;
    --atomo-warning: #d97706;
    --atomo-danger: #dc2626;
    --atomo-info: #2563eb;

    --atomo-font: 'Source Sans Pro', Helvetica, Arial, sans-serif;
    --sidebar-width: 236px;
    --topbar-height: 60px;

    /* Bootstrap 5.3 */
    --bs-primary: var(--atomo-primary);
    --bs-primary-rgb: 91, 103, 230;
    --bs-primary-text-emphasis: #3a42a8;
    --bs-primary-bg-subtle: var(--atomo-soft);
    --bs-primary-border-subtle: #c7ccf8;
    --bs-link-color: var(--atomo-primary);
    --bs-link-color-rgb: 91, 103, 230;
    --bs-link-hover-color: var(--atomo-violet);
    --bs-link-hover-color-rgb: 139, 85, 232;
    --bs-body-font-family: var(--atomo-font);
    --bs-body-color: var(--atomo-ink);
    --bs-body-bg: var(--atomo-surface);
    --bs-border-color: var(--atomo-line);
    --bs-border-radius: 0;
    --bs-border-radius-sm: 0;
    --bs-border-radius-lg: 0;
    --bs-focus-ring-color: rgba(91, 103, 230, .25);

    /* fq-style.css: o resto do CSS antigo passa a usar a marca. */
    --fq-primary: var(--atomo-primary);
    --fq-primary-dark: var(--atomo-primary-dark);
    --fq-secondary: var(--atomo-violet);
    --fq-text: var(--atomo-ink);
    --fq-text-light: var(--atomo-muted);
    --fq-border: var(--atomo-line);
    --fq-bg-light: #f8fafc;
    --fq-bg-secondary: var(--atomo-surface);

    /* Variáveis do layout antigo. */
    --primary: var(--atomo-primary);
    --primary-dark: var(--atomo-primary-dark);
    --sidebar-bg: var(--atomo-sidebar);
    --border: var(--atomo-line);
    --bg-surface: var(--atomo-surface);
}

/* ── BASE ────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: hidden; }
body {
    margin: 0;
    background: var(--atomo-surface);
    font-family: var(--atomo-font);
    font-size: 14px;
    color: var(--atomo-ink);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
a { color: var(--atomo-primary); text-decoration: none; }
a:hover { color: var(--atomo-violet); }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f8fafc; }
::-webkit-scrollbar-thumb { background: #a5acf2; }
::selection { background: #dde1fd; }

/* ── SIDEBAR ─────────────────────────────────────────────────────────────── */
#sidebar {
    width: var(--sidebar-width);
    background: var(--atomo-sidebar);
    background-image: radial-gradient(120% 40% at 0% 0%, rgba(91, 103, 230, .18), transparent 60%);
    position: fixed; top: 0; left: 0; bottom: 0;
    z-index: 1040; overflow-y: auto; overflow-x: hidden;
    display: flex; flex-direction: column;
}
#sidebar::-webkit-scrollbar { width: 4px; }
#sidebar::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .15); }

.sidebar-brand {
    height: var(--topbar-height);
    display: flex; align-items: center; gap: 10px;
    padding: 0 16px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    flex-shrink: 0;
    text-decoration: none;
}
.sidebar-brand .brand-mark { width: 32px; height: 32px; flex-shrink: 0; background: #fff; padding: 2px; object-fit: contain; }
.sidebar-brand .brand-name { color: #fff; font-weight: 700; font-size: 17px; letter-spacing: .01em; line-height: 1; }
.sidebar-brand .brand-sub { display: block; color: rgba(255, 255, 255, .45); font-size: 10px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; margin-top: 3px; }

.sidebar-section {
    padding: 16px 18px 6px;
    font-size: 9px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
    color: rgba(255, 255, 255, .32);
}

.sidebar-nav { list-style: none; padding: 6px 0; margin: 0; }
.sidebar-nav .nav-item { margin: 1px 0; }
.sidebar-nav .nav-link {
    position: relative;
    display: flex; align-items: center; gap: 12px;
    padding: 10px 18px;
    border-radius: 0;
    color: #a7aecb;
    font-family: var(--atomo-font); font-size: 13px; font-weight: 600; letter-spacing: .01em;
    text-decoration: none; transition: background .15s, color .15s;
}
.sidebar-nav .nav-link .bi { font-size: 15px; width: 18px; text-align: center; flex-shrink: 0; }
.sidebar-nav .nav-link:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.sidebar-nav .nav-link.active { background: rgba(255, 255, 255, .09); color: #fff; }
/* Barra da marca no item activo. */
.sidebar-nav .nav-link.active::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
    background: var(--atomo-gradient);
}
.sidebar-nav .nav-link .badge,
.sidebar-nav .nav-link .badge-count {
    margin-left: auto !important;
    background: var(--atomo-gradient) !important;
    color: #fff; font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 99px;
}

/* Submenu */
.sidebar-nav .has-sub > .nav-link::after {
    content: '\f285'; font-family: 'bootstrap-icons';
    margin-left: auto; font-size: 10px; opacity: .6; transition: transform .2s;
}
.sidebar-nav .has-sub > .nav-link .badge ~ ::after,
.sidebar-nav .has-sub > .nav-link .badge { margin-right: 6px; }
.sidebar-nav .has-sub.open > .nav-link::after { transform: rotate(90deg); }
.sidebar-nav .has-sub.open > .nav-link { color: #fff; }
.sidebar-nav .sub-menu {
    list-style: none; margin: 0 0 4px; padding: 2px 0 4px 0;
    display: none; background: rgba(0, 0, 0, .16);
}
.sidebar-nav .has-sub.open > .sub-menu { display: block; }
.sidebar-nav .sub-menu .nav-link {
    padding: 8px 18px 8px 48px;
    font-size: 12.5px; font-weight: 500; color: #8f96b8;
}
.sidebar-nav .sub-menu .nav-link::before { display: none; }
.sidebar-nav .sub-menu .nav-link.active { color: #fff; background: rgba(255, 255, 255, .06); }
.sidebar-nav .sub-menu .nav-link.active::after {
    content: ''; position: absolute; left: 32px; top: 50%; width: 6px; height: 6px; margin-top: -3px;
    border-radius: 50%; background: var(--atomo-gradient);
}

.sidebar-bottom { margin-top: auto; padding: 8px 0; border-top: 1px solid rgba(255, 255, 255, .08); }
.sidebar-bottom .nav-link { color: #f39b9b !important; }
.sidebar-bottom .nav-link:hover { background: rgba(220, 38, 38, .14) !important; color: #fff !important; }

/* ── TOPBAR ──────────────────────────────────────────────────────────────── */
#topbar {
    height: var(--topbar-height);
    background: #fff;
    border-bottom: 1px solid var(--atomo-line);
    position: fixed; top: 0; left: var(--sidebar-width); right: 0; z-index: 1030;
    display: flex; align-items: center; gap: 12px; padding: 0 24px;
}
#topbar::after {
    /* Fio da marca por baixo da topbar. */
    content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
    background: var(--atomo-gradient); opacity: .9;
}
#topbar .topbar-title { flex: 1; min-width: 0; font-family: var(--atomo-font); font-weight: 700; font-size: 15px; color: var(--atomo-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#topbar .topbar-title small { font-weight: 400; color: var(--atomo-faint); font-size: 12px; margin-left: 8px; }
#topbar .btn-icon {
    width: 34px; height: 34px; border-radius: 0;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--atomo-line); background: #f8fafc; color: var(--atomo-muted);
    cursor: pointer; transition: all .15s;
}
#topbar .btn-icon:hover { background: var(--atomo-soft); color: var(--atomo-primary); border-color: #c7ccf8; }
.user-chip {
    display: flex; align-items: center; gap: 8px; cursor: pointer;
    padding: 4px 10px 4px 4px; border: 1px solid var(--atomo-line); background: #f8fafc;
}
.user-chip:hover { border-color: #c7ccf8; background: var(--atomo-soft); }
.user-chip .user-name { font-size: 12px; font-weight: 600; color: var(--atomo-text); max-width: 160px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-avatar {
    width: 28px; height: 28px; border-radius: 0;
    background: var(--atomo-gradient); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 12px;
}
.user-chip.dropdown-toggle::after { color: var(--atomo-faint); margin-left: 2px; }

/* ── MAIN ────────────────────────────────────────────────────────────────── */
#main { margin-left: var(--sidebar-width); padding-top: var(--topbar-height); min-height: 100vh; display: flex; flex-direction: column; }
.page-content { padding: 24px; flex: 1; }
footer { font-size: 12px; color: var(--atomo-faint); padding: 14px 24px; border-top: 1px solid var(--atomo-line); background: #fff; margin-top: auto; }

/* ── PAGE HEADER ─────────────────────────────────────────────────────────── */
.page-title, .page-header-title, .fq-topbar-title { font-family: var(--atomo-font); font-weight: 700; font-size: 20px; color: var(--atomo-ink); margin-bottom: 2px; }
.page-header-subtitle, .fq-topbar-sub { color: var(--atomo-muted); font-size: 12.5px; }
.page-header { margin-bottom: 20px; }
.breadcrumb { font-size: 12px; margin-bottom: 0; }
.breadcrumb-item, .breadcrumb-item a { color: var(--atomo-muted); }
.breadcrumb-item.active { color: var(--atomo-faint); }
.breadcrumb-item + .breadcrumb-item::before { color: #cbd5e1; }

/* ── CARDS ───────────────────────────────────────────────────────────────── */
.card, .fq-card {
    background: #fff;
    border: 1px solid var(--atomo-line) !important;
    border-radius: 0 !important;
    box-shadow: none;
}
.card-header, .fq-card-header {
    background: #fff !important;
    border-bottom: 1px solid var(--atomo-line-soft) !important;
    padding: 14px 18px;
    font-family: var(--atomo-font); font-weight: 700; color: var(--atomo-ink);
}
.card-header h1, .card-header h2, .card-header h3, .card-header h4, .card-header h5, .card-header h6,
.card-title, .fq-card-title {
    font-family: var(--atomo-font); font-weight: 700; font-size: 14px; color: var(--atomo-ink); margin: 0;
}
.card-body, .fq-card-body { padding: 18px; }
.card-footer { background: #f8fafc; border-top: 1px solid var(--atomo-line); }

/* KPI / stat cards (fq-style + layout antigo) */
.kpi-grid { gap: 16px; }
.kpi-card, .stat-card {
    position: relative; overflow: hidden;
    background: #fff; border: 1px solid var(--atomo-line); border-radius: 0; padding: 18px 20px;
}
.kpi-card::before, .stat-card::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--atomo-gradient);
}
.kpi-icon { background: var(--atomo-soft) !important; color: var(--atomo-primary) !important; border-radius: 0 !important; }
.kpi-label, .stat-card .stat-label, .stat-card p {
    font-family: var(--atomo-font); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--atomo-muted); opacity: 1;
}
.kpi-value, .stat-card .stat-value, .stat-card h4 { font-family: var(--atomo-font); font-weight: 700; font-size: 24px; color: var(--atomo-ink); }
.stat-card .stat-icon { color: var(--atomo-primary); opacity: .18; }

/* Cores inline herdadas (ícones roxos em caixa lilás). */
[style*="background:#ede9fe"], [style*="background: #ede9fe"] { background: var(--atomo-soft) !important; border-radius: 0 !important; }
[style*="color:#4f46e5"], [style*="color: #4f46e5"] { color: var(--atomo-primary) !important; }
.rounded, .rounded-3, .rounded-4, .rounded-pill:not(.badge) { border-radius: 0 !important; }

/* Painéis "bg-xxx bg-opacity-10" (resumo do dashboard). */
.bg-opacity-10 { border: 1px solid transparent; }
.bg-primary.bg-opacity-10 { background: var(--atomo-soft) !important; border-color: #dde1fd; }
.text-primary { color: var(--atomo-primary) !important; }
.bg-primary:not(.bg-opacity-10):not(.badge) { background: var(--atomo-gradient) !important; }
.border-primary { border-color: var(--atomo-primary) !important; }

/* ── TABLES ──────────────────────────────────────────────────────────────── */
.table, .admin-table { --bs-table-hover-bg: #f7f8fe; margin-bottom: 0; font-size: 13px; }
.table > :not(caption) > * > * { padding: 11px 12px; border-bottom-color: var(--atomo-line-soft); }
.table thead th, .table > thead > tr > th, .admin-table th, .table-light th {
    background: #f8fafc !important;
    font-family: var(--atomo-font); font-weight: 700; font-size: 10px;
    text-transform: uppercase; letter-spacing: .07em; color: var(--atomo-muted);
    border-bottom: 2px solid var(--atomo-line) !important; white-space: nowrap;
}
.table td, .admin-table td { vertical-align: middle; color: var(--atomo-text); }
.table-hover > tbody > tr:hover > *, .admin-table tbody tr:hover td { background: #f7f8fe; }
.table-responsive { border: 1px solid var(--atomo-line); background: #fff; }
.card .table-responsive, .fq-card .table-responsive { border: none; }

/* ── BUTTONS ─────────────────────────────────────────────────────────────── */
.btn { border-radius: 0; font-family: var(--atomo-font); font-weight: 600; font-size: 13px; transition: all .15s; }
.btn-sm, .btn-fq-sm { font-size: 11.5px; padding: 5px 11px; }
.btn-primary, .btn-fq-primary, .btn-black-capsule, .btn-primary-volt {
    background: var(--atomo-gradient) !important;
    border: none !important;
    color: #fff !important;
    letter-spacing: .04em;
    box-shadow: 0 1px 2px rgba(74, 84, 209, .25);
}
.btn-primary:hover, .btn-fq-primary:hover, .btn-black-capsule:hover, .btn-primary-volt:hover,
.btn-primary:focus, .btn-primary:active {
    background: var(--atomo-gradient-hover) !important; color: #fff !important;
    box-shadow: 0 4px 12px rgba(91, 103, 230, .32);
}
.btn-outline-primary, .btn-fq-outline {
    background: #fff; color: var(--atomo-primary) !important;
    border: 1.5px solid #c7ccf8 !important;
}
.btn-outline-primary:hover, .btn-fq-outline:hover { background: var(--atomo-soft) !important; border-color: var(--atomo-primary) !important; color: var(--atomo-primary-dark) !important; }
.btn-secondary, .btn-outline-secondary, .btn-light {
    background: #f1f5f9 !important; border: 1px solid var(--atomo-line) !important; color: var(--atomo-text) !important;
}
.btn-secondary:hover, .btn-outline-secondary:hover, .btn-light:hover { background: var(--atomo-ink) !important; border-color: var(--atomo-ink) !important; color: #fff !important; }
.btn-danger, .btn-fq-red, .btn-fq-danger { background: var(--atomo-danger) !important; border-color: var(--atomo-danger) !important; color: #fff !important; }
.btn-danger:hover, .btn-fq-red:hover, .btn-fq-danger:hover { background: #b91c1c !important; border-color: #b91c1c !important; }
.btn-success { background: var(--atomo-success) !important; border-color: var(--atomo-success) !important; }
.btn-info { background: var(--atomo-soft) !important; border-color: #c7ccf8 !important; color: var(--atomo-primary-dark) !important; }
.btn-info:hover { background: var(--atomo-primary) !important; color: #fff !important; }
.btn-warning { color: #fff !important; }
.btn-link { color: var(--atomo-primary); }
.link-fq { color: var(--atomo-primary); }

/* ── FORMS ───────────────────────────────────────────────────────────────── */
.form-label, .fq-label {
    font-family: var(--atomo-font); font-weight: 700; font-size: 10px;
    text-transform: uppercase; letter-spacing: .06em; color: var(--atomo-muted); margin-bottom: 6px;
}
.form-control, .form-select, .fq-input {
    border: 1.5px solid #d5dae3; border-radius: 0;
    font-family: var(--atomo-font); font-size: 13px; color: var(--atomo-ink); background-color: #fff;
    padding: 9px 12px;
}
.form-control-sm, .form-select-sm { padding: 5px 10px; font-size: 12px; }
.form-control:focus, .form-select:focus, .fq-input:focus {
    border-color: var(--atomo-primary); box-shadow: 0 0 0 3px rgba(91, 103, 230, .14); outline: none;
}
.form-control::placeholder { color: #a3acbd; }
.form-check-input:checked { background-color: var(--atomo-primary); border-color: var(--atomo-primary); }
.form-check-input:focus { box-shadow: 0 0 0 3px rgba(91, 103, 230, .18); border-color: var(--atomo-primary); }
.form-switch .form-check-input:checked { background-color: var(--atomo-violet); border-color: var(--atomo-violet); }
.input-group-text { border-radius: 0; background: #f8fafc; border: 1.5px solid #d5dae3; color: var(--atomo-muted); }

/* ── BADGES ──────────────────────────────────────────────────────────────── */
.badge, .fq-badge, .status-badge, .badge-bool {
    font-family: var(--atomo-font); font-weight: 700; font-size: 10px;
    text-transform: uppercase; letter-spacing: .05em;
    padding: 4px 9px; border-radius: 0;
}
.badge.bg-primary, .badge-primary, .badge-soft-primary, .badge-soft-info, .badge.bg-info { background: var(--atomo-soft) !important; color: var(--atomo-primary-dark) !important; }
.badge.bg-success, .badge-success, .badge-soft-success, .status-approved, .status-completed { background: #dcfce7 !important; color: #15803d !important; }
.badge.bg-warning, .badge-warning, .badge-soft-warning, .status-pending, .status-processing { background: #fef3c7 !important; color: #b45309 !important; }
.badge.bg-danger, .badge-danger, .badge-soft-danger, .status-rejected { background: #fee2e2 !important; color: #b91c1c !important; }
.badge.bg-secondary, .badge-secondary, .badge-soft-secondary, .badge.bg-light { background: #f1f5f9 !important; color: var(--atomo-muted) !important; }
.badge.rounded-pill { border-radius: 99px; }
/* No menu, os contadores ficam na cor da marca (ver .sidebar-nav). */

/* ── ALERTS ──────────────────────────────────────────────────────────────── */
.alert { border-radius: 0; font-size: 13px; border-width: 1px; }
.alert-primary, .alert-info { background: var(--atomo-soft); border-color: #dde1fd; color: #3a42a8; }
.alert-success, .alert-fq-success { background: #f0fdf4; border-color: #bbf7d0; color: #15803d; }
.alert-danger, .alert-error, .alert-fq { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }
.alert-warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }

/* ── NAV TABS / PILLS / FILTERS ──────────────────────────────────────────── */
.nav-tabs { border-bottom: 1px solid var(--atomo-line); }
.nav-tabs .nav-link { border: none; border-bottom: 3px solid transparent; border-radius: 0; color: var(--atomo-muted); font-weight: 600; font-size: 12.5px; padding: 10px 16px; }
.nav-tabs .nav-link:hover { color: var(--atomo-primary); }
.nav-tabs .nav-link.active { color: var(--atomo-ink); background: none; border-image: var(--atomo-gradient) 0 0 1 0; border-bottom: 3px solid; }
.nav-pills .nav-link { border-radius: 0; color: var(--atomo-muted); font-weight: 600; }
.nav-pills .nav-link.active { background: var(--atomo-gradient); color: #fff; }
.tab-btn { font-family: var(--atomo-font); }
.tab-btn:hover { color: var(--atomo-primary); }
.tab-active { color: var(--atomo-ink); border-bottom-color: var(--atomo-violet) !important; }
.tab-pill { background: #f1f5f9; border: 1.5px solid var(--atomo-line); color: var(--atomo-muted); }
.tab-pill:hover, .tab-pill.active, .tab-pill.tab-active { background: var(--atomo-ink); border-color: var(--atomo-ink); color: #fff; }

/* ── PAGINATION ──────────────────────────────────────────────────────────── */
.pagination { gap: 4px; margin-top: 16px; flex-wrap: wrap; }
.page-link { border-radius: 0 !important; border: 1px solid var(--atomo-line); color: var(--atomo-ink); font-weight: 600; font-size: 12px; padding: 6px 11px; }
.page-link:hover { background: var(--atomo-soft); color: var(--atomo-primary); border-color: #c7ccf8; }
.page-item.active .page-link { background: var(--atomo-gradient); border-color: transparent; color: #fff; }
.page-item.disabled .page-link { color: var(--atomo-faint); }

/* ── MODALS / DROPDOWNS ──────────────────────────────────────────────────── */
.modal-content, .fq-modal { border: 1px solid var(--atomo-line); border-radius: 0; box-shadow: 0 24px 60px rgba(15, 20, 51, .25); }
.modal-header, .fq-modal-header { border-bottom: 1px solid var(--atomo-line); padding: 14px 20px; }
.modal-header.bg-primary, .modal-header.bg-dark, .modal-header.text-white { background: var(--atomo-gradient) !important; color: #fff; }
.modal-title, .fq-modal-title { font-family: var(--atomo-font); font-weight: 700; font-size: 15px; }
.modal-footer, .fq-modal-footer { background: #f8fafc; border-top: 1px solid var(--atomo-line); }
.modal-backdrop.show { opacity: .55; background: #0f1433; }
.fq-modal-overlay { background: rgba(15, 20, 51, .55); }
.dropdown-menu { border-radius: 0; border: 1px solid var(--atomo-line) !important; box-shadow: 0 10px 30px rgba(15, 20, 51, .12) !important; font-size: 13px; }
.dropdown-item:active, .dropdown-item.active { background: var(--atomo-soft); color: var(--atomo-primary-dark); }

/* ── ESTRUTURA HERDADA DO LAYOUT ANTIGO ──────────────────────────────────── */
.stat-card .stat-icon { font-size: 2rem; position: absolute; right: 1rem; bottom: .75rem; }
.fq-input { width: 100%; transition: border-color .2s; }
.fq-label { display: inline-block; }
.alert-fq, .alert-fq-success { padding: 10px 14px; font-size: 12px; border: 1px solid; }
.tab-btn {
    background: none; border: none; border-bottom: 3px solid transparent;
    padding: 12px 20px; font-weight: 600; font-size: 12px; letter-spacing: .05em;
    color: var(--atomo-muted); text-transform: uppercase; transition: all .2s;
}
.tab-pill { border-radius: 0; padding: 8px 14px; font-family: var(--atomo-font); font-weight: 600; font-size: 11px; transition: all .2s; }
.link-fq { font-weight: 600; cursor: pointer; }
.link-fq:hover { text-decoration: underline; }
.avatar-sm {
    width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: .8rem; flex-shrink: 0;
}

/* ── LOGIN ───────────────────────────────────────────────────────────────── */
.auth-page {
    min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr;
    background: #fff;
}
.auth-aside {
    position: relative; overflow: hidden; color: #fff;
    background: var(--atomo-sidebar);
    background-image: radial-gradient(80% 60% at 0% 0%, rgba(74, 123, 230, .45), transparent 60%),
                      radial-gradient(70% 60% at 100% 100%, rgba(139, 85, 232, .45), transparent 60%);
    padding: 48px; display: flex; flex-direction: column; justify-content: space-between;
}
.auth-aside .brand { display: flex; align-items: center; gap: 12px; }
.auth-aside .brand .brand-tile { width: 40px; height: 40px; background: #fff; padding: 3px; object-fit: contain; }
.auth-aside .brand b { font-size: 20px; letter-spacing: .02em; }
.auth-aside h1 { font-family: var(--atomo-font); font-weight: 700; font-size: 34px; line-height: 1.15; max-width: 420px; }
.auth-aside p { color: rgba(255, 255, 255, .7); max-width: 400px; font-size: 15px; }
.auth-aside .bar { width: 56px; height: 4px; background: var(--atomo-gradient); margin-bottom: 18px; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 32px 16px; background: var(--atomo-surface); }
.auth-card { width: 100%; max-width: 420px; background: #fff; border: 1px solid var(--atomo-line); position: relative; }
.auth-card::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--atomo-gradient); }
.auth-card .auth-head { padding: 28px 28px 8px; }
.auth-card .auth-head h5 { font-family: var(--atomo-font); font-weight: 700; font-size: 20px; color: var(--atomo-ink); margin-bottom: 4px; }
.auth-card .auth-head p { color: var(--atomo-muted); font-size: 13px; margin: 0; }
.auth-card .auth-body { padding: 20px 28px 28px; }
.auth-mobile-logo { display: none; }
@media (max-width: 991px) {
    .auth-page { grid-template-columns: 1fr; }
    .auth-aside { display: none; }
    .auth-mobile-logo { display: block; text-align: center; margin-bottom: 20px; }
    .auth-mobile-logo img { height: 48px; }
}

/* ── MISC ────────────────────────────────────────────────────────────────── */
.empty-state { color: var(--atomo-faint); }
.avatar-sm { border-radius: 0; }
.progress { border-radius: 0; background: var(--atomo-line-soft); }
.progress-bar { background: var(--atomo-gradient); }
.list-group-item { border-color: var(--atomo-line); }
.list-group-item.active { background: var(--atomo-gradient); border-color: transparent; }
.text-bg-primary { background: var(--atomo-gradient) !important; }

/* ── MOBILE ──────────────────────────────────────────────────────────────── */
@media (max-width: 991px) {
    #sidebar { transform: translateX(-100%); transition: transform .25s; }
    #sidebar.show { transform: translateX(0); box-shadow: 0 0 40px rgba(0, 0, 0, .4); }
    #topbar { left: 0; padding: 0 16px; }
    #main { margin-left: 0; }
    .page-content { padding: 16px; }
    .sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(15, 20, 51, .5); z-index: 1039; }
    .sidebar-overlay.show { display: block; }
    .user-chip .user-name { display: none; }
}
