/* HEFO-CRM 2026 — v2026.09.03.8
   Clean redesign inspired by modern modular CRM information architecture.
   No third-party runtime CSS or CDN dependency. */
:root{
  color-scheme:dark;
  --hf-bg:#070a0f;
  --hf-sidebar:#0b0f15;
  --hf-sidebar-2:#0e131b;
  --hf-panel:#111720;
  --hf-panel-2:#151c27;
  --hf-panel-3:#192230;
  --hf-border:rgba(255,255,255,.075);
  --hf-border-strong:rgba(255,255,255,.13);
  --hf-text:#f5f7fa;
  --hf-text-2:#d8dee8;
  --hf-muted:#8490a2;
  --hf-muted-2:#667286;
  --hf-red:#ef1d2b;
  --hf-red-2:#c70b16;
  --hf-red-soft:rgba(239,29,43,.12);
  --hf-green:#36c978;
  --hf-yellow:#f2b84b;
  --hf-blue:#65a7ff;
  --hf-danger:#ff5361;
  --hf-shadow:0 22px 60px rgba(0,0,0,.32);
  --hf-shadow-sm:0 10px 28px rgba(0,0,0,.20);
  --hf-radius:16px;
  --hf-radius-sm:11px;
  --hf-sidebar-w:236px;
  --hf-topbar-h:70px;
  --hf-font:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
}
*{box-sizing:border-box}
html,body{margin:0;min-width:0;min-height:100%;background:var(--hf-bg);font-family:var(--hf-font);color:var(--hf-text)}
html{font-size:16px}
body{background:
  radial-gradient(900px 520px at 70% -180px,rgba(239,29,43,.08),transparent 66%),
  radial-gradient(900px 700px at 100% 100%,rgba(61,86,120,.07),transparent 65%),
  var(--hf-bg);}
a{color:inherit}
button,input,select,textarea{font:inherit}
button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}
button{cursor:pointer}
img{max-width:100%;display:block}
[hidden]{display:none!important}

/* ---------- Global app shell ---------- */
.hefo-app-page,.crm-premium-page{height:100dvh;min-height:0;overflow:hidden}
.hefo-app-shell{height:100dvh;min-height:0;display:grid;grid-template-columns:var(--hf-sidebar-w) minmax(0,1fr)}
.hefo-sidebar{position:relative;z-index:20;min-width:0;height:100dvh;padding:18px 13px 14px;display:flex;flex-direction:column;border-right:1px solid var(--hf-border);background:linear-gradient(180deg,var(--hf-sidebar),#090d13 72%,#080b10);box-shadow:12px 0 44px rgba(0,0,0,.12)}
.hefo-brand{height:72px;padding:7px 8px;display:flex;align-items:center;gap:11px;text-decoration:none;border-radius:14px}
.hefo-brand img{width:69px;height:48px;object-fit:contain;filter:drop-shadow(0 8px 18px rgba(0,0,0,.45))}
.hefo-brand-copy{display:flex;min-width:0;flex-direction:column}
.hefo-brand-copy strong{font-size:14px;line-height:1.1;letter-spacing:.07em;color:#fff}
.hefo-brand-copy span{margin-top:5px;font-size:9.5px;line-height:1;color:var(--hf-muted);white-space:nowrap}
.hefo-sidebar-label{padding:14px 11px 7px;color:#566175;font-size:9px;font-weight:800;text-transform:uppercase;letter-spacing:.16em}
.hefo-nav{display:flex;flex-direction:column;gap:4px}
.hefo-nav-item{position:relative;min-height:42px;padding:0 11px;display:flex;align-items:center;gap:10px;border:1px solid transparent;border-radius:11px;color:#a9b2c1;font-size:12px;font-weight:700;text-decoration:none;transition:background .16s ease,border-color .16s ease,color .16s ease,transform .16s ease}
.hefo-nav-item svg{width:17px;height:17px;flex:0 0 17px;stroke:currentColor;opacity:.86}
.hefo-nav-item:hover{color:#f2f5f8;background:rgba(255,255,255,.045);transform:translateX(1px)}
.hefo-nav-item.is-active{color:#fff;background:linear-gradient(90deg,rgba(239,29,43,.14),rgba(239,29,43,.055));border-color:rgba(239,29,43,.18)}
.hefo-nav-item.is-active:before{content:"";position:absolute;left:-14px;width:3px;height:21px;border-radius:0 5px 5px 0;background:var(--hf-red);box-shadow:0 0 16px rgba(239,29,43,.48)}
.hefo-nav-spacer{flex:1}
.hefo-sidebar-profile{margin:10px 2px 0;padding:11px;border:1px solid var(--hf-border);border-radius:13px;background:rgba(255,255,255,.025)}
.hefo-profile-row{display:flex;align-items:center;gap:9px}
.hefo-avatar{width:31px;height:31px;display:grid;place-items:center;border-radius:9px;background:linear-gradient(145deg,#252f3d,#161d27);border:1px solid var(--hf-border-strong);color:#fff;font-size:11px;font-weight:900}
.hefo-profile-copy{min-width:0;display:flex;flex:1;flex-direction:column}
.hefo-profile-copy strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#e9edf3;font-size:11px}
.hefo-profile-copy span{margin-top:2px;color:var(--hf-muted);font-size:9.5px;text-transform:capitalize}
.hefo-logout-mini{width:30px;height:30px;display:grid;place-items:center;border:0;border-radius:9px;background:transparent;color:#788498;text-decoration:none;transition:.16s ease}
.hefo-logout-mini:hover{background:rgba(239,29,43,.10);color:#ff6c77}
.hefo-logout-mini svg{width:16px;height:16px;stroke:currentColor}

.hefo-main{min-width:0;min-height:0;height:100dvh;display:grid;grid-template-rows:var(--hf-topbar-h) minmax(0,1fr)}
.hefo-topbar{min-width:0;height:var(--hf-topbar-h);padding:0 22px;display:flex;align-items:center;justify-content:space-between;gap:18px;border-bottom:1px solid var(--hf-border);background:rgba(8,12,18,.84);backdrop-filter:blur(18px)}
.hefo-page-title{min-width:0}
.hefo-page-title small{display:block;margin-bottom:4px;color:#697589;font-size:9px;font-weight:850;letter-spacing:.14em;text-transform:uppercase}
.hefo-page-title h1{margin:0;color:#f8f9fb;font-size:19px;line-height:1.1;letter-spacing:-.02em;font-weight:780}
.hefo-top-actions{display:flex;align-items:center;gap:8px}
.hefo-top-chip{min-height:31px;padding:0 10px;display:inline-flex;align-items:center;gap:7px;border:1px solid var(--hf-border);border-radius:10px;background:rgba(255,255,255,.025);color:#9ca7b8;font-size:10.5px;font-weight:750;white-space:nowrap}
.hefo-top-chip .dot{width:6px;height:6px;border-radius:50%;background:var(--hf-green);box-shadow:0 0 0 4px rgba(54,201,120,.09)}
.hefo-content{min-width:0;min-height:0;overflow:hidden;padding:14px 16px 16px}
.hefo-page-scroll{height:100%;min-height:0;overflow:auto;padding-right:3px;scrollbar-width:thin;scrollbar-color:#2b3442 transparent}

/* ---------- Loader / progress ---------- */
.crm-page-loader,.hefo-page-loader{position:fixed;inset:0;z-index:9999;display:grid;place-items:center;background:#070a0f;transition:opacity .30s ease,visibility .30s ease}
.crm-page-loader.is-hidden,.hefo-page-loader.is-hidden{opacity:0;visibility:hidden;pointer-events:none}
.crm-page-loader__card,.hefo-loader-card{text-align:center;animation:hfLoaderEnter .42s cubic-bezier(.2,.8,.2,1) both}
.hefo-loader-logo{width:156px;margin:0 auto 18px;filter:drop-shadow(0 18px 34px rgba(0,0,0,.52))}
.crm-loader-mark,.hefo-loader-bars{height:42px;display:flex;align-items:center;justify-content:center;gap:5px;margin-bottom:11px}
.crm-loader-mark span,.hefo-loader-bars span{width:6px;border-radius:999px;background:linear-gradient(180deg,#ff4451,var(--hf-red-2));box-shadow:0 0 18px rgba(239,29,43,.20);animation:hfBars 1s ease-in-out infinite}
.crm-loader-mark span:nth-child(1),.hefo-loader-bars span:nth-child(1){height:19px;animation-delay:-.22s}
.crm-loader-mark span:nth-child(2),.hefo-loader-bars span:nth-child(2){height:37px}
.crm-loader-mark span:nth-child(3),.hefo-loader-bars span:nth-child(3){height:25px;animation-delay:-.44s}
.crm-loader-title,.hefo-loader-title{font-size:16px;font-weight:900;letter-spacing:.08em;color:#fff}
.crm-loader-subtitle,.hefo-loader-subtitle{margin-top:5px;color:#697589;font-size:10px}
.crm-fetch-progress{position:fixed;top:0;left:var(--hf-sidebar-w);right:0;z-index:10000;height:2px;overflow:hidden;opacity:0;pointer-events:none;transition:opacity .12s ease}
.crm-fetch-progress.is-active{opacity:1}
.crm-fetch-progress span{display:block;width:32%;height:100%;background:linear-gradient(90deg,transparent,var(--hf-red),#fff,var(--hf-red),transparent);filter:drop-shadow(0 0 6px rgba(239,29,43,.7));animation:hfProgress 1.0s ease-in-out infinite}

/* ---------- Cards and section headers ---------- */
.panel,.hefo-card{min-width:0;border:1px solid var(--hf-border);border-radius:var(--hf-radius);background:linear-gradient(180deg,rgba(19,26,36,.98),rgba(14,20,28,.98));box-shadow:var(--hf-shadow-sm),inset 0 1px 0 rgba(255,255,255,.025)}
.panel{padding:14px 15px;margin:0}
.panel-heading-row,.hefo-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:10px}
.panel-heading-compact{align-items:center;margin-bottom:8px}
.panel-kicker,.hefo-kicker{margin:0 0 4px;color:#68758a;font-size:9px;font-weight:850;letter-spacing:.14em;text-transform:uppercase}
.panel-title,.hefo-card-title{margin:0;color:#f6f8fb;font-size:16px;line-height:1.15;font-weight:760;letter-spacing:-.015em}
.status-pill,.hefo-badge{min-height:24px;padding:0 8px;display:inline-flex;align-items:center;gap:6px;border:1px solid var(--hf-border);border-radius:999px;background:rgba(255,255,255,.025);color:#8e99aa;font-size:8.7px;font-weight:850;letter-spacing:.08em;white-space:nowrap}
.status-pill-live,.hefo-badge-success{color:#75e7a6;border-color:rgba(54,201,120,.22);background:rgba(54,201,120,.065)}
.status-pill-live:before,.hefo-badge-success:before{content:"";width:5px;height:5px;border-radius:50%;background:var(--hf-green);box-shadow:0 0 0 4px rgba(54,201,120,.08)}
.note,.helper,.field-help,.auth-hint{color:var(--hf-muted);font-size:10.5px;line-height:1.45}
.section-mini-title{color:#6f7b8f;font-size:9px;font-weight:850;letter-spacing:.13em;text-transform:uppercase}

/* ---------- Inputs ---------- */
.form-row{min-width:0;margin:0;display:grid;grid-template-columns:105px minmax(0,1fr);align-items:center;gap:8px}
.form-row>label,.label,.form-group label{color:#aab4c4;font-size:10.5px;line-height:1.15;font-weight:700}
.form-row-inputs{min-width:0;display:flex;align-items:center;gap:7px}
.form-group{display:grid;gap:6px}
input[type="text"],input[type="number"],input[type="email"],input[type="password"],input[type="date"],input[type="time"],input[type="datetime-local"],input[type="month"],select,textarea,.login-input,.register-input,.history-text,.history-date,.history-time{width:100%;min-width:0;height:35px;padding:7px 10px;border:1px solid var(--hf-border-strong);border-radius:9px;background:#0b1017;color:#edf1f6;font-size:11.5px;outline:none;box-shadow:inset 0 1px 0 rgba(255,255,255,.02);transition:border-color .15s ease,box-shadow .15s ease,background .15s ease}
textarea{height:auto;min-height:74px;resize:vertical}
input::placeholder,textarea::placeholder{color:#526075}
input:focus,select:focus,textarea:focus,.login-input:focus,.register-input:focus{border-color:rgba(239,29,43,.68);background:#0d131b;box-shadow:0 0 0 3px rgba(239,29,43,.10)}
input:disabled,select:disabled{color:#677386;background:#0b0f15;border-style:dashed;cursor:not-allowed}
input[type="checkbox"],input[type="radio"]{accent-color:var(--hf-red)}
.inline-expiration-option{width:auto!important;display:inline-flex!important;align-items:center;gap:6px;color:#8f9aaa!important;font-size:9.8px!important;white-space:nowrap}
.inline-expiration-option input{width:auto;height:auto}

/* ---------- Buttons ---------- */
.btn,button,input[type="submit"],.login-button,.register-button{min-height:35px;padding:7px 12px;border:1px solid var(--hf-border);border-radius:9px;background:#222c3a;color:#eef2f7;font-size:10.8px;font-weight:800;line-height:1;text-decoration:none;white-space:nowrap;box-shadow:none;transition:transform .14s ease,background .14s ease,border-color .14s ease,box-shadow .14s ease,filter .14s ease}
.btn:hover,button:hover,input[type="submit"]:hover,.login-button:hover,.register-button:hover{transform:translateY(-1px);border-color:rgba(255,255,255,.16);box-shadow:0 8px 20px rgba(0,0,0,.18)}
.btn:active,button:active,input[type="submit"]:active{transform:translateY(0) scale(.985)}
.btn-primary,.login-button,.register-button{border-color:rgba(239,29,43,.55)!important;background:linear-gradient(180deg,#f22937,#c90915)!important;color:#fff!important;box-shadow:0 8px 18px rgba(239,29,43,.14)!important}
.btn-secondary,.btn-outline{background:#202938!important;color:#e9eef5!important}
.btn-warning,.btn-delete,.btn-delete-account{background:rgba(255,83,97,.11)!important;border-color:rgba(255,83,97,.22)!important;color:#ff8b95!important}
.btn-edit,.btn-activate-account{background:rgba(101,167,255,.10)!important;border-color:rgba(101,167,255,.20)!important;color:#8fc0ff!important}
.btn-icon{width:35px;min-width:35px;padding:0;display:grid;place-items:center}
.form-row-submit{display:flex;justify-content:flex-end;gap:8px}

/* ---------- Dashboard ---------- */
.crm-dashboard{height:100%;min-height:0;display:grid;grid-template-rows:306px minmax(0,1fr);gap:12px}
.crm-top-grid{min-width:0;min-height:0;display:grid;grid-template-columns:minmax(390px,.72fr) minmax(670px,1.28fr);gap:12px}
.crm-quick-stack{min-height:0;display:grid;grid-template-rows:1fr 1fr;gap:12px}
.crm-quick-panel{min-height:0;overflow:hidden}
.crm-inline-row{grid-template-columns:70px minmax(0,1fr)}
.crm-result-slot{min-height:0;max-height:70px;margin-top:8px;overflow:auto;border-radius:10px;scrollbar-width:thin}
.crm-result-slot:empty{display:none}
.crm-result-slot.is-success,.verification-result.is-success{border:1px solid rgba(54,201,120,.24);background:rgba(54,201,120,.08);color:#dff8e9}
.crm-result-slot.is-warning,.verification-result.is-warning{border:1px solid rgba(242,184,75,.25);background:rgba(242,184,75,.08);color:#ffe4a8}
.crm-result-slot.is-error,.verification-result.is-error{border:1px solid rgba(255,83,97,.25);background:rgba(255,83,97,.08);color:#ffd9dd}
.crm-add-panel{min-height:0;overflow:hidden}
.crm-user-grid-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 12px;align-content:start}
.crm-user-grid-form .form-row{min-height:36px}
.crm-user-grid-form .form-row-inputs{width:100%}
.crm-user-grid-form .field-expiration{align-items:start}
.crm-user-grid-form .field-expiration .field-help{grid-column:2;margin-top:-3px}
.crm-form-action{grid-column:1/-1;grid-template-columns:1fr;justify-items:end}
.crm-data-workspace{min-width:0;min-height:0;display:grid;grid-template-rows:43px minmax(0,1fr);overflow:hidden;border:1px solid var(--hf-border);border-radius:var(--hf-radius);background:linear-gradient(180deg,rgba(14,20,28,.98),rgba(10,15,21,.98));box-shadow:var(--hf-shadow-sm)}
.crm-tabbar{min-width:0;display:flex;align-items:center;gap:3px;padding:5px 7px;border-bottom:1px solid var(--hf-border);background:#0d131b}
.crm-tab{min-height:31px;padding:0 12px;border:1px solid transparent;background:transparent;border-radius:8px;color:#7f8b9d;font-size:10.5px;font-weight:800;box-shadow:none}
.crm-tab:hover{background:rgba(255,255,255,.035);color:#dce2ea;transform:none}
.crm-tab.is-active{border-color:rgba(239,29,43,.18);background:var(--hf-red-soft);color:#fff}
.crm-tab-stage{min-width:0;min-height:0;overflow:hidden}
.crm-tab-panel{height:100%;min-width:0;min-height:0;padding:9px;display:grid;grid-template-rows:auto minmax(0,1fr);gap:7px;animation:hfTabIn .20s ease both}
.crm-tab-panel:not(.is-active){display:none!important}
.crm-stats-strip{min-width:0;min-height:38px;padding:5px 10px;display:flex;align-items:center;gap:15px;border:1px solid var(--hf-border);border-radius:10px;background:rgba(255,255,255,.018)}
#countsSummary,.crm-counts-summary{min-width:0;display:flex;flex:1;align-items:center;justify-content:flex-end;gap:17px;overflow:hidden;color:#cfd6df;font-size:10px}
#countsSummary p{margin:0;padding:0;white-space:nowrap}
.crm-table-panel{min-height:0;padding:10px 11px!important;display:grid;grid-template-rows:auto minmax(0,1fr);overflow:hidden}
.crm-table-scroll,.table-responsive{min-width:0;min-height:0;overflow:auto;scrollbar-width:thin;scrollbar-color:#2a3443 transparent}
.user-list-panel{padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important}
.user-filter-form{display:grid;grid-template-columns:repeat(4,minmax(0,1fr)) auto;gap:6px;margin-bottom:7px}
.user-filter-form .form-row{grid-template-columns:auto minmax(0,1fr);gap:5px}
.user-filter-form input,.user-filter-form select{height:30px;padding:5px 8px;font-size:10px}
.user-filter-submit{display:block}
.user-filter-submit .btn{min-height:30px;height:30px;padding:5px 10px}
.crm-filter-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px 9px;margin-bottom:7px}
.crm-filter-grid .form-row{grid-template-columns:64px minmax(0,1fr)}
.crm-filter-grid .form-row-submit{grid-template-columns:1fr;justify-items:stretch}
.crm-filter-grid .form-row-submit .btn{width:100%}

/* ---------- Tables ---------- */
table,.table,.user-table{width:100%;border-collapse:separate;border-spacing:0;background:transparent;font-size:10.2px}
th,td{padding:6px 7px;border-bottom:1px solid rgba(255,255,255,.055);color:#d7dde6;line-height:1.15;text-align:left;white-space:nowrap}
th{position:sticky;top:0;z-index:2;background:#141b25;color:#78869a;font-size:8.8px;font-weight:850;letter-spacing:.055em;text-transform:uppercase}
tbody tr:hover td{background:rgba(255,255,255,.022)}
.user-actions{display:flex;gap:4px}.user-actions .btn{min-height:25px;padding:5px 7px;font-size:9px}
.pagination{display:flex;align-items:center;justify-content:center;gap:8px;margin-top:6px;color:#778397;font-size:9.5px}
.page-link{padding:4px 7px;border-radius:7px;background:rgba(255,255,255,.035);color:#d6dde6;text-decoration:none}.page-link:hover{background:rgba(255,255,255,.07)}
.alert-container,.verification-result,.error,.ok,.login-warning,.flash-crm{border-radius:10px;font-size:10.5px;line-height:1.35}
.flash-crm{position:fixed;top:80px;right:18px;z-index:3000;max-width:460px;padding:10px 12px;border:1px solid rgba(54,201,120,.20);background:rgba(15,31,23,.96);color:#e8fff0;box-shadow:var(--hf-shadow);animation:hfToastIn .25s ease both,hfToastOut .3s ease 4.8s forwards}

/* ---------- Edit modal ---------- */
.crm-edit-slot:empty{display:none}.crm-edit-slot:not(:empty){position:fixed;inset:0;z-index:4000;display:grid;place-items:center;padding:24px;background:rgba(2,4,8,.74);backdrop-filter:blur(12px);animation:hfFade .16s ease both}
.crm-edit-slot #editContainer{position:relative;width:min(900px,calc(100vw - 48px));max-height:min(760px,calc(100dvh - 54px));overflow:auto;padding:18px!important;box-shadow:0 30px 90px rgba(0,0,0,.58)}
.crm-edit-slot #editForm{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 13px}
.crm-edit-slot #editForm .form-row-submit{grid-column:1/-1}
.crm-edit-close{position:absolute;top:12px;right:12px;z-index:2}

/* ---------- Secondary secure pages ---------- */
.hefo-page-grid{display:grid;gap:12px}.hefo-page-grid.two{grid-template-columns:minmax(320px,.72fr) minmax(0,1.28fr)}
.hefo-page-card{padding:16px;border:1px solid var(--hf-border);border-radius:var(--hf-radius);background:linear-gradient(180deg,#121923,#0e141c);box-shadow:var(--hf-shadow-sm)}
.hefo-page-card h2,.hefo-page-card h3{margin:0 0 10px;font-size:16px;color:#fff}
.hefo-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 12px}.hefo-form-grid .full{grid-column:1/-1}
.hefo-form-field{display:grid;gap:6px}.hefo-form-field label{color:#9eabba;font-size:10px;font-weight:750}
.hefo-inline-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.hefo-page-table{min-height:0;overflow:auto;border:1px solid var(--hf-border);border-radius:12px;background:#0d131b}

/* Holidays */
.calendar-controls{display:flex;align-items:center;gap:7px;margin:8px 0}.calendar{display:grid!important;grid-template-columns:repeat(7,minmax(0,1fr))!important;gap:7px!important}.calendar .dow{padding:6px;color:#677589;font-size:9px;font-weight:850;text-align:center;text-transform:uppercase}.calendar .tile{min-width:0!important;min-height:70px!important;padding:8px!important;border:1px solid var(--hf-border)!important;border-radius:11px!important;background:#0c121a!important;color:#dce2ea!important;transition:.14s ease}.calendar .tile:hover{border-color:rgba(239,29,43,.26)!important;background:#111925!important;transform:translateY(-1px)}.calendar .tile.is-selected,.calendar .tile.active-holiday{border-color:rgba(239,29,43,.42)!important;background:rgba(239,29,43,.10)!important}.calendar .placeholder{opacity:.25}.date-big{font-size:16px!important;font-weight:800}.date-sub{margin-top:2px;color:#68758a!important;font-size:8.5px!important}.checkline{margin-top:7px;color:#8f9aac!important;font-size:9px!important}

/* Password page compatibility */
.container-narrow{width:min(740px,100%);margin:0 auto}.card{padding:18px;border:1px solid var(--hf-border);border-radius:var(--hf-radius);background:linear-gradient(180deg,#121923,#0e141c);box-shadow:var(--hf-shadow-sm)}.page-title{margin:0 0 12px;color:#fff;font-size:20px}.input-wrap{display:flex;gap:7px}.input-action{flex:0 0 auto}.meta{display:flex;gap:6px;flex-wrap:wrap;margin-top:7px}.badge{display:inline-flex;padding:4px 7px;border:1px solid var(--hf-border);border-radius:999px;background:rgba(255,255,255,.025);color:#8d99a9;font-size:9px}.strength{height:6px;overflow:hidden;border-radius:999px;background:#0a0f15}.strength>div{height:100%;width:0;background:linear-gradient(90deg,var(--hf-red),var(--hf-yellow),var(--hf-green));transition:width .2s ease}.str-label,.req{color:#8490a1;font-size:10px}.btn-row{display:flex;gap:8px;justify-content:flex-end}.back-link{display:inline-flex;margin-top:10px;color:#8490a2;font-size:10px;text-decoration:none}

/* ---------- Auth ---------- */
.hefo-auth-page{min-height:100dvh;display:grid;place-items:center;padding:28px;overflow:auto;background:radial-gradient(700px 420px at 50% 20%,rgba(239,29,43,.09),transparent 70%),#070a0f}
.hefo-auth-shell{width:min(940px,calc(100vw - 36px));min-height:560px;display:grid;grid-template-columns:1.08fr .92fr;overflow:hidden;border:1px solid var(--hf-border);border-radius:24px;background:#0c1118;box-shadow:0 35px 100px rgba(0,0,0,.48)}
.hefo-auth-brand{position:relative;padding:42px;display:flex;flex-direction:column;justify-content:space-between;background:radial-gradient(540px 420px at 50% 10%,rgba(239,29,43,.11),transparent 65%),linear-gradient(155deg,#0e141d,#090d13)}
.hefo-auth-brand:after{content:"";position:absolute;right:0;top:0;bottom:0;width:1px;background:var(--hf-border)}
.hefo-auth-logo{width:190px}.hefo-auth-copy h1{margin:0 0 10px;font-size:31px;line-height:1.04;letter-spacing:-.04em}.hefo-auth-copy p{max-width:420px;margin:0;color:#758296;font-size:12px;line-height:1.6}.hefo-auth-version{color:#536074;font-size:9.5px;letter-spacing:.04em}
.hefo-auth-card,.login-container,.register-container{width:auto!important;margin:0!important;padding:42px!important;display:flex;flex-direction:column;justify-content:center;border:0!important;border-radius:0!important;background:#0c1118!important;box-shadow:none!important}
.login-title,.register-title{margin:0 0 7px!important;color:#fff!important;font-size:23px!important;text-align:left!important;letter-spacing:-.03em}.auth-kicker{margin-bottom:6px;color:#69768a;font-size:9px;font-weight:850;letter-spacing:.14em}.auth-version{margin-bottom:20px!important;color:#536074!important;font-size:9.5px!important;text-align:left!important}.login-form,.register-form{display:grid;gap:12px}.login-button,.register-button{width:100%;min-height:40px;margin-top:3px}.login-register-text,.register-login-text{margin:15px 0 0!important;color:#677386!important;font-size:10px!important;text-align:center!important}.login-register-link,.register-login-link{color:#c9d2df!important;text-decoration:none!important}.login-logo-container{display:none!important}.auth-optional{color:#596579;font-weight:500}.login-warning{margin-bottom:12px;padding:9px 10px;border:1px solid rgba(255,83,97,.20);background:rgba(255,83,97,.07);color:#ffb4bb}

/* ---------- Simple legacy page compatibility ---------- */
.content{min-width:0}.container{width:min(1500px,calc(100vw - 36px));margin:16px auto}.site-header{display:none}.unique-footer{display:none}.radio-group{display:flex;gap:12px}.table-responsive{max-width:100%}
.crm-skeleton{display:grid;gap:6px;padding:5px}.crm-skeleton span{height:23px;border-radius:7px;background:linear-gradient(90deg,rgba(255,255,255,.025) 20%,rgba(255,255,255,.065) 45%,rgba(255,255,255,.025) 70%);background-size:260% 100%;animation:hfShimmer 1.15s linear infinite}

/* ---------- Heatmap ---------- */
.hefo-heat-grid{display:grid;grid-template-columns:repeat(14,minmax(42px,1fr));gap:6px}.hefo-heat-cell{min-height:46px;border:1px solid rgba(255,255,255,.06);border-radius:9px;display:flex;align-items:center;justify-content:center;color:#081018;font-size:9px;font-weight:850;transition:transform .13s ease}.hefo-heat-cell:hover{transform:translateY(-2px)}

/* ---------- Monthly notice ---------- */
.notice{position:fixed!important;top:82px!important;right:18px!important;left:auto!important;z-index:3600!important;width:min(440px,calc(100vw - 36px))!important;margin:0!important;padding:13px 14px!important;display:flex!important;gap:10px!important;align-items:flex-start!important;border:1px solid rgba(242,184,75,.20)!important;border-radius:13px!important;background:rgba(25,22,14,.96)!important;box-shadow:var(--hf-shadow)!important}.notice__icon{width:33px!important;height:33px!important}.notice__title{font-size:12px!important}.notice__desc{margin:3px 0 0!important;color:#ad9e7b!important;font-size:9.8px!important;line-height:1.4!important}.notice__actions{display:flex!important;gap:6px!important}.notice .btn-link,.notice .btn-ghost{min-height:29px!important;padding:6px 9px!important;font-size:9px!important}.notice__close{position:absolute;right:5px;top:4px}

/* ---------- Animations ---------- */
@keyframes hfBars{0%,100%{transform:scaleY(.72);opacity:.55}50%{transform:scaleY(1.08);opacity:1}}
@keyframes hfProgress{0%{transform:translateX(-130%)}100%{transform:translateX(430%)}}
@keyframes hfLoaderEnter{from{opacity:0;transform:translateY(9px) scale(.98)}to{opacity:1;transform:none}}
@keyframes hfTabIn{from{opacity:0;transform:translateY(3px)}to{opacity:1;transform:none}}
@keyframes hfToastIn{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:none}}
@keyframes hfToastOut{to{opacity:0;transform:translateY(-5px);visibility:hidden}}
@keyframes hfFade{from{opacity:0}to{opacity:1}}
@keyframes hfShimmer{0%{background-position:120% 0}100%{background-position:-120% 0}}

/* Legacy responsive fallback removed in 2.1; the definitive adaptive layer is at the end of this file. */
.hefo-page-scroll>.container{width:100%;max-width:none;margin:0;padding:0}.hefo-page-scroll>.container>h2{margin:0 0 5px;font-size:17px;color:#fff}.hefo-page-scroll>.container>h3{margin:12px 0 7px;font-size:13px;color:#dfe5ed}.hefo-page-scroll>.container>.note{margin:0 0 12px;padding:10px 12px;border:1px solid var(--hf-border);border-left:3px solid var(--hf-red);border-radius:10px;background:rgba(239,29,43,.045)}

/* =====================================================================
   HEFO-CRM 1.9.7 — NEW 2026 WORKSPACE LAYER
   The legacy visual system is intentionally not used by primary pages.
   Information architecture follows a modern CRM pattern: persistent
   navigation, task-focused cards, dense tables and contextual settings.
   ===================================================================== */
:root{
  --hf-bg:#07090d;
  --hf-sidebar:#0a0e14;
  --hf-panel:#10161f;
  --hf-panel-2:#141b25;
  --hf-panel-3:#19222e;
  --hf-border:rgba(255,255,255,.075);
  --hf-red:#f01b2a;
  --hf-red-2:#bf0712;
  --hf-sidebar-w:244px;
  --hf-topbar-h:72px;
}
body{letter-spacing:-.006em}
.hefo-sidebar{padding:16px 12px 14px;background:linear-gradient(180deg,#0b1017 0%,#080b10 100%)}
.hefo-brand{height:76px}
.hefo-brand img{width:74px;height:52px}
.hefo-brand-copy strong{font-size:13px;letter-spacing:.08em}
.hefo-nav-item{font-size:11.5px;min-height:40px}
.hefo-main{background:linear-gradient(180deg,rgba(255,255,255,.008),transparent 25%)}
.hefo-topbar{padding-inline:24px;background:rgba(7,10,15,.88)}
.hefo-content{padding:14px 16px 16px}

/* Generic page canvas: page itself never scrolls on desktop; content areas do. */
.hefo-page-canvas{height:100%;min-height:0;min-width:0;overflow:hidden;display:grid;gap:12px}
.hefo-page-canvas-narrow{grid-template-columns:minmax(0,760px);align-content:start;justify-content:center;padding-top:min(5vh,38px);overflow:auto}
.hefo-card{min-width:0}
.hefo-form-card{padding:18px 19px}
.hefo-card-copy{margin:5px 0 0;max-width:680px;color:var(--hf-muted);font-size:10.5px;line-height:1.55}
.hefo-form-grid{display:grid;gap:12px;min-width:0}
.hefo-form-grid-2{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 12px}
.hefo-form-actions{grid-column:1/-1;display:flex;justify-content:flex-end;align-items:center;gap:8px;margin-top:3px}
.form-group{min-width:0;display:grid;gap:6px}
.form-group>label{color:#b7c0cd;font-size:10.5px;font-weight:760}
.form-group small,.field-muted{color:#69768a;font-size:9.5px;line-height:1.4;font-weight:500}
.form-group.is-disabled{opacity:.56}
input,select,textarea{width:100%;min-width:0;border:1px solid var(--hf-border-strong);border-radius:10px;background:#0d131b;color:#edf1f6;outline:0;padding:9px 10px;font-size:11px;transition:border-color .14s ease,box-shadow .14s ease,background .14s ease}
input,select{height:38px}
textarea{resize:vertical;min-height:80px}
input:hover,select:hover,textarea:hover{border-color:rgba(255,255,255,.18)}
input:focus,select:focus,textarea:focus{border-color:rgba(240,27,42,.62);box-shadow:0 0 0 3px rgba(240,27,42,.10);background:#0e151e}
input:disabled{cursor:not-allowed;color:#748095;background:#0a0f15}
.input-suffix{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;border:1px solid var(--hf-border-strong);border-radius:10px;background:#0d131b;overflow:hidden}
.input-suffix:focus-within{border-color:rgba(240,27,42,.62);box-shadow:0 0 0 3px rgba(240,27,42,.10)}
.input-suffix input{border:0;border-radius:0;background:transparent;box-shadow:none!important}
.input-suffix span{padding:0 10px;color:#738095;font-size:9.5px;border-left:1px solid var(--hf-border)}
.inline-form{display:inline-flex;margin:0}
.btn-danger{border-color:rgba(255,83,97,.22)!important;background:rgba(255,83,97,.07)!important;color:#ff9ba4!important}
.btn-danger:hover{background:rgba(255,83,97,.13)!important}

/* Data surfaces */
.hefo-data-page{grid-template-rows:auto minmax(0,1fr)}
.hefo-filter-card{padding:10px 12px}
.hefo-inline-filter{display:flex;align-items:end;gap:8px;min-width:0}
.hefo-inline-filter .form-group{width:155px;flex:0 0 155px}
.hefo-result-count{margin-left:auto;align-self:center;color:#718096;font-size:10px;font-weight:750;white-space:nowrap}
.hefo-table-card{padding:12px;display:grid;grid-template-rows:auto minmax(0,1fr);min-height:0;overflow:hidden}
.hefo-data-table td strong{display:block;color:#f0f3f8;font-size:10.6px}
.table-sub{display:block;margin-top:3px;color:#69768a;font-size:8.8px;font-weight:600}
.table-actions-col,.table-actions{text-align:right;white-space:nowrap}
.table-actions{display:flex;justify-content:flex-end;gap:5px}
.hefo-tag{display:inline-flex;align-items:center;min-height:23px;padding:0 7px;border:1px solid var(--hf-border);border-radius:7px;background:#141c27;color:#c5ceda;font-size:9px;font-weight:750;text-transform:capitalize}
.hefo-status{display:inline-flex;align-items:center;gap:6px;color:#a9b4c2;font-size:9px;font-weight:750}
.hefo-status>span{width:6px;height:6px;border-radius:99px;background:#707d90}
.hefo-status.is-ok{color:#8ee5b3}.hefo-status.is-ok>span{background:var(--hf-green);box-shadow:0 0 0 4px rgba(54,201,120,.08)}
.hefo-status.is-warn{color:#f4ca72}.hefo-status.is-warn>span{background:var(--hf-yellow)}
.hefo-empty-state{padding:28px;text-align:center;color:#657185;font-size:10.5px}

/* Ticket types / settings */
.hefo-split-page{grid-template-columns:minmax(360px,420px) minmax(0,1fr)}
.hefo-split-page>.hefo-form-card{overflow:auto}
.settings-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-content:start}
.settings-card{min-height:150px;padding:18px;display:grid;grid-template-columns:46px minmax(0,1fr) auto;gap:14px;align-items:start;text-decoration:none;transition:transform .16s ease,border-color .16s ease,background .16s ease}
a.settings-card:hover{transform:translateY(-2px);border-color:rgba(240,27,42,.20);background:linear-gradient(180deg,#151d28,#10161f)}
.settings-card.is-static{cursor:default}
.settings-icon{width:42px;height:42px;display:grid;place-items:center;border-radius:12px;border:1px solid rgba(240,27,42,.16);background:rgba(240,27,42,.07);color:#ff6671}
.settings-icon svg{width:19px;height:19px;stroke:currentColor}
.settings-arrow{color:#69768a;font-size:18px}

/* Password & authentication */
.auth-eyebrow{display:block;margin-bottom:10px;color:#667387;font-size:9px;font-weight:900;letter-spacing:.16em}
.auth-lead{margin:0 0 18px;color:#738095;font-size:11px;line-height:1.5}
.auth-feature-row{display:flex;gap:7px;flex-wrap:wrap;margin-top:22px}
.auth-feature-row span{padding:6px 8px;border:1px solid var(--hf-border);border-radius:999px;background:rgba(255,255,255,.025);color:#8190a4;font-size:9px;font-weight:700}
.auth-security-note{display:flex;align-items:center;justify-content:center;gap:7px;margin-top:18px;color:#647084;font-size:9px}
.auth-lock-dot{width:6px;height:6px;border-radius:50%;background:var(--hf-green);box-shadow:0 0 0 4px rgba(54,201,120,.08)}
.password-field{position:relative;display:flex;min-width:0}
.password-field input{padding-right:74px}
.password-toggle{position:absolute;right:5px;top:5px;bottom:5px;min-height:0!important;padding:0 8px!important;border-color:transparent!important;background:rgba(255,255,255,.035)!important;color:#8e9bad!important;font-size:9px!important}
.password-meter{height:5px;overflow:hidden;border-radius:999px;background:#0a0f15;border:1px solid var(--hf-border)}
.password-meter span{display:block;width:0;height:100%;border-radius:inherit;background:var(--hf-danger);transition:width .18s ease,background .18s ease}
.password-meter span[data-level="3"]{background:var(--hf-yellow)}.password-meter span[data-level="4"]{background:var(--hf-green)}

/* Attendance heatmap */
.hefo-analytics-page{grid-template-rows:auto minmax(0,1fr)}
.metric-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.metric-card{padding:14px 16px;display:grid;grid-template-columns:1fr auto;grid-template-rows:auto auto;align-items:end}
.metric-card>span{grid-column:1/-1;color:#738095;font-size:9px;font-weight:800;text-transform:uppercase;letter-spacing:.1em}
.metric-card>strong{margin-top:5px;font-size:25px;line-height:1;color:#fff;letter-spacing:-.04em}
.metric-card>small{color:#687589;font-size:9px;text-align:right}
.heatmap-card{min-height:0;padding:15px;overflow:hidden}
.heat-legend{display:flex;align-items:center;gap:4px;color:#657185;font-size:8.5px}.heat-legend i{width:15px;height:10px;border-radius:3px;border:1px solid rgba(255,255,255,.06)}
.hefo-heat-grid{height:calc(100% - 54px);display:grid!important;grid-template-columns:repeat(14,minmax(0,1fr))!important;grid-template-rows:repeat(6,minmax(0,1fr));gap:5px}
.heat-cell{min-width:0;min-height:0;border:1px solid rgba(255,255,255,.045);border-radius:7px;padding:5px 6px;display:flex;align-items:center;justify-content:space-between;color:#69768a;transition:transform .12s ease,border-color .12s ease,filter .12s ease}
.heat-cell:hover{transform:translateY(-1px);filter:brightness(1.14);border-color:rgba(255,255,255,.16)}
.heat-cell span{font-size:8px}.heat-cell strong{font-size:10px;color:#d8dee7}
.heat-level-0{background:#0c1219}.heat-level-1{background:#17151a}.heat-level-2{background:#27151a}.heat-level-3{background:#40141b}.heat-level-4{background:#6b1119}.heat-level-5{background:#b70b18;box-shadow:inset 0 0 22px rgba(255,70,80,.06)}

/* Holidays */
.holiday-single-form{max-width:680px;grid-template-columns:repeat(2,minmax(0,1fr)) auto;align-items:end;margin:10px 0 16px}
.holiday-single-form>.form-row{display:grid;grid-template-columns:70px minmax(0,1fr)}
.holiday-bulk-form{display:grid;grid-template-columns:180px 160px minmax(0,1fr);gap:9px 10px;align-items:end}
.holiday-bulk-form>.calendar-controls,.holiday-bulk-form>.calendar,.holiday-bulk-form>.form-row:not(:first-of-type):not(:nth-of-type(2)),.holiday-bulk-form>.form-row-submit{grid-column:1/-1}
.selection-count{opacity:.78;color:#8c98a9;font-size:10px}
.calendar{display:grid!important;grid-template-columns:repeat(7,minmax(0,1fr))!important;gap:5px!important;margin:8px 0!important}
.calendar .dow{padding:5px;text-align:center;color:#647186;font-size:8.5px;font-weight:800;text-transform:uppercase}
.calendar .tile{min-width:0!important;width:auto!important;min-height:70px!important;padding:7px!important;border:1px solid var(--hf-border)!important;border-radius:9px!important;background:#0d131b!important;color:#cbd3de!important;cursor:pointer;transition:.14s ease}
.calendar .tile:hover{border-color:rgba(255,255,255,.16)!important;background:#111923!important}.calendar .tile.is-selected,.calendar .tile.active-holiday{border-color:rgba(240,27,42,.30)!important;background:rgba(240,27,42,.08)!important}.calendar .tile.past{opacity:.42}.calendar .tile.placeholder{visibility:hidden}.calendar .date-big{font-size:14px;font-weight:800}.calendar .date-sub{margin-top:2px;color:#657185;font-size:7.5px}.calendar .checkline{margin-top:7px;display:flex;align-items:center;gap:4px;color:#7d899b;font-size:8px}.calendar .checkline input{width:13px;height:13px;padding:0}

/* Result cards / verification */
.verify-table{width:100%;margin-top:7px}.verify-table th,.verify-table td{padding:5px 7px!important;font-size:9.5px!important}.verify-message{font-weight:800;margin:0 0 5px}.crm-result-slot:not(:empty),.verification-result:not(:empty){padding:8px 10px;margin-top:7px}

/* Loader and action feedback */
button.is-loading,input.is-loading{position:relative;pointer-events:none;opacity:.74}button.is-loading>span{opacity:.25}button.is-loading:after{content:"";position:absolute;width:12px;height:12px;left:50%;top:50%;margin:-6px;border:2px solid rgba(255,255,255,.35);border-top-color:#fff;border-radius:50%;animation:hfSpin .65s linear infinite}
@keyframes hfSpin{to{transform:rotate(360deg)}}
.hefo-toast-stack{position:fixed;right:18px;bottom:18px;z-index:12000;display:grid;gap:8px;pointer-events:none}.hefo-toast{min-width:260px;max-width:420px;padding:11px 13px;border:1px solid var(--hf-border);border-radius:11px;background:#121a24;box-shadow:0 18px 50px rgba(0,0,0,.38);color:#dfe5ed;font-size:10px;animation:hfToast .2s ease both}.hefo-toast.is-success{border-color:rgba(54,201,120,.24)}.hefo-toast.is-error{border-color:rgba(255,83,97,.25)}@keyframes hfToast{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}

/* 1920x1080 target: preserve a no-page-scroll workspace. */
@media (min-width:1280px) and (min-height:760px){
  .hefo-app-page,.crm-premium-page,.hefo-app-shell,.hefo-main{height:100vh;max-height:100vh;overflow:hidden}
  .hefo-content{height:calc(100vh - var(--hf-topbar-h));overflow:hidden}
  .hefo-page-canvas{height:100%;overflow:hidden}
}
@media (max-width:1280px){.hefo-split-page{grid-template-columns:1fr}.hefo-split-page>.hefo-form-card{max-height:none}.settings-grid{grid-template-columns:1fr}.hefo-inline-filter{flex-wrap:wrap}.hefo-result-count{margin-left:0}.holiday-bulk-form{grid-template-columns:1fr 1fr}.metric-grid{grid-template-columns:repeat(2,1fr)}}
@media (max-width:840px){.hefo-page-canvas,.hefo-data-page,.hefo-analytics-page{height:auto;overflow:visible}.hefo-form-grid-2{grid-template-columns:1fr}.metric-grid{grid-template-columns:repeat(2,1fr)}.hefo-heat-grid{height:auto;grid-template-columns:repeat(7,minmax(38px,1fr))!important;grid-template-rows:auto}.heat-cell{min-height:52px}.holiday-single-form,.holiday-bulk-form{grid-template-columns:1fr}.holiday-single-form>*{grid-column:1/-1}.calendar .tile{min-height:62px!important}}

/* =====================================================================
   HEFO-CRM 2.0 — PRODUCTION UI/UX 2026
   Clean production layer for desktop 1920×1080, tablet and mobile.
   ===================================================================== */
:root{
  --hf-bg:#07090d;
  --hf-sidebar:#090d13;
  --hf-panel:#101720;
  --hf-panel-2:#141c27;
  --hf-panel-3:#1a2431;
  --hf-border:rgba(255,255,255,.085);
  --hf-border-strong:rgba(255,255,255,.15);
  --hf-text:#f6f8fb;
  --hf-text-2:#dce2ea;
  --hf-muted:#8491a5;
  --hf-muted-2:#657287;
  --hf-red:#ef1828;
  --hf-red-2:#bd0712;
  --hf-green:#36d27d;
  --hf-yellow:#f2ba4e;
  --hf-blue:#6ba9ff;
  --hf-danger:#ff5362;
  --hf-radius:18px;
  --hf-radius-sm:12px;
  --hf-sidebar-w:252px;
  --hf-topbar-h:74px;
  --hf-shadow:0 28px 90px rgba(0,0,0,.40);
  --hf-shadow-sm:0 12px 34px rgba(0,0,0,.24);
}
html{background:var(--hf-bg);overflow-x:hidden}
body{background:
  radial-gradient(950px 520px at 58% -220px,rgba(239,24,40,.085),transparent 66%),
  radial-gradient(800px 560px at 100% 100%,rgba(62,99,150,.055),transparent 70%),
  var(--hf-bg);}
body::before{content:"";position:fixed;inset:0;pointer-events:none;z-index:-1;background-image:linear-gradient(rgba(255,255,255,.008) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.006) 1px,transparent 1px);background-size:32px 32px;mask-image:linear-gradient(to bottom,rgba(0,0,0,.35),transparent 65%)}

/* Sidebar + branding */
.hefo-sidebar{padding:15px 13px 13px;background:linear-gradient(180deg,#0b1017 0%,#080b10 100%);box-shadow:16px 0 60px rgba(0,0,0,.16)}
.hefo-sidebar-head{display:flex;align-items:center;gap:8px}
.hefo-sidebar-head .hefo-brand{flex:1;min-width:0}
.hefo-brand{height:74px;padding:7px 8px}
.hefo-brand img{width:72px;height:52px}
.hefo-brand-copy strong{font-size:13px;letter-spacing:.08em}
.hefo-brand-copy span{font-size:9px;color:#6e7a8d}
.hefo-sidebar-close{display:none;width:38px;height:38px;min-height:38px;padding:0;border-radius:11px;background:#131a24;color:#aab5c4}
.hefo-sidebar-close svg{width:18px;height:18px;stroke:currentColor}
.hefo-sidebar-label{padding:12px 11px 6px;font-size:8.5px;letter-spacing:.18em;color:#59667a}
.hefo-nav{gap:3px}
.hefo-nav-item{min-height:41px;border-radius:11px;font-size:11.5px}
.hefo-nav-item.is-active{background:linear-gradient(90deg,rgba(239,24,40,.16),rgba(239,24,40,.045));border-color:rgba(239,24,40,.20)}
.hefo-nav-account{margin-top:4px}
.hefo-powered-by{margin:9px 5px 7px;padding:9px 10px;display:flex;align-items:center;gap:9px;border-top:1px solid var(--hf-border);border-bottom:1px solid var(--hf-border)}
.hefo-powered-by span{flex:0 0 auto;color:#5f6b7e;font-size:8px;font-weight:750;letter-spacing:.05em;text-transform:uppercase}
.hefo-powered-by img{width:82px;height:auto;opacity:.88;filter:saturate(.92) brightness(.95)}
.hefo-sidebar-profile{margin-top:6px}

/* Topbar */
.hefo-topbar{padding:0 24px;background:rgba(7,10,15,.90);border-bottom-color:rgba(255,255,255,.065)}
.hefo-topbar-left{min-width:0;display:flex;align-items:center;gap:10px}
.hefo-mobile-menu{display:none;width:40px;height:40px;min-height:40px;padding:0;place-items:center;border-radius:11px;background:#151d28;color:#dce3ec}
.hefo-mobile-menu svg{width:20px;height:20px;stroke:currentColor}
.hefo-page-title small{margin-bottom:5px;font-size:8.5px;letter-spacing:.17em;color:#69768b}
.hefo-page-title h1{font-size:20px;font-weight:790}
.hefo-top-chip{min-height:34px;padding:0 11px;border-radius:11px;font-size:10px;background:rgba(255,255,255,.022)}

/* Global surfaces */
.hefo-content{padding:14px 16px 16px}
.panel,.hefo-card,.crm-data-workspace{border-color:var(--hf-border);background:linear-gradient(180deg,rgba(18,25,35,.985),rgba(13,19,27,.985));box-shadow:var(--hf-shadow-sm),inset 0 1px 0 rgba(255,255,255,.026)}
.panel{padding:15px 16px}
.panel-title,.hefo-card-title{font-size:16.5px;font-weight:790}
.panel-kicker,.hefo-kicker{font-size:8.5px;letter-spacing:.16em}
.hefo-card-copy{font-size:10.5px;line-height:1.55}

/* Fields and buttons – simple, touch-friendly, consistent. */
.form-row>label,.form-group>label,.label{color:#b9c2cf;font-size:10.5px;font-weight:760}
input[type="text"],input[type="number"],input[type="email"],input[type="password"],input[type="date"],input[type="time"],input[type="datetime-local"],input[type="month"],select,textarea,.login-input,.register-input,.history-text,.history-date,.history-time,input,select,textarea{height:39px;padding:8px 11px;border-radius:10px;background:#0b1118;border-color:var(--hf-border-strong);font-size:11.5px;color:#f0f3f7}
textarea{height:auto;min-height:82px}
input:focus,select:focus,textarea:focus{border-color:rgba(239,24,40,.68);box-shadow:0 0 0 3px rgba(239,24,40,.11),0 10px 30px rgba(0,0,0,.16)}
.btn,button,input[type="submit"],.login-button,.register-button{min-height:39px;padding:8px 14px;border-radius:10px;font-size:10.8px;font-weight:820}
.btn-primary,.login-button,.register-button{background:linear-gradient(180deg,#f42c3a,#cf0916)!important;box-shadow:0 9px 22px rgba(239,24,40,.16)!important}
.btn-secondary,.btn-outline{background:#202b3b!important;border-color:rgba(255,255,255,.10)!important}
.btn-icon{width:39px;min-width:39px;height:39px}

/* 1920×1080 operating workspace. */
.crm-dashboard{height:100%;min-height:0;display:grid;grid-template-rows:minmax(430px,46%) minmax(0,1fr);gap:12px}
.crm-top-grid{display:grid;grid-template-columns:minmax(610px,1.02fr) minmax(650px,.98fr);gap:12px;min-height:0}
.crm-quick-stack{display:grid;grid-template-rows:132px minmax(0,1fr);gap:12px;min-height:0}
.crm-quick-panel{overflow:hidden}
.crm-swipe-panel{display:grid;grid-template-rows:auto auto minmax(0,1fr)}
.crm-verify-panel{display:grid;grid-template-rows:auto auto minmax(0,1fr);overflow:hidden}
.crm-inline-row{grid-template-columns:76px minmax(0,1fr)}
.crm-result-slot{min-height:0;margin-top:8px;border-radius:12px}
.crm-swipe-panel .crm-result-slot{max-height:38px;overflow:hidden;font-size:9.5px;white-space:nowrap;text-overflow:ellipsis}
.crm-verify-panel .crm-result-slot{max-height:none!important;overflow:visible!important;margin-top:7px;padding:0!important;background:transparent!important;border:0!important}
.crm-verify-panel .verification-result.is-success,.crm-verify-panel .verification-result.is-error,.crm-verify-panel .verification-result.is-warning{background:transparent!important;border:0!important}
.verify-message{margin:0 0 7px;padding:7px 9px;border-radius:9px;background:rgba(54,210,125,.075);border:1px solid rgba(54,210,125,.17);color:#dff9e9;font-size:10px;font-weight:800}
.verification-result.is-error .verify-message{background:rgba(255,83,98,.08);border-color:rgba(255,83,98,.20);color:#ffe0e3}
.verification-result.is-warning .verify-message{background:rgba(242,186,78,.08);border-color:rgba(242,186,78,.20);color:#ffe7b1}
.verify-table{width:100%;table-layout:fixed;margin:0;border-collapse:separate;border-spacing:0;border:1px solid var(--hf-border);border-radius:10px;overflow:hidden;background:#0c121a}
.verify-table th,.verify-table td{position:static!important;padding:5px 8px!important;border-bottom:1px solid rgba(255,255,255,.05)!important;font-size:9.4px!important;line-height:1.18!important;white-space:normal!important;background:transparent!important;vertical-align:middle}
.verify-table th{width:20%;color:#718097!important;font-size:8.3px!important;text-transform:uppercase;letter-spacing:.045em}
.verify-table td{width:30%;color:#f1f4f7!important;font-weight:700}
.verify-table tr:last-child th,.verify-table tr:last-child td{border-bottom:0!important}
.crm-add-panel{overflow:hidden;padding:15px 16px}
.crm-user-grid-form{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px 13px}
.crm-user-grid-form .form-row{grid-template-columns:104px minmax(0,1fr);min-height:39px}
.crm-user-grid-form .field-expiration{align-items:center}
.crm-user-grid-form .field-expiration .field-help{grid-column:2;margin:0;font-size:8.8px}
.inline-expiration-option{font-size:9px!important;white-space:nowrap}
.inline-expiration-option input{width:15px!important;height:15px!important;padding:0!important}
.crm-data-workspace{grid-template-rows:45px minmax(0,1fr)}
.crm-tabbar{padding:6px 8px}
.crm-tab{min-height:32px;padding:0 13px}
.crm-tab-panel{padding:9px 10px}

/* Large, impossible-to-miss staff feedback. */
.flash-crm{position:fixed!important;inset:auto!important;left:50%!important;top:50%!important;z-index:15000!important;width:min(720px,calc(100vw - 40px))!important;max-width:none!important;padding:26px 30px 26px 82px!important;transform:translate(-50%,-50%)!important;border:1px solid rgba(54,210,125,.34)!important;border-radius:20px!important;background:rgba(12,24,19,.98)!important;color:#f2fff7!important;font-size:clamp(18px,1.45vw,27px)!important;font-weight:850!important;line-height:1.25!important;box-shadow:0 35px 120px rgba(0,0,0,.64),0 0 0 9999px rgba(1,3,6,.62)!important;animation:hfCenterFlashIn .28s cubic-bezier(.2,.8,.2,1) both,hfCenterFlashOut .28s ease 5.2s forwards!important}
.flash-crm::before{content:"✓";position:absolute;left:25px;top:50%;transform:translateY(-50%);width:42px;height:42px;display:grid;place-items:center;border-radius:50%;background:rgba(54,210,125,.13);border:1px solid rgba(54,210,125,.35);color:#76efa9;font-size:24px}
.hefo-center-notice{position:fixed;inset:0;z-index:16000;display:grid;place-items:center;padding:24px;background:rgba(1,3,6,.64);backdrop-filter:blur(10px);opacity:0;visibility:hidden;transition:opacity .22s ease,visibility .22s ease;cursor:pointer}
.hefo-center-notice.is-visible{opacity:1;visibility:visible}
.hefo-center-notice__card{position:relative;width:min(780px,calc(100vw - 48px));min-height:190px;padding:34px 38px;display:grid;grid-template-columns:72px minmax(0,1fr);align-items:center;gap:24px;overflow:hidden;border:1px solid rgba(54,210,125,.32);border-radius:24px;background:linear-gradient(155deg,rgba(17,31,24,.985),rgba(10,19,15,.985));box-shadow:0 40px 130px rgba(0,0,0,.68),inset 0 1px 0 rgba(255,255,255,.04);transform:translateY(12px) scale(.975);transition:transform .25s cubic-bezier(.2,.8,.2,1)}
.hefo-center-notice.is-visible .hefo-center-notice__card{transform:none}
.hefo-center-notice__icon{width:70px;height:70px;display:grid;place-items:center;border-radius:22px;background:rgba(54,210,125,.12);border:1px solid rgba(54,210,125,.32);color:#73efa8;font-size:38px;font-weight:900;box-shadow:0 0 36px rgba(54,210,125,.08)}
.hefo-center-notice__title{margin-bottom:8px;color:#9eecbc;font-size:13px;font-weight:900;letter-spacing:.10em;text-transform:uppercase}
.hefo-center-notice__message{color:#fff;font-size:clamp(25px,2.05vw,38px);font-weight:880;line-height:1.13;letter-spacing:-.035em;text-wrap:balance}
.hefo-center-notice.is-warning .hefo-center-notice__card{border-color:rgba(242,186,78,.34);background:linear-gradient(155deg,rgba(35,29,17,.99),rgba(19,16,10,.99))}
.hefo-center-notice.is-warning .hefo-center-notice__icon{background:rgba(242,186,78,.12);border-color:rgba(242,186,78,.34);color:#ffd477}.hefo-center-notice.is-warning .hefo-center-notice__title{color:#f4ce7c}
.hefo-center-notice.is-error .hefo-center-notice__card{border-color:rgba(255,83,98,.36);background:linear-gradient(155deg,rgba(37,17,21,.99),rgba(21,10,13,.99))}
.hefo-center-notice.is-error .hefo-center-notice__icon{background:rgba(255,83,98,.11);border-color:rgba(255,83,98,.34);color:#ff8490}.hefo-center-notice.is-error .hefo-center-notice__title{color:#ff9aa3}
.hefo-center-notice__timer{position:absolute;left:0;right:0;bottom:0;height:4px;background:rgba(255,255,255,.035)}
.hefo-center-notice__timer span{display:block;height:100%;width:100%;transform-origin:left;background:currentColor;opacity:.6;animation:hfNoticeTimer linear forwards}
.hefo-center-notice.is-success{color:var(--hf-green)}.hefo-center-notice.is-warning{color:var(--hf-yellow)}.hefo-center-notice.is-error{color:var(--hf-danger)}
@keyframes hfNoticeTimer{from{transform:scaleX(1)}to{transform:scaleX(0)}}
@keyframes hfCenterFlashIn{from{opacity:0;transform:translate(-50%,calc(-50% + 14px)) scale(.97)}to{opacity:1;transform:translate(-50%,-50%) scale(1)}}
@keyframes hfCenterFlashOut{to{opacity:0;visibility:hidden}}

/* Page loader – premium but fast. */
.hefo-page-loader{background:radial-gradient(640px 360px at 50% 38%,rgba(239,24,40,.08),transparent 70%),#07090d}
.hefo-loader-card{width:min(430px,calc(100vw - 40px));padding:30px 24px;border-radius:24px}
.hefo-loader-logo{width:170px;margin-bottom:22px}
.hefo-loader-title{font-size:18px;letter-spacing:.10em}
.hefo-loader-subtitle{margin-top:7px;font-size:10.5px}
.hefo-loader-powered{margin:24px auto 0;display:flex;align-items:center;justify-content:center;gap:10px;color:#536075;font-size:8.5px;text-transform:uppercase;letter-spacing:.08em}
.hefo-loader-powered img{width:92px;height:auto;opacity:.82}

/* Ticket types — aligned, simple and predictable. */
.hefo-split-page{grid-template-columns:minmax(520px,560px) minmax(0,1fr);align-items:stretch}
.hefo-split-page>.hefo-form-card{overflow:hidden}
.ticket-builder-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 14px;align-content:start}
.ticket-builder-form>.form-group{min-width:0}
.ticket-builder-form>.full{grid-column:1/-1}
.ticket-builder-form .hefo-form-actions{grid-column:1/-1;margin-top:6px;padding-top:13px;border-top:1px solid var(--hf-border)}
.ticket-builder-form .form-group>label{min-height:14px;display:flex;align-items:center;gap:5px}
.ticket-mode-note{grid-column:1/-1;min-height:42px;padding:10px 12px;border:1px solid var(--hf-border);border-radius:11px;background:rgba(255,255,255,.018);color:#8995a7;font-size:10px;line-height:1.45}
.ticket-mode-note strong{color:#e4e9f0}
.ticket-builder-form .is-disabled{opacity:.42}
.ticket-builder-form .is-disabled input{pointer-events:none}
.hefo-table-card .hefo-card-head{align-items:center}

/* Monthly attendance calendar. */
.hefo-analytics-page{grid-template-rows:auto minmax(0,1fr);gap:12px}
.metric-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.metric-card{min-height:86px;padding:13px 16px}
.metric-card>strong{font-size:26px}
.months-board{min-height:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:10px}
.month-card{min-height:0;padding:12px 13px!important;display:grid;grid-template-rows:auto minmax(0,1fr);overflow:hidden}
.month-card-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px}
.month-title{margin:0;color:#f5f7fa;font-size:14px;font-weight:820;text-transform:capitalize}
.month-total{color:#748197;font-size:9px;font-weight:750}
.month-calendar{min-height:0;display:grid;grid-template-columns:repeat(7,minmax(0,1fr));grid-template-rows:22px repeat(6,minmax(0,1fr));gap:4px}
.month-dow{display:grid;place-items:center;color:#59677c;font-size:7.7px;font-weight:850;text-transform:uppercase;letter-spacing:.05em}
.month-day{position:relative;min-width:0;min-height:0;padding:5px 6px;display:flex;align-items:center;justify-content:space-between;gap:4px;border:1px solid rgba(255,255,255,.045);border-radius:8px;background:#0c1219;color:#728096;transition:transform .12s ease,border-color .12s ease,filter .12s ease}
.month-day:hover{transform:translateY(-1px);filter:brightness(1.12);border-color:rgba(255,255,255,.16)}
.month-day.is-empty{visibility:hidden}
.month-day.is-future{opacity:.28}
.month-day.is-today{border-color:rgba(239,24,40,.52);box-shadow:inset 0 0 0 1px rgba(239,24,40,.15)}
.month-day span{font-size:8px}.month-day strong{font-size:10.5px;color:#f0f3f7}
.month-day.heat-level-0{background:#0c1219}.month-day.heat-level-1{background:#17151a}.month-day.heat-level-2{background:#28151a}.month-day.heat-level-3{background:#41141b}.month-day.heat-level-4{background:#6c1119}.month-day.heat-level-5{background:#b70b18}
.month-board-legend{display:flex;align-items:center;gap:4px;color:#647185;font-size:8px}.month-board-legend i{width:14px;height:9px;border-radius:3px;border:1px solid rgba(255,255,255,.055)}

/* Auth and Powered by GLOBYNET */
.hefo-auth-powered{margin-top:18px;padding-top:14px;border-top:1px solid var(--hf-border);display:flex;align-items:center;justify-content:center;gap:10px;color:#5c687b;font-size:8.5px;text-transform:uppercase;letter-spacing:.07em}
.hefo-auth-powered img{width:96px;height:auto;opacity:.88}

/* Toasts reserved for minor feedback only. */
.hefo-toast-stack{right:20px;bottom:20px}
.hefo-toast{min-width:300px;padding:13px 15px;border-radius:13px;font-size:11px}
.hefo-toast.is-leaving{opacity:0;transform:translateY(8px);transition:.3s ease}

/* Tablet: off-canvas navigation and scrollable content, never horizontal. */
.hefo-sidebar-backdrop{display:none}
@media (max-width:1180px){
  .crm-top-grid{grid-template-columns:1fr 1fr}
  .crm-user-grid-form .form-row{grid-template-columns:92px minmax(0,1fr)}
  .hefo-split-page{grid-template-columns:minmax(430px,.9fr) minmax(0,1.1fr)}
}
@media (max-width:980px){
  html,body{overflow-x:hidden}
  .hefo-app-page,.crm-premium-page{height:auto;min-height:100dvh;overflow:auto}
  .hefo-app-shell{height:auto;min-height:100dvh;display:block}
  .hefo-sidebar{position:fixed;z-index:12000;left:0;top:0;bottom:0;width:min(310px,86vw);height:100dvh;transform:translateX(-105%);transition:transform .24s cubic-bezier(.2,.8,.2,1);box-shadow:24px 0 80px rgba(0,0,0,.55)}
  .hefo-sidebar-close{display:grid}
  .hefo-sidebar-backdrop{position:fixed;z-index:11900;inset:0;display:block;background:rgba(1,3,6,.62);backdrop-filter:blur(5px);opacity:0;visibility:hidden;transition:.22s ease}
  .hefo-menu-open .hefo-sidebar{transform:none}.hefo-menu-open .hefo-sidebar-backdrop{opacity:1;visibility:visible}.hefo-menu-open{overflow:hidden}
  .hefo-main{height:auto;min-height:100dvh;display:grid;grid-template-rows:var(--hf-topbar-h) minmax(0,1fr)}
  .hefo-mobile-menu{display:grid}
  .hefo-content{min-height:calc(100dvh - var(--hf-topbar-h));overflow:visible}
  .hefo-page-canvas,.hefo-data-page,.hefo-analytics-page{height:auto;overflow:visible}
  .crm-dashboard{height:auto;display:grid;grid-template-rows:auto auto}
  .crm-top-grid{grid-template-columns:1fr;grid-template-rows:auto;}
  .crm-quick-stack{grid-template-rows:auto auto}
  .crm-quick-panel,.crm-add-panel{overflow:visible}
  .crm-verify-panel .crm-result-slot{overflow:visible}
  .crm-data-workspace{min-height:540px}
  .hefo-split-page{grid-template-columns:1fr;overflow:visible}
  .hefo-split-page>.hefo-form-card{overflow:visible}
  .months-board{grid-template-columns:1fr;grid-template-rows:none}
  .month-card{min-height:300px}
  .crm-fetch-progress{left:0}
  .hefo-powered-by{margin-top:auto}
}

/* Mobile: one column, large tap targets, simple language and no horizontal scroll. */
@media (max-width:680px){
  :root{--hf-topbar-h:66px}
  .hefo-topbar{padding:0 12px}.hefo-page-title small{display:none}.hefo-page-title h1{font-size:17px}.hefo-top-actions{display:none}
  .hefo-content{padding:10px}
  .panel,.hefo-card{border-radius:15px}
  .panel{padding:13px}
  .crm-user-grid-form,.ticket-builder-form,.hefo-form-grid,.hefo-form-grid-2{grid-template-columns:1fr!important}
  .ticket-builder-form>.full,.ticket-mode-note,.ticket-builder-form .hefo-form-actions{grid-column:auto}
  .crm-user-grid-form .form-row,.form-row,.crm-inline-row{grid-template-columns:1fr!important;gap:5px}
  .crm-user-grid-form .field-expiration .field-help{grid-column:auto}
  .form-row-inputs{flex-wrap:wrap}.form-row-inputs>input,.form-row-inputs>select{flex:1 1 220px}.form-row-inputs>.btn{flex:0 0 auto}
  input,select,textarea,.btn,button,input[type="submit"]{min-height:44px;font-size:13px}
  .crm-tabbar{overflow-x:auto;scrollbar-width:none}.crm-tab{flex:0 0 auto;min-height:40px;font-size:11px}
  .crm-data-workspace{min-height:620px}
  .verify-table tr{display:grid;grid-template-columns:42% 58%}.verify-table th,.verify-table td{width:auto!important}.verify-table th:nth-of-type(2),.verify-table td:nth-of-type(2){display:none}
  .metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .metric-card{min-height:82px}.metric-card>strong{font-size:23px}
  .month-card{min-height:330px;padding:11px!important}.month-calendar{gap:3px}.month-day{padding:4px}.month-day span{font-size:8px}.month-day strong{font-size:9px}
  .hefo-center-notice{padding:14px}.hefo-center-notice__card{width:100%;min-height:160px;padding:24px;grid-template-columns:54px minmax(0,1fr);gap:16px;border-radius:20px}.hefo-center-notice__icon{width:54px;height:54px;border-radius:16px;font-size:30px}.hefo-center-notice__title{font-size:10px}.hefo-center-notice__message{font-size:clamp(20px,6vw,28px)}
  .flash-crm{width:calc(100vw - 28px)!important;padding:22px 22px 22px 68px!important;font-size:19px!important}.flash-crm::before{left:18px;width:36px;height:36px;font-size:20px}
  .hefo-auth-page{padding:14px}.hefo-auth-shell{width:100%;border-radius:19px}.hefo-auth-card,.login-container,.register-container{padding:24px 20px!important}
}

@media (max-width:420px){
  .metric-grid{grid-template-columns:1fr 1fr}
  .month-calendar{grid-template-rows:20px repeat(6,48px)}
  .month-card{min-height:auto}
  .hefo-center-notice__card{grid-template-columns:1fr;text-align:center}.hefo-center-notice__icon{margin:auto}
}

@media (prefers-reduced-motion:reduce){
  .hefo-center-notice__timer span{animation:none!important}
}


/* ===== HEFO-CRM 2.0 final production polish ===== */
.ticket-builder-card{display:flex;flex-direction:column;min-height:0}
.ticket-builder-form{grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:min-content;gap:14px 16px;width:100%}
.ticket-builder-form .form-group{display:flex;flex-direction:column;justify-content:flex-start;gap:7px;margin:0}
.ticket-builder-form .form-group>label{height:18px;min-height:18px;margin:0;color:#dfe5ee;font-size:10.5px;font-weight:800;line-height:18px}
.ticket-builder-form input,.ticket-builder-form select,.ticket-builder-form .input-suffix{width:100%;min-width:0}
.ticket-builder-form input,.ticket-builder-form select{height:44px}
.ticket-builder-form .input-suffix{height:44px;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;border:1px solid var(--hf-border-strong);border-radius:11px;background:#0c1219;overflow:hidden}
.ticket-builder-form .input-suffix input{border:0!important;background:transparent!important;border-radius:0!important;height:42px}
.ticket-builder-form .input-suffix span{padding:0 13px;color:#8793a6;font-size:10px;border-left:1px solid var(--hf-border)}
.ticket-builder-form .field-muted{color:#667286;font-size:9px;font-weight:650}
.ticket-builder-form small{min-height:30px;color:#6f7b8e;font-size:9px;line-height:1.42}
.ticket-builder-form .is-disabled{opacity:.38}
.ticket-builder-form .hefo-form-actions{display:flex;justify-content:flex-end;align-items:center;min-height:58px}
.ticket-builder-form .hefo-form-actions .btn{min-width:176px}
.ticket-mode-note{display:flex;align-items:center;min-height:58px;padding:11px 13px}
.ticket-builder-card .hefo-card-head{margin-bottom:16px}

/* Verification must remain entirely visible: no inner scrollbar on desktop. */
.crm-verify-panel{min-height:0}
.crm-verify-panel .verification-result{min-height:0;overflow:visible!important}
.crm-verify-panel .verify-table{font-variant-numeric:tabular-nums}
.crm-verify-panel .verify-table tr{height:30px}
.crm-verify-panel .verify-table th,.crm-verify-panel .verify-table td{padding-top:5px!important;padding-bottom:5px!important}

/* Attendance is one dashboard card with four complete monthly calendars. */
.attendance-board-card{min-height:0;padding:12px 13px!important;display:grid;grid-template-rows:auto minmax(0,1fr);overflow:hidden}
.attendance-board-head{margin-bottom:9px}
.attendance-board-head .hefo-card-copy{margin-top:3px}
.months-board{height:100%;min-height:0}
.month-card{background:linear-gradient(180deg,rgba(255,255,255,.018),rgba(255,255,255,.008))!important;border-color:rgba(255,255,255,.055)!important;box-shadow:none!important}
.month-calendar{height:100%}
.month-day{font-variant-numeric:tabular-nums}

/* Staff feedback visible from several metres away. */
.hefo-center-notice__card{width:min(900px,calc(100vw - 56px));min-height:220px}
.hefo-center-notice__message{font-size:clamp(30px,2.35vw,44px)}
.flash-crm{width:min(820px,calc(100vw - 48px))!important;min-height:150px!important;display:flex!important;align-items:center!important}

/* Powered by GLOBYNET must remain legible but secondary. */
.hefo-powered-by img{max-width:112px;max-height:31px;object-fit:contain}
.hefo-auth-powered img{max-width:112px;max-height:31px;object-fit:contain}

/* Desktop 1920x1080 target: no page-level scroll; only long data tables scroll in their own area. */
@media (min-width:1281px) and (min-height:800px){
  .hefo-app-page,.crm-premium-page,.hefo-app-shell,.hefo-main{height:100dvh;max-height:100dvh;overflow:hidden}
  .hefo-content{height:calc(100dvh - var(--hf-topbar-h));overflow:hidden}
  .crm-dashboard,.hefo-page-canvas{height:100%;overflow:hidden}
  .hefo-split-page{grid-template-columns:minmax(500px,560px) minmax(0,1fr)}
  .ticket-builder-card{overflow:hidden!important}
  .hefo-analytics-page{grid-template-rows:88px minmax(0,1fr)}
}

/* Tablet: readable cards, drawer navigation and no horizontal overflow. */
@media (max-width:980px){
  .ticket-builder-form{grid-template-columns:repeat(2,minmax(0,1fr))}
  .attendance-board-card{overflow:visible}
  .months-board{height:auto}
}

/* Mobile: one field per row, full-width action and monthly calendars remain readable. */
@media (max-width:680px){
  .ticket-builder-form{grid-template-columns:1fr!important}
  .ticket-builder-form .full,.ticket-builder-form .hefo-form-actions,.ticket-mode-note{grid-column:1!important}
  .ticket-builder-form .hefo-form-actions .btn{width:100%}
  .attendance-board-head{align-items:flex-start;gap:10px}
  .attendance-board-head .month-board-legend{flex-wrap:wrap;justify-content:flex-start}
  .months-board{display:grid;grid-template-columns:1fr!important;gap:10px}
  .month-card{min-height:350px}
  .crm-verify-panel .verify-table tr{height:auto}
}


/* =====================================================================
   HEFO-CRM 2.1 — DEFINITIVE ADAPTIVE WORKSPACE
   One coherent layout system for desktop, tablet portrait/landscape,
   mobile portrait/landscape. These rules intentionally supersede all
   older responsive fallback rules above.
   ===================================================================== */

/* Common readability */
.crm-panel-copy{margin:4px 0 0;color:var(--hf-muted);font-size:10px;line-height:1.35}
.crm-top-grid>.panel{min-width:0;min-height:0}
.crm-result-slot{max-height:none!important;overflow:visible!important}
.crm-swipe-result:not(:empty){padding:10px 12px!important;white-space:normal!important;font-size:11px!important;line-height:1.35}
.crm-quick-panel{overflow:hidden!important}

/* Desktop operating station: quick entry + large verification + compact member form. */
@media (min-width:1400px) and (min-height:800px){
  .crm-dashboard{height:100%;display:grid;grid-template-rows:minmax(525px,57%) minmax(0,1fr);gap:12px;overflow:hidden}
  .crm-top-grid{height:100%;display:grid;grid-template-columns:minmax(360px,4fr) minmax(700px,8fr);grid-template-rows:292px minmax(220px,1fr);gap:12px;overflow:hidden}
  .crm-swipe-panel{grid-column:1;grid-row:1;display:grid;grid-template-rows:auto auto minmax(0,1fr);align-content:start}
  .crm-verify-panel{grid-column:2;grid-row:1;display:grid;grid-template-rows:auto auto minmax(0,1fr);align-content:start}
  .crm-add-panel{grid-column:1/-1;grid-row:2;padding:13px 15px!important;display:grid;grid-template-rows:auto minmax(0,1fr);align-content:start;overflow:hidden!important}
  .crm-add-panel .panel-heading-row{margin-bottom:9px}
  .crm-add-panel .crm-panel-copy{max-width:850px}
  .crm-user-grid-form{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:8px 12px!important;align-items:end!important;align-content:start!important}
  .crm-user-grid-form .form-row{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:5px!important;min-height:0!important}
  .crm-user-grid-form .form-row>label{min-height:14px;margin:0;font-size:9.8px}
  .crm-user-grid-form .form-row-inputs{width:100%;min-width:0}
  .crm-user-grid-form .field-expiration .field-help{grid-column:auto!important;margin:0!important;min-height:24px;font-size:8.5px;line-height:1.3}
  .crm-user-grid-form .field-expiration{align-items:stretch!important}
  .crm-form-action{grid-column:1/-1!important;display:flex!important;justify-content:flex-end!important;align-items:center!important;margin-top:1px}
  .crm-form-action .btn{min-width:210px}
  .crm-data-workspace{overflow:hidden!important}
}

/* Verification: all information visible at once; never an inner scrollbar. */
.crm-verify-panel .verification-result{min-height:0!important;max-height:none!important;overflow:visible!important;padding:0!important;border:0!important;background:transparent!important}
.verify-message{min-height:34px;margin:8px 0!important;padding:8px 11px!important;display:flex;align-items:center;gap:8px;border-radius:10px!important;font-size:10.5px!important}
.verify-state-dot{width:8px;height:8px;flex:0 0 8px;border-radius:50%;background:var(--hf-green);box-shadow:0 0 0 4px rgba(54,210,125,.10)}
.verification-result.is-error .verify-state-dot{background:var(--hf-danger);box-shadow:0 0 0 4px rgba(255,83,98,.10)}
.verification-result.is-warning .verify-state-dot{background:var(--hf-yellow);box-shadow:0 0 0 4px rgba(242,186,78,.10)}
.verify-details-grid{margin:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.verify-detail{min-width:0;min-height:48px;padding:7px 9px;border:1px solid rgba(255,255,255,.055);border-radius:10px;background:#0c1219;display:flex;flex-direction:column;justify-content:center;gap:3px}
.verify-detail dt{margin:0;color:#6f7d91;font-size:7.9px;font-weight:850;line-height:1.1;text-transform:uppercase;letter-spacing:.06em}
.verify-detail dd{margin:0;overflow:hidden;text-overflow:ellipsis;color:#f2f5f8;font-size:10.5px;font-weight:760;line-height:1.2;white-space:normal;overflow-wrap:anywhere}

/* Ticket builder: aligned, compact and no stretched empty card. */
.hefo-split-page{grid-template-columns:minmax(520px,.86fr) minmax(0,1.14fr)!important;align-items:start!important;overflow:hidden}
.hefo-split-page>.ticket-builder-card{align-self:start!important;height:auto!important;min-height:0!important;overflow:visible!important}
.ticket-builder-form{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:13px 15px!important;align-items:start!important}
.ticket-builder-form .form-group{min-width:0!important;display:flex!important;flex-direction:column!important;gap:7px!important;margin:0!important}
.ticket-builder-form .form-group>label{height:auto!important;min-height:18px!important;display:flex!important;align-items:center!important}
.ticket-builder-form .full,.ticket-mode-note,.ticket-builder-form .hefo-form-actions{grid-column:1/-1!important}
.ticket-mode-note{margin-top:1px}
.ticket-builder-form .hefo-form-actions{padding-top:12px!important;margin-top:0!important}
.ticket-builder-form .hefo-form-actions .btn{min-width:190px}

/* Large central notices. One notice is the only strong feedback layer. */
.flash-crm[hidden]{display:none!important}
.hefo-center-notice{padding:28px!important}
.hefo-center-notice__card{width:min(980px,calc(100vw - 64px))!important;min-height:230px!important;padding:38px 44px!important;grid-template-columns:82px minmax(0,1fr)!important;gap:28px!important;border-radius:26px!important}
.hefo-center-notice__icon{width:80px!important;height:80px!important;border-radius:24px!important;font-size:42px!important}
.hefo-center-notice__title{margin-bottom:8px!important;font-size:13px!important}
.hefo-center-notice__message{font-size:clamp(30px,2.45vw,46px)!important;line-height:1.1!important}
.hefo-center-notice__hint{margin-top:12px;color:rgba(255,255,255,.43);font-size:10px;font-weight:650}

/* Only long datasets scroll. Scrollbars are subtle, never giant UI elements. */
.crm-table-scroll,.hefo-page-table,.hefo-page-scroll{scrollbar-width:thin;scrollbar-color:#354052 transparent}
.crm-table-scroll::-webkit-scrollbar,.hefo-page-table::-webkit-scrollbar,.hefo-page-scroll::-webkit-scrollbar{width:7px;height:7px}
.crm-table-scroll::-webkit-scrollbar-thumb,.hefo-page-table::-webkit-scrollbar-thumb,.hefo-page-scroll::-webkit-scrollbar-thumb{background:#354052;border-radius:99px}
.crm-table-scroll::-webkit-scrollbar-track,.hefo-page-table::-webkit-scrollbar-track,.hefo-page-scroll::-webkit-scrollbar-track{background:transparent}

/* Attendance: visibly separated monthly calendars. */
.months-board{gap:12px!important}
.month-card{border-color:rgba(255,255,255,.075)!important;background:linear-gradient(180deg,#111923,#0d141c)!important}
.month-card-head{padding-bottom:8px;border-bottom:1px solid rgba(255,255,255,.05)}
.month-title{font-size:15px!important}
.month-total{padding:4px 7px;border-radius:999px;background:rgba(255,255,255,.035);font-size:8.5px!important}
.month-day{min-height:0}

/* Drawer navigation on tablets and phones. Text labels are always visible. */
@media (max-width:1180px){
  html,body{overflow-x:hidden!important}
  .hefo-app-page,.crm-premium-page{height:auto!important;min-height:100dvh!important;overflow:auto!important}
  .hefo-app-shell{height:auto!important;min-height:100dvh!important;display:block!important}
  .hefo-sidebar{position:fixed!important;z-index:12000!important;left:0!important;top:0!important;bottom:0!important;width:min(330px,88vw)!important;height:100dvh!important;padding:15px 13px 13px!important;transform:translateX(-105%);transition:transform .24s cubic-bezier(.2,.8,.2,1)!important;border-right:1px solid var(--hf-border)!important;border-bottom:0!important;overflow-y:auto!important;overscroll-behavior:contain}
  .hefo-menu-open .hefo-sidebar{transform:none!important}
  .hefo-sidebar-head{display:flex!important}.hefo-sidebar-close{display:grid!important}
  .hefo-brand{height:74px!important;justify-content:flex-start!important;padding:7px 8px!important}.hefo-brand img{width:72px!important}.hefo-brand-copy{display:flex!important}
  .hefo-sidebar-label{display:block!important}.hefo-nav{display:flex!important;flex-direction:column!important;grid-template-columns:none!important;gap:4px!important}.hefo-nav-item{min-height:44px!important;justify-content:flex-start!important;padding:0 12px!important}.hefo-nav-item span{display:inline!important}.hefo-nav-item.is-active:before{left:-14px!important}
  .hefo-nav-spacer{display:block!important;flex:1!important;min-height:18px}.hefo-sidebar-profile{display:block!important}.hefo-profile-copy{display:flex!important}.hefo-logout-mini{display:grid!important}
  .hefo-powered-by{display:flex!important;margin-top:12px!important}
  .hefo-main{height:auto!important;min-height:100dvh!important;display:grid!important;grid-template-rows:var(--hf-topbar-h) minmax(0,1fr)!important}
  .hefo-mobile-menu{display:grid!important}
  .hefo-topbar{position:sticky;top:0;z-index:1100}
  .hefo-content{height:auto!important;min-height:calc(100dvh - var(--hf-topbar-h))!important;overflow:visible!important;padding:12px!important}
  .crm-fetch-progress{left:0!important}
  .crm-dashboard{height:auto!important;display:grid!important;grid-template-rows:auto auto!important;overflow:visible!important}
  .crm-top-grid{height:auto!important;display:grid!important;grid-template-columns:minmax(280px,.78fr) minmax(430px,1.22fr)!important;grid-template-rows:minmax(330px,auto) auto!important;gap:12px!important;overflow:visible!important}
  .crm-swipe-panel{grid-column:1!important;grid-row:1!important}
  .crm-verify-panel{grid-column:2!important;grid-row:1!important;min-height:330px!important}
  .crm-add-panel{grid-column:1/-1!important;grid-row:2!important;overflow:visible!important}
  .crm-user-grid-form{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px 12px!important}
  .crm-user-grid-form .form-row{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:5px!important}
  .crm-user-grid-form .field-expiration .field-help{grid-column:auto!important}
  .crm-form-action{grid-column:1/-1!important}
  .crm-data-workspace{min-height:560px!important;overflow:hidden!important}
  .verify-details-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .hefo-page-canvas,.hefo-data-page,.hefo-analytics-page{height:auto!important;overflow:visible!important}
  .hefo-split-page{grid-template-columns:1fr!important;overflow:visible!important}
  .hefo-split-page>.ticket-builder-card{overflow:visible!important}
  .months-board{height:auto!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-template-rows:none!important}
  .month-card{min-height:330px!important}
}

/* Tablet portrait and narrower. */
@media (max-width:820px) and (orientation:portrait){
  .crm-top-grid{grid-template-columns:1fr!important;grid-template-rows:auto!important}
  .crm-swipe-panel,.crm-verify-panel,.crm-add-panel{grid-column:1!important;grid-row:auto!important;min-height:0!important;overflow:visible!important}
  .crm-verify-panel{min-height:420px!important}
  .crm-user-grid-form{grid-template-columns:1fr 1fr!important}
  .verify-details-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .months-board{grid-template-columns:1fr!important}
}

/* Phone portrait: one clean column, large tap targets, no icon-only menu. */
@media (max-width:680px) and (orientation:portrait){
  :root{--hf-topbar-h:66px}
  .hefo-sidebar{width:min(340px,92vw)!important}
  .hefo-topbar{padding:0 12px!important}.hefo-page-title h1{font-size:17px!important}.hefo-page-title small{display:none!important}.hefo-top-actions{display:none!important}
  .hefo-content{padding:10px!important}
  .crm-top-grid{display:grid!important;grid-template-columns:1fr!important;gap:10px!important}
  .crm-swipe-panel,.crm-verify-panel,.crm-add-panel{grid-column:1!important;grid-row:auto!important}
  .crm-verify-panel{min-height:0!important}
  .crm-user-grid-form,.ticket-builder-form,.hefo-form-grid,.hefo-form-grid-2{grid-template-columns:1fr!important}
  .crm-user-grid-form .form-row,.form-row,.crm-inline-row{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:6px!important}
  .form-row-inputs{display:flex!important;flex-wrap:wrap!important}.form-row-inputs>input,.form-row-inputs>select{flex:1 1 210px!important}.form-row-inputs>.btn{flex:0 0 auto!important}
  input,select,textarea,.btn,button,input[type="submit"]{min-height:46px!important;font-size:13px!important}
  .verify-details-grid{grid-template-columns:1fr!important;gap:7px!important}.verify-detail{min-height:54px!important}.verify-detail dt{font-size:8.5px!important}.verify-detail dd{font-size:12px!important}
  .crm-data-workspace{min-height:620px!important}
  .crm-tabbar{overflow-x:auto!important;scrollbar-width:none!important}.crm-tab{flex:0 0 auto!important;min-height:42px!important;font-size:11px!important}
  .ticket-builder-form .full,.ticket-mode-note,.ticket-builder-form .hefo-form-actions{grid-column:1!important}.ticket-builder-form .hefo-form-actions .btn{width:100%!important}
  .metric-grid{grid-template-columns:1fr 1fr!important}.months-board{grid-template-columns:1fr!important}.month-card{min-height:360px!important}
  .hefo-center-notice{padding:14px!important}.hefo-center-notice__card{width:100%!important;min-height:190px!important;padding:24px!important;grid-template-columns:58px minmax(0,1fr)!important;gap:16px!important;border-radius:21px!important}.hefo-center-notice__icon{width:58px!important;height:58px!important;border-radius:18px!important;font-size:31px!important}.hefo-center-notice__message{font-size:clamp(21px,6.4vw,29px)!important}.hefo-center-notice__hint{font-size:9px!important}
}

/* Landscape phones: use width deliberately instead of stretching portrait. */
@media (max-width:900px) and (orientation:landscape){
  :root{--hf-topbar-h:62px}
  .hefo-top-actions{display:none!important}.hefo-content{padding:9px 10px!important}
  .crm-top-grid{grid-template-columns:minmax(280px,.8fr) minmax(420px,1.2fr)!important;grid-template-rows:auto auto!important;gap:9px!important}
  .crm-swipe-panel{grid-column:1!important;grid-row:1!important}.crm-verify-panel{grid-column:2!important;grid-row:1!important;min-height:330px!important}.crm-add-panel{grid-column:1/-1!important;grid-row:2!important}
  .crm-user-grid-form{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .verify-details-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .months-board{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .hefo-center-notice__card{min-height:170px!important;padding:24px 30px!important}.hefo-center-notice__message{font-size:clamp(24px,4vw,34px)!important}
}

/* Compact desktop / tablet landscape with short height: allow page scrolling, never nested card scrollbars. */
@media (min-width:901px) and (max-width:1399px), (max-height:799px){
  .hefo-app-page,.crm-premium-page{height:auto!important;min-height:100dvh!important;overflow:auto!important}
  .hefo-app-shell{height:auto!important;min-height:100dvh!important}
  .hefo-main{height:auto!important;min-height:100dvh!important}
  .hefo-content{height:auto!important;overflow:visible!important}
  .crm-dashboard{height:auto!important;grid-template-rows:auto auto!important;overflow:visible!important}
  .crm-result-slot,.crm-quick-panel,.crm-add-panel{overflow:visible!important}
}

@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{scroll-behavior:auto!important;animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important}
}


/* 2.1 visual balance: front-desk quick guide and denser desktop verification. */
.crm-quick-guide{margin-top:auto;padding-top:12px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
.crm-quick-guide>div{min-width:0;padding:10px 9px;border:1px solid rgba(255,255,255,.05);border-radius:10px;background:rgba(255,255,255,.018);display:flex;align-items:center;gap:7px}
.crm-quick-guide strong{width:22px;height:22px;flex:0 0 22px;display:grid;place-items:center;border-radius:7px;background:rgba(239,24,40,.10);color:#ff6d78;font-size:9px}
.crm-quick-guide span{color:#7f8c9f;font-size:8.8px;font-weight:700;line-height:1.25}
@media (min-width:1400px) and (min-height:800px){
  .crm-top-grid{grid-template-rows:350px minmax(190px,1fr)!important}
  .verify-details-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:5px!important}
  .verify-detail{min-height:42px!important;padding:6px 8px!important}
  .verify-detail dt{font-size:7.4px!important}.verify-detail dd{font-size:10px!important}
}
@media (max-width:1180px){.crm-quick-guide{display:none}}
@media (min-width:1400px) and (min-height:800px){
  .crm-dashboard{grid-template-rows:minmax(580px,61%) minmax(0,1fr)!important}
}
@media (min-width:1400px) and (min-height:800px){
  .crm-user-grid-form{grid-template-columns:repeat(5,minmax(0,1fr))!important}
  .crm-form-action{grid-column:4/6!important;grid-row:2!important;align-self:end!important;justify-content:stretch!important}
  .crm-form-action .btn{width:100%!important;min-width:0!important}
}

/* Server flash is a data carrier; JavaScript renders the single visible centre notice. */
.flash-crm[data-hefo-flash="1"]{display:none!important}
@media (max-width:1180px){
  .hefo-nav-spacer{display:block!important;flex:0 0 12px!important;min-height:12px!important}
  .hefo-powered-by{margin-top:4px!important}
}
/* Compact desktop / large tablet landscape with the fixed sidebar. */
@media (min-width:1181px) and (max-width:1399px){
  .crm-top-grid{display:grid!important;grid-template-columns:minmax(300px,.78fr) minmax(500px,1.22fr)!important;grid-template-rows:auto auto!important;gap:12px!important;overflow:visible!important}
  .crm-swipe-panel{grid-column:1!important;grid-row:1!important;min-height:330px!important}
  .crm-verify-panel{grid-column:2!important;grid-row:1!important;min-height:330px!important}
  .crm-add-panel{grid-column:1/-1!important;grid-row:2!important;overflow:visible!important}
  .crm-user-grid-form{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  .crm-user-grid-form .form-row{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:5px!important}
  .crm-form-action{grid-column:1/-1!important;display:flex!important;justify-content:flex-end!important}
  .verify-details-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media (max-width:760px) and (orientation:landscape){
  .crm-top-grid{grid-template-columns:1fr!important}
  .crm-swipe-panel,.crm-verify-panel,.crm-add-panel{grid-column:1!important;grid-row:auto!important;min-height:0!important}
  .crm-user-grid-form{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .verify-details-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}


/* =====================================================================
   HEFO-CRM 2.2 — FLUID VIEWPORT / PRODUCTION UX
   Layout is driven by the available viewport (vw, vh, fr, percentages),
   not fixed pixel panel widths. This block is the final authority.
   ===================================================================== */
*{box-sizing:border-box}
:root{--hf-sidebar-w:14.5vw;--hf-topbar-h:7vh;--hf-work-gap:clamp(.55rem,.72vw,1rem);--hf-work-vgap:clamp(.55rem,.9vh,1rem)}
.hefo-app-shell{grid-template-columns:var(--hf-sidebar-w) minmax(0,1fr)!important;width:100vw;max-width:100vw}
.hefo-main,.hefo-content,.crm-dashboard,.crm-top-grid,.crm-top-grid>.panel,.crm-data-workspace,.crm-tab-stage,.crm-tab-panel{min-width:0!important;max-width:100%!important}
.hefo-content{padding:1.1vh 1vw 1.25vh!important}
.form-row-inputs{min-width:0!important;width:100%;display:flex;align-items:center;gap:clamp(.4rem,.5vw,.7rem)}
.form-row-inputs>*{min-width:0;max-width:100%}
.crm-inline-row{grid-template-columns:minmax(0,16%) minmax(0,84%)!important;gap:clamp(.45rem,.65vw,.8rem)!important;align-items:center}
.crm-inline-row .form-row-inputs input{flex:1 1 0;width:auto!important}
.crm-swipe-panel .form-row-inputs .btn{flex:0 0 18%;padding-inline:.55rem!important}
.crm-verify-panel .form-row-inputs .btn{flex:0 0 18%;padding-inline:.55rem!important}

@media (min-width:1181px){
  html,body,.hefo-app-page,.crm-premium-page,.hefo-app-shell{width:100vw;max-width:100vw;overflow-x:hidden!important}
  .hefo-sidebar{width:var(--hf-sidebar-w)!important;min-width:0!important;max-width:none!important;padding-inline:.7vw!important}
  .hefo-brand img{width:4.1vw!important;max-width:5.2rem!important;min-width:3.2rem!important}
  .hefo-nav-item{padding-inline:.7vw!important}
  .hefo-main{width:calc(100vw - var(--hf-sidebar-w))!important;max-width:calc(100vw - var(--hf-sidebar-w))!important}
  .hefo-topbar{height:var(--hf-topbar-h)!important;min-height:var(--hf-topbar-h)!important;padding-inline:1.35vw!important}
  .hefo-content{height:calc(100vh - var(--hf-topbar-h))!important;overflow:hidden!important}
  .crm-dashboard{height:100%!important;display:grid!important;grid-template-rows:minmax(0,60fr) minmax(0,40fr)!important;gap:var(--hf-work-vgap)!important;overflow:hidden!important}
  .crm-top-grid{height:100%!important;display:grid!important;grid-template-columns:minmax(0,38fr) minmax(0,62fr)!important;grid-template-rows:minmax(0,43fr) minmax(0,57fr)!important;gap:var(--hf-work-vgap) var(--hf-work-gap)!important;overflow:hidden!important}
  .crm-swipe-panel{grid-column:1!important;grid-row:1!important;overflow:hidden!important}
  .crm-verify-panel{grid-column:2!important;grid-row:1!important;overflow:hidden!important}
  .crm-add-panel{grid-column:1/-1!important;grid-row:2!important;overflow:hidden!important}
  .crm-quick-panel,.crm-add-panel{padding:1.25vh .95vw!important}
  .crm-panel-copy{font-size:clamp(.68rem,.59vw,.82rem)!important}
  .panel-title{font-size:clamp(1rem,1.02vw,1.35rem)!important}
  .crm-quick-guide{padding-top:.8vh!important;gap:.45vw!important}
  .crm-quick-guide>div{padding:.7vh .55vw!important}
  .crm-swipe-result:not(:empty){margin-top:.7vh!important;padding:.75vh .65vw!important}
  .verify-message{margin:.65vh 0!important;padding:.7vh .65vw!important;min-height:0!important;font-size:clamp(.68rem,.58vw,.78rem)!important}
  .verify-details-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:.5vh .45vw!important}
  .verify-detail{min-height:0!important;padding:.55vh .55vw!important;border-radius:.55rem!important}
  .verify-detail dt{font-size:clamp(.47rem,.39vw,.58rem)!important}
  .verify-detail dd{font-size:clamp(.63rem,.53vw,.74rem)!important;line-height:1.15!important}
  .crm-user-grid-form{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;grid-template-rows:auto auto!important;gap:.8vh .75vw!important;align-items:end!important}
  .crm-user-grid-form .form-row{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:.38vh!important;min-width:0!important;min-height:0!important}
  .crm-user-grid-form .form-row>label{min-height:1.1em!important;font-size:clamp(.62rem,.52vw,.73rem)!important}
  .crm-user-grid-form input,.crm-user-grid-form select,.crm-user-grid-form .btn{height:3.6vh!important;min-height:2.35rem!important}
  .crm-user-grid-form .field-expiration .field-help{margin-top:.15vh!important;min-height:0!important;font-size:clamp(.48rem,.42vw,.58rem)!important;line-height:1.3!important}
  .expiration-input-row{flex-wrap:nowrap!important}
  .expiration-input-row input[type="date"]{flex:1 1 55%!important}
  .inline-expiration-option{flex:0 1 45%;white-space:normal!important;line-height:1.15!important}
  .crm-form-action{grid-column:5!important;grid-row:2!important;justify-content:stretch!important;align-self:end!important}
  .crm-form-action .btn{width:100%!important;min-width:0!important}
  .crm-data-workspace{height:100%!important;grid-template-rows:auto minmax(0,1fr)!important;overflow:hidden!important}
  .crm-tab-stage,.crm-tab-panel{height:100%!important;min-height:0!important;overflow:hidden!important}
  .crm-tab-panel.is-active{display:flex!important;flex-direction:column!important;min-height:0!important}
  .crm-tab-panel>.crm-table-panel{flex:1 1 auto;min-height:0!important;overflow:hidden!important;display:flex!important;flex-direction:column!important}
  .crm-table-scroll{flex:1 1 auto;min-height:0!important;overflow:auto!important}
}

/* Ticket type form: aligned, fluid, visually balanced. */
.ticket-builder-form{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:1rem!important}
.ticket-builder-form .full{grid-column:1/-1!important}
.ticket-builder-form .form-group{min-width:0!important}
.ticket-builder-form .hefo-form-actions{grid-column:1/-1!important;justify-content:flex-end!important;border-top:1px solid rgba(255,255,255,.055);padding-top:.9rem!important}
.ticket-mode-note{grid-column:1/-1!important;margin:0!important;min-height:0!important}
.hefo-split-page{grid-template-columns:minmax(0,40fr) minmax(0,60fr)!important;gap:var(--hf-work-gap)!important}

/* Verification detail is always fully visible; no nested scrollbar. */
.crm-verify-panel,.crm-verify-panel .verification-result,.crm-verify-panel .verify-details-grid{overflow:visible!important;max-height:none!important}

/* Status notices follow semantic UI colours and readable typography. */
.hefo-center-notice{background:rgba(3,6,10,.72)!important;backdrop-filter:blur(10px) saturate(110%);padding:4vh 4vw!important}
.hefo-center-notice__card{position:relative;width:min(76vw,72rem)!important;min-height:0!important;padding:clamp(1.5rem,3.2vh,2.6rem) clamp(1.5rem,2.8vw,3.2rem)!important;grid-template-columns:minmax(4.5rem,8%) minmax(0,1fr)!important;gap:clamp(1.2rem,2vw,2.4rem)!important;border-radius:clamp(1rem,1.4vw,1.7rem)!important;background:#111820!important;border:1px solid rgba(255,255,255,.10)!important;box-shadow:0 3rem 8rem rgba(0,0,0,.62)!important}
.hefo-center-notice.is-success .hefo-center-notice__card{border-color:rgba(39,194,116,.38)!important;background:linear-gradient(145deg,#101b17,#111820 65%)!important}
.hefo-center-notice.is-warning .hefo-center-notice__card{border-color:rgba(229,165,45,.45)!important;background:linear-gradient(145deg,#201a10,#111820 65%)!important}
.hefo-center-notice.is-error .hefo-center-notice__card{border-color:rgba(229,72,84,.48)!important;background:linear-gradient(145deg,#241216,#111820 66%)!important}
.hefo-center-notice__icon{width:100%!important;aspect-ratio:1;height:auto!important;max-width:5.5rem!important;border-radius:28%!important;font-size:clamp(1.8rem,2.8vw,3.3rem)!important;font-weight:650!important}
.hefo-center-notice.is-success .hefo-center-notice__icon{color:#61dfa0!important;background:rgba(39,194,116,.12)!important;border-color:rgba(39,194,116,.32)!important}
.hefo-center-notice.is-warning .hefo-center-notice__icon{color:#f0bf59!important;background:rgba(229,165,45,.12)!important;border-color:rgba(229,165,45,.34)!important}
.hefo-center-notice.is-error .hefo-center-notice__icon{color:#ff7b86!important;background:rgba(229,72,84,.13)!important;border-color:rgba(229,72,84,.35)!important}
.hefo-center-notice__eyebrow{margin-bottom:.55rem;color:#8f9bad;font-size:clamp(.7rem,.7vw,.88rem);font-weight:850;letter-spacing:.14em;text-transform:uppercase}
.hefo-center-notice.is-success .hefo-center-notice__eyebrow{color:#62d99c}.hefo-center-notice.is-warning .hefo-center-notice__eyebrow{color:#eabe65}.hefo-center-notice.is-error .hefo-center-notice__eyebrow{color:#f08b94}
.hefo-center-notice__title{margin:0!important;color:#f7f9fc!important;font-size:clamp(1.65rem,2.25vw,2.85rem)!important;font-weight:780!important;letter-spacing:-.025em!important;line-height:1.08!important;text-transform:none!important}
.hefo-center-notice__message{margin-top:.65rem;color:#d9e0e8!important;font-size:clamp(1.05rem,1.35vw,1.55rem)!important;font-weight:570!important;line-height:1.36!important;letter-spacing:0!important}
.hefo-center-notice__hint{margin-top:.8rem!important;color:#8d99aa!important;font-size:clamp(.78rem,.77vw,.95rem)!important;font-weight:600!important;line-height:1.4!important}
.hefo-center-notice__close{position:absolute;right:1rem;top:1rem;width:2.4rem;height:2.4rem;display:grid;place-items:center;border:1px solid rgba(255,255,255,.09);border-radius:.8rem;background:rgba(255,255,255,.035);color:#8995a6;font-size:1.4rem;cursor:pointer}.hefo-center-notice__close:hover{background:rgba(255,255,255,.07);color:#fff}
.hefo-center-notice__timer{left:0!important;right:0!important;bottom:0!important;height:.22rem!important}

/* Server flash never paints separately. JS consumes it once. */
.flash-crm[data-hefo-flash="1"]{display:none!important}

/* Paginated history. */
.history-page{display:grid!important;grid-template-rows:auto minmax(0,1fr)!important;gap:var(--hf-work-vgap)!important;min-height:0!important}
.history-table-card{min-height:0!important;display:grid!important;grid-template-rows:auto minmax(0,1fr) auto!important;overflow:hidden!important}
.history-table-card .hefo-page-table{min-height:0!important;overflow:auto!important}
.hefo-pagination{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:.38rem;padding:.75rem .35rem .2rem!important}
.hefo-pagination .page-link{min-width:2.35rem;min-height:2.35rem;padding:.42rem .7rem;display:inline-grid;place-items:center;border:1px solid var(--hf-border);border-radius:.65rem;background:#0c1219;color:#b9c3d0;text-decoration:none;font:inherit;font-size:.78rem;font-weight:750;cursor:pointer}
.hefo-pagination .page-link:hover{border-color:rgba(239,24,40,.28);background:#141c26;color:#fff}.hefo-pagination .page-link.is-active{border-color:rgba(239,24,40,.42);background:rgba(239,24,40,.13);color:#fff}.page-gap{padding:.2rem;color:#687487}.page-summary{margin-left:.5rem;color:#778397;font-size:.72rem;font-weight:650}
.history-filter{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr)) auto auto auto minmax(7rem,auto)!important;gap:.6rem!important;align-items:end!important}.history-filter .hefo-result-count{justify-self:end!important;align-self:center!important}

/* Holiday page: no awkward nested scrollbar; calendar owns the available canvas. */
.holiday-page{height:100%!important;min-height:0!important;display:grid!important;grid-template-rows:auto minmax(0,1fr)!important;gap:var(--hf-work-vgap)!important;overflow:hidden!important}
.holiday-add-card{padding:1rem 1.1rem!important}.holiday-add-card .hefo-card-head{margin-bottom:.65rem!important}
.holiday-single-form{max-width:none!important;display:grid!important;grid-template-columns:minmax(0,22fr) minmax(0,58fr) minmax(8rem,20fr)!important;gap:.7rem!important;align-items:end!important;margin:0!important}.holiday-single-form .form-group{min-width:0}
.holiday-calendar-card{min-height:0!important;overflow:hidden!important;padding:1rem 1.1rem!important}.holiday-bulk-form{height:100%!important;min-height:0!important;display:grid!important;grid-template-columns:1fr!important;grid-template-rows:auto auto minmax(0,1fr) auto!important;gap:.7rem!important;overflow:hidden!important}
.holiday-calendar-toolbar{display:flex;align-items:end;justify-content:space-between;gap:1rem}.holiday-period-controls{display:grid;grid-template-columns:repeat(2,minmax(8rem,1fr));gap:.6rem;min-width:min(36%,25rem)}
.holiday-selection-bar{display:flex;align-items:center;justify-content:space-between;gap:.7rem}.calendar-controls{display:flex;align-items:center;gap:.5rem}.selection-count{font-size:.76rem!important;color:#95a1b2!important}
.holiday-calendar-grid{height:100%!important;min-height:0!important;margin:0!important;display:grid!important;grid-template-columns:repeat(7,minmax(0,1fr))!important;grid-template-rows:auto repeat(6,minmax(0,1fr))!important;gap:.42rem!important;overflow:hidden!important}
.holiday-calendar-grid .dow{padding:.25rem!important;font-size:.62rem!important}.holiday-calendar-grid .tile{min-height:0!important;height:auto!important;padding:.55rem!important;overflow:hidden}.holiday-calendar-grid .date-big{font-size:clamp(.9rem,1vw,1.2rem)!important}.holiday-calendar-grid .date-sub{font-size:clamp(.5rem,.48vw,.62rem)!important}.holiday-calendar-grid .checkline{margin-top:.4rem!important;font-size:clamp(.5rem,.48vw,.62rem)!important}
.holiday-savebar{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.75rem;align-items:end}.holiday-save-actions{display:flex;gap:.5rem}

/* Attendance monthly calendar stays clearly separated and scales fluidly. */
.months-board{grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-template-rows:repeat(2,minmax(0,1fr))!important}.month-card{min-width:0!important;min-height:0!important}.month-calendar{min-height:0!important}

/* Tablet: drawer + dedicated two-column workspace, naturally scrolling page. */
@media (max-width:1180px){
  :root{--hf-sidebar-w:0vw;--hf-topbar-h:clamp(4rem,8vh,4.8rem)}
  .hefo-app-shell{grid-template-columns:1fr!important;width:100%!important;max-width:100%!important}.hefo-main{width:100%!important;max-width:100%!important}
  .hefo-content{padding:1.25vw!important;height:auto!important;overflow:visible!important}
  .crm-dashboard{height:auto!important;grid-template-rows:auto auto!important;overflow:visible!important}
  .crm-top-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-template-rows:auto auto!important;gap:1.25vw!important;overflow:visible!important}
  .crm-swipe-panel{grid-column:1!important;grid-row:1!important}.crm-verify-panel{grid-column:2!important;grid-row:1!important}.crm-add-panel{grid-column:1/-1!important;grid-row:2!important}
  .crm-user-grid-form{grid-template-columns:repeat(2,minmax(0,1fr))!important}.crm-form-action{grid-column:1/-1!important;grid-row:auto!important}
  .crm-inline-row{grid-template-columns:1fr!important}.verify-details-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .crm-data-workspace{min-height:34rem!important}
  .hefo-split-page{grid-template-columns:1fr!important}.holiday-page{height:auto!important;overflow:visible!important}.holiday-calendar-card,.holiday-bulk-form{overflow:visible!important}.holiday-calendar-grid{height:auto!important;grid-template-rows:auto repeat(6,minmax(4.5rem,auto))!important;overflow:visible!important}
  .history-page{height:auto!important}.history-table-card{min-height:32rem!important}.history-filter{grid-template-columns:repeat(3,minmax(0,1fr))!important}.history-filter .hefo-result-count{justify-self:start!important}
  .months-board{grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-template-rows:none!important}
}

/* Tablet portrait. */
@media (max-width:900px) and (orientation:portrait){
  .crm-top-grid{grid-template-columns:1fr!important}.crm-swipe-panel,.crm-verify-panel,.crm-add-panel{grid-column:1!important;grid-row:auto!important}
  .crm-user-grid-form{grid-template-columns:repeat(2,minmax(0,1fr))!important}.verify-details-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .holiday-single-form{grid-template-columns:1fr 1fr!important}.holiday-single-form .btn{grid-column:1/-1!important}.holiday-calendar-toolbar{align-items:stretch;flex-direction:column}.holiday-period-controls{min-width:0;width:100%}.holiday-savebar{grid-template-columns:1fr!important}.holiday-save-actions{justify-content:stretch}.holiday-save-actions .btn{flex:1}
  .months-board{grid-template-columns:1fr!important}
}

/* Mobile portrait and narrow landscape: one column, no horizontal overflow. */
@media (max-width:680px){
  .hefo-content{padding:2.5vw!important}.crm-top-grid{grid-template-columns:1fr!important;gap:2.5vw!important}.crm-swipe-panel,.crm-verify-panel,.crm-add-panel{grid-column:1!important;grid-row:auto!important;overflow:visible!important}
  .crm-user-grid-form{grid-template-columns:1fr!important}.crm-form-action{grid-column:1!important}.crm-inline-row{grid-template-columns:1fr!important}
  .form-row-inputs{flex-wrap:wrap!important}.crm-swipe-panel .form-row-inputs input,.crm-verify-panel .form-row-inputs input{flex:1 1 100%!important}.crm-swipe-panel .form-row-inputs .btn{flex:1 1 calc(50% - .3rem)!important}.crm-verify-panel .form-row-inputs .btn{flex:1 1 100%!important}
  .verify-details-grid{grid-template-columns:1fr!important}.crm-quick-guide{display:none!important}
  .hefo-center-notice{padding:3vw!important}.hefo-center-notice__card{width:94vw!important;padding:1.35rem!important;grid-template-columns:3.5rem minmax(0,1fr)!important;gap:1rem!important}.hefo-center-notice__icon{max-width:3.5rem!important}.hefo-center-notice__title{font-size:clamp(1.35rem,6.2vw,2rem)!important}.hefo-center-notice__message{font-size:clamp(.95rem,4.2vw,1.25rem)!important}.hefo-center-notice__close{right:.65rem;top:.65rem}
  .ticket-builder-form{grid-template-columns:1fr!important}.hefo-pagination{justify-content:flex-start!important}.page-summary{width:100%;margin-left:0!important}.history-filter{grid-template-columns:1fr 1fr!important}.history-filter .btn,.history-filter .hefo-result-count{width:100%;justify-self:stretch!important}.history-filter .hefo-result-count{grid-column:1/-1!important}
  .holiday-single-form{grid-template-columns:1fr!important}.holiday-single-form .btn{grid-column:auto!important}.holiday-period-controls{grid-template-columns:1fr 1fr}.holiday-selection-bar{align-items:stretch;flex-direction:column}.calendar-controls{display:grid;grid-template-columns:1fr 1fr}.holiday-calendar-grid{gap:.25rem!important;grid-template-rows:auto repeat(6,minmax(3.8rem,auto))!important}.holiday-calendar-grid .tile{padding:.35rem!important}.holiday-calendar-grid .date-sub{display:none}.holiday-calendar-grid .checkline span{display:none}.holiday-save-actions{display:grid;grid-template-columns:1fr}.months-board{grid-template-columns:1fr!important}
}

/* Landscape phones: deliberately use two columns when vertical space is short. */
@media (max-width:900px) and (orientation:landscape) and (min-width:681px){
  .crm-top-grid{grid-template-columns:minmax(0,40fr) minmax(0,60fr)!important}.crm-swipe-panel{grid-column:1!important}.crm-verify-panel{grid-column:2!important}.crm-add-panel{grid-column:1/-1!important}.crm-user-grid-form{grid-template-columns:repeat(2,minmax(0,1fr))!important}.verify-details-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .hefo-center-notice{padding:3vh 3vw!important}.hefo-center-notice__card{width:88vw!important;padding:1.2rem 1.5rem!important}.hefo-center-notice__title{font-size:clamp(1.45rem,3.4vw,2.25rem)!important}.hefo-center-notice__message{font-size:clamp(.9rem,2.1vw,1.2rem)!important}
}

/* Touch tablets up to 1366 CSS px use the tablet workspace even in landscape. */
@media (pointer:coarse) and (max-width:1366px){
  :root{--hf-sidebar-w:0vw;--hf-topbar-h:clamp(4rem,8vh,4.8rem)}
  .hefo-app-shell{grid-template-columns:1fr!important;width:100%!important;max-width:100%!important}
  .hefo-sidebar{position:fixed!important;z-index:12000!important;left:0!important;top:0!important;bottom:0!important;width:min(82vw,22rem)!important;height:100dvh!important;transform:translateX(-105%)!important;overflow-y:auto!important;transition:transform .24s cubic-bezier(.2,.8,.2,1)!important}
  .hefo-menu-open .hefo-sidebar{transform:none!important}.hefo-mobile-menu{display:grid!important}.hefo-sidebar-close{display:grid!important}
  .hefo-main{width:100%!important;max-width:100%!important;height:auto!important;min-height:100dvh!important}.hefo-content{height:auto!important;overflow:visible!important}
  .crm-dashboard{height:auto!important;grid-template-rows:auto auto!important;overflow:visible!important}.crm-top-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-template-rows:auto auto!important;overflow:visible!important}
  .crm-swipe-panel{grid-column:1!important;grid-row:1!important}.crm-verify-panel{grid-column:2!important;grid-row:1!important}.crm-add-panel{grid-column:1/-1!important;grid-row:2!important}
  .crm-data-workspace{min-height:34rem!important}.crm-user-grid-form{grid-template-columns:repeat(2,minmax(0,1fr))!important}.verify-details-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}

/* =====================================================================
   HEFO-CRM 2.3 — NATURAL PAGE FLOW / RESPONSIVE CONTROL POLISH
   Final authority: width stays fluid; height grows with content.
   ===================================================================== */
html{min-height:100%;overflow-x:hidden!important;overflow-y:auto!important;scroll-behavior:smooth}
body,.hefo-app-page,.crm-premium-page{height:auto!important;max-height:none!important;min-height:100dvh!important;overflow-x:hidden!important;overflow-y:visible!important}
.hefo-app-shell{height:auto!important;max-height:none!important;min-height:100dvh!important;overflow:visible!important;align-items:start!important}
.hefo-main{height:auto!important;max-height:none!important;min-height:100dvh!important;overflow:visible!important;grid-template-rows:auto auto!important}
.hefo-topbar{position:sticky;top:0;z-index:900;backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px)}
.hefo-content{height:auto!important;max-height:none!important;min-height:0!important;overflow:visible!important}
.hefo-page-scroll,.hefo-page-canvas,.hefo-page-canvas-narrow,.hefo-data-page,.hefo-analytics-page{height:auto!important;max-height:none!important;min-height:0!important;overflow:visible!important}
.hefo-page-canvas-narrow{padding-bottom:clamp(1rem,3vh,2.5rem)!important}

/* Desktop sidebar stays available while the document itself scrolls. */
@media (min-width:1181px){
  .hefo-sidebar{position:sticky!important;top:0!important;height:100dvh!important;max-height:100dvh!important;overflow-x:hidden!important;overflow-y:auto!important;align-self:start!important;scrollbar-width:thin;scrollbar-color:rgba(145,158,177,.24) transparent}
  .hefo-main{width:calc(100vw - var(--hf-sidebar-w))!important;max-width:calc(100vw - var(--hf-sidebar-w))!important}
  .hefo-content{padding-bottom:clamp(1rem,2vh,2rem)!important}
  .crm-dashboard{height:auto!important;max-height:none!important;display:grid!important;grid-template-rows:auto auto!important;overflow:visible!important;align-content:start!important}
  .crm-top-grid{height:auto!important;max-height:none!important;grid-template-columns:minmax(0,38fr) minmax(0,62fr)!important;grid-template-rows:auto auto!important;overflow:visible!important;align-items:start!important}
  .crm-swipe-panel,.crm-verify-panel,.crm-add-panel{height:auto!important;max-height:none!important;overflow:visible!important}
  .crm-swipe-panel{grid-column:1!important;grid-row:1!important}
  .crm-verify-panel{grid-column:2!important;grid-row:1!important}
  .crm-add-panel{grid-column:1/-1!important;grid-row:2!important}
  .crm-data-workspace{height:auto!important;max-height:none!important;min-height:0!important;grid-template-rows:auto auto!important;overflow:visible!important}
  .crm-tab-stage,.crm-tab-panel,.crm-tab-panel.is-active{height:auto!important;max-height:none!important;min-height:0!important;overflow:visible!important}
  .crm-tab-panel.is-active{display:block!important}
  .crm-tab-panel>.crm-table-panel,.crm-table-panel{height:auto!important;max-height:none!important;min-height:0!important;display:block!important;overflow:visible!important}
  .crm-table-scroll,.table-responsive,.hefo-page-table{height:auto!important;max-height:none!important;min-height:0!important;overflow-x:auto!important;overflow-y:visible!important;scrollbar-width:thin}
  .crm-table-scroll table,.table-responsive table,.hefo-page-table table{min-width:100%}
}

/* Main workspace cards never get a forced vertical scrollbar. */
.crm-quick-panel,.crm-verify-panel,.crm-add-panel,.crm-result-slot,.crm-tab-stage,.crm-tab-panel,.crm-table-panel{max-height:none!important}
.crm-result-slot{overflow:visible!important;white-space:normal!important;text-overflow:clip!important}
.crm-swipe-panel .crm-result-slot{max-height:none!important;overflow:visible!important;white-space:normal!important}
.crm-data-workspace{overflow:visible!important}
.crm-table-scroll,.table-responsive{overflow-x:auto!important;overflow-y:visible!important}

/* Holidays: calendar expands the document naturally instead of compressing itself. */
.holiday-page{height:auto!important;max-height:none!important;display:grid!important;grid-template-rows:auto auto!important;overflow:visible!important;align-content:start!important}
.holiday-calendar-card,.holiday-bulk-form{height:auto!important;max-height:none!important;min-height:0!important;overflow:visible!important}
.holiday-bulk-form{grid-template-rows:auto auto auto auto!important}
.holiday-calendar-grid{height:auto!important;max-height:none!important;min-height:0!important;grid-template-rows:auto repeat(6,minmax(clamp(4.5rem,7vw,7.5rem),auto))!important;overflow:visible!important}
.holiday-calendar-grid .tile{min-height:clamp(4.5rem,7vw,7.5rem)!important;overflow:visible!important}
.holiday-savebar{position:relative!important;bottom:auto!important}

/* History and long lists use document flow. Pagination, not a vertical mini-window. */
.history-page,.history-table-card{height:auto!important;max-height:none!important;min-height:0!important;overflow:visible!important}
.history-table-card{display:block!important}
.history-table-card .hefo-page-table{height:auto!important;max-height:none!important;overflow-x:auto!important;overflow-y:visible!important}
.hefo-pagination{position:relative!important;bottom:auto!important;margin-top:.85rem!important}

/* Shared close control: notification + mobile/tablet drawer. */
.hefo-sidebar-close,.hefo-center-notice__close{
  width:2.75rem!important;height:2.75rem!important;min-width:2.75rem!important;min-height:2.75rem!important;
  padding:0!important;display:grid!important;place-items:center!important;line-height:1!important;
  border:1px solid rgba(255,255,255,.11)!important;border-radius:.85rem!important;
  background:#151d27!important;color:#aab6c6!important;box-shadow:0 .35rem 1.1rem rgba(0,0,0,.18)!important;
  cursor:pointer!important;transition:background .15s ease,color .15s ease,border-color .15s ease,transform .15s ease!important;
}
.hefo-sidebar-close:hover,.hefo-center-notice__close:hover{background:#202a38!important;color:#fff!important;border-color:rgba(255,255,255,.20)!important;transform:translateY(-1px)}
.hefo-sidebar-close:active,.hefo-center-notice__close:active{transform:scale(.96)}
.hefo-sidebar-close:focus-visible,.hefo-center-notice__close:focus-visible{outline:3px solid rgba(107,169,255,.32)!important;outline-offset:2px}
.hefo-sidebar-close svg,.hefo-center-notice__close svg{display:block!important;width:1.2rem!important;height:1.2rem!important;stroke:currentColor!important;overflow:visible!important}
.hefo-sidebar-head{align-items:center!important}
.hefo-sidebar-close{flex:0 0 auto!important;margin-left:auto!important}
.hefo-center-notice__close{position:absolute!important;right:1rem!important;top:1rem!important;z-index:3!important}

/* Notice typography: semantic, readable, and calm enough for production use. */
.hefo-center-notice__card{padding-right:clamp(4.2rem,5vw,5.5rem)!important}
.hefo-center-notice__copy{min-width:0!important;padding-right:.25rem}
.hefo-center-notice__eyebrow{line-height:1.2!important}
.hefo-center-notice__title{max-width:28ch!important;text-wrap:balance!important}
.hefo-center-notice__message{max-width:54ch!important;text-wrap:pretty!important}
.hefo-center-notice__hint{max-width:60ch!important}

/* Password visibility is an icon button; no overlapping label/text. */
.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.password-field{position:relative!important;display:block!important;min-width:0!important}
.password-field input{width:100%!important;padding-right:3.5rem!important}
.password-field input::-ms-reveal,.password-field input::-ms-clear{display:none}
.password-toggle{
  position:absolute!important;right:.25rem!important;top:50%!important;bottom:auto!important;transform:translateY(-50%)!important;
  width:2.75rem!important;height:2.75rem!important;min-width:2.75rem!important;min-height:2.75rem!important;padding:0!important;
  display:grid!important;place-items:center!important;border:1px solid transparent!important;border-radius:.8rem!important;
  background:transparent!important;color:#8996a8!important;box-shadow:none!important;
}
.password-toggle:hover{transform:translateY(-50%)!important;background:rgba(255,255,255,.055)!important;color:#e8edf4!important;border-color:rgba(255,255,255,.08)!important}
.password-toggle:focus-visible{outline:3px solid rgba(107,169,255,.28)!important;outline-offset:1px}
.password-eye{width:1.25rem;height:1.25rem;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.password-eye-closed{display:none}.password-toggle.is-visible .password-eye-open{display:none}.password-toggle.is-visible .password-eye-closed{display:block}

/* Login: dedicated desktop / tablet / mobile composition. */
.hefo-auth-page{height:auto!important;min-height:100dvh!important;padding:clamp(1rem,3vw,3rem)!important;overflow-x:hidden!important;overflow-y:auto!important;align-content:center!important}
.hefo-auth-shell{width:min(72rem,94vw)!important;max-width:94vw!important;min-height:min(42rem,86dvh)!important;height:auto!important;grid-template-columns:minmax(0,1.08fr) minmax(21rem,.92fr)!important;overflow:hidden!important}
.hefo-auth-brand,.hefo-auth-card{min-width:0!important}
.hefo-auth-card,.login-container,.register-container{padding:clamp(2rem,3.5vw,3.5rem)!important}

@media (max-width:980px){
  .hefo-auth-page{align-content:start!important;padding:clamp(.8rem,2.5vw,1.5rem)!important}
  .hefo-auth-shell{width:min(42rem,96vw)!important;max-width:96vw!important;min-height:0!important;grid-template-columns:1fr!important;border-radius:1.25rem!important}
  .hefo-auth-brand{min-height:0!important;padding:clamp(1.25rem,4vw,2rem)!important;display:grid!important;grid-template-columns:auto 1fr!important;gap:1rem!important;align-items:center!important}
  .hefo-auth-logo{width:clamp(4rem,12vw,5.5rem)!important;height:auto!important;margin:0!important}
  .hefo-auth-copy h1{font-size:clamp(1.25rem,4vw,1.8rem)!important;margin:.25rem 0!important}
  .hefo-auth-copy p{font-size:.85rem!important;margin:.3rem 0 0!important}
  .auth-feature-row{display:none!important}
  .hefo-auth-version{grid-column:1/-1!important;margin:0!important;font-size:.7rem!important}
  .hefo-auth-card,.login-container,.register-container{padding:clamp(1.4rem,5vw,2.2rem)!important}
}
@media (max-width:620px){
  .hefo-auth-page{display:block!important;padding:.75rem!important}
  .hefo-auth-shell{width:100%!important;max-width:100%!important;border-radius:1rem!important}
  .hefo-auth-brand{grid-template-columns:3.6rem minmax(0,1fr)!important;padding:1rem!important}
  .hefo-auth-logo{width:3.6rem!important}
  .hefo-auth-copy p{display:none!important}
  .hefo-auth-copy h1{font-size:1.15rem!important}
  .hefo-auth-card,.login-container,.register-container{padding:1.25rem!important}
  .login-title,.register-title{font-size:1.5rem!important}
  .login-form,.register-form{gap:1rem!important}
  .hefo-auth-powered{margin-top:1.25rem!important}
}
@media (max-width:900px) and (orientation:landscape){
  .hefo-auth-page{padding:.6rem!important}
  .hefo-auth-shell{width:min(58rem,98vw)!important;max-width:98vw!important;grid-template-columns:minmax(0,.72fr) minmax(20rem,1fr)!important}
  .hefo-auth-brand{display:flex!important;flex-direction:column!important;align-items:flex-start!important;justify-content:center!important;padding:1.2rem!important}
  .hefo-auth-copy p,.auth-feature-row{display:none!important}
  .hefo-auth-card{padding:1.35rem 1.6rem!important}
}

/* Drawer behavior: tablet and mobile, portrait and landscape. */
@media (max-width:1180px), (pointer:coarse) and (max-width:1366px){
  .hefo-sidebar{overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:contain!important;padding-top:max(.8rem,env(safe-area-inset-top))!important;padding-bottom:max(.8rem,env(safe-area-inset-bottom))!important}
  .hefo-sidebar-head{position:sticky!important;top:0!important;z-index:4!important;padding:.15rem 0 .5rem!important;background:linear-gradient(180deg,#0b1017 80%,rgba(11,16,23,0))!important}
  .hefo-sidebar-close{display:grid!important}
  .hefo-powered-by{margin-top:1.25rem!important}
}

/* Natural mobile/tablet pages: full document scroll, never a clipped workspace. */
@media (max-width:1180px){
  .hefo-main,.hefo-content,.crm-dashboard,.crm-top-grid,.crm-data-workspace,.crm-tab-stage,.crm-tab-panel,.hefo-page-canvas{height:auto!important;max-height:none!important;overflow:visible!important}
  .crm-table-scroll,.table-responsive,.hefo-page-table{overflow-x:auto!important;overflow-y:visible!important;max-height:none!important}
  .holiday-calendar-grid{height:auto!important;overflow:visible!important}
}

@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto!important}}
/* Desktop has no drawer close control; it appears only when sidebar becomes a drawer. */
.hefo-sidebar-close{display:none!important}
.hefo-center-notice__close{display:grid!important}
@media (max-width:1180px), (pointer:coarse) and (max-width:1366px){.hefo-sidebar-close{display:grid!important}}


/* ==========================================================================\n   HEFO-CRM 2.4.0 — Interaction + Responsive Production Polish\n   Single control geometry, accessible edit modal, phone/tablet usability.\n   ========================================================================== */
:root{
  --hf-control-h:2.75rem;
  --hf-touch-h:2.875rem;
  --hf-control-radius:.72rem;
}

/* One button system: text/icon is optically centered in every context. */
.btn,button,.login-button,.register-button,a.btn{
  box-sizing:border-box!important;
  min-height:var(--hf-control-h)!important;
  padding:.05rem .95rem!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:.45rem!important;
  vertical-align:middle!important;
  text-align:center!important;
  line-height:1.15!important;
  border-radius:var(--hf-control-radius)!important;
}
input[type="submit"]{
  box-sizing:border-box!important;
  min-height:var(--hf-control-h)!important;
  height:var(--hf-control-h)!important;
  padding:0 .95rem!important;
  text-align:center!important;
  line-height:normal!important;
  border-radius:var(--hf-control-radius)!important;
}
.btn svg,button svg,a.btn svg{flex:0 0 auto!important;align-self:center!important}
.form-row-inputs{min-width:0!important;align-items:stretch!important}
.form-row-inputs>.btn,.form-row-inputs>button{flex:0 0 auto!important;min-height:var(--hf-control-h)!important;height:var(--hf-control-h)!important}
.form-row-inputs>input,.form-row-inputs>select{min-width:0!important;height:var(--hf-control-h)!important}
.table-actions,.user-actions,.hefo-form-actions,.btn-row{align-items:center!important}
.table-actions .btn,.user-actions .btn{min-height:2.6rem!important;padding-inline:.9rem!important}
.table-actions form,.inline-form{display:inline-flex!important;align-items:center!important;margin:0!important}
.hefo-form-actions .btn,.btn-row .btn{min-height:var(--hf-touch-h)!important}
.btn-icon{width:var(--hf-control-h)!important;min-width:var(--hf-control-h)!important;height:var(--hf-control-h)!important;padding:0!important}

/* Quick-card actions keep the input fluid and buttons readable without clipping. */
.crm-swipe-panel .form-row-inputs,.crm-verify-panel .form-row-inputs,.field-card-id .form-row-inputs{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto auto!important;
  gap:.55rem!important;
  align-items:center!important;
}
.crm-verify-panel .form-row-inputs{grid-template-columns:minmax(0,1fr) auto!important}
.field-card-id .form-row-inputs{grid-template-columns:minmax(0,1fr) auto!important}
.crm-swipe-panel .form-row-inputs .btn,.crm-verify-panel .form-row-inputs .btn,.field-card-id .form-row-inputs .btn{min-width:5.3rem!important}

/* Accessible edit-member modal. The overlay scrolls on small screens; the card itself does not trap content. */
html.hefo-edit-modal-open,body.hefo-edit-modal-open{overflow:hidden!important}
.crm-edit-slot:not(:empty){
  position:fixed!important;inset:0!important;z-index:5000!important;
  display:flex!important;align-items:center!important;justify-content:center!important;
  padding:clamp(.75rem,2.4vw,2rem)!important;
  overflow-y:auto!important;overflow-x:hidden!important;
  overscroll-behavior:contain!important;
  background:rgba(3,6,10,.80)!important;backdrop-filter:blur(12px) saturate(110%)!important;
}
.crm-edit-slot #editContainer{
  position:relative!important;
  width:min(72rem,96vw)!important;max-width:96vw!important;
  max-height:none!important;overflow:visible!important;
  margin:auto!important;padding:clamp(1.15rem,2vw,1.75rem)!important;
  border-radius:1.25rem!important;
  box-shadow:0 2.5rem 7rem rgba(0,0,0,.62)!important;
  outline:none!important;
}
.crm-edit-slot #editContainer:focus{box-shadow:0 2.5rem 7rem rgba(0,0,0,.62),0 0 0 3px rgba(101,167,255,.13)!important}
.crm-edit-slot #editForm{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:.8rem 1rem!important;padding-top:.6rem!important}
.crm-edit-slot #editForm .form-row{min-width:0!important}
.crm-edit-slot #editForm .form-row-submit{grid-column:1/-1!important;display:flex!important;justify-content:flex-end!important;margin-top:.25rem!important}
.crm-edit-slot #editForm .form-row-submit .btn{min-width:12rem!important}
.crm-edit-close{
  position:absolute!important;inset-block-start:.8rem!important;inset-inline-end:.8rem!important;z-index:3!important;
  width:2.75rem!important;height:2.75rem!important;min-width:2.75rem!important;min-height:2.75rem!important;
  padding:0!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;
  border:1px solid rgba(255,255,255,.12)!important;border-radius:.85rem!important;
  background:#202a38!important;color:#bec8d5!important;box-shadow:0 .4rem 1.2rem rgba(0,0,0,.24)!important;
}
.crm-edit-close svg{width:1.2rem!important;height:1.2rem!important;display:block!important}
.crm-edit-close:hover{background:#293547!important;color:#fff!important;border-color:rgba(255,255,255,.2)!important}
.crm-edit-close:focus-visible{outline:3px solid rgba(101,167,255,.32)!important;outline-offset:2px!important}
.crm-edit-modal>.panel-title{padding-inline-end:3.5rem!important}

/* Password toggle: centered inside the field on every viewport, never below/over the border. */
.password-field{position:relative!important;width:100%!important;min-width:0!important}
.password-field input{width:100%!important;min-height:3rem!important;height:3rem!important;padding-inline-end:3.65rem!important}
.password-toggle{
  position:absolute!important;inset-inline-end:.28rem!important;inset-block-start:50%!important;inset-block-end:auto!important;
  transform:translateY(-50%)!important;margin:0!important;
  width:2.45rem!important;height:2.45rem!important;min-width:2.45rem!important;min-height:2.45rem!important;
  padding:0!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;
  border:1px solid rgba(255,255,255,.08)!important;border-radius:.72rem!important;background:#151d28!important;
  color:#a4b0bf!important;z-index:2!important;box-shadow:none!important;
}
.password-toggle:hover{transform:translateY(-50%)!important;background:#1d2734!important;color:#fff!important}
.password-eye{display:block!important;width:1.22rem!important;height:1.22rem!important}
.password-eye-closed{display:none!important}.password-toggle.is-visible .password-eye-open{display:none!important}.password-toggle.is-visible .password-eye-closed{display:block!important}

/* Desktop / wide layout: fluid width, natural document height. */
@media (min-width:1181px) and (pointer:fine){
  .hefo-app-shell{grid-template-columns:minmax(13.5rem,15.5vw) minmax(0,1fr)!important}
  .hefo-main,.hefo-content,.crm-dashboard,.crm-top-grid,.crm-data-workspace{height:auto!important;max-height:none!important;overflow:visible!important}
  .crm-dashboard{display:grid!important;grid-template-rows:auto auto!important;gap:clamp(.75rem,1vw,1.1rem)!important}
  .crm-top-grid{grid-template-columns:minmax(0,38fr) minmax(0,62fr)!important;grid-template-rows:auto auto!important;align-items:start!important}
  .crm-add-panel{grid-column:1/-1!important}
  .crm-data-workspace{min-height:22rem!important}
}

/* Tablet: drawer navigation, touch-sized controls, genuine 1/2-column compositions. */
@media (max-width:1180px), (pointer:coarse) and (max-width:1366px){
  body.hefo-menu-open{overflow:hidden!important}
  .hefo-sidebar{width:min(24rem,88vw)!important;max-width:88vw!important}
  .hefo-sidebar-close{width:2.75rem!important;height:2.75rem!important}
  .hefo-nav-item{min-height:3rem!important;padding:.7rem .8rem!important;gap:.75rem!important;font-size:.86rem!important}
  .hefo-nav-item svg{width:1.2rem!important;height:1.2rem!important}
  .hefo-content{padding:clamp(.8rem,2vw,1.25rem)!important}
  .panel,.hefo-card{padding:clamp(.9rem,2vw,1.25rem)!important}
  input,select,textarea,.btn,button,input[type="submit"]{font-size:.9rem!important}
  .btn,button,a.btn,input[type="submit"]{min-height:3rem!important}
  .crm-inline-row{grid-template-columns:1fr!important;gap:.45rem!important}
  .crm-inline-row>label{align-self:end!important}
  .crm-user-grid-form{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:.8rem 1rem!important}
  .crm-form-action{grid-column:1/-1!important}
  .crm-edit-slot #editForm{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .table-actions .btn,.user-actions .btn{min-height:2.85rem!important}
}

/* Tablet landscape uses two operating cards side by side. */
@media (min-width:760px) and (max-width:1180px) and (orientation:landscape), (pointer:coarse) and (min-width:760px) and (max-width:1366px) and (orientation:landscape){
  .crm-top-grid{grid-template-columns:minmax(0,40fr) minmax(0,60fr)!important;grid-template-rows:auto auto!important;gap:1rem!important}
  .crm-swipe-panel{grid-column:1!important;grid-row:1!important}
  .crm-verify-panel{grid-column:2!important;grid-row:1!important}
  .crm-add-panel{grid-column:1/-1!important;grid-row:2!important}
  .hefo-form-grid-2{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}

/* Tablet portrait is intentionally stacked for touch use. */
@media (min-width:621px) and (max-width:900px) and (orientation:portrait){
  .crm-top-grid{grid-template-columns:1fr!important;grid-template-rows:auto!important}
  .crm-swipe-panel,.crm-verify-panel,.crm-add-panel{grid-column:1!important;grid-row:auto!important}
  .crm-user-grid-form{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .hefo-top-actions .hefo-top-chip:nth-child(2){display:none!important}
}

/* Phone portrait: every function is reachable, readable and touch-safe. */
@media (max-width:620px){
  .hefo-content{padding:.72rem!important}
  .hefo-topbar{padding:.7rem .75rem!important;gap:.5rem!important;align-items:center!important}
  .hefo-page-title h1{font-size:1.15rem!important}.hefo-page-title small{font-size:.58rem!important}
  .hefo-top-actions{gap:.35rem!important}.hefo-top-actions .hefo-top-chip:not(:first-child){display:none!important}
  .crm-top-grid{grid-template-columns:1fr!important;gap:.75rem!important}
  .crm-swipe-panel,.crm-verify-panel,.crm-add-panel{grid-column:1!important;grid-row:auto!important}
  .crm-swipe-panel .form-row-inputs,.crm-verify-panel .form-row-inputs,.field-card-id .form-row-inputs{grid-template-columns:1fr!important}
  .crm-swipe-panel .form-row-inputs .btn,.crm-verify-panel .form-row-inputs .btn,.field-card-id .form-row-inputs .btn{width:100%!important;min-width:0!important}
  .crm-user-grid-form,.crm-edit-slot #editForm,.hefo-form-grid-2{grid-template-columns:1fr!important}
  .crm-edit-slot{padding:.55rem!important;align-items:flex-start!important}
  .crm-edit-slot #editContainer{width:100%!important;max-width:100%!important;margin:.35rem auto!important;padding:1rem!important;border-radius:1rem!important}
  .crm-edit-modal>.panel-title{font-size:1.25rem!important;padding-right:3.25rem!important}
  .crm-edit-slot #editForm .form-row-submit .btn{width:100%!important;min-width:0!important}
  .hefo-form-actions,.btn-row{display:grid!important;grid-template-columns:1fr!important;width:100%!important}
  .hefo-form-actions .btn,.btn-row .btn{width:100%!important}
  .table-actions{gap:.4rem!important}.table-actions .btn{min-width:5rem!important;padding-inline:.65rem!important}
  .hefo-page-table,.crm-table-scroll,.table-responsive{overflow-x:auto!important;-webkit-overflow-scrolling:touch!important}
  .hefo-center-notice__close{right:.65rem!important;top:.65rem!important}
  .hefo-auth-page{padding:.65rem!important;align-content:start!important}
  .hefo-auth-shell{width:100%!important;max-width:100%!important}
  .hefo-auth-card,.login-container,.register-container{padding:1.15rem!important}
  .password-field input{height:3.1rem!important;min-height:3.1rem!important}
}

/* Phone landscape: compact two-column actions where useful, without shrinking touch targets. */
@media (max-width:900px) and (orientation:landscape){
  .hefo-content{padding:.65rem .8rem!important}
  .crm-top-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-template-rows:auto auto!important;gap:.7rem!important}
  .crm-swipe-panel{grid-column:1!important}.crm-verify-panel{grid-column:2!important}.crm-add-panel{grid-column:1/-1!important}
  .crm-user-grid-form{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .hefo-sidebar{width:min(22rem,78vw)!important}
  .hefo-auth-shell{grid-template-columns:minmax(0,.75fr) minmax(20rem,1fr)!important}
  .hefo-auth-card{padding:1rem 1.25rem!important}
}

@media (prefers-reduced-motion:reduce){
  .crm-edit-slot:not(:empty),.crm-edit-slot #editContainer{animation:none!important;scroll-behavior:auto!important}
}

/* ===========================================================================
   HEFO-CRM 2.5.0 — Viewport navigation + mobile metrics polish
   Desktop navigation is persistent; mobile card metrics swipe horizontally.
   =========================================================================== */

/* Desktop: the sidebar is a persistent navigation rail, never a drawer. */
@media (min-width:1181px) and (pointer:fine){
  :root{--hf-sidebar-w:clamp(13.5rem,15.5vw,18rem)}
  .hefo-app-shell{
    display:block!important;
    min-height:100dvh!important;
    width:100%!important;
  }
  .hefo-sidebar{
    position:fixed!important;
    inset-block:0!important;
    inset-inline-start:0!important;
    width:var(--hf-sidebar-w)!important;
    height:100dvh!important;
    max-height:100dvh!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    align-self:auto!important;
    transform:none!important;
  }
  .hefo-main{
    margin-inline-start:var(--hf-sidebar-w)!important;
    width:calc(100% - var(--hf-sidebar-w))!important;
    max-width:calc(100% - var(--hf-sidebar-w))!important;
  }
  .hefo-mobile-menu,
  [data-hefo-menu-toggle]{
    display:none!important;
    visibility:hidden!important;
    pointer-events:none!important;
  }
  .hefo-topbar{
    padding-inline-start:clamp(1.15rem,1.45vw,1.75rem)!important;
    padding-inline-end:clamp(1.75rem,2.25vw,3rem)!important;
  }
  .hefo-top-actions{
    margin-inline-end:0!important;
    padding-inline-end:0!important;
  }
  .crm-fetch-progress{left:var(--hf-sidebar-w)!important}
}

/* Tablet and phone: drawer toggle is available only where the persistent
   desktop sidebar is intentionally replaced by the off-canvas drawer. */
@media (max-width:1180px), (pointer:coarse) and (max-width:1366px){
  .hefo-mobile-menu,[data-hefo-menu-toggle]{display:grid!important;visibility:visible!important;pointer-events:auto!important}
}

/* Mobile card overview: one compact swipe row instead of clipped metrics. */
@media (max-width:680px){
  .crm-stats-strip{
    position:relative!important;
    display:flex!important;
    flex-wrap:nowrap!important;
    align-items:center!important;
    width:100%!important;
    max-width:100%!important;
    gap:.9rem!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    padding:.65rem .8rem .75rem!important;
    scroll-snap-type:x proximity;
    scroll-padding-inline:.8rem;
    -webkit-overflow-scrolling:touch;
    overscroll-behavior-inline:contain;
    scrollbar-width:thin;
    scrollbar-color:rgba(145,158,177,.32) transparent;
  }
  .crm-stats-strip::-webkit-scrollbar{height:.35rem}
  .crm-stats-strip::-webkit-scrollbar-thumb{background:rgba(145,158,177,.30);border-radius:999px}
  .crm-stats-strip>.section-mini-title{
    flex:0 0 auto!important;
    min-width:max-content!important;
    white-space:nowrap!important;
    scroll-snap-align:start;
  }
  #countsSummary,.crm-counts-summary{
    display:flex!important;
    flex:0 0 auto!important;
    width:max-content!important;
    min-width:max-content!important;
    max-width:none!important;
    justify-content:flex-start!important;
    gap:1.05rem!important;
    overflow:visible!important;
    white-space:nowrap!important;
  }
  #countsSummary p,.crm-counts-summary p{
    flex:0 0 auto!important;
    width:max-content!important;
    min-width:max-content!important;
    white-space:nowrap!important;
    scroll-snap-align:start;
  }
}


/* ===========================================================================
   HEFO-CRM 2.5.1 — Mobile member filters + linked GLOBYNET branding
   =========================================================================== */

/* Powered by GLOBYNET is an intentional external brand link on every surface. */
a.hefo-powered-by,a.hefo-auth-powered,a.hefo-loader-powered{
  text-decoration:none!important;
  color:inherit!important;
  cursor:pointer!important;
}
a.hefo-powered-by:focus-visible,a.hefo-auth-powered:focus-visible,a.hefo-loader-powered:focus-visible{
  outline:3px solid rgba(107,169,255,.30)!important;
  outline-offset:3px!important;
  border-radius:.65rem!important;
}
a.hefo-powered-by img,a.hefo-auth-powered img,a.hefo-loader-powered img{
  transition:opacity .16s ease,filter .16s ease,transform .16s ease!important;
}
a.hefo-powered-by:hover img,a.hefo-auth-powered:hover img,a.hefo-loader-powered:hover img{
  opacity:1!important;
  filter:saturate(1.05) brightness(1.06)!important;
  transform:translateY(-1px)!important;
}

/* Phone member search: inputs stay readable and the Search CTA gets its own row. */
@media (max-width:680px){
  .user-filter-form{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:.72rem!important;
    margin-bottom:.85rem!important;
  }
  .user-filter-form .form-row{
    min-width:0!important;
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
    gap:.34rem!important;
  }
  .user-filter-label{
    min-height:1rem!important;
    font-size:.72rem!important;
    line-height:1.2!important;
  }
  .user-filter-select-wrapper,.user-filter-input-wrapper{
    width:100%!important;
    min-width:0!important;
  }
  .user-filter-form input,.user-filter-form select{
    width:100%!important;
    min-width:0!important;
    height:2.75rem!important;
    min-height:2.75rem!important;
    padding:.58rem .7rem!important;
    font-size:.84rem!important;
  }
  .user-filter-submit{
    grid-column:1/-1!important;
    display:flex!important;
    align-items:center!important;
    justify-content:stretch!important;
    margin:0!important;
  }
  .user-filter-submit .user-filter-button{
    width:100%!important;
    min-width:0!important;
    height:2.75rem!important;
    min-height:2.75rem!important;
    padding:.55rem .9rem!important;
    font-size:.86rem!important;
    line-height:1!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
  }
}

/* Very narrow phones: one filter per row avoids cramped labels and fields. */
@media (max-width:390px){
  .user-filter-form{grid-template-columns:1fr!important}
  .user-filter-submit{grid-column:1!important}
}

/* ==========================================================================\n   HEFO-CRM 2.5.2 — Edit dialog + filtered-result focus + verify privacy timer\n   ========================================================================== */

/* Edit member is a real application window, not a full-width content panel. */
.crm-edit-slot:not(:empty){
  padding:clamp(.75rem,2vw,1.5rem)!important;
  align-items:center!important;
  justify-content:center!important;
}
.crm-edit-slot #editContainer{
  width:min(54rem,calc(100vw - 2rem))!important;
  max-width:54rem!important;
  max-height:calc(100dvh - 2rem)!important;
  min-height:0!important;
  overflow:hidden!important;
  display:grid!important;
  grid-template-rows:auto minmax(0,1fr)!important;
  gap:.8rem!important;
  margin:auto!important;
  padding:1.15rem!important;
  border-radius:1.1rem!important;
  border:1px solid rgba(143,160,183,.22)!important;
  background:linear-gradient(180deg,#121a25 0%,#0e151f 100%)!important;
  box-shadow:0 2.2rem 6rem rgba(0,0,0,.66),inset 0 1px 0 rgba(255,255,255,.025)!important;
}
.crm-edit-window-head{
  min-width:0!important;
  padding:0 3.25rem .55rem 0!important;
  border-bottom:1px solid rgba(143,160,183,.14)!important;
}
.crm-edit-window-head .panel-kicker{margin-bottom:.3rem!important}
.crm-edit-window-head .panel-title{font-size:clamp(1.1rem,1.5vw,1.4rem)!important}
.crm-edit-slot #editForm.crm-edit-window-body{
  min-height:0!important;
  max-height:calc(100dvh - 8rem)!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  scrollbar-gutter:stable!important;
  overscroll-behavior:contain!important;
  padding:.1rem .35rem .2rem .05rem!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:.75rem 1rem!important;
  align-content:start!important;
}
.crm-edit-slot #editForm .form-row{
  display:flex!important;
  flex-direction:column!important;
  align-items:stretch!important;
  justify-content:flex-start!important;
  gap:.38rem!important;
  min-width:0!important;
}
.crm-edit-slot #editForm .form-row>label{
  width:100%!important;
  min-width:0!important;
  font-size:.76rem!important;
  line-height:1.25!important;
  color:#b9c4d2!important;
}
.crm-edit-slot #editForm input[type="text"],
.crm-edit-slot #editForm input[type="number"],
.crm-edit-slot #editForm input[type="email"],
.crm-edit-slot #editForm input[type="date"],
.crm-edit-slot #editForm select{
  min-height:2.8rem!important;
  height:2.8rem!important;
  font-size:.84rem!important;
}
.crm-edit-slot #editForm #consider_exp{
  width:1.15rem!important;
  height:1.15rem!important;
  min-width:1.15rem!important;
  min-height:1.15rem!important;
  margin:0!important;
  flex:0 0 auto!important;
}
.crm-edit-slot #editForm .form-row>label:has(#consider_exp){
  min-height:2.8rem!important;
  display:flex!important;
  flex-direction:row!important;
  align-items:center!important;
  gap:.6rem!important;
  padding:.65rem .75rem!important;
  border:1px solid var(--hf-border-strong)!important;
  border-radius:.72rem!important;
  background:#0b1017!important;
}
.crm-edit-slot #editForm .field-help{display:block!important;margin-top:.35rem!important}
.crm-edit-slot #editForm .form-row-submit{
  position:sticky!important;
  bottom:0!important;
  z-index:2!important;
  grid-column:1/-1!important;
  margin:.2rem -.05rem -.2rem!important;
  padding:.8rem .05rem .05rem!important;
  display:flex!important;
  justify-content:flex-end!important;
  background:linear-gradient(180deg,rgba(14,21,31,0),#0e151f 30%)!important;
}
.crm-edit-slot #editForm .form-row-submit .btn{
  min-width:11rem!important;
  min-height:2.85rem!important;
}
.crm-edit-close{
  top:1rem!important;
  right:1rem!important;
  width:2.7rem!important;
  height:2.7rem!important;
  min-width:2.7rem!important;
  min-height:2.7rem!important;
  border-radius:.75rem!important;
}
.crm-edit-slot #card_id:focus{
  border-color:rgba(101,167,255,.78)!important;
  box-shadow:0 0 0 3px rgba(101,167,255,.15)!important;
}

@media (max-width:720px){
  .crm-edit-slot:not(:empty){padding:.55rem!important;align-items:center!important}
  .crm-edit-slot #editContainer{
    width:calc(100vw - 1.1rem)!important;
    max-width:none!important;
    max-height:calc(100dvh - 1.1rem)!important;
    padding:1rem!important;
    border-radius:1rem!important;
  }
  .crm-edit-slot #editForm.crm-edit-window-body{
    grid-template-columns:1fr!important;
    max-height:calc(100dvh - 7rem)!important;
    gap:.7rem!important;
  }
  .crm-edit-slot #editForm .form-row-submit .btn{width:100%!important;min-width:0!important}
}


/* ==========================================================================\n   HEFO-CRM 2.5.3 — Global edit-member viewport dialog\n   The portal is a direct child of <body>; no table/panel stacking context may own it.\n   ========================================================================== */
body > #editPanel.crm-edit-slot{
  position:fixed!important;
  inset:0!important;
  z-index:2147483000!important;
  width:100vw!important;
  height:100dvh!important;
  min-width:0!important;
  min-height:0!important;
  margin:0!important;
  padding:clamp(.75rem,2.2vw,1.75rem)!important;
  box-sizing:border-box!important;
  pointer-events:none!important;
}
body > #editPanel.crm-edit-slot:not(:empty){
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  overflow:auto!important;
  pointer-events:auto!important;
  background:rgba(2,5,9,.84)!important;
  backdrop-filter:blur(14px) saturate(105%)!important;
  -webkit-backdrop-filter:blur(14px) saturate(105%)!important;
}
body > #editPanel.crm-edit-slot #editContainer{
  position:relative!important;
  flex:0 1 auto!important;
  width:min(56rem,92vw)!important;
  max-width:56rem!important;
  max-height:min(88dvh,54rem)!important;
  margin:auto!important;
  transform:none!important;
  isolation:isolate!important;
}
body.hefo-edit-modal-open > .hefo-app-shell,
body.hefo-edit-modal-open > #hefoPageLoader{
  pointer-events:none!important;
  user-select:none!important;
}
body.hefo-edit-modal-open > #editPanel{pointer-events:auto!important;user-select:auto!important}

@media (max-width:720px){
  body > #editPanel.crm-edit-slot{padding:.55rem!important}
  body > #editPanel.crm-edit-slot #editContainer{
    width:calc(100vw - 1.1rem)!important;
    max-width:none!important;
    max-height:calc(100dvh - 1.1rem)!important;
  }
}
