:root{--serif:Georgia,serif;--gold:#d4a017;--te-bg:#f2f2f2;--te-card:#fff;--te-gold:#d4a017;--te-gold2:#e8c040;--te-text:#0d0d0d;--te-muted:#777777;--te-border:#dedede;--te-soft:#eef4fb;--te-red:#b5392a;--te-green:#1e7a4a;--te-blue:#2a5fa8;--te-shadow:0 4px 18px rgba(0,0,0,.08)}
#tecrm-full-app,.tecrm-portal{font-family:Jost,Arial,sans-serif;color:var(--te-text);background:var(--te-bg);min-height:80vh;margin-left:-20px;padding:0}.tecrm-shell{display:grid;grid-template-columns:270px minmax(0,1fr);min-height:calc(100vh - 32px)}.tecrm-sidebar{background:#0a0a0a;color:#fff;padding:22px 16px;position:sticky;top:32px;height:calc(100vh - 32px);overflow:auto;box-shadow:4px 0 20px rgba(0,0,0,.16)}.tecrm-brand{display:flex;gap:12px;align-items:center;padding:0 8px 22px;border-bottom:1px solid rgba(255,255,255,.13);margin-bottom:18px}.tecrm-logo{width:46px;height:46px;border-radius:14px;background:linear-gradient(135deg,var(--te-gold2),var(--te-gold));display:grid;place-items:center;font-family:Georgia,serif;font-weight:800;color:#fff}.tecrm-brand strong{display:block;font-family:Georgia,serif;font-size:19px;color:#f7e7bd}.tecrm-brand span{display:block;font-size:12px;color:#aaaaaa;text-transform:uppercase;letter-spacing:.1em}.tecrm-nav-title{font-size:11px;color:#aaaaaa;text-transform:uppercase;letter-spacing:.14em;margin:18px 8px 8px}.tecrm-side-tab{width:100%;display:flex;align-items:center;gap:10px;background:transparent;color:#eee;border:none;border-radius:10px;padding:11px 12px;margin:3px 0;font-weight:700;text-align:left;cursor:pointer}.tecrm-side-tab:hover{background:rgba(255,255,255,.08)}.tecrm-side-tab.active{background:var(--te-gold);color:#fff;box-shadow:0 5px 15px rgba(164,119,39,.35)}.tecrm-main{padding:28px 32px 42px;min-width:0}.tecrm-top{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;margin-bottom:22px}.tecrm-title{font-family:Georgia,serif;font-size:48px;line-height:1;color:var(--te-gold);font-weight:800}.tecrm-sub{font-size:16px;text-transform:uppercase;letter-spacing:.13em;color:var(--te-muted);margin-top:8px}.tecrm-top-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.tecrm-notice{border-left:6px solid var(--te-gold);background:#eef4fb;border-radius:12px;padding:16px 20px;margin:0 0 24px}.tecrm-page-head{margin:8px 0 18px}.tecrm-page-head h1{font-family:Georgia,serif;color:var(--te-text);font-size:30px;margin:0}.tecrm-page-head p{color:var(--te-muted);margin:6px 0 0}.tecrm-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:18px;margin-bottom:24px}.tecrm-card{background:var(--te-card);border:1px solid var(--te-border);border-radius:18px;padding:22px;box-shadow:var(--te-shadow)}.tecrm-kpi{min-height:124px}.tecrm-kpi-icon{font-size:24px;margin-bottom:10px}.tecrm-kpi small{display:block;color:var(--te-muted);font-weight:800;text-transform:uppercase;letter-spacing:.08em}.tecrm-kpi strong{display:block;font-family:Georgia,serif;font-size:34px;color:var(--te-gold);margin-top:10px}.tecrm-welcome h2{font-size:26px}.tecrm-actions{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin:18px 0 20px}.tecrm-btn{background:var(--te-gold);color:#fff;border:none;border-radius:11px;padding:12px 18px;font-size:14px;font-weight:800;cursor:pointer;text-decoration:none;display:inline-flex;align-items:center;gap:6px}.tecrm-btn:hover{filter:brightness(.97)}.tecrm-btn.secondary{background:var(--te-soft);color:var(--te-text);border:1px solid var(--te-border)}.tecrm-btn.danger{background:var(--te-red);color:#fff}.tecrm-input,.tecrm-select,.tecrm-textarea{width:100%;border:1.5px solid var(--te-border);background:#fff;border-radius:12px;padding:12px 14px;font-size:15px;color:var(--te-text);box-sizing:border-box}.tecrm-search{max-width:420px}.tecrm-label{display:block;font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:var(--te-muted);font-weight:800;margin:0 0 6px}.tecrm-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}.tecrm-full{grid-column:1/-1}.tecrm-textarea{min-height:86px}.tecrm-table-wrap{overflow:auto;padding:20px 28px}.tecrm-table{width:100%;border-collapse:collapse;font-size:14px}.tecrm-table th{background:#eef4fb;color:var(--te-muted);text-align:left;padding:14px 12px;text-transform:uppercase;letter-spacing:.08em;font-size:12px;border-bottom:2px solid var(--te-border);white-space:nowrap}.tecrm-table td{padding:13px 12px;border-bottom:1px solid var(--te-border);vertical-align:middle}.tecrm-table tr:hover td{background:#eef4fb}.tecrm-code{color:var(--te-gold);font-weight:800}.tecrm-badge{background:rgba(164,119,39,.14);border:1px solid rgba(164,119,39,.35);color:var(--te-gold);border-radius:999px;padding:5px 9px;font-size:12px;font-weight:800;white-space:nowrap}.tecrm-error,.tecrm-ok{border-radius:12px;padding:14px 16px;margin:14px 0}.tecrm-error{border:1px solid var(--te-red);background:#ffecec;color:var(--te-red)}.tecrm-ok{border:1px solid var(--te-green);background:#eaffe9;color:var(--te-green)}.tecrm-empty{color:var(--te-muted);font-style:italic;padding:26px!important}.tecrm-modal{position:fixed;inset:0;background:rgba(0,0,0,.55);z-index:99999;display:flex;align-items:center;justify-content:center;padding:18px}.tecrm-modal-inner{background:#fff;border-radius:18px;max-width:820px;width:min(820px,96vw);max-height:90vh;overflow:auto;padding:28px;border:1px solid var(--te-border);box-shadow:0 20px 60px rgba(0,0,0,.25)}.tecrm-modal-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}.tecrm-modal-title{font-family:Georgia,serif;color:var(--te-gold);font-size:26px;font-weight:800}.tecrm-close{background:none;border:none;font-size:28px;cursor:pointer;color:var(--te-muted)}code{background:#eef4fb;padding:3px 7px;border-radius:5px}.tecrm-columns{display:grid;grid-template-columns:1fr 1fr;gap:18px}.tecrm-muted{color:var(--te-muted)}


/* v2.2 clean app mode: hide WordPress chrome on Trinity CRM admin page */
body.toplevel_page_trinity-elegance-crm-full #adminmenuback,
body.toplevel_page_trinity-elegance-crm-full #adminmenuwrap,
body.toplevel_page_trinity-elegance-crm-full #adminmenu,
body.toplevel_page_trinity-elegance-crm-full #wpadminbar,
body.toplevel_page_trinity-elegance-crm-full #wpfooter,
body.toplevel_page_trinity-elegance-crm-full .notice,
body.toplevel_page_trinity-elegance-crm-full .update-nag{display:none!important}
html.wp-toolbar body.toplevel_page_trinity-elegance-crm-full{padding-top:0!important}
body.toplevel_page_trinity-elegance-crm-full #wpcontent,
body.toplevel_page_trinity-elegance-crm-full #wpbody-content{margin-left:0!important;padding-left:0!important;padding-top:0!important}
body.toplevel_page_trinity-elegance-crm-full .wrap.tecrm-wrap{margin:0!important}
body.toplevel_page_trinity-elegance-crm-full #tecrm-full-app{margin:0!important}
body.toplevel_page_trinity-elegance-crm-full .tecrm-shell{min-height:100vh!important}
body.toplevel_page_trinity-elegance-crm-full .tecrm-sidebar{top:0!important;height:100vh!important}
.tecrm-admin-fullscreen-note{position:fixed;right:18px;top:14px;z-index:100000}
.tecrm-standalone-body .tecrm-admin-fullscreen-note{display:none!important}


/* v2.3 shortcode cloud-app mode: use [trinity_crm] on a normal WordPress page */
.tecrm-shortcode-fullscreen{position:fixed!important;inset:0!important;z-index:999999!important;background:var(--te-bg)!important;overflow:auto!important;width:100vw!important;height:100vh!important;margin:0!important;padding:0!important}
.tecrm-shortcode-fullscreen .tecrm-wrap{margin:0!important;padding:0!important;max-width:none!important;width:100%!important}
.tecrm-shortcode-fullscreen #tecrm-full-app{margin-left:0!important;min-height:100vh!important;width:100%!important}
.tecrm-shortcode-fullscreen .tecrm-shell{min-height:100vh!important}
.tecrm-shortcode-fullscreen .tecrm-sidebar{top:0!important;height:100vh!important}
.tecrm-shortcode-embedded #tecrm-full-app{margin-left:0!important;border-radius:18px;overflow:hidden}
body:has(.tecrm-shortcode-fullscreen){overflow:hidden!important}

/* v2.6 business UI improvements */
.tecrm-info{background:#eef4fb;border:1px solid #cce0f5;border-left:5px solid var(--te-gold);border-radius:12px;padding:13px 16px;margin:12px 0 18px;color:var(--te-text)}
.tecrm-tip{color:var(--te-gold);font-weight:900;cursor:help;margin-left:4px}
.tecrm-dash-panels{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-top:18px}.tecrm-dash-panels h2{font-family:Georgia,serif;color:var(--te-gold);margin:0 0 12px;font-size:24px}
.tecrm-card-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(340px,1fr));gap:18px}.tecrm-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:10px}.tecrm-card-head h3{font-family:Georgia,serif;font-size:23px;margin:0;color:var(--te-text)}
.tecrm-client-card p,.tecrm-account-card p{margin:8px 0;color:var(--te-muted);line-height:1.45}.tecrm-mini-kpis{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:14px 0}.tecrm-mini-kpis div{background:#eef4fb;border:1px solid #cce0f5;border-radius:12px;padding:10px}.tecrm-mini-kpis small{display:block;color:var(--te-muted);font-weight:800;text-transform:uppercase;font-size:10px;letter-spacing:.06em}.tecrm-mini-kpis b{display:block;color:var(--te-gold);font-family:Georgia,serif;font-size:17px;margin-top:4px}.tecrm-note{background:#eef4fb;border-left:4px solid var(--te-gold);border-radius:8px;padding:10px!important;color:var(--te-text)!important}.tecrm-tier-VIP{background:rgba(201,168,76,.18);border-color:rgba(201,168,76,.55);color:#d4a017}.tecrm-tier-Gold{background:rgba(154,96,16,.14);border-color:rgba(154,96,16,.4);color:#c49b2a}.tecrm-tier-Silver{background:rgba(30,122,114,.12);border-color:rgba(30,122,114,.32);color:#1e7a72}.tecrm-select[multiple]{min-height:150px}.tecrm-select[multiple] option{padding:8px}



/* v2.8 restored rich original order cards */
.tecrm-order-head{display:flex;justify-content:space-between;align-items:flex-start;gap:18px}.tecrm-order-actions{display:flex;gap:10px;flex-wrap:wrap}.tecrm-order-filters{display:grid;grid-template-columns:minmax(260px,1fr) auto minmax(190px,225px) minmax(190px,225px);gap:12px}.tecrm-filter{max-width:240px}.tecrm-order-list{display:flex;flex-direction:column;gap:18px}.tecrm-order-card.rich{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:22px;align-items:center;padding:30px 36px}.tecrm-order-title{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin-bottom:12px}.tecrm-order-title h3{font-family:Georgia,serif;font-size:24px;margin:0;color:#111}.tecrm-code-pill{border:1px solid #d5d5d5;background:#eef4fb;border-radius:999px;color:#777777;padding:8px 14px;font-weight:900;font-size:13px}.tecrm-order-details{display:grid;grid-template-columns:repeat(2,minmax(210px,1fr));gap:8px 26px;color:#777777;font-size:15px}.tecrm-order-details b,.tecrm-money{color:var(--te-gold)}.tecrm-order-desc{margin:14px 0 0;color:#777777;font-style:italic;font-size:15px}.tecrm-order-right{min-width:420px;display:flex;flex-direction:column;align-items:flex-end;gap:10px}.tecrm-status-pill{background:#f2f2f2;border:1px solid #d4a15f;border-radius:999px;color:#d4a017;padding:8px 22px;font-weight:900}.tecrm-delivery-pill{background:#dff3f0;border:1px solid #8ec6bf;border-radius:999px;color:#1e7a72;padding:8px 20px;font-weight:900}.tecrm-stage-bars{display:flex;gap:5px;width:120px;justify-content:flex-end}.tecrm-stage-bars span{width:16px;height:6px;border-radius:99px;background:#dedede}.tecrm-stage-bars span.on{background:var(--te-gold)}.tecrm-stage-label{font-size:13px;color:#777777}.tecrm-order-actions-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}.tecrm-icon-btn{background:#eef4fb;border:1px solid var(--te-border);border-radius:9px;padding:10px 13px;cursor:pointer}.tecrm-labour{color:#7c4dcc;font-weight:900;white-space:nowrap}.tecrm-btn.outline-green{background:#effaf3;color:#1e7a4a;border:1px solid #1e7a4a}
/* v31 restored original-style materials modal */
.tecrm-material-modal .tecrm-modal-title{font-family:'Cormorant Garamond',Georgia,serif;font-size:2rem;color:var(--te-gold);font-weight:700}
.tecrm-material-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;background:#eef4fb;border-radius:10px;padding:1.4rem 2rem;margin:1.1rem 0 1.8rem;text-align:center}
.tecrm-material-summary small{display:block;color:#777777;text-transform:uppercase;font-weight:600;margin-bottom:.3rem}
.tecrm-material-summary b{font-family:'Cormorant Garamond',Georgia,serif;font-size:1.8rem;display:block;letter-spacing:.02em}
.tecrm-material-summary .teal{color:#1e7a72}.tecrm-material-summary .purple{color:#7c4dcc}.tecrm-material-summary .red{color:#b5392a}.tecrm-material-summary .green{color:#1e7a4a}
.tecrm-material-empty{background:#eef4fb;border-radius:10px;padding:2rem;text-align:center;color:#5a7fa0;font-family:'Cormorant Garamond',Georgia,serif;font-size:1.5rem;font-style:italic;margin-bottom:1.4rem}
.tecrm-full-width{width:100%;margin:.5rem 0;text-align:center;justify-content:center}.tecrm-material-close{margin-top:.9rem}.tecrm-material-add{background:#eef4fb;border-radius:10px;padding:1.5rem;margin-bottom:1rem}.tecrm-material-add h3{font-family:'Cormorant Garamond',Georgia,serif;font-size:1.45rem;margin:0 0 1rem;color:var(--te-text)}
.tecrm-readonly-cost{background:#fff;border:1.5px solid var(--te-border);border-radius:8px;min-height:46px;padding:.75rem 1rem;font-size:1.05rem;color:var(--te-gold);font-weight:700;display:flex;align-items:center}.tecrm-material-available{margin-top:.4rem;color:#777777;font-size:.85rem}.tecrm-material-buttons{display:grid;grid-template-columns:1fr 1fr;gap:1rem;margin-top:.5rem}.tecrm-material-table{margin-bottom:1rem}.tecrm-material-table .tecrm-money{color:var(--te-gold)}


.tecrm-balance-due{color:#b5392a;font-weight:700}.tecrm-balance-due b{color:#d4a017}

.tecrm-deposit-options{display:flex;gap:.35rem;align-items:center;flex-wrap:wrap;margin-top:.4rem}.tecrm-mini-btn{border:1px solid #d9cfbd;background:#f2f2f2;border-radius:7px;padding:.28rem .55rem;font-weight:800;cursor:pointer;color:#a87923}.tecrm-mini-btn:hover{background:#a87923;color:#fff}.tecrm-mini-help{font-size:.72rem;color:#777777;margin-left:.15rem}

/* v50 professional linked clients selector */
.tecrm-linked-clients-box{background:#eef4fb;border:1px solid #cce0f5;border-radius:12px;padding:14px}
.tecrm-linked-client-row{display:grid;grid-template-columns:1fr;gap:10px;margin-top:6px}
.tecrm-linked-client-selected{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px;min-height:36px;align-items:center}
.tecrm-client-chip{display:inline-flex;align-items:center;gap:8px;background:#fff;border:1px solid #c8dcf0;border-radius:999px;padding:8px 10px;color:#111111;font-weight:700;font-size:13px}
.tecrm-client-chip button{border:none;background:#b5392a;color:#fff;border-radius:50%;width:18px;height:18px;line-height:18px;text-align:center;cursor:pointer;font-weight:900;padding:0}
.tecrm-muted{color:#777777;font-size:13px}
/* v53 Staff HR enhancements */
.tecrm-file-input{margin-top:.35rem;font-size:.78rem}.tecrm-file-preview{margin-top:.45rem;background:#f2f2f2;border:1px solid #dedede;border-radius:6px;padding:.45rem}.tecrm-file-preview img{max-width:96px;max-height:96px;object-fit:cover;border-radius:8px;border:1px solid #dedede;display:block}.tecrm-file-preview a{color:#d4a017;font-weight:700;text-decoration:none}.tecrm-file-preview a:hover{text-decoration:underline}

/* v55 professional portals */
.tecrm-employee-profile{display:flex;gap:1rem;align-items:center;margin-bottom:1rem;padding:1rem;border:1px solid var(--tecrm-border,#dedede);border-radius:12px;background:#fff}
.tecrm-employee-photo{width:86px;height:86px;border-radius:50%;object-fit:cover;border:2px solid #e8c040;background:#ebebeb}
.tecrm-btn.small{padding:.25rem .55rem;font-size:.75rem}


.tecrm-history-box{background:#f2f2f2;border-left:4px solid #d4a017;border-radius:10px;padding:14px 16px;margin:0 0 18px;color:#111111}
.tecrm-history-box h4{margin:0 0 8px;font-family:Georgia,serif;color:var(--te-gold);font-size:18px}
.tecrm-history-box ul{margin:0 0 8px 18px;padding:0;line-height:1.7}
.tecrm-pipeline-bar{display:flex;gap:6px;flex-wrap:wrap;margin:12px 0}
.tecrm-pipeline-bar span{font-size:12px;padding:6px 9px;border-radius:999px;background:#e6f0fa;color:#5a7fa0;border:1px solid #d8cdbd}
.tecrm-pipeline-bar span.on{background:#d4a017;color:white;border-color:#d4a017}
.tecrm-order-history-mini{margin-top:8px;font-size:12px;color:#777777;background:#f2f2f2;border-radius:8px;padding:6px 8px;display:inline-block}
.tecrm-template-card{border:1px solid var(--te-border);border-radius:14px;padding:14px;margin:12px 0;background:#f8f8f8}.tecrm-template-card h3{font-family:Georgia,serif;color:var(--te-text);margin:0;font-size:20px}.tecrm-message-box{background:#fff;border:1px solid var(--te-border);border-radius:10px;padding:12px;margin:10px 0;white-space:pre-wrap;color:var(--te-text)}.no-pad{padding:0}.tecrm-info code{background:#fff;border:1px solid var(--te-border);padding:2px 6px;border-radius:6px}

.tecrm-report-head{display:flex;justify-content:space-between;align-items:flex-start;gap:1rem}.tecrm-report-range{display:flex;gap:.4rem;background:#fff;border:1px solid var(--border,#dedede);border-radius:8px;padding:.35rem}.tecrm-report-range .active{background:#d4a017;color:#fff}.tecrm-section-title{font-family:var(--serif,Georgia,serif);font-size:1.25rem;color:#d4a017;margin:1.6rem 0 .8rem}.tecrm-report-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:1rem}.tecrm-report-target h3{text-transform:uppercase;font-size:.85rem;letter-spacing:.06em;color:#666666;margin:0}.tecrm-report-card-head{display:flex;justify-content:space-between;gap:1rem}.tecrm-report-card-head span{text-align:right;font-size:.75rem;color:#666666}.tecrm-report-big{font-family:var(--serif,Georgia,serif);font-size:1.9rem;color:#b7332a;margin:.6rem 0 .2rem}.tecrm-report-percent{text-align:right;color:#b7332a;font-weight:700}.tecrm-progress,.tecrm-mini-progress{height:8px;background:#ddeaf8;border-radius:999px;overflow:hidden;margin:.35rem 0}.tecrm-progress span,.tecrm-mini-progress span{display:block;height:100%;background:#b7332a;border-radius:999px}.tecrm-mini-progress{width:90px;height:4px}.tecrm-report-foot{display:flex;justify-content:space-between;color:#777777;font-size:.78rem}.tecrm-blue{color:#1f5da8}.tecrm-green{color:#087b48}.tecrm-red{color:#b7332a}.tecrm-total-row{background:#eef4fb;font-weight:700}.tecrm-report-two{display:grid;grid-template-columns:repeat(auto-fit,minmax(360px,1fr));gap:1rem}.tecrm-report-line{display:flex;justify-content:space-between;gap:1rem;border-bottom:1px solid #dedede;padding:.65rem 0}.tecrm-overview-kpis .tecrm-kpi strong{font-size:1.3rem}

/* v66 exact Reports restoration */
.tecrm-report-head h1{font-family:var(--serif,Georgia,serif);font-size:2.35rem;margin:0;color:#111111}.tecrm-report-head p{margin:.25rem 0 0;color:#777777}.tecrm-report-range .tecrm-btn{border-radius:8px;min-width:96px}.tecrm-section-title{display:flex;align-items:center;gap:.45rem;font-family:var(--serif,Georgia,serif);font-size:1.35rem;font-weight:500;color:var(--te-gold);margin:1.7rem 0 1rem}.tecrm-report-grid{grid-template-columns:repeat(auto-fit,minmax(245px,1fr));gap:1.2rem}.tecrm-report-target{min-height:170px}.tecrm-report-big{font-size:2rem;line-height:1;color:#b7332a}.tecrm-report-card-head h3{font-weight:800}.tecrm-report-two .tecrm-card h2{font-family:var(--serif,Georgia,serif);font-weight:500;color:#d4a017}.tecrm-overview-kpis{grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:1rem}.tecrm-overview-kpis .tecrm-kpi{min-height:86px}.tecrm-overview-kpis .tecrm-kpi strong{font-family:var(--serif,Georgia,serif);color:#087b48}.tecrm-table .tecrm-mini-progress{background:#ddeaf8}.tecrm-table tr:nth-child(even){background:#ebebeb}.tecrm-table .tecrm-total-row{background:#e6f0fa!important}.tecrm-report-line small{color:#777777}.tecrm-report-line:last-child{border-bottom:0}

/* v68 restored Staff Portal Admin */
.tecrm-portal-admin-head h1{font-family:Georgia,serif;font-size:2.35rem;margin:0;color:#111111}.tecrm-portal-admin-head p{margin:.25rem 0 0;color:#777777}.tecrm-portal-tabs{display:flex;gap:.55rem;flex-wrap:wrap;margin:1.2rem 0 2rem}.tecrm-portal-tabs .tecrm-btn.active{background:#d4a017;color:#fff}.tecrm-recent-activity{margin-bottom:1.7rem}.tecrm-recent-activity h2{font-family:Georgia,serif;color:#d4a017;font-weight:500}.tecrm-activity-row{background:#eef4fb;border:1px solid #dedede;border-radius:7px;padding:1rem;margin:.75rem 0;color:#666666}.tecrm-employee-portal-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(270px,1fr));gap:1.2rem}.tecrm-employee-portal-card{min-height:220px}.tecrm-emp-row{display:flex;gap:1rem;align-items:center}.tecrm-emp-avatar{width:56px;height:56px;border-radius:50%;display:grid;place-items:center;border:3px solid #d4a017;color:#d4a017;background:#f2f2f2;font-family:Georgia,serif;font-weight:700}.tecrm-emp-row h3{margin:0;font-size:1.15rem}.tecrm-emp-row p{margin:.25rem 0;color:#777777}.tecrm-green-badge{background:#dff3e8;border-color:#8cc9aa;color:#087b48}.tecrm-emp-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:.55rem;margin:1rem 0}.tecrm-emp-stats div{background:#eef4fb;border-radius:7px;padding:.75rem .45rem;text-align:center}.tecrm-emp-stats b{display:block;color:#d4a017;font-family:Georgia,serif}.tecrm-emp-stats small{display:block;font-size:.68rem;color:#666666}.tecrm-emp-actions{display:grid;grid-template-columns:1fr auto;gap:.55rem}.tecrm-emp-actions .tecrm-btn{justify-content:center}

/* v69 selected restored modules */
.tecrm-client-portal-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(360px,1fr));gap:1.25rem}.tecrm-client-portal-card h3{font-family:var(--serif);font-size:1.4rem;margin:0}.tecrm-client-portal-top{display:flex;justify-content:space-between;gap:1rem}.tecrm-status-bubble{border:1px solid #8cbf9b;background:#dff3e7;color:#087644;border-radius:50%;min-width:76px;min-height:76px;display:flex;align-items:center;justify-content:center;font-weight:700}.tecrm-portal-summary{background:#eef4fb;border-radius:8px;padding:.75rem;margin:1rem 0;color:#0f7f75}.tecrm-user-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(430px,1fr));gap:1.5rem}.tecrm-user-card{position:relative;min-height:210px}.tecrm-user-card h3{font-family:var(--serif);font-size:1.4rem;margin:0}.tecrm-user-badges{position:absolute;right:1.5rem;top:1.5rem;display:flex;flex-direction:column;gap:.5rem}.tecrm-center{text-align:center}.tecrm-profile-layout{display:grid;grid-template-columns:360px 1fr;gap:1.5rem}.tecrm-profile-card{text-align:center}.tecrm-profile-avatar{width:86px;height:86px;margin:0 auto 1rem;border-radius:50%;border:3px solid var(--gold);display:flex;align-items:center;justify-content:center;font-size:2rem;font-family:var(--serif)}.tecrm-full-width{width:100%}
/* v70 restored reference-only modules: Settings, Portals, Users/Profile, WhatsApp, Reports */
.tecrm-settings-title{font-family:Georgia,serif;font-size:38px;margin:0 0 24px;color:#111111}.tecrm-settings-block{margin:0 0 28px;padding:32px}.tecrm-settings-block h2{font-family:Georgia,serif;color:var(--te-gold);font-size:28px;font-weight:500;margin:0 0 24px}.tecrm-settings-block h3{font-size:16px;text-transform:uppercase;letter-spacing:.06em;margin:26px 0 12px;color:#111}.tecrm-settings-info-grid{display:grid;grid-template-columns:160px 1fr;gap:28px}.tecrm-logo-box{text-align:center}.tecrm-logo-preview{width:150px;height:150px;border:2px dashed var(--te-border);border-radius:10px;display:grid;place-items:center;font-family:Georgia,serif;font-size:30px;color:var(--te-gold);margin-bottom:8px}.tecrm-link-btn{background:none;border:none;color:#b7332a;cursor:pointer}.tecrm-money-input{display:flex;align-items:center;gap:8px}.tecrm-money-input span{color:var(--te-gold);font-family:Georgia,serif;font-size:20px}.tecrm-security-box{border:2px solid var(--te-gold)}.tecrm-security-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:18px}.tecrm-security-grid div{background:var(--te-soft);border-radius:8px;padding:16px}.tecrm-settings-actions{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-bottom:18px}.tecrm-target-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:18px;margin-bottom:22px}.tecrm-target-grid.three{grid-template-columns:repeat(3,1fr)}.tecrm-target-grid.two{grid-template-columns:repeat(2,1fr)}.tecrm-save-settings{width:100%;justify-content:center;font-size:18px;padding:18px;margin-top:8px}.tecrm-template-card{border:1px solid var(--te-border);border-radius:14px;padding:16px;margin:0 0 14px;background:#fff}.tecrm-template-card h3{font-family:Georgia,serif;color:var(--te-text);margin:0}.tecrm-card-head{display:flex;justify-content:space-between;gap:12px}.tecrm-message-box{background:#eef4fb;border-left:4px solid var(--te-gold);border-radius:8px;padding:12px;margin:10px 0;white-space:pre-wrap}.tecrm-portal-summary{font-weight:600}.tecrm-user-card p{color:var(--te-muted)}.tecrm-profile-layout .tecrm-card{margin-bottom:20px}

/* v71 restored reference layout for Users and Client Portal only */
.tecrm-client-portal-head{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;margin-bottom:1.6rem}
.tecrm-client-portal-grid{grid-template-columns:repeat(auto-fit,minmax(430px,1fr));gap:1.25rem}
.tecrm-client-portal-card{max-width:720px;min-height:285px;padding:32px 36px}
.tecrm-client-portal-card h3{font-family:Georgia,serif!important;font-size:1.45rem!important;font-weight:500;color:#111111;margin:0 0 .25rem}
.tecrm-client-portal-card p{color:var(--te-muted);font-size:1rem;margin:.65rem 0}
.tecrm-status-bubble{width:84px;height:84px;border-radius:50%;background:#dff3e7;border:1px solid #8cc9aa;color:#087b48;font-weight:800;display:flex;align-items:center;justify-content:center;text-align:center}
.tecrm-status-bubble.inactive{background:#ffecec;border-color:#d58b82;color:#b5392a}
.tecrm-portal-summary{font-weight:600;background:#eef4fb;border-radius:7px;padding:.85rem 1rem;margin:1rem 0;color:#0f7f75}
.tecrm-user-grid{display:grid;grid-template-columns:repeat(2,minmax(360px,1fr));gap:1.5rem}
.tecrm-user-card{min-height:230px;padding:36px;position:relative}
.tecrm-user-card h3{font-family:Georgia,serif!important;font-size:1.45rem!important;font-weight:500;margin:0 0 .2rem;color:#111111}
.tecrm-user-card p{color:var(--te-muted);font-size:1rem}.tecrm-user-email{margin-top:3.2rem!important}.tecrm-user-badges{right:36px!important;top:36px!important}.tecrm-current-session{margin-top:1.6rem!important}
.tecrm-card-actions{display:grid;grid-template-columns:1fr 1fr;gap:.75rem;margin-top:1.1rem}.tecrm-card-actions .tecrm-btn{justify-content:center}


/* v73 exact Staff Portal Timesheets restore */
.tecrm-timesheet-toolbar{display:flex;align-items:center;gap:1.2rem;margin:1.2rem 0 1.4rem;color:#d4a017;font-family:Georgia,serif;font-size:1.08rem}
.tecrm-timesheet-toolbar small{font-family:'Jost',system-ui,sans-serif;color:#777777;font-size:.82rem}.tecrm-month-input{width:180px!important;background:#fff!important}
.tecrm-timesheet-kpis{display:grid;grid-template-columns:repeat(4,minmax(180px,1fr));gap:1.2rem;margin-bottom:1.7rem}.tecrm-timesheet-kpis h4{text-transform:uppercase;letter-spacing:.06em;color:#777777;font-size:.78rem;margin:0 0 .6rem}.tecrm-timesheet-kpis strong{font-family:Georgia,serif;color:#d4a017;font-size:1.55rem;font-weight:600}.tecrm-teal{color:#087b75!important}.tecrm-blue{color:#215aa4!important}.tecrm-green{color:#007a44!important}
.tecrm-timesheet-table-card{padding:1.55rem!important}.tecrm-timesheet-table th{font-size:.75rem!important}.tecrm-timesheet-table td{padding:.85rem .75rem!important}.tecrm-mini-avatar{display:inline-grid;place-items:center;width:34px;height:34px;border-radius:50%;border:2px solid #d4a017;color:#d4a017;background:#f2f2f2;font-family:Georgia,serif;font-size:.72rem;margin-right:.65rem}.tecrm-mini-progress{display:inline-block;width:170px;max-width:60%;height:6px;background:#dedede;border-radius:99px;margin-left:.5rem;vertical-align:middle;overflow:hidden}.tecrm-mini-progress span{display:block;height:100%;background:#2459a2;border-radius:99px}.tecrm-total-row{background:#e6f0fa!important;font-weight:700}.tecrm-timesheet-details{border-top:1px solid #dedede;margin-top:1rem}.tecrm-timesheet-details details{border-bottom:1px solid #dedede;padding:.9rem 0}.tecrm-timesheet-details summary{cursor:pointer;font-weight:700;color:#111}.tecrm-timesheet-details p{margin:.45rem 0 .2rem 1.2rem;color:#666666}


/* v74: restored Users and Client Portal card layouts from original reference */
.tecrm-user-grid{display:grid!important;grid-template-columns:repeat(2,minmax(360px,1fr))!important;gap:1.5rem!important}
.tecrm-user-card{min-height:225px!important;position:relative!important;padding:34px 36px!important}
.tecrm-user-card h3{font-family:Georgia,serif!important;font-size:1.45rem!important;font-weight:500!important;margin:0 0 .15rem!important;color:#111111!important}
.tecrm-user-card p{color:var(--te-muted);font-size:1rem;margin:.5rem 0!important}
.tecrm-user-badges{position:absolute!important;right:24px!important;top:32px!important;display:flex!important;flex-direction:column!important;gap:.55rem!important;align-items:flex-end!important}
.tecrm-current-session{margin-top:1.25rem!important}
.tecrm-client-portal-grid{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(430px,1fr))!important;gap:1.25rem!important}
.tecrm-client-portal-card{max-width:720px!important;min-height:285px!important;padding:32px 36px!important}
.tecrm-client-portal-card h3{font-family:Georgia,serif!important;font-size:1.45rem!important;font-weight:500!important;color:#111111!important;margin:0 0 .25rem!important}
.tecrm-status-bubble{border:1px solid #8cbf9b!important;background:#dff3e7!important;color:#087644!important;border-radius:50%!important;min-width:76px!important;min-height:76px!important;display:flex!important;align-items:center!important;justify-content:center!important;font-weight:700!important}
.tecrm-status-bubble.inactive{background:#f5e0dc!important;color:#b5392a!important;border-color:#cc9b92!important}
.tecrm-portal-summary{background:#eef4fb!important;border-radius:8px!important;padding:.75rem!important;margin:1rem 0!important;color:#0f7f75!important}

.tecrm-loading{display:flex;align-items:center;gap:12px;padding:40px;justify-content:center;color:var(--te-muted);font-size:15px}.tecrm-spinner{width:28px;height:28px;border:3px solid var(--te-border);border-top-color:var(--te-gold);border-radius:50%;animation:tecrm-spin .7s linear infinite;flex-shrink:0}@keyframes tecrm-spin{to{transform:rotate(360deg)}}.tecrm-toast{animation:tecrm-fadein .3s ease;border-radius:12px;padding:12px 18px;margin:0 0 14px;display:flex;align-items:center;gap:8px;font-weight:600}@keyframes tecrm-fadein{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:translateY(0)}}.tecrm-btn.small{padding:7px 12px;font-size:12px}.tecrm-report-line{display:flex;justify-content:space-between;padding:8px 0;border-bottom:1px solid #e8e8e8}.tecrm-progress{background:#ddeaf8;border-radius:99px;height:8px;margin:8px 0}.tecrm-progress span{display:block;height:8px;border-radius:99px;background:var(--te-gold);transition:width .4s}.tecrm-dash-panels{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-top:6px}
/* ── Collapsible Nav Groups ── */
.tecrm-nav-group{margin-bottom:2px}
.tecrm-nav-group-header{width:100%;display:flex;align-items:center;gap:8px;background:transparent;color:#aaaaaa;border:none;border-radius:8px;padding:8px 10px;font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.12em;cursor:pointer;text-align:left;transition:background .15s}
.tecrm-nav-group-header:hover{background:rgba(255,255,255,.06);color:#eee}
.tecrm-nav-group-header.has-active{color:#f7d98a}
.tecrm-nav-group-icon{opacity:.7;flex-shrink:0;display:flex}
.tecrm-nav-group-label{flex:1}
.tecrm-nav-group-items{overflow:hidden;max-height:0;transition:max-height .25s ease}
.tecrm-nav-group-items.open{max-height:600px}
.tecrm-side-tab{width:100%;display:flex;align-items:center;gap:10px;background:transparent;color:#ddd;border:none;border-radius:9px;padding:9px 10px 9px 20px;margin:1px 0;font-weight:600;font-size:13px;text-align:left;cursor:pointer;transition:background .12s,color .12s}
.tecrm-side-tab:hover{background:rgba(255,255,255,.07);color:#fff}
.tecrm-side-tab.active{background:var(--te-gold);color:#fff;box-shadow:0 4px 12px rgba(164,119,39,.3)}
.tecrm-tab-icon{flex-shrink:0;opacity:.8;display:flex}
.tecrm-side-tab.active .tecrm-tab-icon{opacity:1}
.tecrm-sidebar-footer{padding:16px 8px 8px;border-top:1px solid rgba(255,255,255,.1);margin-top:12px}
/* ── AI Trigger Button ── */
.tecrm-ai-trigger{width:100%;display:flex;align-items:center;gap:10px;background:linear-gradient(135deg,rgba(124,58,237,.25),rgba(167,121,34,.2));color:#f7d98a;border:1px solid rgba(167,121,34,.35);border-radius:10px;padding:10px 14px;font-size:13px;font-weight:700;cursor:pointer;transition:all .2s}
.tecrm-ai-trigger:hover{background:linear-gradient(135deg,rgba(124,58,237,.4),rgba(167,121,34,.3));border-color:rgba(167,121,34,.6)}
.tecrm-ai-badge{margin-left:auto;font-size:14px}
/* ── AI Panel ── */
.tecrm-ai-panel{position:fixed;bottom:24px;right:24px;width:400px;max-width:calc(100vw - 48px);height:560px;max-height:calc(100vh - 80px);background:#0a0a0a;border:1px solid rgba(167,121,34,.4);border-radius:20px;display:flex;flex-direction:column;box-shadow:0 20px 60px rgba(0,0,0,.5);z-index:999990;overflow:hidden}
.tecrm-ai-header{display:flex;align-items:center;justify-content:space-between;padding:16px 18px;background:linear-gradient(135deg,#111111,#0d0d0d);border-bottom:1px solid rgba(167,121,34,.25);flex-shrink:0}
.tecrm-ai-close{background:none;border:none;color:#aaaaaa;font-size:22px;cursor:pointer;line-height:1;padding:0 4px}
.tecrm-ai-close:hover{color:#fff}
.tecrm-ai-messages{flex:1;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:12px;scroll-behavior:smooth}
.tecrm-ai-messages::-webkit-scrollbar{width:4px}
.tecrm-ai-messages::-webkit-scrollbar-track{background:transparent}
.tecrm-ai-messages::-webkit-scrollbar-thumb{background:rgba(167,121,34,.3);border-radius:2px}
.tecrm-ai-welcome{text-align:center;padding:10px 0}
.tecrm-ai-suggestion{width:100%;text-align:left;background:rgba(167,121,34,.12);border:1px solid rgba(167,121,34,.25);color:#f7d98a;border-radius:8px;padding:8px 12px;font-size:12px;cursor:pointer;transition:all .15s}
.tecrm-ai-suggestion:hover{background:rgba(167,121,34,.22);border-color:rgba(167,121,34,.5)}
.tecrm-ai-msg{display:flex;gap:8px;align-items:flex-start}
.tecrm-ai-msg-user{flex-direction:row-reverse}
.tecrm-ai-avatar{width:28px;height:28px;border-radius:50%;background:linear-gradient(135deg,#7c3aed,#d4a017);display:flex;align-items:center;justify-content:center;font-size:13px;flex-shrink:0;margin-top:2px}
.tecrm-ai-bubble{background:rgba(255,255,255,.07);color:#e0e0e0;border-radius:14px;padding:10px 14px;font-size:13px;line-height:1.55;max-width:88%;word-wrap:break-word}
.tecrm-ai-msg-user .tecrm-ai-bubble{background:rgba(167,121,34,.25);color:#f7e7bd;border-bottom-right-radius:4px}
.tecrm-ai-msg-assistant .tecrm-ai-bubble{border-bottom-left-radius:4px}
.tecrm-ai-typing{display:flex;gap:5px;align-items:center;padding:12px 16px}
.tecrm-ai-typing span{width:7px;height:7px;border-radius:50%;background:#d4a017;animation:tecrm-bounce .9s ease infinite}
.tecrm-ai-typing span:nth-child(2){animation-delay:.15s}
.tecrm-ai-typing span:nth-child(3){animation-delay:.3s}
@keyframes tecrm-bounce{0%,60%,100%{transform:translateY(0)}30%{transform:translateY(-6px)}}
.tecrm-ai-input-row{display:flex;gap:8px;padding:12px 14px;border-top:1px solid rgba(255,255,255,.08);flex-shrink:0;background:#0a0a0a}
.tecrm-ai-input{flex:1;background:rgba(255,255,255,.08);border:1px solid rgba(167,121,34,.3);border-radius:10px;padding:10px 14px;color:#e0e0e0;font-size:13px;outline:none}
.tecrm-ai-input:focus{border-color:rgba(167,121,34,.7)}
.tecrm-ai-input::placeholder{color:#888888}
.tecrm-ai-send{background:var(--te-gold);border:none;border-radius:10px;width:40px;height:40px;display:flex;align-items:center;justify-content:center;cursor:pointer;color:#fff;flex-shrink:0;transition:filter .15s}
.tecrm-ai-send:hover{filter:brightness(1.1)}
.tecrm-ai-send:disabled,.tecrm-ai-input:disabled{opacity:.5}
/* ── Report Tabs ── */
.tecrm-report-tabs{display:flex;gap:4px;flex-wrap:wrap;margin:18px 0 4px;border-bottom:2px solid #e8e8e8;padding-bottom:0}
.tecrm-report-tab-btn{background:none;border:none;border-bottom:3px solid transparent;padding:10px 16px;font-size:13px;font-weight:700;color:var(--te-muted);cursor:pointer;border-radius:8px 8px 0 0;transition:all .15s;white-space:nowrap;margin-bottom:-2px}
.tecrm-report-tab-btn:hover{color:var(--te-text);background:#f2f2f2}
.tecrm-report-tab-btn.active{color:var(--te-gold);border-bottom-color:var(--te-gold);background:#f8f8f8}

/* ── Client Profile ── */
.tecrm-client-card{cursor:pointer;transition:box-shadow .15s,transform .1s}
.tecrm-client-card:hover{box-shadow:0 8px 24px rgba(164,119,39,.18);transform:translateY(-2px)}
/* ── Calendar ── */
.tecrm-cal-slot{min-height:64px}

/* ── Global Search ── */
.tecrm-search-overlay{position:fixed;inset:0;background:rgba(0,0,0,.45);z-index:999995;display:flex;align-items:flex-start;justify-content:center;padding-top:80px;backdrop-filter:blur(3px)}
.tecrm-search-panel{background:#fff;border-radius:18px;width:580px;max-width:calc(100vw - 32px);box-shadow:0 24px 60px rgba(0,0,0,.3);overflow:hidden;animation:tecrm-fadein .15s ease}
.tecrm-global-input{flex:1;border:none;outline:none;font-size:16px;background:transparent;color:var(--te-text);font-family:inherit}
.tecrm-search-results{max-height:360px;overflow-y:auto}
.tecrm-search-result:hover>div{background:#eef4fb}
/* ── Product Catalogue ── */
.tecrm-product-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:20px}
.tecrm-product-card{border-radius:16px;overflow:hidden;border:1px solid var(--te-border);background:#fff;transition:box-shadow .2s,transform .15s}
.tecrm-product-card:hover{box-shadow:0 10px 32px rgba(164,119,39,.15);transform:translateY(-3px)}
.tecrm-product-img-wrap{position:relative;overflow:hidden}
.tecrm-product-img-wrap img{transition:transform .3s}
.tecrm-product-card:hover .tecrm-product-img-wrap img{transform:scale(1.04)}


.tecrm-logout-btn{
  display:flex;align-items:center;gap:9px;
  width:100%;padding:10px 14px;margin-top:6px;
  background:rgba(181,57,42,.08);
  border:1px solid rgba(181,57,42,.2);
  border-radius:10px;
  color:#e06050;
  font-size:13px;font-weight:600;
  text-decoration:none;
  cursor:pointer;
  transition:all .2s;
}
.tecrm-logout-btn:hover{
  background:rgba(181,57,42,.18);
  border-color:rgba(181,57,42,.4);
  color:#f07060;
}
.tecrm-logout-btn svg{flex-shrink:0;opacity:.85}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE — TABLET & MOBILE
   Breakpoints: 1024px tablet, 768px large mobile, 480px small mobile
═══════════════════════════════════════════════════════ */

/* ── Hamburger button (hidden on desktop) ── */
.tecrm-hamburger{
  display:none;position:fixed;top:10px;left:12px;z-index:1200;
  width:42px;height:42px;border-radius:10px;
  background:#0a0a0a;border:1px solid rgba(212,160,23,.3);
  cursor:pointer;flex-direction:column;align-items:center;
  justify-content:center;gap:5px;box-shadow:0 2px 10px rgba(0,0,0,.3);
}
.tecrm-hamburger span{
  display:block;width:20px;height:2px;
  background:#d4a017;border-radius:2px;transition:all .25s;
}
.tecrm-hamburger.open span:nth-child(1){transform:translateY(7px) rotate(45deg)}
.tecrm-hamburger.open span:nth-child(2){opacity:0}
.tecrm-hamburger.open span:nth-child(3){transform:translateY(-7px) rotate(-45deg)}

/* ── Mobile overlay backdrop ── */
.tecrm-sidebar-overlay{
  display:none;position:fixed;inset:0;
  background:rgba(0,0,0,.55);z-index:1099;backdrop-filter:blur(2px);
}
.tecrm-sidebar-overlay.active{display:block}

/* ── TABLET: 768px–1024px ── */
@media(max-width:1024px){
  .tecrm-shell{grid-template-columns:220px minmax(0,1fr)}
  .tecrm-main{padding:20px 18px 32px}
  .tecrm-sidebar{padding:16px 12px}
  .tecrm-brand strong{font-size:13px}
  .tecrm-brand span{font-size:11px}
  .tecrm-nav-label{font-size:12px}
  .tecrm-title{font-size:36px}
  .tecrm-top{gap:10px}
  .tecrm-dash-kpis{grid-template-columns:repeat(3,1fr)}
  .tecrm-dash-panels{grid-template-columns:1fr}
  .tecrm-order-card.rich{grid-template-columns:1fr}
  .tecrm-profile-layout{grid-template-columns:1fr}
  .tecrm-form-grid{grid-template-columns:1fr 1fr}
  .tecrm-modal-inner{max-width:90vw}
}

/* ── MOBILE: ≤768px ── */
@media(max-width:768px){

  /* Shell: single column, sidebar becomes drawer */
  .tecrm-shell{
    display:block;
    min-height:100vh;
  }

  /* Sidebar: fixed drawer, slides in from left */
  .tecrm-sidebar{
    position:fixed;
    left:-280px;top:0;bottom:0;
    width:275px;
    z-index:1100;
    transition:left .28s cubic-bezier(.4,0,.2,1);
    height:100vh;
    top:0;
    overflow-y:auto;
    padding:60px 14px 20px;
    box-shadow:4px 0 30px rgba(0,0,0,.4);
  }
  .tecrm-sidebar.mobile-open{left:0}

  /* Show hamburger */
  .tecrm-hamburger{display:flex}

  /* Main content: full width, top padding for hamburger */
  .tecrm-main{
    padding:58px 14px 24px;
    width:100%;
    min-width:0;
  }

  /* Top bar */
  .tecrm-top{
    flex-direction:column;
    gap:10px;
    align-items:stretch;
    margin-bottom:14px;
  }
  .tecrm-top-right{flex-wrap:wrap;gap:6px}
  .tecrm-search-bar{width:100%}
  .tecrm-search-bar input{width:100%}

  /* Page heading */
  .tecrm-title{font-size:26px;margin-bottom:4px}
  .tecrm-page-head{margin-bottom:16px}
  .tecrm-page-head h1{font-size:22px}

  /* KPI cards: 2 columns */
  .tecrm-dash-kpis{grid-template-columns:1fr 1fr;gap:10px}
  .tecrm-kpi{min-height:100px;padding:14px}
  .tecrm-kpi strong{font-size:22px}

  /* Cards */
  .tecrm-card{padding:14px;border-radius:12px}

  /* Dashboard panels: single column */
  .tecrm-dash-panels{grid-template-columns:1fr;gap:14px}

  /* Action bar: stack on mobile */
  .tecrm-actions{
    flex-direction:column;
    align-items:stretch;
    gap:8px;
  }
  .tecrm-actions .tecrm-input,
  .tecrm-actions input[type=text],
  .tecrm-actions input[type=search]{
    width:100%;
  }
  .tecrm-actions .tecrm-btn{width:100%;justify-content:center}

  /* Page-head buttons */
  .tecrm-page-head{flex-direction:column;gap:10px;align-items:stretch}
  .tecrm-page-head .tecrm-btn{width:100%;justify-content:center;padding:13px}

  /* Tables: horizontal scroll */
  .tecrm-table-wrap,.tecrm-generic-table-wrap{
    overflow-x:auto;-webkit-overflow-scrolling:touch;
    border-radius:10px;
  }
  table{min-width:500px}
  .tecrm-table th,.tecrm-table td{
    padding:10px 10px;font-size:12px;white-space:nowrap
  }

  /* Forms */
  .tecrm-form-grid{grid-template-columns:1fr!important}
  .tecrm-input,.tecrm-select,.tecrm-btn{
    min-height:44px;font-size:15px;
  }
  .tecrm-input{padding:11px 14px}
  .tecrm-label{font-size:11px}

  /* Modals: full screen */
  .tecrm-modal{
    padding:0;align-items:flex-end;
  }
  .tecrm-modal-inner{
    width:100%!important;max-width:100%!important;
    border-radius:18px 18px 0 0;
    max-height:92vh;overflow-y:auto;
    padding:20px 16px 32px;
    margin:0;
  }
  .tecrm-modal-head{margin-bottom:16px}

  /* Order cards */
  .tecrm-order-card.rich{grid-template-columns:1fr}
  .tecrm-order-details{grid-template-columns:1fr 1fr}
  .tecrm-order-actions{flex-wrap:wrap;gap:6px}
  .tecrm-order-actions .tecrm-btn{flex:1;min-width:120px;justify-content:center}

  /* Profile */
  .tecrm-profile-layout{grid-template-columns:1fr}
  .tecrm-profile-card{text-align:center}

  /* Department cards */
  .tecrm-dept-grid{grid-template-columns:1fr!important}

  /* Material summary */
  .tecrm-material-summary{grid-template-columns:1fr}

  /* Settings sections */
  .tecrm-settings-block{margin-bottom:16px}
  .tecrm-settings-grid{grid-template-columns:1fr!important}

  /* Reports */
  .tecrm-report-grid{grid-template-columns:1fr!important}

  /* Calendar */
  .tecrm-cal-grid{grid-template-columns:repeat(7,1fr);font-size:11px}
  .tecrm-cal-day{min-height:50px;padding:4px 3px}

  /* Pills / badges: wrap */
  .tecrm-module-pills{flex-wrap:wrap;gap:4px}

  /* Generic grid fallback */
  [style*="grid-template-columns:repeat(auto-fill"]{
    grid-template-columns:1fr!important
  }

  /* Enquiry / dept card button column: inline on mobile */
  .tecrm-card [style*="flex-direction:column"]{
    flex-direction:row!important;flex-wrap:wrap
  }

  /* Toast messages */
  .tecrm-toast{
    position:fixed;bottom:16px;left:50%;transform:translateX(-50%);
    width:90%;max-width:360px;z-index:2000;text-align:center;
  }

  /* AI panel */
  .tecrm-ai-panel{
    width:100%!important;right:0!important;left:0!important;
    border-radius:18px 18px 0 0;bottom:0;top:auto!important;
    max-height:80vh;
  }

  /* Sidebar brand */
  .tecrm-brand{padding-bottom:12px;margin-bottom:12px}
  .tecrm-logo{width:38px;height:38px}
}

/* ── SMALL MOBILE: ≤480px ── */
@media(max-width:480px){
  .tecrm-main{padding:54px 10px 20px}
  .tecrm-dash-kpis{grid-template-columns:1fr 1fr;gap:8px}
  .tecrm-kpi{min-height:90px;padding:12px}
  .tecrm-kpi strong{font-size:18px}
  .tecrm-card{padding:12px;border-radius:10px}
  .tecrm-page-head h1{font-size:19px}
  .tecrm-modal-inner{padding:16px 12px 28px}
  .tecrm-order-details{grid-template-columns:1fr}
  table{min-width:400px}
  .tecrm-table th,.tecrm-table td{padding:8px 8px;font-size:11px}
  .tecrm-btn{padding:11px 16px;font-size:13px}
  /* 1 column KPIs on very small */
  .tecrm-dash-kpis{grid-template-columns:1fr 1fr}
  .tecrm-top-right .tecrm-btn{padding:9px 12px;font-size:12px}
}

/* ── PRINT ── */
@media print{
  .tecrm-sidebar,.tecrm-hamburger,.tecrm-sidebar-overlay,
  .tecrm-top,.tecrm-actions,.no-print,.tecrm-ai-panel{display:none!important}
  .tecrm-main{padding:0}
  .tecrm-shell{display:block}
  .tecrm-card{box-shadow:none;border:1px solid #ddd}
  table{min-width:unset}
}
