@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(.2,.65,.25,1);
}

*, *::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; }
.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: .69rem; }
.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 img { 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); }
.offline-report-screen { max-width: 720px; }
.offline-report-screen > .brand { margin-bottom: 22px; }
.topbar {
  position: sticky; top: 0; z-index: 3; backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 62px; padding: 0 clamp(18px,2.3vw,35px); background: #fbfcfee8; 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; }
.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 .28s 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 .17s, border-color .17s, box-shadow .17s, transform .17s var(--ease);
}
.btn:hover { background: #f3f7ff; border-color: #aec3e8; }
.btn:active { transform: translateY(1px); }
.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; }
.password-field { display: flex; border: 1px solid #d9e1ee; border-radius: 9px; background: #f8fafd; overflow: hidden; }
.password-field:focus-within { border-color: #8da6cc; box-shadow: 0 0 0 3px #b9c9ec4d; }
.password-field input { flex: 1; border: 0; background: transparent; box-shadow: none; }
.password-field input:focus { outline: none; box-shadow: none; }
.password-toggle { align-self: center; min-height: 34px; margin: 3px; color: #385886; background: transparent; border-color: transparent; }
.access-options .management-access { margin: 11px 0 0; background: #f8fafd; }
.management-access > h3 { margin-top: 13px; }

.dialog {
  position: fixed; inset: 0 0 0 auto; width: min(500px,100%); height: 100dvh; max-width: none; max-height: none; margin: 0;
  border: 0; border-left: 1px solid #dce5f0; border-radius: 0; padding: 0; color: var(--ink); background: #f4f7fb; box-shadow: -18px 0 56px #1e375f20;
}
.dialog[open] { animation: drawer-in .28s cubic-bezier(.2,.8,.2,1) both; font: inherit; }
.dialog > form { min-height: 100%; display: flex; flex-direction: column; }
.dialog > form > .body { flex: 1; align-content: start; }
dialog::backdrop { background: #34436522; backdrop-filter: blur(3px); }
.dialog header, .dialog footer {
  position: sticky; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 16px 24px; background: #fff;
}
.dialog header { top: 0; min-height: 77px; border-bottom: 1px solid var(--line); }
.dialog header h2 { font-size: 1.38rem; font-weight: 650; letter-spacing: -.03em; }
.dialog header .icononly { width: 40px; min-height: 40px; background: #f4f6fa; color: #52637c; }
.dialog footer { bottom: 0; justify-content: flex-end; border-top: 1px solid var(--line); }
.dialog .body { display: grid; grid-template-columns: minmax(0,1fr); gap: 20px; padding: 25px 24px; }
.dialog .body > * { min-width: 0; }
.dialog .field > span { color: #5f6e85; font-weight: 550; }
.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; }
.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: .15; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes drawer-in { from { transform: translateX(100%); } to { 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: .48s; --mobile-bar-ease: cubic-bezier(.25,.72,.28,1); }
  .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)); backdrop-filter: blur(12px); }
  .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;
    -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
    transition: opacity .24s var(--ease), visibility 0s .24s;
  }
  .drawer-scrim.visible { opacity: 1; visibility: visible; pointer-events: auto; transition-delay: 0s; }
  .sidebar {
    position: fixed; top: 0; left: 0; z-index: 6; width: min(320px,88vw); height: 100dvh;
    visibility: hidden; transform: translateX(-105%); border-radius: 0 23px 23px 0;
    background: linear-gradient(155deg,#fbfdff,#eef3fb 78%);
    box-shadow: 8px 0 36px #20345532;
    transition: transform .31s cubic-bezier(.22,1,.36,1), visibility 0s .31s;
    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-delay: 0s; }
  .sidebar .sidebar-nav, .sidebar .account-strip {
    opacity: 0; transform: translateX(-8px); transition: opacity .19s var(--ease), transform .22s var(--ease);
  }
  .sidebar.open .sidebar-nav, .sidebar.open .account-strip { opacity: 1; transform: none; transition-delay: .07s; }
  .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;
  }
  @supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    .bottom-nav { background: #f7fbffcf; -webkit-backdrop-filter: blur(18px) saturate(1.45); backdrop-filter: blur(18px) saturate(1.45); }
  }
  .topbar, .bottom-nav {
    transition: transform var(--mobile-bar-duration) var(--mobile-bar-ease),
      opacity var(--mobile-bar-duration) var(--mobile-bar-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; justify-items: center; align-content: center; gap: 3px; min-width: 0; min-height: 49px;
    padding: 3px 1px; border: 0; border-radius: 16px; background: transparent; color: #465c7a;
    font-size: clamp(.647rem,2.9vw,.75rem); font-weight: 650; line-height: 1.12; text-align: center;
    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: 18px; height: 18px; }
  .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 { width: min(480px,100%); max-height: 100dvh; }
  .dialog .body, .dialog header, .dialog footer { padding-left: 12px; padding-right: 12px; }
  .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: 15px;
  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-content: start; gap: 4px; padding: 8px 9px; border-radius: 10px; background: #eaf1ff; color: #39588b; }
.plan-time strong { font-size: .94rem; }
.plan-content { min-width: 0; display: grid; gap: 4px; }
.plan-content > .actions { margin-top: 5px; }
.my-plan-filter .field { width: fit-content; }
.my-plan-office .muted { margin-top: 3px; font-size: .85rem; }
.my-plan-office .pad { padding-top: 0; }
.visit-stamps { display: flex; flex-wrap: wrap; align-items: start; gap: 7px; padding: 7px 0; }
.visit-stamps > div {
  min-width: 124px; flex: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 5px 7px; padding: 9px;
  border: 1px solid #e1e9f5; border-radius: 9px; background: #f8fbff; font-size: .87rem;
}
.visit-stamps > div > small:first-child { display: block; flex: 1 0 100%; }
.visit-stamps > div > a { font-size: .82rem; font-weight: 650; }
.visit-stamps .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; }
  .visit-stamps > div { gap: 4px 6px; min-width: 0; }
  .payroll-stats.cards { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

/* Dashboard */
.dashboard-section { margin: 0 0 20px; }
.dashboard-follow-ups { margin-bottom: 16px; }
.dashboard-section h2 { margin-bottom: 10px; font-size: 1.15rem; font-weight: 650; }
.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; }
}

.workspace-search { display: inline-flex; align-items: center; justify-content: flex-end; gap: 8px; color: #8290a6; }
.workspace-search .icon { width: 17px; height: 17px; }
.workspace-search input {
  width: min(195px,22vw); min-height: 38px; padding: 8px 3px; border: 0; border-radius: 4px;
  background: transparent; color: #4f6079; font-size: .82rem;
}
.workspace-search input::placeholder { color: #8a97ab; }
.workspace-search + .topbar-date { display: none; }
@media (max-width: 760px) {
  .workspace-search { display: none; }
  .workspace-search + .topbar-date { display: inline; }
}

/* 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 .18s var(--ease) both; }
@keyframes picker-in { from { opacity: 0; transform: translateY(-4px) scale(.984); } 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: 15px; height: 15px; }
.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-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-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-search-field { display:flex; align-items:center; gap:9px; width:min(100%,390px); margin:0 0 18px; padding:0 13px; color:#627896; border:1px solid #dbe5f1; border-radius:12px; background:#fff; }
.site-search-field input { background:transparent; box-shadow:none; border:0; padding-inline:0; }
.site-catalog { grid-template-columns:repeat(auto-fill,minmax(min(100%,278px),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-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; }
.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; }
.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; }
.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; }
.text-file-preview { margin:0; padding:12px; color:#24364e; background:#eef3fa; border-radius:9px; font-size:.83rem; white-space:pre-wrap; overflow-wrap:anywhere; }

/* 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 { 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 */
.management-controls {
  display: flex; align-items: flex-end; flex-wrap: wrap;
  gap: 10px 16px; margin-bottom: 17px; padding: 12px 16px;
  background: linear-gradient(180deg,#f7faff,#fcfdff);
}
.filter-pair {
  display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: end;
  width: min(100%,416px); min-width: 0; gap: 10px;
}
.filter-tools { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; min-width: 0; }
.filter-tools > .field { width: min(155px,100%); min-width: 0; }
.filter-pair .field, .filter-tools .field { gap: 4px; }
.filter-pair .field > span, .filter-tools .field > span { font-size: .79rem; color: #51637d; font-weight: 650; }
.filter-pair .picker-trigger, .filter-tools .picker-trigger { min-height: 41px; line-height: 1.2; }
.filter-pair .picker-trigger > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.management-controls .tabs { margin: 0; align-self: end; }
.filter-pair .tabs { width: 100%; }
.filter-pair .tabs button { flex: 1 1 auto; min-height: 33px; padding-inline: 7px; }
.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-controls { padding-inline: 10px; }
  .filter-pair { width: 100%; gap: 8px; }
  .filter-pair .picker-trigger { min-height: 42px; padding-inline: 7px; gap: 5px; font-size: .81rem; }
  .filter-pair .picker-trigger > .icon { width: 14px; height: 14px; }
  .filter-pair .tabs button { min-height: 34px; padding-inline: 4px; font-size: .77rem; }
  .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; }
.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-performance, .salary-adjustment-body { 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-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-adjustment-body .btn { justify-self: start; }
.salary-adjustment-body > p, .salary-performance > p { font-size: .83rem; }
.salary-adjustment-body textarea { min-height: 74px; }
@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; }
  .dialog footer { flex-wrap: wrap; }
}

/* 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 .management-controls {
  background: linear-gradient(165deg,#fff,#f8fbff); border-color: var(--work-outline);
}
.workspace-page .management-controls .field > span,
.workspace-dialog .field > span { font-size: .875rem; color: #465c79; }
.workspace-page .management-controls .picker-trigger { background: #f7fafd; border-color: #dce5f1; }
.workspace-page .management-controls .picker-trigger[aria-expanded="true"] { background: #fff; border-color: #819dc2; }
.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-fit,minmax(min(100%,265px),1fr)); align-items: start; }
.team-member { display: flex; flex-direction: column; }
.team-member:only-child { width: min(100%,365px); }
.team-member > header {
  display: grid; grid-template-columns: auto minmax(0,1fr); 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-designation { color: #385d91; font-size: .85rem; font-weight: 600; }
.access-note { margin-top: 7px; font-size: .8rem; }
.team-member > header > .pill { grid-column: 2; justify-self: start; }
.team-details { 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 > 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; }
.team-member footer { justify-content: flex-end; margin-top: auto; padding: 11px 16px; border-top: 1px solid var(--line-soft); }

.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; }

.settings-workspace { display: grid; grid-template-columns: 165px minmax(0,1fr); align-items: start; gap: 14px; }
.settings-workspace > .tabs {
  display: grid; gap: 4px; width: 100%; margin: 0; padding: 6px;
  background: #f8fbff; border-color: var(--work-outline); box-shadow: var(--work-shadow);
}
.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; }
.workspace-dialog { background: #f3f6fb; }
.workspace-dialog header { min-height: 66px; background: #eef4ff; border-color: #dce6f5; }
.workspace-dialog header h2 { color: #233d61; }
.workspace-dialog .body { gap: 16px; }

@media (max-width: 760px) {
  .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-workspace { grid-template-columns: minmax(0,1fr); gap: 10px; }
  .settings-workspace > .tabs { display: flex; overflow: auto; }
  .settings-workspace > .tabs button { flex: 1 0 auto; text-align: center; }
  .push-settings.list-row > .actions { grid-column: 1 / -1; margin: 4px 0 0; }
  .push-settings > .actions > .btn { width: 100%; }
}
@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; }
  .workspace-page .management-controls .field > span { font-size: .81rem; }
}
.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; }
