/* ================= settings ================= */
.mon-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.mon-state { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: center; padding: 16px; border-radius: 14px; }
.mon-state.on { background: var(--sage2); color: var(--sage-d); }
.mon-state.away { background: var(--blue2); color: var(--blue); }
.mon-state .mon-ic { width: 44px; height: 44px; border-radius: 12px; background: #fff; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.mon-state b { display: block; font-size: 16px; }
.mon-state span { font-size: 13px; opacity: .85; }
.mon-state .btn { grid-column: 1 / -1; justify-self: start; }
.mon-pause { padding: 14px 16px; border-radius: 14px; background: #FAF8F4; font-size: 13.5px; }
.mon-pause > b { display: flex; align-items: center; gap: 8px; font-size: 14.5px; }
.mon-pause p { margin: 6px 0 10px; color: var(--ink2); }
.mon-pause a { color: var(--sage-d); font-weight: 600; }
.hist { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.hist .hl { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; color: var(--muted); }
.hist div span { display: inline-block; width: 92px; color: var(--muted); }

.matrix-wrap { overflow-x: auto; }
.matrix { width: 100%; border-collapse: collapse; min-width: 560px; }
.matrix th { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 0 8px 10px; text-align: center; }
.matrix td { padding: 10px 8px; border-top: 1px solid var(--line2); text-align: center; }
.matrix td:first-child { text-align: left; }
.who { display: flex; gap: 10px; align-items: center; }
.who b { display: flex; align-items: center; gap: 8px; font-size: 14px; flex-wrap: wrap; }
.who span { font-size: 12px; color: var(--muted); }
.mx { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; }
.mx input { position: absolute; opacity: 0; pointer-events: none; }
.mx span { width: 24px; height: 24px; border-radius: 7px; border: 2px solid #CFC7BA; display: inline-flex; align-items: center; justify-content: center; transition: all .15s; }
.mx input:checked + span { background: var(--sage); border-color: var(--sage); }
.mx input:checked + span::after { content: ''; width: 10px; height: 6px; border-left: 2.5px solid #fff; border-bottom: 2.5px solid #fff; transform: rotate(-45deg) translate(1px, -1px); }
.mx input:focus-visible + span { outline: 2px solid var(--sage); outline-offset: 2px; }
.mx.locked { cursor: not-allowed; opacity: .6; }
.mx small { font-size: 10.5px; color: var(--muted); }
.lvl-key { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 14px; font-size: 12.5px; color: var(--ink2); }
.lvl-key > span { display: inline-flex; gap: 6px; align-items: center; }
.cc-row { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line2); }
.cc-row:first-child { border-top: none; }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line2); font-size: 13.5px; }
.kv:first-child { border-top: none; }
.kv span { color: var(--muted); }
.kv b { font-weight: 600; }
.rooms { display: flex; flex-wrap: wrap; gap: 6px; }
.rooms span { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; padding: 5px 10px; border-radius: 99px; }
.rooms .in { background: var(--sage2); color: var(--sage-d); }
.rooms .out { background: #F1EEE8; color: var(--muted); text-decoration: line-through; }
.consent-card { background: #FAF8F4; border-radius: 12px; padding: 4px 14px; }
.btnrow2 { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 900px) { .mon-grid { grid-template-columns: 1fr; } .cc-row { grid-template-columns: 1fr auto; } .cc-row .chips { grid-column: 1 / -1; grid-row: 2; } }

/* ================= onboarding (large, calm, resident-first) ================= */
body.ob { background: #F3F0EA; font-size: 18px; }
.ob-wrap { max-width: 940px; margin: 0 auto; padding: 26px 20px 60px; }
.ob-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.ob-with { display: flex; gap: 12px; align-items: center; }
.ob-with b { display: block; font-size: 16px; }
.ob-with span { font-size: 14px; color: var(--muted); }
.ob-prog { display: flex; gap: 6px; margin-bottom: 18px; }
.ob-prog span { flex: 1; font-size: 12.5px; font-weight: 600; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }
.ob-prog i { height: 6px; border-radius: 3px; background: #E2DCD2; }
.ob-prog .done i { background: var(--sage3); }
.ob-prog .on { color: var(--ink); }
.ob-prog .on i { background: var(--sage); }
.ob-card { background: #fff; border: 1px solid var(--line); border-radius: 26px; padding: 36px 40px; box-shadow: var(--shadow); }
.ob-kicker { font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--sage); }
.ob-card h1 { font-family: var(--serif); font-weight: 500; font-size: 40px; line-height: 1.12; letter-spacing: -.02em; margin: 10px 0 12px; }
.ob-lede { font-size: 20px; color: var(--ink2); margin: 0 0 22px; line-height: 1.5; }
.ob-q { font-size: 18px; font-weight: 600; margin: 24px 0 10px; }
.ob-points { display: grid; gap: 12px; margin: 8px 0 8px; }
.ob-points div { display: flex; gap: 16px; align-items: flex-start; background: #FAF8F4; border-radius: 16px; padding: 16px 18px; }
.ob-points .ic { font-size: 26px; color: var(--sage); margin-top: 2px; }
.ob-points p { margin: 0; font-size: 18.5px; line-height: 1.45; }
.ob-opts { display: flex; flex-direction: column; gap: 10px; }
.ob-opt { display: flex; gap: 14px; align-items: flex-start; border: 2px solid var(--line); border-radius: 16px; padding: 16px 18px; cursor: pointer; font-size: 18px; }
.ob-opt input { width: 22px; height: 22px; margin-top: 3px; accent-color: var(--sage); flex: none; }
.ob-opt small { display: block; font-size: 15px; color: var(--muted); margin-top: 3px; font-weight: 400; }
.ob-opt:has(input:checked) { border-color: var(--sage); background: #F2F9F5; }
.ob-sensors { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 10px; }
.ob-sensor { border: 1px solid var(--line); border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 16px; }
.ob-sensor .si { width: 46px; height: 46px; border-radius: 13px; background: var(--sage2); color: var(--sage-d); display: flex; align-items: center; justify-content: center; font-size: 23px; margin-bottom: 4px; }
.ob-sensor b { font-size: 18px; }
.ob-sensor small { color: var(--muted); font-size: 14.5px; }
.ob-sensor p { margin: 4px 0 0; line-height: 1.4; }
.ob-sensor .y, .ob-sensor .n { display: inline-flex; gap: 5px; align-items: center; font-weight: 700; }
.ob-sensor .y { color: var(--sage-d); }
.ob-sensor .n { color: var(--red); }
.ob-sensor.never { background: var(--sage-d); color: #fff; border-color: var(--sage-d); }
.ob-sensor.never .si { background: rgba(255,255,255,.15); color: #fff; }
.ob-rooms { display: grid; grid-template-columns: 1.15fr 1fr; gap: 26px; align-items: start; }
.ob-plan .plan { width: 100%; height: auto; }
.ob-switches { display: flex; flex-direction: column; gap: 8px; }
.ob-switch { display: flex; align-items: center; gap: 14px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; }
.ob-switch input { position: absolute; opacity: 0; pointer-events: none; }
.ob-switch .knob { width: 52px; height: 30px; border-radius: 15px; background: #D6CFC4; position: relative; flex: none; transition: background .2s; }
.ob-switch .knob::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s; }
.ob-switch input:checked + .knob { background: var(--sage); }
.ob-switch input:checked + .knob::after { transform: translateX(22px); }
.ob-switch input:focus-visible + .knob { outline: 3px solid var(--sage3); outline-offset: 2px; }
.ob-switch .txt b { display: block; font-size: 17px; }
.ob-switch .txt small { font-size: 14px; color: var(--muted); }
.ob-rule { display: flex; gap: 14px; align-items: flex-start; background: var(--sage2); color: var(--sage-d); border-radius: 16px; padding: 16px 18px; margin-bottom: 18px; }
.ob-rule .ic { font-size: 26px; flex: none; }
.ob-rule p { margin: 0; font-size: 17.5px; line-height: 1.45; }
.ob-people { display: flex; flex-direction: column; gap: 12px; }
.ob-person { border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.ob-person .who b { font-size: 17px; }
.ob-person .who span { font-size: 14px; }
.ob-seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.ob-seg label { cursor: pointer; }
.ob-seg input { position: absolute; opacity: 0; pointer-events: none; }
.ob-seg span { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 48px; padding: 6px 8px; border-radius: 12px; border: 2px solid var(--line); font-size: 15px; font-weight: 600; color: var(--ink2); }
.ob-seg input:checked + span { border-color: var(--sage); background: var(--sage); color: #fff; }
.ob-seg input:focus-visible + span { outline: 3px solid var(--sage3); outline-offset: 2px; }
.ob-two { display: grid; grid-template-columns: 1.1fr 1fr; gap: 30px; align-items: start; }
.ob-two .ob-switch { margin-top: 12px; }
.ob-preview { background: #FAF8F4; border-radius: 18px; padding: 18px; position: sticky; top: 70px; }
.ob-preview p { font-size: 15px; color: var(--ink2); margin: 12px 0 0; }
.mini-tv { background: #0C1317; border-radius: 14px; padding: 8px; margin-top: 10px; }
.mt-screen { border-radius: 8px; background: radial-gradient(130% 100% at 20% 0%, #24424D 0%, #122630 55%, #0E1D25 100%); color: #F3EEE6; padding: 18px; }
.mt-screen small { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: #9FC4B6; font-weight: 700; }
.mt-screen h3 { font-family: var(--serif); font-weight: 400; font-size: 22px; margin: 8px 0 14px; line-height: 1.25; }
.mt-btns { display: flex; gap: 8px; }
.mt-btns span { flex: 1; text-align: center; padding: 10px; border-radius: 10px; border: 1.5px solid rgba(255,255,255,.25); font-size: 14px; font-weight: 600; }
.mt-btns span:last-child { background: #F3EEE6; color: #10202A; }
.ob-sum { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.ob-sum div { display: grid; grid-template-columns: 140px 1fr; gap: 14px; padding: 14px 18px; border-top: 1px solid var(--line2); font-size: 17px; }
.ob-sum div:first-child { border-top: none; }
.ob-sum span { color: var(--muted); font-size: 15px; }
.ob-sum b { font-weight: 600; line-height: 1.45; }
.ob-sum small { display: block; font-weight: 400; color: var(--muted); font-size: 14.5px; }
.ob-check { display: flex; gap: 14px; align-items: center; margin: 22px 0 14px; font-size: 18px; cursor: pointer; }
.ob-check input { width: 26px; height: 26px; accent-color: var(--sage); flex: none; }
.ob-sign { display: flex; flex-direction: column; gap: 8px; font-size: 15px; color: var(--muted); font-weight: 600; }
.ob-sign input { height: 60px; border: 2px solid var(--line); border-radius: 14px; padding: 0 18px; font-family: var(--serif); font-size: 26px; color: var(--ink); }
.ob-sign input:focus { border-color: var(--sage); outline: none; }
.ob-nav { display: flex; justify-content: space-between; margin-top: 18px; }
.ob-nav .btn { height: 58px; padding: 0 30px; font-size: 18px; border-radius: 16px; }
.ob-nav .btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.ob-done { text-align: center; padding: 10px 0; }
.ob-done .done-ic { width: 76px; height: 76px; border-radius: 50%; background: var(--sage); color: #fff; font-size: 38px; display: inline-flex; align-items: center; justify-content: center; }
.ob-done .ob-lede { max-width: 640px; margin: 0 auto 26px; }
.ob-next { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
@media (max-width: 800px) {
  body.ob { font-size: 17px; }
  .ob-card { padding: 24px 20px; border-radius: 20px; }
  .ob-card h1 { font-size: 30px; }
  .ob-lede { font-size: 18px; }
  .ob-sensors, .ob-rooms, .ob-two { grid-template-columns: 1fr; }
  .ob-seg { grid-template-columns: 1fr 1fr; }
  .ob-prog span { font-size: 0; }
  .ob-sum div { grid-template-columns: 1fr; gap: 2px; }
  .ob-preview { position: static; }
}

/* ================= resident TV (sizes in cqw so it scales with the set) ================= */
body.tvpage { background: #2A2F2C; background: radial-gradient(120% 90% at 50% 0%, #4A4F48 0%, #262A27 70%); min-height: 100vh; color: #fff; }
.tv-demo { max-width: 1180px; margin: 14px auto 0; padding: 0 20px; display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.tv-demo-l b { display: block; font-family: var(--serif); font-weight: 500; font-size: 20px; }
.tv-demo-l span { font-size: 13px; color: #C2C8C4; }
.tv-demo-b { display: flex; gap: 6px; flex-wrap: wrap; }
.tv-room { max-width: 1180px; margin: 18px auto 40px; padding: 0 20px; }
.tv-set { background: #0B0F11; border-radius: 18px; padding: 12px; box-shadow: 0 40px 80px rgba(0,0,0,.45); }
.tv-stand { width: 26%; height: 16px; margin: 0 auto; background: linear-gradient(#111, #1b1f21); border-radius: 0 0 12px 12px; }
.tv-glass { aspect-ratio: 16 / 9; container-type: inline-size; border-radius: 8px; overflow: hidden; background: radial-gradient(130% 100% at 20% 0%, #24424D 0%, #122630 55%, #0E1D25 100%); color: #F3EEE6; position: relative; }
.tv-scr { position: absolute; inset: 0; padding: 4.2cqw 5cqw; display: flex; flex-direction: column; animation: fade .5s ease both; }
.tv-scr h1 { font-family: var(--serif); font-weight: 400; font-size: 4.4cqw; margin: 0; letter-spacing: -.02em; }
.tv-scr h2 { font-family: var(--serif); font-weight: 400; font-size: 4.2cqw; margin: 0; line-height: 1.15; letter-spacing: -.01em; max-width: 80%; }
.tv-sub { font-size: 2.2cqw; color: #C8D4D7; margin: 1.4cqw 0 0; max-width: 78%; line-height: 1.35; }
.tv-hint { font-size: 1.35cqw; color: #8FA3A9; margin: 1.6cqw 0 0; }
.tv-top { display: flex; justify-content: space-between; align-items: flex-start; }
.tv-top p { font-size: 1.9cqw; color: #B9C7CB; margin: .8cqw 0 0; }
.tv-clock { font-family: var(--serif); font-size: 6cqw; line-height: 1; }
.tv-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.8cqw; margin-top: auto; }
.tvk { display: flex; align-items: center; gap: .8cqw; font-size: 1.3cqw; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #9FC4B6; margin-bottom: 1.6cqw; }
.tvk .wave { display: inline-flex; gap: .2cqw; align-items: center; height: 1.4cqw; }
.tvk .wave i { width: .22cqw; background: #9FC4B6; border-radius: 2px; animation: wave 1s ease-in-out infinite; }
.tvk .wave i:nth-child(2) { animation-delay: .15s; } .tvk .wave i:nth-child(3) { animation-delay: .3s; } .tvk .wave i:nth-child(4) { animation-delay: .45s; }
@keyframes wave { 0%, 100% { height: .3cqw; } 50% { height: 1.4cqw; } }
.tvb { display: flex; align-items: center; justify-content: center; gap: 1cqw; min-height: 6.4cqw; padding: 0 2.4cqw; border-radius: 1.4cqw; border: .2cqw solid rgba(255,255,255,.22); background: rgba(255,255,255,.07); color: #fff; font-family: inherit; font-size: 2.1cqw; font-weight: 600; cursor: pointer; transition: transform .15s, background .15s, box-shadow .15s; }
.tvb .ic { font-size: 2.4cqw; }
.tvb:hover { background: rgba(255,255,255,.14); }
.tvb:focus { outline: none; }
.tvb:focus-visible, .tvb:focus { box-shadow: 0 0 0 .4cqw #F6C66F; transform: scale(1.04); }
.tvb.hl { background: #F3EEE6; color: #10202A; border-color: #F3EEE6; }
.tvb.red { background: #B23F2F; border-color: #B23F2F; }
.tvb.ghost { background: transparent; border-color: transparent; color: #B9C7CB; align-self: flex-start; min-height: 4.6cqw; margin-top: 1.4cqw; font-size: 1.7cqw; }
.tvb.tile { flex-direction: column; min-height: 15cqw; font-size: 2.2cqw; gap: 1.2cqw; }
.tvb.tile .ic { font-size: 4.4cqw; }
.tv-row { display: flex; gap: 1.8cqw; margin-top: auto; }
.tv-row .tvb { flex: 1; }
.tv-row.three { margin-top: 3cqw; }
.tv-status { display: flex; justify-content: space-between; gap: 2cqw; margin-top: 2.2cqw; font-size: 1.55cqw; color: #9FB0B5; }
.tv-status span { display: inline-flex; align-items: center; gap: .8cqw; }
.tv-status i { width: .9cqw; height: .9cqw; border-radius: 50%; background: #6FC2A2; }
.tv-status .p i { background: #7FA9E6; }
.tv-visit { display: flex; gap: 1.8cqw; align-items: center; background: rgba(255,255,255,.07); border-radius: 1.6cqw; padding: 1.4cqw 1.8cqw; margin-top: 2.4cqw; }
.tv-visit b { font-size: 2.2cqw; display: block; }
.tv-visit span { font-size: 1.7cqw; color: #B9C7CB; }
.tv-visit.done { opacity: .6; }
.tv-visit.big .tv-av { width: 9cqw; height: 9cqw; font-size: 3cqw; }
.tv-list { display: flex; flex-direction: column; gap: 0; }
.tv-list .tv-visit { margin-top: 1.4cqw; }
.tv-av { width: 6.4cqw; height: 6.4cqw; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 2.2cqw; border: .25cqw solid rgba(255,255,255,.5); flex: none; }
.tv-em, .tv-call { display: flex; flex-direction: column; align-items: center; text-align: center; height: 100%; }
.tv-em h2, .tv-call h2 { max-width: none; margin-top: 2cqw; }
.tv-em .tv-sub, .tv-call .tv-sub { max-width: 70%; }
.tv-em .tv-row, .tv-call .tv-row { width: 60%; }
.pulse-ring { width: 12cqw; height: 12cqw; border-radius: 50%; background: #B23F2F; display: flex; align-items: center; justify-content: center; font-size: 5.6cqw; position: relative; margin-top: 2cqw; }
.pulse-ring::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: .35cqw solid #E27466; animation: ring 1.6s ease-out infinite; }
.pulse-ring.blue { background: #3563A6; }
.pulse-ring.blue::after { border-color: #7FA9E6; animation-duration: 3s; }
.call-ring { position: relative; margin-top: 2cqw; }
.call-ring .tv-av { width: 12cqw; height: 12cqw; font-size: 4.4cqw; }
.call-ring::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: .35cqw solid #6FC2A2; animation: ring 1.8s ease-out infinite; }
@keyframes ring { from { transform: scale(1); opacity: .8; } to { transform: scale(1.5); opacity: 0; } }
@media (max-width: 700px) { .tv-room { padding: 0 8px; } .tv-set { padding: 6px; border-radius: 10px; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ================= caregiver app ================= */
body.cgpage { background: #EAE6DF; min-height: 100vh; }
.cg-layout { max-width: 1060px; margin: 0 auto; padding: 30px 20px 50px; display: grid; grid-template-columns: 1fr 400px; gap: 50px; align-items: start; }
.cg-about h1 { font-family: var(--serif); font-weight: 500; font-size: 38px; line-height: 1.12; letter-spacing: -.02em; margin: 12px 0; }
.cg-about > p { font-size: 16.5px; color: var(--ink2); }
.cg-about ul { list-style: none; padding: 0; margin: 20px 0; display: flex; flex-direction: column; gap: 14px; }
.cg-about li { display: flex; gap: 12px; font-size: 15px; color: var(--ink2); line-height: 1.45; }
.cg-about li > .ic { font-size: 20px; color: var(--blue); margin-top: 2px; }
.cg-about li b { color: var(--ink); }
.cg-tip { background: #fff; border-radius: 12px; padding: 12px 14px; font-size: 14px !important; }
.cg-phone { width: 390px; height: 800px; background: #151B1E; border-radius: 52px; padding: 11px; box-shadow: 0 30px 70px rgba(30,40,45,.25); position: sticky; top: 64px; }
.cg-screen { width: 100%; height: 100%; background: #FAF8F4; border-radius: 42px; overflow: hidden; display: flex; flex-direction: column; font-size: 14px; }
.cg-sbar { height: 46px; flex: none; display: flex; justify-content: space-between; align-items: center; padding: 0 28px 0 34px; font-size: 14px; font-weight: 600; }
.cg-island { width: 100px; height: 28px; background: #151B1E; border-radius: 16px; }
.cg-sig { display: flex; gap: 2px; align-items: flex-end; height: 11px; }
.cg-sig i { width: 3px; background: var(--ink); border-radius: 1px; }
.cg-sig i:nth-child(1) { height: 4px; } .cg-sig i:nth-child(2) { height: 6px; } .cg-sig i:nth-child(3) { height: 8px; } .cg-sig i:nth-child(4) { height: 11px; }
.cg-body { flex: 1; overflow-y: auto; }
.cg-app { padding: 6px 18px 20px; display: flex; flex-direction: column; gap: 12px; }
.cg-head { display: flex; gap: 12px; align-items: center; }
.cg-head b { display: block; font-size: 18px; }
.cg-head span { font-size: 12.5px; color: var(--muted); }
.cg-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cg-sum div { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px; text-align: center; }
.cg-sum b { display: block; font-size: 17px; }
.cg-sum span { font-size: 11.5px; color: var(--muted); }
.cg-h { font-size: 11.5px; letter-spacing: .09em; text-transform: uppercase; font-weight: 700; color: var(--muted); display: flex; justify-content: space-between; margin-top: 4px; }
.cg-shift { display: grid; grid-template-columns: 34px 1fr auto; gap: 11px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 12px; }
.cg-shift.next { border-color: #C9D8EE; background: #F6F9FD; }
.cg-shift.done { opacity: .8; }
.cg-shift.released { opacity: .7; border-style: dashed; }
.cg-s-main b { display: block; font-size: 14.5px; }
.cg-s-main span { font-size: 12.5px; color: var(--muted); }
.cg-s-main small { display: flex; align-items: center; gap: 5px; font-size: 12px; margin-top: 4px; color: var(--ink2); }
.cg-s-main small.ok { color: var(--sage-d); }
.cg-s-main small.warn { color: var(--amber); font-weight: 600; }
.cg-cant { width: 100%; }
.cg-big { width: 100%; height: 48px; font-size: 15px; margin-top: 4px; }
.cg-big:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.cg-hint { color: var(--muted); font-size: 12px; text-align: center; margin-top: -6px; }
.cg-offer { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.cg-offer .tag { align-self: flex-start; }
.cg-offer b { font-size: 17px; }
.cg-offer > span { font-size: 13px; color: var(--muted); }
.cg-offer p { margin: 0; font-size: 13.5px; color: var(--ink2); }
.cg-offer .mini { display: flex; flex-wrap: wrap; gap: 4px; }
.cg-offer .m, .cg-screen .m { font-size: 11.5px; padding: 3px 8px; border-radius: 6px; background: var(--sage2); color: var(--sage-d); }
.cg-2 { display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; margin-top: 6px; }
.cg-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 40px 16px; color: var(--ink2); }
.cg-empty .ic { font-size: 34px; color: var(--sage); }
.cg-empty b { font-size: 16px; color: var(--ink); }
.cg-vhead { display: flex; gap: 11px; align-items: center; }
.cg-vhead b { display: block; font-family: var(--serif); font-weight: 500; font-size: 19px; }
.cg-vhead span { font-size: 12.5px; color: var(--muted); }
.cg-vhead .tag { margin-left: auto; font-size: 11px; }
.cg-screen .why { background: var(--amber2); border-radius: 12px; padding: 11px 13px; font-size: 13px; line-height: 1.45; color: #6B4A15; }
.cg-screen .why > b:first-child { display: block; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 3px; }
.cg-screen .cs { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 4px 13px; }
.cg-screen .cs-item { display: grid; grid-template-columns: 70px 1fr; gap: 10px; font-size: 13px; line-height: 1.45; padding: 9px 0; border-top: 1px solid var(--line2); }
.cg-screen .cs-item:first-child { border-top: none; }
.cg-screen .cs-item > span:first-child { font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); padding-top: 2px; }
.cg-screen .hidden-note { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; color: var(--muted); background: #F1EEE8; border-radius: 11px; padding: 9px 11px; }
.cg-screen .checked { display: flex; align-items: center; gap: 11px; background: var(--sage2); border-radius: 14px; padding: 12px; color: var(--sage-d); }
.cg-screen .checked .ok { width: 32px; height: 32px; border-radius: 50%; background: var(--sage); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 16px; flex: none; }
.cg-screen .checked b { display: block; font-size: 14px; }
.cg-screen .checked span { font-size: 12px; }
.cg-screen .note { background: #FFFDF8; border: 1px solid var(--line); border-radius: 14px; padding: 12px; font-size: 13.5px; color: var(--ink2); }
.cg-screen .note .who { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--muted); }
.cg-screen .lock { display: flex; gap: 10px; align-items: center; background: #F1EEE8; border-radius: 12px; padding: 11px 12px; font-size: 13px; }
.cg-screen .lock .ic { font-size: 18px; color: var(--muted); }
.cg-screen .lock b { display: block; }
.cg-screen .lock span { font-size: 12px; color: var(--muted); }
.cg-screen .small { font-size: 12px; color: var(--muted); margin: -4px 0 0; }
.cg-ble { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding: 60px 10px; }
.cg-ble b { font-size: 18px; }
.cg-ble span { color: var(--ink2); font-size: 14px; max-width: 260px; }
.ble-ring { width: 120px; height: 120px; border-radius: 50%; background: var(--blue2); color: var(--blue); display: flex; align-items: center; justify-content: center; font-size: 46px; position: relative; }
.ble-ring::before, .ble-ring::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--blue); animation: ring 1.6s ease-out infinite; }
.ble-ring::after { animation-delay: .8s; }
.cg-tasks { display: flex; flex-direction: column; gap: 6px; }
.cg-task { display: grid; grid-template-columns: 24px 1fr; gap: 11px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 13px; padding: 11px 12px; cursor: pointer; }
.cg-task input { position: absolute; opacity: 0; pointer-events: none; }
.cg-task .cb { width: 22px; height: 22px; border-radius: 7px; border: 2px solid #CFC7BA; display: flex; align-items: center; justify-content: center; color: transparent; font-size: 13px; }
.cg-task.done .cb { background: var(--sage); border-color: var(--sage); color: #fff; }
.cg-task input:focus-visible + .cb { outline: 2px solid var(--sage); outline-offset: 2px; }
.cg-task b { display: block; font-size: 13.5px; }
.cg-task.done b { text-decoration: line-through; color: var(--muted); }
.cg-task small { font-size: 12px; color: var(--muted); }
.cg-prof { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 8px 0; }
.cg-prof b { font-family: var(--serif); font-weight: 500; font-size: 22px; }
.cg-prof span { font-size: 13px; color: var(--muted); }
.cg-creds { display: flex; flex-direction: column; gap: 6px; }
.cg-creds div { display: flex; gap: 10px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.cg-creds .ic { color: var(--sage); font-size: 18px; }
.cg-creds b { display: block; font-size: 13.5px; }
.cg-creds small { font-size: 12px; color: var(--muted); }
.cg-nav { flex: none; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); background: #fff; padding: 6px 8px 18px; }
.cg-nav button { border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--muted); padding: 6px 0; cursor: pointer; position: relative; font-family: inherit; }
.cg-nav button .ic { font-size: 20px; }
.cg-nav button.on { color: var(--blue); }
.cg-nav em { position: absolute; top: 2px; right: calc(50% - 20px); font-style: normal; background: var(--sev-alert-mark); color: #fff; font-size: 10px; min-width: 16px; height: 16px; border-radius: 8px; display: flex; align-items: center; justify-content: center; }
@media (max-width: 900px) {
  .cg-layout { grid-template-columns: 1fr; gap: 24px; padding: 20px 12px; }
  .cg-phone { width: 100%; max-width: 420px; height: 780px; margin: 0 auto; position: static; border-radius: 40px; padding: 8px; }
  .cg-about h1 { font-size: 30px; }
}

/* ================= agency console ================= */
.kpis5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.kpis5 .kpi { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; }
.kpis5 .kpi span { display: block; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.kpis5 .kpi b { font-family: var(--serif); font-size: 30px; font-weight: 500; }
.kpis5 .kpi.bad b { color: var(--sev-alert); }
.kpis5 .kpi.warn b { color: var(--amber); }
.kpis5 .kpi.good b { color: var(--sage-d); }
.gap2 { background: #FDF3F1; border: 1px solid #F0C9C1; border-radius: 12px; padding: 12px 14px; }
.gap2 b { display: block; font-size: 14.5px; color: #7A2E22; }
.gap2 span { font-size: 13px; color: #8E4A3F; }
.cands { display: flex; flex-direction: column; gap: 8px; }
.cand { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: 13px; padding: 11px 13px; }
.cand.top { border-color: var(--sage3); background: #F5FAF7; }
.cand b { display: block; font-size: 14px; }
.cand > div > span { font-size: 12.5px; color: var(--muted); }
.cand .mini { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.cand .m { font-size: 11px; padding: 2px 7px; border-radius: 6px; background: #F1EEE8; color: var(--ink2); }
.cand .m.y { background: var(--sage2); color: var(--sage-d); }
.cand .right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.cand .score { font-size: 11.5px; color: var(--muted); }
.cand .score b { display: inline; font-size: 18px; color: var(--sage-d); }
.covered2, .filled-row { display: grid; grid-template-columns: 32px 1fr auto; gap: 12px; align-items: center; }
.covered2 { background: var(--sage2); border-radius: 12px; padding: 12px 14px; color: var(--sage-d); }
.covered2 b, .filled-row b { display: block; font-size: 14px; }
.covered2 span { font-size: 12.5px; }
.filled-row { padding: 10px 0; border-top: 1px solid var(--line2); }
.filled-row:first-child { border-top: none; }
.filled-row span:not(.ok):not(.tag) { font-size: 12.5px; color: var(--muted); }
.covered2 .ok, .filled-row .ok { width: 30px; height: 30px; border-radius: 50%; background: var(--sage); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 15px; }
.search { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; height: 36px; background: #fff; color: var(--muted); }
.search input { border: 0; outline: none; font: inherit; font-size: 13.5px; width: 180px; color: var(--ink); background: transparent; }
.chips .cnt { font-weight: 500; opacity: .7; margin-left: 3px; }
.roster-wrap { overflow-x: auto; }
.roster { min-width: 720px; }
.rrow { cursor: pointer; }
.rrow:hover td, .rrow:focus td { background: #FAF8F4; }
.rrow:focus { outline: 2px solid var(--sage); outline-offset: -2px; }
.rrow td small { display: block; color: var(--muted); font-size: 12px; }
@media (max-width: 1100px) { .kpis5 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 860px) { .kpis5 { grid-template-columns: 1fr 1fr; } .search input { width: 120px; } }
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .matrix-wrap { max-width: 100%; }
  .al-act { flex-wrap: wrap; }
}
.mx, .ob-switch, .ob-seg label, .cg-task { position: relative; }
