:root {
  /* ===== Siemens color theme =====
     Petrol #009999 is the signature brand color; Deep Blue #000028 is the dark base.
     Buttons/links use a darker "accessible petrol" so white text stays readable (WCAG AA). */
  --petrol: #009999;          /* brand accent: highlights, borders, active states */
  --petrol-light: #00c1b6;    /* accent on dark backgrounds */
  --bold-green: #00ffb9;      /* small highlights on dark backgrounds */
  --deep-blue: #000028;       /* header, login brand panel */
  --deep-blue-2: #23233c;
  --mist: #e6f5f5;            /* light petrol tint for hovers and info boxes */

  --bg: #f3f3f0; --card: #fff; --text: #000028; --muted: #5a5a6e; --border: #dcdce1;
  --primary: #00787d; --primary-dark: #005f64; --danger: #c3002d;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); font-size: 15px; }
a { color: var(--primary); text-decoration: none; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 12px 24px; background: var(--deep-blue); color: #fff; border-bottom: 3px solid var(--petrol); }
.topbar a { color: #fff; } .topbar #nav a:hover { color: var(--petrol-light); }
.brand { font-weight: 700; font-size: 18px; }
#nav { display: flex; gap: 16px; align-items: center; font-size: 14px; }
#nav .who { color: #9999a9; }
main { max-width: 1100px; margin: 24px auto; padding: 0 16px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 20px; margin-bottom: 16px; }
.auth { max-width: 400px; margin: 40px auto; }
h1 { font-size: 22px; margin: 0 0 16px; } h2 { font-size: 17px; margin: 0 0 12px; }
label { display: block; font-size: 13px; font-weight: 600; margin: 12px 0 4px; }
input, select, textarea { width: 100%; padding: 9px 10px; border: 1px solid var(--border); border-radius: 6px; font: inherit; background: #fff; }
textarea { min-height: 110px; resize: vertical; }
button { background: var(--primary); color: #fff; border: 0; padding: 9px 16px; border-radius: 6px; font: inherit; font-weight: 600; cursor: pointer; }
button:hover { background: var(--primary-dark); }
button.secondary { background: #e5e5e9; color: var(--text); } button.secondary:hover { background: #ccccd4; }
button.danger { background: var(--danger); }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; }
.row > * { flex: 1; min-width: 140px; }
.actions { margin-top: 16px; display: flex; gap: 8px; }
.muted { color: var(--muted); }
.error { color: var(--danger); font-size: 14px; margin-top: 10px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); font-size: 14px; }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
tr.click { cursor: pointer; } tr.click:hover { background: var(--mist); }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.s-Open { background: var(--mist); color: #005f64; }
.s-In-Progress { background: #fef3c7; color: #92400e; }
.s-Waiting-on-Customer { background: #ede9fe; color: #5b21b6; }
.s-Resolved { background: #dcfce7; color: #166534; }
.s-Closed { background: #e5e7eb; color: #374151; }
.p-Low { background: #f3f4f6; color: #4b5563; }
.p-Medium { background: #e0f2fe; color: #075985; }
.p-High { background: #ffedd5; color: #9a3412; }
.p-Critical { background: #fee2e2; color: #991b1b; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--card); border: 1px solid var(--border); border-top: 3px solid var(--petrol); border-radius: 10px; padding: 14px 16px; cursor: pointer; }
.stat:hover { background: var(--mist); }
.stat .n { color: var(--primary); }
.stat .n { font-size: 26px; font-weight: 700; } .stat .l { color: var(--muted); font-size: 13px; }
.detail { display: grid; grid-template-columns: 1fr 280px; gap: 16px; }
@media (max-width: 800px) { .detail { grid-template-columns: 1fr; } }
.comment { border-left: 3px solid var(--border); padding: 8px 12px; margin: 12px 0; white-space: pre-wrap; }
.comment.engineer { border-color: var(--petrol); }
.comment.internal { background: #fffbeb; border-color: #f59e0b; }
.comment .meta { font-size: 12px; color: var(--muted); margin-bottom: 4px; white-space: normal; }
.desc { white-space: pre-wrap; }
.kv { font-size: 14px; margin: 6px 0; display: flex; gap: 8px; overflow-wrap: anywhere; } .kv b { flex: 0 0 96px; color: var(--muted); font-weight: 600; }
.check { display: flex; gap: 6px; align-items: center; font-weight: normal; }
.check input { width: auto; }
/* ---------- Help Center ---------- */
.pt-userlink { color: #fff; font-weight: 600; } .pt-userlink:hover { color: var(--petrol-light); text-decoration: none; }
.hc-hero h1 { margin-top: 4px; }
.pt-brand { color: #fff; } a.pt-brand:hover { text-decoration: none; color: #fff; }
.hc-brand-sub { font-weight: 400; color: var(--petrol-light); margin-left: 6px; padding-left: 8px; border-left: 1px solid #5b6b82; }
.hc-crumbs { font-size: 14px; color: #b9c4d8; margin-bottom: 10px; } .hc-crumbs a { color: #fff; } .hc-crumbs a:hover { color: var(--petrol-light); }
.hc-searchwrap { margin-top: 18px; }
#hc-search { width: 100%; max-width: 620px; padding: 13px 16px; border-radius: 8px; border: 0; font: inherit; font-size: 16px; }
.hc-main { max-width: 1000px; margin: -28px auto 40px; padding: 0 20px; position: relative; }
.hc-main > .pt-card + .pt-card, .hc-main > .pt-card + .hc-cta { margin-top: 16px; }
.hc-cats { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 16px; }
.hc-cat h2 { margin: 0 0 4px; } .hc-cat h2 a { color: var(--text); } .hc-cat h2 a:hover { color: var(--primary); text-decoration: none; }
.hc-cat > p { margin: 0 0 10px; font-size: 14px; }
.hc-cat ul { margin: 0 0 12px; padding-left: 18px; } .hc-cat li { margin: 6px 0; font-size: 15px; }
.hc-all { font-weight: 600; font-size: 14px; }
.hc-item { display: flex; flex-direction: column; gap: 3px; padding: 12px 10px; margin: 0 -10px; border-radius: 6px; color: var(--text); border-bottom: 1px solid #eef0f0; }
.hc-item:last-child { border-bottom: 0; }
.hc-item:hover { background: var(--mist); text-decoration: none; } .hc-item b { color: var(--primary); } .hc-item span:not(.hc-chip) { color: var(--muted); font-size: 14px; }
.hc-chip { align-self: flex-start; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #005f64; background: var(--mist); padding: 1px 7px; border-radius: 4px; }
.hc-results-h { font-size: 15px; color: var(--muted); font-weight: 600; margin: 0 0 6px; }
.hc-cta { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 16px;
  background: #fff; border: 1px solid #d3dcdc; border-left: 4px solid var(--petrol); border-radius: 10px; padding: 16px 20px; }
.hc-cta div { display: flex; flex-direction: column; } .hc-cta span { color: var(--muted); font-size: 14px; }
.hc-article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 20px; align-items: start; }
@media (max-width: 860px) { .hc-article-layout { grid-template-columns: 1fr; } }
.hc-article h1 { font-size: 26px; margin: 0 0 4px; line-height: 1.25; }
.hc-updated { font-size: 13px; margin-bottom: 14px; }
.hc-body { font-size: 16px; line-height: 1.65; }
.hc-body h2 { font-size: 19px; margin: 26px 0 8px; } .hc-body h3 { font-size: 16px; margin: 20px 0 6px; }
.hc-body p { margin: 0 0 12px; } .hc-body ul, .hc-body ol { margin: 0 0 14px; padding-left: 22px; } .hc-body li { margin: 5px 0; }
.hc-body code { background: #ececf0; padding: 1px 5px; border-radius: 4px; font-size: 14px; }
.hc-body pre { background: #f3f3f0; border: 1px solid var(--border); border-radius: 6px; padding: 12px; overflow-x: auto; }
.hc-body pre code { background: none; padding: 0; }
.hc-body hr { border: 0; border-top: 1px solid var(--border); margin: 20px 0; }
.hc-note { background: var(--mist); border-left: 4px solid var(--petrol); padding: 10px 14px; border-radius: 0 6px 6px 0; margin: 0 0 14px; }
.hc-note p { margin: 0; }
.hc-disclaimer { font-size: 13px; color: var(--muted); border-top: 1px solid var(--border); padding-top: 12px; margin-top: 22px; }
.hc-feedback { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; background: #f6f7f8; border-radius: 8px; padding: 12px 14px; margin-top: 8px; }
.hc-feedback > span { font-weight: 600; margin-right: auto; } .hc-thanks { color: #157347; font-weight: 600; }
.hc-side { margin-bottom: 16px; } .hc-side h2 { font-size: 15px; margin: 0 0 8px; }
.hc-side a { display: block; padding: 6px 0; font-size: 14px; border-bottom: 1px solid #eef0f0; } .hc-side a:last-child { border-bottom: 0; }
.hc-side p { font-size: 14px; margin: 0 0 10px; } .hc-side button { width: 100%; }
.hc-prefill { background: var(--mist); color: #005f64; border-radius: 6px; padding: 8px 10px; font-size: 14px; margin-bottom: 6px; }
.hc-link { display: flex; flex-direction: column; gap: 3px; color: var(--text); }
.hc-link:hover { border-color: var(--petrol); text-decoration: none; } .hc-link span.muted { font-size: 14px; }
.hc-browse { display: block; margin-top: 8px; font-weight: 600; font-size: 14px; }

/* ---------- Reports ---------- */
.rp-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.rp-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 16px; }
.rp-filters select { width: auto; min-width: 180px; }
.seg { display: inline-flex; background: #e5e5e9; border-radius: 8px; padding: 3px; gap: 2px; }
.seg button { background: transparent; color: var(--muted); padding: 6px 12px; font-size: 14px; border-radius: 6px; }
.seg button:hover { background: rgba(255,255,255,.6); color: var(--text); }
.seg button[aria-pressed=true] { background: #fff; color: var(--text); box-shadow: 0 1px 2px rgba(0,0,40,.12); }
.btn-link { margin-left: auto; font-weight: 600; font-size: 14px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 6px; background: #fff; }
.btn-link:hover { background: var(--mist); text-decoration: none; }
#rp-body { transition: opacity .15s; } #rp-body.loading { opacity: .55; pointer-events: none; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; }
.kpi-label { font-size: 13px; color: var(--muted); }
.kpi-value { font-size: 28px; font-weight: 700; margin: 2px 0 4px; color: var(--text); }
.kpi-delta { display: block; font-size: 12px; color: var(--muted); }
.kpi-delta.up-good { color: #157347; } .kpi-delta.down-bad { color: var(--danger); }
.rp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.rp-card { margin: 0; min-width: 0; } .rp-card.wide { grid-column: 1 / -1; }
@media (max-width: 900px) { .rp-grid { grid-template-columns: 1fr; } }
.rp-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.rp-card-head h2 { margin: 0; } .rp-sub { font-size: 13px; margin-top: 2px; }
.rp-legend { display: flex; gap: 16px; margin: 10px 0 4px; font-size: 13px; color: var(--muted); min-height: 4px; }
.lg-item { display: inline-flex; align-items: center; gap: 6px; }
.lg-key.line { width: 14px; height: 2px; border-radius: 1px; } .lg-key.rect { width: 10px; height: 10px; border-radius: 2px; }
.rp-chart { margin-top: 6px; } .rp-empty { padding: 24px 0; text-align: center; }
.rp-chart svg { display: block; overflow: visible; }
.c-grid { stroke: #ececf0; stroke-width: 1; } .c-axis { stroke: #c3c2b7; stroke-width: 1; }
.c-tick { fill: #6b6b7b; font-size: 11px; font-variant-numeric: tabular-nums; }
.c-endlabel { fill: var(--text); font-size: 12px; font-weight: 600; }
.c-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.c-dot { stroke: #fff; stroke-width: 2; }
.c-cross { stroke: #5a5a6e; stroke-width: 1; }
.c-hit { outline: none; } .c-hit:focus-visible { outline: 2px solid #87d2d2; }
.hb { display: flex; flex-direction: column; }
.hb-row { display: grid; grid-template-columns: 150px 1fr; align-items: center; gap: 10px; padding: 4px 0; border-radius: 4px; outline: none; }
.hb-row:hover, .hb-row:focus-visible { background: #f6f7f8; }
.hb-row:focus-visible { box-shadow: 0 0 0 2px #87d2d2; }
.hb-label { font-size: 13px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hb-track { display: flex; flex-direction: column; gap: 2px; border-left: 1px solid #c3c2b7; }
.hb-line { display: flex; align-items: center; gap: 6px; min-height: 18px; }
.hb-bar { height: 16px; border-radius: 0 4px 4px 0; }
.hb.grouped .hb-bar { height: 10px; } .hb.grouped .hb-line { min-height: 12px; }
.hb-val { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.chart-tip { position: absolute; z-index: 50; display: none; pointer-events: none; background: #fff; border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 10px; box-shadow: 0 4px 16px rgba(0,0,40,.12); font-size: 13px; min-width: 130px; }
.chart-tip-title { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.chart-tip-row { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.chart-tip-row b { font-variant-numeric: tabular-nums; color: var(--text); }
.chart-tip-name { color: var(--muted); }
.chart-tip-key.line { width: 12px; height: 2px; border-radius: 1px; flex: none; } .chart-tip-key.rect { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.num-table td:not(:first-child), .num-table th:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Team page: admin switch ---------- */
.switch { display: inline-flex; align-items: center; gap: 10px; margin: 0; font-weight: 600; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .slider { width: 40px; height: 22px; border-radius: 999px; background: #ccccd4; position: relative; transition: background .15s; flex: none; }
.switch .slider::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,40,.25); }
.switch input:checked + .slider { background: var(--primary); }
.switch input:checked + .slider::after { transform: translateX(18px); }
.switch input:focus-visible + .slider { outline: 2px solid #87d2d2; outline-offset: 2px; }
.switch input:disabled + .slider { opacity: .6; cursor: not-allowed; }
.switch-label { font-size: 13px; color: var(--muted); }
code { background: #ececf0; padding: 1px 5px; border-radius: 4px; font-size: 12px; }

/* ---------- Announcements (engineers) ---------- */
.ann-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1000px) { .ann-grid { grid-template-columns: 1fr; } }
.ann-types { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.ann-type { margin: 0; display: block; }
.ann-type input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ann-type span { display: block; text-align: center; padding: 8px 4px; border: 2px solid var(--border); border-radius: 6px; font-size: 13px; font-weight: 600; cursor: pointer; background: #fff; }
.ann-type input:checked + span { color: #fff; }
.ann-type.outage input:checked + span { background: #c3002d; border-color: #c3002d; }
.ann-type.maint input:checked + span { background: #b45309; border-color: #b45309; }
.ann-type.resolved input:checked + span { background: #157347; border-color: #157347; }
.ann-type.notice input:checked + span { background: var(--primary); border-color: var(--primary); }
.ann-type input:focus-visible + span { outline: 2px solid #87d2d2; }
.ann-times { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .ann-times { grid-template-columns: 1fr; } }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-check { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 5px 10px; border: 1px solid var(--border); border-radius: 999px; font-weight: 400; font-size: 13px; background: #fff; cursor: pointer; }
.chip-check input { width: auto; margin: 0; }
.chip-check:has(input:checked) { border-color: var(--petrol); background: var(--mist); }
.ann-preview { position: sticky; top: 12px; }
.ann-preview-head { display: flex; justify-content: space-between; align-items: baseline; }
.ann-subject { font-size: 14px; margin: -4px 0 10px; }
.ann-preview iframe { width: 100%; height: 640px; border: 1px solid var(--border); border-radius: 6px; background: #f3f3f0; }
.ann-chip { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 2px 8px; border-radius: 4px; color: #fff; white-space: nowrap; }
.ann-chip.outage { background: #c3002d; } .ann-chip.maint { background: #b45309; } .ann-chip.resolved { background: #157347; } .ann-chip.notice { background: var(--primary); }
button.small { padding: 5px 10px; font-size: 13px; }
.live { color: #157347; font-weight: 600; } .bad { color: var(--danger); }

/* ---------- Customer portal: announcement banners ---------- */
.pt-alert { border-radius: 8px; margin: 0 0 14px; color: #fff; border-left: 6px solid; background: rgba(255,255,255,.08); }
.pt-alert.outage { border-color: #ff5c7a; background: rgba(195,0,45,.35); }
.pt-alert.maint { border-color: #ffb54d; background: rgba(180,83,9,.35); }
.pt-alert.resolved { border-color: #5ed39a; background: rgba(21,115,71,.35); }
.pt-alert.notice { border-color: var(--petrol-light); background: rgba(0,153,153,.25); }
.pt-alert summary { cursor: pointer; padding: 10px 14px; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; list-style: none; }
.pt-alert summary::-webkit-details-marker { display: none; }
.pt-alert summary::after { content: "Details ▾"; margin-left: auto; font-size: 12px; opacity: .8; }
.pt-alert[open] summary::after { content: "Hide ▴"; }
.pt-alert-tag { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; background: rgba(0,0,40,.45); padding: 2px 8px; border-radius: 4px; }
.pt-alert-when { font-size: 13px; opacity: .9; }
.pt-alert-body { padding: 0 14px 12px; font-size: 14px; color: #e5e5e9; }
.pt-alert-body p { margin: 8px 0 0; color: #e5e5e9; white-space: pre-wrap; }

/* ---------- Engineer views: email notification status ---------- */
.email-status { font-size: 12px; margin-top: 6px; white-space: normal; }
.email-status.ok { color: #157347; } .email-status.bad { color: var(--danger); }
.email-hint { font-size: 13px; color: var(--muted); align-self: center; }

/* ---------- Engineer views: portal fields ---------- */
.card.narrow { max-width: 640px; }
.sec-tag { display: inline-block; background: #fee2e2; color: #991b1b; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 4px; text-transform: uppercase; letter-spacing: .03em; }
tr.sec td:first-child { box-shadow: inset 3px 0 0 var(--danger); }
.sec-banner { background: #fee2e2; color: #991b1b; font-weight: 700; padding: 6px 10px; border-radius: 6px; margin-bottom: 10px; font-size: 14px; }
.stat.alert { border-top-color: var(--danger); } .stat.alert .n { color: var(--danger); }
.pt-radios { border: 1px solid var(--border); border-radius: 6px; margin: 14px 0 0; padding: 6px 12px 10px; }
.pt-radios legend { font-weight: 600; font-size: 13px; padding: 0 4px; }
.pt-radios label { display: flex; align-items: center; gap: 8px; font-weight: 400; margin: 6px 0 0; font-size: 14px; }
.pt-radios input { width: auto; margin: 0; }

/* ---------- Customer portal (SGT GovCORE Support Desk) ---------- */
body.portal-page .topbar { display: none; }
body.portal-page main { max-width: none; margin: 0; padding: 0; }
body.portal-page { background: #f0f4f4; font-size: 16px; line-height: 1.5; }
.pt-hero { background: var(--deep-blue); border-bottom: 5px solid var(--petrol); color: #fff; padding: 40px 20px 56px; }
.pt-wrap { max-width: 1000px; margin: 0 auto; }
.pt-hero h1 { margin: 0 0 6px; font-size: 2rem; letter-spacing: -.02em; }
.pt-hero p { margin: 0 0 20px; color: #b9c4d8; }
.pt-userbar { display: flex; justify-content: flex-end; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 14px; font-size: .9rem; color: #b9c4d8; }
.pt-brand { color: #fff; font-size: 1.05rem; margin-right: auto; }
#pt-signout { background: none; border: 1px solid #5b6b82; color: #fff; border-radius: 6px; padding: 4px 12px; font-weight: 400; }
#pt-signout:hover { border-color: var(--petrol-light); }
#pt-search { width: 100%; max-width: 520px; padding: 12px 14px; border-radius: 8px; border: 0; font: inherit; }
.pt-main { max-width: 1000px; margin: -28px auto 40px; padding: 0 20px; display: grid; grid-template-columns: 340px 1fr; gap: 20px; align-items: start; }
@media (max-width: 760px) { .pt-main { grid-template-columns: 1fr; } }
.pt-card { background: #fff; border: 1px solid #d3dcdc; border-radius: 10px; padding: 20px; }
.pt-card h2 { margin: 0 0 14px; font-size: 1.15rem; }
.pt-card label { font-size: .9rem; }
.pt-card input, .pt-card select, .pt-card textarea { padding: 10px; border-color: #d3dcdc; }
.pt-primary { margin-top: 16px; width: 100%; padding: 11px; }
#pt-msg { margin-top: 10px; font-size: .9rem; color: #157347; min-height: 1.3em; }
#pt-msg.err { color: var(--danger); }
.pt-tabs { display: flex; gap: 6px; margin-bottom: 14px; border-bottom: 1px solid #d3dcdc; }
.pt-tab { background: none; border: 0; border-radius: 0; padding: 8px 12px; color: var(--muted); border-bottom: 3px solid transparent; }
.pt-tab:hover { background: none; color: var(--text); }
.pt-tab[aria-selected=true] { color: var(--text); border-color: var(--primary); }
.pt-ticket, .pt-faq { border: 1px solid #d3dcdc; border-radius: 8px; padding: 12px 14px; margin-bottom: 10px; }
.pt-top { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.pt-ticket > small { color: var(--muted); }
.pt-desc { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 4px; }
.pt-badge { font-size: .78rem; font-weight: 700; padding: 2px 9px; border-radius: 99px; border: 1px solid currentColor; white-space: nowrap; }
.st-Open { color: #b45309; } .st-In-Progress { color: var(--primary); } .st-Waiting-on-Customer { color: #6d28d9; }
.st-Resolved { color: #157347; } .st-Closed { color: var(--muted); }
.pt-prio { font-weight: 700; }
.pt-prio.Critical { color: #b42318; } .pt-prio.High { color: #b45309; } .pt-prio.Medium { color: var(--primary); } .pt-prio.Low { color: var(--muted); }
.pt-actions { margin-top: 8px; }
.pt-link { background: none; border: 0; color: var(--primary); padding: 0; font-size: .9rem; margin-right: 14px; font-weight: 600; }
.pt-link:hover { background: none; text-decoration: underline; }
.pt-faq summary { cursor: pointer; font-weight: 600; }
.pt-faq p { margin: 8px 0 0; color: var(--muted); }
.pt-thread { margin-top: 10px; border-top: 1px solid #d3dcdc; padding-top: 8px; }
.pt-thread summary { cursor: pointer; font-weight: 600; font-size: .9rem; }
.pt-m { max-width: 90%; padding: 8px 10px; border-radius: 8px; margin: 8px 0; border: 1px solid #d3dcdc; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .92rem; }
.pt-m small { display: block; color: var(--muted); white-space: normal; }
.pt-m.eng { margin-left: auto; background: var(--mist); border-color: #b7dcdc; }
.pt-reply textarea { min-height: 70px; margin-top: 6px; }
.pt-reply button { margin-top: 6px; padding: 7px 14px; }
.pt-new { color: var(--primary); }
.pt-empty { color: var(--muted); padding: 20px 0; text-align: center; }

/* ---------- Login / sign-up page ---------- */
.sso-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; margin-top: 18px; padding: 12px;
  background: var(--deep-blue); color: #fff; border-radius: 6px; font-weight: 600; font-size: 15px; border: 2px solid var(--deep-blue); }
.sso-btn::before { content: ""; width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--petrol-light); box-sizing: border-box; }
.sso-btn:hover { background: #14143c; color: #fff; text-decoration: none; }
.sso-btn.busy { opacity: .7; pointer-events: none; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; margin: 22px 0 4px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.login-panel #err { margin-top: 14px; }
.small-note { font-size: 13px; }
body.auth-page .topbar { display: none; }
body.auth-page main { max-width: none; margin: 0; padding: 0; }
.login-wrap { display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; }
.login-brand { background: linear-gradient(150deg, var(--deep-blue) 0%, var(--deep-blue) 45%, #00464b 100%); color: #fff; padding: 64px 56px; display: flex; flex-direction: column; justify-content: center; }
.login-brand .logo { font-size: 20px; font-weight: 700; margin-bottom: 48px; }
.login-brand h2 { font-size: 34px; line-height: 1.2; margin: 0 0 24px; max-width: 420px; }
.login-brand ul { list-style: none; padding: 0; margin: 0 0 32px; }
.login-brand li { padding: 8px 0 8px 28px; position: relative; color: #e5e5e9; }
.login-brand li::before { content: "✓"; position: absolute; left: 0; color: var(--bold-green); font-weight: 700; }
.login-brand h2 span { color: var(--petrol-light); }
.login-brand .small { color: #9999a9; font-size: 13px; max-width: 380px; }
.login-panel { display: flex; flex-direction: column; justify-content: center; padding: 48px; max-width: 480px; width: 100%; margin: 0 auto; }
.login-panel h1 { font-size: 26px; margin: 24px 0 4px; }
.login-panel form { margin-top: 12px; }
.tabs { display: flex; background: #e5e5e9; border-radius: 8px; padding: 4px; }
.tabs a { flex: 1; text-align: center; padding: 8px; border-radius: 6px; color: var(--muted); font-weight: 600; font-size: 14px; }
.tabs a.active { background: #fff; color: var(--primary); box-shadow: inset 0 -3px 0 var(--petrol), 0 1px 2px rgba(0,0,40,.08); }
.pw { position: relative; }
.pw input { padding-right: 64px; }
.pw-toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); background: transparent; color: var(--primary); padding: 6px 10px; font-size: 13px; }
.pw-toggle:hover { background: var(--mist); }
.login-row { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; font-size: 14px; }
.login-row .check { margin: 0; font-size: 14px; }
button.full { width: 100%; margin-top: 18px; padding: 11px; font-size: 15px; }
button:disabled { opacity: .6; cursor: wait; }
input:focus, select:focus, textarea:focus { outline: 2px solid #87d2d2; border-color: var(--primary); }
.info { color: #005f64; background: var(--mist); font-size: 14px; margin-top: 12px; padding: 8px 10px; border-radius: 6px; }
.error:empty { display: none; }
.center { text-align: center; margin-top: 20px; }
@media (max-width: 820px) {
  .login-wrap { grid-template-columns: 1fr; }
  .login-brand { padding: 32px 24px; }
  .login-brand h2 { font-size: 24px; } .login-brand ul, .login-brand .small { display: none; }
  .login-brand .logo { margin-bottom: 12px; }
  .login-panel { padding: 24px; }
}

.toast { position: fixed; bottom: 20px; right: 20px; background: var(--deep-blue); border-left: 4px solid var(--petrol); color: #fff; padding: 10px 16px; border-radius: 8px; }
.hidden { display: none; }

/* ---------- Change requests ---------- */
a.btn { display: inline-block; background: var(--primary); color: #fff; padding: 9px 16px; border-radius: 6px; font-weight: 600; font-size: 15px; text-decoration: none; }
a.btn:hover { background: var(--primary-dark); text-decoration: none; }
a.btn.secondary { background: #e5e5e9; color: var(--text); } a.btn.secondary:hover { background: #ccccd4; }
.nav-badge { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 2px; border-radius: 999px; background: #eb6834; color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; vertical-align: 1px; }
.nav-badge[hidden] { display: none; }
.small { font-size: 13px; } .nowrap { white-space: nowrap; } .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.cr-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; } .cr-head h1 { margin: 0; }
.stat.attention { border-top-color: #eb6834; } .stat.attention .n { color: #b5461b; }
.cr-tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--border); }
.cr-tab { background: none; color: var(--muted); border-radius: 0; padding: 8px 12px; border-bottom: 3px solid transparent; margin-bottom: -1px; font-size: 14px; }
.cr-tab:hover { background: var(--mist); color: var(--text); } .cr-tab.on { color: var(--text); border-bottom-color: var(--petrol); }
.cr-filter-note { font-size: 13px; margin: 10px 0 0; }
.table-scroll { overflow-x: auto; }
tr.clickable { cursor: pointer; } tr.clickable:hover td { background: var(--mist); }
.cr-table td { vertical-align: top; } .cr-title { font-weight: 600; }
.cr-await { display: inline-block; margin-top: 4px; font-size: 12px; font-weight: 700; color: #b5461b; }
.cr-await::before { content: "● "; }
/* change type badges */
.t-Standard { background: #e6f5f5; color: #005f64; } .t-Minor { background: #e0f2fe; color: #075985; }
.t-Major { background: #ffedd5; color: #9a3412; } .t-Emergency { background: #c3002d; color: #fff; }
.i-Low { background: #f3f4f6; color: #4b5563; } .i-Medium { background: #fef3c7; color: #92400e; } .i-High { background: #fee2e2; color: #991b1b; }
/* change statuses */
.s-Peer-Review { background: #e0f2fe; color: #075985; } .s-CAB-Review { background: #ede9fe; color: #5b21b6; }
.s-More-Info-Needed { background: #fef3c7; color: #92400e; } .s-Approved { background: #dcfce7; color: #166534; }
.s-Rejected { background: #fee2e2; color: #991b1b; } .s-Implemented { background: #157347; color: #fff; }
.s-Rolled-Back { background: #ffedd5; color: #9a3412; } .s-Cancelled { background: #e5e7eb; color: #374151; }
/* form */
.cr-form { max-width: 860px; }
.cr-types { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
@media (max-width: 760px) { .cr-types { grid-template-columns: 1fr 1fr; } }
.cr-type { margin: 0; } .cr-type input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cr-type span { display: block; height: 100%; padding: 10px 12px; border: 2px solid var(--border); border-radius: 8px; background: #fff; cursor: pointer; font-weight: 400; }
.cr-type span b { display: block; font-size: 14px; margin-bottom: 2px; } .cr-type small { color: var(--muted); font-size: 12px; line-height: 1.35; display: block; }
.cr-type input:checked + span { border-color: var(--petrol); background: var(--mist); }
.cr-type.ct-Emergency input:checked + span { border-color: #c3002d; background: #fdecef; }
.cr-type input:focus-visible + span { outline: 2px solid #87d2d2; outline-offset: 2px; }
.cr-alert { border-radius: 8px; padding: 10px 12px; font-size: 14px; margin: 12px 0; border-left: 4px solid; }
.cr-alert.info { background: var(--mist); border-color: var(--petrol); } .cr-alert.warn { background: #fff4e5; border-color: #eb6834; }
.cr-alert.wait { background: #fef3c7; border-color: #d97706; }
/* detail */
.cr-detail { grid-template-columns: 1fr 320px; }
@media (max-width: 860px) { .cr-detail { grid-template-columns: 1fr; } }
.cr-titlebar { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; } .cr-id { font-weight: 700; color: var(--muted); font-size: 14px; }
.cr-sec { font-size: 14px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); margin: 20px 0 6px; }
.cr-sys { display: inline-block; padding: 3px 10px; margin: 0 6px 6px 0; border-radius: 999px; background: var(--mist); color: #005f64; font-size: 13px; font-weight: 600; }
.cr-rollback { background: #f7f7f5; border-left: 3px solid var(--petrol); padding: 8px 12px; border-radius: 0 6px 6px 0; }
.cr-steps { list-style: none; display: flex; padding: 0; margin: 4px 0 6px; counter-reset: s; }
.cr-steps li { flex: 1; position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; font-size: 13px; font-weight: 600; color: var(--muted); gap: 6px; }
.cr-steps li::before { content: ""; position: absolute; top: 9px; right: 50%; left: -50%; height: 3px; background: var(--border); z-index: 0; }
.cr-steps li:first-child::before { display: none; }
.cr-steps .dot { width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 3px solid var(--border); position: relative; z-index: 1; box-sizing: border-box; }
.cr-steps small { display: block; font-weight: 400; font-size: 11px; }
.cr-steps li.done { color: var(--text); } .cr-steps li.done .dot { background: var(--petrol); border-color: var(--petrol); }
.cr-steps li.done::before, .cr-steps li.current::before, .cr-steps li.bad::before, .cr-steps li.wait::before, .cr-steps li.skipped::before { background: var(--petrol); }
.cr-steps li.current { color: var(--text); } .cr-steps li.current .dot { border-color: var(--petrol); box-shadow: 0 0 0 4px var(--mist); }
.cr-steps li.bad { color: #991b1b; } .cr-steps li.bad .dot { background: #c3002d; border-color: #c3002d; }
.cr-steps li.wait { color: #92400e; } .cr-steps li.wait .dot { background: #fbbf24; border-color: #d97706; }
.cr-steps li.skipped .dot { border-style: dashed; }
.cr-action { border-top: 3px solid #eb6834; }
.cr-decisions { display: grid; gap: 6px; } .cr-decisions.two { grid-template-columns: 1fr 1fr; }
.cr-dec { margin: 0; } .cr-dec input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cr-dec span { display: block; padding: 8px 10px; border: 2px solid var(--border); border-radius: 6px; background: #fff; cursor: pointer; font-size: 14px; }
.cr-dec input:focus-visible + span { outline: 2px solid #87d2d2; outline-offset: 2px; }
.cr-dec.ok input:checked + span { border-color: #157347; background: #dcfce7; color: #14532d; }
.cr-dec.bad input:checked + span { border-color: #c3002d; background: #fee2e2; color: #7f1d1d; }
.cr-dec.wait input:checked + span { border-color: #d97706; background: #fef3c7; color: #78350f; }
.cr-log { list-style: none; padding: 0; margin: 0 0 8px; }
.cr-log li { border-left: 3px solid var(--border); padding: 6px 12px; margin: 10px 0; }
.cr-log li.ok { border-color: #157347; } .cr-log li.bad { border-color: #c3002d; } .cr-log li.wait { border-color: #d97706; }
.cr-log li.comment { border-color: var(--petrol); } .cr-log .meta { font-size: 13px; color: var(--muted); margin-bottom: 3px; }
.cr-log .meta b { color: var(--text); }
.cr-decision { font-weight: 700; } .cr-decision.ok { color: #157347; } .cr-decision.bad { color: #c3002d; } .cr-decision.wait { color: #b45309; }
.cr-type.ct-Emergency span b { color: #c3002d; }
/* small screens: let the menu wrap instead of running off the page */
@media (max-width: 900px) {
  .topbar { flex-wrap: wrap; gap: 8px 16px; padding: 10px 16px; }
  #nav { flex-wrap: wrap; gap: 6px 14px; }
  #nav .who { flex-basis: 100%; order: 10; font-size: 12px; }
}
@media (max-width: 860px) { .cr-detail > div:last-child { order: -1; } }
@media (max-width: 560px) {
  .cr-steps li { font-size: 11px; } .cr-steps small { font-size: 10px; }
  .cr-steps li > span:last-child { padding: 0 2px; overflow-wrap: anywhere; }
}
