/* NG-Bot beheer-app — 1:1 with design/Beheer-app.dc.html (all values taken from the design). */
body { margin: 0; font-family: 'IBM Plex Sans', Helvetica, Arial, sans-serif; color: #1d1c1a; background: #f7f6f3; }
a { color: #2f5aa8; text-decoration: none; cursor: pointer; }
a:hover { color: #1d3f7d; text-decoration: underline; }
* { box-sizing: border-box; }
.mono { font-family: 'IBM Plex Mono', monospace; }
button { font-family: 'IBM Plex Sans', sans-serif; }
button:disabled { opacity: .45; cursor: not-allowed; }

/* ---- shell -------------------------------------------------------------------------------------- */
.shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; font-size: 14px; line-height: 1.5; }
.side { background: #efede8; border-right: 1px solid #e4e1db; padding: 20px 12px; display: flex; flex-direction: column; gap: 22px;
    position: sticky; top: 0; height: 100vh; overflow-y: auto; align-self: start; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; }
.brand-mark { width: 28px; height: 28px; border-radius: 6px; background: #1d1c1a; color: #fff; display: grid; place-items: center;
    font: 600 13px 'IBM Plex Mono', monospace; }
.brand-text { display: flex; flex-direction: column; }
.brand-text b { font-weight: 600; font-size: 14px; }
.brand-text span { font-size: 12px; color: #6b6862; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-title { font-size: 11.5px; color: #6b6862; padding: 0 10px 4px; letter-spacing: 0.04em; text-transform: uppercase; }
.nav a { display: flex; justify-content: space-between; align-items: center; padding: 7px 10px; border-radius: 5px; cursor: pointer;
    background: transparent; color: #1d1c1a; font-weight: 400; text-decoration: none; }
.nav a:hover { background: #e4e1db; color: #1d1c1a; text-decoration: none; }
.nav a.active { background: #e4e1db; font-weight: 600; }
.nav-count { font: 500 12px 'IBM Plex Mono', monospace; color: #6b6862; }
.nav-count.alert { color: #9b2c1f; }
.side-user { margin-top: auto; padding: 12px 10px 0; border-top: 1px solid #e4e1db; display: flex; flex-direction: column; gap: 2px; }
.side-user b { font-weight: 500; }
.side-user span { font-size: 12px; color: #6b6862; }
.side-user form { display: inline; }
.side-user button { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; }
.side-user button:hover { text-decoration: underline; }
.main { padding: 28px 36px 48px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }

/* ---- page structure ----------------------------------------------------------------------------- */
.page { display: flex; flex-direction: column; gap: 18px; }
.page.overview { gap: 24px; }
.page.detail { gap: 20px; }
.page.narrow { max-width: 880px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.page-head h1, h1.title { margin: 0; font-size: 24px; font-weight: 600; }
.page-head p { margin: 2px 0 0; color: #6b6862; }
.actions { display: flex; gap: 8px; }
.card { background: #fff; border: 1px solid #e4e1db; border-radius: 6px; }
.card-head { padding: 14px 18px; border-bottom: 1px solid #e4e1db; display: flex; justify-content: space-between; gap: 10px; }
.card-head h2, h2.section { margin: 0; font-size: 15px; font-weight: 600; }
.muted { color: #6b6862; }
.small-muted { font-size: 12.5px; color: #6b6862; }
.empty { padding: 14px 18px; color: #6b6862; font-size: 13px; }

/* ---- buttons ------------------------------------------------------------------------------------ */
.btn { background: #fff; border: 1px solid #d6d2ca; color: #1d1c1a; border-radius: 5px; padding: 8px 14px; font: 500 13px 'IBM Plex Sans', sans-serif; cursor: pointer; }
.btn-primary { background: #1d1c1a; color: #fff; border: 0; border-radius: 5px; padding: 9px 16px; font: 500 13px 'IBM Plex Sans', sans-serif; cursor: pointer; }
.btn-primary.sm { padding: 8px 16px; }
.btn-danger { background: #fff; border: 1px solid #e1b4ad; color: #9b2c1f; border-radius: 5px; padding: 8px 14px; font: 500 13px 'IBM Plex Sans', sans-serif; cursor: pointer; }
.btn-sm { background: #fff; border: 1px solid #d6d2ca; color: #1d1c1a; border-radius: 5px; padding: 6px 12px; font: 500 13px 'IBM Plex Sans', sans-serif; cursor: pointer; }
.btn-link { background: none; border: 0; color: #2f5aa8; font: 500 13px 'IBM Plex Sans', sans-serif; cursor: pointer; padding: 0; }
.btn-ghost { background: none; border: 0; color: #6b6862; font: 500 13px 'IBM Plex Sans', sans-serif; cursor: pointer; }
.menu { position: relative; }
.menu-list { position: absolute; right: 0; top: calc(100% + 4px); background: #fff; border: 1px solid #d6d2ca; border-radius: 5px;
    box-shadow: 0 4px 16px rgba(29, 28, 26, .08); z-index: 10; min-width: 200px; padding: 4px; display: flex; flex-direction: column; }
.menu-list button { background: none; border: 0; text-align: left; padding: 7px 10px; border-radius: 4px; font: 400 13px 'IBM Plex Sans', sans-serif; cursor: pointer; color: #1d1c1a; }
.menu-list button:hover:not(:disabled) { background: #efede8; }

/* ---- pills, dots, alerts ------------------------------------------------------------------------ */
.pill { font-size: 12px; font-weight: 500; padding: 2px 8px; border-radius: 10px; white-space: nowrap; }
.st-queued, .st-cancelled { background: #efede8; color: #4a4843; }
.st-analyzing, .st-implementing { background: #e6edf8; color: #1f4a8f; }
.st-awaitingapproval { background: #fbf0d9; color: #7a5200; }
.st-pullrequestopen, .st-done { background: #e3f1e7; color: #1f6b3a; }
.st-failed { background: #f9e3e0; color: #9b2c1f; }
.st-releasing { background: #ece6f6; color: #553a8f; }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex: none; }
.dot-ok { background: #2e8b57; } .dot-fail { background: #c0392b; } .dot-warn { background: #d9a21b; } .dot-none { background: #b9b4aa; }
.fg-ok { color: #1f6b3a; } .fg-fail { color: #9b2c1f; } .fg-warn { color: #7a5200; } .fg-none { color: #6b6862; }
.limit-banner { background: #fbf0d9; border: 1px solid #efd9a8; color: #5c3d00; border-radius: 6px; padding: 12px 16px; display: flex;
    justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.limit-banner strong { font-weight: 600; }
.limit-banner a { color: #5c3d00; text-decoration: underline; }
.notice { background: #faf9f7; border: 1px solid #e4e1db; border-radius: 5px; padding: 10px 12px; font-size: 13px; color: #4a4843; }
.notice.error { background: #f9e3e0; border-color: #e1b4ad; color: #9b2c1f; }
.notice.ok { background: #e3f1e7; border-color: #bcdcc6; color: #1f6b3a; }

/* ---- overview ----------------------------------------------------------------------------------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.stat { background: #fff; border: 1px solid #e4e1db; border-radius: 6px; padding: 16px 18px; cursor: pointer; display: flex; flex-direction: column;
    gap: 4px; color: inherit; text-decoration: none; }
.stat:hover { border-color: #b9b4aa; color: inherit; text-decoration: none; }
.stat span:first-child { color: #6b6862; font-size: 13px; }
.stat-value { font-size: 30px; font-weight: 600; line-height: 1.1; }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 16px; align-items: start; }
.run-row { padding: 12px 18px; border-bottom: 1px solid #efede8; display: grid; grid-template-columns: 88px minmax(0, 1fr) auto; gap: 12px;
    align-items: center; cursor: pointer; color: inherit; text-decoration: none; }
.run-row:hover { background: #faf9f7; color: inherit; text-decoration: none; }
.run-id { font: 500 13px 'IBM Plex Mono', monospace; }
.run-main { display: flex; flex-direction: column; min-width: 0; }
.run-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.run-sub { font-size: 12.5px; color: #6b6862; }
.conn-strip { padding: 14px 18px; border-top: 1px solid #e4e1db; }
.conn-strip h2 { margin: 0 0 10px; font-size: 15px; font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: flex; align-items: center; gap: 6px; border: 1px solid #e4e1db; border-radius: 14px; padding: 3px 10px; font-size: 12.5px; }

/* ---- runs list ---------------------------------------------------------------------------------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.search { background: #fff; border: 1px solid #d6d2ca; border-radius: 5px; padding: 7px 12px; min-width: 240px; font: 400 14px/1.5 'IBM Plex Sans', sans-serif; color: #1d1c1a; outline: none; }
.search::placeholder { color: #8a867e; }
.filter { border: 1px solid #d6d2ca; background: #fff; color: #1d1c1a; border-radius: 14px; padding: 5px 12px; font: 500 13px 'IBM Plex Sans', sans-serif; cursor: pointer; }
.filter.on { border-color: #1d1c1a; background: #1d1c1a; color: #fff; }
.dropdown { background: #fff; border: 1px solid #d6d2ca; border-radius: 5px; padding: 6px 12px; font: 400 14px/1.5 'IBM Plex Sans', sans-serif; color: #1d1c1a;
    cursor: pointer; }
.dropdown-wrap { position: relative; }
.setting-dropdown .dropdown { width: 100%; text-align: left; font: 13px 'IBM Plex Mono', monospace; padding: 7px 11px; }
.setting-dropdown .menu-list { width: 100%; }
.dropdown-wrap .menu-list { left: 0; right: auto; }
.menu-list button.on { font-weight: 600; }
.toolbar .push { margin-left: auto; }
.table-wrap { background: #fff; border: 1px solid #e4e1db; border-radius: 6px; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table thead tr { text-align: left; color: #6b6862; font-size: 12.5px; }
.table th { padding: 10px 16px; font-weight: 500; border-bottom: 1px solid #e4e1db; }
.table td { padding: 12px 16px; border-bottom: 1px solid #efede8; }
.table.runs td { padding: 11px 16px; }
.table tr.click { cursor: pointer; }
.table tr.click:hover { background: #faf9f7; }
.td-mono { font: 500 13px 'IBM Plex Mono', monospace; }
.td-code { font: 13px 'IBM Plex Mono', monospace; }
.td-soft { color: #4a4843; }
.td-strong { font-weight: 500; }
.td-sub { display: block; font-size: 11.5px; font-weight: 400; color: #8a857c; margin-top: 2px; }
.td-right { text-align: right; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.row-actions { position: relative; }
.row-delete { position: absolute; right: 0; top: 50%; transform: translateY(-50%); background: none; border: 0; color: #8a867e; cursor: pointer;
    font: 400 15px 'IBM Plex Sans', sans-serif; padding: 0 3px; visibility: hidden; }
tr:hover .row-delete { visibility: visible; }
.row-delete:hover { color: #9b2c1f; }

/* ---- run detail --------------------------------------------------------------------------------- */
.back { font-size: 13px; }
.detail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.detail-head-main { display: flex; flex-direction: column; gap: 6px; }
.detail-id-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.detail-id { font: 500 15px 'IBM Plex Mono', monospace; color: #6b6862; }
.detail-head h1 { margin: 0; font-size: 24px; font-weight: 600; text-wrap: pretty; }
.detail-meta { display: flex; gap: 16px; flex-wrap: wrap; color: #6b6862; font-size: 13px; }
.detail-meta .branch { font-family: 'IBM Plex Mono', monospace; color: #1d1c1a; }
.phases { background: #fff; border: 1px solid #e4e1db; border-radius: 6px; padding: 16px 18px; display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.phase { display: flex; flex-direction: column; gap: 6px; }
.phase-bar { height: 4px; border-radius: 2px; background: #e4e1db; }
.phase.done .phase-bar { background: #1d1c1a; } .phase.current .phase-bar { background: #2f5aa8; }
.phase-label { font-weight: 400; color: #8a867e; }
.phase.done .phase-label { color: #1d1c1a; } .phase.current .phase-label { color: #1d1c1a; font-weight: 600; }
.phase-meta { font-size: 12.5px; color: #6b6862; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid #e4e1db; padding: 0 12px; }
.tab { background: none; border: 0; border-bottom: 2px solid transparent; padding: 12px 8px 10px; font: 500 13.5px 'IBM Plex Sans', sans-serif; color: #6b6862; cursor: pointer; }
.tab.on { border-bottom-color: #1d1c1a; color: #1d1c1a; }
.log { padding: 10px 0; font: 12.5px/1.7 'IBM Plex Mono', monospace; background: #1d1c1a; color: #e9e6e0; border-radius: 0 0 6px 6px; min-height: 360px;
    max-height: 640px; overflow-y: auto; }
.log-head { padding: 4px 16px 8px; color: #9e9a92; display: flex; justify-content: space-between; }
.log-live { color: #8fd19e; }
.log-line { display: grid; grid-template-columns: 72px 64px minmax(0, 1fr); gap: 10px; padding: 1px 16px; }
.log-line .t { color: #8a867e; }
.log-line .x { white-space: pre-wrap; word-break: break-word; }
.k-status { color: #8fd19e; } .k-git { color: #c9b8f0; } .k-read { color: #9ec3f0; } .k-edit { color: #f0d49e; } .k-bash { color: #e9e6e0; }
.k-claude { color: #e9e6e0; } .k-error { color: #f0a79e; } .k-asana { color: #9ec3f0; } .k-router { color: #c9b8f0; } .k-log { color: #8a867e; }
.plan { padding: 20px 24px; display: flex; flex-direction: column; gap: 12px; max-width: 760px; }
.plan h3 { margin: 0; font-size: 15px; font-weight: 600; }
.plan p { margin: 0; }
.plan ol, .plan ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.plan code { font-family: 'IBM Plex Mono', monospace; font-size: 13px; }
.plan pre { margin: 0; font: 12.5px/1.6 'IBM Plex Mono', monospace; background: #faf9f7; border: 1px solid #e4e1db; border-radius: 5px; padding: 10px 12px; white-space: pre-wrap; }
.files { padding: 8px 0; }
.file-row { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 10px; padding: 9px 20px; border-bottom: 1px solid #efede8; align-items: center; }
.file-s { font: 600 12px 'IBM Plex Mono', monospace; color: #7a5200; }
.file-s.A { color: #1f6b3a; } .file-s.D { color: #9b2c1f; }
.file-path { font: 13px 'IBM Plex Mono', monospace; overflow: hidden; text-overflow: ellipsis; }
.file-n { font: 12.5px 'IBM Plex Mono', monospace; }
.add { color: #1f6b3a; } .del { color: #9b2c1f; }
.files-note { margin: 0; padding: 14px 20px; color: #6b6862; font-size: 13px; }
.chat { padding: 16px 20px; display: flex; flex-direction: column; gap: 12px; }
.msg { display: flex; flex-direction: column; gap: 3px; padding: 10px 14px; border-radius: 6px; background: #fff; border: 1px solid #e4e1db; max-width: 620px;
    align-self: flex-start; }
.msg.bot { background: #f5f3ef; align-self: flex-end; }
.msg-meta { font-size: 12.5px; color: #6b6862; }
.msg-meta strong { color: #1d1c1a; font-weight: 600; }
.msg-text { white-space: pre-wrap; }
.decision { padding: 11px 16px; border-bottom: 1px solid #efede8; display: flex; flex-direction: column; gap: 3px; }
.decision-top { display: flex; justify-content: space-between; gap: 8px; }
.decision-intent { font: 500 12.5px 'IBM Plex Mono', monospace; }
.decision-when { font-size: 12px; color: #6b6862; }
.decision-text { font-size: 13px; color: #4a4843; }
.facts { padding: 12px 16px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: #4a4843; }
.facts .mono { font-size: 12px; }
.card-head.side-head { padding: 14px 16px; }

/* ---- forms & wizard ----------------------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 5px; max-width: 440px; }
.field.wide { max-width: none; }
.field > span:first-child { font-size: 13px; font-weight: 500; }
.field .hint { font-size: 12.5px; color: #6b6862; }
.input { border: 1px solid #d6d2ca; border-radius: 5px; padding: 8px 12px; font: 400 14px/1.5 'IBM Plex Sans', sans-serif; color: #1d1c1a; background: #fff;
    outline: none; width: 100%; }
.input:focus, .input.focus { border-color: #2f5aa8; box-shadow: 0 0 0 3px #e6edf8; }
.input.code { font-family: 'IBM Plex Mono', monospace; font-size: 13px; }
select.input { appearance: none; -webkit-appearance: none; cursor: pointer;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%231d1c1a'/%3E%3C/svg%3E") no-repeat right 12px center; padding-right: 30px; }
.wizard { background: #fff; border: 1px solid #b9b4aa; border-radius: 6px; display: grid; grid-template-columns: 220px minmax(0, 1fr); }
.steps { border-right: 1px solid #e4e1db; padding: 18px 0; display: flex; flex-direction: column; gap: 2px; background: #faf9f7; border-radius: 6px 0 0 6px; }
.step { display: flex; gap: 10px; align-items: center; padding: 8px 18px; cursor: pointer; font-weight: 400; color: #8a867e; }
.step.past, .step.on { color: #1d1c1a; }
.step.on { font-weight: 600; }
.step-dot { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font: 500 12px 'IBM Plex Mono', monospace; background: #e4e1db; color: #6b6862; }
.step.past .step-dot { background: #1d1c1a; color: #fff; }
.step.on .step-dot { background: #2f5aa8; color: #fff; }
.wizard-body { padding: 22px 26px; display: flex; flex-direction: column; gap: 16px; min-height: 300px; }
.wizard-body h2 { margin: 0; font-size: 17px; font-weight: 600; }
.wizard-step { display: flex; flex-direction: column; gap: 14px; }
.wizard-lead { margin: 0; color: #4a4843; max-width: 560px; }
.wizard-foot { margin-top: auto; display: flex; justify-content: space-between; gap: 8px; }
.option-list { display: flex; flex-direction: column; gap: 6px; max-width: 440px; }
.option { border: 1px solid #d6d2ca; background: #fff; border-radius: 5px; padding: 9px 12px; display: flex; justify-content: space-between; cursor: pointer;
    font: 400 14px 'IBM Plex Sans', sans-serif; color: #1d1c1a; text-align: left; }
.option.on { border-color: #2f5aa8; background: #f2f5fb; }
.option .sample { font: 12.5px 'IBM Plex Mono', monospace; color: #6b6862; }
.callers { border: 1px solid #e4e1db; border-radius: 5px; max-width: 560px; max-height: 320px; overflow-y: auto; }
.callers-row { display: grid; grid-template-columns: minmax(0, 1fr) 80px 80px; padding: 8px 12px; border-bottom: 1px solid #efede8; align-items: center; }
.callers-row.head { font-size: 12.5px; color: #6b6862; border-bottom: 1px solid #e4e1db; position: sticky; top: 0; background: #fff; }
.check { width: 16px; height: 16px; accent-color: #1d1c1a; cursor: pointer; }
.wh { display: flex; align-items: center; gap: 6px; }

/* ---- repo instructions -------------------------------------------------------------------------- */
.repo-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 16px; align-items: start; }
.repo-list { background: #fff; border: 1px solid #e4e1db; border-radius: 6px; padding: 6px; }
.repo-item { padding: 8px 10px; border-radius: 4px; cursor: pointer; background: transparent; display: flex; flex-direction: column; }
.repo-item:hover { background: #efede8; }
.repo-item.on { background: #efede8; }
.repo-item b { font: 500 13px 'IBM Plex Mono', monospace; }
.repo-item span { font-size: 12px; color: #6b6862; }
.repo-right { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.md-docs { background: #fff; border: 1px solid #e4e1db; border-radius: 6px; }
.md-doc { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 16px; }
.md-doc + .md-doc { border-top: 1px solid #efede8; }
.md-doc-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.md-doc-main b { font-weight: 600; }
.md-doc-main span { font-size: 12.5px; color: #6b6862; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.md-body { font: 12.5px/1.65 'IBM Plex Mono', monospace; white-space: pre-wrap; color: #1d1c1a; }

/* ---- dialog ------------------------------------------------------------------------------------- */
.dialog-backdrop { position: fixed; inset: 0; background: rgba(29, 28, 26, .38); display: flex; align-items: center; justify-content: center;
    padding: 24px; z-index: 50; }
.dialog { background: #fff; border-radius: 8px; box-shadow: 0 12px 40px rgba(0, 0, 0, .18); width: min(920px, 100%); max-height: calc(100vh - 48px);
    display: flex; flex-direction: column; }
.dialog-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 14px 18px; border-bottom: 1px solid #e4e1db; }
.dialog-head div { display: flex; flex-direction: column; gap: 2px; }
.dialog-head b { font-weight: 600; font-size: 15px; }
.dialog-head span { font-size: 12.5px; color: #6b6862; }
.dialog-close { background: none; border: 0; font-size: 20px; line-height: 1; color: #6b6862; cursor: pointer; padding: 2px 6px; border-radius: 4px; }
.dialog-close:hover { background: #efede8; color: #1d1c1a; }
.dialog-body { flex: 1; min-height: 360px; overflow: auto; padding: 14px 18px; }
textarea.dialog-body { border: 0; outline: none; resize: none; width: 100%; background: transparent; }
div.dialog-body { background: #faf9f7; color: #4a4843; }
.dialog-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 18px; border-top: 1px solid #e4e1db; }
.repo-fields { background: #fff; border: 1px solid #e4e1db; border-radius: 6px; padding: 18px; display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.repo-fields .field { max-width: none; }
.value-box { border: 1px solid #d6d2ca; border-radius: 5px; padding: 7px 11px; font: 13px 'IBM Plex Mono', monospace; color: #1d1c1a; background: #fff;
    width: 100%; outline: none; }
textarea.value-box.wrap-box { resize: none; overflow: hidden; display: block; word-break: break-all; }
.value-box:focus { border-color: #2f5aa8; box-shadow: 0 0 0 3px #e6edf8; }
.unit-box { display: flex; align-items: center; cursor: text; }
.unit-box.focus { border-color: #2f5aa8; box-shadow: 0 0 0 3px #e6edf8; }
.unit-box input { border: 0; outline: none; padding: 0; margin: 0; font: inherit; color: inherit; background: transparent; -moz-appearance: textfield; min-width: 1ch; }
.unit-box input::-webkit-outer-spin-button, .unit-box input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.unit-box input::placeholder { color: #8a867e; }
.value-unit { position: relative; }
.value-unit .value-box { padding-right: 70px; }
.value-unit .unit { position: absolute; right: 11px; top: 50%; transform: translateY(-50%); font: 13px 'IBM Plex Mono', monospace; color: #1d1c1a; pointer-events: none; }
.value-unit.prefix .value-box { padding-left: 40px; padding-right: 11px; }
.value-unit.prefix .unit { left: 11px; right: auto; }
.tools { display: flex; flex-wrap: wrap; gap: 6px; }
.tool { border: 1px solid #d6d2ca; border-radius: 4px; padding: 2px 8px; font: 12.5px 'IBM Plex Mono', monospace; background: #faf9f7; display: inline-flex; gap: 6px; align-items: center; }
.tool button { background: none; border: 0; padding: 0; color: #8a867e; cursor: pointer; font: inherit; display: none; }
.tool:hover button { display: inline; }
.tool-add { border: 1px dashed #d6d2ca; border-radius: 4px; padding: 2px 8px; font: 12.5px 'IBM Plex Mono', monospace; background: #fff; width: 30px; outline: none; }
.tool-add::placeholder { color: #8a867e; text-align: center; }
.tools .tool-add { display: none; }
.tools:hover .tool-add, .tools .tool-add:focus, .tools .tool-add:not(:placeholder-shown) { display: inline-block; }
.tool-add:focus { width: 220px; border-style: solid; }
.tool-add:focus::placeholder { color: transparent; }

/* ---- connections -------------------------------------------------------------------------------- */
.conn-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; }
.conn { display: flex; flex-direction: column; }
.conn-head { padding: 14px 18px; border-bottom: 1px solid #e4e1db; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.conn-head > div { display: flex; flex-direction: column; }
.conn-head b { font-weight: 600; font-size: 15px; }
.conn-head .desc { font-size: 12.5px; color: #6b6862; }
.conn-status { display: flex; align-items: center; gap: 6px; font-size: 12.5px; white-space: nowrap; }
.conn-body { padding: 12px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.kv { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 10px; font-size: 13px; }
.kv span:first-child { color: #6b6862; }
.kv span:last-child { font-family: 'IBM Plex Mono', monospace; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; }
.conn-note { font-size: 12.5px; color: #6b6862; }
.conn-note.fail { color: #9b2c1f; }
.conn-foot { padding: 10px 18px; border-top: 1px solid #efede8; display: flex; gap: 8px; }
.conn-edit { padding: 12px 18px; border-top: 1px solid #efede8; display: flex; flex-direction: column; gap: 10px; background: #faf9f7; }

/* ---- notifications / settings / team ------------------------------------------------------------ */
.toggle { display: inline-flex; width: 34px; height: 20px; border-radius: 10px; background: #d6d2ca; padding: 2px; cursor: pointer; justify-content: flex-start;
    border: 0; }
.toggle.on { background: #1d1c1a; justify-content: flex-end; }
.toggle span { width: 16px; height: 16px; border-radius: 50%; background: #fff; }
.setting { padding: 12px 18px; border-bottom: 1px solid #efede8; display: grid; grid-template-columns: minmax(0, 1fr) minmax(160px, 260px); gap: 16px; align-items: center; }
.setting-text { display: flex; flex-direction: column; }
.setting-text b { font-weight: 500; }
.setting-text span { font-size: 12.5px; color: #6b6862; }
.prompt { padding: 14px 18px; font: 12.5px/1.65 'IBM Plex Mono', monospace; white-space: pre-wrap; color: #1d1c1a; border: 0; outline: none; width: 100%;
    resize: none; overflow: hidden; background: transparent; border-radius: 0 0 6px 6px; display: block; }
.role-select { border: 1px solid #d6d2ca; border-radius: 4px; padding: 3px 24px 3px 8px; font: 400 14px 'IBM Plex Sans', sans-serif; color: #1d1c1a;
    appearance: none; -webkit-appearance: none; cursor: pointer;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5'%3E%3Cpath d='M0 0l4 5 4-5z' fill='%231d1c1a'/%3E%3C/svg%3E") no-repeat right 8px center; }
.role-select { margin: -4px 0; }
.role-static { border: 1px solid #d6d2ca; border-radius: 4px; padding: 3px 8px; }
.roles { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.role { border: 1px solid #e4e1db; border-radius: 6px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; background: #faf9f7; }
.role b { font-weight: 600; }
.role span { font-size: 13px; color: #4a4843; }
.inline-form { padding: 16px 18px; display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.inline-form .field { min-width: 200px; flex: 1; }

#blazor-error-ui { display: none; position: fixed; bottom: 0; left: 0; right: 0; padding: 10px 16px; background: #fbf0d9; color: #5c3d00; z-index: 100; }
@media (max-width: 900px) {
    .shell { grid-template-columns: 1fr; }
    .side { position: static; height: auto; }
    .detail-grid, .repo-grid, .wizard { grid-template-columns: 1fr; }
}

/* ---- login & account pages (Identity UI in the admin app's style) ------------------------------- */
.auth-body { min-height: 100vh; font-size: 14px; line-height: 1.5; }
.auth-shell { max-width: 400px; margin: 0 auto; padding: 72px 16px 48px; display: flex; flex-direction: column; gap: 20px; }
.auth-shell.wide { max-width: 760px; }
.auth-brand { padding: 0 2px; }
.auth-card { background: #fff; border: 1px solid #e4e1db; border-radius: 6px; padding: 24px 26px; display: flex; flex-direction: column; gap: 14px; }
.auth-title, .auth-card h1 { margin: 0; font-size: 20px; font-weight: 600; }
.auth-card h2 { margin: 6px 0 0; font-size: 15px; font-weight: 600; }
.auth-card h3, .auth-card h4 { margin: 4px 0 0; font-size: 14px; font-weight: 600; }
.auth-lead, .auth-card p { margin: 0; color: #4a4843; }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-check { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.auth-submit { width: 100%; padding: 10px 16px; text-align: center; text-decoration: none; display: block; }
a.auth-submit:hover { color: #fff; text-decoration: none; }
.auth-foot { margin: 0; font-size: 12.5px; color: #6b6862; text-align: center; }
.field-error, .auth-card .text-danger { font-size: 12.5px; color: #9b2c1f; }
.field-error:empty { display: none; }
.input-validation-error { border-color: #e1b4ad; }

/* Bootstrap classes used by the remaining Identity UI pages (2FA, account management, logout). */
.auth-card .form-floating, .auth-card .mb-3, .auth-card .form-group { display: flex; flex-direction: column-reverse; gap: 5px; margin: 0; }
.auth-card .form-floating > label, .auth-card .form-label, .auth-card .control-label { font-size: 13px; font-weight: 500; color: #1d1c1a; }
.auth-card .form-control, .auth-card .form-select { border: 1px solid #d6d2ca; border-radius: 5px; padding: 8px 12px; font: 400 14px/1.5 'IBM Plex Sans', sans-serif;
    color: #1d1c1a; background: #fff; outline: none; width: 100%; }
.auth-card .form-control:focus { border-color: #2f5aa8; box-shadow: 0 0 0 3px #e6edf8; }
.auth-card .form-control::placeholder { color: transparent; }
.auth-card .btn { background: #fff; border: 1px solid #d6d2ca; color: #1d1c1a; border-radius: 5px; padding: 8px 14px; font: 500 13px 'IBM Plex Sans', sans-serif;
    cursor: pointer; text-decoration: none; display: inline-block; text-align: center; }
.auth-card .btn-primary, .auth-card .btn-lg { background: #1d1c1a; color: #fff; border: 0; padding: 10px 16px; }
.auth-card .btn-danger { background: #fff; border: 1px solid #e1b4ad; color: #9b2c1f; }
.auth-card .btn-link { background: none; border: 0; color: #2f5aa8; padding: 0; }
.auth-card .w-100 { width: 100%; }
.auth-card .alert { border-radius: 5px; padding: 10px 12px; font-size: 13px; background: #faf9f7; border: 1px solid #e4e1db; color: #4a4843; }
.auth-card .alert-danger { background: #f9e3e0; border-color: #e1b4ad; color: #9b2c1f; }
.auth-card .alert-success { background: #e3f1e7; border-color: #bcdcc6; color: #1f6b3a; }
.auth-card .alert-warning { background: #fbf0d9; border-color: #efd9a8; color: #5c3d00; }
.auth-card .row { display: flex; flex-wrap: wrap; gap: 20px; }
.auth-card .col-md-3 { flex: 0 0 180px; }
.auth-card .col-md-9, .auth-card .col-md-6, .auth-card .col-md-4, .auth-card .col-12 { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.auth-card .nav { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.auth-card .nav-link { display: block; padding: 7px 10px; border-radius: 5px; color: #1d1c1a; text-decoration: none; }
.auth-card .nav-link:hover { background: #efede8; text-decoration: none; }
.auth-card .nav-link.active { background: #e4e1db; font-weight: 600; }
.auth-card hr { border: 0; border-top: 1px solid #e4e1db; margin: 4px 0; }
.auth-card kbd, .auth-card code { font-family: 'IBM Plex Mono', monospace; font-size: 13px; background: #faf9f7; border: 1px solid #e4e1db; border-radius: 4px; padding: 1px 5px; color: #1d1c1a; }
.auth-card .form-check { display: flex; align-items: center; gap: 8px; }
.auth-card .form-check-input { width: 16px; height: 16px; accent-color: #1d1c1a; }
.auth-card .list-inline, .auth-card ul { margin: 0; padding-left: 20px; }
.auth-card .text-center { text-align: center; }

/* ---- connection instructions -------------------------------------------------------------------- */
.conn-help { padding: 12px 18px 14px; border-top: 1px solid #efede8; background: #faf9f7; font-size: 13px; color: #4a4843; display: flex; flex-direction: column; gap: 8px; }
.conn-help b { color: #1d1c1a; font-weight: 600; }
.conn-help ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 5px; }
.conn-help code { font-family: 'IBM Plex Mono', monospace; font-size: 12.5px; background: #fff; border: 1px solid #e4e1db; border-radius: 4px; padding: 0 4px; color: #1d1c1a; word-break: break-all; }
.conn-help .tip { font-size: 12.5px; color: #6b6862; }
.model-picker { display: flex; flex-direction: column; gap: 6px; }
.usage-card { margin-top: 16px; }
.usage-rows { padding: 14px 18px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.usage-row { display: flex; flex-direction: column; gap: 6px; }
.usage-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; }
.usage-label { font-weight: 500; color: #1d1c1a; }
.usage-pct { font: 500 13px 'IBM Plex Mono', monospace; }
.usage-pct.warn { color: #7a5200; } .usage-pct.crit { color: #9b2c1f; }
.usage-bar { height: 6px; background: #efede8; border-radius: 3px; overflow: hidden; }
.usage-bar span { display: block; height: 100%; background: #3d6b4f; border-radius: 3px; }
.usage-bar span.warn { background: #c08a1e; } .usage-bar span.crit { background: #9b2c1f; }
.usage-reset { font-size: 12px; color: #6b6862; }
.usage-foot { padding: 10px 18px 14px; border-top: 1px solid #efede8; display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: #6b6862; }
.wf-inputs { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px 16px; margin: 4px 0 6px; }
.wf-input { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border: 1px solid #e4e1db; border-radius: 5px; background: #faf9f7; }
.wf-input .mono { font: 500 13px 'IBM Plex Mono', monospace; color: #1d1c1a; }
