
:root{
  --brand-900:#022E66; --brand-600:#1E4C87; --brand-500:#6B99C3;
  --sand-500:#D1AB7D; --sand-700:#96785B;
  --neutral-200:#E9ECEF; --neutral-300:#D9DDE2; --neutral-500:#9aa3ad;
  --bg:#F7F9FB; --bg-elev:#FFFFFF; --panel:#FFFFFF; --panel-2:#F2F5F8;
  --text:#0F172A; --text-inv:#ffffff; --muted:#667185;
  --border:#E5E9F0; --border-strong:#D0D6DE;
  --ring:rgba(2,46,102,.22); --shadow:0 10px 24px rgba(2,21,37,.05);
  --radius:12px; --radius-sm:10px; --radius-lg:18px;
  --space-1:4px; --space-2:8px; --space-3:12px; --space-4:16px; --space-6:24px; --space-8:32px;
  --primary:var(--brand-900); --link:var(--brand-900);
  --success:#2BB673; --danger:#D7263D; --warning:var(--sand-500);
}
html[data-theme="dark"]{
  --bg:#0F141A; --bg-elev:#121922; --panel:#121922; --panel-2:#182230;
  --text:#EAF0F6; --text-inv:#0F141A; --muted:#9AA3AF; --link:#8bb9ea;
  --primary:#6B99C3; --border:#223041; --border-strong:#2C3C51;
  --ring:rgba(107,153,195,.28); --shadow:0 12px 30px rgba(0,0,0,.3);
}
*{box-sizing:border-box} html,body{height:100%}
body{margin:0;font-family:ui-sans-serif,system-ui,-apple-system,Segoe UI,Inter,Roboto,Helvetica,Arial;color:var(--text);background:var(--bg);line-height:1.55;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}
a{color:var(--link);text-decoration:none}a:hover{text-decoration:underline}
h1,h2,h3{margin:0 0 var(--space-4) 0;line-height:1.2;letter-spacing:.2px;font-weight:800}
h1{font-size:clamp(26px,3vw,34px)}h2{font-size:clamp(20px,2.3vw,26px)}h3{font-size:clamp(18px,2vw,22px)}
.small{font-size:12px}.muted{color:var(--muted)}
.layout{display:grid;grid-template-columns:224px 1fr;min-height:100dvh}
.content{min-width:0;padding:var(--space-6)}
.crm-page-shell{width:min(100%,1480px);min-width:0;margin:0 auto}
.crm-page-shell>.container{width:100%;max-width:none;margin-left:0;margin-right:0;padding-left:0;padding-right:0}
.crm-page-header{display:grid;gap:10px;width:100%;margin:2px 0 18px;padding:0 2px;color:var(--text)}
.crm-page-header__breadcrumbs{display:flex;align-items:center;gap:7px;min-width:0;color:var(--muted);font-size:12px;line-height:1.35}
.crm-page-header__breadcrumbs a{color:var(--brand-900);text-decoration:none}
.crm-page-header__breadcrumbs a:hover{text-decoration:underline}
.crm-page-header__breadcrumbs strong{overflow:hidden;color:var(--text);font-weight:750;text-overflow:ellipsis;white-space:nowrap}
.crm-page-header__row{display:flex;align-items:flex-end;justify-content:space-between;gap:22px;min-width:0}
.crm-page-header__copy{min-width:0}
.crm-page-header__title{margin:0;overflow-wrap:anywhere;color:var(--text);font-size:32px;line-height:1.12;letter-spacing:-.025em;font-weight:850}
.crm-page-header__subtitle{max-width:820px;margin:5px 0 0;color:var(--muted);font-size:14px;line-height:1.45}
.crm-page-header__actions{display:flex;align-items:center;justify-content:flex-end;gap:9px;flex-wrap:wrap}
.crm-page-header__actions>*{order:20}
.crm-page-header__actions form{display:inline-flex;align-items:center;margin:0}
.crm-page-header__actions :is(a,button){display:inline-flex;align-items:center;justify-content:center;height:42px;min-height:42px;padding:0 14px;border:1px solid var(--border);border-radius:12px;background:var(--panel);color:var(--text);font-size:14px;line-height:1.2;font-weight:750;text-decoration:none;white-space:nowrap;box-shadow:none}
.crm-page-header__actions [data-action-icon]{width:42px;min-width:42px;padding:0}
.crm-page-header__actions [data-action-icon] svg{display:block;width:22px;height:22px;fill:none;stroke:currentColor}
.crm-page-header__actions :is(a,button):hover{border-color:var(--brand-500);background:var(--panel-2);color:var(--text);text-decoration:none}
.crm-page-header__actions>[data-action-intent="navigation"]{order:10}
.crm-page-header__actions>[data-action-intent="utility"]{order:20}
.crm-page-header__actions>[data-action-intent="primary"],
.crm-page-header__actions>form[data-action-intent="primary"],
.crm-page-header__actions>form:has(>[data-action-intent="primary"]){order:30}
.crm-page-header__actions>[data-action-intent="danger"],
.crm-page-header__actions>form[data-action-intent="danger"],
.crm-page-header__actions>form:has(>[data-action-intent="danger"]){order:40}
.crm-page-header__actions :is([data-action-intent="primary"],a[href*="/create"],a[href*="/edit"],button[data-task-edit-toggle]){border-color:var(--primary);background:var(--primary);color:var(--text-inv)}
.crm-page-header__actions :is([data-action-intent="primary"],a[href*="/create"],a[href*="/edit"],button[data-task-edit-toggle]):hover{border-color:var(--brand-600);background:var(--brand-600);color:#fff}
.crm-page-header__actions :is([data-action-intent="danger"],.btn--danger,.btn-danger,.btn-outline-danger){border-color:#dc2626;background:#fff5f5;color:#b91c1c}
.crm-page-header__actions :is([data-action-intent="danger"],.btn--danger,.btn-danger,.btn-outline-danger):hover{border-color:#b91c1c;background:#fee2e2;color:#991b1b}
.crm-page-header__actions :is(a,button):disabled{cursor:not-allowed;opacity:.55;transform:none}
.crm-page-header__tabs{display:flex;align-items:center;gap:8px;min-width:0;margin-top:3px;overflow-x:auto;scrollbar-width:none}
.crm-page-header__tabs::-webkit-scrollbar{display:none}
.crm-page-header__tab{display:inline-flex;align-items:center;justify-content:center;min-height:40px;padding:8px 14px;border:1px solid var(--border);border-radius:12px;background:var(--panel);color:var(--text);font-size:14px;font-weight:750;text-decoration:none;white-space:nowrap}
.crm-page-header__tab:hover{border-color:var(--brand-500);background:var(--panel-2);text-decoration:none}
.crm-page-header__tab.is-active{border-color:var(--primary);background:var(--primary);color:var(--text-inv);box-shadow:0 6px 16px rgba(2,46,102,.14)}
@media(max-width:760px){
  .crm-page-header{margin-bottom:14px}
  .crm-page-header__row{align-items:stretch;flex-direction:column;gap:12px}
  .crm-page-header__title{font-size:27px}
  .crm-page-header__actions{justify-content:flex-start}
  .crm-page-header__actions>:is(a,button,form){flex:1 1 auto}
  .crm-page-header__actions form>:is(a,button){width:100%}
}
.sidebar{position:sticky;top:0;height:100dvh;background:var(--bg-elev);border-right:1px solid var(--border);padding:12px 10px;display:flex;flex-direction:column;gap:10px;overflow-y:auto}
.sidebar::-webkit-scrollbar{width:0;height:0}.sidebar{scrollbar-width:none}
.sidebar .brand{font-weight:900;display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:10px}
.nav-section{margin-top:2px}.group-title{margin:8px 8px 4px;font-size:11px;color:var(--muted);text-transform:uppercase;letter-spacing:.08em}
.sb-search{position:relative;margin:4px 6px 8px}
.sb-search input{width:100%;padding:9px 34px 9px 12px;border:1px solid var(--border);border-radius:12px;background:var(--panel);outline:0}
.sb-search input:focus{border-color:var(--brand-500);box-shadow:0 0 0 4px var(--ring)}
.sb-search .clear{position:absolute;right:8px;top:50%;transform:translateY(-50%);border:0;background:transparent;cursor:pointer;opacity:.6}
.sb-search-results{position:absolute;left:0;right:0;top:calc(100% + 6px);background:var(--panel);border:1px solid var(--border);border-radius:12px;box-shadow:var(--shadow);display:none;max-height:220px;overflow:auto;z-index:20}
.sb-search.open .sb-search-results{display:block}
.sb-search-results .item{padding:10px 12px;display:flex;gap:8px;align-items:center;border-bottom:1px solid var(--border)}
.sb-search-results .item:last-child{border-bottom:0}
.sb-search-results .item:hover,.sb-search-results .item.active{background:var(--panel-2)}
.nav-list{display:flex;flex-direction:column;gap:4px}
.nav-group{margin:2px 0;border:1px solid transparent;border-radius:10px}
.group-toggle{display:flex;align-items:center;gap:10px;width:100%;padding:8px 10px;border-radius:10px;background:transparent;border:1px solid transparent;color:var(--text);cursor:pointer}
.group-toggle:hover{background:var(--panel-2)}
.group-toggle .icon{width:18px}.group-toggle .chev{margin-left:auto;transition:transform .15s ease}
.nav-group.open .group-toggle{background:var(--panel-2);border-color:var(--border)}.nav-group.open .group-toggle .chev{transform:rotate(90deg)}
.sub{display:none;margin:6px 0 8px 12px;padding-left:8px;border-left:2px solid var(--border)}
.nav-group.open .sub{display:block}
.sub .nav-item{display:flex;align-items:center;gap:8px;padding:8px 8px;border-radius:10px;color:var(--text);text-decoration:none}
.sub .nav-item:hover{background:var(--panel-2)}.sub .nav-item .bullet{width:6px;height:6px;border-radius:999px;background:var(--border-strong);display:inline-block}
.nav-item--admin-cta{position:relative;display:flex;align-items:center;gap:10px;margin:4px 8px 0;padding:12px 14px;border:1px solid rgba(99,102,241,.32);border-radius:14px;background:linear-gradient(135deg,#111827 0%,#0f172a 48%,#020617 100%);color:#f8fafc !important;box-shadow:0 14px 30px rgba(2,6,23,.18),inset 0 1px 0 rgba(255,255,255,.06);overflow:hidden;text-decoration:none}
.nav-item--admin-cta:hover{background:linear-gradient(135deg,#172554 0%,#111827 48%,#020617 100%);border-color:rgba(99,102,241,.5);text-decoration:none}
.nav-item--admin-cta.is-active{border-color:rgba(99,102,241,.62);box-shadow:0 16px 36px rgba(2,6,23,.24),0 0 0 1px rgba(99,102,241,.16),inset 0 1px 0 rgba(255,255,255,.08)}
.nav-item--admin-cta__glow{position:absolute;inset:-40% auto auto -10%;width:120px;height:120px;border-radius:999px;background:radial-gradient(circle,rgba(99,102,241,.34) 0%,rgba(99,102,241,0) 72%);pointer-events:none}
.nav-item--admin-cta__icon{position:relative;z-index:1;display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:11px;background:linear-gradient(135deg,rgba(99,102,241,.3),rgba(37,99,235,.16));border:1px solid rgba(99,102,241,.28);color:#c7d2fe;flex:0 0 34px}
.nav-item--admin-cta__text{position:relative;z-index:1;font-size:14px;font-weight:800;letter-spacing:.01em}
@media(max-width:1100px){
  html,body{max-width:100%;overflow-x:clip}
  .layout{grid-template-columns:minmax(0,1fr)}
  .sidebar{
    display:flex;
    position:fixed;
    inset:0 auto 0 0;
    width:min(320px,86vw);
    max-width:320px;
    height:100dvh;
    transform:translate3d(-110%,0,0);
    visibility:hidden;
    opacity:0;
    pointer-events:none;
    z-index:120;
    transition:transform .18s ease,opacity .12s ease,visibility 0s linear .18s;
  }
  body.is-nav-open .sidebar{
    transform:translate3d(0,0,0);
    visibility:visible;
    opacity:1;
    pointer-events:auto;
    transition:transform .18s ease,opacity .12s ease,visibility 0s;
  }
}
.card{background:var(--panel);border:1px solid var(--border);border-radius:var(--radius);padding:var(--space-4);box-shadow:var(--shadow)}
.grid{display:grid;gap:var(--space-4)}.grid-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-4{grid-template-columns:repeat(4,minmax(0,1fr))}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;border-radius:12px;border:1px solid var(--border);padding:10px 14px;background:var(--panel);color:var(--text);cursor:pointer;transition:transform .06s ease,background .2s ease,border-color .2s ease,box-shadow .2s ease}
.btn:hover{transform:translateY(-1px)}.btn.small{padding:6px 10px;font-size:13px}
.btn.primary{background:var(--primary);border-color:transparent;color:var(--text-inv)}.btn.ghost{background:var(--panel-2)}
.table-wrap{overflow:auto;border-radius:12px;box-shadow:var(--shadow);border:1px solid var(--border);background:var(--panel)}
table{width:100%;border-collapse:collapse}
thead th{background:var(--panel-2);color:var(--muted);text-align:left;font-weight:700;letter-spacing:.1px;padding:12px;border-bottom:1px solid var(--border);position:sticky;top:0;z-index:1}
tbody td{padding:12px;border-bottom:1px solid var(--border)}tbody tr:hover{background:color-mix(in oklab,var(--brand-500) 6%,transparent)}tbody .vt-pad{height:0}
.banner{padding:10px 14px;border:1px solid var(--border);border-left:6px solid var(--primary);background:var(--panel);border-radius:12px;margin:0 0 12px 0}
.rtoast-root{position:fixed;right:16px;bottom:16px;z-index:90;display:flex;flex-direction:column;gap:10px;max-width:360px}
.rtoast{background:var(--panel);border:1px solid var(--border);border-left:6px solid var(--primary);color:var(--text);border-radius:12px;padding:10px 14px;box-shadow:var(--shadow);cursor:pointer;display:flex;gap:10px;align-items:flex-start}
.rtoast .title{font-weight:700}.rtoast .time{font-size:12px;color:var(--muted)}



.layout.layout--auth{
  display:flex;
  min-height:100vh;
  width:100%;
  background-image:url('/public/img/login-bg.jpg');
  background-position:center center;
  background-repeat:no-repeat;
  background-size:cover;
}

.layout.layout--auth .content.content--auth{
  flex:1;
  display:flex;
  justify-content:center;
  align-items:center;
  padding:var(--space-6);
}


.auth-page{
  width:100%;
  display:flex;
  justify-content:center;
}


.auth-card{
  width:100%;
  max-width:420px;
  background:rgba(88,28,135,.22);
  border-radius:32px;
  padding:32px 36px 36px;
  border:1px solid rgba(255,255,255,.38);
  box-shadow:0 28px 80px rgba(15,23,42,.85);
  backdrop-filter:blur(20px);
}


.auth-title{
  text-align:center;
  font-size:26px;
  font-weight:700;
  color:#ffffff;
  margin:0 0 24px;
}


.auth-form{
  display:flex;
  flex-direction:column;
  gap:14px;
}


.auth-field{
  position:relative;
  border-radius:999px;
  overflow:hidden;
}


.auth-field input{
  width:100%;
  padding:14px 54px 14px 22px;
  border-radius:999px;
  border:none;
  background:transparent; 
  outline:0;
  font-size:14px;
  color:#ffffff;
  position:relative;
  z-index:2;
}


.auth-field--password input{
  padding-right:54px;
}


.auth-field::before{
  content:'';
  position:absolute;
  inset:0;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.75);
  background:rgba(0,0,0,0.02); 
  pointer-events:none;
  z-index:1;
}

.auth-field input::placeholder{
  color:rgba(255,255,255,.9);
}

.auth-field input:focus{
  box-shadow:0 0 0 3px rgba(255,255,255,.4);
}



.auth-field .auth-icon{
  position:absolute;
  right:18px;
  top:50%;
  transform:translateY(-50%);
  display:flex;
  align-items:center;
  justify-content:center;
  pointer-events:none;
  z-index:2;
}

.auth-field .auth-icon img{
  width:20px;
  height:20px;
  display:block;
}


.auth-field--password .auth-icon--lock{
  right:18px;
  transition:opacity 0.2s ease, transform 0.2s ease;
  display:flex;
}

.auth-toggle-password{
  position:absolute;
  right:18px;
  top:50%;
  transform:translateY(-50%);
  background:transparent;
  border:none;
  padding:4px;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:3;
  opacity:0.9;
  transition:opacity 0.2s ease, transform 0.2s ease;
}


.auth-icon--hidden,
.auth-toggle-password--hidden,
.auth-eye-icon--hidden{
  display:none!important;
}

.auth-toggle-password:hover{
  opacity:1;
}

.auth-toggle-password:active{
  transform:translateY(-50%) scale(0.95);
}

.auth-toggle-password svg{
  width:20px;
  height:20px;
  display:block;
  position:relative;
}


.auth-toggle-password #pupil{
  transition:cx 0.08s ease-out, cy 0.08s ease-out;
  transform-origin:center;
  will-change:cx,cy;
}


.auth-submit{
  width:100%;
  margin-top:20px;
  border-radius:999px;
  padding:14px 20px;
  font-weight:600;
  background:#ffffff;
  color:#4b1fa6;
  border:none;
  box-shadow:0 18px 40px rgba(15,23,42,.4);
  cursor:pointer;
  transition:transform .12s ease-out,
             box-shadow .12s ease-out,
             filter .12s ease-out;
}

.auth-submit:hover{
  filter:brightness(1.04);
  box-shadow:0 22px 50px rgba(15,23,42,.5);
}

.auth-submit:active{
  transform:translateY(1px);
  box-shadow:0 14px 32px rgba(15,23,42,.45);
}



.auth-card .auth-field input,
.auth-card .auth-field input:hover,
.auth-card .auth-field input:focus,
.auth-card .auth-field input:active{
  background-color: transparent !important;
  background-image: none !important;
  border:none !important;
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}


.auth-card .auth-field input:-webkit-autofill,
.auth-card .auth-field input:-webkit-autofill:hover,
.auth-card .auth-field input:-webkit-autofill:focus,
.auth-card .auth-field input:-webkit-autofill:active{
  background-color: transparent !important;
  background-image: none !important;
  -webkit-box-shadow:0 0 0 1000px rgba(88,28,135,.22) inset !important;
  box-shadow:0 0 0 1000px rgba(88,28,135,.22) inset !important;
  border:none !important;
  -webkit-text-fill-color:#ffffff !important;
  color:#ffffff !important;
  transition:background-color 5000s ease-in-out 0s;
  -webkit-transition:background-color 5000s ease-in-out 0s;
}



input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active{
  -webkit-box-shadow:0 0 0 1000px rgba(88,28,135,.22) inset !important;
  box-shadow:0 0 0 1000px rgba(88,28,135,.22) inset !important;
  -webkit-text-fill-color:#ffffff !important;
  transition:background-color 5000s ease-in-out 0s;
  -webkit-transition:background-color 5000s ease-in-out 0s;
}


.crm-global-notice{position:sticky;top:0;z-index:60;margin:0 0 10px 0}
.crm-global-notice__inner{display:flex;align-items:center;gap:10px;height:34px;padding:0 10px;border-radius:12px;border:1px solid #f6d36a;background:#fffbeb;box-shadow:0 6px 14px rgba(2,6,23,.06)}
.crm-global-notice__ticker{position:relative;overflow:hidden;flex:1;min-height:18px;-webkit-mask-image:linear-gradient(to right,transparent 0,#000 24px,#000 calc(100% - 24px),transparent 100%);mask-image:linear-gradient(to right,transparent 0,#000 24px,#000 calc(100% - 24px),transparent 100%)}
.crm-global-notice__track{display:inline-flex;align-items:center;white-space:nowrap;transform:translateX(0);will-change:transform}
.crm-global-notice__text{display:inline-block;white-space:nowrap;font-weight:600;color:#78350f;letter-spacing:.1px;padding-right:40px}
.crm-global-notice__text--dup{display:none}
.crm-global-notice.is-animate .crm-global-notice__text--dup{display:inline-block}
.crm-global-notice.is-animate .crm-global-notice__track{animation:crmNoticeTicker var(--gn-duration,18s) linear infinite}
.crm-global-notice:hover .crm-global-notice__track{animation-play-state:paused}
.crm-global-notice__close{flex:0 0 auto;width:28px;height:28px;display:inline-flex;align-items:center;justify-content:center;border:1px solid #f6d36a;background:rgba(255,255,255,.55);color:#78350f;border-radius:10px;line-height:1;cursor:pointer;transition:background .15s ease,transform .06s ease}
.crm-global-notice__close:hover{background:rgba(255,255,255,.85)}
.crm-global-notice__close:active{transform:scale(.98)}
@media (prefers-reduced-motion:reduce){.crm-global-notice.is-animate .crm-global-notice__track{animation:none}}
@keyframes crmNoticeTicker{0%{transform:translateX(0)}100%{transform:translateX(-50%)}}

.crm-tabs{display:flex;gap:8px;margin:10px 0 12px 0;flex-wrap:wrap}
.crm-tab{display:inline-flex;align-items:center;gap:8px;padding:6px 10px;border:1px solid var(--border);border-radius:10px;background:var(--panel);text-decoration:none;color:inherit}
.crm-tab.is-active{border-color:#2d6cdf;box-shadow:0 0 0 2px rgba(45,108,223,.14)}

/* Shared list pagination */
.crm-pagination{
  width:min(100%,920px);
  margin:22px auto 4px;
  padding:14px 16px;
  border:1px solid var(--border);
  border-radius:18px;
  background:color-mix(in srgb,var(--panel) 92%,transparent);
  box-shadow:0 8px 24px rgba(15,23,42,.055);
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:12px;
}
.crm-pagination__controls{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  width:100%;
}
.crm-pagination__btn,
.crm-pagination__submit{
  height:42px;
  border:1px solid var(--border-strong);
  border-radius:13px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  font:inherit;
  font-size:15px;
  font-weight:700;
  line-height:1;
  text-decoration:none;
  white-space:nowrap;
  transition:background-color .15s ease,border-color .15s ease,color .15s ease,box-shadow .15s ease,transform .15s ease;
}
.crm-pagination__btn{
  min-width:116px;
  padding:0 15px;
  background:var(--panel);
  color:var(--brand-900);
}
.crm-pagination__btn:hover{
  opacity:1;
  border-color:var(--brand-500);
  background:var(--panel-2);
  box-shadow:0 5px 14px rgba(15,23,42,.07);
  transform:translateY(-1px);
  text-decoration:none;
}
.crm-pagination__btn.is-disabled,
.crm-pagination__btn[aria-disabled="true"]{
  pointer-events:none;
  background:var(--panel-2);
  color:var(--neutral-500);
  box-shadow:none;
  transform:none;
}
.crm-pagination__go{
  height:42px;
  margin:0;
  padding:4px 4px 4px 12px;
  border:1px solid var(--border-strong);
  border-radius:13px;
  background:var(--panel-2);
  display:flex;
  align-items:center;
  gap:7px;
}
.crm-pagination__label{
  color:var(--muted);
  font-size:13px;
  font-weight:700;
}
.crm-pagination__input{
  width:48px;
  height:32px;
  padding:0 5px;
  border:1px solid var(--border-strong);
  border-radius:9px;
  background:var(--panel);
  color:var(--text);
  font:inherit;
  font-size:15px;
  font-weight:800;
  text-align:center;
  outline:none;
}
.crm-pagination__input:focus{
  border-color:var(--brand-500);
  box-shadow:0 0 0 3px var(--ring);
}
.crm-pagination__limit{
  min-width:25px;
  color:var(--muted);
  font-size:13px;
  font-weight:700;
}
.crm-pagination__submit{
  min-width:52px;
  padding:0 13px;
  border-color:var(--primary);
  background:var(--primary);
  color:var(--text-inv);
  cursor:pointer;
}
.crm-pagination__submit:hover{
  filter:brightness(.9);
  box-shadow:0 5px 14px rgba(10,58,141,.18);
}
@media(max-width:760px){
  .crm-pagination{padding:13px}
  .crm-pagination__controls{flex-wrap:wrap}
}
@media(max-width:560px){
  .crm-pagination__controls{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
  .crm-pagination__btn{min-width:0;width:100%}
  .crm-pagination__go{grid-column:1/-1;grid-row:2;justify-content:center}
}

/* Shared list search and filter panel */
body .crm-search.crm-search{
  display:block;
  width:100%;
  box-sizing:border-box;
  margin:0 0 20px;
  padding:16px;
  border:1px solid var(--border);
  border-radius:18px;
  background:color-mix(in srgb,var(--panel) 92%,transparent);
  box-shadow:0 8px 24px rgba(15,23,42,.055);
}
body .crm-search.crm-search .crm-search__header{
  grid-column:1/-1;
  display:flex;
  align-items:center;
  gap:11px;
  margin:0 0 14px;
  padding:0 0 13px;
  border-bottom:1px solid var(--border);
}
body .crm-search.crm-search .crm-search__icon{
  width:38px;
  height:38px;
  flex:0 0 38px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid var(--border-strong);
  border-radius:12px;
  background:var(--panel-2);
  color:var(--brand-900);
}
body .crm-search.crm-search .crm-search__icon svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
body .crm-search.crm-search .crm-search__heading{min-width:0;display:flex;flex-direction:column;gap:1px}
body .crm-search.crm-search .crm-search__title{color:var(--text);font-size:15px;font-weight:800;line-height:1.25}
body .crm-search.crm-search .crm-search__hint{color:var(--muted);font-size:12px;line-height:1.4}
body .crm-search.crm-search .crm-search__grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:13px 14px;
  align-items:end;
}
body .crm-search.crm-search .crm-search__field{min-width:0;display:flex;flex-direction:column;gap:6px}
body .crm-search.crm-search .crm-search__field > label,
body .crm-search.crm-search label.crm-search__label{
  margin:0;
  color:var(--muted);
  font-size:12px;
  font-weight:800;
  line-height:1.25;
  letter-spacing:.015em;
}
body .crm-search.crm-search :where(input:not([type="hidden"]):not([type="radio"]):not([type="checkbox"]),select){
  width:100%;
  min-width:0;
  height:44px;
  margin:0;
  padding:0 13px;
  border:1px solid var(--border-strong);
  border-radius:12px;
  background:var(--panel);
  color:var(--text);
  font:inherit;
  font-size:14px;
  line-height:1;
  outline:none;
  box-shadow:none;
  transition:border-color .15s ease,box-shadow .15s ease,background-color .15s ease;
}
body .crm-search.crm-search :where(input:not([type="hidden"]):not([type="radio"]):not([type="checkbox"]),select):hover{border-color:color-mix(in srgb,var(--brand-500) 68%,var(--border-strong))}
body .crm-search.crm-search :where(input:not([type="hidden"]):not([type="radio"]):not([type="checkbox"]),select):focus{
  border-color:var(--brand-500);
  box-shadow:0 0 0 3px var(--ring);
  background:var(--panel);
}
body .crm-search.crm-search :where(input,select)::placeholder{color:color-mix(in srgb,var(--muted) 76%,transparent)}
body .crm-search.crm-search .crm-search__actions{
  grid-column:1/-1;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:wrap;
  gap:9px;
  margin:0;
  padding-top:1px;
}
body .crm-search.crm-search .crm-search__scopes,
body .crm-search.crm-search .crm-search__buttons,
body .crm-search.crm-search .crm-search__utilities,
body .crm-search.crm-search .crm-search__commit,
body .crm-search.crm-search .crm-search__primary{display:flex;align-items:center;flex-wrap:wrap;gap:9px}
body .crm-search.crm-search .crm-search__scopes{margin-right:auto}
body .crm-search.crm-search .crm-search__buttons{margin-left:auto;justify-content:flex-end;gap:10px}
body .crm-search.crm-search .crm-search__commit,
body .crm-search.crm-search .crm-search__primary{padding-left:10px;border-left:1px solid var(--border)}
body .crm-search.crm-search .crm-search__buttons > :first-child{padding-left:0;border-left:0}
body .crm-search.crm-search .crm-search__scope{
  min-width:0;
  height:42px;
  padding:0 15px;
  border:1px solid var(--border-strong);
  border-radius:13px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:var(--panel);
  color:var(--text);
  font-size:14px;
  font-weight:750;
  line-height:1;
  text-decoration:none;
  white-space:nowrap;
}
body .crm-search.crm-search .crm-search__scope:hover{border-color:var(--brand-500);background:var(--panel-2);text-decoration:none}
body .crm-search.crm-search .crm-search__scope.is-active{border-color:var(--primary);background:var(--primary);color:var(--text-inv);box-shadow:0 6px 16px rgba(2,46,102,.14)}
body .crm-search.crm-search .crm-search__submit,
body .crm-search.crm-search .crm-search__reset,
body .crm-search.crm-search .crm-search__action{
  min-width:94px;
  height:42px;
  padding:0 15px;
  border:1px solid var(--border-strong);
  border-radius:13px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  font:inherit;
  font-size:14px;
  font-weight:750;
  line-height:1;
  text-decoration:none;
  white-space:nowrap;
  cursor:pointer;
  transition:background-color .15s ease,border-color .15s ease,color .15s ease,box-shadow .15s ease,transform .15s ease;
}
body .crm-search.crm-search .crm-search__submit{
  border-color:var(--primary);
  background:var(--primary);
  color:var(--text-inv);
  box-shadow:0 5px 14px rgba(10,58,141,.14);
}
body .crm-search.crm-search .crm-search__reset,
body .crm-search.crm-search .crm-search__action{background:var(--panel);color:var(--brand-900)}
body .crm-search.crm-search .crm-search__submit:hover,
body .crm-search.crm-search .crm-search__reset:hover,
body .crm-search.crm-search .crm-search__action:hover{transform:translateY(-1px);text-decoration:none}
body .crm-search.crm-search .crm-search__submit:hover{filter:brightness(.92);box-shadow:0 7px 18px rgba(10,58,141,.2)}
body .crm-search.crm-search .crm-search__reset:hover,
body .crm-search.crm-search .crm-search__action:hover{border-color:var(--brand-500);background:var(--panel-2)}
body .crm-search.crm-search .crm-search__action--accent{border-color:color-mix(in srgb,var(--primary) 35%,var(--border));background:var(--panel-2);font-weight:800}
body .crm-search.crm-search .crm-search__action--primary{border-color:var(--primary);background:var(--primary);color:var(--text-inv);font-weight:800}
body .crm-search.crm-search .crm-search__action--primary:hover{border-color:var(--brand-600);background:var(--brand-600);color:#fff}
body .crm-search.crm-search .crm-search__action--icon{width:42px;min-width:42px;padding:0}
body .crm-search.crm-search .crm-search__action--icon svg{display:block;width:22px;height:22px;fill:none;stroke:currentColor}
body .crm-search.crm-search .crm-search__utility-select{width:auto;min-width:170px;height:42px;padding-top:0;padding-bottom:0;font-weight:750}
body .crm-search.crm-search .crm-search__separator{width:1px;height:28px;margin:0 2px;background:var(--border)}
body .crm-search.crm-search .crm-search__chips{grid-column:1/-1;display:flex;align-items:center;flex-wrap:wrap;gap:7px}
body .crm-search.crm-search .crm-search__chip{display:inline-flex;align-items:center;min-height:28px;padding:4px 9px;border-radius:999px;background:var(--panel-2);color:var(--muted);font-size:12px;font-weight:700}
body .crm-search.crm-search.crm-search--four .crm-search__grid{grid-template-columns:repeat(4,minmax(0,1fr))}
body .crm-search.crm-search.crm-search--sort-button .crm-search__grid{grid-template-columns:repeat(3,minmax(0,1fr)) auto}
body .crm-search.crm-search.crm-search--inline .crm-search__grid{grid-template-columns:repeat(2,minmax(0,1fr))}
body .crm-search.crm-search.crm-search--inline .crm-search__actions{grid-column:1/-1;align-self:end}
body .crm-search.crm-search.crm-search--search-sort .crm-search__grid{grid-template-columns:minmax(240px,1fr) auto auto}
body .crm-search.crm-search.crm-search--compact .crm-search__grid,
body .crm-search.crm-search.crm-search--single .crm-search__grid{grid-template-columns:1fr}
body .crm-search.crm-search.crm-search--compact .crm-search__actions,
body .crm-search.crm-search.crm-search--single .crm-search__actions{grid-column:1/-1;align-self:end}
body .crm-search.crm-search.crm-search--compact .crm-search__header{margin-bottom:12px}
body .crm-search.crm-search .crm-search__field--sort{width:44px}
body .crm-search.crm-search .crm-search__sort-toggle{
  width:44px;
  height:44px;
  padding:0;
  border:1px solid var(--border-strong);
  border-radius:12px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:var(--panel);
  color:var(--brand-900);
  cursor:pointer;
  transition:border-color .15s ease,background-color .15s ease,box-shadow .15s ease,transform .15s ease;
}
body .crm-search.crm-search .crm-search__sort-toggle:hover{
  border-color:var(--brand-500);
  background:var(--panel-2);
  transform:translateY(-1px);
}
body .crm-search.crm-search .crm-search__sort-toggle:focus-visible{
  outline:none;
  border-color:var(--brand-500);
  box-shadow:0 0 0 3px var(--ring);
}
body .crm-search.crm-search .crm-search__sort-toggle svg{width:22px;height:22px;display:block}
@media(max-width:1050px){
  body .crm-search.crm-search .crm-search__grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  body .crm-search.crm-search.crm-search--four .crm-search__grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  body .crm-search.crm-search.crm-search--inline .crm-search__grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  body .crm-search.crm-search.crm-search--inline .crm-search__actions{grid-column:1/-1}
}
@media(max-width:760px){
  body .crm-search.crm-search{padding:14px}
  body .crm-search.crm-search.crm-search--compact .crm-search__grid{grid-template-columns:1fr}
  body .crm-search.crm-search.crm-search--compact .crm-search__actions{grid-column:1/-1}
}
@media(max-width:560px){
  body .crm-search.crm-search .crm-search__grid{grid-template-columns:1fr}
  body .crm-search.crm-search .crm-search__actions{justify-content:stretch}
  body .crm-search.crm-search .crm-search__submit,
  body .crm-search.crm-search .crm-search__reset,
  body .crm-search.crm-search .crm-search__action{flex:1 1 120px}
  body .crm-search.crm-search .crm-search__separator{display:none}
  body .crm-search.crm-search .crm-search__hint{display:none}
  body .crm-search.crm-search .crm-search__scopes,
  body .crm-search.crm-search .crm-search__buttons,
  body .crm-search.crm-search .crm-search__utilities,
  body .crm-search.crm-search .crm-search__commit,
  body .crm-search.crm-search .crm-search__primary{width:100%}
  body .crm-search.crm-search .crm-search__utility-select{width:100%}
  body .crm-search.crm-search .crm-search__commit,
  body .crm-search.crm-search .crm-search__primary{padding-left:0;border-left:0}
}

.crm-copyright{position:static;margin-top:18px;padding:10px 0 18px;font-size:12px;line-height:1.2}
.crm-copyright a,.crm-copyright span{display:inline-block;padding:6px 10px;border-radius:10px;background:rgba(255,255,255,.85);border:1px solid rgba(0,0,0,.08);color:rgba(0,0,0,.75);text-decoration:none}
.crm-copyright a:hover{color:rgba(0,0,0,.9);border-color:rgba(0,0,0,.16)}

.crm-modal{position:fixed;inset:0;z-index:2000;display:none;place-items:center;padding:20px}
.crm-modal--open{display:grid}
.crm-modal__backdrop{position:absolute;inset:0;background:rgba(15,23,42,.5);backdrop-filter:blur(5px)}
.crm-modal__panel{position:relative;z-index:1;width:min(620px,100%);max-height:calc(100dvh - 40px);overflow:auto;background:var(--panel);border:1px solid color-mix(in oklab,var(--border) 86%,transparent);border-radius:22px;box-shadow:0 30px 80px rgba(15,23,42,.3)}
.crm-modal__close{width:40px;height:40px;flex:0 0 40px;display:grid;place-items:center;border:1px solid var(--border);border-radius:12px;background:var(--panel);color:var(--muted);cursor:pointer;transition:background-color .15s ease,border-color .15s ease,color .15s ease,box-shadow .15s ease}
.crm-modal__close:hover{border-color:var(--border-strong);background:var(--panel-2);color:var(--text)}
.crm-modal__close:focus-visible{outline:0;border-color:var(--brand-500);box-shadow:0 0 0 4px var(--ring)}
.crm-modal__close svg{display:block}
.crm-modal-lock{overflow:hidden}

.crm-legal__header{min-height:88px;padding:20px 22px;display:flex;align-items:center;gap:14px;border-bottom:1px solid var(--border)}
.crm-legal__mark{width:46px;height:46px;flex:0 0 46px;display:grid;place-items:center;border-radius:14px;background:var(--brand-900);color:#fff;font-size:23px;font-weight:750;box-shadow:0 10px 22px rgba(2,46,102,.16)}
.crm-legal__heading{min-width:0;flex:1 1 auto}
.crm-legal__eyebrow{display:block;margin-bottom:3px;color:var(--muted);font-size:11px;font-weight:750;line-height:1.2;letter-spacing:.065em;text-transform:uppercase}
.crm-legal__heading h2{margin:0;color:var(--text);font-size:21px;font-weight:750;line-height:1.25;letter-spacing:-.01em}
.crm-legal__body{padding:22px;display:grid;gap:20px}
.crm-legal__section-label{display:block;color:var(--muted);font-size:11px;font-weight:750;line-height:1.2;letter-spacing:.055em;text-transform:uppercase}
.crm-legal__ownership{padding:18px;border:1px solid var(--border);border-radius:16px;background:var(--panel-2)}
.crm-legal__ownership strong{display:block;margin-top:10px;color:var(--text);font-size:16px;font-weight:700;line-height:1.35}
.crm-legal__ownership p{margin:7px 0 0;color:var(--muted);font-size:13px;line-height:1.55}
.crm-legal__licenses{display:grid;gap:11px}
.crm-legal__section-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px}
.crm-legal__section-head>span:last-child{color:var(--muted);font-size:12px;line-height:1.3}
.crm-legal__license-list{overflow:hidden;border:1px solid var(--border);border-radius:16px;background:var(--panel)}
.crm-legal__license-row{min-height:68px;padding:13px 15px;display:flex;align-items:center;justify-content:space-between;gap:18px;border-bottom:1px solid var(--border)}
.crm-legal__license-row:last-child{border-bottom:0}
.crm-legal__license-row>div{min-width:0;display:grid;gap:2px}
.crm-legal__license-row strong{color:var(--text);font-size:14px;font-weight:700;line-height:1.3}
.crm-legal__license-row>div span{color:var(--muted);font-size:12px;line-height:1.35}
.crm-legal__license-badge{flex:0 0 auto;padding:6px 9px;border:1px solid color-mix(in oklab,var(--brand-500) 24%,var(--border));border-radius:999px;background:color-mix(in oklab,var(--brand-500) 8%,var(--panel));color:var(--brand-900);font-size:11px;font-weight:700;line-height:1.2}
.crm-legal__footer{min-height:48px;padding:11px 22px;display:flex;align-items:center;gap:7px;border-top:1px solid var(--border);background:var(--panel-2);color:var(--muted);font-size:11px;font-weight:600}

body[data-route="copyright"] .layout.layout--auth{background:var(--bg);background-image:none}
body[data-route="copyright"] .layout.layout--auth .content.content--auth{padding:24px}
.crm-legal-page{width:min(620px,100%)}
.crm-legal-page__card{position:relative;width:100%;max-height:none;margin:0}

@media(max-width:620px){
  .crm-modal{padding:10px}
  .crm-modal__panel{max-height:calc(100dvh - 20px);border-radius:18px}
  .crm-legal__header{min-height:78px;padding:16px}
  .crm-legal__mark{width:42px;height:42px;flex-basis:42px;border-radius:13px;font-size:21px}
  .crm-legal__heading h2{font-size:19px}
  .crm-legal__body{padding:16px;gap:17px}
  .crm-legal__section-head{align-items:flex-start;flex-direction:column;gap:4px}
  .crm-legal__license-row{align-items:flex-start;flex-direction:column;gap:9px}
  .crm-legal__footer{padding:10px 16px}
}


.auth-card--wide{max-width:720px}
.auth-subtitle{margin:0 0 18px;color:rgba(255,255,255,.88);font-size:14px;line-height:1.5;text-align:center}
.auth-form--totp{margin-top:22px}
.auth-field--code input{text-align:center;letter-spacing:8px;font-size:22px;padding-right:22px}
.auth-totp-setup{display:grid;grid-template-columns:260px 1fr;gap:22px;align-items:center;margin-top:10px}
.auth-totp-qr-card{display:flex;align-items:center;justify-content:center;padding:14px;border-radius:24px;background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.18)}
.auth-totp-qr{width:260px;height:260px;display:block;border-radius:18px;background:#fff;padding:10px}
.auth-totp-qr--fallback{display:flex;align-items:center;justify-content:center;color:#fff}
.auth-totp-meta{display:flex;flex-direction:column;gap:12px}
.auth-totp-chip{display:inline-flex;align-self:flex-start;padding:8px 12px;border-radius:999px;background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.18);color:#fff;font-size:13px}
.auth-totp-label{color:#fff;font-weight:600;font-size:13px}
.auth-totp-secret-wrap{display:flex;gap:10px;align-items:center}
.auth-totp-secret{flex:1;min-height:48px;border-radius:14px;border:1px solid rgba(255,255,255,.26);background:rgba(255,255,255,.08);color:#fff;padding:12px 14px;font-size:15px;font-weight:600;letter-spacing:1px}
.auth-copy-button,.auth-link-button{display:inline-flex;align-items:center;justify-content:center;min-height:46px;padding:0 18px;border-radius:999px;border:1px solid rgba(255,255,255,.28);background:rgba(255,255,255,.08);color:#fff;text-decoration:none;cursor:pointer}
.auth-copy-button:hover,.auth-link-button:hover{background:rgba(255,255,255,.14)}
.auth-totp-help{margin:0;color:rgba(255,255,255,.76);font-size:13px;line-height:1.5}
@media (max-width: 760px){.auth-card--wide{max-width:420px}.auth-totp-setup{grid-template-columns:1fr}.auth-totp-qr{width:220px;height:220px}.auth-totp-secret-wrap{flex-direction:column;align-items:stretch}.auth-field--code input{letter-spacing:6px}}

.auth-card--backup-codes{max-width:760px}
.auth-backup-codes-panel{display:flex;flex-direction:column;gap:18px;margin-top:10px}
.auth-backup-codes-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.auth-backup-code-item{padding:14px 16px;border-radius:16px;border:1px solid rgba(255,255,255,.18);background:rgba(255,255,255,.08);color:#fff;font-size:16px;font-weight:700;letter-spacing:1px;text-align:center}
.auth-backup-codes-actions{display:flex;justify-content:flex-end}
.auth-copy-button--wide{min-width:160px}
.auth-backup-codes-textarea{position:absolute;left:-9999px;top:-9999px;opacity:0;pointer-events:none}
@media (max-width: 760px){.auth-backup-codes-grid{grid-template-columns:1fr 1fr}}
@media (max-width: 520px){.auth-backup-codes-grid{grid-template-columns:1fr}}


.auth-card--totp-split{max-width:760px}
.auth-totp-panels{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin-top:22px}
.auth-totp-panel{display:flex;flex-direction:column;gap:18px;padding:20px;border-radius:24px;border:1px solid rgba(255,255,255,.18);background:rgba(255,255,255,.08)}
.auth-totp-panel__head{display:flex;flex-direction:column;gap:10px}
.auth-totp-panel__title{margin:0;color:#fff;font-size:20px;font-weight:700;line-height:1.3}
.auth-form--totp-split,.auth-form--backup{margin-top:0}
.auth-totp-digits{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px}
.auth-totp-digit{display:block}
.auth-totp-digit input{width:100%;height:68px;border-radius:20px;border:1px solid rgba(255,255,255,.22);background:rgba(255,255,255,.06)!important;color:#fff!important;font-size:28px;font-weight:700;line-height:1;text-align:center;outline:0;-webkit-text-fill-color:#fff!important;box-shadow:none!important}
.auth-totp-digit input:focus{border-color:rgba(255,255,255,.55);box-shadow:0 0 0 4px rgba(255,255,255,.08)!important}
.auth-field--backup-code input{text-align:center;letter-spacing:2px;padding-right:22px}
.auth-submit--ghost{background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.28);box-shadow:none}
.auth-submit--ghost:hover{background:rgba(255,255,255,.18);box-shadow:none}
.auth-link-button--totp-cancel{margin-top:18px;width:100%}
.auth-autofill-trap{position:absolute!important;left:-9999px!important;top:-9999px!important;width:1px!important;height:1px!important;opacity:0!important;pointer-events:none!important}
.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}
@media (max-width: 760px){.auth-card--totp-split{max-width:420px}.auth-totp-panels{grid-template-columns:1fr}.auth-totp-digits{gap:8px}.auth-totp-digit input{height:58px;font-size:24px}}
@media (max-width: 420px){.auth-totp-digits{gap:6px}.auth-totp-digit input{height:52px;font-size:22px;border-radius:16px}}

.auth-totp-meta--wide{min-width:0}
.auth-totp-manual-card{display:flex;flex-direction:column;gap:8px;padding:14px 16px;border-radius:18px;border:1px solid rgba(255,255,255,.18);background:rgba(255,255,255,.06)}
.auth-totp-manual-title{color:#fff;font-weight:700;font-size:14px}
