/* Lab Ranges layer on top of the shared CDL look (cdl.css, from eTMF). Only what eTMF has no pattern for. */

/* Page heads */
.page-head{display:flex;justify-content:space-between;align-items:flex-end;gap:20px;margin-bottom:6px}
.page-head .actions{margin:0}
p.lead{color:var(--muted);margin:0 0 18px;max-width:880px}
h1 .muted{font-family:-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;font-size:15px}
.panel>h2:first-child,.panel>h3:first-child{margin-top:0}

/* Status badges (eTMF colours: green done, amber needs attention, red failed, grey neutral) */
.badge{white-space:nowrap}
.badge.strong{font-weight:800}

/* Messages */
.flash.info{background:#eef5f8;color:#28475c;border-color:#cfe0e8}
.flash.small{font-size:12px}

/* Buttons: inline text action (eTMF 'ghost' without the box) */
button.link,.button.link{background:none;border:0;padding:0;color:var(--teal-dark);font-weight:600;box-shadow:none;font-size:inherit;line-height:inherit;display:inline}
button.link:hover{background:none;text-decoration:underline}
button.danger.link{color:var(--red)}
.actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin:14px 0}
form.inline{display:inline;margin:0}

/* Forms: eTMF makes inputs full-width blocks; tables, filters and inline forms need them inline */
.fields{display:grid;gap:0 18px;grid-template-columns:repeat(auto-fit,minmax(240px,1fr))}
.fields label{margin:12px 0 0}
label.check{display:inline-flex;gap:8px;align-items:center;font-weight:500;color:var(--ink);font-size:13px;margin:12px 0 0}
label.check input{display:inline-block;width:auto;margin:0}
td input,td select,.filters input,.filters select,form.inline input,form.inline select{display:inline-block;margin-top:0;padding:6px 8px;font-size:12.5px}
td input[type=checkbox],input[type=checkbox],input[type=radio]{display:inline-block;width:auto;margin:0}
td input:not([type=checkbox]),td select{width:100%}
input.col-input{min-width:200px;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:12px}
input[type=file]{padding:8px;background:var(--soft)}
.filters{display:flex;flex-wrap:wrap;gap:10px;align-items:flex-end;margin:0 0 14px}
.filters>div>label,.filters label{margin:0 0 4px}
.filters input,.filters select{width:auto;min-width:120px}

/* Tables */
table{border-collapse:collapse;width:100%;background:#fff}
.table-wrap{background:#fff;border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);margin:0 0 18px}
.table-wrap table{border:0}
th{white-space:nowrap;position:sticky;top:0;background:#fff;z-index:1;text-transform:uppercase}
th,td{padding:9px 10px;vertical-align:top}
td.num,th.num{text-align:right;font-variant-numeric:tabular-nums}
tr.row-off td{opacity:.45}
tr.hl td{background:#fff8ea}
.panel table th{position:static}

/* Text */
.mono,code{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:12px}
code{background:var(--soft);padding:1px 5px;border-radius:4px}
.muted{color:var(--muted)}
.small{font-size:12px}
.json{white-space:pre-wrap;font-family:ui-monospace,Menlo,monospace;font-size:11px;color:var(--muted);max-width:520px}
details summary{cursor:pointer;color:var(--teal-dark)}

/* Overview */
.grid{display:grid;gap:18px;grid-template-columns:repeat(auto-fit,minmax(320px,1fr))}
.grid>.panel{margin:0}
.metrics .metric b{font-variant-numeric:tabular-nums}
.steps{list-style:none;padding:0;margin:0}
.steps li{padding:9px 0;border-bottom:1px solid #edf0ee;display:flex;gap:12px;align-items:center}
.steps li:last-child{border-bottom:0}
.steps .tick{display:grid;place-items:center;width:22px;height:22px;border-radius:50%;font-size:12px;font-weight:800;flex:none}
.steps .done .tick{background:#e4f5ed;color:var(--green)}
.steps .todo .tick{background:#fff1db;color:var(--amber)}
.stat{display:inline-block;margin:0 26px 10px 0}
.stat b{display:block;font-size:24px;font-family:Georgia,"Times New Roman",serif;font-weight:400;color:var(--ink)}
.stat{color:var(--muted);font-size:12px}
.pager{margin:12px 0;display:flex;gap:14px;align-items:center}

/* Environment dot: amber outside production */
.environment-dot.env-test{background:var(--amber)}

/* Login */
.login-form .button{width:100%;margin-top:6px}
.login-form form{margin-top:18px}

@media(max-width:700px){.page-head{flex-direction:column;align-items:flex-start}}

/* Range editor */
.range-editor td{padding:6px 6px;vertical-align:middle}
.range-editor select.w-test{min-width:230px}
.range-editor select.w-sex{min-width:78px}
.range-editor .limit{display:flex;align-items:center;gap:4px}
.range-editor .limit input{width:78px}
.range-editor label.excl{display:inline-flex;align-items:center;gap:2px;margin:0;font-size:11px;color:var(--muted);font-weight:600}
.range-editor label.excl input{margin:0}

/* User guide */
.guide-toc ol{columns:2;margin:8px 0 0;padding-left:20px}
.guide-toc li{margin:0 0 6px;break-inside:avoid}
section.panel[id]{scroll-margin-top:20px}
section.panel h2{margin-top:0}
section.panel li{margin:5px 0}
@media(max-width:800px){.guide-toc ol{columns:1}}
