@font-face {
  font-family: "DM Sans";
  src: url("fonts/dm-sans-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "DM Sans";
  src: url("fonts/dm-sans-latin-ext.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C7,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

:root {
  font: 16px/1.45 "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-optical-sizing: auto;
  color: #252c3b;
  background: #f3f5f9;
  --ink: #222c3e;
  --muted: #5e6d84;
  --line: #dce4ef;
  --line-soft: #e8edf4;
  --panel: #fbfcfe;
  --blue: #4776eb;
  --blue-dark: #3564d4;
  --soft: #e7eefc;
  --navy: #253343;
  --radius: 15px;
  --shadow: 0 1px 2px #21395a06, 0 8px 24px #28457108;
  --ease: cubic-bezier(.22,.8,.24,1);
  --ease-exit: cubic-bezier(.4,0,.6,1);
  --motion-quick: 150ms;
  --motion-page: 230ms;
  --motion-panel: 310ms;
  --motion-exit: 205ms;
}

*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, p { margin: 0; }
body { min-width: 0; font-family: inherit; color: var(--ink); }
[hidden] { display: none !important; }
button, input, textarea, select { font: inherit; }
button, a { touch-action: manipulation; }
button { color: inherit; cursor: pointer; }
a { color: var(--blue); text-decoration-thickness: .075em; text-underline-offset: .18em; }
:focus-visible { outline: 3px solid #769cff; outline-offset: 3px; }
h1 { font-weight: 650; font-size: clamp(1.75rem, 2vw, 2.06rem); letter-spacing: -.035em; line-height: 1.18; overflow-wrap: anywhere; }
h2 { font-size: 1.12rem; font-weight: 650; letter-spacing: -.018em; line-height: 1.3; overflow-wrap: anywhere; }
h3 { font-size: 1rem; font-weight: 600; line-height: 1.35; }
p { line-height: 1.55; }
strong { font-weight: 600; }
.muted, small { color: var(--muted); }
small { font-size: .83rem; line-height: 1.4; }
.icon { width: 19px; height: 19px; flex: none; vertical-align: middle; }

.frame { display: grid; grid-template-columns: 250px minmax(0,1fr); min-height: 100dvh; }
.frame main { min-width: 0; background: linear-gradient(150deg,#f8fafc 0,#f2f5f9 470px); }
.sidebar {
  position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column;
  padding: 15px 16px; overflow: hidden; color: #252d3b;
  background: linear-gradient(158deg,#f5f7fb,#edf1f7); border-right: 1px solid #dce4ef;
}
.sidebar-heading { flex: none; display: flex; align-items: center; justify-content: space-between; margin: 7px 12px clamp(29px,6vh,53px); }
.brand { display: block; width: 183px; max-width: 100%; height: auto; }
.startup { min-height: 100dvh; display: grid; align-content: center; justify-items: center; gap: 18px; padding: 24px; text-align: center; }
.startup .brand { width: min(68vw, 410px); }
.startup p { margin: 0; }
.sidebar-nav { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #c9d1de transparent; overflow-anchor: none; }
.nav-label { margin: 18px 14px 7px; color: #576479; font-size: 12px; font-weight: 700; line-height: 16px; letter-spacing: .075em; }
.nav { display: grid; gap: 4px; }
.employee-links { margin-top: 4px; }
.nav button {
  display: flex; align-items: center; gap: 11px; min-height: 42px; width: 100%; padding: 9px 13px;
  border: 1px solid transparent; border-radius: 10px; color: #737f93; background: transparent;
  text-align: left; font-size: 13px; font-weight: 500; line-height: 18px; transition: background-color .14s,color .14s,box-shadow .14s;
}
.nav button:hover { background: #e7ecf3; color: #42536d; }
.nav button.active { color: #355baa; background: #e2eafb; border-color: #d4dff5; box-shadow: inset 2px 0 #6b8bd2; font-weight: 650; }
.nav button:focus-visible { outline-offset: -3px; }
.nav button .icon { width: 17px; height: 17px; }
.account-strip { flex: none; display: flex; align-items: center; gap: 5px; background: #e7ecf4; border: 1px solid #dfe6f1; border-radius: 12px; margin-top: 10px; padding: 8px; }
.account-identity { display: grid; flex: 1; min-width: 0; gap: 1px; overflow-wrap: anywhere; }
.account-identity strong { color: #252d3b; font-size: .86rem; line-height: 1.25; }
.account-identity small { color: #4f5b6d; font-size: .72rem; line-height: 1.35; }
.account-icon, .avatar-button {
  display: grid; place-items: center; flex: none; width: 30px; height: 36px; padding: 0;
  border: 0; border-radius: 7px; color: #303d52; background: transparent;
}
.avatar-button { width: 34px; border-radius: 50%; }
.account-icon:hover,.account-icon.active,.avatar-button:hover { background: #d4dae3; }
.avatar { display: grid; place-items: center; width: 33px; height: 33px; flex: none; border-radius: 50%; overflow: hidden; background: #e4ebf8; color: #436998; font-size: .83rem; font-weight: 700; }
.avatar:has(> img) { position: relative; }
.avatar > .icon { width: 60%; height: 60%; }
.avatar:has(> img) > .icon { visibility: hidden; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.subtitle, td small { display: block; margin-top: 4px; }
.follow-up-proof { display: grid; gap: 8px; }
.follow-up-photo { display: block; width: min(100%, 280px); max-height: 200px; object-fit: contain; object-position: left center; border-radius: 10px; }
.draft-state { color: #3f6185; font-weight: 650; }
.draft-indicator { display: flex; flex-wrap: wrap; gap: 5px 12px; color: var(--muted); }
.simple-list, .assigned-checks { min-width: 0; display: grid; gap: 8px; }
.simple-list-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 6px; margin-bottom: 7px; }
.simple-list-row input { width: 100%; min-width: 0; }
.simple-list > button { justify-self: start; }
.assigned-checks .check { min-height: 44px; align-items: center; line-height: 1.35; }
.assignment-choice { display: flex; align-items: center; flex-wrap: wrap; gap: 0 8px; min-width: 0; }
.assignment-choice .check { min-width: 0; overflow-wrap: anywhere; }
.announcement-response { min-width: min(165px, 100%); }
.assigned-checks input { flex: none; }
.plan-checklist, .report-extra { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.plan-checklist { margin-top: 10px; }
.plan-checklist summary, .report-extra summary { cursor: pointer; font-weight: 650; }
.plan-checklist[open] summary, .report-extra[open] summary { margin-bottom: 10px; }
.plan-checklist fieldset + fieldset { margin-top: 8px; }
.plan-completed-tasks { margin-top: 8px; }
.project-checklist-task { padding: 14px; border-top: 1px solid var(--line); }
.project-checklist-task small, .project-checklist-units small { color: var(--muted); }
.project-checklist-units { list-style: none; display: grid; gap: 8px; margin: 8px 0 0; padding: 0; }
.project-checklist-units li { padding: 10px; border-radius: 8px; background: #f2f6fc; overflow-wrap: anywhere; }
.project-checklist-units .btn { margin-top: 5px; }
.handover-import { border-top:1px solid var(--line); }
.handover-service { padding:12px; background:#f4f7fc; border:1px solid var(--line); border-radius:12px; }
.handover-service h4 { margin:0 0 8px; color:#38587f; }
.handover-tasks,.handover-subtasks { list-style:none; margin:0; padding:0; display:grid; gap:8px; }
.handover-tasks > li { min-width:0; padding:10px; background:#fff; border:1px solid var(--line); border-radius:9px; overflow-wrap:anywhere; }
.handover-subtasks { margin:8px 0 0 8px; padding-left:10px; border-left:2px solid #d4e1f2; }
.handover-subtasks > li { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.unread-count {
  display:inline-grid; flex:none; place-items:center; min-width:20px; height:20px; padding:0 5px;
  border-radius:999px; background:#dce9ff; color:#24477b; font-size:11px; font-weight:750;
  line-height:1; font-variant-numeric:tabular-nums;
}
.nav .unread-count { margin-inline-start:auto; }
.thread .unread-count,.site-card-heading .unread-count { margin-inline-start:auto; }
.tabs .unread-count { margin-inline-start:6px; vertical-align:middle; }
.account-icon { position:relative; }
.account-icon .unread-count { position:absolute; top:0; right:0; min-width:15px; height:15px; padding:0 3px; font-size:9px; }
.bottom-nav button { position:relative; }
.bottom-nav .unread-count {
  position:absolute; top:4px; left:calc(50% + 4px);
  min-width:16px; height:16px; font-size:10px; padding:0 4px;
}
.card.field-day-card { --field-gutter: clamp(12px,2vw,20px); overflow: clip; }
.field-day-header {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px;
  padding: 14px var(--field-gutter); background: #f0f5fd;
}
.field-day-identity { display: flex; flex: 1 1 200px; align-items: center; gap: 11px; min-width: 0; }
.field-day-identity .avatar {
  width: 50px; height: 50px; font-size: .95rem; background: #dce8fc; color: #284e89;
  border: 2px solid #fff; box-shadow: 0 0 0 1px #cfddf3;
}
.field-day-identity h2 { font-size: 1.03rem; line-height: 1.3; overflow-wrap: anywhere; }
.field-day-identity p, .field-day-state p { font-size: .8rem; color: var(--muted); margin-top: 3px; overflow-wrap: anywhere; }
.field-day-state { min-width: 0; max-width: 100%; }
.field-day-state p { display: flex; align-items: center; gap: 4px; }
.field-day-state p .icon { width: 13px; height: 13px; flex: none; }
.field-day-actions { margin-left: auto; justify-content: flex-end; }
.field-day-actions .btn { min-height: 38px; padding: 6px 11px; }
.personal-day-card .field-day-actions .btn { min-height: 44px; padding: 8px 13px; }
.personal-day-card .field-day-summary > .panel-note { margin: 0; }
.field-day-summary { display: grid; gap: 10px; padding: 12px var(--field-gutter); border-top: 1px solid #e1e9f5; }
.field-day-facts {
  margin: 0; display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,125px),1fr));
  background: #f7f9fd; border: 1px solid #e1e9f5; border-radius: 11px;
}
.field-day-facts > div { min-width: 0; padding: 8px 11px; }
.field-day-facts > div + div { border-inline-start: 1px solid #e1e9f5; }
.field-day-facts dt { color: var(--muted); font-size: .8rem; }
.field-day-facts dd { margin: 2px 0 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.field-day-counts { display: flex; flex-wrap: wrap; gap: 4px 18px; list-style: none; margin: 0; padding: 0; font-size: .82rem; color: var(--muted); }
.field-day-counts strong { color: var(--ink); font-weight: 650; }
.field-day-changes { display: grid; gap: 12px; padding: 0 var(--field-gutter) 14px; }
.field-plan-change {
  display: grid; gap: 10px; padding: 12px; background: #f7f9fd;
  border: 1px solid var(--line); border-inline-start: 3px solid #b87926; border-radius: 11px;
  overflow-wrap: anywhere;
}
.field-plan-change header { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.field-plan-change h3 { font-size: .94rem; margin: 0; }
.field-plan-change-details {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 8px;
}
.field-plan-change-details > div { padding: 9px 11px; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.field-plan-change h4 { font-size: .78rem; color: var(--muted); margin: 0 0 5px; }
.field-plan-change ul { list-style: none; display: grid; gap: 6px; margin: 0; padding: 0; }
.field-plan-change li span { display: block; color: var(--muted); font-size: .8rem; }
.field-plan-change p { font-size: .85rem; margin: 0; }
.field-plan-change ul + p { margin-top: 6px; }
.field-plan-change-reason strong { margin-inline-end: 4px; }
.field-day-timeline { border-top: 1px solid #e1e9f5; }
.field-day-timeline summary {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  min-height: 44px; padding: 8px var(--field-gutter); cursor: pointer; color: #315489; font-size: .86rem; font-weight: 690;
}
.field-day-timeline summary::-webkit-details-marker { display: none; }
.field-day-timeline summary:hover, .field-day-timeline[open] > summary { background: #f5f8fe; }
.field-day-timeline summary:focus-visible { outline-offset: -3px; }
.field-day-timeline summary > span { display: inline-flex; align-items: center; gap: 7px; }
.field-day-timeline summary .icon { width: 15px; height: 15px; flex: none; }
.field-timeline-person { display: none; }
.field-day-timeline[open] > summary {
  position: sticky; top: 62px; z-index: 1; border-bottom: 1px solid #e1e9f5;
}
.field-day-timeline[open] .field-timeline-person { display: inline; overflow-wrap: anywhere; }
.field-day-timeline[open] summary > .icon { transform: rotate(90deg); }
.field-day-entries { padding: 10px var(--field-gutter) 14px; background: #f8faff; }
.field-day-entries :is(.plan-visit,.attendance-stop) { padding: 11px; border: 1px solid var(--line); border-radius: 11px; }
.field-day-entries :is(.plan-visit:not(.active-visit),.attendance-stop) { background: #fff; }
.field-day-entries .fieldwork-actions > .btn { min-height: 39px; padding: 7px 11px; }
@media (max-width: 560px) {
  .field-day-header { gap: 10px; }
  .field-day-identity { flex-basis: 100%; }
  .field-day-actions { width: 100%; margin-left: 0; justify-content: flex-start; }
  .field-day-actions .btn { min-height: 44px; }
  .field-day-facts { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .field-day-facts > div:nth-child(odd) { border-inline-start: 0; }
  .field-day-facts > div:nth-child(n+3) { border-top: 1px solid #e1e9f5; }
  .field-day-facts > div:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .field-day-entries .plan-visit { grid-template-columns: minmax(0,1fr); gap: 9px; }
  .field-day-entries .plan-time { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px 10px; padding: 7px 9px; }
}
@media (max-width: 760px) {
  .field-day-timeline[open] > summary { top: calc(56px + env(safe-area-inset-top)); }
  .frame:has(.topbar.offscreen) .field-day-timeline[open] > summary { top: env(safe-area-inset-top); }
}
.worked-clock { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 4px 6px; }
.worked-clock > span { font-variant-numeric: tabular-nums; white-space: nowrap; }
.worked-clock > [data-worked-band] { font-weight: 700; transition: color .35s ease; }
.worked-clock > [data-worked-band="red"] { color: #ae243a; }
.worked-clock > [data-worked-band="orange"] { color: #9f420d; }
.worked-clock > [data-worked-band="yellow"] { color: #856200; }
.worked-clock > [data-worked-band="green"] { color: #18734d; }
.worked-clock > [data-worked-band="blue"] { color: #255baa; }
.worked-clock > small { color: #176452; font-weight: 650; margin: 0; }
.attendance-panel-summary { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; }
.attendance-panel-summary dl { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; align-items: baseline; }
.attendance-panel-summary dt { color: var(--muted); font-size: .8rem; }
.attendance-panel-summary dd { margin: 0; font-weight: 650; }
.visit-assigned-tasks { margin: 8px 0; padding-left: 20px; overflow-wrap: anywhere; }
.visit-assigned-tasks li + li { margin-top: 4px; }
.offline-report-screen { max-width: 720px; }
.offline-report-screen > .brand { margin-bottom: 22px; }
.topbar {
  position: sticky; top: 0; z-index: 3;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 62px; padding: 0 clamp(18px,2.3vw,35px); background: #fbfcfe; border-bottom: 1px solid var(--line);
}
.crumb { display: flex; align-items: center; gap: 9px; font-size: .88rem; min-width: 0; }
.crumb .icon { width: 15px; color: #8191aa; }
.topbar-date { color: var(--muted); font-size: .84rem; font-weight: 600; }
.topbar-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.reminder-button { position: relative; flex: none; color: #425c82; }
.reminder-button [data-reminder-count] {
  position: absolute; top: -4px; right: -5px; display: grid; place-items: center;
  min-width: 18px; height: 18px; padding: 0 4px; border: 1px solid #fff; border-radius: 10px;
  background: #5278ae; color: #fff; font-size: 10px; font-weight: 700;
}
.reminder-list .list-row { padding-inline: 0; }
.reminder-list .list-row:first-child { padding-top: 0; }
.reminder-list .list-row:last-child { padding-bottom: 0; }
.reminder-list .grow { overflow-wrap: anywhere; }
.notification-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.notification-tools p { color: var(--muted); font-size: .86rem; margin: 0; }
.notification-tools .btn { flex-shrink: 0; }
.reminder-list { display: grid; gap: 9px; }
.reminder-list .list-row {
  padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: #fff;
}
.reminder-list .list-row:is(:first-child,:last-child) { padding-block: 12px; }
.reminder-list .badge { margin-top: 5px; }
.message-highlight { animation: highlight-message 1.65s ease-out both; }
@keyframes highlight-message { from { box-shadow: 0 0 0 4px #85a9fd80; } to { box-shadow: 0 0 0 0 #85a9fd00; } }
@media (max-width: 760px) {
  .dialog.notification-sheet {
    inset: auto 0 0; height: min(84dvh,700px); border-radius: 22px 22px 0 0;
    --panel-offset: translate3d(0,38px,0);
  }
  .notification-tools { align-items: flex-start; flex-wrap: wrap; }
  .notification-tools .btn { min-height: 44px; }
  .reminder-list .list-row > .actions > .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .message-highlight { animation: none; }
}
.mobile-brand, .mobile, .bottom-nav, .drawer-close, .drawer-scrim { display: none; }
.screen { padding: clamp(23px,3vw,41px) clamp(18px,3vw,46px) 48px; max-width: 1560px; margin: auto; }
.screen-enter { animation: screen-in var(--motion-page) var(--ease) both; }

.heading { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-bottom: 23px; }
.heading p { margin-top: 7px; max-width: 65ch; }
.heading .actions:empty { display: none; }
.setup-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.setup-card { display: grid; justify-items: start; gap: 10px; padding: 21px; }
.setup-card .symbol { margin-bottom: 3px; }
.setup-card .btn { margin-top: 4px; }

.actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 42px; max-width: 100%; padding: 9px 14px; border: 1px solid #dbe3ef; border-radius: 10px;
  color: #334760; background: #fff; font-size: .88rem; font-weight: 650; text-align: center;
  transition: background-color var(--motion-quick), border-color var(--motion-quick), box-shadow var(--motion-quick), transform var(--motion-quick) var(--ease);
}
.btn:hover { background: #f3f7ff; border-color: #aec3e8; }
a.btn { text-decoration: none; }
.btn:active:not(:disabled) { transform: translateY(1px) scale(.985); transition-duration: 85ms; }
.btn.primary { color: #fff; background: linear-gradient(180deg,#4b72cb,#3d63bb); border-color: #3f64bb; box-shadow: inset 0 1px #ffffff26,0 3px 8px #35579924; }
.btn.primary:hover { background: linear-gradient(180deg,#456dc6,#355ab0); border-color: #365ab0; box-shadow: 0 6px 15px #35579930; }
.btn.danger { color: #a12840; }
.btn:disabled { opacity: .57; cursor: wait; }
.btn.icononly { width: 43px; padding: 8px; }
.cards { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 13px; margin-bottom: 19px; }
.overview-stats { grid-template-columns: repeat(3,minmax(0,1fr)); }
.card { min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.stat { display: grid; gap: 8px; padding: 16px; }
.stat b, .number { font-size: clamp(1.24rem,2.5vw,1.9rem); font-weight: 650; line-height: 1.15; letter-spacing: -.03em; overflow-wrap: anywhere; }
.stat span:last-child { color: var(--muted); font-size: .87rem; }
.symbol { flex: none; display: grid; place-items: center; width: 41px; height: 41px; border-radius: 12px; background: #edf2ff; color: #597bd0; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 12px; background: #edf2fc; color: #365884; font-size: .78rem; font-weight: 680; }
.pill::before { content: ""; width: 6px; height: 6px; flex: none; border-radius: 50%; background: currentColor; }
.pill.green, .symbol.green { color: #176849; background: #e5f5ed; }
.pill.amber, .symbol.amber { color: #825113; background: #fff1d7; }
.pill.red, .symbol.red { color: #9c3349; background: #fdebf0; }
.pill.purple, .symbol.purple { color: #6543ac; background: #f0eafd; }
.grid { display: grid; grid-template-columns: minmax(0,1.5fr) minmax(0,1fr); gap: 17px; align-items: start; }
.stack { display: grid; gap: 15px; }
.card-head, .list-row, .between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card-head { padding: 15px 18px; flex-wrap: wrap; background: linear-gradient(180deg,var(--panel),#fff); }
.pad { padding: 17px 18px; }
.list-row { justify-content: flex-start; padding: 13px 18px; border-top: 1px solid var(--line-soft); }
.list-row > * { min-width: 0; }
.list-row > .actions > .btn { min-width: 0; overflow-wrap: anywhere; }
.grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.empty { padding: 20px 16px 24px; text-align: center; color: var(--muted); font-size: .9rem; }
.filters { margin-bottom: 15px; }
.filters .field { min-width: min(150px,100%); }
.tabs {
  display: flex; width: fit-content; max-width: 100%; gap: 2px; margin-bottom: 16px; padding: 3px;
  border: 1px solid #e1e6ef; border-radius: 10px; background: #eef1f6; overflow: auto; scrollbar-width: thin;
}
.tabs button {
  flex: 0 0 auto; min-height: 35px; padding: 7px 13px; border: 1px solid transparent; border-radius: 7px;
  background: transparent; white-space: nowrap; color: #5d697d; font-size: .85rem; font-weight: 550;
  transition: background-color .14s, color .14s, box-shadow .14s;
}
.tabs button:hover { background: #f8fafd; color: #394760; }
.tabs button.active { color: #37588e; background: #fff; border-color: #e5eaf2; box-shadow: 0 1px 4px #20375c12; }
.tabs button:focus-visible { outline-offset: -3px; }

.table-wrap { min-width: 0; overflow: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: 12px 13px; border-top: 1px solid var(--line-soft); vertical-align: middle; font-size: .89rem; }
th { color: #51627d; background: #f1f5fa; font-size: .79rem; font-weight: 650; white-space: nowrap; }
td { overflow-wrap: anywhere; }
tbody tr:hover { background: #f8fafd; }
td .btn { min-height: 37px; }
.catalog { display: grid; grid-template-columns: repeat(auto-fill,minmax(min(100%,260px),1fr)); gap: 15px; }
.site-card { display: grid; gap: 12px; padding: 18px; text-align: left; color: inherit; transition: border-color .18s, box-shadow .18s, transform .18s var(--ease); }
.site-card:hover { border-color: #9fb9eb; box-shadow: 0 10px 25px #203d6911; transform: translateY(-2px); }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { padding: 4px 7px; border-radius: 7px; background: #edf2f9; color: #455b79; font-size: .8rem; }
.kv { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,120px),1fr)); gap: 13px; margin-top: 12px; }
.kv strong { display: block; margin-top: 4px; }
.field { display: grid; gap: 6px; min-width: 0; font-size: .9rem; font-weight: 620; }
input, select, textarea {
  width: 100%; min-width: 0; min-height: 45px; padding: 9px 11px;
  border: 1px solid #d9e1ee; border-radius: 9px; background: #fff; color: var(--ink);
}
select {
  appearance: none; padding-right: 35px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23536785' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center;
}
textarea { min-height: 94px; resize: vertical; }
input[type=checkbox] { min-height: 0; width: 18px; height: 18px; accent-color: var(--blue); margin: 0; flex: none; }
.checks { display: flex; gap: 8px; flex-wrap: wrap; }
.check { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 6px 8px; border-radius: 8px; background: #eef3fb; font-size: .87rem; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.span { grid-column: 1/-1; }
.notice { padding: 12px 14px; border: 1px solid #d8e5fb; border-radius: 10px; background: #f3f7ff; color: #345178; font-size: .89rem; }
.error { color: #a12840; }
.datebox { width: auto; }

.login {
  min-height: 100dvh; display: grid; place-items: center; padding: 20px;
  background:
    radial-gradient(ellipse at 20% 10%,#dce8fb 0,transparent 50%),
    radial-gradient(ellipse at 90% 105%,#e1eafa 0,transparent 55%),
    #f7f9fc;
}
.login-card {
  width: min(100%,440px); border: 1px solid #d7e2f1; border-radius: 23px;
  background: #fff; box-shadow: 0 22px 65px #243f7026; animation: screen-in .35s var(--ease) both;
}
.login-brand {
  display: grid; gap: 8px; padding: clamp(18px,4.5vw,28px);
  background: linear-gradient(115deg,#f8fbff,#eaf2fd); border-bottom: 1px solid #e3ebf7;
}
.login-brand .brand { width: 205px; }
.login-content { padding: clamp(20px,5vw,32px); }
.login-content h1 { color: #233c60; font-size: clamp(1.65rem,5vw,2rem); margin-bottom: 15px; }
.login-card > h1,.login-card > p { margin: 14px 22px; }
.login-card form { display: grid; gap: 14px; }
.login-card form .field { color: #435774; }
.login-card form input { min-height: 46px; background: #f8fafd; }
.login-card form > .btn { margin-top: 3px; min-height: 48px; }
.access-options .management-access { margin: 11px 0 0; background: #f8fafd; }
.management-access > h3 { margin-top: 13px; }

.dialog {
  --panel-gutter: clamp(18px,2vw,30px);
  --panel-offset: translate3d(36px,0,0);
  position: fixed; inset: 0 0 0 auto; width: min(600px,100%); height: 100dvh; max-width: none; max-height: none; margin: 0;
  overflow: hidden; border: 0; border-left: 1px solid var(--line); padding: 0;
  color: var(--ink); background: #f5f7fb; box-shadow: -16px 0 48px #24395624; font: inherit;
}
.dialog[open] { animation: panel-in var(--motion-panel) var(--ease) both; }
.dialog > .panel-frame { height: 100%; display: grid; grid-template-rows: auto minmax(0,1fr) auto; }
.dialog::backdrop { background: #20314d52; }
.dialog .panel-content-enter > .body { animation: screen-in var(--motion-page) var(--ease) both; }
@supports (transition-behavior: allow-discrete) and (overlay: auto) {
  .dialog {
    opacity: 0; transform: var(--panel-offset); pointer-events: none;
    transition: transform var(--motion-exit) var(--ease-exit), opacity var(--motion-exit) ease,
      display var(--motion-exit) allow-discrete, overlay var(--motion-exit) allow-discrete;
  }
  .dialog[open] {
    opacity: 1; transform: none; pointer-events: auto; animation: none;
    transition-timing-function: var(--ease);
    transition-duration: var(--motion-panel);
  }
  .dialog::backdrop {
    opacity: 0;
    transition: opacity var(--motion-exit) var(--ease), display var(--motion-exit) allow-discrete, overlay var(--motion-exit) allow-discrete;
  }
  .dialog[open]::backdrop { opacity: 1; transition-duration: var(--motion-panel); }
  @starting-style {
    .dialog[open] { opacity: 0; transform: var(--panel-offset); }
    .dialog[open]::backdrop { opacity: 0; }
  }
}
.panel-frame > :is(header,footer) {
  display: flex; align-items: center; gap: 10px; padding-inline: var(--panel-gutter); background: #fff;
}
.panel-frame > header { justify-content: space-between; padding-block: 14px; border-bottom: 1px solid var(--line); background: #fdfdff; }
.panel-frame > header h2 { min-width: 0; font-size: 1.375rem; font-weight: 700; letter-spacing: -.032em; }
.panel-frame > header .icononly { flex: 0 0 44px; width: 44px; min-height: 44px; border-radius: 12px; background: #f7f9fc; color: #52637c; }
.panel-frame > header .icononly:hover { background: #eaf0f8; }
.panel-frame > footer {
  justify-content: flex-end; align-items: stretch; flex-wrap: wrap; padding-block: 12px max(12px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line); box-shadow: 0 -7px 20px #24355009;
}
.panel-frame > .body {
  display: grid; grid-template-columns: minmax(0,1fr); align-content: start; gap: 16px;
  min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable;
  padding: 20px var(--panel-gutter); scroll-padding-block: 16px; overflow-wrap: anywhere;
}
.panel-frame > .body > *, .dialog .kv > *, .panel-facts > * { min-width: 0; }
.dialog .kv { grid-template-columns: repeat(auto-fit,minmax(min(100%,175px),1fr)); }
.dialog .field > span { font-size: .84rem; color: #465c79; font-weight: 650; }
.password-control { position: relative; }
.password-control > input { width: 100%; padding-inline-end: 48px; }
.password-control > .btn { position: absolute; inset: 2px 2px 2px auto; width: 42px; min-height: 0; background: transparent; border-color: transparent; }
.password-control > .btn:hover, .password-control > .btn:focus-visible { background: #edf3fc; }
.panel-frame > footer > .btn { min-height: 44px; justify-content: center; text-align: center; }
.panel-frame > .body > .form-grid { align-items: start; }
.panel-section > .form-grid { align-items: start; }
.dialog .wide { min-width: 112px; }
.dialog fieldset, #role-form fieldset { min-width: 0; border: 1px solid var(--line); border-radius: 10px; padding: 10px; }
.dialog legend, #role-form legend { font-size: .89rem; font-weight: 650; }
#role-form fieldset p { margin-top: 8px; }
.dialog .row-fields { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)) auto; gap: 7px; }
.panel-summary, .panel-section { border: 1px solid var(--line); border-radius: 14px; padding: 16px; background: #fff; }
.panel-summary { display: grid; gap: 10px; background: #edf3fc; border-color: #dee8f7; }
.panel-summary-meta { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: start; gap: 8px 12px; }
.panel-summary-meta small { font-weight: 650; color: #4d6384; }
.panel-summary h3 { font-size: 1.16rem; line-height: 1.24; font-weight: 700; }
.panel-summary p { color: #445571; }
.panel-section { display: grid; gap: 12px; }
.panel-section h3 { color: #263953; font-weight: 700; }
.panel-facts { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,185px),1fr)); gap: 12px 16px; margin: 0; }
.panel-fact-wide { grid-column: 1 / -1; }
.panel-facts dt { margin: 0 0 3px; font-size: .8rem; color: var(--muted); }
.panel-facts dd { margin: 0; font-size: .925rem; font-weight: 650; overflow-wrap: anywhere; }
/* Rows in drawers give their title a full line before offering actions. */
.panel-frame > .body .list-row {
  display: grid; grid-template-columns: minmax(0,1fr); align-items: start; gap: 7px 10px; padding-inline: 0;
}
.panel-frame > .body .list-row:has(> :is(.symbol,.avatar):first-child) {
  grid-template-columns: auto minmax(0,1fr);
}
.panel-frame > .body .list-row > .actions:empty { display: none; }
.panel-frame > .body .list-row:has(> :is(.symbol,.avatar):first-child) > .actions { grid-column: 2; }
.panel-frame > .body .list-row > .actions { justify-content: flex-start; align-items: center; gap: 6px; }
.panel-frame > .body .list-row > .actions > .btn { min-height: 40px; }
.panel-frame > .body .list-row > .grow { overflow-wrap: anywhere; }
.panel-frame > .body .panel-section { grid-template-columns: minmax(0,1fr); }
.report-context { gap: 5px; }
.report-tracked-group > h4 { margin: 0 0 8px; font-size: .9rem; color: #465c79; }
.panel-section .history { margin: 0; }
.panel-disclosure > summary { cursor: pointer; font-weight: 650; color: #344d6e; }
.panel-disclosure[open] > summary { margin-bottom: 12px; }
.panel-note { font-size: .875rem; color: var(--muted); }
.sheet input { min-width: 120px; background: transparent; border: 0; border-radius: 0; }
.sheet input[type=checkbox] { min-width: 0; }
.sheet td, .sheet th { padding: 3px; border: 1px solid var(--line); }
.sheet td:last-child { width: 1%; }
.sheet .btn { padding: 4px 8px; }
.material-grid [data-act="grid-column"], .material-grid [data-act="grid-check"], .material-grid [data-act="grid-delete-column"] { display: none; }
.material-grid th input { pointer-events: none; font-weight: 650; }
.history { display: grid; gap: 10px; border-left: 2px solid #dbe6f9; padding-left: 14px; }
.history small { display: block; margin-top: 4px; }

.chat { display: grid; grid-template-columns: minmax(175px,245px) minmax(0,1fr); min-height: 420px; }
.threads { border-right: 1px solid var(--line); }
.threads .tabs { margin: 0 12px 10px; }
.thread { width: 100%; border: 0; border-top: 1px solid var(--line); text-align: left; color: inherit; background: #fff; }
.thread.active, .thread:hover { background: #edf4ff; }
.messages { display: flex; flex-direction: column; gap: 12px; height: clamp(235px,54dvh,530px); overflow: auto; padding: 15px; background: #f4f7fc; }
.bubble { align-self: flex-start; max-width: 92%; padding: 9px 12px; border: 1px solid var(--line); border-radius: 13px; background: #fff; overflow-wrap: anywhere; white-space: pre-wrap; }
.bubble.mine { align-self: flex-end; border-color: #d8e5ff; background: #eaf2ff; }
.bubble .actions { margin-top: 4px; }
.bubble .btn { min-height: 34px; padding: 4px 7px; font-size: .78rem; }
.bubble p { margin: 3px 0; }
.composer { display: flex; gap: 6px; padding: 9px; border-top: 1px solid var(--line); align-items: center; }
.composer input { flex: 1; }
.report-note { white-space: pre-wrap; overflow-wrap: anywhere; }
.month { padding: 11px 17px; background: #f7f9fe; color: #526584; font-size: .9rem; font-weight: 650; }
.banner { padding: 10px 17px; border-top: 1px solid var(--line); }
.media { display: block; max-width: 100%; max-height: 55vh; margin: 0 auto; }
.break { overflow-wrap: anywhere; }
#toast { position: fixed; right: 18px; bottom: 18px; z-index: 8; max-width: min(420px,90vw); padding: 11px 15px; border-radius: 10px; background: #182c4d; color: #fff; box-shadow: 0 8px 28px #162b4d37; }
#toast:empty { display: none; }

@keyframes screen-in { from { opacity: .72; transform: translate3d(0,6px,0); } to { opacity: 1; transform: none; } }
@keyframes panel-in { from { opacity: 0; transform: var(--panel-offset); } to { opacity: 1; transform: none; } }

@media (max-width: 1080px) {
  .cards:not(.overview-stats) { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  html.mobile-menu-open, html.mobile-menu-open body { overflow: hidden; overscroll-behavior: none; }
  .frame { display: block; --mobile-bar-duration: 260ms; }
  .topbar { position: sticky; top: 0; z-index: 3; padding: env(safe-area-inset-top) 14px 0; min-height: calc(56px + env(safe-area-inset-top)); }
  .topbar .crumb { display: none; }
  .mobile-brand, .mobile { display: inline-flex; }
  .mobile-brand .brand { width: clamp(122px,40vw,166px); }
  .topbar-date { font-size: .72rem; }
  .topbar-actions { gap: 8px; }
  .reminder-button { min-width: 44px; min-height: 44px; }
  .drawer-scrim {
    display: block; position: fixed; inset: 0; z-index: 5; border: 0;
    background: #14244260; opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity var(--motion-exit) var(--ease), visibility 0s var(--motion-exit);
  }
  .drawer-scrim.visible { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity var(--motion-panel) var(--ease); }
  .sidebar {
    position: fixed; top: 0; left: 0; z-index: 6; width: min(320px,88vw); height: 100dvh;
    visibility: hidden; transform: translate3d(-105%,0,0); border-radius: 0 23px 23px 0;
    background: linear-gradient(155deg,#fbfdff,#eef3fb 78%);
    box-shadow: 8px 0 36px #20345532;
    transition: transform var(--motion-exit) var(--ease-exit), visibility 0s var(--motion-exit);
    padding-top: calc(16px + env(safe-area-inset-top)); padding-bottom: calc(12px + env(safe-area-inset-bottom));
    padding-left: max(16px,env(safe-area-inset-left));
  }
  .sidebar.open { visibility: visible; transform: none; transition: transform var(--motion-panel) var(--ease); }
  .drawer-close {
    display: grid; place-items: center; width: 44px; height: 44px;
    border: 1px solid #dce6f3; border-radius: 13px; background: #f1f6ff; color: #2e496f;
    transition: background-color .15s, transform .15s;
  }
  .drawer-close:active { background: #e2edff; transform: scale(.94); }
  .bottom-nav {
    position: fixed; z-index: 4; display: flex; justify-content: space-around; gap: 2px;
    inset: auto max(10px,env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left));
    max-width: 480px; margin-inline: auto; padding: 4px;
    border: 1px solid #ffffffc9; border-radius: 22px;
    background: #f8fbfef5; box-shadow: 0 8px 28px #20395931,0 0 0 1px #cad8ed80;
  }
  .topbar, .bottom-nav {
    transition: transform var(--mobile-bar-duration) var(--ease),
      opacity var(--mobile-bar-duration) var(--ease), visibility 0s;
  }
  .topbar.offscreen, .bottom-nav.offscreen {
    opacity: 0; visibility: hidden; pointer-events: none;
    transition-delay: 0s,0s,var(--mobile-bar-duration);
  }
  .topbar.offscreen { transform: translateY(-105%); }
  .bottom-nav.offscreen { transform: translateY(calc(115% + env(safe-area-inset-bottom))); }
  .bottom-nav button {
    display: grid; flex: 1; place-items: center; min-width: 0; min-height: 48px;
    padding: 0; border: 0; border-radius: 16px; background: transparent; color: #465c7a;
    transition: color .17s, background-color .17s, transform .18s var(--ease);
  }
  .bottom-nav button[aria-current], .bottom-nav .more-active {
    background: #dce8fbdc; color: #2b55a2; box-shadow: inset 0 0 0 1px #c8daf669;
  }
  .bottom-nav button:focus-visible { outline-offset: -2px; }
  .bottom-nav button:active { transform: scale(.94); }
  .bottom-nav .icon { width: 22px; height: 22px; }
  .screen { padding: 20px 14px calc(86px + env(safe-area-inset-bottom)); }
  .heading { align-items: flex-start; flex-direction: column; margin-bottom: 17px; gap: 11px; }
  .setup-grid { grid-template-columns: 1fr; gap: 11px; }
  .setup-card { padding: 16px; }
  .cards { gap: 8px; margin-bottom: 13px; }
  .stat { gap: 6px; padding: 10px; }
  .stat .symbol { width: 33px; height: 33px; border-radius: 10px; }
  .stat span:last-child { font-size: .79rem; }
  .card-head, .list-row, .pad { padding-left: 12px; padding-right: 12px; }
  .list-row { display: grid; grid-template-columns: minmax(0,1fr); gap: 8px 10px; align-items: start; }
  .list-row:has(> :is(.symbol,.avatar):first-child) { grid-template-columns: auto minmax(0,1fr); }
  .list-row:has(> :is(.symbol,.avatar):first-child) > .actions { grid-column: 2; }
  .list-row > .actions:empty { display: none; }
  .tabs { gap: 3px; margin-bottom: 12px; }
  .tabs button { min-height: 43px; padding: 6px 9px; }
  .btn, td .btn { min-height: 44px; }
  .field input, .field select, .field textarea, .composer input { font-size: 16px; }
  .dialog .row-fields { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .dialog { --panel-gutter: 16px; --panel-offset: translate3d(0,26px,0); width: 100%; border-left: 0; }
  .panel-frame > header { padding-top: max(12px, env(safe-area-inset-top)); }
  .panel-frame > .body { padding-block: 16px; scrollbar-gutter: auto; }
  .panel-frame > footer > .btn { flex: 1 1 100px; }
  .panel-facts { grid-template-columns: repeat(auto-fit,minmax(min(100%,130px),1fr)); gap: 10px 14px; }
  .sheet input { min-width: 75px; padding-inline: 6px; font-size: 16px; }
  .sheet .actions { flex-wrap: nowrap; }
  .sheet .btn { min-height: 33px; }
  .chat { grid-template-columns: 1fr; }
  .threads { border-right: 0; }
  .thread-list { max-height: min(38dvh,260px); overflow: auto; }
  .chat-room-open .threads { display: none; }
  .chat:not(.chat-room-open) > .grow { display: none; }
  .messages { height: min(50dvh,430px); }
  .table-wrap table:not(.sheet), .table-wrap table:not(.sheet) tbody, .table-wrap table:not(.sheet) td { display: block; }
  .table-wrap table:not(.sheet) thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .table-wrap table:not(.sheet) tr { display: grid; gap: 6px; padding: 12px; border-top: 1px solid var(--line); }
  .table-wrap table:not(.sheet) td { display: grid; grid-template-columns: minmax(82px,.8fr) minmax(0,1.4fr); align-items: start; gap: 6px 9px; border: 0; padding: 0; min-width: 0; }
  .table-wrap table:not(.sheet) td::before { content: attr(data-label); color: var(--muted); font-size: .8rem; font-weight: 620; }
  .table-wrap table:not(.sheet) td > * { grid-column: 2; justify-self: start; }
  .table-wrap table:not(.sheet) td > small, .table-wrap table:not(.sheet) td > .actions { min-width: 0; }
  .table-wrap table:not(.sheet) td[data-label=""], .table-wrap table:not(.sheet) td[data-label="Actions"] { display: block; }
  .table-wrap table:not(.sheet) td[data-label=""]::before, .table-wrap table:not(.sheet) td[data-label="Actions"]::before { content: none; }
  #toast { right: 12px; bottom: calc(76px + env(safe-area-inset-bottom)); }
}
@media (max-width: 400px) {
  .form-grid { grid-template-columns: 1fr; }
  .overview-stats { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .stat { padding: 8px; }
  .heading .actions > .btn { padding-inline: 10px; }
  .list-row .btn { padding-inline: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
}

.plan-visit {
  display: grid; grid-template-columns: minmax(75px,110px) minmax(0,1fr); gap: 12px 16px;
  padding: 17px 18px; border-top: 1px solid var(--line);
}
.plan-visit.active-visit { background: #eef4ff; box-shadow: inset 3px 0 #5781e8; }
.plan-time { display: grid; align-self: start; gap: 4px; padding: 10px; border-radius: 12px; background: #eaf1ff; color: #39588b; }
.plan-time .icon { width: 16px; height: 16px; margin-bottom: 2px; }
.plan-time strong { font-size: .94rem; }
.plan-content { min-width: 0; display: grid; gap: 5px; }
.plan-content > strong { font-size: 1.02rem; color: #243953; }
.fieldwork-states { gap: 5px; margin-top: 1px; }
.plan-visit > .fieldwork-actions { grid-column: 1 / -1; padding-top: 10px; border-top: 1px solid #dbe5f3; }
.fieldwork-actions, .fieldwork-panel > footer { gap: 8px; }
.fieldwork-actions .btn, .fieldwork-panel > footer > .btn {
  min-height: 46px; border-radius: 12px; padding: 10px 15px; font-weight: 700; line-height: 1.25;
}
.fieldwork-actions .btn .icon, .fieldwork-panel > footer .btn .icon { width: 17px; height: 17px; flex: 0 0 17px; }
.fieldwork-actions .btn:not(.primary), .fieldwork-panel > footer > .btn:not(.primary) { background: #f7faff; border-color: #d5e1f2; }
.fieldwork-actions .btn:not(.primary):hover, .fieldwork-panel > footer > .btn:not(.primary):hover { background: #eaf1fc; border-color: #afc5e6; }
.fieldwork-actions .btn.primary, .fieldwork-panel > footer > .btn.primary {
  background: linear-gradient(160deg,#416dc8,#2e51ad); border-color: #3559b7; box-shadow: 0 3px 9px #254eae30;
}
.fieldwork-actions .btn.primary:hover, .fieldwork-panel > footer > .btn.primary:hover { background: #2f55b4; }
.fieldwork-actions .btn:focus-visible, .fieldwork-panel > footer .btn:focus-visible { outline: 2px solid #365fbd; outline-offset: 2px; }
.my-plan-filter .field { width: fit-content; }
.visit-stamps { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,138px),1fr)); gap: 10px; }
.visit-stamp {
  min-width: 0; display: grid; grid-template-rows: auto auto 1fr auto; justify-items: start; align-items: start;
  gap: 6px; padding: 11px; border: 1px solid #e1e9f5; border-radius: 10px; background: #f8fbff;
}
.visit-stamp-label { color: var(--muted); font-weight: 650; }
.visit-stamp time { font-size: 1.12rem; font-weight: 750; font-variant-numeric: tabular-nums; }
.visit-stamp-pending { color: var(--muted); }
.visit-stamp-location { grid-row: 4; min-width: 0; }
.visit-stamp-location > a { font-size: .82rem; font-weight: 650; }
.visit-stamp .icon { width: 15px; height: 15px; }
.payroll-stats { grid-template-columns: repeat(3,minmax(0,1fr)); }

@media (max-width: 760px) {
  .plan-visit { grid-template-columns: minmax(62px,78px) minmax(0,1fr); gap: 9px; padding: 12px 10px; }
  .plan-time { padding: 7px 5px; }
  .plan-time strong, .plan-time small { font-size: .75rem; }
  .plan-visit > .fieldwork-actions > .btn, .fieldwork-panel > footer > .btn { flex: 1 1 132px; }
  .plan-visit > .fieldwork-actions > .btn.primary, .fieldwork-panel > footer > .btn.primary { flex-basis: 100%; order: -1; }
  .fieldwork-panel > footer > .pill { align-self: center; }
  .payroll-stats.cards { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

/* Dashboard */
.dashboard-section { margin: 0 0 20px; }
.dashboard-follow-ups { margin-bottom: 16px; }
[data-report-tracking]:empty { display: none; }
[data-report-tracking] h4 { padding: 6px 0; color: #405b7f; }
.next-visit-queue .list-row:last-child { border-bottom: 0; }
.next-visit-fields > .form-grid, .next-visit-status { margin-top: 8px; }
.next-visit-fields > .panel-note, .next-visit-status + .report-note { margin-top: 8px; }
.checklist-priority { margin-top: 7px; }
.report-tracked-subtasks { margin-inline-start: 12px; border-inline-start: 2px solid var(--line-soft); }
.dashboard-section h2 { margin-bottom: 10px; font-size: 1.15rem; font-weight: 650; }
.dashboard-upcoming { margin-bottom: 20px; }
.dashboard-event-group + .dashboard-event-group { border-top: 1px solid var(--line); }
.dashboard-event-group[hidden] + .dashboard-event-group { border-top: 0; }
.dashboard-event-group .card-head { flex-wrap: wrap; }
.dashboard-event-list {
  list-style: none; margin: 0; padding: 0 14px 7px;
}
.dashboard-event {
  display: grid; grid-template-columns: auto auto minmax(0,1fr) auto; align-items: center; gap: 8px;
  min-width: 0; padding: 7px 2px;
}
.dashboard-event:not([hidden]) ~ .dashboard-event:not([hidden]) { border-top: 1px solid var(--line-soft); }
.dashboard-event time {
  display: grid; place-content: center; min-width: 42px; min-height: 44px; padding: 4px;
  border-radius: 8px; background: #edf3fc; color: #355b8d; text-align: center; line-height: 1.15;
}
.dashboard-event time strong { font-size: 1.02rem; font-variant-numeric: tabular-nums; }
.dashboard-event time small { font-size: .68rem; }
.dashboard-event-person { display: grid; min-width: 0; gap: 2px; overflow-wrap: anywhere; }
.dashboard-event-person strong { font-size: .89rem; color: #263b58; }
.dashboard-event-person small { font-size: .76rem; }
.dashboard-holiday-icon { background: #f7efe1; color: #84602f; }
.event-birthday { color: #745891; }
.event-anniversary { color: #355b8d; }
.dashboard-board { --card-gap: 12px; display: flex; flex-wrap: wrap; gap: var(--card-gap); }
.dashboard-metric {
  flex: 1 1 calc((100% - 3 * var(--card-gap)) / 4);
  display: grid; grid-template-columns: minmax(0,1fr) auto; grid-template-rows: auto auto 1fr;
  align-content: start; align-items: center; gap: 5px 8px; min-height: 105px; padding: 13px 15px; text-align: left;
  transition: background-color .14s,border-color .14s,box-shadow .14s,transform .18s var(--ease);
}
.dashboard-metric:hover { background: #f9fbff; border-color: #b9c9e6; box-shadow: 0 8px 19px #39537d15; transform: translateY(-2px); }
.dashboard-metric > .symbol { grid-column: 1; grid-row: 1; width: 34px; height: 34px; }
.dashboard-metric > b { grid-column: 2; grid-row: 1; color: #23416a; font-size: 1.53rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.dashboard-metric > strong { grid-column: 1/-1; grid-row: 2; color: #263b58; font-size: .96rem; }
.dashboard-metric > small { grid-column: 1/-1; grid-row: 3; font-size: .79rem; align-self: start; }
.dashboard-metric > .symbol { background: #e9f1fc; color: #436a9e; }
.dashboard-metric > .symbol.purple { background: #f0ebf8; color: #755b96; }
.dashboard-metric > .symbol.amber { background: #f7f0e3; color: #86673d; }
.dashboard-metric > .symbol.green { background: #e6f3ed; color: #396f59; }
.dashboard-live {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border: 1px solid #dcebe4;
  border-radius: 20px; color: #316951; background: #edf7f2; font-size: .8rem; font-weight: 650;
}
.dashboard-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #43896b; }
.dashboard-live.reconnecting { color: #78571c; background: #fff7e8; border-color: #f0e6d1; }
.dashboard-live.reconnecting::before { background: #a67d34; }
.dashboard-summary {
  display: grid; grid-template-columns: minmax(0,1fr) minmax(190px,290px); align-items: center; gap: 16px;
  padding: 21px 23px; margin-bottom: 18px; border-color: #d9e4f5;
  background: radial-gradient(ellipse at 105% 160%,#d4e4fc 0,transparent 68%),linear-gradient(120deg,#fbfdff,#edf3fc);
}
.dashboard-summary h2 { margin: 5px 0 2px; font-size: clamp(1.24rem,2.4vw,1.76rem); color: #263a5b; }
.dashboard-summary p { color: var(--muted); font-size: .9rem; }
.dashboard-summary time { color: #476489; font-size: .8rem; font-weight: 600; }
.dashboard-summary time .icon { width: 15px; height: 15px; margin-right: 3px; }
.dashboard-progress {
  display: grid; gap: 5px; padding: 10px 12px; color: #354f76; font-size: .87rem;
  border: 1px solid #d9e5f8; background: #fbfdffd9; border-radius: 11px;
}
.dashboard-progress progress { width: 100%; height: 7px; appearance: none; border: 0; border-radius: 10px; overflow: hidden; accent-color: #537cbe; }
.dashboard-progress progress::-webkit-progress-bar { background: #dfe9f8; }
.dashboard-progress progress::-webkit-progress-value { background: #537cbe; }
.dashboard-progress progress::-moz-progress-bar { background: #537cbe; }
.dashboard-progress small { font-size: .78rem; }
.dashboard-worklist {
  display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 15px;
}
.dashboard-worklist > .card { flex: 1 1 calc((100% - 14px) / 2); }
.dashboard-worklist .card-head { min-height: 52px; }
.dashboard-worklist .card-head small { color: #4c668a; background: #eff4fb; border-radius: 6px; padding: 3px 7px; }
.live-person { border-top: 1px solid var(--line-soft); }
.live-check-in, .live-work-header { display: flex; align-items: center; gap: 10px; }
.live-check-in { padding: 10px 16px; }
.live-check-in strong, .live-work-header strong { overflow-wrap: anywhere; }
.live-check-in small { display: flex; align-items: center; gap: 4px; margin-top: 1px; }
.live-check-in small .icon { width: 13px; height: 13px; }
.live-check-in time {
  flex: none; font-size: .79rem; font-weight: 650; font-variant-numeric: tabular-nums;
  color: #276550; background: #eaf6f0; border-radius: 6px; padding: 3px 6px;
}
.live-work { padding: 9px 16px 10px; }
.live-work ul { display: grid; list-style: none; margin: 6px 0 0; padding: 0 0 0 43px; }
.live-work li {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; justify-content: space-between;
  padding: 5px 0; color: #395477; font-size: .85rem;
}
.live-work li + li { border-top: 1px solid var(--line-soft); }
.live-work li div { min-width: 0; flex: 1 1 115px; overflow-wrap: anywhere; }
.live-work li small { display: block; }
.live-work li .pill { font-size: .74rem; }
.live-work li .btn { min-height: 35px; padding: 5px 9px; }
.dashboard-activity { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 20px; }
.dashboard-activity > .card { flex: 1 1 calc((100% - 14px) / 2); }
.dashboard-activity > .dashboard-week { flex-basis: 100%; }
.dashboard-activity .list-row > .actions { justify-content: flex-end; }
.dashboard-week .card-head small { display: block; margin-top: 2px; }
.week-legend { display: flex; flex-wrap: wrap; gap: 8px; color: #526983; font-size: .77rem; }
.week-legend span::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 5px; border-radius: 2px; background: #c5d8f3; }
.week-legend span + span::before { background: #587cae; }
.week-grid { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 4px; margin: 0 13px 10px; }
.week-day {
  display: grid; grid-template-rows: 70px auto auto; gap: 2px; justify-items: center; padding: 4px 3px;
  border: 1px solid transparent; border-radius: 8px; background: transparent; color: #415b7d;
  font-size: .76rem;
}
button.week-day:hover, .week-day[aria-current="date"] { background: #edf4ff; border-color: #e0eafa; color: #2c4e82; }
.week-day small { font-size: .74rem; }
.week-bar {
  position: relative; display: flex; justify-content: center; align-items: flex-end; width: min(100%,34px);
  border-bottom: 1px solid #dce5f1;
}
.week-planned { display: flex; align-items: flex-end; width: 72%; height: var(--total); background: #c5d8f3; border-radius: 4px 4px 0 0; overflow: hidden; }
.week-reported { width: 100%; height: var(--reported); background: #587cae; }
.week-empty { padding: 0 13px 10px; font-size: .8rem; text-align: center; }
.my-attendance-filter .field { width: fit-content; }
@media (max-width: 1060px) { .dashboard-metric { flex-basis: calc((100% - var(--card-gap)) / 2); } }
@media (max-width: 760px) {
  .sidebar-heading { margin-bottom: 13px; }
  .crumb { display: none; }
  .account-icon { min-width: 42px; min-height: 42px; }
  .dashboard-activity > .card,.dashboard-worklist > .card { flex-basis: 100%; }
  .dashboard-activity .list-row > .actions { justify-content: flex-start; }
  .dashboard-board { --card-gap: 8px; }
  .dashboard-metric { min-height: 100px; padding: 9px 10px; }
  .dashboard-metric > b { font-size: 1.16rem; overflow-wrap: anywhere; }
  .dashboard-metric > strong { font-size: .86rem; }
  .dashboard-summary { grid-template-columns: minmax(0,1fr); padding: 13px; gap: 8px; }
  .week-day { grid-template-rows: 58px auto auto; }
}

/* Form controls use native values and validation with workspace-styled pickers. */
.picker { position: relative; min-width: 0; }
.picker-native { position: absolute; clip-path: inset(50%); width: 1px; min-width: 0; height: 1px; min-height: 0; padding: 0; border: 0; overflow: hidden; pointer-events: none; }
.picker-trigger {
  width: 100%; min-height: 45px; display: flex; align-items: center; gap: 9px; padding: 9px 11px;
  color: #2b3950; background: #fff; border: 1px solid #d9e2ef; border-radius: 10px; text-align: left;
  font-size: .91rem; font-weight: 560; box-shadow: 0 1px 2px #334e7008;
  transition: background-color .14s,border-color .14s,box-shadow .17s;
}
.picker-trigger:hover { background: #f9fbff; border-color: #becde4; }
.picker-trigger[aria-expanded="true"] { border-color: #92a8cf; box-shadow: 0 0 0 3px #b9c9ec4d; }
.picker-trigger[aria-invalid="true"] { border-color: #b45166; }
.picker-trigger:disabled { background: #f0f3f7; color: #687489; cursor: default; box-shadow: none; }
.picker-trigger > span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.picker-placeholder { color: #69778f; }
.picker-trigger > .icon { width: 17px; height: 17px; color: #7789a6; }
.picker-trigger > .icon:last-child { margin-left: auto; width: 15px; height: 15px; transition: transform .18s var(--ease); }
.picker-trigger[aria-expanded="true"] > .icon:last-child { transform: rotate(180deg); }
.picker-panel {
  position: fixed; inset: auto; margin: 0; padding: 7px; overflow: auto; overscroll-behavior: contain;
  border: 1px solid #dce5f0; border-radius: 14px; background: #fff; color: #2b3950;
  box-shadow: 0 13px 34px #2c466422,0 2px 7px #2c46640c; font: 500 .88rem "DM Sans",sans-serif;
}
.picker-panel:popover-open { animation: picker-in var(--motion-quick) var(--ease) both; }
@keyframes picker-in { from { opacity: 0; transform: translate3d(0,-4px,0); } to { opacity: 1; transform: none; } }
.picker-option { display: flex; align-items: center; justify-content: space-between; gap: 9px; width: 100%; min-height: 37px; padding: 7px 10px; border: 0; border-radius: 8px; background: #fff; text-align: left; }
.picker-option > span { overflow-wrap: anywhere; }
.picker-option > .icon { width: 16px; height: 16px; flex: none; visibility: hidden; }
.picker-option[aria-selected=true] > .icon { visibility: visible; }
.picker-search { position: sticky; top: -7px; margin-bottom: 5px; z-index: 1; }
.picker-empty { padding: 10px; color: var(--muted); }
.picker-multiple .picker-footer { position: sticky; bottom: -7px; background: #fff; padding: 6px 0 3px; }
.picker-multiple [data-picker-count] { flex: 1; color: var(--muted); text-align: center; }
.picker-option { min-height: 40px; }
.picker-option[aria-selected=true], .picker-day[aria-pressed=true] { background: #e9effb; color: #375b9a; font-weight: 700; }
.picker-option:hover:not(:disabled),.picker-day:hover:not(:disabled),.picker-nav:hover:not(:disabled),.picker-title:hover,.picker-link:hover { background: #f1f5fb; }
.picker-option:disabled,.picker-day:disabled,.picker-nav:disabled { opacity: .38; cursor: default; }
.picker-heading { display: grid; grid-template-columns: 33px minmax(0,1fr) 33px; align-items: center; gap: 3px; text-align: center; margin-bottom: 5px; }
.picker-nav,.picker-title,.picker-day,.picker-link { appearance: none; border: 0; background: #fff; border-radius: 8px; font-weight: 600; }
.picker-nav,.picker-title { min-height: 34px; }
.picker-nav .icon { width: 15px; }
.picker-nav.previous .icon { transform: rotate(180deg); }
.picker-calendar,.picker-months { display: grid; gap: 2px; }
.picker-calendar { grid-template-columns: repeat(7,minmax(0,1fr)); }
.picker-months { grid-template-columns: repeat(3,minmax(0,1fr)); }
.picker-calendar > span { min-height: 23px; display: grid; place-items: center; font-size: .71rem; color: #677a97; }
.picker-day { min-height: 35px; padding: 3px; }
.picker-day[aria-current=date] { box-shadow: inset 0 0 0 1px #bdcce6; }
.picker-footer { display: flex; justify-content: flex-end; align-items: center; gap: 5px; margin-top: 7px; padding-top: 6px; border-top: 1px solid #e8edf4; }
.picker-link { min-height: 34px; padding: 4px 10px; color: #46679b; }
.picker-footer .btn { min-height: 37px; }
.picker-time-title { display: block; padding: 6px 4px 10px; }
.picker-time-fields { display: grid; grid-template-columns: minmax(47px,1fr) auto minmax(47px,1fr) auto; gap: 5px; align-items: end; padding: 1px 3px 6px; }
.picker-time-fields label { display: grid; gap: 4px; min-width: 0; font-size: .75rem; color: #586b88; }
.picker-time-fields input { padding: 6px; text-align: center; font-size: 1.02rem; font-weight: 650; appearance: textfield; }
.picker-time-fields input::-webkit-inner-spin-button,.picker-time-fields input::-webkit-outer-spin-button { appearance: none; margin: 0; }
.picker-year-entry, .picker-year-entry label { display: grid; align-items: center; gap: 7px; }
.picker-year-entry { grid-template-columns: minmax(0,1fr) auto; padding: 3px 3px 8px; }
.picker-year-entry label { grid-template-columns: auto minmax(0,1fr); }
.picker-year-entry input, .picker-year-entry .btn { min-height: 38px; }
.picker-time-divider { align-self: end; padding-bottom: 10px; font-size: 1.2rem; }
.picker-period { display: flex; flex-wrap: nowrap; gap: 2px; border: 1px solid #e3e9f3; border-radius: 9px; background: #f3f6fa; padding: 3px; }
.picker-period > button { min-height: 35px; padding: 4px 6px; background: transparent; border: 0; border-radius: 7px; font-weight: 650; }
.picker-period > button[aria-pressed=true] { color: #365891; background: #fff; box-shadow: 0 1px 3px #233d6820; }
.picker-error { color: #994257; margin: 6px 4px; font-size: .78rem; }

.access-person { display: flex; gap: 11px; align-items: center; padding: 12px 13px; border: 1px solid #e1e8f3; border-radius: 12px; background: #f0f4fa; }
.access-person small { display: block; margin-top: 2px; }
.dialog .access-mode,.dialog .access-options { background: #fff; border-color: #e1e8f3; border-radius: 12px; padding: 11px; }
.access-mode label,.access-option { display: flex; align-items: center; gap: 9px; min-height: 37px; padding: 6px 8px; border: 1px solid transparent; border-radius: 8px; font-size: .85rem; cursor: pointer; }
.access-mode label:has(input:checked),.access-option:has(input:checked) { background: #eef3fb; border-color: #e1e9f6; }
.access-mode label + label { margin-top: 4px; }
.access-mode label small { display: block; margin-top: 2px; }
.access-mode input[type=radio] { width: 16px; height: 16px; min-height: 0; flex: none; margin: 0; accent-color: var(--blue-dark); }
.access-options section + section { margin-top: 16px; padding-top: 13px; border-top: 1px solid #e7edf5; }
.access-options h3 { margin: 2px 0 8px; font-size: .9rem; }
.access-delegation { margin-bottom: 8px; }
.access-delegation .check { background: #edf3fc; font-weight: 600; }

.access-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 5px; }

/* Consistent depth and spacing across the light workspace. */
:root { --radius: 16px; --surface: #fff; --ease: cubic-bezier(.22,.7,.25,1); }
.card { border-color: #e0e7f2; box-shadow: 0 2px 3px #344d6c05,0 10px 28px #344d6c06; }
.dashboard-summary { background: linear-gradient(115deg,#f0f4fa,#f6f8fc); border-color: #e0e8f4; }
.screen-enter { animation-duration: .24s; }
@media(max-width:760px) {
  .picker-trigger { min-height: 46px; font-size: .93rem; }
  .picker-option,.picker-day { min-height: 42px; }
  .picker-panel { border-radius: 13px; }
}
@media(prefers-reduced-motion:reduce) {
  .picker-panel:popover-open { animation: none; }
}

/* Sites and records */
.site-catalog { grid-template-columns:repeat(auto-fill,minmax(min(100%,278px),1fr)); grid-auto-rows: 1fr; gap:17px; }
.site-tile { grid-template-rows:auto 1fr auto; padding:15px; background:linear-gradient(155deg,#f7faff,#fff 55%); transition:background-color .16s,border-color .16s,box-shadow .16s,transform .16s; }
.site-tile:hover { background:#f9fbff; border-color:#b9c9e2; box-shadow:0 5px 16px #354f7310; }
.site-card-heading { display:flex; align-items:flex-start; gap:10px; }
.site-card-name { display:grid; justify-items:start; gap:4px; min-width:0; }
.site-card-name > strong { font-size:1.1rem; color:#233c60; overflow-wrap:anywhere; }
.site-card-name .pill { font-size:.74rem; padding:3px 7px; }
.site-address { display:flex; align-items:flex-start; gap:6px; color:var(--muted); font-size:.87rem; overflow-wrap:anywhere; }
.site-address .icon { width:15px; height:15px; flex:none; margin-top:3px; }
.site-card-footer { display:flex; align-items:center; justify-content:space-between; border-top:1px solid #e9eef6; padding-top:9px; color:#5b759b; align-self:end; grid-row:3; }
.site-card-footer small { display:flex; align-items:center; gap:5px; }
.site-card-footer .icon { width:15px; height:15px; }
.site-top-actions { margin-bottom:11px; }
.btn.quiet { background:transparent; border-color:transparent; color:#52698c; }
.btn.quiet:hover { background:#edf2fa; }
.site-header { display:flex; align-items:center; gap:15px; padding:20px 22px; margin-bottom:16px; background:linear-gradient(115deg,#f9fbff,#edf3fd); }
.site-header > .symbol { width:48px; height:48px; }
.site-title { display:flex; align-items:center; flex-wrap:wrap; gap:10px; }
.site-title h1 { font-size:clamp(1.4rem,3vw,2.02rem); }
.site-header .project-status-control > span {
  position:absolute; width:1px; height:1px; padding:0; overflow:hidden;
  clip-path:inset(50%); white-space:nowrap;
}
.site-header .project-status-control .picker-trigger { min-width:105px; }
.site-tabs .tabs { margin-bottom:18px; }
.polished-empty { min-height:160px; display:grid; place-content:center; justify-items:center; gap:11px; padding:20px; text-align:center; background:linear-gradient(165deg,#f7faff,#fff 76%); }
.polished-empty .empty { margin:0; padding:0; min-height:0; }

/* Site conversations */
.site-chat { grid-template-columns:minmax(215px,300px) minmax(0,1fr); }
.site-chat .threads { min-width:0; background:#fcfdff; }
.site-chat .threads .card-head { display:grid; gap:9px; padding:14px 15px 9px; }
.site-chat .threads .tabs { margin:0 15px 8px; }
.site-chat .thread-list { max-height:clamp(320px,62dvh,640px); overflow:auto; overscroll-behavior:contain; }
.site-chat .thread { display:flex; align-items:center; gap:10px; width:100%; padding:12px 14px; border:0; border-bottom:1px solid #e9eef5; text-align:left; background:transparent; }
.site-chat .thread:hover { background:#f2f6fb; }
.site-chat .thread.active { background:#e8f0fb; box-shadow:inset 3px 0 #7c99c9; }
.thread-copy { display:grid; gap:4px; flex:1; min-width:0; }
.thread-title { display:flex; justify-content:space-between; gap:6px; min-width:0; }
.thread-title strong,.thread-preview { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.thread-title small { white-space:nowrap; flex:none; font-size:.69rem; }
.thread-preview { color:var(--muted); font-size:.82rem; }
.chat-room { min-width:0; display:flex; flex-direction:column; }
.chat-room-header { display:flex; align-items:center; gap:9px; border-bottom:1px solid var(--line); background:linear-gradient(170deg,#f4f8fd,#fff); padding:12px 14px; }
.chat-room-header h2 { margin:0 0 3px; font-size:1rem; }
.chat-room-header .symbol { flex:none; }
.chat-room-header .btn.mobile { display:none; }
.chat-room .messages { height:clamp(285px,56dvh,580px); gap:8px; padding:13px 18px; overscroll-behavior:contain;
  background-color:#f2f6fb; background-image:radial-gradient(circle at 2px 2px,#dce7f4 1px,transparent 1.2px); background-size:18px 18px; }
.message-date { align-self:center; margin:2px 0 4px; }
.message-date span { display:block; padding:4px 9px; border:1px solid #dce7f4; border-radius:12px; background:#f9fbfe; color:#526788; font-size:.72rem; font-weight:650; }
.chat-room .bubble { width:fit-content; max-width:min(85%,540px); padding:8px 10px; border-radius:13px 13px 13px 5px; box-shadow:0 1px 2px #233f5e10; white-space:normal; }
.chat-room .bubble p { white-space:pre-wrap; }
.chat-room .bubble.mine { margin-left:auto; border-radius:13px 13px 5px 13px; background:#e6effc; }
.message-sender { display:block; margin-bottom:4px; font-size:.78rem; color:#4a668c; }
.message-quote { display:block; background:#ffffff99; border-left:2px solid #a4badd; padding:5px 7px; margin-bottom:4px; border-radius:5px; }
.message-meta { display:flex; justify-content:flex-end; align-items:center; flex-wrap:wrap; gap:3px; margin-top:3px; }
.message-meta small { margin-left:4px; white-space:nowrap; }
.deleted-message > p { color: var(--muted); font-style: italic; }
.message-meta .btn { min-height:28px; padding:3px 6px; font-size:.71rem; }
.chat-reply { display:flex; align-items:center; gap:7px; padding:7px 12px; border-top:1px solid var(--line); background:#f8faff; }
.chat-room .composer { background:#fff; padding:10px; }
.chat-empty { display:grid; place-content:center; justify-items:center; min-height:360px; background:#f5f8fc; }
.chat-empty .empty { min-height:0; padding:10px; }
.attachment-thumbnail,.attachment-file { position:relative; display:block; width:100%; padding:0; overflow:hidden; border:1px solid #dce6f2; border-radius:9px; text-align:left; background:#f9fbff; color:inherit; text-decoration:none; }
.attachment-thumbnail img,.attachment-thumbnail video { display:block; width:min(100%,330px); max-height:220px; min-height:55px; object-fit:contain; background:#e0eafa; }
.attachment-caption { display:block; max-width:330px; padding:5px 8px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:.78rem; }
.video-label { position:absolute; top:6px; right:6px; border-radius:6px; padding:3px 7px; background:#253a5acc; color:white; font-size:.72rem; }
.attachment-file { display:flex; align-items:center; gap:8px; padding:7px; }
.attachment-file small { display:block; }
.attachment-library { display:grid; gap:9px; }
.file-field { position: relative; align-content: start; }
.file-field .file-native { position: absolute; width: 1px; height: 1px; padding: 0; clip-path: inset(50%); opacity: 0; pointer-events: none; }
.file-drop {
  display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 82px;
  padding: 12px 15px; border: 1px dashed #9eb4d8; border-radius: 13px; background: #f6f9ff;
  color: #294a7a; text-align: start; transition: background .16s, border-color .16s;
}
.file-drop:hover, .file-drop.is-dragging { border-color: #4a70b0; background: #e9f1ff; }
.file-drop[aria-invalid] { border-color: #bf6577; }
.file-drop-icon, .file-selection-icon {
  width: 38px; height: 38px; display: grid; flex: none; place-items: center; border-radius: 10px;
  background: #e8effc; color: #4167a3;
}
.file-drop-copy strong, .file-drop-copy small, .file-selection-label > * { display: block; overflow-wrap: anywhere; }
.file-drop-message { color: #8f2942; font-size: .82rem; font-weight: 500; }
.file-selection { display: grid; gap: 6px; padding: 0; margin: 0; list-style: none; }
.file-selection li {
  display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 9px;
  padding: 6px 8px; border: 1px solid #dce6f4; border-radius: 11px; background: #fff;
}
.file-selection li img { width: 38px; height: 38px; border-radius: 8px; object-fit: cover; }
.file-selection :is(video,audio) { display: block; grid-column: 1 / -1; width: 100%; max-height: 180px; }
.file-selection .btn { width: 40px; min-height: 40px; }
@media (pointer: coarse) {
  .file-drop { justify-content: flex-start; min-height: 72px; border-style: solid; }
  .file-drop-desktop { display: none; }
  .file-selection .btn { width: 44px; min-height: 44px; }
}
.staged-attachment { margin-top:-5px; padding:8px; background:#eef3fa; border:1px solid #dce7f3; border-radius:10px; }
.staged-attachment :is(img,video) { display:block; max-width:100%; max-height:220px; margin:auto; border-radius:7px; object-fit:contain; }
.staged-attachment audio { width:100%; }
.staged-file-label { display:flex; align-items:center; justify-content:space-between; padding:6px 3px 2px; gap:8px; overflow-wrap:anywhere; font-size:.83rem; }
.staged-file-label small { white-space:nowrap; }
.report-photos { display:grid; grid-template-columns:repeat(auto-fill,minmax(145px,1fr)); gap:10px; padding:0; margin:0; list-style:none; }
.report-photo-card { min-width:0; margin:0; display:grid; align-content:start; gap:5px; }
.report-photo-card img { width:100%; height:116px; object-fit:contain; background:#e4ebf6; }
.report-photo-card .staged-file-label { display:grid; gap:2px; }
.report-photo-card > .btn { justify-self:start; }
.report-file-actions { justify-content:flex-start; }
.report-file-actions .upload-attribution { flex-basis:100%; }
.upload-progress { padding:9px 11px; border:1px solid #dce7f4; border-radius:9px; background:#f2f6fc; font-size:.82rem; }
.upload-progress progress { display:block; width:100%; height:8px; margin:7px 0 3px; accent-color:#557ebc; }

/* Personal requests and assigned assets */
.personal-records { display:grid; grid-template-columns:repeat(auto-fill,minmax(min(100%,320px),1fr)); gap:13px; align-items:start; }
.personal-record-month { display: grid; gap: 10px; min-width: 0; }
.personal-record-month > h2 { color: #344c6c; font-size: 1rem; }
.history-month + .history-month { border-top: 1px solid var(--line); }
.personal-record { padding:16px; background:linear-gradient(155deg,#f9fbff,#fff 56%); }
.record-head { display:flex; align-items:center; gap:10px; }
.record-head h2 { margin:0 0 3px; font-size:1rem; overflow-wrap:anywhere; }
.record-head .symbol { flex:none; }
.record-head > .pill { flex:none; }
.record-body { padding:12px 0 0; color:#4c607d; font-size:.87rem; }
.record-body p { margin:0; }
.record-footer { display:flex; justify-content:flex-end; border-top:1px solid var(--line-soft); padding-top:11px; margin-top:13px; }
.record-values { display:flex; flex-wrap:wrap; gap:11px 19px; margin:0; }
.record-values dt { color:var(--muted); font-size:.77rem; }
.record-values dd { margin:4px 0 0; color:#293f60; font-weight:700; }
@media(max-width:760px) {
  .site-header { flex-wrap:wrap; align-items:flex-start; padding:13px; gap:9px; }
  .site-header > .symbol { width:36px; height:36px; }
  .site-chat { grid-template-columns:minmax(0,1fr); }
  .site-chat .thread-list { max-height:none; }
  .site-chat:not(.chat-room-open) .chat-room,.site-chat:not(.chat-room-open) .chat-empty { display:none; }
  .site-chat.chat-room-open .threads { display:none; }
  .chat-room-header .btn.mobile { display:inline-flex; }
  .chat-room .messages { height:clamp(255px,53dvh,520px); padding-inline:9px; }
  .chat-room .bubble { max-width:92%; }
  .record-head { flex-wrap:wrap; }
}

/* Management views */
.view-tools {
  display: flex; flex-wrap: wrap; align-items: flex-end;
  gap: 10px 14px; margin-bottom: 16px; padding: 11px;
  border: 1px solid #e1e9f3; border-radius: 14px;
  background: #f9fbfe; min-width: 0;
}
.view-search,.picker-search {
  display: flex; align-items: center; gap: 9px; min-width: 0; color: #667d9f;
  border: 1px solid #d9e3f0; border-radius: 10px; background: #fff;
  padding-inline: 11px;
}
.view-tools > .view-search { flex: 1 1 170px; max-width: 410px; }
.view-search:focus-within,.picker-search:focus-within {
  border-color: #89a5d0; box-shadow: 0 0 0 3px #b9c9ec4d;
}
.view-search > .icon,.picker-search > .icon { width: 17px; height: 17px; flex: none; }
.view-search input,.picker-search input {
  background: transparent; border: 0; box-shadow: none; outline: 0; border-radius: 0;
  min-height: 40px; padding: 6px 0; font-weight: 500; font-size: .875rem;
}
.view-search input:focus,.picker-search input:focus { box-shadow: none; outline: none; }
.view-search input::placeholder,.picker-search input::placeholder { color: #657a96; }
.view-filter-fields,.filter-pair,.filter-tools {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 10px; min-width: 0;
}
.view-filter-fields { flex: 0 1 auto; }
.view-filter-fields .filter-pair { display: contents; }
.view-filter-fields .field { min-width: clamp(115px,11vw,165px); max-width: 230px; gap: 4px; }
.view-filter-fields .field > span { font-size: .75rem; font-weight: 650; color: #516787; }
.view-filter-fields :is(.picker-trigger,.btn,.tabs button) { min-height: 42px; }
.view-filter-fields .picker-trigger > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.view-filter-fields .tabs { margin: 0; }
.view-filter-fields .site-file-tabs { margin: 0; }
.filter-toggle { display: none; }
.view-filter-fields[popover]:not(:popover-open) { display: none; }
.view-search-empty { border: 1px solid #e1e9f3; border-radius: 12px; padding: 12px 15px; color: var(--muted); background: #fff; margin-bottom: 12px; }
.filter-pair { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
@media (max-width: 760px) {
  .view-tools { gap: 8px; padding: 8px; flex-wrap: nowrap; }
  .view-tools > .view-search { flex: 1 1 0; max-width: none; }
  .view-search input,.picker-search input { font-size: 16px; }
  .filter-toggle { display: inline-flex; min-height: 42px; flex: none; }
  .view-filter-fields:not([popover]) { align-items: end; }
  .view-tools:not(.team-search-tools):has(.view-filter-fields:not([popover])) { flex-wrap: wrap; }
  .view-tools:has(.view-filter-fields:not([popover])) .filter-toggle { display: none; }
  .view-filter-fields[popover]:popover-open { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; padding: 12px; }
  .view-filter-fields[popover] .field { min-width: 0; max-width: none; }
  .view-filter-fields[popover] .filter-tools { grid-column: 1 / -1; margin: 0; }
  .view-filter-fields[popover] > .field:only-child { grid-column: 1 / -1; }
  .team-search-tools .filter-tools { gap: 0; }
  .team-search-tools .tabs button { min-height: 36px; padding-inline: 7px; font-size: .78rem; }
}
.management-metrics .stat {
  grid-template-columns: auto minmax(0,1fr); align-items: center;
  gap: 3px 11px; padding: 14px 16px;
  background: linear-gradient(150deg,#f9fbff,#fff 70%);
}
.management-metrics .stat .symbol { grid-row: 1 / 3; }
.management-metrics .stat b { font-size: 1.35rem; font-weight: 650; }
.management-metrics .stat span:last-child { font-size: .81rem; }
.management-screen .table-wrap th { color: #51627d; }
.management-screen .table-wrap :is(th,td) { padding-inline: 16px; }
.management-screen .table-wrap tbody tr:hover { background: #fafbfe; }
.management-screen .card-head h2 { font-size: 1.06rem; }
.record-person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.record-person small { display: block; margin-top: 2px; }
.attendance-person { border-top: 1px solid var(--line-soft); }
.attendance-person summary {
  list-style: none; display: flex; align-items: center; gap: 12px;
  min-height: 67px; padding: 12px 16px; cursor: pointer;
  transition: background-color .14s;
}
.attendance-person summary::-webkit-details-marker { display: none; }
.attendance-person summary:hover, .attendance-person[open] summary { background: #f4f8fe; }
.attendance-person summary:focus-visible { outline-offset: -3px; }
.attendance-person summary small { display: block; margin-top: 2px; }
.attendance-person summary > .icon { box-sizing: content-box; width: 15px; height: 15px; padding: 5px; background: #edf2fa; border-radius: 8px; color: #4b6590; transition: transform .16s; }
.attendance-person[open] summary > .icon { transform: rotate(90deg); }
.attendance-person-totals { display: grid; grid-template-columns: repeat(3,minmax(85px,1fr)); gap: 7px 20px; margin: 0; }
.attendance-person-totals dt { color: var(--muted); font-size: .74rem; }
.attendance-person-totals dd { margin: 2px 0 0; font-weight: 650; font-variant-numeric: tabular-nums; }
.leave-day > h3 { padding: 9px 16px; border-top: 1px solid var(--line); color: #566780; background: #f6f8fc; font-size: .81rem; font-weight: 650; }
.management-record {
  display: grid; grid-template-columns: minmax(176px, .9fr) minmax(110px, 1fr) auto; align-items: center; gap: 12px 18px;
  padding: 13px 16px; border-top: 1px solid #edf0f5;
}
.management-record .symbol { width: 35px; height: 35px; border-radius: 10px; }
.management-record p { color: #536179; font-size: .88rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.management-record .actions { justify-content: flex-end; }
.emi-estimate {
  display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 10px;
  padding: 13px; border: 1px solid #e0e8f6; border-radius: 12px; background: #f0f4fb; color: #304766;
}
.emi-estimate strong, .emi-estimate small { display: block; }
.emi-estimate small { margin-top: 3px; }
.emi-estimate output { font-size: clamp(.99rem,3.4vw,1.26rem); font-weight: 650; font-variant-numeric: tabular-nums; }
@media (max-width: 760px) {
  .management-screen .table-wrap :is(th,td) { padding-inline: 0; }
  .attendance-person summary { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 8px; }
  .attendance-person summary > .icon { grid-column: 3; grid-row: 1; }
  .attendance-person-totals { grid-column: 2 / -1; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; }
  .management-record { grid-template-columns: minmax(0,1fr); gap: 9px; }
  .management-record .actions { justify-content: flex-start; }
}
@media (max-width: 355px) {
  .management-metrics .symbol { display: none; }
  .management-metrics .stat { grid-template-columns: 1fr; }
  .emi-estimate output { grid-column: 2; }
}
@media (prefers-reduced-motion: reduce) {
  .tabs button, .attendance-person summary, .attendance-person summary > .icon { transition: none; }
}

/* Attendance and salary */
.attendance-screen { padding-top: clamp(18px,2.4vw,32px); }
.attendance-screen .heading { margin-bottom: 12px; }
.attendance-toolbar {
  justify-content: space-between; margin-bottom: 12px; padding: 10px 14px;
}
.attendance-toolbar .tabs button { min-height: 33px; padding-block: 4px; }
.attendance-overview {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px;
  padding: 11px 14px; color: var(--muted); font-size: .8rem; background: #fbfcff;
}
.attendance-period { display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 8px; }
.attendance-period h2 { color: var(--ink); font-size: .98rem; }
.attendance-period small { font-size: .8rem; }
.attendance-overview dl { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 5px; margin: 0; }
.attendance-overview dl div {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  padding: 4px 8px; border-radius: 7px; background: #edf2fa;
}
.attendance-overview dd { margin: 0; color: #344b71; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.attendance-timing { display: grid; justify-items: start; align-content: start; gap: 4px; }
.attendance-timing time { font-variant-numeric: tabular-nums; white-space: nowrap; }
.attendance-register .table-wrap td { vertical-align: top; }
.attendance-timing small { min-width: 0; overflow-wrap: anywhere; }
.attendance-day-person { display: grid; justify-items: start; align-content: start; gap: 7px; }
.attendance-day-person .btn { white-space: nowrap; min-height: 33px; padding: 5px 9px; font-size: .79rem; }
.attendance-pending { font-weight: 650; }
.attendance-timeline { display: grid; gap: 12px; list-style: none; margin: 0; padding: 0; }
.attendance-stop { display: grid; gap: 10px; min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.attendance-stop-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: start; gap: 6px 12px; }
.attendance-stop-header h4 { margin: 2px 0; overflow-wrap: anywhere; }
.attendance-stop-header small, .attendance-stop-header .subtitle { display: block; color: var(--muted); font-size: .78rem; }
.attendance-stop-actions { justify-content: flex-start; flex-wrap: wrap; }
@media (min-width: 761px) {
  .attendance-register .table-wrap table { table-layout: fixed; min-width: 800px; }
  .attendance-register th:nth-child(1) { width: 20%; }
  .attendance-register th:nth-child(2) { width: 15%; }
  .attendance-register th:nth-child(3), .attendance-register th:nth-child(4) { width: 17%; }
  .attendance-register th:nth-child(5), .attendance-register th:nth-child(6) { width: 9%; }
  .attendance-register th:nth-child(7) { width: 13%; }
}
.salary-totals {
  display: flex; flex-wrap: wrap; column-gap: 17px; row-gap: 8px; justify-content: space-between;
  margin: 0; padding: 13px 15px; border: 1px solid #dfe7f4; border-radius: 12px; background: #f0f4fb;
}
.salary-totals dt { color: #556985; font-size: .77rem; }
.salary-totals dd {
  margin: 2px 0 0; color: #273e60; font-size: 1.04rem; font-weight: 650;
  font-variant-numeric: tabular-nums; overflow-wrap: anywhere;
}
.salary-lines { margin: 0; }
.salary-lines > div {
  display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px;
  padding: 9px 15px; border-top: 1px solid #edf0f5; font-size: .87rem;
}
.salary-lines dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.salary-sheet { display: grid; grid-auto-rows: max-content; gap: 14px; }
.billing-metrics { grid-template-columns: repeat(auto-fit,minmax(min(100%,190px),1fr)); }
.billing-tabs .tabs { margin-bottom: 12px; }
.billing-tabs button { flex: 1 0 auto; }
.challan-line {
  padding: 12px; margin-bottom: 10px; border: 1px solid var(--line);
  border-radius: 12px; background: #f8faff;
}
.invoice-line {
  display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); align-items: end;
  gap: 10px; padding: 12px; border: 1px solid var(--line);
  border-radius: 12px; background: #f8faff;
}
.invoice-line .invoice-description, .invoice-line-actions { grid-column: 1 / -1; }
.invoice-line-actions {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  color: #273e60; font-weight: 650; font-variant-numeric: tabular-nums;
}
.invoice-line-actions .btn { min-width: 42px; min-height: 42px; }
.invoice-line + .invoice-line { margin-top: 10px; }
.salary-hero {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start;
  gap: 12px; padding: 18px; border: 1px solid #dce8f9; border-radius: 15px;
  background: linear-gradient(120deg,#e9f1fe,#f8fbff); color: #203c64;
}
.salary-hero > div { display: grid; gap: 4px; }
.salary-hero > div > span { font-size: .87rem; font-weight: 650; }
.salary-hero > div > strong { font-size: clamp(1.55rem,5vw,2.1rem); font-variant-numeric: tabular-nums; letter-spacing: -.035em; }
.salary-lines .salary-minus { color: #9b413d; }
.salary-named, [data-salary-lines-list] { display: grid; gap: 10px; }
[data-salary-lines-list]:empty { display: none; }
.salary-named > button { justify-self: start; }
.salary-named-line {
  display: grid; grid-template-columns: minmax(0,1fr) minmax(0,.7fr) auto; align-items: end;
  gap: 8px; border: 1px solid var(--line); background: #f8faff; padding: 10px; border-radius: 12px;
}
.salary-named-line > button { align-self: end; }
[data-rule-audience] { display: grid; gap: 9px; margin-top: 8px; }
.field.pay-rate-hidden { display: none; }
.rule-people {
  display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,140px),1fr));
  gap: 6px; border: 1px solid var(--line); padding: 8px; border-radius: 10px; min-width: 0;
}
.rule-people[hidden] { display: none; }
@media (max-width: 420px) {
  .salary-named-line { grid-template-columns: minmax(0,1fr) auto; }
  .salary-named-line > .field:first-child { grid-column: 1 / -1; }
}
.salary-disclosure > .check + .check { margin-top: 6px; }
.salary-disclosure > .btn { margin-top: 10px; }
.salary-metrics.cards { grid-template-columns: repeat(2,minmax(0,1fr)); }
.salary-performance { display: grid; gap: 12px; padding: 0 15px 14px; }
.salary-performance .kv { margin-top: 0; grid-template-columns: repeat(auto-fit,minmax(min(100%,105px),1fr)); }
.salary-performance .kv small { font-size: .75rem; }
.performance-dashboard { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.performance-dashboard > div { display: grid; gap: 4px; }
.performance-dashboard strong { color: #203c64; font-size: 1.32rem; }
.performance-dashboard small { color: var(--muted); }
.performance-dashboard meter { flex: 1 1 120px; accent-color: #6b8ac9; }
.performance-review { display: grid; gap: 10px; }
.performance-factor {
  display: grid; grid-template-columns: minmax(110px,1fr) minmax(45px,1fr) minmax(40px,auto);
  align-items: center; gap: 8px; font-size: .83rem;
}
.performance-factor small { display: block; font-size: .72rem; }
.performance-factor meter { width: 100%; accent-color: #5279c9; }
.performance-factor meter::-webkit-meter-bar { background: #e7edf6; border: 0; }
.performance-factor meter::-webkit-meter-optimum-value { background: #6b8ac9; }
.performance-factor strong { text-align: right; font-variant-numeric: tabular-nums; }
.salary-performance > p { font-size: .83rem; }
@media (max-width: 760px) {
  .attendance-toolbar { gap: 7px; padding: 8px 11px; }
  .attendance-toolbar .filter-tools { margin-left: auto; }
  .attendance-overview dl { flex-basis: 100%; }
  .attendance-overview dl div { display: grid; gap: 1px; padding: 4px 5px; font-size: .74rem; }
  .attendance-overview { padding-inline: 11px; }
}

/* Work pages */
.workspace-page {
  --work-ink: #233751;
  --work-accent: #405f8c;
  --work-outline: #dae3ef;
  --work-fill: #f0f5fb;
  --work-shadow: 0 2px 5px #213a5608,0 8px 23px #213a5609;
}
.workspace-page > .heading {
  display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center;
  gap: 11px 14px; padding: 0 0 13px; margin-bottom: 14px;
  color: var(--work-ink); border-bottom: 1px solid #dce5f2;
}
.workspace-page > .heading h1 {
  color: inherit; font-size: clamp(1.48rem,2.15vw,1.95rem); font-weight: 650; letter-spacing: -.027em;
}
.workspace-page > .heading p { margin-top: 3px; color: var(--muted); font-size: .88rem; }
.page-symbol {
  display: grid; place-items: center; width: 43px; height: 43px; border-radius: 12px;
  color: #426b9f; background: linear-gradient(145deg,#f2f7ff,#e2edfd); border: 1px solid #dce8fa;
}
.page-symbol .icon { width: 21px; height: 21px; }

.workspace-page .card { border-color: var(--work-outline); box-shadow: var(--work-shadow); }
.workspace-page .card-head {
  min-height: 52px; padding: 11px 16px; color: var(--work-ink);
  background: #fff;
}
.workspace-page .card-head h2 { font-size: 1.08rem; font-weight: 650; }
.workspace-page .list-row { padding-block: 11px; }
.workspace-page .list-row > .symbol { background: var(--work-fill); color: var(--work-accent); }
.workspace-page .empty { color: #546780; }
.workspace-page .table-wrap th {
  padding-block: 10px; background: #edf3fa; color: #425977;
  font-size: .83rem; font-weight: 650;
}
.workspace-page .table-wrap td { font-size: .9rem; }
.workspace-page .table-wrap tr:nth-child(even) { background: #fafcfe; }
.workspace-page .table-wrap tbody tr:hover { background: #f3f7fe; }
.workspace-page .pill { font-size: .83rem; }
.workspace-page .month { color: #283d5b; font-weight: 650; }
.workspace-page :is(.attendance-person-totals,.record-values,.salary-totals,.stat) { font-variant-numeric: tabular-nums; }
.workspace-page .attendance-overview {
  background: linear-gradient(110deg,#f3f7fe,#fff);
}
.workspace-page .attendance-person summary { min-height: 64px; }
.workspace-page .attendance-person .avatar { background: linear-gradient(135deg,#eaf1ff,#d7e4f8); color: #345783; }
.workspace-page .attendance-person-totals dt { font-size: .79rem; }
.workspace-page .attendance-person-totals dd { color: #253c61; }
.workspace-page .management-metrics .stat { box-shadow: inset 0 2px #c1d2ee65,var(--work-shadow); }
.workspace-page .management-metrics .stat b { font-size: clamp(1.13rem,2.05vw,1.52rem); }
.workspace-page .management-metrics .stat span:last-child { color: #465d7c; }

.workspace-page .site-header {
  border-color: #cbd8ec; padding: 15px 18px;
  background: linear-gradient(120deg,#f8fbff,#e8effa);
}
.workspace-page .site-header > .symbol { background: #dce8fb; color: #375e93; }
.workspace-page .site-tile { min-height: 148px; background: linear-gradient(155deg,#f3f7fd,#fff 70%); }
.workspace-page .site-tile .symbol { background: #e3edfd; color: #405f8c; }
.workspace-page .site-tabs .tabs {
  width: 100%; margin-bottom: 13px; padding: 4px 0 0; background: transparent;
  border: 0; border-bottom: 1px solid var(--work-outline); border-radius: 0;
}
.workspace-page .site-tabs .tabs button { border-radius: 7px 7px 0 0; box-shadow: none; }
.workspace-page .site-tabs .tabs button.active { background: #e7effc; border-color: #dce7f8; box-shadow: inset 0 -2px #6a8cc1; }
.handover-overview { margin-bottom: 14px; }
.handover-progress { display: grid; gap: 9px; background: #f5f8fd; border-block: 1px solid var(--line-soft); }
.handover-progress progress { width: 100%; height: 8px; accent-color: #567cb7; }
.handover-progress .between { flex-wrap: wrap; }
.equipment-record + .equipment-record { border-top: 1px solid var(--line); }
.equipment-record > summary {
  display: grid; grid-template-columns: auto minmax(0,1fr) auto auto; align-items: center; gap: 12px;
  padding: 15px 18px; list-style: none; cursor: pointer;
}
.equipment-record > summary::-webkit-details-marker { display: none; }
.equipment-record > summary:hover { background: #f4f8fe; }
.equipment-record > summary:focus-visible { outline-offset: -3px; }
.equipment-record > summary > .icon { color: var(--muted); }
.equipment-record[open] > summary > .icon { transform: rotate(90deg); }
.equipment-name { overflow-wrap: anywhere; }
.equipment-name small:empty { display: none; }
.equipment-name small, .equipment-warranty small { display: block; color: var(--muted); margin-top: 3px; }
.equipment-warranty { text-align: right; }
.equipment-body { padding: 0 18px 12px; }
.equipment-body > .kv { padding: 0 0 14px; }
.equipment-body .equipment-history-head { padding: 12px 0; border-top: 1px solid var(--line); }
.equipment-body .list-row { padding-inline: 0; }
@media (max-width: 480px) {
  .equipment-record > summary { grid-template-columns: auto minmax(0,1fr) auto; gap: 8px 10px; padding: 12px; }
  .equipment-warranty { grid-column: 2; display: flex; align-items: center; flex-wrap: wrap; gap: 5px; text-align: left; }
  .equipment-warranty small { margin-top: 0; }
  .equipment-record > summary > .icon { grid-column: 3; grid-row: 1; }
  .equipment-body { padding-inline: 12px; }
  .equipment-history-head { flex-wrap: wrap; }
}
.workspace-page .site-chat .threads { background: #f5f8fd; }
.workspace-page .chat-room-header { background: #fff; }
.workspace-page .chat-room .messages { background: linear-gradient(150deg,#f4f8fd,#edf3fc); }
.workspace-page .chat-room .bubble.mine { background: #dfeafd; }
.workspace-page .personal-record { background: #fff; box-shadow: inset 0 2px #c7d9f0,var(--work-shadow); }
.workspace-page .personal-record .record-body { color: #435b7c; font-size: .9rem; }

.team-grid {
  grid-template-columns: repeat(auto-fill,minmax(min(100%,245px),1fr));
  grid-auto-rows: 1fr;
}
.team-department { display: grid; min-width: 0; gap: 10px; }
.team-department > h2 {
  padding: 0 0 8px; border-bottom: 1px solid var(--line); color: #263c5b; font-size: 1.02rem;
}
.team-member { display: flex; flex-direction: column; cursor: pointer; }
.team-member:is(:hover,:focus-within) { border-color: #bccfec; }
.team-details.employee-card-details { grid-template-rows: repeat(2,minmax(2.25rem,1fr)); }
.employee-profile-heading { grid-template-columns: auto minmax(0,1fr) auto; align-items: center; }
.employee-profile-heading > .avatar { width: 48px; height: 48px; }
.employee-profile-sheet .panel-facts > div {
  padding: 9px 11px; border: 1px solid var(--line-soft); border-radius: 9px; background: #f7faff;
}
.employee-profile-sheet .panel-disclosure[open] > summary { margin-bottom: 4px; }
.employee-document-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,148px),1fr)); gap: 10px; }
.employee-document-card {
  min-width: 0; display: grid; grid-template-rows: auto 1fr; overflow: hidden;
  border: 1px solid var(--line); border-radius: 11px; background: #fff;
}
.employee-document-preview {
  position: relative; display: grid; place-items: center; height: 120px;
  background: #edf3fc; border-bottom: 1px solid var(--line);
}
.employee-document-placeholder .icon { width: 28px; height: 28px; color: #5877a1; }
.employee-document-preview img {
  position: absolute; inset: 0; width: 100%; height: 100%; padding: 7px;
  object-fit: contain; background: #edf3fc;
}
.employee-document-preview:focus-visible { outline-offset: -3px; }
.employee-document-caption { min-width: 0; display: grid; grid-template-rows: 1fr auto auto; gap: 5px; padding: 10px; }
.employee-document-caption strong { overflow-wrap: anywhere; font-size: .88rem; }
.employee-document-caption small { color: var(--muted); }
.employee-document-caption .btn { margin-top: 4px; justify-self: start; }

@media (max-width: 420px) {
  .employee-profile-heading { grid-template-columns: auto minmax(0,1fr); }
  .employee-profile-heading > .pill { grid-column: 2; justify-self: start; }
}
.team-member > header {
  display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 6px 11px;
  padding: 16px; background: linear-gradient(140deg,#eaf2ff,#f8fbff); border-bottom: 1px solid var(--line-soft);
}
.team-member .avatar { width: 40px; height: 40px; background: #dce8fc; color: #365888; }
.team-member header h2 { color: #263c5b; font-size: 1.03rem; }
.team-member header > .icon { color: #5b7498; }
.team-name { background: none; border: 0; color: inherit; padding: 0; font-weight: 750; text-align: left; overflow-wrap: anywhere; }
.employee-permissions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin: 0; }
.employee-permissions > div { min-width: 0; background: #f7faff; border: 1px solid #e6edf7; border-radius: 10px; padding: 10px; }
.employee-permissions dt { font-size: .79rem; color: #435c7d; font-weight: 700; margin-bottom: 7px; }
.employee-permissions dd { display: flex; flex-wrap: wrap; gap: 5px; margin: 0; }
.employee-permissions .pill { max-width: 100%; font-size: .75rem; white-space: normal; }
@media (max-width: 420px) { .employee-permissions { grid-template-columns: minmax(0,1fr); } }
.team-designation { min-height: 1.55em; color: #385d91; font-size: .85rem; font-weight: 600; overflow-wrap: anywhere; }
.access-note { margin-top: 7px; font-size: .8rem; }
.team-member > header > .pill { grid-column: 2; justify-self: start; }
.team-details {
  display: grid;
  grid-template-rows: repeat(3,minmax(2.25rem,1fr));
  margin: 0;
  padding: 6px 16px;
}
.team-details > div {
  display: grid; grid-template-columns: minmax(55px,.75fr) minmax(0,1.25fr); gap: 7px;
  padding: 7px 0; font-size: .875rem;
}
.team-details .team-employment-off { grid-row: span 2; grid-template-columns: minmax(0,1fr) auto; align-content: center; }
.team-details > div + div { border-top: 1px solid var(--line-soft); }
.team-details dt { color: var(--muted); }
.team-details dd { margin: 0; color: #334b6c; font-weight: 600; overflow-wrap: anywhere; }

.holiday-entry {
  display: flex; align-items: center; gap: 13px; padding: 10px 16px;
  border-top: 1px solid var(--line-soft);
}
.holiday-entry time {
  display: grid; width: 46px; min-height: 47px; place-content: center; flex: none; text-align: center;
  border: 1px solid #dce7f7; border-radius: 9px; background: #edf4fe; color: #385982;
}
.holiday-entry time strong { line-height: 1.15; font-size: 1.06rem; }
.holiday-entry time span { font-size: .79rem; line-height: 1.1; }

.holiday-schedule {
  --holiday-tile-width: 130px;
  --holiday-tile-gap: 6px;
  --holiday-card-padding: 8px;
  display: flex; flex-wrap: wrap; align-items: stretch; gap: 12px;
}
.holiday-month-card {
  flex: none;
  width: calc(var(--holiday-columns) * (var(--holiday-tile-width) + var(--holiday-tile-gap))
    - var(--holiday-tile-gap) + 2 * var(--holiday-card-padding) + 2px);
  max-width: 100%; min-width: 10.5rem;
}
.holiday-month-header {
  padding: 9px 11px; background: #f3f7fd; border-bottom: 1px solid #e1eaf6;
}
.holiday-month-header h2 {
  color: #233e61; font-size: clamp(.95rem,1.5vw,1.08rem); line-height: 1.3; white-space: nowrap;
}
.holiday-month-tiles {
  display: grid; grid-template-columns: repeat(auto-fill,minmax(min(100%,var(--holiday-tile-width)),1fr));
  grid-auto-rows: 4.75rem;
  gap: var(--holiday-tile-gap); padding: var(--holiday-card-padding);
}
.holiday-date-tile {
  display: grid; align-content: start; gap: 4px; min-width: 0; padding: 6px 10px;
  border: 1px solid #d5e5f9; border-radius: 9px; background: #ebf4ff;
  color: #214e85; font: inherit; cursor: pointer; text-align: left;
}
.holiday-date-tile:hover { background: #dcecff; border-color: #a7c5eb; }
.holiday-date-tile time { display: flex; align-items: baseline; gap: 6px; }
.holiday-date-tile time strong { font-size: 1.3rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.holiday-date-tile time span { font-size: .73rem; }
.holiday-tile-name {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  overflow: hidden; overflow-wrap: anywhere; font-size: .78rem; font-weight: 650; line-height: 1.3;
}
@media (max-width: 600px) {
  .holiday-schedule { --holiday-tile-width: 108px; gap: 8px; }
  .holiday-month-card { min-width: min(9.5rem,100%); }
}
.salary-review-actions { justify-content: flex-start; flex-wrap: wrap; }

.settings-frame { height: 100dvh; min-height: 0; overflow: hidden; }
.settings-frame > main { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.settings-frame .topbar { flex: none; }
.settings-frame .screen { display: flex; flex: 1; flex-direction: column; min-height: 0; width: 100%; padding-bottom: 18px; }
.settings-frame .screen > .heading { flex: none; }
.settings-workspace {
  display: grid; flex: 1; grid-template-columns: 165px minmax(0,1fr); grid-template-rows: minmax(0,1fr);
  min-height: 0; min-width: 0; gap: 14px;
}
.settings-workspace.settings-single { grid-template-columns: minmax(0,1fr); }
.settings-workspace > .tabs {
  align-self: start; max-height: 100%;
  display: grid; gap: 4px; width: 100%; margin: 0; padding: 6px;
  background: #f8fbff; border-color: var(--work-outline); box-shadow: var(--work-shadow);
}
.settings-content {
  min-width: 0; min-height: 0; overflow: auto;
  overscroll-behavior: contain; scrollbar-gutter: stable; scroll-padding-block: 12px;
  padding: 0 4px 12px 0;
}
.settings-content > .view-tools { position: sticky; top: 0; z-index: 1; }
.settings-panel-enter { animation: screen-in var(--motion-page) var(--ease) both; }
.employee-bank h3 { display: flex; align-items: baseline; gap: 8px; }
.dialog .employee-bank fieldset { padding: 0; margin: 0; border: 0; min-width: 0; }
.employee-bank input[name="bank-ifsc"] { text-transform: uppercase; }
.access-options h4 { margin: 12px 0 6px; font-size: .88rem; }
.settings-workspace > .tabs button { text-align: left; font-size: .88rem; }
.settings-workspace > .tabs button.active { color: #2c4e80; background: #e4edfc; border-color: #d7e3f5; box-shadow: none; }
.push-status { margin-top: 4px; }
.push-settings { flex-wrap: wrap; }
.push-settings > .grow { flex-basis: min(160px,100%); }
.push-settings > .actions { justify-content: flex-end; margin-left: auto; }
.push-settings > .actions > .btn { min-height: 44px; }

@media (max-width: 760px) {
  .settings-workspace > .tabs button:active, .notification-tools .btn:active { transform: scale(.96); }
  .workspace-page > .heading { gap: 9px; padding: 0 0 10px; margin-bottom: 13px; }
  .page-symbol { width: 33px; height: 33px; }
  .page-symbol .icon { width: 17px; height: 17px; }
  .workspace-page > .heading .actions .btn { min-height: 40px; }
  .workspace-page .card-head { padding-inline: 11px; }
  .workspace-page .table-wrap table:not(.sheet) tr { padding: 11px; }
  .settings-frame .screen { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
  .settings-workspace { grid-template-columns: minmax(0,1fr); grid-template-rows: auto minmax(0,1fr); gap: 10px; }
  .settings-workspace.settings-single { grid-template-rows: minmax(0,1fr); }
  .settings-workspace > .tabs {
    display: flex; block-size: 54px; align-items: stretch; overflow: auto hidden;
    overscroll-behavior-inline: contain; scrollbar-width: none;
  }
  .settings-workspace > .tabs button { flex: 1 0 auto; text-align: center; }
  .settings-content { padding-inline-end: 0; scrollbar-gutter: auto; }
  .push-settings.list-row > .actions { grid-column: 1 / -1; margin: 4px 0 0; }
  .push-settings > .actions > .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .screen-enter, .settings-panel-enter, .dialog[open], .dialog .panel-content-enter > .body { animation: none; }
}
@media (max-width: 430px) {
  .workspace-page > .heading { grid-template-columns: auto minmax(0,1fr); }
  .workspace-page > .heading .actions { grid-column: 2; }
  .workspace-page > .heading:has(.actions > .btn:only-child) { grid-template-columns: auto minmax(0,1fr) auto; }
  .workspace-page > .heading:has(.actions > .btn:only-child) .actions { grid-column: 3; }
  .workspace-page > .heading .btn { font-size: .81rem; }
  .workspace-page .attendance-person-totals dt { font-size: .74rem; }
}
.chat-sender,.upload-attribution { display:flex; align-items:center; gap:6px; }
.chat-sender { margin-bottom:5px; }
.chat-sender .avatar,.upload-attribution .avatar { width:22px; height:22px; font-size:.63rem; }
.chat-sender .message-sender { margin:0; }
.upload-attribution { margin-top:5px; }

.access-options .access-details { margin: 11px 0 0; background: #f8fafd; }
.site-workspace { min-width: 0; }
.workspace-page .site-workspace .site-tabs .tabs {
  width: 100%;
  margin: 0;
  padding: 4px;
  gap: 4px;
  border: 1px solid #dbe4f1;
  border-radius: 12px;
  background: #edf2f8;
}
.workspace-page .site-workspace .site-tabs .tabs button { border-radius: 8px; }
.workspace-page .site-workspace .site-tabs .tabs button.active {
  background: #fff;
  border-color: #d5e0f2;
  box-shadow: 0 1px 4px #26456c14;
}
.site-workspace .site-panel { min-width: 0; margin-top: 15px; }
.site-panel > .card { border-color: #dbe4f1; }
.site-panel > .card > .card-head { gap: 10px; }
.site-panel .list-row > .grow { min-width: 0; overflow-wrap: anywhere; }
.site-panel .list-row > .actions { flex-wrap: wrap; }
.site-panel .grid > .card { align-self: start; }
.site-chat-navigation { display: flex; align-items: center; gap: 10px; }
.site-chat-navigation > .btn { flex: none; }
.site-chat-navigation > .site-tabs { min-width: 0; flex: 1; }
.chat-room-header h1 { margin: 0 0 3px; font-size: 1.12rem; overflow-wrap: anywhere; }
.chat-room-header h2 { overflow-wrap: anywhere; }
.chat-room-header .grow { min-width: 0; }
.chat-workspace .site-conversation { display: flex; min-height: 0; }
.chat-workspace .site-conversation > .chat-room { flex: 1; }
.chat-workspace .chat-room .composer { flex: none; }
.chat-workspace .chat-room .composer input { flex: 1; min-width: 0; }
.chat-workspace .chat-room .chat-room-header, .chat-workspace .chat-reply { flex: none; }
.chat-workspace .chat-reply > small {
  display: -webkit-box; min-width: 0; overflow: hidden;
  -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow-wrap: anywhere;
}
@media (min-width: 761px) {
  .frame.chat-workspace { height: 100dvh; min-height: 0; overflow: hidden; }
  .chat-workspace > main, .chat-workspace .screen, .site-workspace-chat, .site-workspace-chat > .site-panel {
    display: flex; flex-direction: column; flex: 1; min-height: 0;
  }
  .chat-workspace .screen { width: 100%; padding-block: clamp(12px,2.5vh,24px); }
  .chat-workspace .site-chat, .site-workspace-chat .site-conversation { flex: 1; min-height: 0; }
  .chat-workspace .site-chat .threads { display: flex; flex-direction: column; min-height: 0; }
  .chat-workspace .site-chat .thread-list { flex: 1; min-height: 0; max-height: none; }
  .chat-workspace .chat-room, .chat-workspace .chat-empty { min-height: 0; }
  .chat-workspace .chat-room .messages { height: auto; min-height: 0; flex: 1; }
}
@media (max-width: 760px) {
  .site-workspace .site-panel { margin-top: 11px; }
  .site-panel .list-row > .actions { max-width: 100%; gap: 5px; }
  .site-workspace .site-tabs .tabs button { min-height: 40px; }
  .frame.conversation-open {
    display: flex; flex-direction: column;
    height: var(--conversation-height,100dvh); min-height: 0;
    overflow: hidden; padding-top: env(safe-area-inset-top);
  }
  .conversation-open > main,
  .conversation-open .screen,
  .conversation-open .site-workspace-chat,
  .conversation-open .site-workspace-chat > .site-panel {
    display: flex; flex-direction: column; flex: 1; min-height: 0;
  }
  .conversation-open .topbar,
  .conversation-open .bottom-nav,
  .conversation-open .screen > .heading { display: none; }
  .conversation-open .screen { width: 100%; padding: 0 0 env(safe-area-inset-bottom); }
  .conversation-open .screen-enter { animation-name: conversation-in; }
  .conversation-open .site-chat-navigation { flex: none; padding: 5px 8px; gap: 6px; }
  .conversation-open .site-chat-navigation > .btn { min-height: 44px; padding-inline: 8px; white-space: nowrap; }
  .conversation-open .site-workspace-chat > .site-panel { margin: 0; }
  .conversation-open :is(.site-conversation,.site-chat) {
    flex: 1; min-height: 0; border: 0; border-radius: 0; box-shadow: none;
  }
  .conversation-open .chat-room { min-height: 0; }
  .conversation-open .chat-room .messages { height: auto; min-height: 0; flex: 1; }
  .conversation-open .chat-room-header { padding: 8px 10px; }
  .conversation-open .composer { gap: 6px; padding: 8px; }
  .conversation-open .composer :is(input,button) { min-height: 44px; }
  .conversation-open .composer input { font-size: 16px; }
}

@keyframes conversation-in { from { opacity: .78; } to { opacity: 1; } }

.site-edit-form .body { gap: 14px; }
.site-edit-section {
  display: grid;
  gap: 14px;
  padding: clamp(13px,2.4vw,19px);
  border: 1px solid #dce5f1;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 2px 5px #233c5d0a;
}
.site-edit-section h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #264263;
  font-size: .97rem;
}
.site-edit-section h3 .icon { color: #5276aa; }
.site-edit-section .between { flex-wrap: wrap; gap: 8px; }
.site-edit-section .field textarea { min-height: 66px; }
.site-edit-section .row-fields {
  align-items: end;
  padding: 10px;
  border: 1px solid #e5ebf5;
  border-radius: 10px;
  background: #f8faff;
}
.site-service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(min(100%,122px),1fr));
  gap: 8px;
}
.site-service {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  min-width: 0;
  min-height: 44px;
  padding: 7px 9px;
  border: 1px solid #e0e8f3;
  border-radius: 10px;
  background: #f8fafd;
  color: #435771;
  font-size: .85rem;
  font-weight: 600;
  overflow-wrap: anywhere;
  cursor: pointer;
  transition: background-color .18s, border-color .18s;
}
.site-service:hover { border-color: #9eb6d8; }
.site-service input { position: absolute; margin: 0; opacity: 0; }
.site-service:has(:focus-visible) { outline: 2px solid #3b68aa; outline-offset: 2px; }
.site-service:has(:checked) { background: #edf4ff; border-color: #a6bfe6; color: #264b80; }
.site-service .service-mark {
  flex: none;
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  border: 1px solid #d2deed;
  border-radius: 50%;
  background: #fff;
}
.site-service .service-mark .icon { width: 13px; height: 13px; visibility: hidden; }
.site-service :checked ~ .service-mark { border-color: #456fae; background: #456fae; color: #fff; }
.site-service :checked ~ .service-mark .icon { visibility: visible; }
.site-service-new { display: flex; align-items: end; gap: 8px; }
.site-service-new .field { flex: 1; min-width: 0; }

.chat-inbox .screen { max-width: none; }
.chat-inbox .site-chat { border-radius: 0; grid-template-columns: clamp(240px,27%,350px) minmax(0,1fr); }
.chat-inbox .chat-list-header {
  flex: none;
  display: grid;
  gap: 13px;
  padding: 17px 15px 13px;
  border-bottom: 1px solid #e0e8f4;
  background: #f8faff;
}
.chat-inbox .chat-list-header h1 { margin: 0; font-size: 1.35rem; letter-spacing: -.028em; }
.chat-inbox .chat-list-header .btn { background: #fff; color: #426495; border-color: #dce5f3; }
.chat-inbox .thread-list { padding: 7px 8px; }
.chat-inbox .thread-list .thread {
  margin-bottom: 3px;
  border: 1px solid transparent;
  border-radius: 11px;
  padding: 10px 8px;
}
.chat-inbox .thread.active { background: #e6effc; border-color: #ccdbf2; box-shadow: none; }
.chat-inbox .thread .symbol { width: 39px; height: 39px; background: #e9f0fb; color: #456ca3; }
.chat-inbox .thread.active .symbol { background: #d4e2f9; }
.chat-workspace .chat-room .messages {
  background: radial-gradient(ellipse at 70% 20%,#f8faff 0%,#edf3fb 77%);
}
.chat-workspace .chat-room .bubble { padding: 9px 12px; border-color: #dce6f2; }
.chat-workspace .chat-room .bubble.mine { color: #19385b; background: #dfecff; border-color: #cedff7; }
.chat-room .chat-compose {
  position: relative;
  flex: none;
  max-height: 70%;
  overflow: auto;
  overscroll-behavior: contain;
  border-top: 1px solid #dce6f3;
  background: #fff;
}
.chat-compose.is-dragging::after {
  content: "Drop attachment here"; position: absolute; z-index: 1; inset: 4px; display: grid; place-items: center;
  border: 1px dashed #6586be; border-radius: 12px; background: #edf4fff5; color: #294d80;
  font-size: .88rem; font-weight: 650; pointer-events: none;
}
.chat-room .composer { position: sticky; bottom: 0; border: 0; gap: 8px; }
.chat-room .composer input { border-radius: 19px; background: #f5f8fd; }
.chat-room .chat-attach, .chat-room .chat-send {
  flex: none;
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  border-radius: 50%;
  padding: 0;
}
.chat-room .chat-attach { background: #edf3fe; color: #3a629d; border-color: #dae5f7; }
.chat-room .chat-attach[aria-expanded=true] .icon { transform: rotate(45deg); }
.chat-room .chat-attach .icon { transition: transform .2s var(--ease); }
.chat-compose-actions {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 7px;
  padding: 9px 10px 0;
  animation: conversation-in .18s var(--ease) both;
}
.chat-compose-actions .btn {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 5px;
  min-height: 58px;
  padding: 8px 4px;
  border: 1px solid #e1e9f6;
  border-radius: 10px;
  background: #f4f8ff;
  color: #365985;
  text-align: center;
  font-size: .76rem;
  line-height: 1.2;
}
.composer-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px;
  margin: 8px 10px 0;
  border: 1px solid #dce6f4;
  border-radius: 11px;
  background: #f3f7fe;
}
.composer-preview strong,.composer-preview small { display: block; overflow-wrap: anywhere; }
.composer-preview img,.composer-preview video {
  width: 54px; height: 54px; flex: none;
  border-radius: 8px; object-fit: cover; background: #e4ebf8;
}
.composer-preview .btn { flex: none; }
.chat-contact-preview { display: grid; flex: 1; min-width: 0; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; }
.chat-compose-progress { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; padding: 7px 12px 0; }
.chat-compose-progress progress { flex: 1; min-width: 70px; height: 7px; accent-color: #4773b7; }
.chat-compose-error { padding: 8px 12px 0; color: #962e43; font-size: .82rem; }
@media (min-width:761px) {
  .chat-inbox .screen { padding: 0; }
}
@media (max-width:760px) {
  .site-edit-section .row-fields { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .site-service-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .site-edit-form .body { padding-inline: 10px; }
  .chat-inbox .screen { padding-inline: 0; padding-top: 0; }
  .chat-inbox .site-chat { grid-template-columns: minmax(0,1fr); box-shadow: none; border: 0; }
  .chat-contact-preview { grid-template-columns: minmax(0,1fr); }
  .chat-compose-actions { gap: 6px; padding-inline: 8px; }
  .chat-compose-actions .btn { font-size: .75rem; }
}

.employment-settings {
  display: grid;
  gap: 10px;
  padding: 13px;
  border: 1px solid #dde6f2;
  border-radius: 12px;
  background: #fff;
}
.employment-settings h3 { margin: 0; font-size: .94rem; color: #264263; }
.employment-settings > .check { justify-self: start; }
.employment-settings > p { margin: 0; font-size: .8rem; }
.employment-settings .employment-fields { margin-top: 3px; }

.material-request-line, .plan-availability {
  min-width: 0;
  padding: 13px;
  border: 1px solid #dce7f5;
  border-radius: 12px;
  background: #f8fbff;
}
.plan-availability .between { flex-wrap: wrap; gap: 7px; }
.plan-free, .plan-bookings { margin-top: 10px; }
.plan-slot-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.plan-availability ul { list-style: none; padding: 0; margin: 7px 0 0; }
.plan-availability li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 12px;
  padding: 7px 0;
  border-top: 1px solid var(--line-soft);
}
.plan-conflict { margin-top: 6px; color: #8f2942; font-size: .85rem; }
.plan-crew {
  min-width: 0;
  margin: 10px 0;
  padding: 10px 12px;
  background: #f4f8ff;
  border: 1px solid #dce7f5;
  border-radius: 10px;
}
.plan-crew h4 { display: flex; align-items: center; gap: 7px; margin: 0 0 6px; font-size: .88rem; }
.plan-crew ul { margin: 0; padding: 0; list-style: none; }
.plan-crew li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 5px 0; }
.plan-crew li + li { border-top: 1px solid var(--line-soft); }
.plan-crew li > .avatar { width: 28px; height: 28px; }
.plan-crew-time { margin-inline-start: auto; color: #405577; font-size: .82rem; font-variant-numeric: tabular-nums; }
.plan-crew-reference { margin: 0 0 4px; color: #405577; font-size: .8rem; }
.plan-crew-match { padding: 2px 7px; border-radius: 999px; background: #e0ebfb; color: #254d85; font-size: .75rem; font-weight: 600; }
.plan-crew-match.same { background: #dff3eb; color: #145b43; }
.field-day-crew { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 8px; }
.field-day-crew .plan-crew { margin: 0; }
.project-location { display: grid; gap: 10px; }
.project-location > p { margin: 0; }
.project-map {
  display: block; width: 100%; height: 132px; border: 1px solid var(--line-soft);
  border-radius: 12px; background: #f4f8ff;
}
.project-overview-summary { display: grid; grid-template-columns: minmax(0, 1fr) max-content; gap: 17px; align-items: start; }
.project-overview-location-card { width: max-content; max-width: 100%; }
.project-overview-map { width: clamp(128px, 26vw, 168px); max-width: 100%; }
.project-overview-map .project-map { height: auto; aspect-ratio: 1; }
@media (max-width: 720px) {
  .project-overview-summary { grid-template-columns: minmax(0, 1fr); }
}
.project-pin-map {
  height: clamp(235px, 36vh, 340px); border: 1px solid var(--line-soft);
  border-radius: 12px; background: #f4f8ff; isolation: isolate; cursor: crosshair;
}
.plan-content .project-map { max-width: 400px; }
.project-map-empty { margin: 6px 0 0; color: #405577; font-size: .85rem; }
.suggested-day { background: #f4f8ff; border-color: #d7e4f6; }
.suggested-day .panel-note { margin: 6px 0 10px; }
.suggested-visits { list-style: none; display: grid; gap: 8px; margin: 10px 0; padding: 0; }
.suggested-visits > li { padding: 9px 11px; border: 1px solid #dce7f5; border-radius: 10px; background: #fff; }
.suggested-visit { display: flex; align-items: center; gap: 9px; min-height: 28px; cursor: pointer; }
.suggested-visit input { flex: none; }
.suggested-visit > span { display: grid; gap: 2px; }
.suggested-visit strong { overflow-wrap: anywhere; }
.suggested-visit small { color: #315489; font-weight: 650; }
.suggested-visits ul, .suggested-waiting { padding-inline-start: 22px; color: var(--muted); font-size: .83rem; overflow-wrap: anywhere; }
.suggested-day > details { margin-top: 10px; }
.suggested-visit-header { display: flex; align-items: start; justify-content: space-between; gap: 8px; }
.suggested-order { display: flex; gap: 4px; flex: none; }
.suggested-order .btn { min-height: 38px; min-width: 38px; }
.suggested-times { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-top: 8px; }
.suggested-times label { display: grid; gap: 3px; font-size: .8rem; color: var(--muted); }
.suggested-times input { width: 100%; min-width: 0; }
.suggested-travel { color: #385781; font-size: .82rem; margin: 7px 0 0; }
.suggested-warnings { color: #8c5318; padding-inline-start: 20px; font-size: .83rem; margin: 10px 0; }
.plan-history-person { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.plan-history-person > div { flex: 1; min-width: 120px; }
.plan-history-person small { display: block; color: var(--muted); font-size: .8rem; }
.plan-history-grid { display: grid; gap: 9px; }
.plan-history-visit { padding: 10px; border: 1px solid var(--line-soft); border-radius: 10px; }
.plan-history-visit h4 { margin: 0 0 4px; font-size: .82rem; color: #3a5273; }
.plan-history-visit .panel-facts { margin-block: 8px; }
.plan-history-visit .panel-facts div { min-width: 0; overflow-wrap: anywhere; }
.plan-history-maps { font-size: .83rem; gap: 12px; }
.plan-history-visit details { margin-top: 8px; }

.customer-page { min-height: 100dvh; background: linear-gradient(140deg,#eef4fd,#f8fafd 70%); }
.customer-intake { width: min(100% - 28px,620px); margin: 0 auto; padding: clamp(22px,6vh,56px) 0; }
.customer-intake .brand { width: 182px; margin-bottom: 18px; }
.customer-card { display: grid; gap: 18px; padding: clamp(17px,4vw,30px); }
.customer-card h1 { font-size: clamp(1.45rem,4.4vw,2rem); }
.customer-card form { display: grid; gap: 14px; }
.customer-card form > button { justify-self: start; }
.customer-card .customer-contact-note { font-size: .84rem; }
.customer-card .notice p { margin-top: 4px; }
@media (max-width: 480px) {
  .customer-card .form-grid { grid-template-columns: minmax(0,1fr); }
  .customer-card form > button { width: 100%; }
}

.company-logo { width: auto; height: 52px; max-width: 150px; object-fit: contain; }
.company-billing { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,220px),1fr)); gap: 14px; }
.company-billing p { margin-top: 3px; }
.customer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 17px; color: #203957; }
.customer-intake .customer-brand .brand { margin-bottom: 0; }
.customer-brand strong { font-size: 1.12rem; overflow-wrap: anywhere; }

.employment-option { border:1px solid #e1e9f4; border-radius:10px; padding:8px; }
.employee-details-fields .field > input, .employee-details-fields .field > select, .employee-details-fields .picker-trigger { min-height: 46px; }
.employee-details-fields .picker-trigger > span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.employee-joining-setting { display: flex; grid-column: 2; }
@media (max-width: 400px) { .employee-joining-setting { grid-column: 1; } }

.site-complaint-link { display: grid; gap: 12px; }
.site-complaint-link .field { min-width: 0; }
.site-complaint-link input { width: min(100%, 40rem); }

.site-card-summary { display: grid; align-content: start; gap: 8px; min-width: 0; }
.site-coverage { display: flex; flex-wrap: wrap; gap: 6px; }
.customer-mode { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 16px; }
.customer-mode [aria-pressed=true] { color: #2b55a2; background: #e8f0fb; border-color: #cbdcf4; }
.customer-services { padding: 0; border: 0; min-width: 0; }
.customer-services legend { padding: 0 0 6px; font-weight: 600; }
.customer-service-options { display: flex; flex-wrap: wrap; gap: 7px; }
.customer-service-options label { display: flex; align-items: center; gap: 7px; min-height: 42px; padding: 6px 10px; border: 1px solid #d8e4f3; border-radius: 10px; cursor: pointer; }
.customer-service-options label:has(input:checked) { background: #e8f0fb; border-color: #c2d5f1; }
.tracking-result { margin-top: 12px; padding: 14px; border: 1px solid #d9e6f4; border-radius: 12px; background: #f4f8fd; overflow-wrap: anywhere; }
.tracking-result ul { margin: 8px 0 0; padding-left: 20px; }

.employee-profile-sheet .employee-profile-heading {
  border-color: #ceddf2; background: linear-gradient(135deg,#e4eefc,#f7faff); padding: 20px; gap: 14px;
}
.employee-profile-heading .avatar {
  width: 104px; height: 104px; font-size: 1.85rem;
  border: 3px solid #fff; box-shadow: 0 3px 12px #2845702b;
}
.employee-profile-heading h2 { color: #233a58; font-size: 1.45rem; overflow-wrap: anywhere; }
.employee-profile-heading p { margin-top: 4px; overflow-wrap: anywhere; }
.employee-photo-preview { border: 0; padding: 0; border-radius: 50%; background: transparent; cursor: zoom-in; }
.employee-profile-details { display: grid; grid-template-columns: minmax(0,1fr); gap: 10px; }
.employee-profile-details > .panel-section { align-content: start; min-width: 0; padding: 13px 16px; }
.employee-profile-details .panel-facts { gap: 8px; }
.employee-profile-details .panel-facts:has(.panel-fact-wide) {
  grid-template-columns: repeat(2,minmax(0,1fr));
}
.settings-employee-profile { container-type: inline-size; }
@container (min-width: 680px) {
  .settings-employee-profile .panel-facts:has(.panel-fact-wide) {
    grid-template-columns: repeat(4,minmax(0,1fr));
  }
  .settings-employee-profile .employee-document-grid { grid-template-columns: repeat(auto-fill,minmax(155px,1fr)); }
}
@media (max-width: 420px) {
  .employee-profile-sheet .employee-profile-heading { padding: 14px; gap: 9px; }
  .employee-profile-heading .avatar { width: 78px; height: 78px; }
  .employee-profile-heading > :is(.avatar,.employee-photo-preview) { grid-row: span 2; }
}
.employee-document-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.employee-document-preview { width: 100%; border: 0; border-bottom: 1px solid var(--line); padding: 0; cursor: zoom-in; }
.employee-document-caption { grid-template-columns: minmax(0,1fr) auto; grid-template-rows: auto; align-items: start; }
.employee-document-file { min-width: 0; display: grid; gap: 3px; }
.employee-document-file strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.employee-document-caption > .icononly { margin: 0; }
.employee-document-actions { grid-column: 1/-1; display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.employee-document-actions small { flex-basis: 100%; overflow-wrap: anywhere; }
.employee-document-lightbox {
  position: fixed; inset: 0; margin: auto; width: min(1050px,calc(100vw - 24px)); height: min(900px,calc(100dvh - 24px));
  max-width: none; max-height: none; padding: 0; border: 1px solid var(--line); border-radius: 14px; background: #fff; overflow: hidden;
}
.employee-document-lightbox[open] { display: grid; grid-template-rows: auto minmax(0,1fr); }
.employee-document-lightbox::backdrop { background: #18283bb8; }
.employee-document-lightbox > header { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; }
.employee-document-lightbox h2 { min-width: 0; overflow-wrap: anywhere; font-size: 1rem; }
.employee-document-lightbox iframe { width: 100%; height: 100%; border: 0; }
.employee-photo-lightbox { width: min(680px,calc(100vw - 24px)); height: min(720px,calc(100dvh - 24px)); }
.employee-photo-lightbox[open]:has(> footer) { grid-template-rows: auto minmax(0,1fr) auto; }
.employee-photo-lightbox > footer {
  display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding: 12px 16px;
  border-top: 1px solid var(--line);
}
.employee-photo-lightbox > footer .btn { min-height: 44px; }
.employee-photo-lightbox:has(.employee-photo-empty) { height: min(330px,calc(100dvh - 24px)); }
.employee-photo-empty { display: grid; place-items: center; background: #edf3fc; }
.employee-photo-empty .avatar { width: 112px; height: 112px; font-size: 2rem; }
.employee-photo-full { width: 100%; height: 100%; min-height: 0; object-fit: contain; background: #17263a; }

.picker-group > small { display: block; padding: 7px 10px 3px; color: var(--muted); font-weight: 700; }
.picker-group + .picker-group { border-top: 1px solid var(--line); margin-top: 4px; }
.attachment-save { margin-top: 4px; }
.chat-history-button { text-align: center; padding: 4px 0 8px; }
.employee-document-lightbox[open]:has(> footer) { grid-template-rows: auto minmax(0,1fr) auto; }
.employee-document-lightbox > footer { padding: 10px 16px; display: flex; justify-content: flex-end; }
.attachment-playback { display: block; width: 100%; max-height: 100%; margin: auto; }
.attachment-photo { display: block; width: 100%; height: 100%; object-fit: contain; background: #111a2b; }

.attention-group + .attention-group { border-top: 1px solid var(--line); }
.attention-group > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  list-style: none;
}
.attention-group > summary::before {
  content: '';
  inline-size: 7px;
  block-size: 7px;
  border: solid var(--muted);
  border-width: 0 2px 2px 0;
  transform: rotate(-45deg);
}
.attention-group[open] > summary::before { transform: rotate(45deg); }
.attention-group > summary > strong { flex: 1; }
.attention-group > summary::-webkit-details-marker { display: none; }
.site-plan-board { padding: 12px 16px 16px; }
.site-plan-group { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.site-plan-group + .site-plan-group { margin-top: 12px; }
.site-plan-group > header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 10px 14px;
  background: var(--soft);
}
.site-plan-group h3 { margin: 0; color: var(--ink); font-size: 1rem; }
.site-plan-group small, .site-plan-row small { display: block; color: var(--muted); }
.site-plan-row { align-items: center; padding: 10px 14px; }
.site-plan-row + .site-plan-row { border-top: 1px solid var(--line-soft); }
.site-plan-row > p { grid-column: 1 / -1; margin: 0; }
.site-plan-lane { position: relative; height: 12px; border-radius: 6px; background: var(--line-soft); }
.site-plan-lane > span {
  position: absolute;
  inset: 0 auto 0 var(--slot-start);
  width: var(--slot-width);
  border-radius: inherit;
  background: var(--blue-dark);
}
.sync-attachments { list-style: none; padding-inline-start: 0; margin: 8px 0 0; }
.sync-attachments li { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 10px; overflow-wrap: anywhere; font-size: .875rem; }
.sync-attachments small { color: var(--muted); }
.sync-error { color: #a52942; }
.site-plan-axis, .site-plan-row {
  display: grid;
  grid-template-columns: minmax(8rem, 1fr) minmax(10rem, 2fr) minmax(9rem, 1fr);
  gap: 8px 16px;
}
.site-plan-axis { padding-inline: 15px; }
.site-plan-hours {
  grid-column: 2;
  min-height: 1.1rem;
  position: relative;
  color: var(--muted);
  font-size: .77rem;
  font-variant-numeric: tabular-nums;
  margin: 0 0 10px;
}
.site-plan-hours span {
  position: absolute;
  left: var(--hour-position);
  white-space: nowrap;
  transform: translateX(-50%);
}
.site-plan-hours span:first-child { transform: none; }
.site-plan-hours span:last-child { transform: translateX(-100%); }
@media (max-width: 980px) {
  .site-plan-row { grid-template-columns: minmax(0, 1fr) auto; }
  .site-plan-lane { grid-row: 2; grid-column: 1 / -1; }
  .site-plan-axis { display: block; }
  .site-plan-hours span:not(:first-child,:last-child) { display: none; }
}

.ai-action { color: #5143a5; }
.ai-action .icon { flex: none; }
.ai-panel {
  display: grid;
  gap: .65rem;
  padding: .9rem 1rem;
  border: 1px solid #bdb8e5;
  border-radius: .85rem;
}
.ai-panel .panel-note, .ai-result p { margin: 0; }
.ai-result:not([hidden]) { display: grid; justify-items: start; gap: .8rem; }
.ai-result .report-note { white-space: pre-wrap; overflow-wrap: anywhere; }
@media (prefers-color-scheme: dark) {
  .ai-action { color: #b5a8f3; }
  .ai-panel { border-color: #635b90; }
}

.dialog:has(.ai-chat-frame) { background: var(--panel); }
.dialog > .ai-chat-frame { grid-template-rows: auto minmax(0,1fr); }
.ai-chat-frame > .body { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.ai-chat { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.ai-chat [role=log] { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 24px var(--panel-gutter); display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.ai-chat-welcome { margin: auto; text-align: center; color: var(--ink); }
.ai-chat-welcome h3 { margin: 14px 0; font-size: 1.45rem; letter-spacing: -.035em; }
.ai-chat-mark { display: inline-grid; place-items: center; width: 54px; height: 54px; border-radius: 18px; background: #e9edff; color: #405ac1; }
.ai-chat-mark svg { width: 26px; height: 26px; }
.ai-chat-message { max-width: 89%; padding: 8px 0; min-width: 0; }
.ai-chat-message.own { align-self: flex-end; background: #eaf0ff; color: #1e335a; border-radius: 18px 18px 4px 18px; padding: 10px 15px; }
.ai-chat-message strong { font-size: .77rem; letter-spacing: .015em; }
.ai-chat-message p { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; margin: .2rem 0; }
.ai-chat-message .btn { margin-top: .55rem; }
.ai-compose { padding: 0 var(--panel-gutter) max(18px,env(safe-area-inset-bottom)); }
.ai-compose [role=status] { font-size: .87rem; color: var(--muted); margin: 0 0 8px; }
.ai-compose [role=status]:empty { display: none; }
.ai-compose-row { display: flex; align-items: flex-end; gap: 5px; padding: 7px; border: 1px solid var(--line); border-radius: 19px; background: var(--panel); box-shadow: 0 4px 20px #203c5d0c; }
.ai-compose-row:focus-within { border-color: #748ed1; }
.ai-compose-row textarea { flex: 1; width: 0; min-width: 0; resize: none; field-sizing: content; min-height: 42px; max-height: 125px; padding: 10px; line-height: 1.45; border: 0; box-shadow: none; background: transparent; color: inherit; font: inherit; }
.ai-compose-row textarea:focus { outline: none; box-shadow: none; }
.ai-compose-row .btn { width: 44px; min-height: 44px; padding: 0; justify-content: center; border-radius: 14px; }

.live-assistant {
  position: fixed; z-index: 1100; right: max(16px,env(safe-area-inset-right)); bottom: max(16px,env(safe-area-inset-bottom));
  width: max-content; max-width: calc(100% - 32px); color: var(--ink); border: 1px solid #bdcce4;
  border-radius: 16px; background: var(--panel,#fff); box-shadow: 0 8px 28px #19355230; overflow: hidden;
}
.live-assistant-bar { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 6px 10px; }
.live-assistant-bar [data-transcript] { display: flex; gap: 10px; align-items: center; color: #234885; background: transparent; border: 0; text-align: left; padding: 5px; cursor: pointer; }
.live-assistant-bar [data-transcript] svg { width: 22px; height: 22px; }
.live-assistant-bar small { display: block; max-width: 22ch; color: var(--muted); }
.live-assistant [data-current-action] { margin: 0; padding: 6px 14px; border-top: 1px solid var(--line); font-size: .8rem; }
.live-assistant [role=log] { width: min(370px,85vw); height: min(36dvh,320px); overflow: auto; overscroll-behavior: contain; padding: 12px; }
.live-assistant [hidden] { display: none; }
dialog[open]:has(> .live-assistant) { display: flex; flex-direction: column; }
dialog[open]:has(> .live-assistant) > .panel-frame { min-height: 0; flex: 1; }
dialog[open] > .live-assistant { position: relative; inset: auto; flex: 0 0 auto; align-self: end; margin: 4px 10px max(4px,env(safe-area-inset-bottom)); }

.ai-answer h4 { margin: .85rem 0 .2rem; font-size: .96rem; line-height: 1.4; color: var(--ink, #20344b); }
.ai-answer h4:first-child { margin-top: .25rem; }
.ai-answer ul { margin: .3rem 0 .7rem; padding-inline-start: 1.2rem; }
.ai-answer li { margin: .26rem 0; line-height: 1.5; overflow-wrap: anywhere; }
.ai-chat-message .ai-answer p { white-space: normal; margin: .35rem 0; }
.ai-answer b { font-weight: 700; }

.ai-chat [role=log] { background: linear-gradient(160deg,#f4f7fc,var(--panel) 58%); }
.ai-chat-message { max-width: min(94%,58ch); padding: 12px 15px; border: 1px solid var(--line); border-radius: 5px 17px 17px; background: var(--panel); user-select: text; }
.ai-chat-message.own { border-color: #d5e2fa; }
.ai-chat-message .ai-message-link { border: 0; background: transparent; cursor: pointer; padding: 6px 8px; color: #395996; font: inherit; font-size: .8rem; }
.ai-chat-message .ai-message-link { margin: .35rem 5px 0 -5px; }
.ai-chat-message .ai-document { display: flex; width: fit-content; max-width: 100%; text-align: start; overflow-wrap: anywhere; }
.live-assistant,dialog[open] > .live-assistant { position: fixed; inset: auto; margin: 0; width: max-content; display: flex; flex-direction: column; border-radius: 20px; overflow: hidden; }
.live-assistant-bar { flex: none; min-height: 42px; gap: 2px; padding: 2px 4px; }
.live-assistant-bar button { min-height: 40px; border: 0; border-radius: 14px; background: transparent; color: #294d83; cursor: pointer; }
.live-assistant-bar [data-transcript] { padding: 3px 6px; gap: 7px; }
.live-assistant-bar small { width: 15ch; max-width: 29vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .7rem; }
.live-assistant-bar [data-move-talk] { width: 30px; font-size: 20px; cursor: grab; touch-action: none; user-select: none; -webkit-touch-callout: none; }
.live-assistant.moving { box-shadow: 0 12px 36px #223e6540; }
.live-assistant.moving [data-move-talk] { cursor: grabbing; }
.live-assistant-bar [data-end-talk] { width: 40px; color: #944256; }
.live-assistant [role=log] { min-height: 0; box-sizing: border-box; width: min(356px,82vw); }
.live-assistant .ai-chat-message { margin: 6px 0; }
.live-assistant [data-current-action]:not([hidden]) { max-width: 38ch; }
.live-assistant [data-dock-status] { line-height: 1.2; }
@media (prefers-reduced-motion: no-preference) {
  .ai-chat-message { animation: ai-message-in .18s ease-out both; }
  .live-assistant[data-phase=listening] [data-transcript] svg { animation: ai-listening 1.8s ease-in-out infinite; }
  .live-assistant[data-phase=speaking] [data-transcript] svg { animation: ai-listening .55s ease-in-out infinite alternate; }
  @keyframes ai-listening { 50% { color: #7962c6; transform: scale(1.12); } }
  @keyframes ai-message-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
}
@media (prefers-color-scheme: dark) {
  .ai-chat [role=log] { background: var(--panel); }
  .ai-chat-message .ai-message-link { color: var(--ink); }
}

.ai-prompts { display:flex; flex-wrap:wrap; gap:6px; padding:7px 0; }
.ai-prompts[hidden] { display:none; }
.ai-prompts button { font:inherit; font-size:.8rem; padding:6px 10px; border-radius:20px; border:1px solid var(--line); color:var(--ink); background:var(--panel); cursor:pointer; }
.ai-prompts button:hover,.ai-prompts button:focus-visible { border-color:#748ed1; }
.ai-compose { flex:none; border-top:1px solid var(--line); background:var(--panel); }
.ai-chat-message { flex:none; }
@media (prefers-reduced-motion:no-preference) {
  .ai-prompts button { transition:transform .16s ease,border-color .16s ease; }
  .ai-prompts button:active { transform:scale(.97); }
}
@media(max-width:760px) {
  .dialog:has(.ai-chat-frame),.frame.conversation-open { position:fixed; top:var(--chat-viewport-top,0px); bottom:auto; height:var(--chat-viewport-height,100dvh); }
  .frame.conversation-open { left:0; right:0; }
  .ai-compose-row textarea { font-size:16px; }
}
.ai-chat [data-chat-log] { gap:12px; }
.ai-chat .ai-chat-message:not(.own) { border-inline-start:3px solid #9aaee6; }
.ai-chat .ai-chat-message > strong { color:var(--muted); }
.ai-chat .ai-compose-row { transition:border-color .16s ease,box-shadow .16s ease; }
.ai-chat .ai-compose-row:focus-within { box-shadow:0 0 0 3px #7891d41a; }
.ai-compose [data-chat-status]:not(:empty) { padding-top:5px; }
@media(prefers-reduced-motion:no-preference) {
  .ai-prompts:not([hidden]) { animation:ai-message-in .16s ease-out; }
}
@media(prefers-reduced-motion:reduce) {
  .ai-chat .ai-compose-row { transition:none; }
}

.ai-voice-panel header > .live-assistant { position: static; margin-inline-start: auto; box-shadow: none; }
.ai-voice-panel header [data-move-talk], .ai-chat-frame .ai-compose-row [hidden] { display: none; }
.ai-voice-panel header > button { order: 1; }

.ai-chat .has-employee-cards { width:100%; max-width:100%; box-sizing:border-box; }
.ai-answer .ai-employee-cards { display:grid; gap:.55rem; padding:0; margin:.65rem 0; list-style:none; }
.ai-answer .ai-employee-cards > li { margin:0; padding:.75rem; border:1px solid var(--line); background:var(--panel); border-radius:12px; }
.ai-employee-cards .record-person { gap:.65rem; }
.ai-employee-cards .record-person strong { font-size:.95rem; }
.ai-employee-cards .avatar { width:2.25rem; height:2.25rem; flex:none; }
.ai-employee-facts { margin-top:.55rem; padding-top:.5rem; border-top:1px solid var(--line); overflow-wrap:anywhere; }
.ai-employee-facts b, .ai-chat .ai-employee-facts p { font-size:.85rem; }
.ai-chat .ai-employee-facts p { margin:.2rem 0; white-space:pre-line; }
.has-employee-cards summary { cursor:pointer; color:var(--muted); font-size:.82rem; }

.ai-saved-cards > summary { color:var(--ink); font-weight:650; font-size:.94rem; line-height:1.5; padding:.25rem 0; overflow-wrap:anywhere; }
.ai-saved-cards > summary small { color:var(--muted); display:inline-block; margin-inline-start:.5rem; font-weight:500; }
.ai-saved-cards > summary:focus-visible { outline:2px solid currentColor; outline-offset:3px; }

.ai-name-choice { display: grid; gap: .45rem; padding: .85rem; border: 1px solid var(--line); border-radius: 12px; }
.ai-name-choice > small { color: var(--muted); }
.ai-name-choice > button { display: flex; align-items: center; gap: .7rem; text-align: start; padding: .45rem .65rem; border: 1px solid var(--line); border-radius: 10px; background: var(--panel, white); color: inherit; }
.ai-name-choice > button:hover, .ai-name-choice > button:focus-visible { background: var(--soft, #eef4ff); }
.ai-name-choice > button > span { font-variant-numeric: tabular-nums; color: var(--muted); }

.ai-focus-slot { padding: 6px 0 2px; }
.ai-focus-slot[hidden], .ai-voice-panel header [data-talk-focus] { display: none; }
.ai-focus-trigger { display:flex; align-items:center; gap:8px; max-width:100%; padding:4px 9px 4px 5px; color:var(--ink); background:var(--panel); border:1px solid var(--line); border-radius:14px; cursor:pointer; text-align:start; }
.ai-focus-trigger:hover, .ai-focus-trigger:focus-visible { border-color:#748ed1; }
.ai-focus-trigger .avatar { width:30px; height:30px; }
.ai-focus-trigger > span:nth-child(2) { display:grid; min-width:0; }
.ai-focus-trigger small { color:var(--muted); font-size:.68rem; line-height:1.15; }
.ai-focus-trigger strong { font-size:.84rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ai-focus-trigger > svg { width:13px; height:13px; flex:none; transform:rotate(90deg); }
.live-assistant [data-talk-focus] { max-width:min(260px,82vw); padding:0 5px 5px; }
.live-assistant .ai-focus-trigger { width:100%; }
.live-assistant .ai-focus-trigger > svg { margin-inline-start:auto; }
.ai-focus-menu:popover-open { display:flex; flex-direction:column; gap:6px; padding:8px; }
.ai-focus-menu input { flex:none; width:100%; }
.ai-focus-options { min-height:0; overflow:auto; overscroll-behavior:contain; }
.ai-focus-options > button,.ai-focus-clear { width:100%; min-height:40px; padding:6px 8px; text-align:start; display:flex; align-items:center; justify-content:space-between; gap:6px; border:0; border-radius:8px; background:transparent; color:var(--ink); cursor:pointer; }
.ai-focus-options > button:hover,.ai-focus-options > button[aria-pressed=true],.ai-focus-clear:hover { background:var(--soft,#eef4ff); }
.ai-focus-options > p { margin:8px; color:var(--muted); font-size:.85rem; }
.ai-focus-clear { flex:none; color:var(--muted); border-top:1px solid var(--line); border-radius:0; }

.ai-focus-slot:has(.ai-employee-questions:not([hidden])) + .ai-prompts { display:none; }
.ai-employee-questions { gap:4px; padding:4px 0 0; }
.ai-employee-questions button { min-height:32px; }
.live-assistant .ai-employee-questions button { font-size:.75rem; padding:4px 8px; }
.ai-chat-frame[aria-busy=true] .ai-employee-questions { opacity:.65; }

.ai-shortcut-period { margin-top:5px; }
.ai-shortcut-period label { display:flex; align-items:center; gap:6px; color:var(--muted); font-size:.75rem; }
.ai-shortcut-period select,.ai-shortcut-period input { min-width:0; width:auto; max-width:100%; min-height:32px; padding:3px 7px; font:inherit; color:var(--ink); background:var(--panel); border:1px solid var(--line); border-radius:8px; }
.ai-shortcut-period select { appearance:auto; cursor:pointer; }
.ai-custom-period:not([hidden]) { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; margin-top:4px; }
.ai-custom-period label { display:grid; gap:2px; }
.ai-shortcut-period small:not(:empty) { display:block; margin-top:4px; color:var(--muted); }
.ai-employee-questions button:disabled { opacity:.5; }
