/* TRIQ WEB R46. Presentation only: existing sections, data and authorized actions remain intact.
   Load after the WEB-R42 styles. Attendance owns its full-page sizing separately. */
:root {
  --modern-accent:#1559b4; --modern-deep:#103d79; --modern-soft:#eaf2fc;
  --modern-ink:#233247; --modern-muted:#617086; --modern-line:#e2e8ef;
  --modern-canvas:#f4f6fa; --modern-surface:#fff;
  --modern-shadow:0 3px 16px #18344f05,0 1px 3px #18344f03;
  --o-sidebar:220px;
}
html[data-triq-app=processor],html[data-web-role=processor] {
  --modern-accent:#087952; --modern-deep:#07533c; --modern-soft:#e6f5ed;
}
html[data-triq-app=employee],html[data-web-role=employee] {
  --modern-accent:#ad4d13; --modern-deep:#84380e; --modern-soft:#fff0e4;
}
html body {
  color:var(--modern-ink); background:var(--modern-canvas);
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  font-size:14px; line-height:1.5; -webkit-font-smoothing:antialiased;
}
html body #app,html body dialog {
  --accent:var(--modern-accent); --o-accent:var(--modern-accent); --o-navy:var(--modern-accent);
  --tint:var(--modern-soft); --o-bg:var(--modern-canvas); --o-border:var(--modern-line);
  --web-line:var(--modern-line); --web-muted:var(--modern-muted); --web-ink:var(--modern-ink);
  --muted:var(--modern-muted); --line:var(--modern-line);
}
html body #app :is(.o-layout,.layout,.o-main,.main,.o-profile-content,.card,.fields,.field) {min-width:0}
html body #app :is(.o-main,.layout>.main) {
  background:var(--modern-canvas); padding:24px; font-size:13px; line-height:1.55;
}
html body #app :is(.o-main,.main) :is(h1,h2,h3) {
  color:var(--modern-ink); line-height:1.3; letter-spacing:-.025em;
}
html body #app :is(.o-main,.main) h1 {font-size:25px;font-weight:700}
html body #app :is(.o-main,.main) h2 {font-size:17px;font-weight:650}
html body #app :is(.o-main,.main) h3 {font-size:14px;font-weight:650}
html body #app :is(.o-main,.main) p {font-size:13px;line-height:1.6}
html body #app :is(.help,.muted,.field small) {color:var(--modern-muted);font-size:12px;line-height:1.55}
html body #app :is(.page-heading,.card-head,.o-panel-head) {
  align-items:center;gap:12px;margin-bottom:18px;flex-wrap:wrap;
}
html body #app .page-heading {padding-block:2px 4px}
html body #app .page-heading p {margin:5px 0 0;max-width:76ch}
html body #app .o-panel-head h2 {white-space:normal}

/* A quiet header and a consistently accented navigation rail. */
html body #app .triq-portal-header[data-header-portal] {
  background:#fffffff5;border-bottom:1px solid var(--modern-line);box-shadow:0 1px 6px #21364b03;
  color:var(--modern-ink);
}
html body #app .triq-portal-header .o-brand {border-right-color:var(--modern-line)}
html body #app .triq-portal-header .o-page-title {font-size:15px;font-weight:650;letter-spacing:-.02em}
html body #app .triq-portal-header .o-global-search {
  height:38px;background:#f5f7fa;border-color:transparent;border-radius:10px;
}
html body #app .triq-portal-header .o-global-search:focus-within {
  background:#fff;border-color:var(--modern-accent);box-shadow:0 0 0 3px var(--modern-soft);
}
html body #app .triq-portal-header .o-global-search input {font-size:12px;box-shadow:none}
html body #app .triq-portal-header :is(.o-icon-button,.o-wallet-link) {
  color:var(--modern-ink);border-color:var(--modern-line);border-radius:10px;min-height:36px;
}
html body #app .triq-portal-header .o-icon-button {width:36px;height:36px}
html body #app .triq-portal-header .o-company-label {
  background:var(--modern-soft);color:var(--modern-deep);border:0;border-radius:7px;font-size:11px;padding:7px 9px;
}
html body #app .triq-portal-header .o-avatar {background:var(--modern-soft);color:var(--modern-accent);font-size:11px}
html body #app .triq-portal-header .o-user b {font-size:11px}
html body #app .triq-portal-header .o-user small {font-size:10px}
html body #app :is(.o-sidebar,.layout>.sidebar) {
  background:#fff;border-right:1px solid var(--modern-line);padding:18px 12px;scrollbar-width:thin;
}
html body #app :is(.o-sidebar,.layout>.sidebar) :is(.o-nav,.nav-button) {
  color:#526176;background:transparent;border-radius:10px;min-height:40px;padding:9px 11px;
  font-size:12px;line-height:1.4;font-weight:550;margin:0 0 4px;gap:10px;
  transition:background-color .16s ease,color .16s ease;
}
html body #app :is(.o-sidebar,.o-profile-nav) .o-nav-icon {
  width:27px;height:27px;background:transparent;color:currentColor;border-radius:8px;
}
html body #app :is(.o-sidebar,.o-profile-nav) .o-nav .o-icon {width:18px;height:18px}
html body #app :is(.o-sidebar,.layout>.sidebar) :is(.o-nav,.nav-button):hover {background:#f3f6fa;color:var(--modern-accent)}
html body #app :is(.o-sidebar,.layout>.sidebar) :is(.o-nav.selected,.nav-button.active) {
  background:var(--modern-soft)!important;color:var(--modern-accent)!important;
  border-color:transparent!important;font-weight:700;box-shadow:inset 3px 0 var(--modern-accent);
}
html[dir=rtl] body #app :is(.o-sidebar,.layout>.sidebar) :is(.o-nav.selected,.nav-button.active) {box-shadow:inset -3px 0 var(--modern-accent)}
html body #app :is(.o-sidebar,.layout>.sidebar) :is(.o-logout,[data-action=logout]) {color:#a83f4c}
html body #app .o-nav-caption {font-size:10px;font-weight:650;letter-spacing:.06em;text-transform:uppercase;color:#768297;margin:6px 11px 9px}
html body #app .o-nav-divider {margin:14px 8px;background:var(--modern-line)}
html body #app .o-nav-label {white-space:normal;overflow-wrap:break-word}

/* Surfaces use one rhythm; operational tables keep their original content. */
html body #app :is(.o-main,.main) > .card,
html body #app :is(.o-dashboard-bottom,.o-service-grid,.grid,.stack,.business-split) > .card,
html body #app :is(.o-profile-content,.o-profile-nav,.r40-employee-card,.r40-employee-identity) {
  border:1px solid var(--modern-line);border-radius:16px;background:var(--modern-surface);box-shadow:var(--modern-shadow);
}
html body #app :is(.o-main,.main) > .card,
html body #app :is(.o-dashboard-bottom,.o-service-grid,.grid,.stack,.business-split) > .card {padding:20px;margin-bottom:18px}
html body #app :is(.o-dashboard-bottom,.o-service-grid,.grid,.business-split) {gap:18px}
html body #app .o-dashboard-bottom>.card {margin-bottom:0}
html body #app .card-head h2,html body #app .o-panel-head h2 {margin:0}
html body #app .table-scroll {
  border:1px solid var(--modern-line);border-radius:11px;background:#fff;max-width:100%;overflow:auto;
  scrollbar-width:thin;overscroll-behavior-inline:contain;
}
html body #app table {font-size:12px;color:var(--modern-ink);font-variant-numeric:tabular-nums}
html body #app table th {
  background:#f7f9fc;color:#637187;font-size:11px;font-weight:600;letter-spacing:.015em;
  padding:11px 13px;border-bottom:1px solid var(--modern-line);line-height:1.45;
}
html body #app table td {padding:12px 13px;border-bottom:1px solid #edf1f5;line-height:1.5;font-size:12px}
html body #app table tbody tr:nth-child(2n) {background:#fcfdfe}
html body #app table tbody tr:hover {background:var(--modern-soft)}
html body #app table td strong {font-weight:650}
html body #app table td small {font-size:11px;color:var(--modern-muted);line-height:1.5}
html body #app :is(.o-task-table,.o-dashboard-bottom) td {height:auto}
html body #app :is(.o-task-table,.o-dashboard-bottom) .o-text-button {font-weight:600}
html body #app :is(.detail-list,.o-facts) :is(dt,small) {font-size:12px;color:var(--modern-muted)}
html body #app :is(.detail-list dd,.o-facts strong) {font-size:13px;line-height:1.55;overflow-wrap:anywhere}
html body #app .detail-list>div {gap:16px;padding:12px 0;border-color:#edf1f5}
html body #app :is(.empty,.o-empty) {padding:32px 18px;color:var(--modern-muted);font-size:13px;line-height:1.65}
html body #app :is(.empty,.o-empty) svg {color:var(--modern-accent)}
html body #app .notice {border-radius:11px;font-size:12px;line-height:1.55;padding:12px 14px}
html body #app .metric {padding:16px;border:1px solid var(--modern-line);border-radius:14px;box-shadow:var(--modern-shadow)}
html body #app .metric strong {font-size:26px;letter-spacing:-.035em;font-variant-numeric:tabular-nums;color:var(--modern-accent)}
html body #app .metric span {font-size:12px;color:var(--modern-muted)}

/* Forms and actions remain usable with keyboard, touch and zoom. */
html body #app :is(.o-main,.main) :is(.btn,.o-controls button) {
  min-height:38px;padding:9px 13px;border-radius:9px;font-size:12px;line-height:1.4;font-weight:600;
  white-space:normal;max-width:100%;border-color:#dce3ec;
}
html body #app :is(.o-main,.main) :is(.btn,.o-controls button):not(.primary):not(.danger):not(.bright):not(.o-extra-payment):not(.o-muted-button) {
  color:var(--modern-accent);background:#fff;
}
html body #app :is(.o-main,.main) :is(button.primary,.btn.primary) {
  background:var(--modern-accent)!important;border-color:var(--modern-accent)!important;color:#fff!important;
  box-shadow:0 2px 3px #182f4b0b;
}
html body #app :is(.o-main,.main) :is(.btn.link,.btn.o-text-button) {background:transparent;border:0;box-shadow:none;padding:4px 0;min-height:24px}
html body #app :is(.o-main,.main) .btn.danger {color:#a83145;background:#fff4f5;border-color:#eed2d8}
html body #app :is(.o-main,.main) .field label {font-size:12px;font-weight:600;color:#536176;line-height:1.45;margin:0 0 6px}
html body #app :is(.o-main,.main) .field :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=range]),select,textarea),
html body #app :is(.o-main,.main) .combo-trigger {
  min-width:0;max-width:100%;border:1px solid #dce3ec;background:#fff;border-radius:9px;
  font-size:13px;line-height:1.45;min-height:40px;padding:9px 11px;color:var(--modern-ink);caret-color:var(--modern-accent);
}
html body #app :is(.o-main,.main) .field :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=range]),select,textarea):focus {
  border-color:var(--modern-accent);box-shadow:0 0 0 3px var(--modern-soft);
}
html body #app :is(.o-main,.main) .field :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=range]),select,textarea):is([readonly],:disabled) {
  background:#f1f3f6!important;color:#687589!important;border-color:#e1e5eb!important;
}
html body #app :is(input[type=checkbox],input[type=radio]) {accent-color:var(--modern-accent)}
html body #app :is(.actions,.toolbar,.o-controls,.form-footer) {gap:9px;flex-wrap:wrap;min-width:0}
html body #app .form-footer {padding-top:16px;margin-top:20px;border-color:var(--modern-line)}
html body :is(button,a,input,select,textarea,summary,[tabindex]):focus-visible {
  outline:3px solid var(--modern-accent);outline-offset:3px;
}
html body #app .section-tabs {background:#eaf0f5;border:0;border-radius:10px;padding:4px;gap:4px;max-width:100%;overflow:auto}
html body #app .section-tab {border:0;border-radius:7px;background:transparent;color:var(--modern-muted);padding:9px 13px;font-size:12px;font-weight:600}
html body #app .section-tab.active {color:var(--modern-accent);background:#fff;box-shadow:0 1px 4px #17324d0c}

/* Employee Home stays task-focused, with personal attendance and authorized tools. */
html body #app .web-employee-dashboard {margin:0 0 20px;border-radius:18px;background:#fff;border:1px solid var(--modern-line);overflow:hidden;box-shadow:var(--modern-shadow)}
html body #app .web-employee-brand {
  position:sticky;top:0;grid-template-columns:82px minmax(0,1fr);gap:4px 18px;
  background:linear-gradient(112deg,var(--modern-deep),var(--modern-accent));padding:calc(22px - 8px * var(--web-home-collapse,0)) 24px;color:#fff;
}
html body #app .web-employee-brand img {width:calc(74px - 20px * var(--web-home-collapse,0));height:calc(70px - 18px * var(--web-home-collapse,0));object-fit:contain;filter:brightness(0) invert(1)}
html body #app .web-employee-brand h1 {color:#fff;font-size:calc(23px - 3px * var(--web-home-collapse,0))!important;font-weight:650;letter-spacing:-.025em}
html body #app .web-employee-brand p,html body #app .web-employee-brand>div {color:#fff;font-size:12px;opacity:.92}
html body #app .web-employee-grid {padding:20px;gap:12px}
html body #app .web-employee-grid>button {
  border:1px solid var(--modern-line);border-radius:14px;min-height:106px!important;background:#fff;
  color:var(--modern-ink);font-size:13px!important;font-weight:600;gap:10px;padding:14px 10px!important;
  transition:border-color .16s,background-color .16s,box-shadow .16s;
}
html body #app .web-employee-grid>button:hover {background:var(--modern-soft);border-color:var(--modern-accent);box-shadow:0 3px 10px #18344f06}
html body #app .web-employee-symbol {width:38px;height:38px;border-radius:11px;background:var(--modern-soft);color:var(--modern-accent)}
html body #app .o-profile-layout {gap:18px;min-height:0}
html body #app .o-profile-content {padding:20px}
html body #app .o-profile-nav {padding:10px}
html body #app .o-profile-nav .o-nav {font-size:12px;min-height:38px;border:0;background:transparent;color:var(--modern-muted)}
html body #app .o-profile-nav .o-nav.selected {background:var(--modern-soft);color:var(--modern-accent)}
html body #app .profile-edit-page {width:100%;max-width:680px;gap:16px}
html body #app .profile-edit-page .card {border:1px solid var(--modern-line);box-shadow:none;border-radius:14px}
html body #app .profile-edit-page .detail-list>div {grid-template-columns:minmax(90px,.4fr) minmax(0,1fr);align-items:start}

/* Keep protected media and payment flows sized by their own modules. */
html body #app :is(.o-chat-sidebar,.o-chat-room,.chat-shell,.chat-sidebar) {border-color:var(--modern-line);border-radius:14px}
html body #app .o-chat-room {background:#fff}
html body #app :is(.chat-composer,.chat-toolbar,.o-chat-toolbar) {border-color:var(--modern-line)}
html body #app .chat-composer textarea {background:#f6f8fb;border:1px solid var(--modern-line);border-radius:11px;color:var(--modern-ink)}
html body #app .chat-message.mine .chat-body {background:var(--modern-soft);color:var(--modern-ink)}
html body #app .chat-message:not(.mine) .chat-body {background:#fff;color:var(--modern-ink);border-color:var(--modern-line)}
html body dialog:not(.welcome-tour):not(.r42-full-page) {color:var(--modern-ink)}
html body dialog::backdrop {background:#152b455c;backdrop-filter:blur(4px)}

@media(min-width:801px) {
  html body:not(.o-nav-collapsed) #app :is(.o-layout,.layout) {grid-template-columns:220px minmax(0,1fr)}
  html body:not(.o-nav-collapsed) #app .layout>.sidebar {width:220px}
  html body:not(.o-nav-collapsed) #app .o-sidebar :is(.o-nav-label,.o-nav-caption) {display:block}
  html body:not(.o-nav-collapsed) #app .o-sidebar .o-nav {justify-content:flex-start}
  html body.o-nav-collapsed #app .o-layout {grid-template-columns:72px minmax(0,1fr)}
  html body:not(.o-nav-collapsed) #app .triq-portal-header .o-brand {width:220px;flex-basis:220px}
  html body #app .triq-portal-header .triq-header-row {grid-template-columns:minmax(100px,1fr) minmax(160px,280px) auto;gap:14px}
  html body #app .triq-portal-header .triq-header-right {gap:8px}
}
@media(min-width:801px) and (max-width:1120px) {
  html body:not(.o-nav-collapsed) #app :is(.o-layout,.layout) {grid-template-columns:190px minmax(0,1fr)}
  html body:not(.o-nav-collapsed) #app .layout>.sidebar {width:190px}
  html body:not(.o-nav-collapsed) #app .triq-portal-header .o-brand {width:190px;flex-basis:190px}
  html body #app .triq-portal-header .o-company-label {max-width:120px}
  html body #app .triq-portal-header .o-user>span:nth-child(2) {display:none}
  html body #app .triq-portal-header .triq-header-row {grid-template-columns:minmax(100px,1fr) minmax(130px,200px) auto;gap:10px}
  html body #app :is(.o-main,.layout>.main) {padding:18px}
}
@media(min-width:801px) and (max-height:780px) {
  html body #app .o-sidebar {padding-block:10px}
  html body #app .o-sidebar .o-nav {min-height:34px;margin-bottom:2px;padding-block:6px}
  html body #app .o-nav-divider {margin-block:10px}
}
@media(max-width:800px) {
  html body #app :is(.o-main,.layout>.main) {padding:16px!important}
  html body #app :is(.o-sidebar,.layout>.sidebar) :is(.o-nav,.nav-button) {min-height:44px!important;border-radius:10px!important}
  html body #app .triq-portal-header .o-page-title {font-size:14px}
  html body #app :is(.o-main,.main)> .card,html body #app :is(.o-dashboard-bottom,.o-service-grid,.grid,.stack,.business-split)>.card {padding:16px;border-radius:14px;margin-bottom:14px}
  html body #app :is(.o-main,.main) :is(h1,h2) {font-size:20px}
  html body #app :is(.o-main,.main) :is(.btn,.o-controls button) {min-height:44px}
  html body #app :is(.o-main,.main) .field :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=range]),select,textarea),html body #app :is(.o-main,.main) .combo-trigger {min-height:44px;font-size:16px}
  html body #app .o-profile-content {padding:16px}
  html body #app .web-employee-brand {grid-template-columns:64px minmax(0,1fr);padding:calc(18px - 6px * var(--web-home-collapse,0)) 18px;gap:5px 13px}
  html body #app .web-employee-brand img {width:calc(62px - 16px * var(--web-home-collapse,0));height:calc(58px - 14px * var(--web-home-collapse,0))}
  html body #app .web-employee-brand h1 {font-size:calc(20px - 2px * var(--web-home-collapse,0))!important}
  html body #app .web-employee-grid {padding:14px;gap:10px}
  html body #app .web-employee-grid>button {min-height:100px!important;font-size:12px!important}
  html body #app .metric-row {gap:10px}
  html body #app .metric {padding:12px}
  html body #app .metric strong {font-size:23px}
}
@media(max-width:420px) {
  html body #app :is(.o-main,.layout>.main) {padding:12px!important}
  html body #app :is(.o-main,.main)>.card {padding:14px}
  html body #app .web-employee-grid {grid-template-columns:repeat(2,minmax(0,1fr))}
  html body #app .web-employee-brand {padding:calc(16px - 5px * var(--web-home-collapse,0)) 16px;grid-template-columns:54px minmax(0,1fr);gap:4px 10px}
  html body #app .web-employee-brand img {width:calc(52px - 12px * var(--web-home-collapse,0));height:calc(54px - 14px * var(--web-home-collapse,0))}
  html body #app .web-employee-brand h1 {font-size:calc(19px - 2px * var(--web-home-collapse,0))!important}
  html body #app .profile-edit-page .detail-list>div {grid-template-columns:minmax(76px,.35fr) minmax(0,1fr);gap:12px}
  html body #app .page-heading>.actions {width:100%}
}
@media(prefers-reduced-motion:reduce) {
  html body #app :is(.o-nav,.nav-button,.web-employee-grid>button) {transition:none}
  html body dialog::backdrop {backdrop-filter:none}
}
@media(forced-colors:active) {
  html body #app :is(.o-nav.selected,.nav-button.active,.section-tab.active) {outline:2px solid Highlight;outline-offset:-2px}
}

/* Employee identity keeps the current employer and company picker beside the greeting. */
html body #app .web-employee-brand>img {grid-row:auto;align-self:center}
html body #app .web-employee-greeting {min-width:0;display:grid;gap:4px}
html body #app .web-employee-greeting .web-employee-hello {font-size:12px;margin:0;line-height:1.4;color:#fff;opacity:.9}
html body #app .web-employee-greeting h1 {overflow-wrap:anywhere;margin:0!important}
html body #app .web-employee-companyline {display:flex;align-items:center;flex-wrap:wrap;gap:8px 12px;margin-top:4px;min-width:0;font-size:12px}
html body #app .web-employee-company {overflow-wrap:anywhere;line-height:1.45}
html body #app .web-employee-switch {display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;border:1px solid #ffffff70;border-radius:8px;padding:6px 10px;min-height:32px;background:#ffffff15;color:#fff;font:600 11px/1.4 Inter,system-ui;cursor:pointer}
html body #app .web-employee-switch:hover {background:#ffffff28;border-color:#fff}
html body #app .web-employee-switch:focus-visible {outline-color:#fff}
/* Compact preview only: complete notifications stay available in Alerts. */
html body #triq-live-notifications {width:min(360px,calc(100vw - 32px));max-width:calc(100vw - 32px)}
html body .triq-live-notifications .triq-notification-toast {
  display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:4px 10px;
  padding:12px 38px 12px 14px;border:1px solid #dce5ee;border-inline-start:3px solid var(--modern-accent);
  border-radius:12px;background:#fff;color:var(--modern-ink);box-shadow:0 8px 30px #17334e1c;overflow:hidden;
}
html body .triq-live-notifications .triq-notification-toast[hidden] {display:none}
html body .triq-notification-toast>.triq-notification-kind,html body .triq-notification-footer time {display:none}
html body .triq-notification-toast>strong {grid-column:1;grid-row:1;font-size:12px;font-weight:650;line-height:1.4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html body .triq-live-notifications .triq-notification-toast>p {grid-column:1;grid-row:2;margin:0;font-size:12px;line-height:1.45;color:var(--modern-muted);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;max-height:2.9em;overflow:hidden;white-space:normal}
html body .triq-notification-footer {grid-column:2;grid-row:1/3;display:flex;align-items:center;gap:0;margin:0;padding:0;border:0}
html body .triq-notification-footer .triq-notification-open {font-size:11px;line-height:1.3;font-weight:600;min-height:34px;padding:7px 9px;border:0;border-radius:8px;color:var(--modern-accent);background:var(--modern-soft);white-space:normal;max-width:72px}
html body .triq-notification-toast .triq-message-close {top:5px;right:5px;width:28px;height:28px;font-size:21px}
@media(max-width:420px){html body #app .web-employee-switch{min-height:36px}}
