:root {
    --bg: #f7f8fb;
    --surface: #ffffff;
    --border: #e7eaf0;
    --border-strong: #dce1e8;
    --text: #25334a;
    --muted: #8b96a7;
    --heading: #1f2d3d;
    --navy: #193a64;
    --navy-soft: #eef3f9;
    --green: #1aa36f;
    --green-soft: #eaf8f2;
    --yellow: #d89b16;
    --yellow-soft: #fff7e6;
    --red: #df5360;
    --red-soft: #fff0f1;
    --purple: #7167d8;
    --purple-soft: #f0effd;
    --shadow: 0 1px 2px rgba(18, 29, 48, .04), 0 8px 24px rgba(18, 29, 48, .04);
    --radius: 12px;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    background: var(--bg);
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background: var(--bg);
    font-family: "Inter", Arial, sans-serif;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
}

button,
input,
select {
    font: inherit;
}

a {
    color: inherit;
}

svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.app-shell {
    min-height: 100vh;
}

/* SIDEBAR */
.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 10;
    display: flex;
    width: 248px;
    flex-direction: column;
    border-right: 1px solid var(--border);
    background: var(--surface);
}

.sidebar__brand {
    display: grid;
    min-height: 150px;
    place-items: center;
    padding: 24px;
    border-bottom: 1px solid var(--border);
}

.company-mark {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: #15181c;
    letter-spacing: .18em;
}

.company-mark__circle {
    display: block;
    width: 64px;
    height: 32px;
    border: 2px solid currentColor;
    border-bottom: 0;
    border-radius: 64px 64px 0 0;
}

.product-name {
    padding: 22px 28px 18px;
    color: #8d98a7;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .28em;
}

.sidebar__nav {
    display: grid;
    gap: 4px;
    padding: 0 12px;
}

.nav-item {
    position: relative;
    display: flex;
    min-height: 44px;
    align-items: center;
    gap: 13px;
    padding: 0 16px;
    color: #718096;
    border-radius: 8px;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .11em;
    transition: .2s ease;
}

.nav-item:hover {
    color: var(--navy);
    background: #f7f9fc;
}

.nav-item--active {
    color: #222a35;
    background: #f5f6f8;
}

.nav-item--active::before {
    position: absolute;
    top: 0;
    bottom: 0;
    left: -1px;
    width: 3px;
    border-radius: 3px;
    background: #111827;
    content: "";
}

.sidebar__footer {
    margin-top: auto;
    padding: 18px;
    border-top: 1px solid var(--border);
}

.user-card {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-card__avatar {
    display: grid;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    place-items: center;
    color: var(--navy);
    border-radius: 50%;
    background: var(--navy-soft);
    font-size: 12px;
    font-weight: 700;
}

.user-card strong,
.user-card span {
    display: block;
}

.user-card strong {
    color: var(--heading);
    font-size: 12px;
}

.user-card span {
    margin-top: 2px;
    color: var(--muted);
    font-size: 11px;
}

/* MAIN */
.main-content {
    width: calc(100% - 248px);
    min-height: 100vh;
    margin-left: 248px;
    padding: 42px 34px 54px;
}

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

.page-header h1 {
    margin: 0;
    color: var(--heading);
    font-size: 27px;
    line-height: 1.2;
    letter-spacing: -.025em;
}

.page-header p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.mobile-brand {
    display: none;
}

.header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.btn {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 0 16px;
    color: #212936;
    border: 1px solid var(--border-strong);
    border-radius: 7px;
    background: var(--surface);
    cursor: pointer;
    box-shadow: 0 2px 7px rgba(22, 35, 56, .05);
    transition: .18s ease;
}

.btn:hover {
    border-color: #cfd5de;
    transform: translateY(-1px);
}

.btn svg {
    width: 17px;
    height: 17px;
}

/* CARDS */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.stat-card {
    display: flex;
    min-height: 88px;
    align-items: center;
    gap: 14px;
    padding: 17px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.stat-card__icon {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    place-items: center;
    border-radius: 10px;
}

.stat-card__icon svg {
    width: 22px;
    height: 22px;
}

.stat-card__icon--blue {
    color: #4c6f9e;
    background: var(--navy-soft);
}

.stat-card__icon--green {
    color: var(--green);
    background: var(--green-soft);
}

.stat-card__icon--yellow {
    color: var(--yellow);
    background: var(--yellow-soft);
}

.stat-card__icon--gray {
    color: #6f7d91;
    background: #f1f3f6;
}

.stat-card strong,
.stat-card span {
    display: block;
}

.stat-card strong {
    color: var(--heading);
    font-size: 23px;
    line-height: 1.1;
}

.stat-card span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

/* FILTROS */
.filters {
    display: grid;
    grid-template-columns:
        minmax(130px, 1fr)
        minmax(120px, 1fr)
        minmax(120px, 1fr)
        minmax(150px, 1fr)
        minmax(140px, 1fr)
        minmax(140px, .95fr)
        minmax(150px, 1fr);
    gap: 10px;
    margin-bottom: 18px;
}

.field input,
.field select {
    width: 100%;
    height: 40px;
    color: #2d3440;
    border: 1px solid var(--border-strong);
    border-radius: 7px;
    outline: none;
    background-color: var(--surface);
    box-shadow: 0 1px 3px rgba(18, 29, 48, .03);
    transition: .18s ease;
}

.field input {
    padding: 0 12px;
}

.field select {
    padding: 0 36px 0 12px;
    cursor: pointer;
}

.field input::placeholder {
    color: #9aa3b1;
}

.field input:focus,
.field select:focus {
    border-color: #8297b2;
    box-shadow: 0 0 0 3px rgba(74, 104, 143, .10);
}

/* TABELA */
.table-card {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.table-scroll {
    width: 100%;
    overflow-x: auto;
}

.candidates-table {
    width: 100%;
    min-width: 1080px;
    border-collapse: collapse;
    table-layout: fixed;
}

.candidates-table th,
.candidates-table td {
    border-bottom: 1px solid #edf0f4;
    text-align: left;
    vertical-align: middle;
}

.candidates-table th {
    height: 52px;
    padding: 0 14px;
    color: #8c99aa;
    background: #fcfcfd;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.candidates-table td {
    height: 68px;
    padding: 11px 12px;
    color: #626d7c;
    font-size: 12px;
}

.candidates-table tbody tr {
    transition: .16s ease;
}

.candidates-table tbody tr:hover {
    background: #fafbfd;
}

.candidates-table tbody tr:last-child td {
    border-bottom: 0;
}

.candidates-table th:nth-child(1),
.candidates-table td:nth-child(1) {
    width: 20px;
    text-align: center;
}

.candidates-table th:nth-child(2),
.candidates-table td:nth-child(2) {
    width: 252px;
}

.candidates-table th:nth-child(3),
.candidates-table td:nth-child(3) {
    width: 80px;
}

.candidates-table th:nth-child(4),
.candidates-table td:nth-child(4) {
    width: 84px;
}

.candidates-table th:nth-child(5),
.candidates-table td:nth-child(5) {
    width: 112px;
}

.candidates-table th:nth-child(6),
.candidates-table td:nth-child(6) {
    width: 76px;
    text-align: center;
}

.candidates-table th:nth-child(7),
.candidates-table td:nth-child(7) {
    width: 150px;
}

.candidates-table th:nth-child(8),
.candidates-table td:nth-child(8) {
    width: 102px;
}
.candidates-table th:nth-child(9),
.candidates-table td:nth-child(9) {
    width: 80px;
}

.row-check {
    width: 16px;
    height: 16px;
    accent-color: var(--navy);
    cursor: pointer;
}

.candidate-name {
    display: block;
    color: var(--navy);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.35;
}

.candidate-name:hover {
    text-decoration: underline;
}

.candidate-location {
    display: block;
    margin-top: 3px;
    color: #a0a9b6;
    font-size: 10px;
    line-height: 1.3;
}

.score {
    display: inline-flex;
    min-width: 26px;
    justify-content: center;
    font-weight: 600;
}

.score--empty,
.score--low {
    color: var(--red);
}

.score--medium {
    color: var(--yellow);
}

.score--good {
    color: var(--green);
}

/* O select é estilizado como badge, mantendo HTML sem JavaScript. */
.status-select {
    width: 100%;
    height: 30px;
    padding: 0 26px 0 11px;
    color: #526073;
    border: 1px solid #dfe4eb;
    border-radius: 999px;
    outline: none;
    background: #f1f4f7;
    font-size: 11px;
    cursor: pointer;
}

.status-select:focus {
    border-color: #95a7bd;
    box-shadow: 0 0 0 3px rgba(66, 93, 128, .09);
}

.status-select--received {
    color: #526073;
    background: #f1f4f7;
}

.status-select--analysis {
    color: #8a6500;
    border-color: #f0dfa8;
    background: #fff7db;
}

.status-select--interview {
    color: #345a91;
    border-color: #ccdcf0;
    background: #eef5fc;
}

.status-select--manager {
    color: #634eb4;
    border-color: #d9d3f4;
    background: var(--purple-soft);
}

.status-select--talent {
    color: #8a5b18;
    border-color: #efd7ad;
    background: #fff4df;
}

.status-select--hired {
    color: #19714e;
    border-color: #bfe5d6;
    background: var(--green-soft);
}

.status-select--rejected {
    color: #b63a48;
    border-color: #f0c6cb;
    background: var(--red-soft);
}

.download-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--navy);
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
}

.download-link:hover {
    text-decoration: underline;
}

.download-link svg {
    width: 15px;
    height: 15px;
}

.table-footer {
    display: flex;
    min-height: 58px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 16px;
    color: var(--muted);
    border-top: 1px solid var(--border);
    font-size: 11px;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.pagination button {
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    color: #697587;
    border: 1px solid var(--border-strong);
    border-radius: 7px;
    background: var(--surface);
    cursor: pointer;
}

.pagination button:hover:not(:disabled),
.pagination button.is-active {
    color: #fff;
    border-color: var(--navy);
    background: var(--navy);
}

.pagination button:disabled {
    cursor: not-allowed;
    opacity: .45;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* RESPONSIVIDADE */
@media (max-width: 1250px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .filters {
        grid-template-columns: repeat(4, minmax(150px, 1fr));
    }
}

@media (max-width: 900px) {
    .sidebar {
        display: none;
    }

    .main-content {
        width: 100%;
        margin-left: 0;
        padding: 26px 18px 40px;
    }

    .mobile-brand {
        display: block;
        margin-bottom: 8px;
        color: #8c97a6;
        font-size: 10px;
        font-weight: 700;
        letter-spacing: .22em;
    }

    .filters {
        grid-template-columns: repeat(2, minmax(140px, 1fr));
    }
}

@media (max-width: 640px) {
    .page-header {
        flex-direction: column;
    }

    .header-actions,
    .header-actions .btn {
        width: 100%;
    }

    .stats-grid,
    .filters {
        grid-template-columns: 1fr;
    }

    .table-footer {
        align-items: flex-start;
        flex-direction: column;
    }
}
