/* Caresphere(TM) WS look-alike for the Hemalogic integration demo.
   Measured from Sysmex's public Caresphere WS brochure (CF-07314 Rev 2, 12/2023): Sample Explorer,
   Homepage, and the Morphology / Manual Differential windows. Colours sampled from those screens. */
:root {
  --cs-blue: #005aab;        /* nav bar, table headers */
  --cs-blue-ink: #1f5aa6;    /* wordmark, title */
  --cs-link: #2b6cb0;
  --cs-cyan: #17a8e3;        /* comment bubbles, active toggles */
  --cs-strip: #dfe2e7;       /* patient header strip */
  --cs-left: #f3f7fa;
  --cs-row: #ffffff;
  --cs-rowline: #e6e9ed;
  --cs-prev: #a1a6aa;        /* Prev Res column */
  --cs-body: #e7e7e7;
  --cs-slate: #394b61;       /* window title bar */
  --cs-ink: #262f38;
  --cs-mute: #5f6b77;
  --cs-red: #e2253a;
  --cs-orange: #d8a309;
  --cs-sel: #1f72c0;
  --cs-green: #17a34a;
  --flag-low: #0000fe;
  --flag-high: #e00000;
  --flag-delta: #00ff01;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--cs-body); color: var(--cs-ink); font: 12px/1.35 "Open Sans", "Segoe UI", Arial, sans-serif; overflow: hidden; }
button { font: inherit; }
a { color: var(--cs-link); }
#cs { height: 100vh; display: flex; flex-direction: column; min-width: 1180px; }

/* ---------------------------------------------------------------- top bar + nav */
.cs-top { height: 46px; background: #fff; display: flex; align-items: center; padding: 0 18px 0 14px; flex: none; }
.cs-brand { display: flex; align-items: center; gap: 16px; }
.cs-brand svg { display: block; }
.cs-brand .sep { width: 1px; height: 26px; background: #d9dde2; }
.cs-brand .prod { color: var(--cs-blue-ink); font-weight: 700; font-size: 19px; letter-spacing: .1px; }
.cs-brand .prod sup { font-size: 10px; font-weight: 700; }
.cs-tools { margin-left: auto; display: flex; align-items: center; gap: 22px; color: #5b6570; }
.cs-bell { position: relative; }
.cs-bell .n { position: absolute; top: -9px; left: 10px; background: #e2253a; color: #fff; font-size: 10px; font-weight: 700; border-radius: 3px; padding: 0 4px; line-height: 15px; }
.cs-site { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: #4d5763; }
.cs-avatar { display: flex; align-items: center; gap: 6px; }
.cs-avatar .a { width: 26px; height: 26px; border-radius: 50%; background: #19a7e0; color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; }
.cs-nav { height: 54px; background: var(--cs-blue); display: flex; justify-content: center; gap: 0; flex: none; }
.cs-nav button { background: none; border: 0; color: #fff; font-size: 14.5px; padding: 0 45px; cursor: pointer; position: relative; height: 54px; }
.cs-nav button.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: #fff; }
.cs-nav button:hover { background: rgba(255,255,255,.07); }

/* ---------------------------------------------------------------- home */
.cs-home { flex: 1; position: relative; overflow: auto; background: #fff; }
.cs-home .band { height: 54%; background: linear-gradient(180deg, #0f5fa8 0%, #2f78b4 50%, #144f7f 100%); }
.cs-home h2 { position: absolute; top: 22px; left: 0; right: 0; text-align: center; color: #fff; font-size: 15px; margin: 0; font-weight: 700; }
.cs-home .board { position: absolute; top: 62px; left: 50%; transform: translateX(-50%); width: 760px; background: #fff; border-radius: 3px; box-shadow: 0 6px 24px rgba(0,0,0,.18); padding: 18px 38px 22px; }
.cs-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px 30px; padding: 4px 0 18px; }
.cs-tile { height: 150px; border-radius: 6px; background: linear-gradient(180deg, #1aa0e0 0%, #2a8bd0 45%, #4fb4ea 100%); color: #fff; box-shadow: 0 3px 8px rgba(0,60,120,.35); cursor: pointer; display: flex; flex-direction: column; border: 0; padding: 0; text-align: center; }
.cs-tile:hover { filter: brightness(1.06); }
.cs-tile .ic { margin: 20px auto 4px; height: 38px; }
.cs-tile .nm { font-weight: 700; font-size: 12.5px; }
.cs-tile .cnt { margin-top: auto; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid rgba(255,255,255,.45); padding: 7px 0 8px; }
.cs-tile .cnt div { border-left: 1px solid rgba(255,255,255,.45); }
.cs-tile .cnt div:first-child { border-left: 0; }
.cs-tile .cnt b { display: block; font-size: 13px; }
.cs-tile .cnt span { font-size: 9.5px; opacity: .9; }
.cs-tile.hl { background: linear-gradient(180deg, #14304f 0%, #1d4a73 50%, #2a6a8f 100%); }
.cs-tile.hl .tag { font-size: 9.5px; letter-spacing: .06em; color: #8ff0d6; margin-top: 1px; }
.cs-arrow { position: absolute; top: 160px; width: 18px; height: 26px; background: #c6dcef; color: #fff; border: 0; border-radius: 2px; cursor: pointer; }
.cs-arrow.l { left: 8px; } .cs-arrow.r { right: 8px; }
.cs-quick { border-top: 2px solid #c8e4f6; padding-top: 16px; display: flex; justify-content: center; gap: 0; }
.cs-quick button { background: none; border: 0; border-left: 1px solid #d6dbe0; padding: 2px 15px; color: #3b4550; font-size: 11px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 5px; }
.cs-quick button:first-child { border-left: 0; }
.cs-quick button.hl { color: #14304f; font-weight: 700; }

/* ---------------------------------------------------------------- sample explorer */
.cs-strip { background: var(--cs-strip); display: grid; grid-template-columns: 1.35fr 1.4fr 1fr .9fr .6fr .7fr 1.3fr 1.2fr 1.2fr .9fr 30px; align-items: start; padding: 9px 14px 8px; gap: 10px; flex: none; }
.cs-strip label { display: block; font-size: 11px; color: #3c4650; }
.cs-strip b { display: block; font-size: 12.5px; color: #1e2730; font-weight: 700; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cs-strip .sid { display: flex; margin-top: 2px; }
.cs-strip .sid i { font-style: normal; background: var(--cs-orange); color: #e2253a; font-weight: 700; width: 22px; text-align: center; }
.cs-strip .sid span { background: var(--cs-red); color: #fff; font-weight: 700; flex: 1; padding: 0 8px; }
.cs-strip .sid.plain span { background: transparent; color: #1e2730; padding: 0; }
.cs-circ { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid #2f3a45; display: grid; place-items: center; margin-top: 6px; color: #2f3a45; }
.cs-main { flex: 1; display: grid; grid-template-columns: 250px minmax(520px, 1fr) 372px 186px; min-height: 0; gap: 6px; background: var(--cs-body); }
.cs-left { background: var(--cs-left); display: flex; flex-direction: column; min-height: 0; border-right: 1px solid #dde3e8; }
.cs-left .loc { padding: 10px 12px 12px; font-size: 11.5px; color: #3a434d; }
.cs-left .loc a { display: block; text-decoration: none; font-size: 11px; }
.cs-left .tabs { display: flex; background: #fff; border-top: 1px solid #e2e7ec; border-bottom: 1px solid #e2e7ec; }
.cs-left .tabs button { flex: 1; height: 42px; border: 0; background: #fff; color: #4a5560; cursor: pointer; }
.cs-left .tabs button.on { background: var(--cs-left); color: var(--cs-blue); }
.cs-left .hd { display: flex; align-items: baseline; padding: 14px 16px 10px; }
.cs-left .hd h3 { margin: 0; font-size: 14px; font-weight: 700; }
.cs-left .hd span { margin-left: auto; font-size: 11px; color: var(--cs-mute); }
.cs-alerts { overflow: auto; padding: 0 12px 12px 16px; }
.cs-alert { display: flex; gap: 10px; padding: 6px 0 10px; font-size: 11.5px; color: #26303a; line-height: 1.45; }
.cs-alert p { margin: 0; flex: 1; }
.cs-alert .c { flex: none; width: 17px; height: 17px; border-radius: 50%; background: #cfe0ef; color: #2a5a8a; font-size: 9.5px; font-weight: 700; display: grid; place-items: center; margin-top: 2px; }
.cs-alert.hl { background: #fff; margin: 2px -8px 8px -8px; padding: 8px 8px 9px; border-left: 3px solid #e2253a; cursor: pointer; border-radius: 2px; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.cs-alert.hl.neg { border-left-color: var(--cs-green); }
.cs-alert.hl b.hlw { color: #14304f; }
.cs-alert.hl .c { background: #14304f; color: #8ff0d6; }

.cs-center { background: #fff; display: flex; flex-direction: column; min-height: 0; }
.cs-center .meta { height: 38px; display: flex; align-items: center; gap: 22px; padding: 0 12px; font-size: 11.5px; color: #3a434d; }
.cs-center .meta .instr { margin-left: auto; }
.cs-center .meta b { color: #1e2730; }
.cs-check { width: 13px; height: 13px; border: 1px solid #6b7682; border-radius: 2px; display: inline-block; vertical-align: -2px; background: #fff; }
.cs-scroll { overflow: auto; flex: 1; }
table.cs-t { width: 100%; border-collapse: collapse; font-size: 11.5px; }
table.cs-t thead th { position: sticky; top: 0; background: var(--cs-blue); color: #fff; font-weight: 700; text-align: left; height: 34px; padding: 0 10px; white-space: nowrap; z-index: 1; }
table.cs-t td { height: 26.6px; padding: 0 10px; border-bottom: 1px solid var(--cs-rowline); white-space: nowrap; }
table.cs-t td.tn { color: var(--cs-link); }
table.cs-t td.ck, table.cs-t th.ck { width: 34px; padding: 0 0 0 12px; }
table.cs-t td.res { width: 135px; position: relative; }
table.cs-t td.res .v { display: block; margin: 0 -10px; padding: 0 10px; height: 26px; line-height: 26px; }
table.cs-t td.res .v.crit-low, table.cs-t td.res .v.low.mark { background: var(--flag-low); color: #fff; font-weight: 700; }
table.cs-t td.res .v.crit-high { background: var(--flag-high); color: #fff; font-weight: 700; }
table.cs-t td.res .v.delta { background: var(--flag-delta); color: #1b2bd6; font-weight: 700; }
table.cs-t td.res .v .lh { font-size: 9.5px; font-weight: 700; margin-left: 4px; color: #b3261e; }
table.cs-t td.res .v.crit-low .lh, table.cs-t td.res .v.crit-high .lh { color: #ffef5a; }
table.cs-t td.dots { width: 26px; color: #2d3a48; font-weight: 700; letter-spacing: 1px; }
table.cs-t td.com { width: 70px; }
table.cs-t td.prev { background: var(--cs-prev); color: #fff; width: 128px; }
table.cs-t td.prev.f { background: var(--flag-low); }
table.cs-t td.rerun { color: var(--cs-link); width: 90px; }
.bub { display: inline-block; vertical-align: middle; }

.cs-right { display: flex; flex-direction: column; gap: 6px; min-height: 0; }
.cs-box { background: #fff; display: flex; flex-direction: column; min-height: 0; }
.cs-box .bh { height: 40px; display: flex; align-items: center; padding: 0 12px; font-size: 14px; font-weight: 700; border-bottom: 1px solid #e3e7eb; }
.cs-box .bh .tg { margin-left: auto; cursor: pointer; background: none; border: 0; padding: 2px; color: #2f3a45; }
.cs-imgs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 6px; }
.cs-imgs img { width: 100%; height: 86px; object-fit: cover; border: 1px solid #d8dde2; cursor: zoom-in; }
.cs-imgs .none { grid-column: 1 / -1; color: var(--cs-mute); font-size: 11.5px; padding: 10px 4px; }
.cs-box.manual { flex: 1; }
.cs-mtabs { display: flex; gap: 0; padding: 8px 12px 9px; font-size: 11.5px; }
.cs-mtabs button { background: none; border: 0; border-left: 1px solid #b7c0c9; padding: 0 9px; color: #3b4650; cursor: pointer; font-weight: 600; }
.cs-mtabs button:first-child { border-left: 0; padding-left: 0; }
.cs-mtabs button.on { color: var(--cs-blue); text-decoration: underline; text-underline-offset: 3px; }
.cs-mtabs button.hlt { color: #14304f; }
.cs-mtabs button.hlt i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #02c39a; margin-left: 4px; vertical-align: 1px; }
.cs-mtabs button.hlt i.pos { background: #e2253a; }
table.cs-t.m td { height: 26.6px; }
table.cs-t.m td.r { width: 140px; }
.cs-hl { padding: 0 0 10px; overflow: auto; }
.cs-hl .verdict { margin: 12px 12px 6px; display: flex; align-items: center; gap: 8px; }
.cs-hl .vb { display: inline-block; font-weight: 700; font-size: 11px; letter-spacing: .05em; padding: 3px 9px; border-radius: 3px; }
.cs-hl .vb.pos { background: #fbe3e5; color: #a3111f; }
.cs-hl .vb.neg { background: #dcf5e7; color: #0b5a2c; }
.cs-hl .vb.na { background: #e8eef4; color: #14304f; }
.cs-hl .imp { margin: 0 12px 10px; font-size: 12px; line-height: 1.45; color: #1e2730; }
.cs-hl .by { margin: 0 12px; font-size: 10.5px; color: var(--cs-mute); display: flex; align-items: center; gap: 6px; }
.cs-hl .acts { display: flex; gap: 8px; margin: 12px 12px 4px; flex-wrap: wrap; }
.cs-hl .note { margin: 10px 12px 0; font-size: 10.5px; color: var(--cs-mute); line-height: 1.45; }
.hl-wm { font-weight: 700; color: #14304f; letter-spacing: -.1px; }
.hl-wm i { font-style: normal; color: #02a885; }

.cs-slist { background: #fff; display: flex; flex-direction: column; min-height: 0; }
.cs-slist .bh { height: 40px; display: flex; align-items: center; padding: 0 12px; font-size: 14px; font-weight: 700; }
.cs-slist .cnt { background: #8d99a5; color: #fff; font-size: 11px; padding: 4px 14px; }
.cs-slist ul { list-style: none; margin: 0; padding: 0; overflow: auto; flex: 1; }
.cs-slist li { height: 26.6px; display: flex; align-items: center; font-size: 11.5px; border-bottom: 1px solid #edf0f3; cursor: pointer; }
.cs-slist li i { font-style: normal; width: 20px; height: 100%; display: grid; place-items: center; color: #e2253a; font-weight: 700; flex: none; }
.cs-slist li span { padding-left: 14px; flex: 1; display: flex; align-items: center; height: 100%; }
.cs-slist li.crit i { background: var(--cs-orange); }
.cs-slist li.crit span { background: var(--cs-red); color: #fff; }
.cs-slist li.sel span { background: var(--cs-sel); color: #fff; }
.cs-slist li.cur span { outline: 2px solid #0b3e70; outline-offset: -2px; }
.cs-slist li .hd { margin-left: auto; margin-right: 8px; width: 8px; height: 8px; border-radius: 50%; background: #02c39a; box-shadow: 0 0 0 1.5px #fff; }
.cs-slist li .hd.pos { background: #ff5d6c; }

/* ---------------------------------------------------------------- bottom bar */
.cs-bottom { height: 54px; background: #fff; border-top: 1px solid #dfe3e7; display: flex; align-items: center; padding: 0 20px; flex: none; position: relative; }
.cs-bottom .mid { position: absolute; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; }
.cs-bottom .rt { margin-left: auto; display: flex; gap: 10px; }
.pillb { height: 26px; border-radius: 13px; border: 1.3px solid var(--cs-blue); background: #fff; color: var(--cs-blue); padding: 0 14px; font-size: 11.5px; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.pillb:hover { background: #f0f6fc; }
.pillb[disabled] { border-color: #b8c0c8; color: #a9b1b9; background: #fff; cursor: default; }
.pillb.grey { border-color: #b8c0c8; background: #e9ecef; color: #9aa3ab; }
.pillb.go { background: var(--cs-green); border-color: var(--cs-green); color: #fff; font-weight: 600; padding: 0 22px; }
.pillb.go:hover { background: #12913f; }
.pillb.dark { border-color: #3d4752; color: #3d4752; }
.pillb.hlb { border-color: #14304f; color: #14304f; font-weight: 600; }
.pillb.hlb.solid { background: #14304f; color: #fff; }
.pillb.hlb.solid:hover { background: #1d4a73; }
.cs-menu { position: absolute; bottom: 44px; background: #fff; border: 1px solid #cfd6dd; box-shadow: 0 6px 18px rgba(0,0,0,.16); border-radius: 3px; min-width: 210px; padding: 4px 0; z-index: 20; }
.cs-menu button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 7px 14px; font-size: 12px; color: #26303a; cursor: pointer; }
.cs-menu button:hover { background: #eef5fb; }
.cs-menu button.hl { color: #14304f; font-weight: 700; }
.cs-menu hr { border: 0; border-top: 1px solid #e3e7eb; margin: 4px 0; }

/* ---------------------------------------------------------------- toast */
.cs-toast { position: fixed; top: 112px; left: 50%; transform: translateX(-50%); background: #fff; border: 1px solid #cfd6dd; border-left: 4px solid var(--cs-blue); box-shadow: 0 8px 26px rgba(0,0,0,.2); padding: 10px 16px; font-size: 12.5px; z-index: 80; max-width: 640px; border-radius: 2px; }
.cs-toast.warn { border-left-color: #e2253a; }
.cs-toast.ok { border-left-color: var(--cs-green); }

/* ---------------------------------------------------------------- window (modal) */
.cs-dim { position: fixed; inset: 0; background: rgba(20, 28, 38, .45); z-index: 50; }
.cs-win { position: fixed; inset: 2.2vh 1.4vw; background: #fff; z-index: 51; display: flex; flex-direction: column; box-shadow: 0 18px 50px rgba(0,0,0,.35); border-radius: 3px; overflow: hidden; }
.cs-win .wt { height: 48px; background: var(--cs-slate); color: #fff; display: flex; align-items: center; padding: 0 12px 0 14px; flex: none; }
.cs-win .wt h1 { margin: 0; font-size: 17px; font-weight: 700; }
.cs-win .wt .x { margin-left: auto; width: 28px; height: 28px; border-radius: 50%; border: 2px solid #fff; background: none; color: #fff; cursor: pointer; display: grid; place-items: center; padding: 0; }
.cs-win .wp { display: grid; grid-template-columns: 1fr 1fr 1.6fr 1fr .7fr .8fr 1.4fr 1.4fr 30px 120px; gap: 12px; padding: 14px 16px 14px 18px; border-bottom: 1px solid #d5dbe1; align-items: start; flex: none; }
.cs-win .wp label { display: block; font-size: 11px; color: #3c4650; }
.cs-win .wp b { display: block; font-size: 12.5px; color: #1e2730; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cs-win .wp .cs-circ { margin-top: 4px; }
.cs-win .wp .opa { margin-top: 4px; justify-self: end; }
.cs-win .wbar { display: flex; align-items: center; gap: 14px; padding: 8px 16px; border-bottom: 1px solid #e3e7eb; background: #fafbfc; flex: none; }
.cs-seg { display: inline-flex; border: 1.3px solid #c5ccd3; border-radius: 15px; padding: 1px; background: #fff; }
.cs-seg button { height: 24px; border-radius: 12px; border: 0; background: none; padding: 0 14px; font-size: 12px; cursor: pointer; color: #2c3640; }
.cs-seg button.on { background: var(--cs-cyan); color: #fff; }
.cs-win .wbar .ctx { font-size: 11.5px; color: var(--cs-mute); }
.cs-win .wbar .ctx b { color: #1e2730; }
.cs-win .wbar .rt { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 11px; color: var(--cs-mute); }
.cs-win .wb { flex: 1; display: flex; min-height: 0; }
.cs-win .winst { width: 300px; flex: none; border-right: 1px solid #d5dbe1; display: flex; flex-direction: column; min-height: 0; }
.cs-win .winst.off { display: none; }
.cs-win .winst .ih { display: flex; align-items: center; padding: 10px 12px 6px; }
.cs-win .winst .ih h2 { margin: 0; font-size: 15px; font-weight: 700; }
.cs-win .winst .ih .sub { font-size: 10.5px; color: var(--cs-mute); }
.cs-win .winst .ih .ib { margin-left: auto; width: 26px; height: 26px; border-radius: 50%; background: #2f3a45; display: grid; place-items: center; }
.cs-win .winst .cs-scroll table.cs-t td { height: 25px; }
.cs-win .winst table.cs-t td.tn { width: 110px; }
.cs-win iframe { flex: 1; border: 0; width: 100%; height: 100%; background: #f4f6f9; display: block; }
.cs-win .wf { height: 52px; border-top: 1px solid #d5dbe1; display: flex; align-items: center; padding: 0 16px; gap: 22px; flex: none; }
.cs-win .wf .counter { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: #3c4650; }
.cs-win .wf .counter select { border: 0; border-bottom: 1px solid #6b7682; font: inherit; font-size: 11.5px; padding: 2px 18px 2px 2px; background: transparent; color: #1e2730; min-width: 170px; }
.cs-win .wf .rt { margin-left: auto; display: flex; gap: 12px; }
.cs-win .loadmask { position: absolute; inset: 0; display: grid; place-items: center; background: #f4f6f9; color: var(--cs-mute); font-size: 12px; pointer-events: none; transition: opacity .2s; }
.cs-win .frame { position: relative; flex: 1; display: flex; min-width: 0; }

.cs-foot { font-size: 9.5px; color: #98a2ab; margin-left: 26px; line-height: 1.3; max-width: 380px; }
.cs-lightbox { position: fixed; inset: 0; background: rgba(10,14,20,.8); z-index: 90; display: grid; place-items: center; cursor: zoom-out; }
.cs-lightbox img { max-width: 92vw; max-height: 90vh; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
