/* INTEGRA SERVICES R12: compact, accessible full-page workspaces and charts. */
#app .topright{gap:8px!important;flex-wrap:wrap;align-items:center}
#app .topright .r12-top-offers{background:#e9f7f1;color:#0b6e56;border:1px solid #a9dbc9;font-weight:850;white-space:nowrap}
#app .topright .r12-top-offers:hover{background:#d6f2e6}
#integraQuickBillingSide{display:none!important}
#app .nav a.integra-offer-action, #app #nav .integra-offer-action{display:none!important}
/* Modals are now dedicated in-app full pages. Existing form IDs and save handlers remain intact. */
#modalbg.r12-workspace-page{position:fixed!important;inset:0!important;z-index:90000!important;padding:0!important;display:block!important;overflow:auto!important;align-items:stretch!important;background:#f0f5fa!important;backdrop-filter:none!important}
#modalbg.r12-workspace-page.hidden{display:none!important}
#modalbg.r12-workspace-page>.modal{display:flex!important;flex-direction:column!important;width:100%!important;max-width:none!important;min-height:100dvh!important;max-height:none!important;border-radius:0!important;box-shadow:none!important;background:#f7fafe!important;border:0!important}
#modalbg.r12-workspace-page .modalhead{position:sticky!important;top:0!important;z-index:3!important;padding:15px clamp(16px,4vw,46px)!important;background:linear-gradient(125deg,#e3f5ef,#e5f1ff)!important;border-bottom:1px solid #c8d8e8!important;font-size:19px!important}
#modalbg.r12-workspace-page .modalbody{flex:1;overflow:visible!important;max-width:1500px;width:100%;margin:0 auto;padding:clamp(15px,3vw,34px)!important;font-size:13px!important}
#modalbg.r12-workspace-page .modalfoot{position:sticky!important;bottom:0!important;background:#fff!important;border-top:1px solid #d9e4f2!important;padding:14px clamp(15px,3vw,34px)!important}
#modalbg.r12-workspace-page .modalhead .btn{min-width:110px}
#modalbg.r12-workspace-page .modalhead .btn::before{content:'← Back  ';font-size:13px}
#modalbg.r12-workspace-page .modalbody .formgrid{gap:16px!important}
#modalbg.r12-workspace-page .modalbody input,#modalbg.r12-workspace-page .modalbody select{min-height:40px}
body.r12-workspace-active{overflow:hidden!important}
/* Announcement CMS is a page rather than a floating dialog. */
.ng-overlay{position:fixed!important;inset:0!important;z-index:92000!important;display:block!important;overflow:auto!important;background:#f1f6fb!important;padding:0!important;backdrop-filter:none!important}
.ng-overlay .ng-dialog{width:100%!important;max-width:none!important;min-height:100dvh!important;margin:0!important;border-radius:0!important;box-shadow:none!important;padding:clamp(16px,3vw,38px)!important;background:#f9fcff!important}
.ng-overlay #ng-ann-body{max-width:1380px;margin:0 auto;padding:10px 0 45px}
.ng-overlay .ng-tools:first-child{padding:14px!important;background:#e6f5ee;border-radius:15px}
/* Chart cards align side-by-side without axis or text overflow. */
.integra-r12-dashboard-charts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;align-items:stretch;margin:18px 0}
.integra-r12-dashboard-charts>.panel{min-width:0;margin:0!important;overflow:hidden}
.integra-r12-dashboard-charts .chartLegend{display:flex;flex-wrap:wrap;gap:7px;align-items:center;justify-content:center}
.integra-chart-modes{display:flex;flex-wrap:wrap;gap:7px;margin:10px 0}
.integra-chart-modes button{display:inline-flex!important;align-items:center;gap:8px!important;font-weight:750!important}
.integra-chart-modes button span,.ng-chart-icon{width:20px;height:20px;border-radius:6px;background:linear-gradient(135deg,#d6e9fb,#d9f8e6);display:inline-grid;place-items:center;color:#08599b;font-size:16px;font-weight:900;box-shadow:inset 0 -2px 3px #0044881c}
.ng-chart-icon{display:inline-grid!important;vertical-align:middle;margin-right:4px}
.r12-report-two{grid-template-columns:repeat(2,minmax(0,1fr))!important}
.integra-r12-retention{margin:18px 0;padding:20px}
.integra-r12-retention-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:15px 0}
.integra-r12-retention-metrics>div{min-width:0;border:1px solid #c7dfeb;border-radius:14px;padding:14px;background:linear-gradient(140deg,#edf6ff,#ebfdf3)}
.integra-r12-retention-metrics small{display:block;color:#42647e;font-size:11px;font-weight:650}
.integra-r12-retention-metrics strong{display:block;font-size:clamp(20px,2.2vw,30px);color:#12509c;margin-top:7px}
/* ERP cards work for small touch screens and large currency values. */
.card.metric,.panel.chartbox{min-width:0}
.card.metric b{overflow-wrap:anywhere;word-break:break-word;font-size:clamp(15px,1.8vw,25px)}
@media(max-width:960px){.integra-r12-dashboard-charts{grid-template-columns:1fr}.integra-r12-retention-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:560px){#app .topright{gap:5px!important}#app .topright .r12-top-offers{font-size:11px;padding:7px}.integra-r12-retention-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}#modalbg.r12-workspace-page .modalbody{padding:14px!important}}
@media(prefers-reduced-motion:reduce){.ng-overlay,.r12-workspace-page,.ng-dialog{transition:none!important;animation:none!important}}

/* Insurance CRM also uses whole-page workspaces instead of pop-up dialogs. */
#portalRoot .modal.show,#portalRoot .modal.is-open{position:fixed!important;inset:0!important;display:block!important;overflow:auto!important;z-index:90000!important;padding:0!important;background:#eff5fa!important;backdrop-filter:none!important}
#portalRoot .modal.show>.modalbox,#portalRoot .modal.is-open>.modalbox,#portalRoot .modal.show>.modal-card{width:100%!important;max-width:none!important;max-height:none!important;min-height:100dvh!important;overflow:visible!important;border:0!important;border-radius:0!important;box-shadow:none!important;padding:clamp(16px,3vw,40px)!important;background:#f9fbff!important}
#portalRoot .modal.show .modalhead{position:sticky;top:0;z-index:3;background:#e7f3ee;padding:12px 14px;border-radius:12px;display:flex;justify-content:space-between;align-items:center}
#demoAdminPortal .ia-nav .r12-admin-offers{font-weight:900!important;background:#0f876c!important;color:#fff!important;border-radius:10px!important;padding:10px 12px!important;margin-bottom:7px!important}
/* Legacy invoice/statement/label print jobs are rendered as in-app full pages, not pop-up windows. */
#integraR12PrintPage{position:fixed!important;inset:0!important;z-index:95000!important;background:#edf4fb!important;display:flex!important;flex-direction:column!important;overflow:hidden!important}
#integraR12PrintPage[hidden]{display:none!important}
#integraR12PrintPage .r12-print-head{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:12px;background:#153d71;color:#fff;padding:12px clamp(16px,4vw,45px)}
#integraR12PrintPage .r12-print-head button{padding:10px 16px;border-radius:9px;border:1px solid #b9cfe8;background:#fff;color:#154275;font-weight:800;cursor:pointer}
#integraR12PrintPage iframe{display:block;width:100%;flex:1;min-height:0;border:0;background:#fff}
@media print{#integraR12PrintPage .r12-print-head{display:none!important}}
