/* =========================================================================
   INTRANET HC — Protótipo visual
   Design system (shell, componentes, telas). Sem lógica de negócio.
   ========================================================================= */

:root {
    --brand-900: #0b1f3a;
    --brand-800: #10294b;
    --brand-700: #163a68;
    --brand-600: #1d4ed8;
    --brand-500: #2563eb;
    --brand-100: #dbeafe;
    --brand-050: #eff6ff;

    --ink-900: #0f172a;
    --ink-700: #334155;
    --ink-500: #64748b;
    --ink-400: #94a3b8;
    --line: #e2e8f0;
    --line-soft: #eef2f7;
    --bg: #f4f6fb;
    --surface: #ffffff;
    --surface-2: #f8fafc;

    --ok: #16a34a;
    --ok-bg: #dcfce7;
    --warn: #ca8a04;
    --warn-bg: #fef9c3;
    --info: #2563eb;
    --info-bg: #dbeafe;
    --exp: #ea580c;
    --exp-bg: #ffedd5;
    --danger: #dc2626;
    --danger-bg: #fee2e2;
    --muted: #475569;
    --muted-bg: #e2e8f0;

    --radius: 14px;
    --radius-sm: 10px;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .1);
    --shadow-md: 0 4px 12px rgba(15, 23, 42, .08);
    --shadow-lg: 0 12px 32px rgba(15, 23, 42, .14);
    --sidebar-w: 264px;
    --topbar-h: 64px;
    --font: "Segoe UI", Roboto, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 14px;
    color: var(--ink-900);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--brand-600); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; color: var(--ink-900); }
p { margin: 0; }
kbd {
    font-family: var(--font);
    font-size: 11px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-bottom-width: 2px;
    border-radius: 6px;
    padding: 1px 6px;
    color: var(--ink-500);
}

/* ---------------------------------------------------------------- Shell -- */
.app-shell { display: flex; min-height: 100vh; }
.app-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    margin-left: var(--sidebar-w);
    transition: margin-left .2s ease;
}
.app-shell.sidebar-collapsed .app-main { margin-left: 76px; }

/* -------------------------------------------------------------- Sidebar -- */
.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-w);
    background: linear-gradient(180deg, var(--brand-900), var(--brand-800));
    color: #c7d2e5;
    display: flex;
    flex-direction: column;
    z-index: 60;
    transition: width .2s ease, transform .2s ease;
}
.app-shell.sidebar-collapsed .sidebar { width: 76px; }

.sidebar__brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 16px 16px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.brand { display: flex; align-items: center; gap: 10px; color: #fff; }
.brand:hover { text-decoration: none; }
.brand__mark {
    width: 38px; height: 38px;
    display: grid; place-items: center;
    background: #fff;
    color: var(--brand-900);
    font-weight: 800;
    border-radius: 10px;
    letter-spacing: .5px;
    flex-shrink: 0;
}
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__text strong { color: #fff; font-size: 15px; letter-spacing: .8px; }
.brand__text small { color: #93a7c4; font-size: 11px; }
.sidebar__collapse {
    background: transparent; border: 0; color: #93a7c4; cursor: pointer;
    padding: 4px; border-radius: 8px; flex-shrink: 0;
}
.sidebar__collapse i { transition: transform .2s ease; }
.sidebar__collapse:hover { background: rgba(255, 255, 255, .08); color: #fff; }

.sidebar__nav { flex: 1; overflow-y: auto; padding: 12px 10px 20px; }
.sidebar__nav::-webkit-scrollbar { width: 6px; }
.sidebar__nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .15); border-radius: 3px; }

.sidebar__section {
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #6f84a3;
    margin: 18px 12px 6px;
}

.nav-item, .nav-subitem {
    display: flex;
    align-items: center;
    gap: 11px;
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    color: #c7d2e5;
    font-size: 13.5px;
    font-weight: 500;
    background: transparent;
    border: 0;
    cursor: pointer;
    text-align: left;
    transition: background .15s ease, color .15s ease;
}
.nav-item:hover, .nav-subitem:hover { background: rgba(255, 255, 255, .08); color: #fff; text-decoration: none; }
.nav-item i, .nav-subitem i { font-size: 16px; flex-shrink: 0; }
.nav-item.active, .nav-subitem.active {
    background: var(--brand-500);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
}
.nav-item--disabled { color: #7f93b2; cursor: default; }
.nav-item--disabled:hover { background: rgba(255, 255, 255, .04); color: #97a9c6; }
.tag-soon {
    margin-left: auto;
    font-size: 9.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    background: rgba(255, 255, 255, .12);
    color: #cbd5e1;
    padding: 2px 6px;
    border-radius: 999px;
}

.nav-item--toggle .nav-item__caret { margin-left: auto; transition: transform .2s ease; font-size: 13px; }
.nav-group.open .nav-item--toggle .nav-item__caret { transform: rotate(180deg); }
.nav-sub {
    display: none;
    margin: 2px 0 4px;
    padding-left: 8px;
    border-left: 1px solid rgba(255, 255, 255, .1);
    margin-left: 18px;
}
.nav-group.open .nav-sub { display: block; }
.nav-subitem { font-size: 12.7px; padding: 8px 10px; color: #aab9d2; }
.nav-subitem i { font-size: 14px; }

.sidebar__foot {
    padding: 12px 18px;
    border-top: 1px solid rgba(255, 255, 255, .08);
    font-size: 11px;
    color: #7f93b2;
    display: flex;
    align-items: center;
    gap: 8px;
}

.app-shell.sidebar-collapsed .brand__text,
.app-shell.sidebar-collapsed .sidebar__section,
.app-shell.sidebar-collapsed .nav-item span,
.app-shell.sidebar-collapsed .nav-subitem span,
.app-shell.sidebar-collapsed .nav-item__caret,
.app-shell.sidebar-collapsed .tag-soon,
.app-shell.sidebar-collapsed .sidebar__foot span { display: none; }
.app-shell.sidebar-collapsed .sidebar__brand {
    flex-direction: column;
    justify-content: center;
    padding: 14px 8px;
    gap: 10px;
}
.app-shell.sidebar-collapsed .sidebar__collapse i { transform: rotate(180deg); }
.app-shell.sidebar-collapsed .nav-sub { display: none !important; }
.app-shell.sidebar-collapsed .nav-item,
.app-shell.sidebar-collapsed .nav-subitem { justify-content: center; padding: 11px; }

/* --------------------------------------------------------------- Topbar -- */
.topbar {
    position: sticky;
    top: 0;
    height: var(--topbar-h);
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 22px;
    z-index: 50;
}
.topbar__menu {
    display: none;
    background: transparent; border: 0; font-size: 22px; color: var(--ink-700); cursor: pointer;
}
.topbar__search {
    flex: 1;
    max-width: 460px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 8px 14px;
    color: var(--ink-400);
}
.topbar__search input {
    flex: 1;
    border: 0;
    background: transparent;
    outline: none;
    font-size: 13px;
    color: var(--ink-900);
}
.topbar__actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.icon-btn {
    position: relative;
    width: 40px; height: 40px;
    display: grid; place-items: center;
    border-radius: 10px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--ink-700);
    font-size: 18px;
    cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); border-color: var(--line); }
.icon-btn__badge {
    position: absolute;
    top: 4px; right: 4px;
    min-width: 16px; height: 16px;
    padding: 0 4px;
    background: var(--danger);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 999px;
    display: grid; place-items: center;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 10px 5px 6px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface);
    cursor: pointer;
}
.user-chip:hover { background: var(--surface-2); }
.user-chip__info { display: flex; flex-direction: column; line-height: 1.2; text-align: left; }
.user-chip__info strong { font-size: 12.5px; color: var(--ink-900); }
.user-chip__info small { font-size: 11px; color: var(--ink-500); }
.user-chip i { color: var(--ink-400); font-size: 13px; }

/* ------------------------------------------------------------ Dropdown -- */
.dropdown { position: relative; }
.dropdown__menu {
    position: absolute;
    top: calc(100% + 8px);
    min-width: 240px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    padding: 6px;
    display: none;
    z-index: 80;
}
.dropdown__menu--right { right: 0; }
.dropdown.open .dropdown__menu { display: block; }
.dropdown__header {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid var(--line-soft);
    margin-bottom: 4px;
}
.dropdown__header strong { display: block; font-size: 13px; }
.dropdown__header small { color: var(--ink-500); font-size: 11.5px; }
.dropdown__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 8px;
    color: var(--ink-700);
    font-size: 13px;
}
.dropdown__item:hover { background: var(--surface-2); text-decoration: none; }
.dropdown__item--danger { color: var(--danger); }
.dropdown__divider { height: 1px; background: var(--line-soft); margin: 4px 0; }

.notif { width: 340px; padding: 0; }
.notif__head {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 14px; border-bottom: 1px solid var(--line-soft);
}
.notif__head a { font-size: 11.5px; }
.notif__list { list-style: none; margin: 0; padding: 4px; max-height: 320px; overflow-y: auto; }
.notif__list li { display: flex; gap: 10px; padding: 10px; border-radius: 8px; }
.notif__list li:hover { background: var(--surface-2); }
.notif__icon {
    width: 34px; height: 34px; flex-shrink: 0;
    display: grid; place-items: center;
    background: var(--brand-050); color: var(--brand-600);
    border-radius: 9px; font-size: 15px;
}
.notif__body { display: flex; flex-direction: column; gap: 1px; }
.notif__body strong { font-size: 12.5px; }
.notif__body span { font-size: 12px; color: var(--ink-500); }
.notif__body small { font-size: 10.5px; color: var(--ink-400); margin-top: 2px; }
.notif__all { display: block; text-align: center; padding: 10px; font-size: 12px; border-top: 1px solid var(--line-soft); }

/* -------------------------------------------------------------- Content -- */
.content { flex: 1; padding: 24px 28px 40px; }
.content__inner { max-width: 1320px; }

.page-head { margin-bottom: 22px; }
.crumbs { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-400); margin-bottom: 8px; }
.crumbs a { color: var(--ink-500); }
.crumbs i { font-size: 10px; }
.page-head__row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-title { font-size: 22px; letter-spacing: -.2px; }
.page-subtitle { color: var(--ink-500); font-size: 13px; margin-top: 4px; }
.page-head__actions { display: flex; gap: 8px; flex-wrap: wrap; }

.app-foot {
    padding: 16px 28px;
    border-top: 1px solid var(--line);
    background: var(--surface);
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 11.5px;
    color: var(--ink-400);
}

/* --------------------------------------------------------------- Button -- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 15px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    line-height: 1;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.btn:hover { text-decoration: none; }
.btn i { font-size: 15px; }
.btn--primary { background: var(--brand-600); color: #fff; }
.btn--primary:hover { background: var(--brand-700); color: #fff; }
.btn--ghost { background: var(--surface); border-color: var(--line); color: var(--ink-700); }
.btn--ghost:hover { background: var(--surface-2); }
.btn--subtle { background: var(--brand-050); color: var(--brand-700); }
.btn--subtle:hover { background: var(--brand-100); }
.btn--danger { background: var(--danger-bg); color: var(--danger); }
.btn--sm { padding: 6px 10px; font-size: 12px; }

/* ---------------------------------------------------------------- Cards -- */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 22px;
}
.stat {
    display: flex;
    gap: 14px;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px 18px;
    box-shadow: var(--shadow-sm);
}
.stat--link { transition: transform .12s ease, box-shadow .12s ease; }
.stat--link:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); text-decoration: none; }
.stat__icon {
    width: 46px; height: 46px;
    display: grid; place-items: center;
    border-radius: 12px;
    font-size: 20px;
    flex-shrink: 0;
}
.stat__icon--primary { background: var(--brand-050); color: var(--brand-600); }
.stat__icon--ok { background: var(--ok-bg); color: var(--ok); }
.stat__icon--warn { background: var(--warn-bg); color: var(--warn); }
.stat__icon--info { background: var(--info-bg); color: var(--info); }
.stat__icon--exp { background: var(--exp-bg); color: var(--exp); }
.stat__icon--danger { background: var(--danger-bg); color: var(--danger); }
.stat__icon--muted { background: var(--muted-bg); color: var(--muted); }
.stat__body { display: flex; flex-direction: column; min-width: 0; }
.stat__value { font-size: 22px; font-weight: 800; color: var(--ink-900); line-height: 1.1; }
.stat__label { font-size: 12.5px; color: var(--ink-500); margin-top: 2px; }
.stat__hint { font-size: 11px; color: var(--ink-400); margin-top: 4px; }

.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}
.panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 15px 18px;
    border-bottom: 1px solid var(--line-soft);
}
.panel__title { font-size: 14.5px; }
.panel__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.panel__body { padding: 18px; }
.panel__body--flush { padding: 0; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-1-2 { display: grid; grid-template-columns: 1fr 2fr; gap: 20px; }
.grid-2-1 { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }
@media (max-width: 980px) {
    .grid-2, .grid-3, .grid-1-2, .grid-2-1 { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------- Status -- */
.status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
}
.status__dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.status--ativo { background: var(--ok-bg); color: #15803d; }
.status--pendente { background: var(--warn-bg); color: #a16207; }
.status--analise { background: var(--info-bg); color: #1d4ed8; }
.status--experiencia { background: var(--exp-bg); color: #c2410c; }
.status--inativo { background: var(--danger-bg); color: #b91c1c; }
.status--desligado { background: #e2e8f0; color: #334155; }
.status--neutro { background: var(--surface-2); color: var(--ink-500); border: 1px solid var(--line); }

.pill {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 7px;
    font-size: 11px;
    font-weight: 600;
    background: var(--surface-2);
    color: var(--ink-700);
    border: 1px solid var(--line);
}
.pill--primary { background: var(--brand-050); color: var(--brand-700); border-color: var(--brand-100); }
.pill--ok { background: var(--ok-bg); color: #15803d; border-color: transparent; }
.pill--warn { background: var(--warn-bg); color: #a16207; border-color: transparent; }
.pill--info { background: var(--info-bg); color: #1d4ed8; border-color: transparent; }
.pill--danger { background: var(--danger-bg); color: #b91c1c; border-color: transparent; }

/* -------------------------------------------------------------- Avatar -- */
.avatar {
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    font-weight: 700;
    flex-shrink: 0;
    line-height: 1;
}
.avatar--sm { width: 32px; height: 32px; font-size: 11px; }
.avatar--md { width: 40px; height: 40px; font-size: 13px; }
.avatar--lg { width: 68px; height: 68px; font-size: 22px; }

.person { display: flex; align-items: center; gap: 10px; }
.person__info { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.person__name { font-weight: 600; color: var(--ink-900); }
.person__sub { font-size: 11.5px; color: var(--ink-500); }

/* --------------------------------------------------------------- Table -- */
.table-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-bottom: 20px;
}
.table-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line-soft);
    flex-wrap: wrap;
}
.table-toolbar__filters { display: flex; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.input-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 9px;
    padding: 8px 12px;
    min-width: 240px;
    color: var(--ink-400);
}
.input-search input { border: 0; background: transparent; outline: none; font-size: 13px; flex: 1; color: var(--ink-900); }
.select {
    appearance: none;
    background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='3'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center;
    border: 1px solid var(--line);
    border-radius: 9px;
    padding: 8px 30px 8px 12px;
    font-size: 12.5px;
    color: var(--ink-700);
    cursor: pointer;
}
.table-scroll { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th, .data-table td { padding: 12px 16px; text-align: left; white-space: nowrap; }
.data-table thead th {
    background: var(--surface-2);
    color: var(--ink-500);
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: .4px;
    font-weight: 700;
    border-bottom: 1px solid var(--line);
}
.data-table th.is-sortable { cursor: pointer; user-select: none; }
.data-table th.is-sortable i { font-size: 11px; opacity: .5; margin-left: 4px; }
.data-table tbody td { border-bottom: 1px solid var(--line-soft); color: var(--ink-700); }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: var(--surface-2); }
.data-table tbody tr.is-clickable { cursor: pointer; }
.data-table .col-actions { text-align: right; }
.table-empty { padding: 40px; text-align: center; color: var(--ink-400); font-size: 13px; }

.link-action { color: var(--brand-600); font-weight: 600; font-size: 12.5px; display: inline-flex; align-items: center; gap: 5px; }
.row-actions { display: inline-flex; gap: 6px; }
.row-actions a {
    width: 30px; height: 30px;
    display: grid; place-items: center;
    border-radius: 8px;
    border: 1px solid var(--line);
    color: var(--ink-500);
    background: var(--surface);
}
.row-actions a:hover { background: var(--brand-050); color: var(--brand-600); border-color: var(--brand-100); text-decoration: none; }

/* ------------------------------------------------------------ Timeline -- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 4px; bottom: 4px; width: 2px; background: var(--line); }
.timeline__item { position: relative; padding: 0 0 20px 30px; }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__marker {
    position: absolute; left: 0; top: 2px;
    width: 16px; height: 16px; border-radius: 50%;
    background: #fff; border: 3px solid var(--brand-500);
}
.timeline__item--ok .timeline__marker { border-color: var(--ok); }
.timeline__item--warn .timeline__marker { border-color: var(--warn); }
.timeline__item--muted .timeline__marker { border-color: var(--ink-400); }
.timeline__head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.timeline__title { font-weight: 600; font-size: 13px; }
.timeline__meta { font-size: 11.5px; color: var(--ink-400); }
.timeline__text { font-size: 12.5px; color: var(--ink-500); margin-top: 3px; }

/* ---------------------------------------------------------------- Flow -- */
.flow { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; flex-wrap: wrap; }
.flow__step { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 150px; position: relative; }
.flow__step:not(:last-child)::after {
    content: ""; flex: 1; height: 2px; background: var(--line); min-width: 20px;
}
.flow__bullet {
    width: 28px; height: 28px; flex-shrink: 0;
    display: grid; place-items: center;
    border-radius: 50%;
    font-size: 12px; font-weight: 700;
    background: var(--surface-2); color: var(--ink-400);
    border: 2px solid var(--line);
}
.flow__label { font-size: 12px; font-weight: 600; color: var(--ink-500); white-space: nowrap; }
.flow__step--done .flow__bullet { background: var(--ok); border-color: var(--ok); color: #fff; }
.flow__step--done .flow__label { color: var(--ink-700); }
.flow__step--done::after { background: var(--ok); }
.flow__step--current .flow__bullet { background: var(--brand-600); border-color: var(--brand-600); color: #fff; box-shadow: 0 0 0 4px var(--brand-100); }
.flow__step--current .flow__label { color: var(--brand-700); }

/* --------------------------------------------------------------- Tabs -- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tabs__btn {
    padding: 10px 16px;
    border: 0;
    background: transparent;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-500);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
}
.tabs__btn:hover { color: var(--ink-900); }
.tabs__btn.active { color: var(--brand-700); border-bottom-color: var(--brand-600); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* --------------------------------------------------------- Definition -- */
.deflist { display: grid; grid-template-columns: 180px 1fr; gap: 10px 16px; font-size: 13px; }
.deflist dt { color: var(--ink-500); }
.deflist dd { margin: 0; color: var(--ink-900); font-weight: 500; }
@media (max-width: 620px) { .deflist { grid-template-columns: 1fr; gap: 2px 0; } .deflist dd { margin-bottom: 10px; } }

/* -------------------------------------------------------------- Kanban -- */
.kanban { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 8px; }
.kanban__col {
    flex: 0 0 260px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    max-height: 620px;
}
.kanban__head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 14px; border-bottom: 1px solid var(--line);
    font-size: 12.5px; font-weight: 700; color: var(--ink-700);
}
.kanban__count {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: 999px; padding: 1px 8px; font-size: 11px; color: var(--ink-500);
}
.kanban__body { padding: 10px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; }
.kanban__card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 12px;
    box-shadow: var(--shadow-sm);
}
.kanban__card h4 { font-size: 13px; margin-bottom: 4px; }
.kanban__card p { font-size: 11.5px; color: var(--ink-500); }
.kanban__meta { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.kanban__score { font-size: 11px; font-weight: 700; color: var(--brand-700); }

/* --------------------------------------------------------------- Orgchart -- */
.org { display: flex; flex-direction: column; align-items: center; gap: 0; overflow-x: auto; padding: 10px; }
.org__level { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; position: relative; }
.org__connector { width: 2px; height: 26px; background: var(--line); }
.org__card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-top: 3px solid var(--brand-500);
    border-radius: 12px;
    padding: 14px 16px;
    min-width: 190px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}
.org__card--diretoria { border-top-color: var(--brand-900); }
.org__card--gestor { border-top-color: var(--brand-600); }
.org__card--lider { border-top-color: var(--exp); }
.org__card--operador { border-top-color: var(--ok); }
.org__card .avatar { margin: 0 auto 8px; }
.org__name { font-weight: 700; font-size: 13px; }
.org__role { font-size: 11.5px; color: var(--ink-500); margin-top: 2px; }
.org__tag { margin-top: 6px; }
.org__group { display: flex; flex-direction: column; align-items: center; }
.org__children { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; }
.org__branch { position: relative; padding-top: 26px; }
.org__branch::before { content: ""; position: absolute; top: 0; left: 50%; width: 2px; height: 26px; background: var(--line); }

/* ------------------------------------------------------------ Calendar -- */
.cal { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); }
.cal__head, .cal__row { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal__head span { padding: 8px; font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--ink-400); text-align: center; background: var(--surface-2); }
.cal__cell { min-height: 92px; border-top: 1px solid var(--line-soft); border-left: 1px solid var(--line-soft); padding: 6px; font-size: 11px; }
.cal__cell:nth-child(7n+1) { border-left: 0; }
.cal__daynum { color: var(--ink-400); font-weight: 600; }
.cal__cell--out .cal__daynum { opacity: .4; }
.cal__event {
    display: block;
    margin-top: 4px;
    padding: 2px 6px;
    border-radius: 6px;
    background: var(--brand-050);
    color: var(--brand-700);
    font-weight: 600;
    font-size: 10.5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cal__event--exp { background: var(--exp-bg); color: #c2410c; }
.cal__event--ok { background: var(--ok-bg); color: #15803d; }

/* --------------------------------------------------------------- Misc -- */
.notice {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: var(--brand-050);
    border: 1px solid var(--brand-100);
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 12.5px;
    color: var(--brand-800);
    margin-bottom: 20px;
}
.notice i { font-size: 18px; margin-top: 1px; }

.pend-list { list-style: none; margin: 0; padding: 0; }
.pend-list li { border-bottom: 1px solid var(--line-soft); }
.pend-list li:last-child { border-bottom: 0; }
.pend-list a {
    display: flex; align-items: center; gap: 12px;
    padding: 13px 4px; color: var(--ink-700); font-size: 13px; font-weight: 500;
}
.pend-list a:hover { text-decoration: none; color: var(--brand-700); }
.pend-list .pend-ico {
    width: 34px; height: 34px; flex-shrink: 0;
    display: grid; place-items: center;
    border-radius: 9px; background: var(--warn-bg); color: var(--warn); font-size: 15px;
}
.pend-list i.bi-chevron-right { margin-left: auto; color: var(--ink-400); font-size: 12px; }

.shortcut-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.shortcut {
    display: flex; flex-direction: column; gap: 8px;
    padding: 16px; border: 1px solid var(--line); border-radius: 12px;
    background: var(--surface); color: var(--ink-700);
}
.shortcut:hover { border-color: var(--brand-300, var(--brand-100)); box-shadow: var(--shadow-md); text-decoration: none; transform: translateY(-2px); }
.shortcut i { font-size: 22px; color: var(--brand-600); }
.shortcut strong { font-size: 13px; }
.shortcut small { font-size: 11px; color: var(--ink-400); }
.shortcut { transition: transform .12s ease, box-shadow .12s ease; }

.bar-track { height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; border: 1px solid var(--line-soft); }
.bar-fill { height: 100%; background: var(--brand-500); border-radius: 999px; }

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--ink-400);
}
.empty-state i { font-size: 40px; color: var(--line); }
.empty-state h3 { margin: 14px 0 4px; color: var(--ink-700); }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.mini-card {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: 12px; padding: 16px; box-shadow: var(--shadow-sm);
}
.mini-card__head { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.mini-card__head strong { font-size: 13.5px; }
.mini-card__head small { font-size: 11.5px; color: var(--ink-500); display: block; }
.mini-card p { font-size: 12.5px; color: var(--ink-600, var(--ink-700)); }
.mini-card__foot { margin-top: 12px; display: flex; justify-content: space-between; align-items: center; font-size: 11.5px; color: var(--ink-400); }

.section-title { font-size: 13px; text-transform: uppercase; letter-spacing: .6px; color: var(--ink-400); margin: 26px 0 12px; font-weight: 700; }

/* --------------------------------------------------------------- Scrim -- */
.scrim {
    position: fixed; inset: 0;
    background: rgba(15, 23, 42, .45);
    z-index: 55;
    display: none;
}
.scrim.show { display: block; }

/* ---------------------------------------------------------- Responsive -- */
@media (max-width: 1024px) {
    .app-main { margin-left: 0; }
    .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
    .app-shell.nav-open .sidebar { transform: translateX(0); }
    .topbar__menu { display: block; }
    .topbar__search { max-width: none; }
}
@media (max-width: 720px) {
    .content { padding: 18px 16px 32px; }
    .topbar { padding: 0 14px; gap: 10px; }
    .topbar__search kbd { display: none; }
    .user-chip__info { display: none; }
    .page-title { font-size: 19px; }
    .stat-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
    .stat { padding: 14px; }
    .stat__value { font-size: 18px; }
}

/* ----------------------------------------------------------- Login page -- */
.login-wrap {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    background: var(--surface);
}
.login-aside {
    background: linear-gradient(155deg, var(--brand-900), var(--brand-700));
    color: #fff;
    padding: 56px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.login-aside h2 { font-size: 30px; line-height: 1.2; max-width: 420px; }
.login-aside p { color: #b6c6e2; margin-top: 14px; max-width: 420px; font-size: 14px; }
.login-aside .brand__mark { width: 46px; height: 46px; font-size: 16px; }
.login-features { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 12px; }
.login-features li { display: flex; gap: 10px; align-items: center; color: #d5e0f2; font-size: 13.5px; }
.login-features i { color: #7fd7a6; }
.login-main { display: grid; place-items: center; padding: 40px; }
.login-card { width: 100%; max-width: 380px; }
.login-card h1 { font-size: 22px; }
.login-card > p { color: var(--ink-500); margin: 6px 0 26px; font-size: 13px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 6px; color: var(--ink-700); }
.field input {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid var(--line);
    border-radius: 10px;
    font-size: 13.5px;
    font-family: var(--font);
    outline: none;
}
.field input:focus { border-color: var(--brand-500); box-shadow: 0 0 0 3px var(--brand-100); }
.login-card .btn { width: 100%; justify-content: center; padding: 12px; margin-top: 4px; }
.login-hint { margin-top: 18px; font-size: 11.5px; color: var(--ink-400); text-align: center; }
@media (max-width: 860px) {
    .login-wrap { grid-template-columns: 1fr; }
    .login-aside { display: none; }
}
