/* Additions on top of styles.css (prototype styles) for the API-backed dashboard. */
.heading .btnrow{display:flex;gap:9px;flex-wrap:wrap}
.formerror{color:#b43232;font-size:13px;min-height:18px;margin:14px 0 0}
.modal p.formerror{color:#b43232;margin:14px 0 0}
.pill.successful,.pill.enabled,.pill.yes{background:#e5f7ee;color:#13845c}
.pill.processing{background:#e8f0fb;color:#2c5a96}
.pill.completed{background:#eef1f5;color:#4f5c72}
.pill.inactive,.pill.disabled,.pill.no{background:#fce9e9;color:#c34b4b}
.pill.sandbox{background:#fff4df;color:#a5751f}
.pill.live{background:#e5f7ee;color:#13845c}
.info.warn{background:#fdf0ef;border-color:#f3cfcb;color:#933a30}
.info.ok{background:#eef8f2;border-color:#cfe9da;color:#1d6a47}
.bar.zero{background:#efe3cf}
.bar{cursor:default}
.small{font-size:11px;color:var(--muted)}
td .small{display:block;margin-top:2px}
td .num{white-space:nowrap;font-variant-numeric:tabular-nums}
.nowrap{white-space:nowrap}
.wrap{display:block;white-space:normal!important;min-width:200px;max-width:340px}
.statusnote{min-width:150px;max-width:190px;margin-top:4px}
.namecell{display:block;white-space:normal;min-width:140px;max-width:170px}
.alertnote{max-width:250px}
.rowactions{display:flex;gap:2px}
.clamp{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;white-space:normal}
.clamp2{-webkit-line-clamp:2}
.clamp3{-webkit-line-clamp:3}
.card .note.bad{color:var(--red)}
.datefilter{display:flex;align-items:center;gap:8px;font-size:12px;font-weight:700;color:var(--muted)}
.toolbar .datefilter input{width:140px}
.toolbar.datebar input:not([type]){max-width:220px}
.toolbar.datebar select{max-width:190px}
.modal.wide{width:min(860px,100%)}
@media(max-width:760px){.datefilter span{width:34px;flex:none}.heading .btnrow{width:100%}.heading .btnrow .btn{flex:1}.toolbar .datefilter input{width:100%}.toolbar.datebar input:not([type]),.toolbar.datebar select{max-width:none}}
.checklist{display:grid;gap:9px;max-height:200px;overflow:auto;padding:10px;border:1px solid #dce2eb;border-radius:9px}
.checklist label{display:flex;gap:10px;align-items:center;font-weight:500;margin:0}
.checklist input{width:auto}
.preview{background:#f6f8fc;border-radius:10px;padding:12px 14px;font-size:13px;color:#33415a}
.preview strong{color:#14233f}
pre.raw{background:#f6f8fc;border-radius:9px;padding:10px;font-size:11px;white-space:pre-wrap;word-break:break-all;max-height:180px;overflow:auto;margin:6px 0 0}
.detailrow strong{text-align:right;overflow-wrap:anywhere}
.loading{padding:45px;text-align:center;color:var(--muted)}
.userbadge{display:flex;flex-direction:column;align-items:flex-end;line-height:1.2}
.userbadge small{font-size:11px;color:var(--muted)}
.field select[disabled],.field input[disabled]{background:#f6f8fc;color:#6b778c}
.field .hint{display:block}
.optfilter{margin-bottom:8px}
.toast.error{background:#8f2a2a}
@media(max-width:760px){.userbadge{display:none}}
.warntext{color:#933a30;font-weight:600}
textarea{border:1px solid #dce2eb;border-radius:9px;padding:10px 12px;background:white;color:var(--ink);outline:none;width:100%;font:inherit;resize:vertical}
textarea:focus{border-color:#d3a55d;box-shadow:0 0 0 3px #d8aa5c22}
textarea[disabled]{background:#f6f8fc;color:#6b778c}
.navcount{margin-left:auto;min-width:22px;padding:1px 7px;border-radius:11px;background:#d8aa5c;color:#22190d;font-size:11px;text-align:center}
.navcount.critical{background:#c34949;color:white}
.alertbanner{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.alertbanner .btn{padding:7px 12px}
.modal.wide{width:min(980px,100%)}
.detail-grid{display:grid;grid-template-columns:1.4fr 1fr;gap:18px;margin-bottom:14px}
.balance-box{background:#f6f8fc;border:1px solid var(--border);border-radius:12px;padding:16px}
.balance-box .k{display:block;font-size:12px;color:var(--muted)}
.balance-amount{font-size:28px;font-weight:800;letter-spacing:-1px;margin:6px 0 2px}
.detail-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:6px 0 4px}
.detail-cards>div{background:#f6f8fc;border-radius:10px;padding:12px;display:flex;flex-direction:column;gap:3px;min-width:0}
.detail-cards span{font-size:12px;color:var(--muted)}
.detail-cards strong{font-size:18px}
.detail-h{font-size:15px;margin:20px 0 8px}
.checkline{display:flex!important;align-items:center;gap:8px;font-weight:600!important}
.checkline input{width:auto}
.modal .actions .btn.danger{margin-right:auto}
@media(max-width:760px){.detail-grid,.detail-cards{grid-template-columns:1fr}}
