/* TRIQ CRM 2.0.7: a phone workspace, rather than a reduced desktop canvas.
   The outer grid reserves a real row for navigation. Only app-main scrolls;
   neither route content nor a horizontal table can move navigation offscreen. */
.triq-mobile-workspace{display:none}
@media(max-width:760px){
 body:not(.triq-auth){height:var(--triq-visible-height,100dvh);min-height:0;max-height:var(--triq-visible-height,100dvh);overflow:hidden;background:#f3f7fa;color:#18343e;font-size:13px;line-height:1.55}
 body:not(.triq-auth) #app{height:100%;min-height:0;overflow:hidden}
 body .app-shell{display:grid;padding-block-start:var(--triq-safe-top,0px);grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto;width:100%;height:100%;min-height:0;max-height:100%;overflow:hidden;background:#f3f7fa;isolation:isolate}
 body .sidebar{display:none!important}
 body .app-main,body.sidebar-collapsed .app-main,html[dir=rtl] body .app-main{display:block;width:100%;height:100%;min-height:0;max-height:100%;margin:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch;background:#f3f7fa;scroll-padding-block:62px 18px}
 body .topbar{height:54px;min-height:54px;max-height:54px;flex:none;padding:5px 10px;gap:5px;flex-wrap:nowrap;position:sticky;top:0;z-index:40;background:#fff;border-bottom:1px solid #dce7ec;box-shadow:0 2px 9px #193b4910;backdrop-filter:none}
 body .topbar-start{display:none}
 body .dashboard-topbar .topbar-start{display:flex;min-width:0;flex:0 1 100px;gap:0}
 body .dashboard-topbar .topbar-start>.icon-btn,body .dashboard-topbar .topbar-context{display:none}
 body .triq-mobile-workspace{display:flex;align-items:center;gap:5px;min-height:40px;max-width:100%;padding:4px 0;background:transparent;border:0;color:#0b4a45;cursor:pointer;font-size:10px;font-weight:800;white-space:nowrap}
 body .triq-mobile-workspace img{width:25px;height:25px;object-fit:contain;flex:none}
 body .topbar-actions{width:100%;min-width:0;margin:0;gap:3px;justify-content:flex-end;flex-wrap:nowrap}
 body .dashboard-topbar .topbar-actions{width:auto;flex:1}
 body .triq-clock{min-width:68px;margin-inline-end:auto;font-size:8px;color:#5f7883;line-height:1.3;gap:2px;text-align:start}
 body .triq-clock strong{font-size:10px;font-weight:700;color:#214d57}
 body .topbar-actions .search-trigger,body .topbar-actions>.icon-btn,body .topbar-actions>.triq-language-control,body .topbar-actions>.triq-language-label,body .topbar-actions>.new-trigger,body .topbar-actions>.attendance-shortcut{position:relative;inset:auto;display:inline-flex!important;align-items:center;justify-content:center;width:38px!important;min-width:38px!important;max-width:38px;min-height:44px;height:44px;padding:8px;border-radius:11px;flex:0 0 38px;font-size:12px;box-shadow:none;margin:0;border:1px solid transparent;color:#52717e;background:transparent}
 body .topbar-actions .search-trigger svg,body .topbar-actions>.icon-btn svg,body .topbar-actions>.attendance-shortcut svg{width:19px;height:19px;display:block}
 body .topbar-actions>.new-trigger{background:var(--primary,#0b4a45);border-color:var(--primary,#0b4a45);color:var(--primary-contrast,#fff)}
 body .topbar-actions>.attendance-shortcut{background:#eaf7f1;border-color:#cee7db;color:#227557}
 body .topbar-actions>.attendance-shortcut span{display:none}
 body .topbar-actions>.attendance-shortcut i{width:5px;height:5px;position:absolute;top:6px;right:5px;background:#28a06d}
 body .topbar-actions .triq-language-control select{position:absolute;inset:0;width:100%;height:100%;min-height:0;opacity:0;cursor:pointer}
 body .topbar-actions .triq-language-control svg{display:block;width:20px;height:20px}
 body .topbar-actions .search-trigger span,body .topbar-actions .search-trigger kbd,body .topbar-actions .new-trigger span{display:none}
 body .topbar-actions .notifications-btn i{top:7px;right:7px;background:#eaa544;width:5px;height:5px}
 body .app-main>.section-tabs{display:flex;height:46px;min-height:46px;max-height:46px;padding:0 12px;gap:20px;flex:none;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;scroll-snap-type:x proximity;background:#fff;border-bottom:1px solid #dce7ec;position:relative;z-index:2}
 body .app-main>.section-tabs>button{font-size:12px;min-height:46px;height:46px;padding:10px 0;scroll-snap-align:center;color:#657b86}
 body .app-main>.section-tabs>button.active{font-weight:750;color:var(--primary-link,#0b4a45);border-bottom-color:var(--primary,#0b4a45)}
 body .route-pulse{position:absolute;top:53px;height:2px}
 body .page,body .page.record-page{width:100%;max-width:100%;min-height:0;height:auto;margin:0;padding:17px 12px 20px;background:transparent;animation:none;overflow:visible;transform:none}
 body .app-status{display:none!important}
 body .triq-i18n-fallback:not([hidden]){margin:0;padding:6px 12px;background:#fff8e9;font-size:10px}
 body .mobile-nav{position:relative;inset:auto;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));align-items:stretch;justify-content:normal;gap:3px;width:100%;height:auto;min-height:65px;max-height:none;padding:5px 7px calc(5px + var(--triq-safe-bottom));border:0;border-top:1px solid #d6e3e9;background:#fff;box-shadow:0 -3px 13px #1642520a;border-radius:0;z-index:50;flex:none;backdrop-filter:none}
 body .mobile-nav>button{display:flex;width:100%;min-width:0;min-height:54px;height:auto;gap:4px;padding:6px 1px;align-items:center;justify-content:center;border-radius:12px;color:#647b87;font-size:10px;font-weight:650;background:transparent;line-height:1.2}
 body .mobile-nav>button svg{width:21px;height:21px;color:inherit;stroke-width:1.9;flex:none}
 body .mobile-nav>button:nth-child(2){--mobile-tint:#eef3ff;--mobile-ink:#315bc1}
 body .mobile-nav>button:nth-child(3){--mobile-tint:#eaf7f4;--mobile-ink:#087769}
 body .mobile-nav>button:nth-child(4){--mobile-tint:#f1edff;--mobile-ink:#6952b6}
 body .mobile-nav>button.active{background:var(--mobile-tint,var(--primary-soft,#e8f5f0));color:var(--mobile-ink,var(--primary-link,#0b4a45));font-weight:800}
 body .mobile-nav>button.active svg{color:inherit}
 body .page-head{display:flex;align-items:flex-start;gap:12px;margin:0 0 16px}
 body .page-head h1{font-size:24px!important;line-height:1.2;letter-spacing:-.7px;color:#173b46;overflow-wrap:anywhere}
 body .page-head p{font-size:12px!important;line-height:1.65!important;color:#627a84;margin-top:7px;max-width:100%}
 body .page-head .page-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-start;width:100%;margin:0}
 body .page .eyebrow{font-size:10px;letter-spacing:.8px;color:#687f8b}
 body .page :is(.muted,.form-note){color:#667e89}
 body .panel,body .refdash-card{border:1px solid #dce7ec;border-radius:16px;box-shadow:0 2px 6px #183c4b04;background:#fff}
 body .panel-head{padding:14px;gap:9px}
 body .panel-head h2,body .panel-head h3{font-size:15px;color:#244653}
 body .panel-body{padding:15px}
 body .page .btn,body .modal .btn{min-height:44px;font-size:12px;padding:10px 13px;border-radius:10px;line-height:1.45;white-space:normal;text-align:center}
 body .page .btn.primary,body .modal .btn.primary{background:var(--primary,#0b4a45);border-color:var(--primary,#0b4a45);color:var(--primary-contrast,#fff);box-shadow:0 3px 8px #0b4a4514}
 body .page .btn.secondary,body .modal .btn.secondary{border-color:#d4e2ea;background:#fff;color:#294f64}
 body .icon-btn{min-height:42px;min-width:42px;width:42px;height:42px;border-radius:10px}
 body .field input:not([type=checkbox]):not([type=radio]),body .field select,body .field textarea,body .workspace-field input,body .workspace-field select,body .refutil-field input,body .refutil-field select,body .refutil-field textarea{width:100%;min-width:0;max-width:100%;min-height:45px;border-color:#d4e3ec;border-radius:10px;font-size:16px;background:#fbfdff;color:#254957;padding:11px 12px}
 body .field>span,body .workspace-field>span,body .refutil-field>span{font-size:12px;font-weight:650;color:#476675}
 body .field small,body .workspace-field small,body .refutil-field small{font-size:11px;line-height:1.6;color:#70818e}
 body .form-grid,body .refutil-form-grid,body .workspace-grid{grid-template-columns:minmax(0,1fr);gap:16px}
 body .field input[type=checkbox],body .field input[type=radio],body .modal input[type=checkbox],body .modal input[type=radio]{width:19px;height:19px;min-width:19px;min-height:19px;max-height:19px;flex:none;margin:2px 0 0;padding:0;accent-color:var(--primary,#0b4a45)}
 body .checkbox-field,body .detail-inline-check,body .refdash-check{display:flex;flex-direction:row;align-items:flex-start;gap:10px;line-height:1.6}
 body .checkbox-field>span,body .detail-inline-check>span{min-width:0;flex:1}
 body .filterbar{padding:13px;gap:12px;border-radius:16px}
 body .filterbar>.field{min-width:0;max-width:none;flex:1 0 100%}
 body .empty{padding:28px 15px;min-height:0}
 body .empty h3{font-size:15px;color:#355566}
 body .empty p{font-size:12px;line-height:1.7;color:#6b808d;max-width:32em;margin-inline:auto}
 body .empty svg{color:#4e9cbb}
 /* The most-used overview is concise and colorful without suppressing data. */
 body .refdash-page-head{margin-bottom:15px!important}
 body .refdash-page-head p{max-width:100%}
 body .refdash-kpis{gap:8px;margin-bottom:13px}
 body .refdash-kpis>.refdash-card{padding:13px 10px;border-top:3px solid #65b9a0;background:linear-gradient(160deg,#eefaf5,#fff 70%);min-height:113px}
 body .refdash-kpis>.refdash-card:nth-child(2){border-top-color:#659cea;background:linear-gradient(160deg,#eef4ff,#fff 70%)}
 body .refdash-kpis>.refdash-card:nth-child(3){border-top-color:#e1ad50;background:linear-gradient(160deg,#fff6e8,#fff 70%)}
 body .refdash-kpis>.refdash-card>div{font-size:10px;color:#4f6974;gap:5px}
 body .refdash-kpis p{margin-top:9px;gap:3px}
 body .refdash-kpis p>strong{font-size:25px;color:#1c4851}
 body .refdash-kpis p>small{font-size:9px;color:#6b808b;line-height:1.4}
 body .refdash-badge{font-size:9px;border-radius:6px;padding:3px 5px}
 body .refdash-chart-card{padding:15px 13px 0}
 body .refdash-chart-card h2,body .refdash-card h2{font-size:14px;color:#2e5261}
 body .refdash-chart-total{display:flex;align-items:baseline;gap:8px}
 body .refdash-chart-total span{font-size:11px;color:#6d818d}
 body .refdash-line{min-height:135px;height:170px}
 body .refdash-chart-card footer{font-size:9px;gap:8px;padding-block:12px;line-height:1.6}
 body .refdash-chart-card footer .refdash-link{font-size:11px;min-height:35px;white-space:nowrap}
 body .refdash-chart-card footer>span{max-width:58%}
 body .refdash-dashboard .refdash-agenda{max-height:320px;padding:15px 14px 0}
 body .refdash-dashboard .refdash-available{min-height:74px;gap:5px;padding:12px}
 body .refdash-dashboard .refdash-available svg{width:24px;height:24px}
 body .refdash-dashboard .refdash-events{max-height:170px}
 body .refdash-dashboard .refdash-week .refdash-btn{min-height:44px;gap:5px}
 body .refdash-bottom-grid{gap:13px;margin-top:14px}
 body .refdash-bottom-card{padding:15px}
 body .refdash-status-grid button{min-height:74px;border-radius:10px;background:#f7fafc;border-color:#dbe7ed}
 body .refdash-mini-bars{height:104px;margin:14px 0 22px}
 body .refdash-mini-bars>button>div{height:90px}
 body .refdash-caption{font-size:10px;line-height:1.65;color:#718591}
 body .refdash-report-config label select{font-size:16px;min-height:45px}
 body .refdash-report-results>header{flex-wrap:wrap}
 /* Generic record lists become labelled touch cards; matrices retain tables. */
 body .table-wrap:has(>table[data-mobile-card]){overflow:visible;background:transparent;border:0}
 body table.table[data-mobile-card]{display:block;min-width:0!important;width:100%;border:0;background:transparent}
 body table.table[data-mobile-card]>thead{display:none}
 body table.table[data-mobile-card]>tbody{display:grid;gap:10px;padding:10px}
 body table.table[data-mobile-card]>tbody>tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px 13px;padding:14px;border:1px solid #deE8ef;border-radius:12px;background:#fff}
 body table.table[data-mobile-card]>tbody>tr>td{display:block;min-width:0;max-width:none;border:0;padding:0!important;font-size:12px!important;white-space:normal;color:#3b596b}
 body table.table[data-mobile-card]>tbody>tr>td:first-child,body table.table[data-mobile-card]>tbody>tr>td:last-child,body table.table[data-mobile-card] td[colspan]{grid-column:1/-1}
 body table.table[data-mobile-card] td[data-mobile-label]::before{content:attr(data-mobile-label);display:block;margin-bottom:4px;color:#748792;font-size:10px;line-height:1.4;font-weight:550}
 body table.table[data-mobile-card] td .btn{min-height:40px;font-size:12px}
 body .followup-counts{margin-bottom:12px;gap:8px}
 body .followup-count{min-height:75px;flex-basis:109px;min-width:109px;background:#fff;border-radius:12px;padding:11px 12px}
 body .followup-toolbar .search-field input,body .followup-toolbar>.field select,body .followup-toolbar>.field input{font-size:16px;min-height:45px}
 body .followup-actions{max-width:none}
 body .followup-actions .btn{min-height:42px}
 body .workspace-summary{padding:16px!important}
 body .workspace-settings-tabs{margin-bottom:15px}
 body .workspace-permissions{overflow-x:auto}
 body .quick-new-grid{grid-template-columns:minmax(0,1fr);gap:9px}
 body .quick-new-grid>button{min-height:65px;border-radius:12px;background:#f7fafc;border-color:#dde8ee;padding:13px;gap:12px}
 body .quick-new-grid>button>svg:first-child{color:#367da2;background:#e8f3fc;border-radius:10px;width:34px;height:34px;padding:7px}
 body .quick-new-grid>button:nth-child(3n+2)>svg:first-child{color:#277c68;background:#e4f6ee}
 body .quick-new-grid>button:nth-child(3n)>svg:first-child{color:#7b5aba;background:#f0eafc}
 body .quick-new-grid>button strong{font-size:13px;color:#34536b}
 body .quick-new-grid>button small{font-size:11px;line-height:1.6}
 body .refconn-summary{padding:10px 12px;margin-top:14px;border-radius:13px;box-shadow:none;background:#173d49;max-width:100%}
 body .refconn-grid{grid-template-columns:minmax(0,1fr);gap:12px}
 body .refconn-card{border-radius:15px;border-color:#dce6ed}
 body .refconn-card-main{min-height:0;padding:16px}
 body .refconn-card-top{display:flex;align-items:center;min-height:42px;margin-bottom:12px}
 body .refconn-card-top>.refconn-state{margin:0;max-width:55%}
 body .refconn-card-foot{padding:8px 12px;min-height:57px;gap:8px}
 body .refconn-provider{font-size:18px}
 body .refconn-card-foot .refconn-remove,body .refconn-card-foot .refconn-setup{min-width:40px;min-height:40px}
 body .refconn-switch{width:43px;height:25px;padding:3px}
 body .refconn-switch.on>span{transform:translateX(19px)}
 body .refops-section-head,body .refcam-section-head{flex-wrap:wrap;gap:12px}
 body .refops-notices,body .refops-download-grid,body .refops-holidays,body .refcam-grid{grid-template-columns:minmax(0,1fr)}
 body .refops-notice,body .refops-download,body .refops-holiday{border-radius:14px;padding:15px}
 body .refops-notice footer,body .refops-inline,body .refcam-inline{flex-wrap:wrap;gap:9px}
 body .refops-inline select,body .refcam-inline select{font-size:16px;max-width:100%;min-height:44px}
 body .refops-payroll-summary{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:14px}
 body .refops-payroll-summary>.field{grid-column:1/-1}
 body .refops-tabs,body .refcam-tabs{overflow-x:auto;flex-wrap:nowrap;max-width:100%;scrollbar-width:none}
 body .refops-tabs>.btn,body .refcam-tabs>.btn{flex:none;white-space:nowrap;min-height:42px}
 body .calendar-day{min-height:68px;padding:7px 3px}
 body .calendar-day>button{font-size:9px;line-height:1.4}
 body .modal-backdrop{position:fixed;inset:0;padding:0;align-items:stretch;overflow:hidden;background:#173c4d70;backdrop-filter:blur(4px)}
 body .modal,body .modal.search-modal{width:100%;max-width:100%;height:auto;max-height:var(--triq-visible-height,100dvh);min-height:0;border-radius:18px 18px 0 0;align-self:end;border:0;box-shadow:0 -8px 35px #153c4326}
 body .modal-head{min-height:62px;max-height:none;padding:12px 15px;gap:10px;border-bottom:1px solid #e2ebf1;background:#fff;align-items:center;flex:none}
 body .modal-head h2{font-size:19px;line-height:1.3;color:#234654;letter-spacing:-.4px}
 body .modal-head .icon-btn{width:40px;height:40px;min-width:40px;min-height:40px;color:#587b8c;background:#f2f7fa;border:0;border-radius:11px}
 body .modal-body{padding:17px 15px;min-height:0;overflow-y:auto;overscroll-behavior:contain;max-height:none;background:#fff}
 body .modal-footer{padding:12px 15px calc(12px + var(--triq-safe-bottom));background:#fff;border-top:1px solid #dce7ee}
 body .form-actions{display:flex;gap:9px;align-items:center;justify-content:flex-end;flex-wrap:wrap;padding-top:16px}
 body .form-actions>.btn{flex:1 1 auto;min-height:45px}
 body .customer-wizard-modal,body .followup-call-modal{height:var(--triq-visible-height,100dvh);border-radius:0}
 body .customer-wizard-modal>.modal-body{padding:0}
 body .wizard-footer{padding:12px 13px calc(12px + var(--triq-safe-bottom))}
 body .search-modal .modal-body{padding:16px}
 body .global-search{background:#f7fafc;border-radius:12px}
 body .search-result{min-height:64px;padding:11px 7px;border-radius:10px}
 body #toast{bottom:calc(77px + var(--triq-safe-bottom));left:12px;right:12px;width:auto;max-width:none;transform:translateY(12px);font-size:12px;padding:12px 15px;border-radius:12px;background:#173e48;z-index:160}
 body #toast.visible{transform:translateY(0)}
 body .app-main[data-page-route=inbox],body .app-main[data-page-route=team-chat]{display:flex;flex-direction:column;overflow:hidden}
 body .app-main[data-page-route=inbox]>.page,body .app-main[data-page-route=team-chat]>.page{flex:1;min-height:0;overflow:hidden;padding:12px}
 html.triq-keyboard-open body .app-shell{grid-template-rows:minmax(0,1fr) auto}
 html.triq-keyboard-open body .mobile-nav{display:none}
 html.triq-keyboard-open body .page{padding-bottom:14px}
 html.triq-keyboard-open body #toast{bottom:12px}
}
@media(max-width:360px){
 body .topbar{padding-inline:7px;gap:3px}
 body .topbar-actions{gap:1px}
 body .topbar-actions .search-trigger,body .topbar-actions>.icon-btn,body .topbar-actions>.triq-language-control,body .topbar-actions>.triq-language-label,body .topbar-actions>.new-trigger,body .topbar-actions>.attendance-shortcut{width:36px!important;min-width:36px!important;max-width:36px;flex-basis:36px}
 body .triq-mobile-workspace span{font-size:9px}
 body .page-head h1{font-size:22px!important}
 body .refdash-kpis{gap:6px}
 body .refdash-kpis>.refdash-card{padding:11px 8px}
 body .refdash-kpis p>strong{font-size:23px}
 body .mobile-nav>button{font-size:9px}
}
@media(max-width:760px) and (max-height:480px){
 body .topbar{height:47px;min-height:47px;max-height:47px;padding-block:3px}
 body .mobile-nav{min-height:53px;padding-block:3px}
 body .mobile-nav>button{min-height:45px;font-size:9px;gap:2px}
 body .mobile-nav>button svg{width:18px;height:18px}
 body .page{padding-top:12px}
 body .modal{border-radius:0}
}
@media(prefers-reduced-motion:reduce){body .app-main,body .mobile-nav,body #toast{scroll-behavior:auto;transition:none}}
