:root{
    --bg:#f5f6f7;
    --panel:#ffffff;
    --text:#1b1f23;
    --muted:#69727d;
    --border:#dfe3e7;
    --accent:#25384a;
    --accent-soft:#eef2f5;
    --ok:#246b45;
    --warn:#9a5a00;
    --danger:#9a2f2f;
}
*{box-sizing:border-box}
body{
    margin:0;
    font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
    color:var(--text);
    background:var(--bg);
}
a{color:inherit}
.external-link{display:inline-flex;align-items:center;gap:4px;max-width:100%;vertical-align:baseline}
.external-link-label{min-width:0;overflow-wrap:anywhere}
.external-link-icon{width:12px;height:12px;flex:0 0 auto}
.shell{max-width:1100px;margin:0 auto;padding:28px 20px 60px}
.topbar{
    display:flex;align-items:center;justify-content:space-between;
    gap:20px;margin-bottom:28px
}
.brand{font-weight:750;letter-spacing:.01em}
.muted{color:var(--muted)}
.panel{
    background:var(--panel);border:1px solid var(--border);
    border-radius:14px;padding:22px;margin-bottom:18px
}
h1{font-size:30px;margin:0 0 8px}
h2{font-size:20px;margin:0 0 14px}
label{display:block;font-weight:650;margin-bottom:8px}
input,select,textarea{
    width:100%;padding:12px 13px;border:1px solid #cfd5da;
    border-radius:9px;font:inherit;background:#fff
}
button,.btn{
    display:inline-block;border:0;border-radius:9px;padding:11px 16px;
    background:var(--accent);color:#fff;text-decoration:none;font-weight:700;
    cursor:pointer
}
.btn.secondary{background:#fff;color:var(--accent);border:1px solid var(--border)}
.actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
@media(max-width:760px){.grid{grid-template-columns:1fr}}
table{width:100%;border-collapse:collapse}
th,td{text-align:left;padding:12px 10px;border-bottom:1px solid var(--border);vertical-align:top}
th{font-size:13px;color:var(--muted);font-weight:700}
.badge{
    display:inline-block;padding:5px 9px;border-radius:999px;
    font-size:12px;font-weight:750;background:var(--accent-soft)
}
.notice{
    padding:12px 14px;border-radius:9px;margin-bottom:16px;
    background:#eef5ef;border:1px solid #cfe2d4
}
.error{
    padding:12px 14px;border-radius:9px;margin-bottom:16px;
    background:#fff1f1;border:1px solid #f0cccc;color:#7d2222
}
.login-wrap{max-width:460px;margin:70px auto;padding:0 20px}
.small{font-size:13px}

.company-heading{display:flex;justify-content:space-between;gap:18px;align-items:flex-start;flex-wrap:wrap}
.domain-row{display:flex;gap:10px;align-items:center;flex-wrap:wrap;color:var(--muted)}
.domain-row a{word-break:break-all}
.copy-link{border:0;background:transparent;color:var(--accent);padding:0;font:inherit;font-weight:700;cursor:pointer}
.copy-button{padding:6px 10px;font-size:12px}
.timeline-list{display:grid;gap:10px;margin-top:16px}
.timeline-item{border:1px solid var(--border);border-radius:10px;padding:12px;background:#fff}
.timeline-item.is-done{opacity:.62;background:#f6f7f8}
.btn.danger{background:var(--danger)}
.danger-zone{border-color:#e8c5c5}
code{background:#f1f3f5;border-radius:5px;padding:2px 5px;font-size:.92em}
@media(max-width:760px){.topbar{align-items:flex-start;flex-direction:column}.actions{width:100%}}

/* Cockpit navigation / Dashboard V0.10.2 */
.cockpit-header{margin-bottom:28px;display:grid;gap:14px}
.cockpit-header-main{display:flex;align-items:center;justify-content:space-between;gap:18px;flex-wrap:wrap}
.cockpit-brand{display:flex;flex-direction:column;gap:2px;text-decoration:none;font-weight:800;font-size:18px;line-height:1.15}
.cockpit-brand small{font-size:12px;color:var(--muted);font-weight:600}
.cockpit-nav{display:flex;align-items:center;gap:6px;flex-wrap:wrap;padding:6px;background:#eef1f3;border:1px solid var(--border);border-radius:12px}
.cockpit-nav-link,.cockpit-user-link,.cockpit-logout{display:inline-flex;align-items:center;min-height:38px;padding:8px 12px;border-radius:8px;text-decoration:none;font-weight:700;font-size:14px;color:var(--accent);background:transparent;border:0;cursor:pointer}
.cockpit-nav-link:hover,.cockpit-user-link:hover,.cockpit-logout:hover{background:#fff}
.cockpit-nav-link.is-active{background:#fff;box-shadow:0 1px 2px rgba(0,0,0,.05)}
.cockpit-nav-spacer{flex:1 1 20px}
.inline-form{display:inline;margin:0}
.debug-badge{display:inline-flex;align-items:center;padding:5px 9px;border-radius:999px;background:#fff4d9;color:#7a4a00;font-size:12px;font-weight:800;border:1px solid #eed49b}
.dashboard-hero{display:flex;justify-content:space-between;gap:24px;align-items:flex-end;margin:4px 0 20px}
.dashboard-hero h1{font-size:34px;margin-bottom:8px}
.dashboard-hero p{max-width:720px;margin:0;line-height:1.55}
.eyebrow{text-transform:uppercase;letter-spacing:.08em;font-size:12px;font-weight:800;color:var(--muted);margin-bottom:8px}
.summary-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:18px}
.summary-card{background:#fff;border:1px solid var(--border);border-radius:12px;padding:16px 18px;display:grid;gap:4px}
.summary-card strong{font-size:28px;line-height:1}
.summary-card span{font-size:13px;color:var(--muted)}
.section-heading{display:flex;justify-content:space-between;gap:18px;align-items:flex-start;flex-wrap:wrap;margin-bottom:16px}
.section-heading h2{margin-bottom:5px}
.section-heading p{margin:0}
.count-pill{display:inline-flex;min-width:30px;height:30px;align-items:center;justify-content:center;border-radius:999px;background:var(--accent-soft);font-weight:800}
.worklist{display:grid;gap:10px}
.work-item{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:18px;align-items:center;border:1px solid var(--border);border-radius:12px;padding:16px 18px;background:#fff}
.work-item:hover{border-color:#c9d0d6}
.work-item-kicker{font-size:13px;font-weight:800;color:var(--accent);margin-bottom:5px}
.work-item h3{font-size:19px;margin:0 0 6px}
.work-item h3 a{text-decoration:none}
.work-item h3 a:hover{text-decoration:underline}
.work-item p{margin:0;color:#454d55;line-height:1.45}
.work-item-meta{display:flex;gap:10px;flex-wrap:wrap;margin-top:9px;color:var(--muted);font-size:12px}
.work-item-meta a{color:var(--accent)}
.work-item-action{display:flex;align-items:center;gap:10px;justify-content:flex-end;flex-wrap:wrap;min-width:180px}
.workflow-action-form{display:inline-flex}
.waiting-pill{display:inline-flex;padding:7px 10px;border-radius:999px;background:#edf4f8;color:#34566d;font-size:12px;font-weight:800}
.text-link{font-weight:700;color:var(--accent);text-decoration:none}
.text-link:hover{text-decoration:underline}
.empty-state{display:grid;gap:6px;padding:24px;border:1px dashed var(--border);border-radius:12px;background:#fafbfb;color:var(--muted)}
.empty-state strong{color:var(--text)}
.recent-list{display:grid;gap:0}
.recent-item{display:flex;justify-content:space-between;gap:18px;align-items:center;padding:12px 2px;border-bottom:1px solid var(--border);text-decoration:none}
.recent-item:last-child{border-bottom:0}
.recent-item span:first-child{display:grid;gap:2px}
.recent-item small{color:var(--muted)}
.recent-item:hover strong{text-decoration:underline}
.debug-panel{border-style:dashed;background:#fffdf7}
.debug-panel summary{cursor:pointer;font-weight:800}
.debug-content{margin-top:16px}
.settings-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.settings-group-title{font-size:15px;margin:26px 0 10px}
.settings-card{display:block;text-decoration:none;background:#fff;border:1px solid var(--border);border-radius:12px;padding:18px}
.settings-card:hover{border-color:#bfc8d0;box-shadow:0 2px 8px rgba(0,0,0,.03)}
.settings-card strong{display:block;font-size:17px;margin-bottom:5px}
.settings-card span{display:block;color:var(--muted);line-height:1.45}
.data-toolbar{display:flex;justify-content:space-between;gap:12px;align-items:center;flex-wrap:wrap;margin-bottom:16px}
.data-toolbar .actions{margin-left:auto}
.stage-pill{display:inline-flex;padding:5px 9px;border-radius:999px;background:var(--accent-soft);font-size:12px;font-weight:800}
.preview-note{background:#f7fbf8;border:1px solid #cfe2d4;border-radius:10px;padding:12px 14px;margin-bottom:16px}
.preview-finding{border:1px solid var(--border);border-radius:14px;padding:18px;margin-bottom:14px;background:#fff}
.preview-finding h2{margin-bottom:8px}
.preview-finding .preview-label{font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.05em;color:var(--muted);margin-top:14px;margin-bottom:5px}
.preview-evidence{margin-top:14px;border:1px solid var(--border);border-radius:10px;padding:12px;background:#fafbfb}
.preview-evidence img{width:100%;max-height:440px;object-fit:contain;object-position:left top;border-radius:8px;border:1px solid var(--border);background:#fff}
@media(max-width:900px){.summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.work-item{grid-template-columns:1fr}.work-item-action{justify-content:flex-start;min-width:0}.settings-grid{grid-template-columns:1fr}}
@media(max-width:620px){.summary-grid{grid-template-columns:1fr}.dashboard-hero{align-items:flex-start;flex-direction:column}.cockpit-header-main{align-items:flex-start}.cockpit-create{width:100%;text-align:center}.cockpit-nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%}.cockpit-nav-spacer{display:none}.cockpit-nav-link,.cockpit-user-link,.cockpit-logout{justify-content:center}.recent-item{align-items:flex-start;flex-direction:column;gap:5px}}

/* Reversible manual completion for exceptional workflow steps */
.btn.compact{padding:8px 11px;font-size:12px}
.manual-workflow-form{display:inline-flex}
.stage-manual_done{opacity:.82}
