:root {
    --bg: #f6f7f9;
    --panel: #ffffff;
    --ink: #17202a;
    --muted: #667085;
    --line: #d8dee8;
    --primary: #176b5b;
    --primary-dark: #0f4f43;
    --accent: #b8872d;
    --danger: #b42318;
    --success: #087443;
    --shadow: 0 12px 35px rgba(20, 30, 45, .08);
}

* {
    box-sizing: border-box;
}

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

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

a:hover {
    color: var(--primary-dark);
}

.topbar {
    align-items: center;
    background: #ffffff;
    border-bottom: 1px solid var(--line);
    display: flex;
    gap: 20px;
    justify-content: space-between;
    min-height: 64px;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 5;
}

.brand {
    color: var(--ink);
    font-weight: 800;
}

.nav {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 14px;
}

.shell {
    margin: 0 auto;
    max-width: 1180px;
    padding: 30px 20px 60px;
}

.auth-panel {
    display: grid;
    gap: 24px;
    margin: 8vh auto 0;
    max-width: 520px;
}

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

h1 {
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.12;
    margin-bottom: 8px;
}

h2 {
    font-size: 20px;
}

h3 {
    font-size: 15px;
    margin-bottom: 6px;
}

.eyebrow {
    color: var(--accent);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    margin-bottom: 6px;
}

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

.card,
.panel,
.report-card,
.file-card,
.stat {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

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

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

.panel-head h2 {
    margin: 0;
}

.form {
    display: grid;
    gap: 16px;
    padding: 22px;
}

.form.wide {
    padding: 24px;
}

label {
    color: #344054;
    display: grid;
    font-size: 14px;
    font-weight: 700;
    gap: 7px;
}

input,
textarea,
select {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    color: var(--ink);
    font: inherit;
    min-height: 42px;
    padding: 10px 12px;
    width: 100%;
}

textarea {
    resize: vertical;
}

.hint,
.muted {
    color: var(--muted);
    font-size: 13px;
    font-weight: 400;
}

.button {
    align-items: center;
    background: #ffffff;
    border: 1px solid #b8c2d2;
    border-radius: 6px;
    color: #1f2937;
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-weight: 750;
    justify-content: center;
    min-height: 42px;
    padding: 9px 14px;
}

.button.primary {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
}

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

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

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

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

.stat {
    padding: 22px;
}

.stat strong {
    display: block;
    font-size: 34px;
    line-height: 1;
}

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

.alert {
    border-radius: 8px;
    margin-bottom: 14px;
    padding: 12px 14px;
}

.alert-error {
    background: #fef3f2;
    color: var(--danger);
}

.alert-success {
    background: #ecfdf3;
    color: var(--success);
}

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

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

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

th {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
}

.searchbar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

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

.report-card {
    display: grid;
    overflow: hidden;
}

.thumb,
.file-preview {
    align-items: center;
    background: #e9eef5;
    color: var(--muted);
    display: flex;
    font-weight: 800;
    justify-content: center;
    overflow: hidden;
}

.thumb {
    aspect-ratio: 16 / 10;
}

.thumb img,
.file-preview img {
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.report-body {
    padding: 16px;
}

.report-body h2 {
    font-size: 18px;
    margin-bottom: 8px;
}

.report-body p {
    color: var(--muted);
    font-size: 14px;
    min-height: 42px;
}

.meta {
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    font-size: 12px;
    gap: 10px;
}

.detail {
    display: grid;
    gap: 18px;
}

.info-list {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0;
}

.info-list div {
    border-left: 3px solid var(--primary);
    padding-left: 12px;
}

dt {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

dd {
    margin: 0;
}

.description {
    border-top: 1px solid var(--line);
    padding-top: 18px;
}

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

.file-card {
    display: grid;
    gap: 14px;
    grid-template-columns: 150px minmax(0, 1fr);
    padding: 12px;
}

.file-preview {
    aspect-ratio: 4 / 3;
    border-radius: 6px;
}

.file-card p {
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 10px;
    overflow-wrap: anywhere;
}

.file-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 14px;
    font-weight: 700;
}

.split {
    display: grid;
    gap: 24px;
    grid-template-columns: 340px minmax(0, 1fr);
}

.badge {
    background: #edf7f4;
    border-radius: 999px;
    color: var(--primary-dark);
    display: inline-block;
    font-size: 12px;
    font-weight: 800;
    padding: 4px 9px;
}

.empty {
    background: #ffffff;
    border: 1px dashed #b8c2d2;
    border-radius: 8px;
    color: var(--muted);
    padding: 24px;
}

@media (max-width: 860px) {
    .topbar,
    .page-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .stats,
    .report-grid,
    .grid.two,
    .file-grid,
    .info-list,
    .split {
        grid-template-columns: 1fr;
    }

    .file-card {
        grid-template-columns: 110px minmax(0, 1fr);
    }

    .searchbar {
        flex-direction: column;
    }
}
