:root {
  --navy: #082d73;
  --blue: #155eef;
  --blue-2: #0b3ea8;
  --orange: #f15a37;
  --ink: #122033;
  --muted: #667085;
  --line: #e4e9f1;
  --surface: #ffffff;
  --canvas: #f4f7fb;
  --warning: #fff4c2;
  --warning-line: #f5c451;
  --success: #139c6b;
  --danger: #d92d20;
  --shadow: 0 12px 35px rgba(19, 45, 86, .09);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
html { -webkit-text-size-adjust:100%; text-size-adjust:100%; }
body { background: var(--canvas); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
input[type="checkbox"], input[type="radio"] { width:18px; height:18px; min-width:18px; min-height:18px; margin:0; padding:0; flex:0 0 auto; }
.field, .form-grid > *, .toolbar-group > *, .entity-title, .entity-title > div { min-width:0; }
.field input, .field select, .field textarea { min-width:0; max-width:100%; }
.hidden { display: none !important; }
.startup-screen { position:fixed; inset:0; z-index:90; display:grid; place-items:center; padding:28px; background:radial-gradient(ellipse at 50% 35%,#e7efff 0,transparent 65%),var(--canvas); }
.startup-brand { display:flex; flex-direction:column; align-items:center; width:min(340px,100%); text-align:center; }
.startup-brand > img { width:112px; height:112px; object-fit:contain; }
.startup-brand h1 { display:grid; gap:5px; margin:16px 0 28px; font-size:28px; letter-spacing:.12em; color:var(--navy); }
.startup-brand h1 span { font-size:11px; letter-spacing:.3em; font-weight:600; }
.startup-brand p { margin:14px 0; color:var(--muted); font-size:13px; line-height:1.6; overflow-wrap:anywhere; }
.startup-spinner { width:24px; height:24px; border:2px solid #d7e3fa; border-top-color:var(--blue); border-radius:50%; animation:startup-spin .85s linear infinite; }
.startup-noscript { position:fixed; inset:auto 20px 30px; z-index:91; padding:16px; background:white; color:var(--danger); text-align:center; }
@keyframes startup-spin { to { transform:rotate(360deg); } }
@media (prefers-reduced-motion:reduce) { .startup-spinner { animation:none; } }
.login-screen { min-height: 100vh; display: grid; grid-template-columns: 1.12fr .88fr; background: #fff; }
.login-art { position: relative; overflow: hidden; min-height: 720px; padding: 44px 56px; color: #fff; background: radial-gradient(circle at 16% 12%, #1e6fff 0, transparent 34%), linear-gradient(145deg, #082d73, #061a43 68%); }
.login-art::after { content: ""; position: absolute; width: 520px; height: 520px; border: 1px solid rgba(255,255,255,.08); border-radius: 50%; right: -150px; top: -100px; box-shadow: 0 0 0 80px rgba(255,255,255,.025), 0 0 0 160px rgba(255,255,255,.02); }
.brand-lockup { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-lockup img { width: 46px; height: 46px; border-radius: 13px; }
.brand-lockup span { display: flex; flex-direction: column; letter-spacing: .08em; }
.brand-lockup b { font-size: 18px; }
.brand-lockup small { font-size: 9px; color: #7f8ea5; letter-spacing: .25em; }
.brand-lockup--light { position: relative; z-index: 2; }
.brand-lockup--light small { color: #b8d2ff; }
.login-copy { position: relative; z-index: 2; max-width: 650px; margin-top: 19vh; }
.eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .22em; color: #91b9ff; }
.login-copy h1 { font-size: clamp(38px, 5vw, 67px); line-height: 1.04; letter-spacing: -.045em; margin: 20px 0; }
.login-copy p { max-width: 570px; color: #c7d9f7; font-size: 18px; line-height: 1.65; }
.skyline { position: absolute; inset: auto 0 0; height: 210px; opacity: .32; display: flex; gap: 18px; align-items: end; padding: 0 8%; }
.skyline i { flex: 1; background: linear-gradient(180deg, rgba(76,142,255,.8), rgba(3,22,57,.5)); border-radius: 4px 4px 0 0; }
.skyline i:nth-child(1) { height: 38%; } .skyline i:nth-child(2) { height: 78%; } .skyline i:nth-child(3) { height: 56%; } .skyline i:nth-child(4) { height: 92%; } .skyline i:nth-child(5) { height: 64%; }
.login-panel { display: grid; place-items: center; padding: 40px; }
.login-card { width: min(430px, 100%); }
.login-card h2 { font-size: 34px; letter-spacing: -.035em; margin: 22px 0 8px; }
.login-card > p { color: var(--muted); line-height: 1.55; }
.login-card label, .field { display: grid; gap: 8px; margin-top: 20px; color: #344054; font-size: 13px; font-weight: 700; }
input, select, textarea { width: 100%; min-height: 46px; border: 1px solid #d5dce7; border-radius: 11px; padding: 11px 13px; background: #fff; color: var(--ink); outline: none; transition: .18s; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(21,94,239,.12); }
.password-field { position: relative; }
.password-field input { padding-right: 72px; }
.password-field button { position: absolute; right: 8px; top: 7px; border: 0; background: transparent; color: var(--blue); font-size: 12px; font-weight: 800; padding: 8px; }
.button { border: 0; border-radius: 10px; min-height: 42px; padding: 10px 16px; font-weight: 800; display: inline-flex; gap: 9px; align-items: center; justify-content: center; transition: .18s; }
.button:hover { transform: translateY(-1px); }
.button--primary { background: linear-gradient(135deg, var(--blue), var(--blue-2)); color: #fff; box-shadow: 0 7px 18px rgba(21,94,239,.24); }
.button--orange { background: var(--orange); color: #fff; }
.button--danger { background: #b42318; color: #fff; }
.button:disabled { opacity: .48; cursor: not-allowed; transform: none; box-shadow: none; }
.button--ghost { background: #fff; color: #344054; border: 1px solid var(--line); }
.button--wide { width: 100%; margin-top: 24px; }
.text-button { width: 100%; border: 0; background: transparent; color: var(--blue); font-weight: 800; margin-top: 14px; }
.login-note { font-size: 11px; text-align: center; margin-top: 28px; }
.pill { display: inline-flex; align-items: center; width: max-content; border-radius: 99px; padding: 6px 10px; font-size: 11px; font-weight: 800; }
.pill--blue { color: #1849a9; background: #eaf2ff; }
.pill--green { color: #08734f; background: #e4f8f0; }
.pill--orange { color: #a43817; background: #fff0e8; }
.pill--gray { color: #475467; background: #f0f2f5; }
.mobile-login-logo { display: none; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 248px 1fr; }
.sidebar { position: sticky; top: 0; height: 100vh; background: #fff; border-right: 1px solid var(--line); padding: 24px 16px 18px; display: flex; flex-direction: column; z-index: 20; }
.sidebar-brand-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sidebar .brand-lockup { padding: 0 10px 26px; }
.sidebar-close, .mobile-menu-button, .sidebar-backdrop { display: none; }
.sidebar nav { display: grid; gap: 5px; }
.nav-item { border: 0; background: transparent; color: #526071; border-radius: 10px; padding: 11px 12px; display: flex; align-items: center; gap: 12px; text-align: left; font-weight: 700; }
.nav-item span:first-child { width: 22px; text-align: center; font-size: 18px; }
.nav-item:hover, .nav-item.active { background: #edf4ff; color: var(--blue-2); }
.nav-item.active { box-shadow: inset 3px 0 var(--blue); }
.sidebar-footer { margin-top: auto; padding: 16px 8px 0; border-top: 1px solid var(--line); display: flex; gap: 10px; align-items: center; min-width: 0; }
.sidebar-footer > div:nth-child(2) { display: grid; min-width: 0; flex: 1; }
.sidebar-footer b { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-footer small { color: var(--muted); }
.avatar { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #dbe9ff, #b8d1ff); color: var(--blue-2); font-size: 12px; font-weight: 900; }
.icon-button { border: 0; background: transparent; color: var(--muted); }
.main { min-width: 0; }
.topbar { min-height: 92px; padding: 18px clamp(20px, 4vw, 48px); display: flex; justify-content: space-between; gap: 24px; align-items: center; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.88); backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 10; }
.topbar-leading { display: flex; align-items: center; gap: 14px; min-width: 0; }
.topbar h1 { margin: 4px 0 0; font-size: clamp(20px, 2.4vw, 28px); letter-spacing: -.03em; }
.breadcrumb { margin: 0; font-size: 10px; font-weight: 800; letter-spacing: .13em; color: #8994a5; }
.breadcrumb span { color: #c0c7d1; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.notification { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--orange); font-size: 10px; }
.content { padding: 28px clamp(18px, 4vw, 48px) 90px; max-width: 1540px; margin: 0 auto; }
.toolbar, .section-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; }
.toolbar-group { display: flex; gap: 10px; flex-wrap: wrap; }
.toolbar select, .toolbar input { min-height: 40px; width: auto; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 3px 18px rgba(17,44,82,.035); }
.stat-card { padding: 20px; position: relative; overflow: hidden; }
.stat-card::after { content: ""; position: absolute; width: 85px; height: 85px; right: -25px; top: -30px; border-radius: 50%; background: var(--tint, #e9f1ff); }
.stat-card small { color: var(--muted); font-weight: 700; }
.stat-card strong { display: block; font-size: 32px; letter-spacing: -.04em; margin-top: 12px; }
.stat-card em { font-style: normal; font-size: 11px; color: var(--success); font-weight: 800; }
.dashboard-grid { display: grid; grid-template-columns: 1.4fr .9fr; gap: 18px; margin-top: 18px; }
.panel { padding: 22px; }
.panel h2, .section-head h2 { font-size: 16px; margin: 0; }
.panel-subtitle { color: var(--muted); font-size: 12px; margin: 5px 0 0; }
.bars { height: 235px; display: flex; align-items: end; gap: 14px; padding: 24px 6px 20px; border-bottom: 1px solid var(--line); }
.bar-wrap { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: end; align-items: center; gap: 8px; min-width: 0; }
.bar { width: min(34px, 78%); min-height: 6px; border-radius: 8px 8px 3px 3px; background: linear-gradient(180deg, #2f74ef, #0b3ea8); position: relative; }
.bar:hover::after { content: attr(data-value); position: absolute; top: -27px; left: 50%; transform: translateX(-50%); background: #142338; color: #fff; font-size: 10px; border-radius: 5px; padding: 4px 6px; }
.bar-wrap label { color: var(--muted); font-size: 10px; white-space: nowrap; }
.project-list { display: grid; gap: 15px; margin-top: 18px; }
.project-row { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: center; }
.project-icon { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; color: var(--blue); background: #eaf2ff; }
.project-row b { font-size: 13px; display: block; }
.project-row small { color: var(--muted); }
.progress { height: 6px; background: #edf0f4; border-radius: 5px; margin-top: 6px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--blue); border-radius: inherit; }
.data-card { overflow: hidden; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th { background: #f8fafc; color: #667085; font-size: 10px; letter-spacing: .05em; text-align: left; padding: 12px 14px; white-space: nowrap; }
td { border-top: 1px solid #edf0f4; padding: 12px 14px; white-space: nowrap; }
tr:hover td { background: #fafcff; }
.employee-cell { display: flex; align-items: center; gap: 9px; font-weight: 750; }
.mini-avatar { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; color: #1849a9; background: #eaf2ff; font-size: 10px; font-weight: 900; }
.section-card { padding: 20px; }
.form-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; }
.form-grid .field { margin: 0; }
.bulk-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 18px; align-items: start; }
.bulk-table tr.warning td { background: var(--warning); border-color: #f7dda0; }
.bulk-table tr.warning td:first-child { box-shadow: inset 4px 0 var(--warning-line); }
.bulk-table input, .bulk-table select { min-height: 36px; padding: 7px 9px; min-width: 74px; }
.bulk-table input[type="checkbox"] { width:18px; height:18px; min-width:18px; min-height:18px; padding:0; margin:0; accent-color:var(--blue); }
.bulk-section { border-top: 1px solid var(--line); }
.bulk-section-heading { display:flex; align-items:center; flex-wrap:wrap; gap:8px; padding:10px 12px; font-size:12px; }
.bulk-section-heading > span { color:var(--muted); font-size:11px; }
.bulk-section-select { margin-left:auto; display:flex; align-items:center; gap:6px; font-size:11px; }
.bulk-section-select input { width:16px; height:16px; accent-color:var(--blue); }
.bulk-section--group, .bulk-section--group td { background:#eaf3ff; }
.bulk-section--group .bulk-section-heading { color:#174ea6; }
.bulk-section-scroll { max-height:340px; overflow:auto; overscroll-behavior:contain; }
.bulk-section-scroll th { position:sticky; top:0; z-index:1; background:#f7f9fc; }
.bulk-section-empty { padding:8px 12px; margin:0; font-size:12px; color:var(--muted); }
#bulkRows.is-searching .bulk-section--group .bulk-section-scroll { max-height:160px; }
#bulkRows.is-searching .bulk-section--other .bulk-section-scroll { max-height:240px; }
@media (max-width:600px) {
  .bulk-section-heading { gap:5px; padding:8px; font-size:11px; }
  .bulk-section-select { font-size:10px; }
  .bulk-table th, .bulk-table td { padding:8px 5px; }
  .bulk-table td:first-child, .bulk-table th:first-child { width:28px; }
  .bulk-table .mini-avatar { display:none; }
  .bulk-table .employee-cell { gap:0; white-space:normal; overflow-wrap:anywhere; font-size:11px; }
  .bulk-table .row-daily, .bulk-table .row-overtime { width:58px; min-width:0; padding:6px 4px; }
  .bulk-section-scroll { max-height:280px; }
  #bulkRows.is-searching .bulk-section--group .bulk-section-scroll { max-height:112px; }
  #bulkRows.is-searching .bulk-section--other .bulk-section-scroll { max-height:190px; }

}
.warning-note { color: #8a5c00; font-size: 10px; white-space: normal; margin-top: 4px; }
.summary-box { position: sticky; top: 118px; padding: 20px; }
.summary-box h3 { margin: 0 0 16px; font-size: 15px; }
.summary-line { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.summary-line b { color: var(--ink); }
.summary-total { background: #edf4ff; border-radius: 10px; padding: 12px; margin-top: 14px; color: var(--blue-2); }
.search { position: relative; }
.search input { padding-left: 36px; min-width: 240px; }
.search::before { content: "⌕"; position: absolute; left: 13px; top: 7px; color: var(--muted); z-index: 1; font-size: 20px; }
.entity-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.entity-card { padding: 18px; }
.entity-head { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.entity-title { display: flex; gap: 12px; align-items: center; }
.entity-title h3 { margin: 0; font-size: 14px; }
.entity-title p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.entity-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 18px; }
.entity-stats div { background: #f7f9fc; border-radius: 10px; padding: 10px; }
.entity-stats small { color: var(--muted); display: block; font-size: 9px; }
.entity-stats b { font-size: 16px; }
.modal-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(6,20,44,.56); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 20px; }
.modal { width: min(430px, 100%); background: #fff; border-radius: 20px; padding: 28px; text-align: center; box-shadow: var(--shadow); }
.modal-icon { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto; background: var(--warning); color: #a66b00; font-size: 25px; font-weight: 900; }
.modal h2 { margin: 18px 0 8px; }
.modal p { color: var(--muted); line-height: 1.6; }
.modal--form { width: min(570px, 100%); max-height: min(88vh, 760px); padding: 0; text-align: left; overflow: hidden; display: flex; flex-direction: column; }
.modal-form-head { padding: 22px 24px 16px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 20px; align-items: start; }
.modal-form-head h2 { margin: 8px 0 0; font-size: 21px; }
.modal-close { width: 36px; height: 36px; border: 0; border-radius: 50%; background: #f2f4f7; color: #475467; font-size: 23px; line-height: 1; }
.modal-form-body { padding: 4px 24px 22px; overflow-y: auto; }
.modal-form-body .field { margin-top: 17px; }
.modal-form-body select[multiple] { min-height: 150px; padding: 7px; }
.modal-form-body select[multiple] option { padding: 7px 9px; border-radius: 6px; }
.modal-form-actions { border-top: 1px solid var(--line); padding: 16px 24px; display: flex; justify-content: flex-end; gap: 10px; }
.modal-description { margin: 15px 0 0; font-size: 12px; }
.field-help { color: var(--muted); font-size: 10px; font-weight: 500; line-height: 1.45; }
.check-field { margin: 17px 0 0; padding: 0; border: 0; }
.check-field legend { margin-bottom: 8px; color: #344054; font-size: 13px; font-weight: 800; }
.check-field .field-help { margin: -2px 0 9px; }
.check-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; max-height: 190px; overflow-y: auto; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: #fafcff; }
.check-list--tall { max-height: 270px; }
.check-list label { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 7px 8px; border-radius: 7px; background: #fff; color: #344054; font-size: 11px; font-weight: 700; cursor: pointer; }
.check-list label:hover { background: #edf4ff; }
.check-list input { width: 17px; height: 17px; flex: 0 0 auto; accent-color: var(--blue); }
.check-list small { margin-left: auto; color: var(--muted); font-size: 9px; }
.optional { color: var(--muted); font-weight: 500; }
.form-error { color: var(--danger) !important; background: #fff1f0; border: 1px solid #ffd1cc; border-radius: 9px; padding: 10px 12px; font-size: 11px; }
.row-actions { display: flex; align-items: center; gap: 8px; }
.row-actions .button { min-height: 34px; padding: 7px 10px; font-size: 10px; }
.row-actions .text-button { width: auto; margin: 0; white-space: nowrap; font-size: 10px; }
.project-tags { white-space: normal; min-width: 170px; }
.project-tags span { display: inline-flex; background: #f0f4fa; color: #475467; border-radius: 6px; padding: 4px 6px; margin: 2px; font-size: 9px; }
.prototype-note { margin: 14px 2px 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.report-filters .form-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
.report-quick-actions { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; color: var(--muted); font-size: 11px; font-weight: 800; }
.report-quick-actions .button { min-height: 36px; padding: 7px 13px; }
.record-manage { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 0 0 14px; padding: 11px 13px; border-radius: 11px; background: #f7f9fc; }
.record-manage p { margin: 0; color: var(--muted); font-size: 11px; }
.record-top-actions { display: flex; align-items: end; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.record-top-actions .field { margin: 0; min-width: 145px; }
.record-top-actions .field input, .record-top-actions select { min-height: 40px; width: auto; }
.record-delete-date { min-width: 170px; margin: 0; }
.record-check { width: 42px; text-align: center; }
.record-check input { width: 17px; min-height: 17px; accent-color: var(--blue); }
.muted-text { color: var(--muted); font-size: 10px; }
.delete-summary { display: grid; gap: 8px; margin-top: 14px; }
.delete-summary div { display: flex; justify-content: space-between; gap: 12px; padding: 10px; border-radius: 9px; background: #f7f9fc; font-size: 11px; }
.delete-summary span { color: var(--muted); }
.toast { position: fixed; z-index: 120; right: 24px; bottom: 24px; background: #102a43; color: #fff; border-radius: 11px; padding: 13px 18px; box-shadow: var(--shadow); font-size: 12px; font-weight: 700; }
.empty { padding: 55px 20px; text-align: center; color: var(--muted); }
.empty strong { display: block; color: var(--ink); margin-bottom: 5px; }
.mobile-nav { display: none; }
.profile { position: relative; }
.profile-trigger { border: 0; cursor: pointer; }
.profile-menu { position: absolute; right: 0; top: calc(100% + 10px); z-index: 60; min-width: 200px; display: flex; flex-direction: column; gap: 3px; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.profile-menu.hidden { display: none; }
.profile-menu strong, .profile-menu small { padding: 2px 8px; }
.profile-menu small { color: var(--muted); margin-bottom: 6px; }
.profile-menu button { border: 0; border-radius: 7px; background: transparent; text-align: left; padding: 9px 8px; color: var(--ink); cursor: pointer; }
.profile-menu button:hover, .profile-menu button:focus-visible { background: #edf4ff; }
@media (max-width: 1100px) {
  .stats-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .dashboard-grid, .bulk-layout { grid-template-columns: 1fr; }
  .summary-box { position: static; }
  .entity-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .form-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .login-screen { grid-template-columns: 1fr; background: linear-gradient(180deg, #edf4ff, #fff 35%); }
  .login-art { display: none; }
  .login-panel { padding: 28px 20px; align-items: start; }
  .mobile-login-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 30px; }
  .mobile-login-logo img { width: 48px; height: 48px; }
  .login-card h2 { font-size: 29px; }
  .app-shell { display: block; }
  body.drawer-open { overflow: hidden; }
  .sidebar { position: fixed; display: flex; inset: 0 auto 0 0; width: min(86vw, 310px); height: 100dvh; padding: max(20px, env(safe-area-inset-top)) 16px max(18px, env(safe-area-inset-bottom)); z-index: 80; transform: translateX(-105%); transition: transform .24s ease; box-shadow: 18px 0 45px rgba(6, 20, 44, .18); }
  .sidebar.mobile-open { transform: translateX(0); }
  .sidebar nav { overflow-y: auto; overscroll-behavior: contain; padding-bottom: 14px; }
  .sidebar .brand-lockup { padding-bottom: 22px; }
  .sidebar-close { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 38px; margin: -6px 2px 16px 0; border: 0; border-radius: 50%; background: #f1f4f8; color: #344054; font-size: 25px; line-height: 1; }
  .sidebar-backdrop { display: block; position: fixed; inset: 0; z-index: 70; border: 0; padding: 0; background: rgba(6, 20, 44, .48); backdrop-filter: blur(2px); }
  .topbar { min-height: 76px; padding: 12px 14px; }
  .topbar-leading { gap: 11px; }
  .mobile-menu-button { display: grid; place-content: center; gap: 4px; width: 42px; height: 42px; flex: 0 0 42px; border: 1px solid var(--line); border-radius: 11px; background: #fff; color: var(--navy); }
  .mobile-menu-button span { display: block; width: 19px; height: 2px; border-radius: 2px; background: currentColor; }
  .topbar-actions .button, .notification { display: none; }
  .breadcrumb { display: none; }
  .content { padding: 18px 14px 32px; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { padding: 15px; }
  .stat-card strong { font-size: 25px; }
  .dashboard-grid { margin-top: 10px; gap: 10px; }
  .panel { padding: 16px; }
  .bars { gap: 7px; height: 190px; }
  .entity-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr 1fr; }
  .report-filters .form-grid { grid-template-columns: 1fr 1fr; }
  .mobile-nav { display: none; }
  .toolbar, .section-head { align-items: stretch; flex-direction: column; }
  .toolbar-group { display: grid; grid-template-columns: 1fr 1fr; }
  .toolbar select, .toolbar input { width: 100%; }
  .search input { min-width: 0; }
  .bulk-layout { gap: 10px; }

  .record-manage { align-items: stretch; flex-direction: column; }
  .record-top-actions { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .record-top-actions .field, .record-top-actions .field input, .record-top-actions select, .record-top-actions button { width: 100%; }
}
@media (max-width: 430px) {
  .stats-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .report-filters .form-grid { grid-template-columns: 1fr; }
  .toolbar-group { grid-template-columns: 1fr; }
  .topbar h1 { font-size: 19px; }
  .check-list { grid-template-columns: 1fr; }
  .form-grid > .field[style*="span 2"] { grid-column:1 / -1 !important; }
}

/* Full account names on desktop; a compact native picker on phones. */
.row-account-badge { display:none; }
.bulk-table .row-account { width:170px; max-width:100%; font-size:11px; }
@media (max-width:760px) {
  #bulkRows .bulk-table, #bulkRows .bulk-table thead, #bulkRows .bulk-table tbody { display:block; width:100%; }
  #bulkRows .bulk-table tr { display:grid; grid-template-columns:26px minmax(0,1fr) 50px 50px 44px; align-items:center; }
  #bulkRows .bulk-table td, #bulkRows .bulk-table th { display:block; min-width:0; box-sizing:border-box; padding:6px 3px; }
  #bulkRows .bulk-table th:first-child, #bulkRows .bulk-table td:first-child { width:auto; }
  #bulkRows .bulk-table thead { position:sticky; top:0; z-index:2; background:#f7f9fc; }
  #bulkRows .bulk-table td.bulk-account-cell, #bulkRows .bulk-table th:nth-child(5) { display:block; }
  #bulkRows .bulk-table .employee-cell > div { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  #bulkRows .bulk-table .row-daily, #bulkRows .bulk-table .row-overtime { width:44px; min-width:0; padding:6px 2px; }
  .row-account-control { display:block; position:relative; width:38px; height:38px; border-radius:9px; }
  .row-account-control:focus-within { outline:2px solid var(--blue); outline-offset:2px; }
  .row-account-badge { display:grid; place-items:center; width:38px; height:38px; border-radius:9px; font-size:12px; font-weight:800; }
  .row-account-badge.is-company { background:#eaf2ff; color:#1849a9; }
  .row-account-badge.is-foreman { background:#fff0df; color:#b54708; }
  #bulkRows .bulk-table .row-account { position:absolute; inset:0; opacity:0; width:100%; height:100%; min-width:0; padding:0; cursor:pointer; }
  #bulkRows .bulk-table .row-account:disabled { cursor:default; }
  #bulkRows.is-searching .bulk-section--other .bulk-section-scroll { max-height:190px; }
}

/* WhatsApp draft: attendance and manually chosen absence rows stay separate. */
.modal--whatsapp { width:min(720px,100%); }
.wa-heading { margin:16px 0 8px; font-size:14px; }
.wa-records { max-height:190px; overflow:auto; border:1px solid var(--line); border-radius:9px; }
.wa-records h4, .wa-candidate-section h4 { margin:0; padding:8px 10px; font-size:12px; background:#f7f9fc; }
.wa-person { display:flex; align-items:center; gap:8px; padding:7px 10px; margin:0; font-size:12px; line-height:1.4; cursor:pointer; }
.wa-person input { width:16px; height:16px; min-width:16px; min-height:16px; flex:0 0 16px; margin:0; accent-color:var(--blue); }
.wa-person small { font-size:10px; color:var(--muted); }
.wa-empty { margin:0; padding:9px 10px; font-size:12px; color:var(--muted); }
.wa-candidate-section { border:1px solid var(--line); border-radius:9px; overflow:hidden; margin-bottom:8px; }
.wa-candidate-section--history, .wa-candidate-section--history h4 { background:#eaf3ff; }
.wa-candidate-section--history h4 { color:#174ea6; }
.wa-candidate-scroll { max-height:165px; overflow:auto; overscroll-behavior:contain; }
#waCandidates.is-searching .wa-candidate-section--history .wa-candidate-scroll { max-height:105px; }
.wa-chosen-absences { display:flex; flex-wrap:wrap; gap:5px; margin:8px 0; }
.wa-remove-absence { border:1px solid #d7e3f7; border-radius:8px; background:#f2f6fc; padding:5px 7px; font-size:11px; color:#174ea6; cursor:pointer; }
.wa-preview { margin-top:12px; }
@media (max-width:600px) {
  .modal--whatsapp .modal-form-body { padding:4px 12px 14px; }
  .wa-records { max-height:130px; }
  .wa-candidate-scroll { max-height:155px; }
  #waCandidates.is-searching .wa-candidate-section--history .wa-candidate-scroll { max-height:76px; }
  .wa-person { padding:6px 8px; font-size:12px; }
  .wa-preview textarea { min-height:120px; }
}

.notification-toggle { display:flex; align-items:center; gap:10px; margin:18px 0; font-weight:700; font-size:13px; }
.notification-toggle input, .notification-user input { width:18px; height:18px; min-width:18px; min-height:18px; accent-color:var(--blue); }
.notification-users { max-height:290px; overflow:auto; border:1px solid var(--line); border-radius:10px; margin:12px 0; }
.notification-user { display:flex; align-items:center; gap:10px; padding:10px 12px; border-bottom:1px solid var(--line); cursor:pointer; }
.notification-user span { display:grid; gap:4px; font-size:12px; }
.notification-user small { font-size:11px; color:var(--muted); }
.notification-actions { display:flex; flex-wrap:wrap; gap:8px; margin:14px 0; }
@media(max-width:600px){.notification-recipient-toolbar{display:flex;flex-direction:column;align-items:stretch;}.notification-actions{display:grid;grid-template-columns:1fr;}.notification-user{padding:9px 8px;}}

@media (max-width:760px) {
  .topbar-leading { flex:1; }
  .topbar-leading h1 { overflow-wrap:anywhere; }
  .topbar-actions, .modal-close { flex-shrink:0; }
  .modal-backdrop { padding:12px; }
  .modal--form { max-height:calc(100dvh - 24px); }
  .modal-form-head { padding:16px; gap:12px; }
  .modal-form-head h2 { font-size:18px; overflow-wrap:anywhere; }
  .modal-form-body { padding:4px 16px 16px; min-height:0; }
  .modal-form-actions { padding:12px 16px; flex-wrap:wrap; }
  .summary-line { gap:12px; }
  .summary-line b { min-width:0; overflow-wrap:anywhere; text-align:right; }
  .entity-title h3, .notification-user span { min-width:0; overflow-wrap:anywhere; }
  .toast { left:12px; right:12px; bottom:max(12px,env(safe-area-inset-bottom)); overflow-wrap:anywhere; }
}

/* Only included in the isolated test build. */
.environment-banner{position:fixed;inset:0 0 auto;z-index:200;height:40px;display:flex;align-items:center;justify-content:center;gap:4px;padding:4px 10px;background:#9a3412;color:white;font-size:11px;text-align:center;line-height:1.3;}
body[data-environment="test"]{padding-top:40px;}
body[data-environment="test"] .topbar{top:40px;}
body[data-environment="test"] .startup-screen{top:40px;}
body[data-environment="test"] .sidebar{top:40px;height:calc(100dvh - 40px);}
body[data-environment="test"] .modal-backdrop,body[data-environment="test"] .sidebar-backdrop{top:40px;}
body[data-environment="test"] .modal--form{max-height:calc(100dvh - 64px);}
