:root {
    --bg: #f5f7fb;
    --surface: #ffffff;
    --text: #18212f;
    --muted: #657184;
    --line: #dfe5ef;
    --primary: #166f7a;
    --primary-dark: #105761;
    --accent: #c8583d;
    --soft: #e8f4f5;
    --shadow: 0 14px 36px rgba(24, 33, 47, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.55;
}

a {
    color: var(--primary);
    text-decoration: none;
}

.topbar {
    align-items: center;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    padding: 16px 6vw;
    position: sticky;
    top: 0;
    z-index: 10;
}

.brand {
    color: var(--text);
    font-size: 20px;
    font-weight: 800;
}

nav {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.logout-form {
    margin: 0;
}

.link-button {
    background: none;
    border: 0;
    color: var(--primary);
    cursor: pointer;
    font: inherit;
    padding: 0;
}

.shell {
    margin: 0 auto;
    max-width: 1180px;
    padding: 36px 24px 64px;
}

.hero {
    align-items: center;
    display: grid;
    gap: 36px;
    grid-template-columns: 1.4fr 0.9fr;
    min-height: 70vh;
}

.hero h1,
.section-heading h1,
.dashboard-head h1 {
    font-size: 42px;
    line-height: 1.12;
    margin: 0;
}

.lead {
    color: var(--muted);
    font-size: 18px;
    max-width: 680px;
}

.small-lead {
    font-size: 16px;
}

.eyebrow {
    color: var(--accent);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    margin: 0 0 8px;
    text-transform: uppercase;
}

.hero-panel,
.auth-card,
.panel,
.profile-card,
.job-card,
.stat {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.hero-panel {
    display: grid;
    gap: 14px;
    padding: 24px;
}

.metric,
.stat {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px;
}

.metric strong,
.stat strong {
    display: block;
    font-size: 28px;
}

.metric span,
.stat span,
.muted {
    color: var(--muted);
}

.actions,
.dashboard-head,
.card-top {
    align-items: center;
    display: flex;
    gap: 12px;
}

.dashboard-head {
    justify-content: space-between;
    margin-bottom: 24px;
}

.button {
    align-items: center;
    background: var(--primary);
    border: 1px solid var(--primary);
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    font-weight: 700;
    justify-content: center;
    min-height: 44px;
    padding: 10px 18px;
}

.button:hover {
    background: var(--primary-dark);
}

.button.ghost {
    background: transparent;
    color: var(--primary);
}

.button.small {
    min-height: 36px;
    padding: 7px 12px;
}

.button.full {
    width: 100%;
}

.button.disabled {
    background: #aab4c2;
    border-color: #aab4c2;
}

.auth-card {
    margin: 0 auto;
    max-width: 620px;
    padding: 28px;
}

.auth-card.compact {
    max-width: 480px;
}

.wide-card {
    max-width: 760px;
}

.section-heading {
    margin-bottom: 24px;
}

.form-grid {
    display: grid;
    gap: 16px;
}

label span {
    display: block;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 6px;
}

input,
select,
textarea {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--text);
    font: inherit;
    min-height: 44px;
    padding: 10px 12px;
    width: 100%;
}

textarea {
    resize: vertical;
}

small,
.error {
    color: var(--muted);
    display: block;
    margin-top: 5px;
}

.error,
.error-box {
    color: #b42318;
}

.center {
    text-align: center;
}

.profile-layout,
.two-column {
    display: grid;
    gap: 24px;
    grid-template-columns: 0.95fr 1.05fr;
}

.two-column.slim {
    grid-template-columns: 0.85fr 1fr;
}

.profile-card,
.panel,
.job-card {
    padding: 24px;
}

.profile-card {
    align-content: start;
    display: grid;
    gap: 20px;
}

.avatar {
    align-items: center;
    background: var(--soft);
    border-radius: 8px;
    color: var(--primary-dark);
    display: flex;
    font-size: 32px;
    font-weight: 800;
    height: 72px;
    justify-content: center;
    width: 72px;
}

.pill {
    background: var(--soft);
    border-radius: 999px;
    color: var(--primary-dark);
    display: inline-flex;
    font-size: 13px;
    font-weight: 800;
    padding: 5px 10px;
}

.info-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.info-grid span {
    color: var(--muted);
    display: block;
    font-size: 13px;
}

.wide {
    grid-column: 1 / -1;
}

.stats-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 24px;
}

.list {
    display: grid;
    gap: 14px;
}

.list-item {
    align-items: start;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    padding: 16px;
}

h2,
h3,
p {
    margin-top: 0;
}

.search-bar {
    display: grid;
    gap: 12px;
    grid-template-columns: 1fr auto;
    margin-bottom: 24px;
}

.job-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.job-card {
    display: grid;
    gap: 12px;
}

.skills {
    color: var(--primary-dark);
    font-weight: 700;
}

.messages {
    display: grid;
    gap: 10px;
    margin-bottom: 18px;
}

.message {
    background: #fff;
    border: 1px solid var(--line);
    border-left: 4px solid var(--primary);
    border-radius: 8px;
    padding: 12px 14px;
}

.message.error {
    border-left-color: #b42318;
}

.match-block {
    border-bottom: 1px solid var(--line);
    padding-bottom: 18px;
}

.match-block:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

@media (max-width: 860px) {
    .hero,
    .profile-layout,
    .two-column,
    .two-column.slim,
    .job-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-head,
    .list-item,
    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .search-bar,
    .stats-grid,
    .info-grid {
        grid-template-columns: 1fr;
    }

    .hero h1,
    .section-heading h1,
    .dashboard-head h1 {
        font-size: 32px;
    }
}
