/* Alert Budget page styles. Loaded after app.css. Light theme only. */
:root { --ab-border: #8796ab; --ab-tp: #047857; --ab-btp: #2563eb; --ab-fp: #d97706; --ab-unk: #94a3b8; --ab-out: #d97706; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Bold 2px outlines on every card and control on this page */
.ax-app .ax-head, .ax-app .ax-tile, .ax-app .ax-card, .ax-app .ax-table-wrap, .ax-app .ax-faq details, .ax-app .ax-links-group, .ax-app .ax-seg, .ax-app .ax-btn, .ax-app .ax-chip { border-width: 2px; }
.ax-app .ax-verdict { border-top-width: 2px; border-right-width: 2px; border-bottom-width: 2px; }
.ax-app .ax-btn--ghost, .ax-app .ax-chip { border-color: var(--ab-border); }

.ab-drop { position: relative; }
textarea#src { width: 100%; min-height: 150px; font-family: var(--ax-mono); font-size: 12.5px; line-height: 1.5; color: var(--ax-ink); background: #fff;
  border: 2px solid var(--ab-border); border-radius: 14px; padding: 12px 14px; outline: none; resize: vertical; white-space: pre; overflow: auto; font-variant-ligatures: none; }
textarea#src:focus { border-color: var(--ax-accent); box-shadow: 0 0 0 4px rgba(4,120,87,.14); }
@media (max-width: 640px) { textarea#src { font-size: 16px; min-height: 130px; } }
.ab-drop.over textarea#src { border-color: var(--ax-accent); border-style: dashed; background: #f0fdf4; }
.ab-filebtn { position: relative; overflow: hidden; }
.ab-filebtn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.ab-samples { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.ab-samples > span { font-family: var(--ax-mono); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ax-dim); }
.ax-chip svg { width: 15px; height: 15px; }
.sample-flag { font-size: 12.5px; color: #92400e; background: #fffbeb; border: 2px solid #fde68a; border-radius: 10px; padding: 6px 10px; margin: 10px 0 0; }

/* Boxes */
.ab-box { background: #fff; border: 2px solid var(--ax-line-2); border-radius: 14px; padding: 12px 14px; display: grid; gap: 10px; min-width: 0; }
.ab-box-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; justify-content: space-between; }
.ab-box-head h2 { margin: 0; font-family: var(--ax-display); font-size: 16px; color: var(--ax-ink); display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ab-box-head h2 svg { width: 18px; height: 18px; color: var(--ax-accent); fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ab-cap { font-family: var(--ax-mono); font-size: 12px; color: #344054; overflow-wrap: break-word; }
.ab-cnt { font-family: var(--ax-mono); font-size: 12px; font-weight: 600; color: var(--ax-muted); }
.ab-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.ab-meta { font-size: 13px; color: var(--ax-muted); margin: 0; overflow-wrap: break-word; }
.ab-meta:empty { display: none; }
.ab-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 760px) { .ab-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.ab-f { display: grid; gap: 4px; min-width: 0; align-content: start; }
.ab-f > span { display: flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; color: #334155; }
.ab-f input { width: 100%; min-height: 38px; font: inherit; font-size: 14px; color: var(--ax-ink); background: #fff; border: 2px solid var(--ab-border); border-radius: 10px; padding: 5px 9px; }
.ab-f input:focus { outline: none; border-color: var(--ax-accent); }
@media (max-width: 640px) { .ab-f input { font-size: 16px; } }
.tip { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; border-radius: 50%; border: 1.5px solid #64748b; color: #475467; font-size: 10px; font-weight: 800; font-family: var(--ax-mono); cursor: help; flex: none; }
.tip:hover::after, .tip:focus::after { content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%); width: max-content; max-width: min(260px, 70vw); white-space: normal; background: #0f172a; color: #f8fafc; font: 500 12px/1.45 system-ui, sans-serif; letter-spacing: 0; text-transform: none; padding: 7px 9px; border-radius: 8px; z-index: 20; overflow-wrap: break-word; }

/* Tables */
.bt table { table-layout: fixed; }
.bt td, .bt th { font-size: 12.5px; vertical-align: top; overflow-wrap: break-word; }
.bt th { word-break: keep-all; white-space: normal !important; }
.bt td:first-child, .bt th:first-child { position: sticky; left: 0; background: #fff; z-index: 1; box-shadow: 2px 0 4px -2px rgba(15,23,42,.18); }
.bt thead th:first-child { background: #eef2f6; z-index: 3; }
.bt tbody tr:hover td, .bt tbody tr:hover td:first-child { background: #f3faf7; }
.bt .num { font-family: var(--ax-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bt .nm { font-weight: 700; color: var(--ax-ink); overflow-wrap: break-word; }
.bt .sub { display: block; font-family: var(--ax-mono); font-size: 11px; color: var(--ax-muted); white-space: normal; }
.bt th[data-sort] { cursor: pointer; user-select: none; }
.bt th[aria-sort="descending"]::after { content: " \25BE"; }
.bt th[aria-sort="ascending"]::after { content: " \25B4"; }
.ed td { padding: 6px 6px !important; }
.ed input { width: 100%; min-height: 34px; font: inherit; font-size: 13px; color: var(--ax-ink); background: #fff; border: 2px solid var(--ab-border); border-radius: 8px; padding: 4px 7px; }
.ed input.n { font-family: var(--ax-mono); -moz-appearance: textfield; }
.ed input.n::-webkit-outer-spin-button, .ed input.n::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ed textarea { display: block; width: 100%; min-height: 34px; font: inherit; font-size: 13px; font-weight: 700; line-height: 1.35; color: var(--ax-ink); background: #fff; border: 2px solid var(--ab-border); border-radius: 8px; padding: 5px 7px; resize: none; overflow: hidden; white-space: pre-wrap; overflow-wrap: break-word; field-sizing: content; }
.ed textarea.mono { font-family: var(--ax-mono); font-weight: 500; }
.ed textarea:focus { outline: none; border-color: var(--ax-accent); }
@media (max-width: 640px) { .ed textarea { font-size: 16px; } }
.ed input:focus { outline: none; border-color: var(--ax-accent); }
@media (max-width: 640px) { .ed input { font-size: 16px; } }
.ed .del { width: 100%; min-height: 34px; border: 2px solid var(--ab-border); background: #fff; border-radius: 8px; cursor: pointer; color: #475467; display: inline-flex; align-items: center; justify-content: center; }
.ed .del:hover { border-color: var(--ax-bad); color: var(--ax-bad); }
.ed .del svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.ed.ax-table-wrap { max-height: 420px; }

.tag { display: inline-block; font-family: var(--ax-mono); font-size: 11px; font-weight: 700; color: #334155; background: #f1f5f9; border: 1px solid #cbd5e1; border-radius: 6px; padding: 1px 6px; margin: 0 4px 3px 0; white-space: nowrap; }
.tag--ok { color: #065f46; background: #ecfdf5; border-color: #a7f3d0; }
.tag--bad { color: #991b1b; background: #fef2f2; border-color: #fecaca; }
.st { display: inline-flex; align-items: center; font-family: var(--ax-mono); font-size: 10.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; border-radius: 999px; padding: 2px 8px; border: 1px solid; }
.st--ok { color: var(--ax-ok-text); background: var(--ax-ok-bg); border-color: var(--ax-ok-line); }
.st--retire { color: var(--ax-bad-text); background: var(--ax-bad-bg); border-color: var(--ax-bad-line); }
.st--watch, .st--untested { color: var(--ax-warn-text); background: var(--ax-warn-bg); border-color: var(--ax-warn-line); }
.st--silent { color: #334155; background: #f1f5f9; border-color: #cbd5e1; }

/* Report */
.ab-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ab-bar h2 { flex: 1 1 auto; margin: 0; font-family: var(--ax-display); font-size: 19px; color: var(--ax-ink); display: inline-flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.ab-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 900px) { .ab-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.ab-tiles .ax-tile { padding: 12px 13px; }
.ab-tiles .ax-tile-label { word-break: keep-all; }
.ab-tiles .ax-tile-sub { font-size: 11.5px; }
.ab-card { background: #fff; border: 2px solid var(--ax-line-2); border-radius: 14px; padding: 12px 14px; display: grid; gap: 10px; min-width: 0; }
.ab-card h3 { margin: 0; font-family: var(--ax-display); font-size: 16px; color: var(--ax-ink); display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.ab-card p { margin: 0; font-size: 13px; color: var(--ax-muted); overflow-wrap: break-word; }

/* Capacity bars */
.cb { display: grid; gap: 8px; }
.cb-row { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 10px; align-items: center; }
.cb-row > b { font-family: var(--ax-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: #344054; }
.cb-track { position: relative; height: 26px; }
.cb-fill { position: absolute; left: 0; top: 0; bottom: 0; display: flex; gap: 2px; }
.cb-fill i { display: block; height: 100%; min-width: 0; }
.cb-fill i:first-child { border-radius: 4px 0 0 4px; }
.cb-fill i:last-child { border-radius: 0 4px 4px 0; }
.cb-cap { position: absolute; top: -4px; bottom: -4px; width: 0; border-left: 2px dashed #0b1220; }
.cb-cap span { position: absolute; top: -18px; left: 4px; font-family: var(--ax-mono); font-size: 10.5px; font-weight: 700; color: #0b1220; white-space: nowrap; }
.cb-cap.r span { left: auto; right: 4px; }
.cb-val { font-family: var(--ax-mono); font-size: 12px; color: #344054; }
.k-tp { background: var(--ab-tp); } .k-btp { background: var(--ab-btp); } .k-fp { background: var(--ab-fp); }
.k-unk { background: repeating-linear-gradient(45deg, var(--ab-unk) 0 3px, #cbd5e1 3px 6px); }
.lg { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: #344054; margin: 0; padding: 0; list-style: none; }
.lg li { display: inline-flex; align-items: center; gap: 6px; }
.lg i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }

/* Tune list */
.tu .rng { display: flex; align-items: center; gap: 8px; }
.tu input[type=range] { flex: 1 1 auto; min-width: 70px; accent-color: var(--ax-accent); height: 28px; }
.tu .rng output { font-family: var(--ax-mono); font-size: 12px; font-weight: 700; width: 42px; text-align: right; flex: none; }
.tu tr.cut td, .tu tr.cut td:first-child { background: #f0fdf4; }
.tu .share { display: block; height: 6px; border-radius: 3px; background: var(--ab-fp); margin-top: 4px; }

/* Small charts */
.ch2 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
@media (min-width: 860px) { .ch2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.hist h4 { margin: 0 0 6px; font-family: var(--ax-mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ax-dim); }
.hist svg { width: 100%; height: auto; display: block; }
.hrs h4 { margin: 0 0 6px; font-family: var(--ax-mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ax-dim); }
.hbars { display: flex; align-items: flex-end; gap: 2px; height: 96px; border-bottom: 1px solid #cbd5e1; }
.hbars i { flex: 1 1 0; min-width: 0; border-radius: 3px 3px 0 0; }
.hbars i:hover { opacity: .75; }
.haxis { display: flex; justify-content: space-between; font-family: var(--ax-mono); font-size: 11px; color: #475467; margin-top: 3px; }
.hist rect.b:hover { opacity: .75; }

.ab-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.ab-list li { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; font-size: 13px; padding: 8px 10px; border-radius: 10px; border: 2px solid var(--ax-line); background: #fff; }
.ab-list li b { flex: 1 1 220px; min-width: 0; color: var(--ax-ink); overflow-wrap: break-word; }
.ab-list li span { font-family: var(--ax-mono); font-size: 12px; color: #344054; }
.ab-list li.r { border-color: var(--ax-bad-line); background: #fffafa; }
.ab-list li.w { border-color: var(--ax-warn-line); background: #fffdf5; }

.ab-code { margin: 10px 0; background: #f8fafc; color: var(--ax-ink); border: 2px solid var(--ax-line); border-radius: 12px; padding: 10px 12px; font-family: var(--ax-mono); font-size: 12px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: break-word; font-variant-ligatures: none; }
.ab-fmt { margin-top: 12px; }
.mt td, .mt th { font-size: 13px; }
.mt code { font-family: var(--ax-mono); font-size: 12px; }
