/* BastionDesk - Bastion family look (BastionSpace: navy #0b1730 / #1f4e8c gradient, accent #2f7cf6). CSP self-only. */
[hidden]{display:none!important}
*{box-sizing:border-box}
:root{--navy:#0b1730;--navy2:#14284a;--blue:#2f7cf6;--blue2:#1c4fb8;--ink:#1a2233;--muted:#66728a;--line:#e2e7f0;--bg:#f3f5f9;
  --ok:#1f9d55;--warn:#d98a00;--risk:#e2571b;--bad:#d1344a;--pause:#7a6ff0}
html,body{margin:0;min-height:100%;font-family:system-ui,-apple-system,"Segoe UI",Roboto,Ubuntu,sans-serif;font-size:14px;color:var(--ink)}
button,input,select,textarea{font:inherit}
a{color:var(--blue);text-decoration:none}a:hover{text-decoration:underline}
small{display:block;color:var(--muted);font-size:12px;margin-top:2px}
.bd-muted{color:var(--muted)}
.bd-test{display:inline-block;background:#f5a623;color:#1b1200;border-radius:6px;padding:1px 7px;font-size:11px;font-weight:700;font-style:normal;vertical-align:middle}

/* ---------- login (same as BastionSpace) */
.bd-login-body{display:flex;align-items:center;justify-content:center;min-height:100vh;color:#e8eef7;background:radial-gradient(circle at 30% 20%,#1f4e8c,#0b1730 60%,#060c1a)}
.bd-login{width:min(420px,92vw);background:rgba(13,25,48,.92);border:1px solid #2a4370;border-radius:16px;padding:32px;box-shadow:0 20px 60px rgba(0,0,0,.45)}
.bd-login-brand{display:flex;gap:14px;align-items:center;margin-bottom:18px}
.bd-login-brand h1{margin:0;font-size:26px}.bd-login-brand p{margin:2px 0 0;color:#9fb4d6}
.bd-login h2{font-size:18px;margin:8px 0}.bd-intro{color:#b9c8e2;font-size:14px;line-height:1.45}
.bd-login label{display:block;margin:14px 0 4px;font-size:13px;color:#b9c8e2}
.bd-login .bd-forgot{margin:8px 0 0;text-align:right;font-size:13px}.bd-login a{color:#8fb8ff}
.bd-login .bd-small{margin:18px 0 0;text-align:center;font-size:13px;color:#93a6c6}
.bd-login input{width:100%;padding:11px 12px;border-radius:9px;border:1px solid #34507f;background:#0a1428;color:#fff;font-size:16px}
.bd-login input:focus{outline:2px solid #4f9bff;outline-offset:1px}
.bd-login .bd-otp{text-align:center;font-size:22px;letter-spacing:.3em}
.bd-login .bd-btn-wide{width:100%;margin-top:20px;padding:12px;font-size:15px}
.bd-err{color:#ffb4b4;font-size:14px}

/* ---------- app shell */
.bd-app{display:flex;min-height:100vh;background:linear-gradient(90deg,#0b1730 248px,var(--bg) 248px)}
.bd-side{position:sticky;top:0;height:100vh;width:248px;flex:none;display:flex;flex-direction:column;gap:14px;padding:18px 14px;color:#dbe5f5;
  background:linear-gradient(180deg,#0f2244 0%,#0b1730 55%,#081226 100%);border-right:1px solid #1b2f55}
.bd-brand{display:flex;gap:10px;align-items:center;color:#fff;padding:2px 6px}.bd-brand:hover{text-decoration:none}
.bd-brand strong{display:block;font-size:18px;letter-spacing:.2px}.bd-brand em{margin-top:3px}
.bd-new{display:block;text-align:center;padding:10px;border-radius:10px;background:var(--blue);color:#fff;font-weight:600;box-shadow:0 6px 16px rgba(47,124,246,.35)}
.bd-new:hover{background:#2a6fe0;text-decoration:none}
.bd-nav{flex:1;overflow:auto;display:flex;flex-direction:column;gap:2px}
.bd-nav a{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:8px;color:#c7d4ea}
.bd-nav a:hover{background:rgba(255,255,255,.07);text-decoration:none}
.bd-nav a.on{background:rgba(47,124,246,.28);color:#fff}
.bd-nav a b{margin-left:auto;font-weight:600;font-size:12px;color:#9fb4d6;background:rgba(255,255,255,.08);padding:1px 7px;border-radius:9px}
.bd-nav a.on b{color:#fff;background:rgba(255,255,255,.18)}
.bd-nav-h{margin:14px 10px 4px;font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:#7f93b6}
.dot{width:8px;height:8px;border-radius:50%;background:#5b6f93;flex:none}
.dot-new{background:#4f9bff}.dot-open{background:#36c2a0}.dot-pending{background:#f5a623}.dot-resolved{background:#7ed08f}
.dot-closed{background:#8a96ab}.dot-risk{background:var(--bad)}.dot-mine{background:#b18cff}.dot-internal{background:#c7d4ea}
.ic{display:inline-block;width:16px;height:16px;flex:none;background:currentColor;opacity:.85;-webkit-mask:var(--m) center/contain no-repeat;mask:var(--m) center/contain no-repeat}
.ic-home{--m:url(/static/ic-home.svg)}.ic-phone{--m:url(/static/ic-phone.svg)}.ic-video{--m:url(/static/ic-video.svg)}
.bd-me{display:flex;align-items:center;gap:10px;padding:12px 8px 2px;border-top:1px solid rgba(255,255,255,.08)}
.bd-me strong{display:block;color:#fff;font-size:13px}.bd-me small{color:#8ea3c6}
.bd-me form{margin-left:auto}
.bd-avatar{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(135deg,#4f9bff,#1c4fb8);color:#fff;font-weight:700}
.bd-linkbtn{background:none;border:0;color:#8fb8ff;padding:0;cursor:pointer;font-size:13px}
.bd-props .bd-linkbtn{color:var(--blue);margin-top:6px}
.bd-main{flex:1;min-width:0;padding:26px 32px 18px;max-width:1400px}
.bd-foot{margin-top:28px;color:#97a2b6;font-size:12px}

/* ---------- headings, cards */
.bd-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin-bottom:18px}
.bd-head h1{margin:0;font-size:24px;letter-spacing:-.2px}
.bd-sub{margin:4px 0 0;color:var(--muted)}
.bd-card{background:#fff;border:1px solid var(--line);border-radius:14px;padding:18px 20px;margin-bottom:18px;box-shadow:0 1px 2px rgba(16,30,60,.04)}
.bd-card h3{margin:0 0 12px;font-size:15px}.bd-card h3 small{display:inline;margin-left:8px;font-weight:400}
.bd-card h3+h3,.bd-card ul+h3,.bd-card p+h3{margin-top:20px}
.bd-hint{color:var(--muted);font-size:13px;line-height:1.45}
.bd-flash{padding:11px 14px;border-radius:10px;margin-bottom:14px;border:1px solid}
.bd-flash-ok{background:#ecf8f0;border-color:#bfe6cc;color:#14663a}.bd-flash-err{background:#fdeef0;border-color:#f4c4cc;color:#8f1d2f}
.bd-empty{text-align:center;padding:40px 20px;color:var(--muted)}.bd-empty p{max-width:460px;margin:0 auto 16px;line-height:1.5}
.bd-grid2{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(0,1fr);gap:18px;align-items:start}
.bd-crumb{margin:0 0 10px}

/* ---------- buttons, forms */
.bd-btn{display:inline-flex;align-items:center;gap:8px;justify-content:center;padding:9px 16px;border-radius:9px;border:1px solid var(--blue);background:var(--blue);color:#fff;font-weight:600;cursor:pointer}
.bd-btn:hover{background:#2a6fe0;text-decoration:none}
.bd-btn-ghost{background:#fff;color:var(--ink);border-color:#cfd7e6}.bd-btn-ghost:hover{background:#f2f5fb}
.bd-btn[disabled]{opacity:.55;cursor:not-allowed}
.bd-btn em{font-style:normal;font-weight:500;font-size:11px;background:#eef2f9;color:var(--muted);padding:1px 6px;border-radius:6px}
.bd-btn-sm{padding:6px 11px;font-size:13px}
.bd-form label,.bd-reply label,.bd-prop>label,.bd-pick>label{display:block;font-size:12px;font-weight:600;color:#4a566e;margin:14px 0 5px;text-transform:uppercase;letter-spacing:.04em}
.bd-form label:first-of-type{margin-top:0}
.bd-form input:not([type=checkbox]),.bd-form select,.bd-form textarea,.bd-reply textarea,.bd-props select,.bd-props input:not([type=hidden]),.bd-search input{
  width:100%;padding:9px 11px;border:1px solid #cfd7e6;border-radius:9px;background:#fff;color:var(--ink)}
.bd-form textarea,.bd-reply textarea{resize:vertical;line-height:1.45}
input:focus,select:focus,textarea:focus{outline:2px solid rgba(47,124,246,.35);border-color:var(--blue)}
.bd-row2{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.bd-fs{border:1px dashed #cfd7e6;border-radius:12px;padding:6px 14px 14px;margin:16px 0 0}
.bd-check{display:flex!important;align-items:center;gap:8px;text-transform:none!important;letter-spacing:0!important;font-weight:500!important;font-size:13px!important;color:var(--ink)!important}
.bd-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;margin-top:16px}
.bd-actions .bd-check{margin:0 auto 0 0!important}
.bd-search{width:min(380px,40vw)}
.bd-inline{display:flex;gap:6px}.bd-inline select,.bd-inline input{flex:1;min-width:0}
.bd-pick{position:relative}
.bd-pick-list{position:absolute;z-index:20;left:0;right:0;margin:4px 0 0;padding:4px;list-style:none;background:#fff;border:1px solid #cfd7e6;border-radius:10px;box-shadow:0 12px 30px rgba(16,30,60,.15)}
.bd-pick-list li.bd-muted{padding:8px 10px}
.bd-pick-item{display:block;width:100%;text-align:left;background:none;border:0;padding:7px 10px;border-radius:7px;cursor:pointer}
.bd-pick-item:hover,.bd-pick-item:focus{background:#eef4ff;outline:none}
.bd-pick-sel{margin:6px 0 0;font-size:13px;color:var(--ok);font-weight:600}

/* ---------- table */
.bd-tabs{display:flex;gap:6px;margin:0 0 12px;flex-wrap:wrap}
.bd-tabs a{padding:6px 12px;border-radius:20px;background:#fff;border:1px solid var(--line);color:#3d4a63}
.bd-tabs a b{font-weight:600;color:var(--muted);margin-left:4px}
.bd-tabs a.on{background:var(--navy2);border-color:var(--navy2);color:#fff}.bd-tabs a.on b{color:#bcd0f2}.bd-tabs a:hover{text-decoration:none}
.bd-table-card{padding:0;overflow:hidden}
.bd-table{width:100%;border-collapse:collapse}
.bd-table th{text-align:left;font-size:11px;text-transform:uppercase;letter-spacing:.05em;color:#6b7891;background:#f8fafd;padding:10px 14px;border-bottom:1px solid var(--line)}
.bd-table td{padding:11px 14px;border-bottom:1px solid #eef1f6;vertical-align:top}
.bd-table tbody tr:hover{background:#fafcff}.bd-table tr:last-child td{border-bottom:0}
.bd-row-breach{box-shadow:inset 3px 0 0 var(--bad)}
.bd-num{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12.5px;color:#3a5a99;white-space:nowrap}
.bd-subj{color:var(--ink);font-weight:600}
.bd-nowrap{white-space:nowrap;color:var(--muted)}
.bd-tag{display:inline-block;font-size:11px;padding:1px 7px;border-radius:6px;background:#eef1f6;color:#55617a;font-weight:600}
.bd-mini{width:100%;border-collapse:collapse;font-size:13px}.bd-mini th,.bd-mini td{padding:5px 4px;text-align:left;border-bottom:1px solid #eef1f6}.bd-mini th{color:var(--muted);font-weight:600}

/* ---------- badges */
.bd-prio{display:inline-block;min-width:30px;text-align:center;font-weight:700;font-size:12px;padding:2px 7px;border-radius:6px}
.bd-prio-P1{background:#fde5e8;color:#a3182d}.bd-prio-P2{background:#fdeedd;color:#9a4b00}.bd-prio-P3{background:#e6efff;color:#1c4fb8}.bd-prio-P4{background:#eef1f6;color:#55617a}
.bd-st{display:inline-block;font-size:12px;font-weight:600;padding:2px 9px;border-radius:20px;white-space:nowrap}
.bd-st-new{background:#e3eeff;color:#1c4fb8}.bd-st-open{background:#dcf5ee;color:#0f6b55}.bd-st-pending{background:#fff2d6;color:#8a5a00}
.bd-st-resolved{background:#e3f6e8;color:#1d7a3c}.bd-st-closed{background:#eceff4;color:#5b667a}
.bd-sla{display:inline-block;font-size:12px;font-weight:600;padding:2px 8px;border-radius:6px;white-space:nowrap}
.bd-sla-ok{background:#e3f6e8;color:#1d7a3c}.bd-sla-warn{background:#fff2d6;color:#8a5a00}.bd-sla-risk{background:#fde6da;color:#a33c08}
.bd-sla-breached{background:var(--bad);color:#fff}.bd-sla-met{background:#eceff4;color:#3d6b4c}.bd-sla-paused{background:#ece9ff;color:#4b3fc0}
.bd-plan{display:inline-block;font-weight:700;padding:3px 10px;border-radius:20px;background:#eef1f6;color:#55617a}
.bd-plan-silver{background:linear-gradient(135deg,#eef1f5,#d5dbe4);color:#3e4a5d}.bd-plan-gold{background:linear-gradient(135deg,#fff3cf,#f2d27a);color:#6b4b00}
.bd-plan-platinum{background:linear-gradient(135deg,#e9f0ff,#b9c9ec);color:#1d3a78}
.bd-src{font-size:11px;padding:2px 7px;border-radius:6px;font-weight:600}.bd-src-cmdb{background:#e3f6e8;color:#1d7a3c}.bd-src-fallback{background:#fff2d6;color:#8a5a00}

/* ---------- ticket detail */
.bd-head-ticket{align-items:flex-start}.bd-num-lg{margin:0 0 4px;font-family:ui-monospace,Menlo,monospace;color:#3a5a99}
.bd-meta{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:10px 0 0;color:var(--muted)}
.bd-detail{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:18px;align-items:start}
.bd-sla-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.bd-slabox{border:1px solid var(--line);border-radius:12px;padding:14px;background:#fbfcfe}
.bd-slabox-breached{border-color:#f0b3bd;background:#fff6f7}.bd-slabox-risk{border-color:#f5c7ad;background:#fff9f5}.bd-slabox-warn{border-color:#f3dc9f}
.bd-slabox-h{display:flex;justify-content:space-between;align-items:center;font-weight:600}
.bd-slabox-due{margin:10px 0;color:#3d4a63}.bd-slabox-due strong{font-size:16px;color:var(--ink)}
.bd-slabox-f{display:flex;justify-content:space-between;gap:8px;margin:8px 0 0;font-size:12px;color:var(--muted)}
.bd-bar{height:7px;border-radius:5px;background:#e6eaf2;overflow:hidden}.bd-bar i{display:block;height:100%;border-radius:5px;background:var(--ok)}
.bd-slabox-warn .bd-bar i{background:var(--warn)}.bd-slabox-risk .bd-bar i{background:var(--risk)}.bd-slabox-breached .bd-bar i{background:var(--bad)}
.bd-slabox-paused .bd-bar i{background:var(--pause)}.bd-slabox-met .bd-bar i{background:#8fb89c}
.w0{width:0}.w5{width:5%}.w10{width:10%}.w15{width:15%}.w20{width:20%}.w25{width:25%}.w30{width:30%}.w35{width:35%}.w40{width:40%}.w45{width:45%}.w50{width:50%}
.w55{width:55%}.w60{width:60%}.w65{width:65%}.w70{width:70%}.w75{width:75%}.w80{width:80%}.w85{width:85%}.w90{width:90%}.w95{width:95%}.w100{width:100%}
.bd-desc p{margin:0;white-space:pre-wrap;line-height:1.55}
.bd-tl{list-style:none;margin:0;padding:0}
.bd-tl li{position:relative;display:flex;gap:12px;padding:0 0 16px 0}
.bd-tl li::before{content:"";position:absolute;left:6px;top:16px;bottom:0;width:2px;background:#e6eaf2}
.bd-tl li:last-child::before{display:none}
.bd-tl-dot{flex:none;width:14px;height:14px;margin-top:3px;border-radius:50%;background:#c6cfdf;border:3px solid #fff;box-shadow:0 0 0 1px #c6cfdf}
.bd-tl-comment .bd-tl-dot{background:var(--blue);box-shadow:0 0 0 1px var(--blue)}.bd-tl-customer.bd-tl-comment .bd-tl-dot{background:#36c2a0;box-shadow:0 0 0 1px #36c2a0}
.bd-tl-note .bd-tl-dot{background:#f5a623;box-shadow:0 0 0 1px #f5a623}.bd-tl-sla .bd-tl-dot{background:#b9b2f5;box-shadow:0 0 0 1px #b9b2f5}
.bd-tl-body{flex:1;min-width:0}
.bd-tl-h{margin:0;color:#3d4a63}.bd-tl-h time{color:#97a2b6;font-size:12px;margin-left:6px}
.bd-tl-text{margin-top:7px;padding:11px 13px;border-radius:10px;background:#f4f7fc;border:1px solid #e6ecf6;white-space:pre-wrap;line-height:1.5}
.bd-tl-customer .bd-tl-text{background:#effaf6;border-color:#d4efe5}.bd-tl-note .bd-tl-text{background:#fff8e6;border-color:#f6e2ae}
.bd-reply{margin-top:6px;padding-top:14px;border-top:1px solid #eef1f6}
.bd-props .bd-prop{margin:0 0 12px}.bd-props .bd-prop>label{margin-top:0}
.bd-val{margin:0}
.bd-contact .bd-btn{width:100%;justify-content:flex-start;margin-bottom:8px}

/* ---------- overview */
.bd-kpis{display:grid;grid-template-columns:repeat(5,1fr);gap:14px;margin-bottom:18px}
.bd-kpi{display:flex;flex-direction:column;gap:6px;padding:16px 18px;border-radius:14px;background:#fff;border:1px solid var(--line);color:var(--muted);position:relative;overflow:hidden}
.bd-kpi:hover{text-decoration:none;border-color:#bcd0f2}
.bd-kpi strong{font-size:28px;color:var(--ink)}
.bd-kpi::after{content:"";position:absolute;left:0;top:0;bottom:0;width:4px;background:#c6cfdf}
.bd-kpi-new::after{background:#4f9bff}.bd-kpi-open::after{background:#36c2a0}.bd-kpi-pending::after{background:#f5a623}.bd-kpi-resolved::after{background:#7ed08f}
.bd-kpi-breached::after{background:var(--bad)}.bd-kpi-breached strong{color:var(--bad)}
.bd-health{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.bd-health li{display:flex;justify-content:space-between;padding:10px 12px;border-radius:10px;background:#f6f8fc}
.bd-h-ok strong{color:var(--ok)}.bd-h-warn strong{color:var(--warn)}.bd-h-risk strong{color:var(--risk)}.bd-h-breached strong{color:var(--bad)}.bd-h-paused strong{color:var(--pause)}
.bd-list{list-style:none;margin:0;padding:0}
.bd-list li{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:8px 0;border-bottom:1px solid #eef1f6}
.bd-list li:last-child{border-bottom:0}
.bd-recent li{flex-direction:column;align-items:flex-start;gap:0}
.bd-pol td small{display:block}
.bd-integ{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(4,1fr);gap:10px}
.bd-integ li{padding:12px 14px;border-radius:10px;background:#f6f8fc;display:flex;flex-direction:column;gap:4px}
.bd-integ em{font-style:normal;font-size:12px;font-weight:600}
.bd-integ .bd-st-ok{color:var(--ok)}.bd-integ .bd-st-down{color:var(--bad)}.bd-integ .bd-st-off{color:var(--muted)}
.bd-side-card h3{margin-bottom:8px}.bd-side-card .bd-plan{margin:0 0 12px}

@media (max-width:1000px){.bd-detail,.bd-grid2{grid-template-columns:1fr}.bd-kpis{grid-template-columns:repeat(2,1fr)}.bd-integ{grid-template-columns:1fr 1fr}}
@media (max-width:760px){.bd-app{flex-direction:column}.bd-side{position:static;height:auto;width:auto}.bd-main{padding:18px}.bd-table th:nth-child(n+6),.bd-table td:nth-child(n+6){display:none}}
