* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: #f3f5f8;
    color: #1f2937;
    line-height: 1.5;
}

a {
    color: #2563eb;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.header h1 {
    margin: 0;
    font-size: 24px;
}

.card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
    padding: 16px;
    margin-bottom: 16px;
}

.filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    align-items: end;
}

.filters label {
    display: block;
    font-size: 12px;
    color: #64748b;
    margin-bottom: 4px;
}

.filters input,
.filters select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
}

.filters .actions {
    display: flex;
    gap: 8px;
}

.btn {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
}

.btn-primary {
    background: #2563eb;
    color: #fff;
}

.btn-secondary {
    background: #e2e8f0;
    color: #334155;
}

.stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 14px;
    color: #475569;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

th,
td {
    padding: 10px 8px;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: top;
    text-align: left;
}

th {
    background: #f8fafc;
    position: sticky;
    top: 0;
    z-index: 1;
    white-space: nowrap;
}

tr:hover td {
    background: #f8fbff;
}

.company-name {
    font-weight: 600;
    max-width: 220px;
}

.muted {
    color: #64748b;
    font-size: 12px;
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.badge-a { background: #dcfce7; color: #166534; }
.badge-b { background: #dbeafe; color: #1d4ed8; }
.badge-c { background: #fef3c7; color: #92400e; }
.badge-d { background: #fee2e2; color: #991b1b; }
.badge-high { background: #dcfce7; color: #166534; }
.badge-mid { background: #fef3c7; color: #92400e; }
.badge-low { background: #fee2e2; color: #991b1b; }
.badge-default { background: #e2e8f0; color: #475569; }
.badge-yes { background: #dcfce7; color: #166534; }
.badge-no { background: #f1f5f9; color: #64748b; }

.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.pagination-links {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.pagination-links a,
.pagination-links span {
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    background: #fff;
    font-size: 13px;
}

.pagination-links span.current {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
}

.field {
    background: #f8fafc;
    border-radius: 8px;
    padding: 10px 12px;
}

.field .label {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 4px;
}

.field .value {
    word-break: break-word;
}

.report-box {
    white-space: pre-wrap;
    word-break: break-word;
    background: #0f172a;
    color: #e2e8f0;
    padding: 16px;
    border-radius: 8px;
    max-height: 70vh;
    overflow: auto;
    font-size: 13px;
    line-height: 1.6;
}

.link-list a {
    display: inline-block;
    margin-right: 10px;
    margin-bottom: 6px;
}

.section-title {
    margin: 18px 0 10px;
    font-size: 16px;
}
