* {
    box-sizing: border-box;
}

:root {
    --bg: #f5f7fb;
    --panel: #ffffff;
    --text: #172033;
    --muted: #6f7787;
    --border: #e5e9f2;
    --primary: #4f46e5;
    --primary-soft: #eef0ff;
    --success: #0f9f6e;
    --sidebar: #101828;
}

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

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

.app {
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 240px;
    padding: 28px 20px;
    background: var(--sidebar);
    color: white;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 38px;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 13px;
    background: var(--primary);
    font-weight: 800;
}

.brand strong,
.brand small {
    display: block;
}

.brand small {
    margin-top: 3px;
    color: #a8b0c2;
}

.sidebar nav {
    display: grid;
    gap: 8px;
}

.sidebar nav a {
    padding: 13px 15px;
    border-radius: 10px;
    color: #cdd4e2;
}

.sidebar nav a:hover,
.sidebar nav a.active {
    background: rgba(255,255,255,.09);
    color: white;
}

.main {
    margin-left: 240px;
    padding: 30px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 26px;
}

.topbar h1 {
    margin: 0 0 6px;
    font-size: 30px;
}

.topbar p {
    margin: 0;
    color: var(--muted);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 18px;
    border: 0;
    border-radius: 10px;
    background: var(--primary);
    color: white;
    cursor: pointer;
    font-weight: 700;
}

.button.secondary {
    background: #eef1f6;
    color: var(--text);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 20px;
}

.stat-card,
.panel {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(16,24,40,.04);
}

.stat-card {
    padding: 22px;
}

.stat-card span {
    display: block;
    margin-bottom: 12px;
    color: var(--muted);
}

.stat-card strong {
    font-size: 30px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.panel {
    padding: 22px;
    margin-bottom: 20px;
}

.panel-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.panel-title h2 {
    margin: 0;
    font-size: 19px;
}

.panel-title a,
.table-link {
    color: var(--primary);
    font-weight: 700;
}

.bar-row {
    margin-bottom: 17px;
}

.bar-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 7px;
    font-size: 14px;
}

.bar-track {
    height: 9px;
    overflow: hidden;
    border-radius: 20px;
    background: #edf0f5;
}

.bar-fill {
    height: 100%;
    border-radius: inherit;
    background: var(--primary);
}

.skill-list {
    display: grid;
    gap: 13px;
}

.skill-list div {
    display: flex;
    justify-content: space-between;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 14px 13px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

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

.badge {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 20px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
}

.filters {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr auto auto;
    gap: 10px;
}

input,
select,
textarea {
    width: 100%;
    padding: 12px 13px;
    border: 1px solid #d8deea;
    border-radius: 10px;
    background: white;
    color: var(--text);
    font: inherit;
}

textarea {
    resize: vertical;
}

.skills-cell {
    min-width: 260px;
    max-width: 390px;
    color: #4b5565;
    line-height: 1.5;
}

.pagination {
    display: flex;
    gap: 7px;
    margin-top: 20px;
}

.pagination a {
    display: grid;
    place-items: center;
    min-width: 38px;
    height: 38px;
    border: 1px solid var(--border);
    border-radius: 9px;
}

.pagination a.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.detail-grid {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 20px;
}

.profile-card {
    align-self: start;
    position: sticky;
    top: 24px;
    text-align: center;
}

.avatar {
    display: grid;
    place-items: center;
    width: 78px;
    height: 78px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 30px;
    font-weight: 800;
}

.profile-card h2 {
    margin: 0 0 7px;
}

.profile-card > p {
    color: var(--muted);
}

.contact-list {
    margin: 24px 0;
    text-align: left;
}

.contact-list div {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.contact-list strong,
.contact-list span {
    display: block;
}

.contact-list span {
    margin-top: 5px;
    color: var(--muted);
    word-break: break-word;
}

.status-form {
    display: grid;
    gap: 9px;
    text-align: left;
}

.status-form label {
    margin-top: 7px;
    font-weight: 700;
    font-size: 13px;
}

.content-stack {
    min-width: 0;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.tags span {
    padding: 8px 11px;
    border-radius: 9px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 13px;
    font-weight: 700;
}

.resume-section {
    line-height: 1.75;
    color: #455065;
}

.raw-text {
    max-height: 520px;
    overflow: auto;
    padding: 18px;
    border-radius: 12px;
    background: #111827;
    color: #e5e7eb;
    white-space: pre-wrap;
    font-size: 13px;
    line-height: 1.6;
}

summary {
    cursor: pointer;
    font-weight: 700;
}

.empty {
    padding: 40px;
    color: var(--muted);
    text-align: center;
}

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

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

@media (max-width: 800px) {
    .sidebar {
        position: static;
        width: auto;
    }

    .sidebar nav {
        grid-template-columns: 1fr 1fr;
    }

    .main {
        margin-left: 0;
        padding: 18px;
    }

    .topbar,
    .dashboard-grid,
    .detail-grid {
        display: block;
    }

    .topbar .button {
        margin-top: 15px;
    }

    .profile-card {
        position: static;
    }
}

@media (max-width: 560px) {
    .stats-grid,
    .filters {
        grid-template-columns: 1fr;
    }
}


.upload-panel {
    max-width: 900px;
}

.upload-form {
    display: grid;
    gap: 20px;
}

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

.upload-form label {
    display: block;
    margin-bottom: 7px;
    font-size: 13px;
    font-weight: 700;
}

.upload-form small {
    display: block;
    margin-top: 7px;
    color: var(--muted);
}

.alert {
    padding: 13px 15px;
    margin-bottom: 18px;
    border-radius: 10px;
}

.alert.error {
    background: #fff1f2;
    color: #be123c;
}

@media (max-width: 700px) {
    .upload-form .form-grid {
        grid-template-columns: 1fr;
    }
}


.checker-panel {
    max-width: 900px;
}

.checker-form {
    display: grid;
    gap: 18px;
}

.checker-form label {
    display: block;
    margin-bottom: 7px;
    font-size: 13px;
    font-weight: 700;
}

.checker-form small {
    display: block;
    margin-top: 7px;
    color: var(--muted);
}

.checker-message {
    margin-top: 20px;
    padding: 14px 16px;
    border-radius: 10px;
}

.checker-message.error {
    background: #fff1f2;
    color: #be123c;
}

.eligibility-result {
    margin-top: 26px;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: #fbfcff;
}

.eligibility-result.pass {
    border-color: #86efac;
    background: #f0fdf4;
}

.eligibility-result.fail {
    border-color: #fda4af;
    background: #fff1f2;
}

.result-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.result-heading span {
    color: var(--muted);
}

.result-heading h2 {
    margin: 7px 0 0;
}

.score-circle {
    display: grid;
    place-items: center;
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: white;
    border: 8px solid var(--primary);
    font-size: 20px;
    font-weight: 800;
}

.progress-track {
    height: 12px;
    margin: 22px 0;
    overflow: hidden;
    border-radius: 20px;
    background: #e5e7eb;
}

.progress-fill {
    height: 100%;
    border-radius: inherit;
    background: var(--primary);
}

.checker-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 22px;
}

.success-tags span {
    background: #dcfce7;
    color: #166534;
}

.missing-tags span {
    background: #ffe4e6;
    color: #be123c;
}

@media (max-width: 700px) {
    .checker-grid {
        grid-template-columns: 1fr;
    }

    .result-heading {
        align-items: flex-start;
        flex-direction: column;
    }
}
