* {
    box-sizing: border-box;
}

:root {
    --bg: #f6f1e8;
    --panel: rgba(255, 251, 245, 0.72);
    --panel-2: rgba(255, 255, 255, 0.82);
    --panel-3: rgba(250, 246, 240, 0.88);
    --line: rgba(120, 102, 77, 0.14);
    --line-soft: rgba(120, 102, 77, 0.10);
    --text: #1f2937;
    --muted: #6b7280;
    --accent: #5b8cff;
    --accent-2: #7aa2ff;
    --success-bg: rgba(34, 197, 94, 0.12);
    --success-text: #15803d;
    --warning-bg: rgba(245, 158, 11, 0.12);
    --warning-text: #b45309;
    --danger-bg: rgba(239, 68, 68, 0.12);
    --danger-text: #b91c1c;
    --info-bg: rgba(59, 130, 246, 0.12);
    --info-text: #1d4ed8;
    --shadow: 0 18px 40px rgba(97, 74, 43, 0.10);
    --radius: 18px;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    background:
        radial-gradient(circle at top right, rgba(91, 140, 255, 0.10), transparent 28%),
        linear-gradient(180deg, #f8f4ee 0%, #f2ebe1 100%);
    color: var(--text);
    font-family: Inter, "Segoe UI", Arial, sans-serif;
}

body {
    display: flex;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    display: block;
    max-width: 100%;
}

/* Sidebar */
.sidebar {
    width: 280px;
    min-height: 100vh;
    background: rgba(255, 251, 245, 0.78);
    border-right: 1px solid rgba(120, 102, 77, 0.12);
    padding: 26px 18px;
    position: sticky;
    top: 0;
    box-shadow: 18px 0 50px rgba(97, 74, 43, 0.08);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.sidebar img {
    width: 170px;
    margin: 0 auto 26px auto;
}

.sidebar a {
    display: flex;
    align-items: center;
    min-height: 46px;
    padding: 0 14px;
    border-radius: 14px;
    color: #4b5563;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
    border: 1px solid transparent;
    transition: all 0.18s ease;
}

.sidebar a:hover {
    background: rgba(91, 140, 255, 0.10);
    border-color: rgba(91, 140, 255, 0.16);
    color: #111827;
    transform: translateX(2px);
}

/* Main */
.main {
    flex: 1;
    padding: 30px;
    overflow-x: auto;
}

/* Top spacing */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

/* Typography */
h1 {
    margin: 0;
    font-size: 34px;
    line-height: 1.05;
    font-weight: 800;
    color: #111827;
    letter-spacing: -0.03em;
}

h2 {
    margin: 0 0 14px 0;
    font-size: 22px;
    line-height: 1.1;
    font-weight: 800;
    color: #111827;
    letter-spacing: -0.02em;
}

p {
    color: var(--text);
    line-height: 1.5;
}

strong {
    color: #111827;
}

/* Cards */
.card,
.kpi-card {
    background: rgba(255, 251, 245, 0.72);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.card {
    padding: 22px;
}

.form-card {
    max-width: 980px;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.kpi-card {
    padding: 20px;
    min-height: 122px;
    position: relative;
    overflow: hidden;
}

.kpi-card::after {
    content: "";
    position: absolute;
    right: -16px;
    top: -16px;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(91, 140, 255, 0.14) 0%, transparent 70%);
}

.kpi-card strong {
    display: block;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 12px;
}

.kpi-value {
    font-size: 38px;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: #111827;
}

/* Layout helpers */
.two-cols {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
}

.four-cols {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

/* Flash */
.flash {
    padding: 14px 16px;
    border-radius: 14px;
    margin-bottom: 18px;
    font-size: 14px;
    font-weight: 700;
    border: 1px solid transparent;
}

.flash-success {
    background: rgba(34, 197, 94, 0.12);
    color: var(--success-text);
    border-color: rgba(34, 197, 94, 0.18);
}

.flash-error {
    background: rgba(239, 68, 68, 0.12);
    color: var(--danger-text);
    border-color: rgba(239, 68, 68, 0.18);
}

/* Forms */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.form-input,
select.form-input,
textarea.form-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(120, 102, 77, 0.16);
    color: #1f2937;
    border-radius: 14px;
    padding: 13px 14px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.form-input::placeholder,
textarea.form-input::placeholder {
    color: #9ca3af;
}

.form-input:focus,
select.form-input:focus,
textarea.form-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(91, 140, 255, 0.14);
    background: rgba(255, 255, 255, 0.92);
}

textarea.form-input {
    resize: vertical;
    min-height: 110px;
}

/* Buttons */
.actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.button,
.button-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 800;
    transition: all 0.18s ease;
    cursor: pointer;
}

.button {
    background: linear-gradient(135deg, var(--accent) 0%, #3d6fe8 100%);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 12px 24px rgba(61, 111, 232, 0.18);
}

.button:hover {
    transform: translateY(-1px);
    background: linear-gradient(135deg, var(--accent-2) 0%, #4c7cf2 100%);
}

.button-link {
    background: rgba(255, 255, 255, 0.68);
    color: #374151;
    border: 1px solid rgba(120, 102, 77, 0.16);
}

.button-link:hover {
    transform: translateY(-1px);
    border-color: rgba(91, 140, 255, 0.28);
    color: #111827;
}

/* Tables */
.table-wrap {
    width: 100%;
    overflow-x: auto;
    border-radius: 14px;
}

.table {
    width: 100%;
    min-width: 980px;
    border-collapse: collapse;
}

.table thead th {
    text-align: left;
    padding: 14px;
    font-size: 12px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 800;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}

.table tbody td {
    padding: 15px 14px;
    border-bottom: 1px solid var(--line-soft);
    color: #1f2937;
    font-size: 14px;
    vertical-align: top;
}

.table tbody tr:hover {
    background: rgba(255, 255, 255, 0.30);
}

.link-action {
    display: inline-block;
    color: #2563eb;
    font-weight: 800;
    font-size: 13px;
    margin-right: 10px;
    margin-bottom: 4px;
}

.link-action:hover {
    color: #1d4ed8;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.03em;
    border: 1px solid transparent;
}

.badge-ativo,
.badge-aberta,
.badge-alta,
.badge-aprovado,
.badge-teste_concluido {
    background: var(--success-bg);
    color: var(--success-text);
    border-color: rgba(34, 197, 94, 0.16);
}

.badge-inativo,
.badge-arquivada,
.badge-baixa,
.badge-reprovado {
    background: var(--danger-bg);
    color: var(--danger-text);
    border-color: rgba(239, 68, 68, 0.16);
}

.badge-pausada,
.badge-media,
.badge-em_analise,
.badge-entrevista,
.badge-teste_enviado {
    background: var(--warning-bg);
    color: var(--warning-text);
    border-color: rgba(245, 158, 11, 0.16);
}

.badge-teste_iniciado,
.badge-cadastrado {
    background: var(--info-bg);
    color: var(--info-text);
    border-color: rgba(59, 130, 246, 0.16);
}

/* Timeline */
.timeline-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.timeline-item {
    padding: 15px 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.38);
}

/* Utilities */
.muted {
    color: var(--muted);
}

/* Responsive */
@media (max-width: 1200px) {
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .two-cols {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 860px) {
    body {
        display: block;
    }

    .sidebar {
        width: 100%;
        min-height: auto;
        position: static;
        padding-bottom: 16px;
    }

    .main {
        padding: 18px;
    }

    .kpi-grid,
    .four-cols {
        grid-template-columns: 1fr;
    }

    .table {
        min-width: 760px;
    }

    h1 {
        font-size: 28px;
    }
}

