/* Systemic Desk – design system (spec 13.1): colourful, dignified, not crowded. */
:root {
  --brand: #1B4F8C; --brand-2: #1F6FD1; --brand-soft: #E8F0FA; --mint: #7FD8BE; --mint-soft: #E6F7F1;
  --ink: #0F1B33; --text: #3D4C63; --muted: #5B6B7F; --line: #E3E8EF; --bg: #F5F7FB; --card: #FFFFFF;
  --red: #C4321F; --red-soft: #FDECEA; --orange: #D9711C; --orange-soft: #FDF1E6; --blue: #1F6FD1; --blue-soft: #E8F0FA;
  --slate: #6B7F99; --slate-soft: #EEF2F7; --green: #1E8E5A; --green-soft: #E5F5EC; --mustard: #A97D0A; --mustard-soft: #FBF4DE;
  --purple: #6941C6; --purple-soft: #F1ECFB;
  --r: 14px; --r-sm: 9px; --shadow: 0 1px 2px rgba(15,27,51,.05), 0 4px 14px rgba(15,27,51,.05);
  --t: 200ms cubic-bezier(.2,.7,.3,1);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { overflow-x: clip; margin: 0; background: var(--bg); color: var(--text); font: 15px/1.55 "Heebo", system-ui, -apple-system, "Segoe UI", Arial, sans-serif; direction: rtl; }
a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { color: var(--ink); line-height: 1.25; margin: 0 0 .6em; }
h1 { font-size: 1.55rem; font-weight: 700; } h2 { font-size: 1.15rem; font-weight: 700; } h3 { font-size: 1rem; font-weight: 600; }
small, .muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
:focus-visible { outline: 3px solid rgba(31,111,209,.35); outline-offset: 2px; border-radius: 6px; }

/* ---------- shell */
.shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.side { background: var(--ink); color: #C9D3E3; padding: 18px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.side .brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 1.1rem; padding: 4px 8px 16px; }
.side .brand small { display: block; color: #8FA0BA; font-weight: 400; font-size: .72rem; }
.side .brand svg path { fill: #fff; } .side .brand svg circle:first-of-type { fill: var(--ink); }
.side a.nav { display: flex; align-items: center; gap: 10px; color: #C9D3E3; padding: 9px 12px; border-radius: 10px; font-weight: 500; transition: background var(--t), color var(--t); }
.side a.nav:hover { background: rgba(255,255,255,.07); color: #fff; text-decoration: none; }
.side a.nav.on { background: rgba(127,216,190,.14); color: #fff; box-shadow: inset -3px 0 0 var(--mint); }
.side a.nav svg { width: 19px; height: 19px; flex: none; opacity: .9; }
.side .navgroup { color: #6F819D; font-size: .72rem; letter-spacing: .04em; padding: 14px 12px 4px; }
.side .count { margin-inline-start: auto; background: var(--red); color: #fff; font-size: .72rem; font-weight: 700; border-radius: 999px; padding: 1px 7px; }
.side .foot { margin-top: auto; padding: 12px 8px 0; font-size: .75rem; color: #6F819D; border-top: 1px solid rgba(255,255,255,.08); }
.main { min-width: 0; display: flex; flex-direction: column; }
.top { display: flex; align-items: center; gap: 12px; padding: 12px 28px; background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.top form.search { flex: 1; max-width: 420px; }
.top .user { margin-inline-start: auto; display: flex; align-items: center; gap: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-weight: 700; flex: none; }
.content { padding: 24px 28px 60px; max-width: 1320px; width: 100%; }
.menu-btn { display: none; }
.pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.pagehead h1 { margin: 0; }
.pagehead .sub { color: var(--muted); margin-top: 4px; }

/* ---------- bars */
.majorbar { background: var(--purple); color: #fff; padding: 9px 28px; display: flex; gap: 10px; align-items: center; font-weight: 500; }
.majorbar a { color: #fff; text-decoration: underline; }
.majorbar .dot { width: 9px; height: 9px; border-radius: 50%; background: #fff; animation: pulse 1.8s ease-out 3; }
.demobar { background: linear-gradient(90deg, #0F1B33, #1B4F8C); color: #fff; padding: 8px 28px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-size: .9rem; }
.demobar form { display: inline; }
.demobar .roles { display: flex; gap: 6px; flex-wrap: wrap; margin-inline-start: auto; }
.demobar button { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.18); border-radius: 999px; padding: 4px 12px; font: inherit; cursor: pointer; }
.demobar button.on { background: var(--mint); color: var(--ink); border-color: var(--mint); font-weight: 600; }
.betatag { background: var(--orange); color: #fff; font-size: .68rem; font-weight: 700; border-radius: 6px; padding: 1px 6px; margin-inline-start: 4px; }

/* ---------- cards & grid */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 20px; }
.card + .card { margin-top: 16px; }
.card h2 { display: flex; align-items: center; gap: 8px; }
.card h2 .act { margin-inline-start: auto; font-size: .85rem; font-weight: 500; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0,1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0,1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.split { display: grid; grid-template-columns: minmax(0,1fr) 340px; gap: 18px; align-items: start; }
.stack > * + * { margin-top: 16px; }

/* ---------- KPI */
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; box-shadow: var(--shadow); position: relative; overflow: hidden; display: block; color: inherit; transition: transform var(--t), box-shadow var(--t); }
.kpi:hover { transform: translateY(-2px); text-decoration: none; box-shadow: 0 6px 20px rgba(15,27,51,.09); }
.kpi .lbl { color: var(--muted); font-size: .85rem; font-weight: 500; }
.kpi .val { font-size: 2.1rem; font-weight: 700; color: var(--ink); line-height: 1.1; margin-top: 6px; font-variant-numeric: tabular-nums; }
.kpi::before { content: ""; position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 4px; background: var(--brand-2); }
.kpi.k-new::before { background: var(--blue); } .kpi.k-prog::before { background: var(--mint); } .kpi.k-wait::before { background: var(--mustard); }
.kpi.k-ok::before { background: var(--green); } .kpi.k-slate::before { background: var(--slate); }
.kpi.k-breach { background: var(--red); border-color: var(--red); } .kpi.k-breach::before { display: none; }
.kpi.k-breach .lbl, .kpi.k-breach .val { color: #fff; }
.kpi.k-breach.zero { background: var(--card); border-color: var(--line); } .kpi.k-breach.zero .lbl { color: var(--muted); } .kpi.k-breach.zero .val { color: var(--ink); }
.kpi.k-breach.zero::before { display: block; background: var(--green); }

/* ---------- charts */
.bars { display: flex; align-items: flex-end; gap: 6px; height: 150px; padding-top: 8px; }
.bars .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; min-width: 0; }
.bars .pair { display: flex; gap: 2px; align-items: flex-end; height: 100%; width: 100%; justify-content: center; }
.bars .b { width: 42%; max-width: 14px; border-radius: 5px 5px 2px 2px; background: var(--brand-2); transform-origin: bottom; }
.bars .b.c2 { background: var(--mint); }
.bars .d { font-size: .68rem; color: var(--muted); white-space: nowrap; }
.legend { display: flex; gap: 14px; font-size: .8rem; color: var(--muted); margin-top: 10px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-inline-end: 5px; vertical-align: -1px; }
.hbar { display: grid; grid-template-columns: 130px 1fr 34px; gap: 10px; align-items: center; margin: 7px 0; font-size: .9rem; }
.hbar .track { height: 10px; background: var(--slate-soft); border-radius: 99px; overflow: hidden; }
.hbar .fill { height: 100%; background: var(--brand-2); border-radius: 99px; transform-origin: right; }
.hbar .n { text-align: left; font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 600; }
.grow { animation: grow 900ms cubic-bezier(.2,.7,.3,1) both; }
.growx { animation: growx 900ms cubic-bezier(.2,.7,.3,1) both; }
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes growx { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255,255,255,.7); } 100% { box-shadow: 0 0 0 9px rgba(255,255,255,0); } }
@keyframes pulse-red { 0% { box-shadow: 0 0 0 0 rgba(196,50,31,.5); } 100% { box-shadow: 0 0 0 7px rgba(196,50,31,0); } }
@keyframes pulse-mint { 0% { box-shadow: 0 0 0 0 rgba(30,142,90,.5); } 100% { box-shadow: 0 0 0 7px rgba(30,142,90,0); } }

/* meter (quota usage) */
.meter { height: 9px; background: var(--slate-soft); border-radius: 99px; overflow: hidden; }
.meter > span { display: block; height: 100%; background: var(--green); border-radius: 99px; transform-origin: right; }
.meter.warn > span { background: var(--orange); } .meter.over > span { background: var(--red); }

/* ---------- badges */
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: .78rem; font-weight: 600; border-radius: 999px; padding: 2px 9px; white-space: nowrap; line-height: 1.6; }
.badge svg { width: 13px; height: 13px; }
.p1, .s-breach { background: var(--red-soft); color: var(--red); }
.p2, .s-warn { background: var(--orange-soft); color: #A4520F; }
.p3 { background: var(--blue-soft); color: var(--blue); }
.p4 { background: var(--slate-soft); color: #4C5E77; }
.s-ok, .st-closed, .s-done { background: var(--green-soft); color: var(--green); }
.st-new { background: var(--blue-soft); color: var(--blue); }
.st-in_progress { background: var(--mint-soft); color: #1B6F55; }
.st-waiting_vendor, .st-waiting_client, .st-waiting_approval, .s-paused { background: var(--mustard-soft); color: var(--mustard); }
.st-major { background: var(--purple-soft); color: var(--purple); }
.badge.dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.s-breach.dot::before { animation: pulse-red 1.6s ease-out 3; }
.tag { display: inline-block; background: var(--slate-soft); color: #4C5E77; border-radius: 6px; padding: 1px 7px; font-size: .78rem; }

/* ---------- tables */
.table-wrap { overflow-x: auto; margin: 0 -20px; padding: 0 20px; }
table.t { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.t th { text-align: right; font-weight: 600; color: var(--muted); font-size: .8rem; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tbody tr { transition: background var(--t); }
table.t tbody tr:hover { background: #FAFBFD; }
table.t tr.rowlink { cursor: pointer; }
table.t tr.is-breach td:first-child { box-shadow: inset -3px 0 0 var(--red); }
table.t tr.is-warn td:first-child { box-shadow: inset -3px 0 0 var(--orange); }
table.t td.subj a { color: var(--ink); font-weight: 600; }
table.t td .sub { color: var(--muted); font-size: .8rem; }
.tnum { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- forms */
label { display: block; font-weight: 600; color: var(--ink); font-size: .88rem; margin-bottom: 5px; }
label .req { color: var(--red); }
.field { margin-bottom: 14px; }
.hint { color: var(--muted); font-size: .8rem; font-weight: 400; margin-top: 4px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time], input[type=search], input[type=tel], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fff; border: 1px solid #CFD8E3; border-radius: var(--r-sm); padding: 9px 12px; transition: border-color var(--t), box-shadow var(--t); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(31,111,209,.15); }
textarea { min-height: 110px; resize: vertical; }
input[type=checkbox], input[type=radio] { width: 17px; height: 17px; accent-color: var(--brand-2); vertical-align: -3px; margin: 0 0 0 6px; }
.check { display: flex; align-items: center; gap: 4px; font-weight: 500; color: var(--text); margin: 6px 0; cursor: pointer; }
.row { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline > * { width: auto; }
fieldset { border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px 4px; margin: 0 0 16px; }
legend { font-weight: 700; color: var(--ink); padding: 0 6px; }
.seg { display: inline-flex; background: var(--slate-soft); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg label { margin: 0; font-weight: 500; font-size: .88rem; padding: 6px 12px; border-radius: 8px; cursor: pointer; color: var(--text); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg input:checked + span { color: var(--ink); }
.seg label:has(input:checked) { background: #fff; box-shadow: 0 1px 3px rgba(15,27,51,.12); color: var(--ink); font-weight: 600; }

/* ---------- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; font: inherit; font-weight: 600; font-size: .92rem; border-radius: 10px; padding: 9px 16px; border: 1px solid transparent; cursor: pointer; background: var(--brand); color: #fff; transition: background var(--t), transform var(--t), box-shadow var(--t); text-decoration: none !important; white-space: nowrap; }
.btn:hover { background: #163F70; }
.btn:active { transform: translateY(1px); }
.btn svg { width: 17px; height: 17px; }
.btn.alt { background: #fff; color: var(--ink); border-color: #CFD8E3; } .btn.alt:hover { background: var(--slate-soft); }
.btn.mint { background: var(--mint); color: var(--ink); } .btn.mint:hover { background: #69CDB0; }
.btn.green { background: var(--green); } .btn.green:hover { background: #18774B; }
.btn.danger { background: #fff; color: var(--red); border-color: #F1C2BB; } .btn.danger:hover { background: var(--red-soft); }
.btn.ghost { background: transparent; color: var(--brand-2); padding: 6px 10px; } .btn.ghost:hover { background: var(--brand-soft); }
.btn.sm { padding: 5px 11px; font-size: .84rem; border-radius: 8px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.linkbtn { background: none; border: 0; color: var(--brand-2); font: inherit; cursor: pointer; padding: 0; }
.linkbtn:hover { text-decoration: underline; }

/* ---------- toasts */
.toasts { position: fixed; bottom: 22px; left: 16px; right: 16px; pointer-events: none; z-index: 99; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { pointer-events: auto; background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 12px; box-shadow: 0 10px 30px rgba(15,27,51,.25); font-weight: 500; animation: toastin 220ms ease-out both; display: flex; gap: 8px; align-items: center; max-width: 90vw; }
.toast.ok { background: #14532D; } .toast.error { background: var(--red); } .toast.info { background: var(--brand); }
.toast.hide { animation: toastout 300ms ease-in both; }
@keyframes toastin { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes toastout { to { opacity: 0; transform: translateY(10px); } }
.alert { border-radius: var(--r-sm); padding: 11px 14px; margin-bottom: 14px; font-weight: 500; }
.alert.error { background: var(--red-soft); color: var(--red); } .alert.ok { background: var(--green-soft); color: var(--green); } .alert.info { background: var(--brand-soft); color: var(--brand); }
.alert.warn { background: var(--mustard-soft); color: #7A5A06; }

/* ---------- ticket page */
.thead { display: flex; gap: 14px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.thead .num { color: var(--muted); font-weight: 600; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.timeline { position: relative; }
.ev { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.ev:last-child { border-bottom: 0; }
.ev .who { font-weight: 600; color: var(--ink); }
.ev .when { color: var(--muted); font-size: .8rem; }
.ev .body { white-space: pre-wrap; word-wrap: break-word; margin-top: 4px; }
.ev.note .bubble { background: #FFFBEA; border: 1px solid #F3E6B5; }
.ev.reply .bubble { background: var(--brand-soft); border: 1px solid #D3E2F5; }
.ev.reply.requester .bubble { background: #fff; border: 1px solid var(--line); }
.ev .bubble { border-radius: 12px; padding: 10px 14px; flex: 1; min-width: 0; }
.ev.sys { padding: 6px 0; font-size: .84rem; color: var(--muted); border-bottom: 0; }
.ev.sys .ico { width: 34px; display: flex; justify-content: center; }
.ev.sys svg { width: 15px; height: 15px; }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 6px 10px; font-size: .9rem; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; color: var(--ink); min-width: 0; overflow-wrap: anywhere; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: -4px 0 14px; }
.tabs label { margin: 0; padding: 8px 12px; border-bottom: 2px solid transparent; cursor: pointer; color: var(--muted); font-weight: 600; }
.tabs input { display: none; }
.tabs label:has(input:checked) { color: var(--ink); border-bottom-color: var(--brand-2); }
.composer.note textarea { background: #FFFDF3; }
.timerbox { display: flex; align-items: center; gap: 10px; background: var(--green-soft); color: var(--green); border-radius: 12px; padding: 10px 14px; font-weight: 600; }
.timerbox .pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--green); animation: pulse-mint 1.8s ease-out infinite; }
@media (prefers-reduced-motion: reduce) { .timerbox .pulse { animation: none; } }
.progress-tasks { height: 8px; background: var(--slate-soft); border-radius: 99px; overflow: hidden; margin: 6px 0 12px; }
.progress-tasks span { display: block; height: 100%; background: var(--green); }
.task { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.task:last-child { border-bottom: 0; }
.task.done .ttl { text-decoration: line-through; color: var(--muted); }
.task .ttl { flex: 1; }
.task form { display: inline; }
details.more > summary { cursor: pointer; color: var(--brand-2); font-weight: 600; list-style: none; }
details.more > summary::-webkit-details-marker { display: none; }
details.more[open] > summary { margin-bottom: 12px; }
.files { display: flex; flex-wrap: wrap; gap: 8px; }
.file { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 9px; padding: 5px 10px; font-size: .86rem; background: #fff; }
.file svg { width: 15px; height: 15px; color: var(--muted); }

/* empty states */
.empty { text-align: center; padding: 36px 16px; color: var(--muted); }
.empty svg { width: 120px; height: 90px; margin-bottom: 8px; }
.empty b { display: block; color: var(--ink); font-size: 1.05rem; margin-bottom: 4px; }

/* filters */
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filters select, .filters input { width: auto; min-width: 140px; padding: 7px 10px; }
.pills { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.pill { border: 1px solid var(--line); background: #fff; color: var(--text); border-radius: 999px; padding: 5px 13px; font-size: .86rem; font-weight: 500; }
.pill:hover { text-decoration: none; border-color: #CFD8E3; }
.pill.on { background: var(--ink); color: #fff; border-color: var(--ink); }

/* auth pages */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(1200px 500px at 80% -10%, #DCE8F8 0, transparent 60%), radial-gradient(900px 500px at -10% 110%, #DDF4EC 0, transparent 60%), var(--bg); }
.auth .box { width: 100%; max-width: 410px; }
.auth .logo { display: flex; align-items: center; gap: 10px; justify-content: center; margin-bottom: 18px; font-weight: 700; color: var(--ink); font-size: 1.3rem; }
.auth .logo small { display: block; font-weight: 400; font-size: .78rem; color: var(--muted); }
.auth .card { padding: 26px; }
.auth .foot { text-align: center; color: var(--muted); font-size: .78rem; margin-top: 16px; }
.qr { display: grid; place-items: center; background: #fff; padding: 12px; border: 1px solid var(--line); border-radius: 12px; margin: 12px auto; width: max-content; }
.qr svg, .qr img { width: 190px; height: 190px; display: block; }
.code { font-family: ui-monospace, Consolas, monospace; letter-spacing: .1em; background: var(--slate-soft); padding: 6px 10px; border-radius: 8px; direction: ltr; display: inline-block; word-break: break-all; }

/* demo landing */
.demo-hero { min-height: 100vh; background: radial-gradient(1000px 600px at 85% -10%, #2A5FA3 0, transparent 60%), linear-gradient(160deg, #0F1B33, #16345C); color: #fff; padding: 40px 16px; display: grid; place-items: center; }
.demo-hero .inner { max-width: 1040px; width: 100%; display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; }
.demo-hero h1 { color: #fff; font-size: 2.3rem; }
.demo-hero p.lead { color: #C9D3E3; font-size: 1.08rem; }
.demo-hero .card { color: var(--text); }
.demo-hero ul.feat { list-style: none; padding: 0; margin: 20px 0; display: grid; gap: 10px; }
.demo-hero ul.feat li { display: flex; gap: 10px; align-items: center; color: #E2E8F2; }
.demo-hero ul.feat svg { width: 20px; height: 20px; color: var(--mint); flex: none; }
.rolecards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rolecard { text-align: right; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; cursor: pointer; font: inherit; transition: border-color var(--t), transform var(--t); width: 100%; }
.rolecard:hover { border-color: var(--brand-2); transform: translateY(-1px); }
.rolecard b { display: block; color: var(--ink); } .rolecard small { color: var(--muted); }
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

/* portal */
.portal-top { background: #fff; border-bottom: 1px solid var(--line); }
.portal-top .in { max-width: 1040px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.portal-top nav { display: flex; gap: 4px; flex-wrap: wrap; }
.portal-top nav a { color: var(--text); padding: 7px 12px; border-radius: 9px; font-weight: 500; }
.portal-top nav a.on, .portal-top nav a:hover { background: var(--brand-soft); color: var(--brand); text-decoration: none; }
.portal-main { max-width: 1040px; margin: 0 auto; padding: 24px 20px 60px; }
.hello { background: linear-gradient(120deg, var(--brand), #2667B8); color: #fff; border-radius: var(--r); padding: 22px 24px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.hello h1 { color: #fff; margin: 0 0 4px; } .hello p { margin: 0; color: #D7E4F5; }
.ann { display: flex; gap: 12px; align-items: flex-start; border-radius: var(--r); padding: 14px 16px; margin-bottom: 12px; }
.ann svg { width: 22px; height: 22px; flex: none; margin-top: 2px; }
.ann.outage { background: var(--purple-soft); color: #4A2B97; border: 1px solid #DCD0F5; }
.ann.warning { background: var(--mustard-soft); color: #7A5A06; border: 1px solid #EFE0AF; }
.ann.info { background: var(--brand-soft); color: var(--brand); border: 1px solid #D3E2F5; }
.ann b { display: block; }
.steps-mini { display: flex; gap: 0; margin: 10px 0 2px; }
.steps-mini span { flex: 1; text-align: center; font-size: .78rem; color: var(--muted); padding-top: 10px; border-top: 4px solid var(--line); }
.steps-mini span.on { border-top-color: var(--green); color: var(--green); font-weight: 600; }

/* misc */
.right { text-align: left; } .center { text-align: center; }
.mt0 { margin-top: 0; } .mt { margin-top: 16px; } .mb0 { margin-bottom: 0; }
.nowrap { white-space: nowrap; }
.sep { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
.mailframe { width: 100%; min-height: 70vh; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.print-only { display: none; }

/* ---------- responsive */
@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(3, minmax(0,1fr)); } .split { grid-template-columns: minmax(0,1fr); } }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { display: none; position: fixed; inset-inline-start: 0; top: 0; width: 260px; z-index: 50; }
  body.nav-open .side { display: flex; box-shadow: -10px 0 40px rgba(0,0,0,.3); }
  .demobar .roles { margin-inline-start: 0; }
  .menu-btn { display: inline-flex; }
  .top { padding: 10px 16px; } .content { padding: 18px 16px 50px; } .majorbar, .demobar { padding-inline: 16px; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .demo-hero .inner { grid-template-columns: 1fr; }
  .top form.search { display: none; }
  .table-wrap { margin: 0 -16px; padding: 0 16px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; } }
body.no-motion *, body.no-motion *::before, body.no-motion *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
@media print { .side, .top, .demobar, .majorbar, .no-print { display: none !important; } .shell { display: block; } .print-only { display: block; } .card { box-shadow: none; } }
.toast svg { width: 18px; height: 18px; flex: none; }
.kv dd svg, p svg, .alert svg, h2 svg, summary svg { width: 18px; height: 18px; vertical-align: -3px; }
.bars .col { overflow: hidden; }
@media (max-width: 860px) { .bars { gap: 3px; } .bars .col:nth-child(even) .d { visibility: hidden; } .bars .d { font-size: .62rem; } .hbar { grid-template-columns: 96px 1fr 28px; } }
@media (max-width: 860px) {
  table.mini tr { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px 0; border-bottom: 1px solid var(--line); }
  table.mini td { border: 0; padding: 0 2px; }
  table.mini td.subj { flex-basis: 100%; }
  table.mini td.right { margin-inline-start: auto; }
}
