/* TRIQ CRM 2.3.0: the existing workspace, with a calm shared visual system.
   This file loads last. Native Android owns its system-bar insets; this sheet
   never adds a second status/navigation padding layer. */
:root{
  --triq-header-mint:#e9f7f1;
  --triq-header-sky:#e4effb;
  --triq-header-ink:#0b4b49;
  --triq-design-border:#dce7ec;
  --triq-design-muted:#607782;
  --triq-gradient-delay:0ms;
}
body:not(.triq-auth){background:#f3f7fa;color:#183b45}
body .topbar{
  color:var(--triq-header-ink);
  background-color:var(--triq-header-mint);
  background-image:linear-gradient(90deg,#e9f7f1 0%,#e4effb 50%,#e9f7f1 100%);
  background-size:200% 100%;
  background-repeat:repeat-x;
  animation:triq-soft-mint-flow 18s linear infinite;
  animation-delay:var(--triq-gradient-delay);
  border-bottom-color:#d4e6e5;
  box-shadow:0 2px 8px #17454206;
  isolation:isolate;
}
@keyframes triq-soft-mint-flow{from{background-position:0% 50%}to{background-position:-200% 50%}}
html.triq-motion-paused body .topbar{animation-play-state:paused}
body .topbar :is(.breadcrumb,.breadcrumb strong,.breadcrumb .current,.triq-clock,.triq-clock strong,.triq-mobile-workspace){color:var(--triq-header-ink)}
body .topbar .topbar-actions :is(.icon-btn,.triq-language-control,.triq-language-label,.search-trigger){color:var(--triq-header-ink)}
body .topbar .search-trigger{background:#ffffff70;border-color:#c9dfe3}
body .topbar .topbar-actions>.attendance-shortcut{color:#196957;background:#effaf5;border:1px solid #c6e2d6}
body .topbar .topbar-actions>.new-trigger{background:var(--primary,#0b4a45);border-color:var(--primary,#0b4a45);color:var(--primary-contrast,#fff)}
body .topbar button:focus-visible,body .topbar a:focus-visible{outline:3px solid #238e81;outline-offset:2px}
body .page .btn.primary,body .modal .btn.primary{box-shadow:0 2px 6px #0b4a4514}
body .page .btn.secondary,body .modal .btn.secondary{color:#254f5d;background:#fff;border-color:#cbdde4}
body .page .btn.danger,body .modal .btn.danger{color:#a82f3f;background:#fff2f3;border-color:#edc9cf}
body .page .btn:focus-visible,body .modal .btn:focus-visible{outline:3px solid #218b8066;outline-offset:3px}
body :is(input,select,textarea):focus{border-color:#248a7c;outline:2px solid #248a7c20;outline-offset:1px}
body .field :is(input,select,textarea)[readonly],body .workspace-field input[readonly]{background:#f1f5f6;color:#657b84}
body .page :is(.muted,.form-note),body .modal .muted{color:var(--triq-design-muted)}
body .page .panel,body .page .refdash-card{border-color:var(--triq-design-border)}
/* Keep the three-card dashboard layout and use the approved existing accents. */
body .refdash-kpis>.refdash-card{border-top:3px solid #65b9a0;background:linear-gradient(160deg,#effaf5,#fff 72%)}
body .refdash-kpis>.refdash-card:nth-child(2){border-top-color:#659cea;background:linear-gradient(160deg,#eff5ff,#fff 72%)}
body .refdash-kpis>.refdash-card:nth-child(3){border-top-color:#e1ad50;background:linear-gradient(160deg,#fff7e9,#fff 72%)}
body .refdash-kpis>.refdash-card:hover{border-right-color:#b8d6d0;border-bottom-color:#b8d6d0;border-left-color:#b8d6d0}
body .refdash-kpis p>strong{color:#183f49}
body .refdash-chart-card,body .refdash-agenda{background:#fff}
body .refdash-bottom-card{background:linear-gradient(145deg,#fff,#f8fbfc)}
body .refdash-bottom-card:nth-child(2){background:linear-gradient(145deg,#fff,#f4faf7)}
body .refdash-status-grid button{background:#f6fafb;border-color:#dae7ed}
body .refdash-status-grid button:hover{background:#edf7f4;border-color:#bad8cf}
body .refdash-periods .refdash-btn.active{color:#174f49;border-color:#c8ddd8;background:#f7fcfa}
body .refdash-pipeline-footer{flex-wrap:wrap;row-gap:6px}
body .refdash-card :is(button,a):focus-visible{outline:3px solid #258f8066;outline-offset:3px}
/* Reliable form and checkbox alignment, including nested explanatory text. */
body :is(.checkbox-field,.detail-inline-check,.refdash-check,.refcampaign-check,.workspace-checkbox,.people-check){align-items:flex-start;gap:10px}
body :is(.checkbox-field,.detail-inline-check,.refdash-check,.refcampaign-check,.workspace-checkbox,.people-check) input:is([type=checkbox],[type=radio]){flex:0 0 18px;width:18px;height:18px;min-width:18px;min-height:18px;margin:3px 0 0;accent-color:var(--primary,#0b4a45)}
body .form-grid>*{min-width:0}
body .form-grid .full{grid-column:1/-1}
body .form-grid small{line-height:1.65}
body .workspace-permission{display:flex;align-items:flex-start;gap:10px;color:#486974;font-size:12px;line-height:1.7}
body .workspace-permission input[type=checkbox]{width:18px;height:18px;min-width:18px;min-height:18px;flex:0 0 18px;margin:3px 0 0;accent-color:var(--primary,#0b4a45)}
body .workspace-permission strong{color:#25564f}
body .workspace-permission small{color:#607b78}
body .workspace-result{color:#55737e;background:#f3f9fa;border-color:#d6e6eb}
body .table td{color:#55707d}
body .table td strong{color:#2a5260}
body .table td small{color:#637c89}
/* Employee access uses available desktop space and retains a readable phone form. */
body .crm-employee-access-modal{width:min(1100px,calc(100vw - 40px));max-width:1100px}
body .crm-employee-access-modal .form-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:15px 19px}
body .crm-employee-access-modal .workspace-permissions{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
body .crm-employee-access-modal .workspace-stack{gap:18px}
body .crm-employee-access-modal .modal-body{padding:20px 24px}
body .crm-employee-access-modal .form-actions{position:sticky;bottom:0;z-index:2;background:#fff;padding:14px 0 0;border-top:1px solid #e2ebee;align-items:center}
body .crm-employee-transfer-modal{width:min(670px,calc(100vw - 32px))}
body .crm-employee-transfer-modal .workspace-result{background:#eff8f4;border-color:#cbe2d8}
body .crm-employee-transfer-modal :is(dl,ul){margin-block:12px;line-height:1.8}
/* Filter controls remain compact; large datasets still paginate in the API. */
body .customer-filter-options{display:grid;grid-template-columns:repeat(auto-fit,minmax(155px,1fr));gap:12px;align-items:end;padding:14px 16px;border-top:1px solid #e4ecf0;background:#f8fbfc;min-width:0;flex:1 1 100%;width:100%}
body .customer-filter-options:not(.expanded)>.field:nth-child(n+4){display:none}
body .customer-screen .filterbar>.search-field{min-width:0;max-width:100%}
body .customer-screen .filterbar>.search-field input{flex:1 1 0;width:0;min-width:0;padding-inline-start:32px;padding-inline-end:8px}
body .customer-screen .filterbar>.search-field>svg{inset-inline-start:10px;inset-inline-end:auto}
body .customer-filter-options .field{max-width:none;min-width:0;margin:0}
body .customer-filter-options :is(input,select){width:100%;max-width:100%}
body .customer-active-filters{display:flex;align-items:center;gap:7px;flex-wrap:wrap;padding:10px 16px;color:#56717e;font-size:11px;min-width:0}
body .customer-active-filters:empty{display:none}
body .customer-active-filters :is(.badge,.filter-chip,button){max-width:100%;white-space:normal;overflow-wrap:anywhere}
body .customer-active-filters button{border:1px solid #cde1dc;border-radius:18px;background:#edf7f3;color:#255f54;padding:5px 9px;font:inherit}
/* Team activity: summaries, comparison, then a detailed source-linked timeline. */
body .triq-team-activity{display:grid;gap:17px}
body .team-activity-filters{display:flex;align-items:end;gap:11px;flex-wrap:wrap;background:#f8fbfc;border:1px solid #dae6eb;border-radius:13px;padding:14px}
body .team-activity-filters .field{flex:1 1 135px;min-width:0;max-width:none;margin:0}
body .team-activity-filters .field:first-child{flex-basis:180px}
body .team-activity-filters :is(select,input){max-width:100%;width:100%}
body .team-activity-kpis{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px}
body .team-activity-kpis> :is(article,div,button,.panel){min-width:0;border:1px solid #d6e7df;background:#f0f9f4;border-radius:12px;padding:15px}
body .team-activity-kpis>:nth-child(2){background:#f0f5fd;border-color:#d4e1f4}
body .team-activity-kpis>:nth-child(3){background:#fff8eb;border-color:#ede0c4}
body .team-activity-kpis>:nth-child(4){background:#f6f2fd;border-color:#e2daf0}
body .team-activity-kpis>:nth-child(5){background:#eef8fa;border-color:#cfe5e9}
body .team-activity-kpis strong{display:block;color:#244b54;font-size:25px;line-height:1.4;overflow-wrap:anywhere}
body .team-activity-kpis :is(small,span){font-size:11px;line-height:1.6;color:#5c7481}
body .team-activity-comparison{min-width:0;max-width:100%;overflow-x:auto;overscroll-behavior-x:contain;border:1px solid #dce7ec;border-radius:13px;background:#fff}
body .team-activity-comparison table{min-width:650px;width:100%}
body .team-activity-comparison :is(th,td){font-variant-numeric:tabular-nums}
body .team-activity-comparison td>small{display:block;margin-top:4px;color:#607782;font-size:11px;line-height:1.6}
body .team-activity-comparison .tag-list{display:flex;gap:5px;flex-wrap:wrap;margin-top:7px;max-width:240px}
body .team-activity-comparison .tag-list>.badge{min-height:27px;font-size:10px;padding:4px 7px;text-align:start;white-space:normal}
body .team-activity-bar{height:6px;max-width:200px;min-width:80px;background:#edf4f5;border-radius:8px;overflow:hidden;margin-top:5px}
body .team-activity-bar>i{display:block;height:6px;background:linear-gradient(90deg,#4e9a88,#7ba8ca);border-radius:8px}
body .team-activity-filters>.tabs{margin:0;gap:3px;flex:none;border:0;border-radius:9px;background:#edf3f4;padding:3px;align-self:end}
body .team-activity-filters>.tabs>button{margin:0;min-height:34px;padding:7px 11px;border:0;border-radius:6px;white-space:nowrap;color:#59737d}
body .team-activity-filters>.tabs>button.active{background:#fff;color:#155b50;box-shadow:0 1px 4px #1e514711}
body .team-activity-custom{font-size:12px;color:#38626b;line-height:1.7}
body .team-activity-custom>summary{cursor:pointer;min-height:34px;display:list-item;padding:6px 0}
body .team-activity-custom[open]{flex-basis:100%;padding:12px;border-top:1px solid #dce7eb}
body .team-activity-custom .form-grid{margin:8px 0 12px;max-width:550px}
body .team-activity-timeline{display:grid;gap:10px;min-width:0}
body .team-activity-event{padding:15px 17px;border:1px solid #dce7ec;border-inline-start:3px solid #7dbdad;border-radius:11px;background:#fff;min-width:0;overflow-wrap:anywhere}
body .team-activity-event-meta{display:flex;flex-wrap:wrap;gap:5px 12px;color:#637d89;font-size:11px;line-height:1.6;margin:5px 0}
body .team-activity-event strong{color:#2a515c}
body .team-activity-timeline .team-activity-event{margin-inline:14px}
body .team-activity-event p{font-size:12px;line-height:1.7;margin:6px 0;color:#5a7480}
body .team-activity-event h3{font-size:14px;line-height:1.55;color:#254f5a}
body .team-activity-pager{display:flex;align-items:center;justify-content:space-between;gap:9px;flex-wrap:wrap;font-size:12px;color:#657c87;padding:9px 0}
body .team-activity-pager .form-actions{padding:0;margin:0}
/* Practical campaign wizard with explicit rules, review and sending plan. */
body .refcampaign-modal{width:min(1000px,calc(100vw - 40px));max-width:1000px}
body .refcampaign-steps{gap:9px;overflow-x:auto;scrollbar-width:thin}
body .refcampaign-steps>span{flex:0 0 auto;white-space:nowrap}
body .campaign-filter-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;align-items:end;margin-block:14px;min-width:0}
body .campaign-filter-grid .field{margin:0;min-width:0;max-width:none}
body .campaign-filter-grid :is(input,select){max-width:100%;width:100%}
body .campaign-audience-tools,body .campaign-pagination{display:flex;align-items:center;gap:9px;justify-content:space-between;flex-wrap:wrap;font-size:12px;color:#5d7781}
body .campaign-audience-tools .btn,body .campaign-pagination .btn{white-space:normal}
body .campaign-approval{padding:14px 16px;border:1px solid #caddf0;border-radius:11px;background:#eef5fd;color:#305b76;line-height:1.7}
body .campaign-approval strong{color:#244e69}
body .campaign-rule-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px;min-width:0}
body .campaign-rule-grid> :is(section,article,div,fieldset){min-width:0;border:1px solid #dbe7ec;background:#f8fbfc;border-radius:11px;padding:14px}
body .campaign-rule-grid label:has(>input[type=checkbox]){display:flex;align-items:flex-start;gap:10px;line-height:1.65}
body .campaign-rule-grid input[type=checkbox]{width:18px;height:18px;flex:0 0 18px;min-height:18px;margin:3px 0 0;accent-color:var(--primary,#0b4a45)}
body .campaign-schedule-preview{padding:13px 15px;background:#eff8f4;border:1px solid #d2e6db;border-radius:10px;line-height:1.75;color:#355e51;overflow-wrap:anywhere}
body .campaign-review-note{font-size:12px;line-height:1.7;color:#607780;white-space:pre-wrap;overflow-wrap:anywhere}
body .campaign-history{display:grid;gap:10px;padding:0;list-style:none}
body .campaign-history> :is(li,article,div){border-inline-start:2px solid #bad8cf;padding:7px 0 7px 13px;font-size:12px;line-height:1.7;overflow-wrap:anywhere}
body .refcampaign-audience{scrollbar-gutter:stable;max-height:310px}
body .refcampaign-audience>label{align-items:flex-start}
body .refcampaign-audience>label input{margin-top:4px;flex:none}
body .refcampaign-audience>label:has(input:checked){background:#edf8f3}
body .refcampaign-audience :is(strong,small){overflow-wrap:anywhere}
body .refcampaign-summary>.panel{border-top:3px solid #71bda5;background:linear-gradient(160deg,#f1faf6,#fff 65%)}
body .refcampaign-summary>.panel:nth-child(2){border-top-color:#78a7dc;background:linear-gradient(160deg,#f1f6fe,#fff 65%)}
body .refcampaign-summary>.panel:nth-child(3){border-top-color:#e1b560;background:linear-gradient(160deg,#fff8eb,#fff 65%)}
body .refcampaign-summary>.panel:nth-child(4){border-top-color:#a68ccf;background:linear-gradient(160deg,#f7f3fd,#fff 65%)}
body .refcampaign-wizard .form-actions{position:sticky;bottom:0;background:#fff;border-top:1px solid #e2ebee;padding-top:13px;z-index:2}
/* Download cards and profile photos retain clear boundaries without extra chrome. */
body .refops-download{border-top:3px solid #82b5d2;background:linear-gradient(160deg,#f4f9fd,#fff 60%)}
body .refops-download:nth-child(3n+2){border-top-color:#7abca6}
body .refops-download:nth-child(3n){border-top-color:#b9a0d5}
body .crm-download-filters{display:flex;align-items:end;gap:12px;flex-wrap:wrap;padding:14px 16px;margin-bottom:16px;border:1px solid #dce7ec;border-radius:12px;background:#f8fbfc}
body .crm-download-filters .field{flex:1 1 175px;max-width:none;min-width:0;margin:0}
body .crm-download-filters .field:first-child{flex-grow:2}
body .crm-download-filters :is(input,select){width:100%;max-width:100%}
body .crm-download-filters .btn{min-height:37px}
body .crm-profile-photo-area{padding:14px;border:1px solid #dce9e4;border-radius:14px;background:#f4faf7}
body .crm-profile-photo-button .avatar{border:1px solid #c8ded5;background:#e2f2e9}
body .crm-profile-footer{position:sticky;bottom:0;background:#fff;z-index:2}
@media(min-width:761px) and (max-width:1100px){
  body .crm-employee-access-modal .form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  body .campaign-filter-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  body .team-activity-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:760px){
  html,body:not(.triq-auth){background:#fff}
  body.triq-auth .portal-brand-panel{background-color:var(--triq-header-mint);background-image:linear-gradient(90deg,#e9f7f1 0%,#e4effb 50%,#e9f7f1 100%);background-size:200% 100%;background-repeat:repeat-x;animation:triq-soft-mint-flow 18s linear infinite;animation-delay:var(--triq-gradient-delay);border-bottom-color:#d3e6e5}
  html.triq-motion-paused body.triq-auth .portal-brand-panel{animation-play-state:paused}
  body .app-shell,body .app-main{background:#f3f7fa}
  body .topbar{border-bottom-color:#d3e6e5;backdrop-filter:none}
  body .topbar .search-trigger{background:transparent;border-color:transparent}
  body .topbar .topbar-actions :is(.icon-btn,.triq-language-control,.triq-language-label,.search-trigger){color:var(--triq-header-ink)}
  body .topbar .topbar-actions>.attendance-shortcut{color:#196957;background:#edf9f3;border-color:#c5e2d7}
  body .mobile-nav{background:#fff;border-top-color:#dbe7eb;box-shadow:0 -2px 8px #184b4705}
  body .mobile-nav>button{color:#5f7782}
  body .mobile-nav>button.active{background:#e9f4ef;color:#0b5a50}
  body .crm-employee-access-modal,body .crm-employee-transfer-modal{width:100%;max-width:100%;max-height:var(--triq-visible-height,100dvh)}
  body .crm-employee-access-modal .modal-body{padding:16px}
  body .crm-employee-access-modal .form-grid,body .crm-employee-access-modal .workspace-permissions{grid-template-columns:minmax(0,1fr);gap:15px}
  body .crm-employee-access-modal .form-actions{padding-bottom:4px}
  body .customer-filter-options{grid-template-columns:repeat(2,minmax(0,1fr));gap:11px;padding:13px}
  body .customer-filter-options .field{flex:none}
  body .customer-filter-options :is(input,select){font-size:16px;min-height:44px}
  body .customer-screen .filterbar>.search-field input{font-size:16px;min-height:44px;padding-inline-start:30px;padding-inline-end:7px}
  body .customer-active-filters{padding:9px 13px;font-size:11px;gap:6px}
  body .customer-active-filters button{min-height:35px;padding:6px 9px}
  body .team-activity-filters{padding:12px;gap:11px}
  body .team-activity-filters .field{flex-basis:calc(50% - 11px)}
  body .team-activity-filters .field:first-child{flex-basis:100%}
  body .team-activity-filters :is(select,input){font-size:16px;min-height:44px}
  body .team-activity-kpis{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
  body .team-activity-kpis> :is(article,div,button,.panel){padding:12px}
  body .team-activity-kpis strong{font-size:24px}
  body .team-activity-kpis>:last-child:nth-child(odd){grid-column:1/-1}
  body .team-activity-filters>.tabs{width:100%}
  body .team-activity-filters>.tabs>button{min-height:42px;flex:1;justify-content:center}
  body .team-activity-event{padding:13px;border-radius:12px}
  body .team-activity-timeline .team-activity-event{margin-inline:10px}
  body .team-activity-comparison .tag-list>.badge{min-height:35px;font-size:11px}
  body .team-activity-event-meta{font-size:11px}
  body .team-activity-pager .btn{min-height:44px}
  body .refcampaign-modal{width:100%;max-width:100%;height:var(--triq-visible-height,100dvh);max-height:var(--triq-visible-height,100dvh);border-radius:0}
  body .refcampaign-modal .modal-body{padding:15px;scroll-padding-block-end:70px}
  body .refcampaign-steps{display:flex;flex-wrap:nowrap;justify-content:flex-start;gap:10px;padding-bottom:12px;scroll-snap-type:x proximity}
  body .refcampaign-steps>span{flex:0 0 auto;flex-direction:row;font-size:11px;gap:6px;scroll-snap-align:center}
  body .refcampaign-steps b{width:24px;height:24px;flex:none}
  body .campaign-filter-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}
  body .campaign-rule-grid{grid-template-columns:minmax(0,1fr)}
  body .campaign-filter-grid :is(input,select){font-size:16px;min-height:44px}
  body .campaign-audience-tools,body .campaign-pagination{font-size:11px;gap:8px}
  body .campaign-audience-tools>.btn,body .campaign-pagination>.btn{min-height:40px}
  body .campaign-approval,body .campaign-schedule-preview{padding:12px;font-size:12px}
  body .refcampaign-audience{max-height:34dvh;min-height:120px}
  body .refcampaign-audience>label{padding:12px 11px;gap:10px}
  body .refcampaign-audience strong{font-size:12px}
  body .refcampaign-audience small{font-size:11px;line-height:1.6}
  body .refcampaign-wizard .form-actions{flex-wrap:wrap;padding-block:12px 4px;gap:9px}
  body .refcampaign-wizard .form-actions .btn{min-height:44px}
  body .crm-profile-photo-area{padding:12px}
  body .crm-profile-photo-area strong{font-size:15px}
  body .crm-download-filters{padding:12px;gap:11px}
  body .crm-download-filters .field{flex-basis:100%}
  body .crm-download-filters :is(input,select){font-size:16px;min-height:44px}
  body .crm-download-filters .btn{min-height:44px}
}
@media(max-width:360px){
  body .customer-filter-options,body .campaign-filter-grid{grid-template-columns:minmax(0,1fr)}
  body .team-activity-filters .field{flex-basis:100%}
}
@media(prefers-reduced-motion:reduce){
  body .topbar{animation:none;background-position:0% 50%}
  body.triq-auth .portal-brand-panel{animation:none;background-position:0% 50%}
  body :is(.btn,.refdash-btn,.refdash-card){transition:none}
}
/* Data arriving must never dim or translate the entire screen a second time. */
body .page,body.triq-auth .portal-card{animation:none;opacity:1;transform:none}
body .route-pulse{display:none;animation:none}
@media(forced-colors:active){body .topbar,body .refdash-kpis>.refdash-card,body .team-activity-kpis>*{background:Canvas;color:CanvasText;border:1px solid CanvasText}body .mobile-nav>button.active{outline:2px solid Highlight}}
@media(min-width:901px){.app-main>.topbar{background:white!important;background-image:none!important;padding-inline-start:clamp(18px,2.5vw,48px)}.topbar .topbar-context{font-size:1.14rem;font-weight:750;color:#103c39}.sidebar .triq-brand-lockup{image-rendering:auto;transform:none}}
.crm-team-graph,.crm-stage-chart,.crm-opps,.crm-drill{padding:16px}.crm-stage-chart button,.crm-team-graph button{display:grid;grid-template-columns:minmax(80px,1fr) 3fr 54px;gap:12px;align-items:center;width:100%;border:0;background:white;text-align:left;padding:8px;color:inherit}.crm-stage-chart button[aria-pressed=true]{background:#e8f5ef}.crm-stage-chart i,.crm-team-graph i{height:12px;border-radius:3px;background:var(--bar,#288679)}.crm-opps>strong{margin-inline-start:18px}.crm-opps select{padding:6px}.crm-drill article{display:flex;align-items:center;justify-content:space-between;gap:14px;border-bottom:1px solid #dce7e4;padding:10px 0}.crm-drill small{display:block}.team-activity-kpis button.stat{text-align:start;cursor:pointer;color:inherit}.people-attendance .tabs .btn.primary{background:#07554f!important;color:white!important}.people-attendance .tabs .btn.ghost{color:#175887;background:#edf5fd}.people-attendance .workspace-inline{align-items:end;flex-wrap:wrap}.refdash-report .refdash-toolbar{margin:0;padding:0;border:0}.crm-team-graph button:focus-visible,.crm-stage-chart button:focus-visible{outline:2px solid #087c72}
.crm-template-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(250px,100%),1fr));gap:16px;padding:16px}.crm-template-grid form{display:grid;align-content:start;gap:10px;border:1px solid #dce8e3;border-radius:10px;padding:16px}.crm-template-grid h3,.crm-template-grid p{margin:0}.crm-template-grid input[type=number]{width:64px;padding:5px}.crm-template-grid button{justify-self:start}
body .triq-brand .triq-brand-lockup{object-fit:contain}

.phone-filters,.employee-detail-toggle{display:none}
.device-settings{display:grid;padding:4px 14px;margin-top:14px}
.device-settings button{display:flex;align-items:center;justify-content:space-between;gap:12px;text-align:start;padding:12px 0;border:0;background:transparent;color:inherit}
.device-settings button+button{border-top:1px solid var(--line)}
.device-settings small,.peer-meta time{display:block;color:var(--muted)}
.chat-date{align-self:center;font-size:11px;color:#4a6966;padding:4px 10px;border-radius:12px;background:#eef4f1}
.peer-meta{margin-inline-start:auto;text-align:end;font-size:10px;flex:none}
.peer-meta b{background:#0b5952;color:#fff;border-radius:20px;padding:2px 7px}
.profile-account-actions summary{cursor:pointer;font-weight:600;padding:8px 0}
@media(min-width:761px){.profile-account-actions:not([open])>summary{display:list-item}}
@media(max-width:760px){
  body .app-main .page{padding:10px 12px 16px}
  body .page .page-head{display:flex;flex-flow:row wrap;align-items:center;justify-content:space-between;gap:6px 10px;margin:0 0 10px;padding:0}
  body .page .page-head h1{font-size:21px;line-height:1.22;margin:0}
  body .page .page-head .eyebrow{margin:0 0 3px}
  body .page .page-head p,.refops-section-head p,.refutil-chat-start>p{display:none}
  body .page :is(.panel,.stat){margin-block-end:8px}
  body .page :is(.panel-head,.panel-body){padding:10px 12px;gap:8px}
  body .page :is(.btn,.tabs button),body .modal .btn{min-height:40px;padding:7px 11px;line-height:1.25}
  body .page :is(.field,.refutil-field){gap:4px;min-width:0}
  body .page .field :is(select,input),body .modal .crm-profile-field :is(select,input){min-height:40px;padding:7px 9px}
  body .page :is(.summary-grid,.workspace-summary,.people-stats,.followup-counts){gap:6px;margin:8px 0;padding:0}
  body .page :is(.summary-grid,.workspace-summary,.people-stats,.followup-counts)>*{
    --edge:#73b7a3;--wash:#eff9f5;border:1px solid #d9e6e3;border-top:3px solid var(--edge);
    border-radius:12px;background:linear-gradient(145deg,var(--wash),#fff 85%);padding:8px 10px!important;min-height:0!important;margin:0
  }
  body .page :is(.summary-grid,.workspace-summary,.people-stats,.followup-counts)>:nth-child(4n+2){--edge:#7fa7d2;--wash:#f0f6fc}
  body .page :is(.summary-grid,.workspace-summary,.people-stats,.followup-counts)>:nth-child(4n+3){--edge:#dab366;--wash:#fff8ec}
  body .page :is(.summary-grid,.workspace-summary,.people-stats,.followup-counts)>:nth-child(4n){--edge:#aa96c9;--wash:#f6f3fb}
  body .page :is(.stat,.followup-count,.people-stats>div) strong{margin:3px 0;font-size:18px}
  body .topbar .topbar-actions{align-items:center;gap:2px}
  body .topbar .topbar-actions>:is(button,.triq-language-control),body .topbar .triq-language-control>.triq-language-trigger{
    box-sizing:border-box;display:inline-grid!important;place-items:center;width:40px!important;height:40px!important;min-width:40px!important;min-height:40px!important;
    max-width:40px!important;padding:0!important;margin:0!important;flex:0 0 40px;border-radius:10px
  }
  body .topbar .triq-language-control{position:relative}
  body .topbar .topbar-actions svg{width:19px;height:19px;display:block}
  body .topbar .topbar-actions>button i{top:5px;right:5px}
  body .topbar .triq-mobile-workspace,body .topbar-start{background:transparent!important}
  body .app-main .topbar{background-size:200% 100%!important;background-image:linear-gradient(90deg,#e9f7f1,#e4effb,#e9f7f1)!important}
  body .page .phone-filters{display:inline-flex;align-items:center;justify-content:center}
  body .page .team-activity-filters{display:grid!important;grid-template-columns:minmax(0,1fr) auto;gap:8px;padding:10px}
  .team-activity-filters>.tabs{grid-column:1/-1}
  .team-activity-filters .phone-filters{align-self:end}
  body .page .team-activity-filters:not(.filters-open)>.phone-filters~*{display:none!important}
  body .triq-team-activity>section.panel>p.muted{padding:5px 10px;margin:0;font-size:11px;overflow-wrap:anywhere}
  body .page .followup-counts{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(55px,1fr));overflow:visible}
  body .page .followup-counts>.panel{width:auto;min-width:0;padding:8px 4px!important;text-align:center}
  body .page .followup-count span{font-size:10px}
  body .page .followup-toolbar{padding:9px;display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
  .followup-toolbar>.field:first-of-type{grid-column:1/-1;grid-row:1}
  .followup-toolbar .search-field input{padding-inline-start:30px!important}
  body .page .followup-toolbar:not(.filters-open)>.field~.field,body .page .followup-toolbar:not(.filters-open)>[data-action$="clear"]{display:none!important}
  body .page .people-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
  body .page .workspace-list-row{padding:7px 0;gap:9px}
  .workspace-list-row>div>small{display:block}
  body [data-page-route=team] .workspace-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}
  body [data-page-route=team] .workspace-summary .stat>small{display:none}
  body .page tr.employee-access-row:not(.expanded)>td:not(:first-child),body .page tr.employee-access-row:not(.expanded)>td:first-child>.workspace-inline{display:none!important}
  .employee-access-row>td:first-child:before{display:none}
  .employee-detail-toggle{border:0;background:transparent;display:flex;align-items:center;gap:8px;text-align:start;width:100%;padding:3px}
  .employee-detail-toggle span:nth-child(2){min-width:0;flex:1}.employee-detail-toggle small{display:block}
  .employee-access-row:not(.expanded)>td:first-child{grid-column:1/-1}
  body .refops-review-card{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:3px 8px;padding:10px 12px}
  body .refops-review-card>:is(h3,p,small){grid-column:1;margin:0}
  body .refops-review-card>.btn{grid-column:2;grid-row:1/4;align-self:center}
  [hidden].page-actions{display:none!important}
  body .refutil-security-grid,.refutil-stack{gap:10px}
  body .refutil-switch-row{align-items:center;padding-block:6px}
  body .refops-payroll-summary{padding:10px;gap:8px}
  body .crm-profile-modal .crm-profile-editor{gap:10px}
  body .crm-profile-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .crm-profile-grid>.crm-profile-full,.crm-profile-grid>.crm-profile-field:has(input[type=email]){grid-column:1/-1}
  body .crm-profile-photo-button .avatar{width:56px;height:56px;border-radius:14px;font-size:19px}
  body .crm-profile-footer{position:static!important;gap:5px;padding-top:6px}
  .crm-profile-form fieldset>.form-actions{position:sticky;bottom:0;z-index:1;background:white;margin-bottom:0}
  body .refutil-chat-screen .page-head,body .refutil-chat-list-head{display:none!important}
  body .app-main[data-page-route=team-chat]>.page{padding:0!important}
  body .refutil-chat-screen .refutil-chat{border:0;border-radius:0!important;box-shadow:none}
  body .refutil-chat-screen .refutil-chat-search{margin:8px 12px;min-height:40px}
  body .refutil-chat-screen .refutil-peer-list{gap:0;padding:0 10px}
  body .refutil-chat-screen .refutil-peer{min-height:55px;border:0!important;border-bottom:1px solid #edf1f1!important;border-radius:0;padding:7px 4px;gap:9px}
  .refutil-chat-screen .refutil-peer>span:nth-child(2){flex:1;min-width:0;overflow:hidden}
  .refutil-chat-screen .refutil-peer>span:nth-child(2)>small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  body .refutil-chat-screen .avatar{border-radius:50%!important}
  .refutil-thread-stream>.refutil-chat-message{align-self:flex-start}.refutil-thread-stream>.refutil-chat-message.mine{align-self:flex-end}
  body .refutil-chat-screen .refutil-message-composer{position:relative;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;padding:8px!important}
  body .refutil-chat-screen .refutil-composer-body{display:grid;grid-template-columns:40px minmax(0,1fr);align-items:end;gap:5px}
  body .refutil-chat-screen .refutil-message-composer textarea{grid-column:2;height:42px;min-height:42px;grid-row:1;padding:9px}
  body .refutil-chat-screen .refutil-chat-file-row{display:contents}
  .refutil-chat-file-row label{grid-column:1;grid-row:1;justify-content:center}
  .refutil-chat-file-row label>span,.refutil-chat-file-row small:empty{display:none}
  .refutil-chat-file-row small,.refutil-composer-body>p,.refutil-composer-body>small{grid-column:1/-1}
  body .refutil-chat-screen .refutil-message-composer>.btn{margin:0;min-height:42px;height:42px;align-self:start}
  /* Keep the workspace header and composer inside the visible keyboard viewport. */
  body .app-shell:has(.refutil-chat.is-thread-open) {
    position: fixed;
    inset-inline: 0;
    top: var(--triq-viewport-top, 0px);
    grid-template-rows: minmax(0, 1fr);
  }
  body .app-shell:has(.refutil-chat.is-thread-open) :is(.mobile-nav,.section-tabs,.module-tabs,.app-status){display:none!important}
  body .quick-new-grid>button{min-height:45px;padding:8px 10px;margin:0}
}
@media(max-width:760px){
  body .dashboard-topbar .triq-mobile-workspace img{width:clamp(70px,19vw,94px);height:auto;max-height:32px;object-fit:contain}
  body .people-attendance .panel-head:has([data-people-month])>.workspace-inline{display:flex;align-items:end;flex-wrap:wrap;gap:3px;width:100%}
  body .people-attendance .panel-head:has([data-people-month]) .field{flex:1;min-width:118px}
  body .people-attendance [data-action=people-month]{padding:5px;min-width:25px}
  body [data-page-route=work] .panel-head .workspace-inline:has([data-people-work-user]){display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);width:100%;gap:7px}
  body [data-page-route=work] .workspace-list-row .btn{flex-shrink:0}
  body [data-page-route=payroll] .refops-payroll-summary:has(~.salary-periods)>.field{display:none}
  body [data-page-route=payroll] .refops-payroll-summary small{display:block}
  body .page .salary-periods{margin:6px 0!important;align-items:end}
  body .page .salary-periods label{flex:1}
  body [data-page-route=payroll] .table[data-mobile-card] tr{padding:10px;gap:6px 10px}
  body .page .refutil-security-grid .panel-head p{margin:2px 0}
  body .page .followup-toolbar .phone-filters small,.phone-filters small{margin-inline-start:4px}
}

/* Home keeps its desktop clock alongside the heading and its phone clock beside search. */
.topbar .topbar-actions .phone-home-clock{display:none!important;}
@media(max-width:850px){
 body .dashboard-topbar .topbar-actions time.phone-home-clock{display:flex!important;flex-direction:column;align-items:flex-end;justify-content:center;gap:2px;white-space:nowrap;line-height:1.1;margin-inline-end:3px;}
 body .phone-home-clock span{font-size:9px;}body .phone-home-clock strong{font-size:11px;}
 body .page-head .triq-dashboard-clock{display:none!important;}
}

.crm-employee-access-modal form[hidden] { display: none !important; }
.crm-owner-access-action { display: flex; justify-content: flex-start; }
.crm-owner-confirm { max-width: 44rem; margin-inline: auto; }
.crm-owner-confirm h3, .crm-owner-confirm p { margin: 0; }
.crm-owner-target { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,12rem),1fr)); gap: .8rem 1.25rem; margin: 0; }
.crm-owner-target dt { font-size: .85em; color: var(--crm-secondary); }
.crm-owner-target dd { margin: .25rem 0 0; font-weight: 600; overflow-wrap: anywhere; }
