* { box-sizing: border-box; }
body {
    font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
    margin: 0;
    color: #1f2937;
    background: #f9fafb;
    font-size: 14px;
}
header {
    background: #111827;
    color: #f9fafb;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
header .brand { font-weight: 600; font-size: 16px; }
header nav a {
    color: #d1d5db;
    text-decoration: none;
    margin-right: 16px;
}
header nav a:hover { color: #fff; }
header form { display: inline; }
header button {
    background: transparent;
    color: #d1d5db;
    border: 1px solid #4b5563;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
}
.tabbar {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: 0 24px;
    display: flex;
    gap: 4px;
}
.tabbar .tab {
    display: inline-block;
    padding: 12px 18px;
    color: #6b7280;
    text-decoration: none;
    border-bottom: 3px solid transparent;
    font-size: 14px;
    font-weight: 500;
}
.tabbar .tab:hover { color: #111827; }
.tabbar .tab.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
}
.subtabs {
    display: flex;
    gap: 8px;
    margin: 16px 0 4px;
    flex-wrap: wrap;
}
.subtabs a {
    padding: 6px 14px;
    border-radius: 999px;
    background: #e5e7eb;
    color: #374151;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
}
.subtabs a:hover { background: #d1d5db; }
.subtabs a.active {
    background: #2563eb;
    color: #fff;
}
main { padding: 24px; max-width: 1200px; margin: 0 auto; }
h1 { font-size: 20px; margin-top: 0; }
.banner {
    background: #fef3c7;
    border: 1px solid #fbbf24;
    color: #92400e;
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 13px;
}
.banner-warn {
    background: #fef3c7;
    border-color: #fbbf24;
    color: #92400e;
}
form.filters {
    background: #fff;
    padding: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    margin-bottom: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: end;
}
form.filters label {
    display: flex;
    flex-direction: column;
    font-size: 12px;
    color: #6b7280;
}
form.filters input, form.filters select {
    padding: 6px 8px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 13px;
    min-width: 140px;
}
form.filters button {
    padding: 7px 16px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
form.filters button:hover { background: #1d4ed8; }
form.filters .clear-link {
    font-size: 12px;
    color: #6b7280;
    align-self: center;
    padding-bottom: 4px;
}
form.filters .clear-link:hover { color: #111827; }
table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    overflow: hidden;
}
th, td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #f3f4f6;
    font-size: 13px;
    vertical-align: top;
}
td.cell-preview {
    max-width: 280px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #4b5563;
}
td.cell-preview span { display: block; overflow: hidden; text-overflow: ellipsis; }
th { background: #f3f4f6; font-weight: 600; color: #374151; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #f9fafb; }
a { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline; }
.meta { color: #6b7280; font-size: 12px; }
.pagination { margin: 16px 0; display: flex; gap: 8px; align-items: center; }
.pagination a, .pagination span {
    padding: 6px 10px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: #fff;
}
.pagination .current { background: #2563eb; color: #fff; border-color: #2563eb; }
pre {
    background: #111827;
    color: #f9fafb;
    padding: 14px;
    border-radius: 6px;
    overflow-x: auto;
    font-size: 12px;
    line-height: 1.45;
}
.field { margin-bottom: 12px; }
.field .label { font-size: 12px; color: #6b7280; margin-bottom: 2px; }
.field .value { font-size: 14px; }
.status-ok { color: #059669; font-weight: 600; }
.status-failed { color: #dc2626; font-weight: 600; }
.status-running { color: #d97706; font-weight: 600; }
.status-unknown { color: #6b7280; font-weight: 600; }

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}
.summary-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-left: 4px solid #d1d5db;
    border-radius: 6px;
    padding: 12px 14px;
}
.summary-card.status-ok { border-left-color: #059669; }
.summary-card.status-failed { border-left-color: #dc2626; background: #fef2f2; }
.summary-card.status-running { border-left-color: #d97706; }
.summary-card .card-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
    color: #111827;
}
.summary-card .card-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 8px;
}
.summary-card .card-stats > div {
    display: flex;
    flex-direction: column;
}
.summary-card .stat-label {
    font-size: 11px;
    color: #6b7280;
}
.summary-card .stat-value {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
}
.summary-card .card-meta {
    font-size: 11px;
    color: #6b7280;
    line-height: 1.5;
}
.summary-card .card-error {
    color: #dc2626;
    margin-top: 4px;
}

.attachments-field .label { font-size: 11px; color: #9ca3af; }
.note-muted {
    margin-top: 10px;
    font-size: 11px;
    color: #9ca3af;
    font-style: italic;
}
.note-muted b { color: #6b7280; font-weight: 600; font-style: normal; }
.attachment-link {
    display: inline-block;
    font-size: 12px;
    color: #6b7280;
    text-decoration: none;
    margin-right: 12px;
    margin-bottom: 4px;
}
.attachment-link:hover { color: #2563eb; text-decoration: underline; }
.attachments-list { display: flex; flex-wrap: wrap; }

details.file-section {
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    margin-bottom: 8px;
    background: #fff;
}
details.file-section[open] { background: #f9fafb; }
details.file-section summary {
    cursor: pointer;
    padding: 10px 14px;
    font-size: 13px;
    color: #374151;
    user-select: none;
}
details.file-section summary:hover { background: #f3f4f6; }
details.file-section .file-text {
    padding: 12px 14px;
    margin: 0;
    font-size: 12px;
    background: #fff;
    color: #1f2937;
    max-height: 500px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-word;
    border-top: 1px solid #e5e7eb;
}
.login-box {
    max-width: 360px;
    margin: 80px auto;
    background: #fff;
    padding: 28px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}
.login-box h1 { text-align: center; }
.login-box form { display: flex; flex-direction: column; gap: 12px; }
.login-box input {
    padding: 10px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 14px;
}
.login-box button {
    padding: 10px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}
.error { color: #dc2626; font-size: 13px; }
