:root {
    color-scheme: light;
    --color-bg: #f5f6f8;
    --color-surface: #ffffff;
    --color-border: #d1d5db;
    --color-text: #101828;
    --color-muted: #5b6270;
    --color-accent: #2563eb;
    --color-accent-hover: #1d4ed8;
    --gradient-brand: linear-gradient(135deg, #4b2cff, #ff3cac);
    --radius-card: 18px;
    --radius-control: 10px;
    --radius-button: 12px;
    --shadow-card: 0 30px 80px rgba(0, 0, 0, 0.15);
    --color-pass: #1a7f37;
    --color-pass-bg: #dafbe1;
    --color-fail: #b3261e;
    --color-fail-bg: #ffe3e1;
    --color-neutral: #5b6270;
    --color-neutral-bg: #eceef1;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, Helvetica, sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
}

.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1.5rem;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
}

.app-header .brand {
    font-weight: 700;
}

.app-header nav {
    display: flex;
    gap: 1rem;
}

.app-header nav a {
    color: var(--color-text);
    text-decoration: none;
    font-weight: 600;
}

.app-header nav a:hover {
    color: var(--color-accent);
}

.user-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--color-muted);
    font-size: 0.9rem;
}

main {
    max-width: 1100px;
    margin: 1.5rem auto;
    padding: 0 1.5rem;
}

h1 {
    font-size: 1.75rem;
    font-weight: 700;
}

h2 {
    font-size: 1.15rem;
    font-weight: 700;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-control);
    overflow: hidden;
}

th, td {
    text-align: left;
    padding: 0.6rem 0.85rem;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.9rem;
}

th {
    background: #fafbfc;
    color: var(--color-muted);
    font-weight: 600;
}

tr:last-child td {
    border-bottom: none;
}

a {
    color: var(--color-accent);
}

.filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: end;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-control);
    padding: 1rem;
    margin-bottom: 1rem;
}

.filter-form label {
    display: flex;
    flex-direction: column;
    font-size: 0.8rem;
    color: var(--color-muted);
    font-weight: 600;
    gap: 0.3rem;
}

.filter-form input,
.filter-form select {
    padding: 0.6rem 0.7rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-control);
    font-size: 0.9rem;
    font-family: inherit;
}

button {
    padding: 0.6rem 1.1rem;
    border: none;
    border-radius: var(--radius-button);
    background: var(--color-accent);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
    font-family: inherit;
    transition: background 0.15s ease;
}

button:hover {
    background: var(--color-accent-hover);
}

button.secondary {
    background: transparent;
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

button.secondary:hover {
    background: var(--color-bg);
}

.badge {
    display: inline-block;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-pass {
    color: var(--color-pass);
    background: var(--color-pass-bg);
}

.badge-fail {
    color: var(--color-fail);
    background: var(--color-fail-bg);
}

.badge-neutral {
    color: var(--color-neutral);
    background: var(--color-neutral-bg);
}

.warning {
    padding: 0.85rem 1rem;
    background: #fff4e5;
    border: 1px solid #f0b429;
    border-radius: var(--radius-control);
    color: #7a4c00;
    margin: 1rem 0;
}

.error {
    color: var(--color-fail);
    font-size: 0.9rem;
}

.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--gradient-brand);
}

.login-box {
    background: var(--color-surface);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    padding: 28px;
    width: 100%;
    max-width: 360px;
}

.login-box h1 {
    font-size: 1.4rem;
    line-height: 1.3;
    margin: 0 0 1.25rem;
    text-align: center;
}

.login-box form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.login-box label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
    display: block;
    margin-bottom: 6px;
}

.login-box input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-control);
    font-size: 0.95rem;
    font-family: inherit;
}

.login-box button {
    margin-top: 0.25rem;
    width: 100%;
    padding: 12px 14px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.detail-grid .field {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-control);
    padding: 0.75rem;
}

.detail-grid .field .label {
    font-size: 0.75rem;
    color: var(--color-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.detail-grid .field .value {
    margin-top: 0.25rem;
    font-size: 1rem;
    word-break: break-word;
}
