/* Дамар Пуантаж — staff web. ТКП 2026 palette (navy / petrol / E22521). */
:root {
  --navy: #090D16; --navy-2: #0B0F1A; --navy-3: #171A21;
  --band: #161A20; --petrol: #16575B; --petrol-dark: #154C53;
  --red: #E22521; --green: #1B8A4A; --amber: #D97706;
  --dark: rgba(11, 15, 26, .90); --muted: #D5D8DD; --grey: #555B66;
  --cream: #F2F3F5; --white: #FFFFFF; --light: #F2F3F5;
  --field: #0B0F1A; --line: rgba(213, 216, 221, .18); --divider: #D5D8DD;
  --deep-red: #8A1B1B; --glass-border: rgba(22, 87, 91, .50);
  --safe-top: env(safe-area-inset-top, 0px); --safe-bottom: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { margin: 0; padding: 0; background: var(--navy); }
body {
  margin: 0; padding: 0;
  color: var(--cream);
  font: 16px/1.45 Arial, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
  -webkit-text-size-adjust: 100%;
  background: linear-gradient(180deg, #16575B 0%, #154C53 22%, #0B0F1A 58%, #090D16 100%);
}
/* thin red top stripe (ТКП cover) */
body::before {
  content: "";
  position: fixed; top: 0; left: 0; right: 0; height: 3px;
  background: var(--red); z-index: 30; pointer-events: none;
}
a { color: var(--cream); }
[hidden] { display: none !important; }
main { position: relative; z-index: 1; }

/* Header: dark navy band, thin red line underneath, logo already white-red */
.band {
  background: var(--band); border-bottom: 3px solid var(--red);
  padding: calc(12px + var(--safe-top)) 16px 12px; display: flex; align-items: center; gap: 12px;
  position: sticky; top: 0; z-index: 5;
}
.band img.logo { height: 44px; width: auto; display: block; }
.band .txt { flex: 1; min-width: 0; }
.band .title { font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.band .sub { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.band .icon-btn { background: none; border: 0; color: var(--muted); font-size: 22px; padding: 6px 8px; cursor: pointer; text-decoration: none; line-height: 1; }
.lang { display: flex; gap: 2px; }
.lang button { background: none; border: 0; color: var(--muted); font-weight: 800; font-size: 14px; padding: 6px 6px; cursor: pointer; }
.lang button.on { color: var(--cream); }

main { flex: 1; width: 100%; max-width: 560px; margin: 0 auto; padding: 20px 20px calc(24px + var(--safe-bottom)); display: flex; flex-direction: column; }
main.center { justify-content: center; }
.hero-logo { display: flex; justify-content: center; margin: 8px 0 20px; }
.hero-logo img { height: 92px; width: auto; }
p { margin: 0 0 14px; }
.muted { color: var(--muted); font-size: 14px; }
.small { font-size: 13px; }
h1 { font-size: 22px; margin: 0 0 6px; }
.spacer { flex: 1; min-height: 16px; }

label.field { display: block; color: var(--muted); font-size: 13px; margin: 12px 0 6px; }
input[type=text], input[type=password], input[type=number], input[type=date], input[type=tel], input[type=search], input[type=email], input[type=datetime-local] {
  box-sizing: border-box; color-scheme: dark;
  width: 100%; font-size: 17px; padding: 14px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--field); color: var(--cream); outline: none; -webkit-appearance: none;
}
input:focus { border-color: var(--red); }

.btn {
  display: flex; align-items: center; justify-content: center; width: 100%; min-height: 52px;
  border-radius: 12px; border: 0; background: var(--red); color: #fff; font-weight: 700; font-size: 16px;
  padding: 12px 16px; cursor: pointer; text-decoration: none; margin-top: 12px; -webkit-appearance: none;
}
.btn:disabled { background: #4A1A1A; color: #9b8f8f; cursor: default; }
.btn.green { background: var(--green); }
.btn.amber { background: var(--amber); }
.btn.dark { background: rgba(0,0,0,.75); }
.btn.outline { background: transparent; border: 1px solid var(--white); color: var(--white); font-weight: 600; }
.btn.big { min-height: 72px; font-size: 22px; font-weight: 800; letter-spacing: .2px; }
.btn .ico { margin-right: 10px; font-size: 24px; }

.banner { padding: 12px; border-radius: 8px; margin: 12px 0; border: 1px solid; }
.banner.red { background: rgba(226,37,33,.18); border-color: var(--red); }
.banner.amber { background: rgba(217,119,6,.18); border-color: var(--amber); }
.banner.green { background: rgba(27,138,74,.18); border-color: var(--green); }
.locked-note { color: var(--amber); text-align: center; margin-bottom: 16px; }

.spinner { width: 36px; height: 36px; border: 4px solid rgba(226,37,33,.25); border-top-color: var(--red); border-radius: 50%; animation: spin 0.9s linear infinite; margin: 20px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Consent */
.consent-text { white-space: pre-wrap; font-size: 15px; line-height: 1.45; background: var(--dark); border-radius: 12px; padding: 16px; border-top: 3px solid var(--red); }
.consent-text b { display: block; text-align: center; margin-bottom: 6px; }

/* Face enrollment */
.steps { display: flex; gap: 8px; margin-bottom: 12px; }
.steps .st { flex: 1; text-align: center; padding: 8px 4px; border-radius: 10px; background: var(--dark); border: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.steps .st .n { display: inline-block; min-width: 22px; height: 22px; line-height: 22px; border-radius: 11px; background: var(--line); color: var(--cream); font-weight: 800; font-size: 12px; margin-right: 4px; }
.steps .st.on { border-color: var(--red); color: var(--cream); }
.steps .st.on .n { background: var(--red); }
.steps .st.done { border-color: var(--green); }
.steps .st.done .n { background: var(--green); }
.cam {
  position: relative; width: 100%; aspect-ratio: 3 / 4; background: #000; border-radius: 14px; overflow: hidden;
}
.cam video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cam video.mirror { transform: scaleX(-1); }
.cam .oval {
  position: absolute; left: 19%; right: 19%; top: 14%; height: 56%; border-radius: 50%;
  border: 3px solid var(--red); box-shadow: 0 0 0 999px rgba(9,13,22,.62); pointer-events: none; z-index: 2;
}
.cam .cam-msg { position: absolute; left: 12px; right: 12px; bottom: 12px; text-align: center; font-weight: 700; text-shadow: 0 1px 3px #000; }
.cam .placeholder { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 24px; color: var(--muted); }
.thumbs { display: flex; gap: 8px; margin-top: 10px; }
.thumbs img, .thumbs .empty { flex: 1; width: 0; aspect-ratio: 3/4; object-fit: cover; border-radius: 8px; background: var(--dark); border: 1px solid var(--line); }
.angle-label { text-align: center; font-weight: 700; font-size: 17px; margin-top: 12px; }

/* Locked card */
.lock-card { background: var(--dark); border-radius: 14px; padding: 22px; text-align: center; margin: 12px 0; }
.lock-card .lk { font-size: 42px; }

/* Home */
.home-hint { text-align: center; font-size: 16px; line-height: 1.35; margin-top: 8px; }
.home-card { background: var(--dark); border-radius: 14px; padding: 16px; display: flex; gap: 12px; align-items: center; margin: 16px 0 0; }
.home-card .avatar { width: 46px; height: 46px; border-radius: 23px; background: var(--red); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 18px; flex: none; }
.chk { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.chip { font-size: 12px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.chip.ok { border-color: var(--petrol); color: var(--cream); background: rgba(22, 87, 91, 0.28); }
.chip.no { border-color: var(--red); color: var(--cream); background: rgba(226, 37, 33, 0.18); }

/* QR scanner overlay */
.scan { position: fixed; inset: 0; background: #000; z-index: 50; display: flex; flex-direction: column; }
.scan .band { position: relative; }
.scan .view { position: relative; flex: 1; overflow: hidden; }
.scan video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scan .frame {
  position: absolute; left: 50%; top: 45%; width: 68vw; max-width: 320px; aspect-ratio: 1; transform: translate(-50%, -50%);
  border: 4px solid var(--red); border-radius: 18px; box-shadow: 0 0 0 999px rgba(9,13,22,.55);
}
.scan .frame::after { content: ""; position: absolute; left: 8%; right: 8%; top: 50%; height: 2px; background: rgba(226,37,33,.85); animation: scanline 1.8s ease-in-out infinite; }
@keyframes scanline { 0%,100% { top: 10%; } 50% { top: 90%; } }
.scan .scan-msg { position: absolute; left: 16px; right: 16px; bottom: calc(24px + var(--safe-bottom)); text-align: center; color: var(--cream); font-weight: 600; text-shadow: 0 1px 3px #000; }

/* Punch selection */
.choice {
  display: block; width: 100%; text-align: center; border-radius: 14px; padding: 18px 16px; margin-bottom: 12px;
  border: 2px solid transparent; color: #fff; font-size: 22px; font-weight: 800; cursor: pointer; -webkit-appearance: none;
  opacity: .55; transition: opacity .15s, transform .1s;
}
.choice .s { display: block; font-size: 13px; font-weight: 500; opacity: .9; margin-top: 2px; }
.choice.arr { background: #2E9E57; }
.choice.ext { background: var(--red); }
.choice.on { opacity: 1; border-color: #fff; transform: scale(1.01); }
.seg-title { text-align: center; color: var(--muted); font-size: 13px; margin: 10px 0 8px; }
.seg { display: flex; gap: 10px; }
.seg button {
  flex: 1; min-height: 52px; border-radius: 10px; font-size: 16px; font-weight: 700; cursor: pointer;
  background: #3A3F47; color: var(--cream); border: 1px solid #555c66; -webkit-appearance: none;
}
.seg button.on { background: #fff; color: #111; border-color: #fff; }

/* Result (G/Y/R) */
.result { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 28px 22px calc(28px + var(--safe-bottom)); background: var(--navy); }
.result.green { background: var(--green); }
.result.amber { background: var(--amber); }
.result.red { background: var(--deep-red); }
.result .big { font-size: 30px; font-weight: 800; margin-bottom: 14px; }
.result .msg { font-size: 18px; line-height: 1.35; }
.result .time { font-size: 18px; font-weight: 700; margin-top: 12px; }
.result .badge { display: inline-block; margin-top: 12px; padding: 6px 14px; border-radius: 999px; background: rgba(0,0,0,.25); font-weight: 700; font-size: 14px; }
.result .actions { width: 100%; max-width: 420px; margin-top: 24px; }

/* History */
.month { display: flex; align-items: center; justify-content: space-between; margin: 0 0 12px; }
.month button { background: var(--dark); border: 1px solid var(--line); color: var(--cream); width: 46px; height: 42px; border-radius: 10px; font-size: 22px; cursor: pointer; }
.month .m { font-weight: 700; font-size: 18px; }
.totals { background: var(--dark); border-radius: 12px; padding: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.totals .k { color: var(--muted); font-size: 12px; }
.totals .v { font-weight: 800; font-size: 18px; }
.day { background: var(--dark); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; border-left: 4px solid var(--line); }
.day.norm { border-left-color: var(--green); }
.day.warn { border-left-color: var(--amber); }
.day.bad { border-left-color: var(--red); }
.day .top { display: flex; justify-content: space-between; gap: 8px; font-weight: 700; }
.day .st { font-weight: 600; font-size: 13px; color: var(--muted); text-align: right; }
.day .times { display: flex; gap: 18px; margin-top: 6px; font-size: 15px; }
.day .times b { font-size: 18px; }
.day .extra { color: var(--muted); font-size: 13px; margin-top: 4px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 5px; margin-right: 6px; vertical-align: middle; }
.dot.green { background: #35c46f; } .dot.yellow { background: var(--amber); } .dot.red { background: var(--red); }
.empty-note { text-align: center; color: var(--muted); padding: 30px 0; }
.foot-links { text-align: center; color: var(--muted); font-size: 13px; margin-top: 18px; }
.foot-links a { color: var(--muted); }

/* ---- Face-ID-style scan ---- */
.fid-main { align-items: center; }
.fid { position: relative; width: min(78vw, 340px); aspect-ratio: 1; margin: 8px auto 18px; }
.fid-cam { position: absolute; inset: 9%; border-radius: 50%; overflow: hidden; background: #000; box-shadow: 0 0 0 2px rgba(247,244,239,.08); }
.fid-cam video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.fid-ring { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.fid-idle { position: absolute; inset: 9%; border-radius: 50%; background: var(--dark); display: flex; align-items: center; justify-content: center; }
.fid-idle img { width: 62%; opacity: .9; }
.fid-check { position: absolute; inset: 9%; }
.fid-check svg { width: 100%; height: 100%; display: block; }
.fid-check circle { fill: rgba(52,199,89,.88); stroke: none; transform-origin: 50% 50%; animation: fidpop .35s ease-out; }
.fid-check path { fill: none; stroke: #fff; stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 80; stroke-dashoffset: 80; animation: fiddraw .45s .25s ease-out forwards; }
@keyframes fidpop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes fiddraw { to { stroke-dashoffset: 0; } }
.fid-msg { text-align: center; font-size: 21px; font-weight: 700; min-height: 30px; }
.fid-sub { text-align: center; color: var(--muted); font-size: 15px; margin-top: 6px; min-height: 42px; max-width: 360px; }
.fid-progress { width: 70%; height: 6px; background: var(--dark); border-radius: 3px; overflow: hidden; margin: 12px auto 0; }
.fid-progress div { height: 100%; width: 0; background: var(--red); transition: width .2s; }
.passkey-card { background: var(--dark); border-radius: 14px; padding: 16px; margin-top: 16px; border-left: 4px solid #34C759; }
.passkey-card h3 { margin: 0 0 6px; font-size: 17px; }
.btn.passkey { background: #fff; color: #111; }
/* kiosk overlay */
.kfid { position: fixed; inset: 0; z-index: 60; background: rgba(9,13,22,.97); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; }
.kfid-name { font-size: 30px; font-weight: 800; margin-bottom: 10px; text-align: center; }
.kfid .fid { width: min(60vh, 70vw, 460px); }
.kfid .fid-msg { font-size: 30px; }
.kfid .fid-sub { font-size: 18px; max-width: 640px; }
.passkey-card .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.passkey-card .row2 .btn { margin: 0; min-height: 46px; }
.btn.passkey .pk-ico { margin-right: 8px; }
/* ---- office pages ---- */
.office main { padding-bottom: 40px; }
.card.form h2, .card h3 { margin: 0 0 8px; font-size: 18px; }
.card { background: var(--dark); border-radius: 14px; padding: 16px; margin: 14px 0; }
.card textarea, .card select, main select.month { width: 100%; box-sizing: border-box; background: #0f141c; color: var(--cream); border: 1px solid #2a3240; border-radius: 10px; padding: 12px; font-size: 16px; font-family: inherit; }
.sec { margin: 22px 0 6px; font-size: 16px; color: var(--muted); }
.list .item { background: var(--dark); border-radius: 12px; padding: 12px 14px; margin: 8px 0; }
.list .item .row, .card .row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.st { font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 20px; white-space: nowrap; }
.st-pending { background: #D97706; color: #fff; } .st-approved { background: #1b8a4a; color: #fff; } .st-rejected { background: #E22521; color: #fff; } .st-none { background: #39424f; color: #fff; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 6px 0 8px; }
.seg button { background: #0f141c; color: var(--cream); border: 1px solid #2a3240; border-radius: 10px; padding: 12px 4px; font-weight: 700; font-size: 15px; }
.seg button.on { background: var(--red); border-color: var(--red); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pr { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid #222a36; font-size: 15px; }
.pr.b { font-weight: 800; font-size: 16px; }
.item.warn-expired, .item.warn-d7 { border-left: 4px solid var(--red); } .item.warn-d14, .item.warn-d30 { border-left: 4px solid #D97706; }
.news.unread { border-left: 4px solid var(--red); } .news-body { margin-top: 8px; line-height: 1.4; }
.dot { width: 10px; height: 10px; border-radius: 5px; background: var(--red); display: inline-block; }
.banner.green { background: #1b8a4a; color: #fff; padding: 12px 14px; border-radius: 10px; margin: 10px 0; }

/* Frosted glass: navy/petrol tint + petrol border (ТКП), not plain white frost */
.home-card, .card, .push-card, .lock-card, .consent-text, .totals, .list .item, a.item.meet-link, .tile {
  background: rgba(11, 15, 26, 0.42);
  border: 1px solid rgba(22, 87, 91, 0.55);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: 0 4px 24px rgba(9, 13, 22, 0.35);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .home-card, .card, .push-card, .lock-card, .consent-text, .totals, .list .item, a.item.meet-link, .tile {
    background: rgba(11, 15, 26, 0.88);
  }
}
.home-card { color: var(--white); overflow: hidden; }
.home-card::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--red); border-radius: 14px 14px 0 0; pointer-events: none;
}
.home-card { position: relative; }

/* home tiles */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 16px 0 4px; }
.tile { position: relative; border-radius: 14px; padding: 14px 6px 12px; text-align: center; color: var(--white); text-decoration: none; font-size: 13px; font-weight: 700; line-height: 1.2; overflow: hidden; }
.tile::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--red); border-radius: 14px 14px 0 0; pointer-events: none;
}
.tile .ti { display: block; font-size: 24px; margin-bottom: 6px; }
.tile .bdg { position: absolute; top: 6px; right: 8px; background: var(--red); color: #fff; border-radius: 10px; min-width: 20px; height: 20px; font-size: 12px; line-height: 20px; padding: 0 5px; z-index: 1; }
.doc-alert { background: #3a1414; border-left: 4px solid var(--red); border-radius: 10px; padding: 10px 12px; margin-top: 12px; font-size: 14px; }
.push-card { background: var(--dark); border-radius: 14px; padding: 14px; margin-top: 12px; font-size: 14px; }
.push-card .btn { margin-top: 10px; min-height: 44px; }
/* ---- chat ---- */
.page-chat main { padding-bottom: 0; }
.chat-top { display: flex; gap: 8px; margin: 12px 0; }
.chat-top input { flex: 1; min-width: 0; }
.small-btn { min-height: 44px !important; padding: 0 12px !important; width: auto !important; font-size: 14px !important; margin: 0 !important; white-space: nowrap; }
.chat-row { display: flex; gap: 12px; align-items: center; padding: 10px 4px; border-bottom: 1px solid #1c232e; color: var(--cream); text-decoration: none; }
.ava { width: 44px; height: 44px; border-radius: 22px; background: var(--red); display: flex; align-items: center; justify-content: center; font-weight: 800; flex: none; }
.ava.group { background: #2a3445; }
.ava.admin { background: #2b5fa8; }
.admin-readonly-note { padding: 8px 0 calc(12px + env(safe-area-inset-bottom)); text-align: center; }
.cr-main { flex: 1; min-width: 0; } .cr-top, .cr-bot { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.ell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bdg2 { background: #34C759; color: #000; border-radius: 10px; min-width: 20px; height: 20px; font-size: 12px; font-weight: 800; text-align: center; line-height: 20px; padding: 0 5px; }
.srch { display: block; padding: 8px 0; border-bottom: 1px solid #222a36; color: var(--cream); text-decoration: none; }
.conv { display: flex; flex-direction: column; height: calc(100dvh - 86px); }
/* open conversation: whole page = visible viewport, only the message list scrolls, composer pinned at the bottom */
body.page-chat.in-conv { height: 100vh; height: var(--vvh, 100dvh); min-height: 0; overflow: hidden; }
body.page-chat.in-conv main { flex: 1 1 auto; min-height: 0; overflow: hidden; padding-top: 6px; padding-bottom: 0; }
body.page-chat.in-conv #view { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
body.page-chat.in-conv .conv { flex: 1 1 auto; min-height: 0; height: auto; }
body.page-chat.in-conv .band { position: relative; }
.conv .msgs { min-height: 0; }
.conv .fname { padding: 4px 2px 0; } .conv .fname button { background: none; border: 0; color: var(--cream); font-size: 15px; margin-left: 6px; }
.conv-head { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid #1c232e; }
.msgs { flex: 1; overflow-y: auto; padding: 10px 2px; -webkit-overflow-scrolling: touch; }
.dayline { text-align: center; color: var(--muted); font-size: 12px; margin: 10px 0; }
.msg { max-width: 82%; background: #1b2230; border-radius: 14px 14px 14px 4px; padding: 8px 10px 4px; margin: 4px 0; position: relative; word-wrap: break-word; }
.msg.mine { margin-left: auto; background: #6d1a18; border-radius: 14px 14px 4px 14px; }
.msg .from { color: #ff8a80; font-size: 12px; font-weight: 700; }
.msg .meta { text-align: right; font-size: 11px; color: rgba(247,244,239,.6); }
.tick { margin-left: 3px; } .tick.read { color: #4FC3F7; }
.msg .quote { border-left: 3px solid var(--red); background: rgba(0,0,0,.25); padding: 4px 8px; border-radius: 6px; font-size: 13px; margin-bottom: 4px; }
.msg .acts { display: none; gap: 6px; margin-top: 4px; } .msg:hover .acts, .msg:focus-within .acts, .msg.sel .acts { display: flex; }
.msg .acts button { background: none; border: 1px solid #39424f; color: var(--cream); border-radius: 8px; font-size: 12px; padding: 3px 8px; }
.chat-img { max-width: 100%; max-height: 260px; border-radius: 10px; display: block; margin-bottom: 4px; background: #0f141c; min-height: 60px; min-width: 80px; cursor: pointer; }
.chat-file { color: var(--cream); display: block; padding: 6px 0; }
.chat-vid { max-width: 100%; max-height: 280px; border-radius: 10px; display: block; margin-bottom: 4px; background: #0f141c; }
.upbar { display: flex; align-items: center; gap: 8px; padding: 4px 2px 0; }
.upbar[hidden] { display: none !important; }
.upbar-fill { height: 6px; background: var(--red); border-radius: 3px; width: 0; min-width: 0; flex: 1; transition: width .15s; box-shadow: inset 0 0 0 6px #2a3240; background-clip: content-box; }
/* fill uses width on the element itself */
.upbar .upbar-fill { box-shadow: none; background: var(--red); background-clip: border-box; }
.upbar #uptxt { flex: none; font-size: 12px; }
.reply-bar { display: flex; justify-content: space-between; background: #1b2230; border-left: 3px solid var(--red); padding: 6px 10px; font-size: 13px; }
.reply-bar button { background: none; border: 0; color: var(--cream); font-size: 16px; }
.composer { flex: none; display: flex; gap: 8px; align-items: flex-end; padding: 8px 0 calc(8px + env(safe-area-inset-bottom)); background: var(--navy); }
.composer textarea { flex: 1; resize: none; min-height: 44px; max-height: 120px; background: #0f141c; color: var(--cream); border: 1px solid #2a3240; border-radius: 22px; padding: 11px 14px; font-size: 16px; font-family: inherit; }
.composer .att { font-size: 22px; padding: 8px 4px; cursor: pointer; }
.composer .send { width: 48px !important; min-height: 44px !important; border-radius: 22px; padding: 0 !important; margin: 0 !important; font-size: 18px; }
/* meetings */
.item.meet.unread { border-left: 4px solid var(--red); }
.item.meet.cancelled { opacity: .55; }
.item.meet .mcomment { width: 100%; box-sizing: border-box; margin-top: 10px; }
.rsvp-row { display: flex; gap: 10px; margin-top: 8px; }
.rsvp-row .btn { flex: 1; margin: 0; }
.rsvp-row .btn.rsvp.on { outline: 3px solid #34C759; }
a.item.meet-link { display: block; text-decoration: none; color: inherit; background: var(--dark); border-radius: 12px; padding: 12px 14px; margin: 8px 0; border-left: 4px solid var(--red); }
.bdg-inline { background: var(--red); color: #fff; border-radius: 10px; min-width: 20px; height: 20px; font-size: 12px; line-height: 20px; padding: 0 6px; text-align: center; }

/* documents: compact checklist + page list */
.chk-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.chk-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid rgba(255,255,255,.06); }
.chk-row:first-child { border-top: 0; }
.chk-row .chk-name { flex: 1; line-height: 1.3; }
.chk-row > .st { min-width: 26px; text-align: center; }
.btn.mini { width: auto; min-height: 0; padding: 7px 14px; font-size: 14px; margin: 0; flex: none; }
.doc-actions { display: flex; gap: 8px; margin-top: 8px; }
.doc-actions .btn.mini { flex: 1; }
.pagelist { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.pagelist .pg { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; background: rgba(255,255,255,.05); border-radius: 10px; padding: 6px 10px; }
.pagelist .pg button { background: none; border: 0; color: inherit; font-size: 16px; cursor: pointer; }
.btn.ghost { background: transparent; border: 1px solid var(--line, rgba(255,255,255,.18)); color: var(--cream, #f3efe6); font-weight: 600; }
.two .btn.ghost { margin-top: 0; }

.band .back-btn { display:inline-flex; align-items:center; justify-content:center; min-width:40px; height:40px; margin-left:-6px; margin-right:2px;
  border-radius:10px; color:var(--cream, #F4EFE6); font-size:26px; font-weight:700; text-decoration:none; line-height:1; -webkit-tap-highlight-color:transparent; }
.band .back-btn:active { background:rgba(255,255,255,.12); }
.msg .meta .edited { font-style: italic; opacity: .85; margin-right: 4px; }
.two > div { min-width: 0; } .two input[type=date] { min-width: 0; width: 100%; }
.tpages { display:flex; flex-direction:column; gap:8px; margin:8px 0; } .tpage { width:100%; border-radius:8px; background:#fff; min-height:40px; } .tpage.zoom { position:fixed; inset:0; z-index:50; object-fit:contain; background:#000; border-radius:0; }
.netbar { padding: 8px 14px; font-size: 13px; font-weight: 600; text-align: center; } .netbar.off { background: #D97706; color: #111; } .netbar.sync { background: #2A3340; color: #F7F4EF; } .netbar.ok { background: #1B8A4A; color: #fff; }
.card.pend { border-left: 4px solid #D97706; }

/* profile phone on home card */
.who-phone{display:inline-block;margin-top:4px;color:#E8E1D3;text-decoration:none}
.who-phone.missing{color:#F0A030;text-decoration:underline}
.who-phone[hidden]{display:none}
.chainv{margin-top:6px;line-height:1.7}
.chainv .cst{white-space:nowrap;padding:1px 6px;border-radius:8px;background:rgba(255,255,255,.06)}
.chainv .cst.approved{color:#7BD88F}.chainv .cst.rejected{color:#F07A7A}.chainv .cst.pending{color:#F0C060;font-weight:700}

/* Subtle drifting light on the petrol–navy gradient (no figurative art). */
body::after {
  content: "";
  position: fixed;
  inset: -25%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 28% 16%, rgba(242,243,245,.07) 0 8%, transparent 28%),
    radial-gradient(circle at 74% 42%, rgba(22,87,91,.20) 0 10%, transparent 34%);
  animation: tkp-glow 48s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes tkp-glow {
  from { transform: translate3d(-2%, -1.5%, 0); }
  to   { transform: translate3d(3%, 2%, 0); }
}
@media (prefers-reduced-motion: reduce) {
  body::after { animation: none; will-change: auto; }
}

.koi-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  display: block;
}
body.page-home { overflow-x: hidden; }
body.page-home::after { display: none; }

body.page-home .btn.outline {
  background: rgba(11, 15, 26, 0.40);
  border-color: rgba(22, 87, 91, 0.75);
  color: var(--white);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}
body.page-home .home-hint,
body.page-home .foot-links,
body.page-home .locked-note {
  text-shadow: 0 1px 3px rgba(9,13,22,.85);
}
.st-received { background: #D97706; color: #fff; }
.st-reviewing { background: #2563EB; color: #fff; }
.st-resolved { background: #1b8a4a; color: #fff; }

/* list search (DP-36b) */
.lf-bar{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:8px 0 10px}
.lf-bar .lf-q{flex:1;min-width:160px;max-width:420px}
.lf-bar .lf-count{white-space:nowrap;opacity:.75}
.lf-bar .lf-selvis{flex:none}


/* DP-38 in-app media viewer */
body.media-open { overflow: hidden; }
.media-view {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
}
.media-view[hidden] { display: none !important; }
.media-view-stage {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: calc(56px + env(safe-area-inset-top, 0px)) 12px calc(12px + env(safe-area-inset-bottom, 0px));
}
.media-view-stage img,
.media-view-stage video {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  background: #000;
}
.media-view-close {
  position: fixed;
  top: calc(8px + env(safe-area-inset-top, 0px));
  right: calc(8px + env(safe-area-inset-right, 0px));
  z-index: 10001;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 22px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 28px;
  line-height: 42px;
  font-weight: 400;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}
.media-view-close:focus { outline: 2px solid #fff; outline-offset: 2px; }
.tpage { cursor: pointer; }
