:root {
    color-scheme: light;
    --bg: #ffffff;
    --surface: #ffffff;
    --soft: #f7f7f8;
    --text: #1f2328;
    --muted: #667085;
    --line: #eceef2;
    --line-strong: #d9dee7;
    --accent: #111827;
    --shadow: 0 18px 45px rgba(16, 24, 40, 0.07);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-width: 320px;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
}

.shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 48px 0 72px;
}

.hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding: 8px 0 36px;
}

.hero-copy {
    max-width: 760px;
}

.kicker {
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0;
}

h1,
h2,
h3,
p {
    margin: 0;
}

h1 {
    max-width: 760px;
    font-size: clamp(24px, 4vw, 45px);
    line-height: 1.08;
    font-weight: 720;
    letter-spacing: 0;
}

h2 {
    font-size: 24px;
    line-height: 1.2;
    letter-spacing: 0;
}

h3 {
    font-size: 17px;
    letter-spacing: 0;
}

.company {
    margin-top: 22px;
    font-size: 18px;
    font-weight: 650;
}

.lead {
    margin-top: 10px;
    max-width: 650px;
    color: var(--muted);
    font-size: 16px;
}

.export-button,
button,
.ghost-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    border-radius: 8px;
    font: inherit;
    white-space: nowrap;
}

.export-button,
button {
    border: 1px solid var(--accent);
    padding: 0 14px;
    background: var(--accent);
    color: #ffffff;
    text-decoration: none;
    cursor: pointer;
}

.export-button:hover,
button:hover {
    opacity: 0.9;
}

.ghost-link {
    padding: 0 6px;
    color: var(--muted);
    text-decoration: none;
}

.section {
    padding: 34px 0 12px;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.section-heading p {
    max-width: 680px;
    margin-top: 8px;
    color: var(--muted);
}

.hint {
    color: var(--muted);
    font-size: 14px;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 14px;
}

.metric-card,
.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
}

.metric-card {
    padding: 18px;
}

.metric-card span {
    color: var(--muted);
    font-size: 14px;
}

.metric-card strong {
    display: block;
    margin-top: 8px;
    font-size: 34px;
    line-height: 1;
    letter-spacing: 0;
}

.analytics-grid {
    display: grid;
    grid-template-columns: 1fr;
}

.panel {
    padding: 22px;
}

.panel-title {
    margin-bottom: 20px;
}

.pie-wrap {
    display: grid;
    grid-template-columns: minmax(180px, 260px) minmax(220px, 1fr);
    align-items: center;
    gap: 30px;
}

.pie {
    width: min(260px, 100%);
    aspect-ratio: 1;
    border-radius: 50%;
    box-shadow: inset 0 0 0 18px rgba(255, 255, 255, 0.72), var(--shadow);
}

.legend {
    display: grid;
    gap: 12px;
}

.legend-row {
    display: grid;
    grid-template-columns: 16px 1fr auto;
    align-items: center;
    gap: 10px;
    color: var(--muted);
}

.legend-row strong {
    color: var(--text);
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.profile-bars {
    display: grid;
    gap: 18px;
}

.profile-label {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 8px;
}

.profile-track {
    height: 12px;
    overflow: hidden;
    background: var(--soft);
    border-radius: 999px;
}

.profile-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
}

.toolbar {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(190px, 260px) auto auto;
    gap: 12px;
    align-items: end;
    margin-bottom: 14px;
}

label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 13px;
}

input,
select {
    width: 100%;
    min-height: 40px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    padding: 0 12px;
    background: #ffffff;
    color: var(--text);
    font: inherit;
}

input:focus,
select:focus {
    outline: 2px solid rgba(17, 24, 39, 0.12);
    outline-offset: 1px;
}

.table-panel {
    padding: 0;
    overflow: hidden;
}

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

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

th,
td {
    padding: 15px 18px;
    border-bottom: 1px solid var(--line);
    text-align: left;
}

th {
    color: var(--muted);
    font-size: 13px;
    font-weight: 650;
}

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

.employee-row {
    cursor: pointer;
}

.employee-row:hover,
.employee-row:focus {
    background: var(--soft);
    outline: none;
}

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

.employee-dialog {
    width: min(620px, calc(100% - 28px));
    border: 0;
    border-radius: 16px;
    padding: 0;
    box-shadow: var(--shadow);
}

.employee-dialog::backdrop {
    background: rgba(17, 24, 39, 0.28);
}

.close-button {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 34px;
    min-height: 34px;
    border: 0;
    border-radius: 50%;
    padding: 0;
    background: var(--soft);
    color: var(--text);
    font-size: 22px;
}

.dialog-content {
    padding: 28px;
}

.dialog-content h3 {
    margin-bottom: 20px;
    font-size: 28px;
}

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

dt {
    color: var(--muted);
    font-size: 13px;
}

dd {
    margin: 3px 0 0;
    font-weight: 600;
}

.dialog-bars,
.mini-row {
    display: grid;
    gap: 10px;
}

.mini-row {
    grid-template-columns: 1fr auto;
    align-items: center;
}

.mini-row div {
    grid-column: 1 / -1;
    height: 8px;
    overflow: hidden;
    background: var(--soft);
    border-radius: 999px;
}

.mini-row i {
    display: block;
    height: 100%;
    border-radius: inherit;
}

@media (max-width: 820px) {
    .shell {
        width: min(100% - 24px, 1180px);
        padding-top: 28px;
    }

    .hero,
    .section-heading {
        display: grid;
    }

    .export-button {
        width: 100%;
    }

    .metric-grid,
    .pie-wrap,
    .toolbar,
    dl {
        grid-template-columns: 1fr;
    }

    .pie {
        margin: 0 auto;
    }

    h1 {
        font-size: 42px;
    }
}

@media (max-width: 520px) {
    .metric-card strong {
        font-size: 28px;
    }

    th,
    td {
        padding: 13px 14px;
    }

    .panel {
        padding: 18px;
    }

    .table-panel {
        padding: 0;
    }
}
