/* ClearSignal Portal (standalone) — theme. System Force blue + grey. */
:root, .cs-portal {
    --cs-primary: #0072C6; --cs-secondary: #4a5560; --cs-primary-050: #e9f3fb;
    --cs-ink: #1f2937; --cs-muted: #6b7280; --cs-border: #e2e7ec; --cs-bg: #f5f7fa;
    --cs-good: #16a34a; --cs-warn: #d97706; --cs-bad: #dc2626; --cs-radius: 10px;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--cs-ink); background: var(--cs-bg); font-feature-settings: "tnum" 1; }

.cs-portal { min-height: 100vh; }
.cs-topbar { display: flex; align-items: center; gap: 18px; padding: 14px 20px; background: #fff; border-bottom: 1px solid var(--cs-border); }
.cs-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; }
.cs-mark { width: 26px; height: 26px; border-radius: 7px; object-fit: cover; display: block; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.cs-chip { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; color: var(--cs-primary); background: var(--cs-primary-050); padding: 2px 7px; border-radius: 5px; }
.cs-topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.cs-company { font-weight: 600; }
.cs-role { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; color: var(--cs-secondary); background: #eef1f5; padding: 3px 9px; border-radius: 20px; }
.cs-role--admin { color: var(--cs-primary); background: var(--cs-primary-050); }
.cs-logout { border: 1px solid var(--cs-border); background: #fff; color: var(--cs-secondary); padding: 5px 12px; border-radius: 7px; font-weight: 600; cursor: pointer; font-size: 13px; }
.cs-logout:hover { color: var(--cs-primary); }

.cs-nav { display: flex; gap: 4px; padding: 0 20px; background: #fff; border-bottom: 1px solid var(--cs-border); }
.cs-nav-item { padding: 12px 14px; font-weight: 600; color: var(--cs-secondary); border-bottom: 2px solid transparent; text-decoration: none; }
.cs-nav-item:hover { color: var(--cs-primary); }
.cs-nav-item.active { color: var(--cs-primary); border-bottom-color: var(--cs-primary); }

.cs-main { padding: 24px; max-width: 1200px; margin: 0 auto; }
.cs-page-head { margin-bottom: 18px; }
.cs-h1 { font-size: 22px; font-weight: 700; margin: 0; }
.cs-sub { color: var(--cs-muted); margin: 4px 0 0; }
.cs-footer { padding: 18px; color: var(--cs-muted); font-size: 12px; text-align: center; }
.cs-flex { display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.cs-card { background: #fff; border: 1px solid var(--cs-border); border-radius: var(--cs-radius); padding: 18px; margin-bottom: 16px; }
.cs-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cs-m365-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.cs-m365-tenant { font-weight: 700; font-size: 17px; }
.cs-m365-sync { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; text-align: right; }
.cs-kpi-value.is-warn { color: var(--cs-warn); }
.cs-kpi-value.is-bad { color: var(--cs-bad); }
.cs-txt-warn { color: var(--cs-warn); font-weight: 600; }
.cs-flash { border-radius: 8px; padding: 11px 14px; font-size: 13.5px; margin-bottom: 14px; }
.cs-flash--ok { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.cs-flash--err { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }
.cs-invite { margin-top: 8px; }
.cs-invite code { display: block; background: #f8fafc; border: 1px solid var(--cs-border); border-radius: 7px; padding: 8px 10px; font-size: 12px; word-break: break-all; user-select: all; }
.cs-team-actions { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.cs-inline, .cs-inline-form { display: inline-block; }
.cs-inline > summary { cursor: pointer; }
.cs-perm-form { margin-top: 8px; padding: 10px 12px; border: 1px solid var(--cs-border); border-radius: 8px; background: #f8fafc; min-width: 250px; }
.cs-perm-form .cs-check, .cs-perm-list .cs-check { display: flex; align-items: center; gap: 7px; margin-bottom: 6px; font-size: 13px; }
.cs-perm-list { margin-top: 6px; }
.cs-btn--sm { padding: 6px 12px; font-size: 13px; margin-top: 8px; }
.cs-link--danger { color: var(--cs-bad); }
.cs-card--center { text-align: center; }
.cs-ce-list { list-style: none; margin: 0; padding: 0; }
.cs-ce-item { display: flex; align-items: center; gap: 12px; padding: 12px 2px; border-bottom: 1px solid var(--cs-border); }
.cs-ce-item:last-child { border-bottom: 0; }
.cs-ce-body { flex: 1; min-width: 0; }
.cs-ce-name { font-weight: 600; font-size: 14px; }
.cs-ce-dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.cs-ce-dot--green { background: var(--cs-good); }
.cs-ce-dot--amber { background: var(--cs-warn); }
.cs-ce-dot--red { background: var(--cs-bad); }
.cs-ce-dot--grey { background: #9ca3af; }
.cs-tf { display: inline-flex; gap: 4px; background: #f1f5f9; border-radius: 8px; padding: 3px; }
.cs-tf-opt { padding: 5px 12px; border-radius: 6px; font-size: 13px; font-weight: 600; color: var(--cs-muted); text-decoration: none; }
.cs-tf-opt.active { background: #fff; color: var(--cs-primary); box-shadow: 0 1px 3px rgba(17,24,39,.1); }

/* --- Dashboard redesign --- */
.cs-greet { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.cs-greet-h1 { font-size: 26px; font-weight: 700; margin: 0 0 4px; }
.cs-greet-sub { color: var(--cs-muted); font-size: 14px; margin: 0; }
.cs-greet-actions { display: flex; gap: 10px; }
.cs-btn--ghost { background: #fff; color: var(--cs-ink); border: 1px solid var(--cs-border); }
.cs-stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.cs-stat { display: flex; flex-direction: column; gap: 9px; background: #fff; border: 1px solid var(--cs-border); border-radius: 14px; padding: 18px 20px; text-decoration: none; color: var(--cs-ink); box-shadow: 0 1px 2px rgba(17,24,39,.04); transition: box-shadow .15s, transform .15s; }
a.cs-stat:hover { box-shadow: 0 10px 26px rgba(17,24,39,.09); transform: translateY(-2px); }
.cs-stat-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cs-stat-label { font-size: 13px; color: var(--cs-muted); font-weight: 600; }
.cs-stat-ic { width: 32px; height: 32px; flex: none; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; background: var(--cs-primary-050); color: var(--cs-primary); }
.cs-stat-ic svg { width: 17px; height: 17px; }
.cs-stat-value { font-size: 34px; font-weight: 800; line-height: 1; }
.cs-stat-foot { font-size: 12px; color: var(--cs-muted); }
.cs-stat--amber { border-color: #fcd9a6; } .cs-stat--amber .cs-stat-ic { background: #fef3c7; color: var(--cs-warn); } .cs-stat--amber .cs-stat-foot { color: var(--cs-warn); font-weight: 600; }
.cs-stat--red { border-color: #f7c2c2; } .cs-stat--red .cs-stat-ic { background: #fee2e2; color: var(--cs-bad); } .cs-stat--red .cs-stat-foot { color: var(--cs-bad); font-weight: 600; }
.cs-tl { list-style: none; margin: 0; padding: 0; }
.cs-tl-item { display: flex; align-items: center; gap: 12px; padding: 11px 6px; border-bottom: 1px solid var(--cs-border); cursor: pointer; border-radius: 8px; }
.cs-tl-item:last-child { border-bottom: 0; }
.cs-tl-item:hover, .cs-tl-item:focus { background: #f8fafc; outline: none; }
.cs-tl-ico { width: 34px; height: 34px; flex: none; border-radius: 9px; background: var(--cs-primary-050); position: relative; }
.cs-tl-ico::after { content: ""; position: absolute; inset: 10px 9px; border: 2px solid var(--cs-primary); border-radius: 3px; opacity: .65; }
.cs-tl-body { min-width: 0; flex: 1; }
.cs-tl-title { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-tl-meta { font-size: 12.5px; color: var(--cs-muted); margin-top: 2px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cs-tl-who { font-weight: 600; color: var(--cs-secondary); }
.cs-legend { display: flex; justify-content: center; gap: 18px; font-size: 13px; color: var(--cs-muted); margin-top: 10px; }
.cs-legend .cs-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; }
.cs-dot--green { background: var(--cs-good); } .cs-dot--grey { background: #cbd5e1; }
/* --- Asset detail --- */
.cs-back { display: inline-block; margin-bottom: 8px; font-size: 13px; }
.cs-devlink { color: var(--cs-primary); text-decoration: none; font-weight: 600; }
.cs-devlink:hover { text-decoration: underline; }
.cs-kv { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 28px; margin: 0; }
.cs-kv > div { display: flex; flex-direction: column; gap: 3px; }
.cs-kv dt { font-size: 11px; color: var(--cs-muted); font-weight: 700; text-transform: uppercase; letter-spacing: .3px; }
.cs-kv dd { margin: 0; font-size: 14px; font-weight: 500; word-break: break-word; }
.cs-sec-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cs-sec-label { font-size: 13px; font-weight: 600; }
@media (max-width: 560px) { .cs-kv { grid-template-columns: 1fr; } }
/* --- Internet & Firewall --- */
.cs-fw-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.cs-fw-name { font-weight: 700; font-size: 17px; }
.cs-pill--lg { font-size: 13px; padding: 6px 14px; }
.cs-fw-big { font-size: 32px; font-weight: 800; line-height: 1; }
.cs-meters { display: flex; flex-direction: column; gap: 14px; }
.cs-meterrow { display: grid; grid-template-columns: 80px 1fr 52px; align-items: center; gap: 12px; }
.cs-meterrow-l { font-size: 13px; font-weight: 600; color: var(--cs-secondary); }
.cs-meterrow-v { font-size: 13px; text-align: right; color: var(--cs-muted); }
/* --- Blog ticker --- */
.cs-ticker { display: flex; align-items: center; gap: 14px; background: #fff; border-top: 1px solid var(--cs-border); padding: 9px 20px; overflow: hidden; }
.cs-ticker-tag { flex: none; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; color: #fff; background: var(--cs-primary); padding: 3px 9px; border-radius: 5px; }
.cs-ticker-view { flex: 1; overflow: hidden; position: relative; -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.cs-ticker-track { display: flex; align-items: center; gap: 10px; width: max-content; white-space: nowrap; animation: cs-ticker 45s linear infinite; will-change: transform; }
.cs-ticker:hover .cs-ticker-track { animation-play-state: paused; }
.cs-ticker-item { flex: none; color: var(--cs-ink); text-decoration: none; font-size: 13px; font-weight: 500; }
.cs-ticker-item:hover { color: var(--cs-primary); text-decoration: underline; }
.cs-ticker-sep { flex: none; color: var(--cs-primary); font-weight: 700; }
@keyframes cs-ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .cs-ticker-track { animation: none; } .cs-ticker-view { overflow-x: auto; } }
.cs-ticker--fixed { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; box-shadow: 0 -2px 12px rgba(17,24,39,.05); }
.cs-auth-body { padding-bottom: 60px; }
/* --- Get Help / Who to Contact --- */
.cs-help-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.cs-help-cta { display: flex; flex-direction: column; }
.cs-help-cta--urgent { border-color: #f7c9c9; background: linear-gradient(180deg, #fff 0%, #fff7f7 100%); }
.cs-help-cta-ic { width: 40px; height: 40px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: #fee2e2; color: var(--cs-bad); margin-bottom: 12px; }
.cs-help-cta-ic--blue { background: var(--cs-primary-050); color: var(--cs-primary); }
.cs-help-cta-k { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; color: var(--cs-muted); }
.cs-help-cta-v { font-size: 26px; font-weight: 700; color: var(--cs-bad); text-decoration: none; margin: 2px 0 8px; letter-spacing: -.3px; }
.cs-help-cta-v:hover { text-decoration: underline; }
.cs-help-cta-v--mail { font-size: 20px; color: var(--cs-primary); word-break: break-word; }
.cs-help-cta-d { color: var(--cs-secondary); font-size: 13px; margin: 0; line-height: 1.5; }
.cs-help-cta-btn { align-self: flex-start; margin-top: 14px; }
.cs-help-hours { display: flex; flex-direction: column; gap: 10px; }
.cs-help-hour { display: grid; grid-template-columns: 220px 1fr; gap: 12px; font-size: 13px; padding-bottom: 10px; border-bottom: 1px solid #f0f2f5; }
.cs-help-hour:last-child { border-bottom: none; padding-bottom: 0; }
.cs-help-hour-l { font-weight: 600; color: var(--cs-secondary); }
.cs-help-hour-v { color: var(--cs-muted); }
.cs-help-tip { margin: 14px 0 0; padding: 12px 14px; background: var(--cs-primary-050); border-radius: 8px; font-size: 12.5px; color: var(--cs-secondary); line-height: 1.5; }
.cs-help-tip code { background: #fff; border: 1px solid var(--cs-border); border-radius: 4px; padding: 1px 5px; font-size: 12px; }
.cs-table td a, .cs-help-hour a { color: var(--cs-primary); font-weight: 600; text-decoration: none; }
.cs-table td a:hover, .cs-help-hour a:hover { text-decoration: underline; }
.cs-esc { display: flex; flex-direction: column; }
.cs-esc-row { display: flex; align-items: flex-start; gap: 14px; padding: 12px 0; border-bottom: 1px solid #f0f2f5; }
.cs-esc-row:last-child { border-bottom: none; padding-bottom: 0; }
.cs-esc-num { flex: none; width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; color: var(--cs-primary); background: var(--cs-primary-050); }
.cs-esc-body { display: flex; flex-direction: column; gap: 2px; }
.cs-esc-name { font-weight: 700; font-size: 14px; }
.cs-esc-role { font-weight: 500; font-size: 12px; color: var(--cs-muted); margin-left: 4px; }
.cs-esc-for { font-size: 13px; color: var(--cs-secondary); }
.cs-help-team { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.cs-help-member { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--cs-border); border-radius: 9px; }
.cs-help-avatar { flex: none; width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; color: #fff; background: linear-gradient(135deg, var(--cs-primary), #0a4f88); }
.cs-help-photo { flex: none; width: 46px; height: 46px; border-radius: 50%; object-fit: cover; background: var(--cs-primary-050); }
.cs-help-member-n { font-weight: 700; font-size: 13.5px; }
.cs-help-member-r { font-size: 12px; color: var(--cs-muted); }
.cs-help-res { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.cs-help-res-card { display: block; padding: 14px; border: 1px solid var(--cs-border); border-radius: 9px; text-decoration: none; color: inherit; transition: border-color .12s, background .12s; }
.cs-help-res-card:hover { border-color: var(--cs-primary); background: var(--cs-primary-050); }
.cs-help-res-t { font-weight: 700; font-size: 14px; color: var(--cs-ink); }
.cs-help-res-d { font-size: 12.5px; color: var(--cs-muted); margin: 3px 0 8px; line-height: 1.4; }
.cs-help-res-u { font-size: 12px; font-weight: 600; color: var(--cs-primary); }
.cs-help-addr { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.cs-help-addr-name { font-weight: 700; font-size: 15px; margin-bottom: 2px; }
.cs-help-addr-cred { text-align: right; }
@media (max-width: 720px) {
    .cs-help-hero, .cs-help-team, .cs-help-res { grid-template-columns: 1fr; }
    .cs-help-hour { grid-template-columns: 1fr; gap: 2px; }
    .cs-help-addr-cred { text-align: left; }
}
@media (max-width: 900px) { .cs-stat-row { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .cs-stat-row { grid-template-columns: 1fr; } .cs-greet-actions { width: 100%; } }
.cs-card h3 { font-size: 14px; font-weight: 700; margin: 0 0 12px; }
.cs-card-head h3 { margin: 0; }
.cs-card--center { text-align: center; }

.cs-kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 16px; }
.cs-kpi { display: flex; flex-direction: column; gap: 4px; background: #fff; border: 1px solid var(--cs-border); border-radius: var(--cs-radius); padding: 18px; text-decoration: none; color: inherit; }
a.cs-kpi:hover { box-shadow: 0 4px 14px rgba(0,0,0,.06); transform: translateY(-1px); }
.cs-kpi-value { font-size: 30px; font-weight: 700; line-height: 1; color: var(--cs-primary); }
.cs-kpi-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .3px; color: var(--cs-muted); }

.cs-dash-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; align-items: start; }
.cs-rep-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }

.cs-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.cs-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .3px; color: var(--cs-muted); padding: 8px 10px; border-bottom: 1px solid var(--cs-border); }
.cs-table td { padding: 10px; border-bottom: 1px solid #f0f2f5; }
.cs-table tr:last-child td { border-bottom: none; }
.cs-table--click tbody tr { cursor: pointer; }
.cs-table--click tbody tr:hover { background: var(--cs-primary-050); }
.cs-cell-title { font-weight: 600; max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-mono { font-variant-numeric: tabular-nums; color: var(--cs-muted); }
.cs-muted { color: var(--cs-muted); } .cs-tiny { font-size: 11px; }
.cs-link { color: var(--cs-primary); font-weight: 600; text-decoration: none; font-size: 13px; }
.cs-link:hover { text-decoration: underline; }
/* A button that has to sit in a form (so it can POST) but belongs visually
   with the links beside it. Strips the browser's button chrome rather than
   restating .cs-link, so the two cannot drift apart. */
.cs-linkbtn { background: none; border: 0; padding: 0; cursor: pointer;
    font-family: inherit; font-weight: 600; font-size: 13px; color: var(--cs-primary); }
.cs-linkbtn:hover { text-decoration: underline; }
.cs-empty { color: var(--cs-muted); padding: 26px 4px; text-align: center; }
.cs-empty::before { content: ""; display: block; width: 44px; height: 44px; margin: 0 auto 12px; border-radius: 10px; background: url('../img/clearsignal-mark.png') center / cover no-repeat; opacity: .16; }

.cs-pill { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 20px; white-space: nowrap; }
.cs-pill--blue { color: #1d4ed8; background: #e6effe; } .cs-pill--amber { color: #b45309; background: #fef3c7; }
.cs-pill--green { color: #15803d; background: #dcfce7; } .cs-pill--red { color: #b91c1c; background: #fee2e2; }
.cs-pill--grey { color: #4b5563; background: #eef1f5; }
.cs-pill--purple { color: #6d28d9; background: #ede9fe; }
.cs-pill--sm { padding: 1px 8px; font-size: 11px; }

.cs-chart-wrap, .cs-donut-wrap { display: flex; justify-content: center; }
.cs-donut-na { align-items: center; min-height: 120px; }
.cs-na-badge { display: inline-flex; align-items: center; justify-content: center; width: 96px; height: 96px; border-radius: 50%; border: 3px dashed var(--cs-border); color: var(--cs-muted); font-weight: 700; font-size: 18px; letter-spacing: .5px; }
.cs-chart { max-width: 100%; height: auto; } .cs-chart--donut { max-width: 160px; }

.cs-meter { width: 90px; height: 8px; background: #eef1f5; border-radius: 6px; overflow: hidden; }
.cs-meter-fill { display: block; height: 100%; border-radius: 6px; }
.cs-meter--good { background: var(--cs-good); } .cs-meter--warn { background: var(--cs-warn); } .cs-meter--bad { background: var(--cs-bad); }
.cs-warranty { font-size: 12px; font-weight: 600; margin-right: 6px; }
.cs-warranty--valid { color: var(--cs-good); } .cs-warranty--expiring { color: var(--cs-warn); }
.cs-warranty--expired { color: var(--cs-bad); } .cs-warranty--none { color: var(--cs-muted); }

.cs-seg { display: inline-flex; gap: 4px; margin-bottom: 16px; background: #eef1f5; padding: 3px; border-radius: 8px; }
.cs-seg a { padding: 6px 14px; font-weight: 600; font-size: 13px; color: var(--cs-secondary); border-radius: 6px; text-decoration: none; }
.cs-seg a.active { background: #fff; color: var(--cs-primary); box-shadow: 0 1px 3px rgba(0,0,0,.08); }

.cs-filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.cs-filters select, .cs-filters input { padding: 8px 10px; border: 1px solid var(--cs-border); border-radius: 8px; font-size: 13px; background: #fff; }
.cs-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: none; border-radius: 8px; font-weight: 600; font-size: 13px; cursor: pointer; background: var(--cs-primary); color: #fff; text-decoration: none; }
.cs-btn--ghost { background: #fff; color: var(--cs-primary); border: 1px solid var(--cs-border); }
.cs-btn--block { width: 100%; justify-content: center; padding: 11px; }

.cs-field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.cs-field > span { font-size: 12px; font-weight: 600; color: var(--cs-secondary); }
.cs-field input, .cs-field textarea, .cs-field select { padding: 9px 11px; border: 1px solid var(--cs-border); border-radius: 8px; font: inherit; background: #fff; }
.cs-check { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 14px; }

/* Report cards */
.cs-report-card { display: flex; flex-direction: column; }
.cs-report-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 20px; margin-bottom: 10px; color: var(--cs-primary); background: var(--cs-primary-050); }
.cs-report-card p { flex: 1; margin: 0 0 14px; } .cs-report-actions { display: flex; gap: 8px; }

/* Drawer + modal */
.cs-drawer-overlay { position: fixed; inset: 0; background: rgba(17,24,39,.45); display: none; justify-content: flex-end; z-index: 1200; }
.cs-drawer-overlay.open { display: flex; }
.cs-drawer { width: min(560px,100%); height: 100%; background: #fff; overflow-y: auto; padding: 20px 22px; box-shadow: -8px 0 30px rgba(0,0,0,.15); }
.cs-drawer-head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; margin-bottom: 12px; }
.cs-drawer-id { font-variant-numeric: tabular-nums; color: var(--cs-muted); font-weight: 700; }
.cs-drawer-title { font-size: 17px; font-weight: 700; margin: 0; }
.cs-drawer-close { border: none; background: transparent; font-size: 24px; line-height: 1; color: var(--cs-muted); cursor: pointer; padding: 0 4px; }
.cs-drawer-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.cs-drawer-body { border: 1px solid var(--cs-border); border-radius: 8px; padding: 12px 14px; margin-bottom: 18px; background: #fafbfc; }
.cs-drawer-loading, .cs-drawer .cs-empty { padding: 40px 0; text-align: center; color: var(--cs-muted); }
.cs-timeline { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.cs-tl-item { border: 1px solid var(--cs-border); border-left: 3px solid var(--cs-primary); border-radius: 8px; padding: 10px 12px; }
.cs-tl-solution { border-left-color: var(--cs-good); background: #f6fdf9; } .cs-tl-task { border-left-color: var(--cs-warn); }
.cs-tl-head { display: flex; gap: 8px; align-items: baseline; margin-bottom: 6px; font-size: 12px; }
.cs-tl-label { font-weight: 700; } .cs-tl-author { color: var(--cs-secondary); } .cs-tl-date { margin-left: auto; }
.cs-richtext { font-size: 13px; line-height: 1.5; word-wrap: break-word; } .cs-richtext img { max-width: 100%; height: auto; }
.cs-reply { display: flex; flex-direction: column; gap: 8px; position: sticky; bottom: 0; background: #fff; padding-top: 10px; border-top: 1px solid var(--cs-border); }
.cs-reply-input { padding: 10px 12px; border: 1px solid var(--cs-border); border-radius: 8px; font: inherit; resize: vertical; }
.cs-reply .cs-btn { align-self: flex-end; }
.cs-modal { position: fixed; inset: 0; background: rgba(17,24,39,.45); display: none; align-items: center; justify-content: center; z-index: 1200; padding: 20px; }
.cs-modal.open { display: flex; }
.cs-modal-card { background: #fff; border-radius: 12px; width: min(520px,100%); max-height: 90vh; overflow-y: auto; padding: 20px 22px; }
.cs-modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; } .cs-modal-head h3 { margin: 0; }
.cs-modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }

/* Auth pages */
.cs-auth-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 24px; }
.cs-auth { width: 100%; max-width: 440px; }
.cs-auth-brand { display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 700; font-size: 18px; margin-bottom: 18px; }
.cs-auth-logo { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-bottom: 18px; }
.cs-auth-mark { width: 66px; height: 66px; border-radius: 15px; box-shadow: 0 8px 22px rgba(0,114,198,.30); }
.cs-auth-sfit { width: 190px; max-width: 60%; height: auto; }
.cs-auth-info { margin-top: 16px; background: #fff; border: 1px solid var(--cs-border); border-radius: 14px; padding: 18px 20px; box-shadow: 0 8px 30px rgba(17,24,39,.06); text-align: center; }
.cs-auth-co { font-weight: 700; font-size: 15px; }
.cs-auth-co-sub { color: var(--cs-muted); font-size: 13px; margin-bottom: 12px; }
.cs-auth-contact { display: flex; flex-direction: column; gap: 5px; margin-bottom: 4px; }
.cs-auth-contact a { color: var(--cs-primary); text-decoration: none; font-weight: 600; font-size: 14px; }
.cs-auth-contact a:hover { text-decoration: underline; }
.cs-auth-block { text-align: left; border-top: 1px solid var(--cs-border); margin-top: 14px; padding-top: 14px; }
.cs-auth-block-h { font-weight: 700; font-size: 13px; margin-bottom: 5px; }
.cs-auth-hours-row { font-size: 13.5px; }
.cs-auth-block .cs-tiny { margin: 8px 0 0; }
.cs-auth-alert { text-align: left; margin-top: 14px; background: #fef2f2; border: 1px solid #fecaca; border-radius: 10px; padding: 12px 14px; }
.cs-auth-alert-h { font-weight: 700; font-size: 13px; color: #b91c1c; margin-bottom: 5px; }
.cs-auth-alert p { margin: 0; font-size: 12.5px; line-height: 1.5; color: #7f1d1d; }
.cs-auth-alert a { color: #b91c1c; font-weight: 700; }
.cs-auth-card { background: #fff; border: 1px solid var(--cs-border); border-radius: 14px; padding: 26px 24px; box-shadow: 0 8px 30px rgba(17,24,39,.06); }
.cs-auth-h1 { font-size: 19px; font-weight: 700; margin: 0 0 16px; }
.cs-auth-foot { text-align: center; color: var(--cs-muted); font-size: 12px; margin-top: 16px; }
.cs-auth-err { background: #fee2e2; color: #b91c1c; border-radius: 8px; padding: 9px 12px; font-size: 13px; margin-bottom: 14px; }
/* The reassuring counterpart to cs-auth-err: "we have sent you a link",
   "your password has been changed". Same shape so the two read as a pair. */
.cs-auth-ok { background: #dcfce7; color: #166534; border-radius: 8px; padding: 9px 12px; font-size: 13px; margin-bottom: 14px; }
.cs-2fa-qr { display: flex; justify-content: center; margin: 14px 0 6px; }
.cs-2fa-qr img { background: #fff; padding: 10px; border: 1px solid var(--cs-border); border-radius: 8px; display: block; }
.cs-2fa-key { background: #f8fafc; border: 1px solid var(--cs-border); border-radius: 8px; padding: 12px 14px; margin-top: 6px; }
.cs-2fa-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; color: var(--cs-muted); margin-bottom: 4px; }

@media (max-width: 1080px) {
    .cs-kpi-row, .cs-dash-grid, .cs-rep-grid { grid-template-columns: 1fr; }
    .cs-cell-title { max-width: 180px; }
}
