* { box-sizing: border-box; }
body {
    font-family: "Segoe UI", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
    margin: 0;
    background: #f4f5f7;
    color: #1f2328;
}
.layout { display: flex; min-height: 100vh; }
.sidebar {
    width: 220px;
    background: #1f2937;
    color: #e5e7eb;
    padding: 20px 0;
    flex-shrink: 0;
}
.sidebar h1 { font-size: 15px; padding: 0 20px 16px; color: #fff; }
.sidebar a {
    display: block;
    padding: 10px 20px;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 14px;
}
.sidebar a:hover, .sidebar a.active { background: #374151; color: #fff; }
.main { flex: 1; padding: 24px 32px; }
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.topbar .user { font-size: 13px; color: #6b7280; }
h2 { margin-top: 0; }
table { border-collapse: collapse; width: 100%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
th, td { padding: 8px 12px; border-bottom: 1px solid #e5e7eb; text-align: left; font-size: 13px; }
th { background: #f9fafb; font-weight: 600; }
tr:hover td { background: #f9fafb; }
.card { background: #fff; padding: 20px; border-radius: 6px; box-shadow: 0 1px 2px rgba(0,0,0,.06); margin-bottom: 16px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat { background: #fff; padding: 16px; border-radius: 6px; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.stat .value { font-size: 24px; font-weight: 700; }
.stat .label { font-size: 12px; color: #6b7280; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; font-weight: 600; }
.badge-S { background: #dcfce7; color: #166534; }
.badge-A { background: #dbeafe; color: #1e40af; }
.badge-B { background: #fef3c7; color: #92400e; }
.badge-C { background: #f3f4f6; color: #4b5563; }
.badge-D { background: #fee2e2; color: #991b1b; }
form.inline { display: inline; }
input[type=text], input[type=password], input[type=number], select {
    padding: 6px 8px; border: 1px solid #d1d5db; border-radius: 4px; font-size: 13px;
}
button, .btn {
    padding: 6px 14px; border: none; border-radius: 4px; background: #2563eb; color: #fff;
    cursor: pointer; font-size: 13px; text-decoration: none; display: inline-block;
}
button.danger, .btn.danger { background: #dc2626; }
button:hover { opacity: .9; }
.login-wrap { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: #f4f5f7; }
.login-box { background: #fff; padding: 32px; border-radius: 8px; width: 320px; box-shadow: 0 2px 8px rgba(0,0,0,.1); }
.login-box h1 { font-size: 16px; margin-bottom: 20px; }
.login-box label { display: block; font-size: 13px; margin-bottom: 4px; margin-top: 12px; }
.login-box input { width: 100%; }
.error { color: #dc2626; font-size: 13px; margin-top: 8px; }
.filters { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
