/* QA Test Tracker — stylesheet */

:root {
    --bg: #F5F6F8;
    --surface: #FFFFFF;
    --border: #E1E4EA;
    --text: #14181F;
    --text-muted: #5B6472;
    --accent: #3454D1;
    --accent-hover: #2A44B0;
    --pass: #1F9D55;
    --fail: #D64545;
    --blocked: #C98A1F;
    --not-run: #8A93A6;
    --radius: 6px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 15px;
    line-height: 1.5;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
    display: flex;
    align-items: center;
    gap: 28px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 14px 28px;
}

.brand {
    font-weight: 700;
    font-size: 17px;
    color: var(--text);
}
.brand:hover { text-decoration: none; }

.topnav { display: flex; gap: 20px; flex: 1; }
.topnav a { color: var(--text-muted); font-weight: 500; }
.topnav a:hover { color: var(--text); text-decoration: none; }

.topbar-user { display: flex; align-items: center; gap: 14px; }
.who { color: var(--text-muted); font-size: 14px; }
a.who:hover { color: var(--text); text-decoration: none; }
.role-tag {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1px 6px;
    margin-left: 4px;
    color: var(--text-muted);
}
.logout-link { color: var(--text-muted); font-size: 14px; }

.container {
    max-width: 980px;
    margin: 0 auto;
    padding: 32px 28px 64px;
}

h1 { font-size: 24px; margin: 0 0 6px; }
h2 { font-size: 18px; margin: 0 0 12px; }
p.subtitle { color: var(--text-muted); margin: 0 0 28px; }

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

/* Buttons */
.btn {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    padding: 9px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}
.btn:hover { background: var(--accent-hover); text-decoration: none; }
.btn-secondary {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--bg); }
.btn-danger { background: var(--fail); }
.btn-danger:hover { background: #B93838; }
.btn-sm { padding: 5px 10px; font-size: 13px; }

/* Forms */
.field { margin-bottom: 16px; }
.field label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 6px;
}
.field .hint { color: var(--text-muted); font-size: 12px; margin-top: 4px; }
input[type="text"],
input[type="password"],
select,
textarea {
    width: 100%;
    padding: 9px 11px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 14px;
    background: var(--surface);
    color: var(--text);
}
textarea { resize: vertical; min-height: 90px; }
input:focus, select:focus, textarea:focus {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
}
.card + .card { margin-top: 16px; }

.checkbox-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 14px;
    background: var(--bg);
}
.checkbox-row { display: flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 400; cursor: pointer; }
.checkbox-row input { width: auto; }
.card-narrow { max-width: 380px; margin: 60px auto; }

/* Table */
table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); font-size: 14px; vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.03em; color: var(--text-muted); font-weight: 600; background: var(--bg); }
tr:last-child td { border-bottom: none; }
td.case-title { font-weight: 600; }
td.case-meta { color: var(--text-muted); font-size: 13px; }

/* Badges */
.badge {
    display: inline-block;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    font-weight: 500;
    padding: 3px 9px;
    border-radius: 4px;
    white-space: nowrap;
}
.badge-pass { background: #E6F6ED; color: var(--pass); }
.badge-fail { background: #FBEAEA; color: var(--fail); }
.badge-blocked { background: #FBF1DF; color: var(--blocked); }
.badge-not_run { background: #EEF0F3; color: var(--not-run); }
.badge + .badge { margin-left: 6px; }

/* Filters */
.filters { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.filters a {
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 13px;
    color: var(--text-muted);
}
.filters a:hover { text-decoration: none; border-color: var(--accent); color: var(--accent); }
.filters a.active { background: var(--text); color: #fff; border-color: var(--text); }

/* Notices */
.notice { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 20px; font-size: 14px; }
.notice-error { background: #FBEAEA; color: #8A2A2A; border: 1px solid #F1C6C6; }
.notice-success { background: #E6F6ED; color: #146536; border: 1px solid #BEE6CD; }

/* Run history */
.run-entry {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    margin-bottom: 10px;
}
.run-entry-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.run-entry-meta { color: var(--text-muted); font-size: 13px; }
.run-entry p { margin: 0; }

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.status-form { display: flex; gap: 10px; flex-wrap: wrap; }
.status-form button { flex: 0 0 auto; }
.status-pass-btn { background: var(--pass); }
.status-pass-btn:hover { background: #178048; }
.status-fail-btn { background: var(--fail); }
.status-fail-btn:hover { background: #B93838; }
.status-blocked-btn { background: var(--blocked); }
.status-blocked-btn:hover { background: #A6740F; }

.section-divider { border: none; border-top: 1px solid var(--border); margin: 28px 0; }

.text-muted { color: var(--text-muted); }
.mt-0 { margin-top: 0; }
