﻿/* CPS White Label Dashboard V3 — reference-led layout built on existing tenant IDs */
:root{
  --cps-navy:#082a70;
  --cps-navy-2:#123d91;
  --cps-blue:#075be8;
  --cps-blue-2:#0797ff;
  --cps-purple:#7438f5;
  --cps-cyan:#0bb8e8;
  --cps-green:#05c989;
  --cps-orange:#ff713c;
  --cps-ink:#112854;
  --cps-muted:#7082a2;
  --cps-line:#e1eafa;
  --cps-page:#eef5ff;
  --cps-shadow:0 8px 25px rgba(21,61,132,.11);
}
*{box-sizing:border-box}
html{font-size:16px;-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{
  margin:0!important;
  color:var(--cps-ink)!important;
  background:linear-gradient(135deg,#eaf3ff 0%,#f8fbff 52%,#edf2ff 100%)!important;
  font-family:Inter,"Segoe UI",Arial,sans-serif!important;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
button,input,select,textarea{font:inherit}
button,a,[role=button]{-webkit-tap-highlight-color:transparent}
button:focus-visible,a:focus-visible,[role=button]:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{
  outline:3px solid rgba(68,145,255,.38)!important;outline-offset:2px
}
main{max-width:none!important;width:100%;padding:0!important;margin:0!important}
#app{min-height:calc(100vh - 82px)}
.hidden{display:none!important}

/* Top bar */
.top.cps-topbar{
  height:82px!important;min-height:82px!important;width:100%;
  padding:0 28px!important;display:flex!important;align-items:center;gap:24px;
  position:sticky;top:0;z-index:50;
  color:#fff!important;
  background:linear-gradient(105deg,#092e78 0%,#0757d8 58%,#0756ed 100%)!important;
  box-shadow:0 5px 22px rgba(9,44,116,.2);
  border:0!important;
}
.cps-top-brand{display:flex;align-items:center;gap:15px;flex:0 0 300px;min-width:245px}
.top .logo{
  width:56px!important;height:56px!important;min-width:56px;
  display:grid;place-items:center;border-radius:17px!important;
  color:#fff!important;font-size:23px!important;font-weight:900;
  background:linear-gradient(145deg,#1687ff,#064dd8)!important;
  box-shadow:0 7px 20px rgba(0,0,0,.16)!important;
}
.top .brand{display:flex;flex-direction:column;gap:4px;min-width:0}
.top .brand b{font-size:18px!important;line-height:1.15;letter-spacing:-.35px;color:#fff!important}
.top .brand small{font-size:10px!important;letter-spacing:1.8px;font-weight:750;color:#d7e8ff!important}
.top-searchbar.searchbar{
  display:flex;align-items:center;gap:12px;
  width:min(40vw,520px);max-width:520px;min-width:260px;height:54px;
  margin:0 auto!important;padding:0 17px!important;
  border:1px solid rgba(255,255,255,.55)!important;border-radius:14px!important;
  background:rgba(255,255,255,.96)!important;
  box-shadow:0 7px 20px rgba(0,28,94,.12)!important;
}
.top-searchbar .search-icon{width:24px;height:24px;display:grid;place-items:center;color:#44638f;font-size:0}
.top-searchbar .search-icon svg{width:23px;height:23px;stroke:currentColor;stroke-width:2;fill:none;stroke-linecap:round}
.top-searchbar input#globalSearch{
  flex:1;min-width:0;height:100%;margin:0!important;padding:0!important;
  border:0!important;outline:0!important;box-shadow:none!important;background:transparent!important;
  color:#18345e!important;font-size:14px!important;
}
.top-searchbar input::placeholder{color:#7c8eaa;opacity:1}
.top-searchbar .search-shortcut{font-size:11px;color:#7a8ba8;white-space:nowrap;border:0;padding:0}
.top-right{display:flex;align-items:center;gap:14px;margin-left:auto;white-space:nowrap}
.network{display:inline-flex;align-items:center;gap:8px;padding:0!important;border:0!important;background:transparent!important;color:#f1f7ff!important;font-size:12px!important;font-weight:750}
.network:before{content:"";display:inline-block;width:10px;height:10px;border-radius:50%;background:#10d899;box-shadow:0 0 0 4px rgba(16,216,153,.13)}
.network.bad:before{background:#ffb14a;box-shadow:0 0 0 4px rgba(255,177,74,.13)}
.top-sync,.top-signout{
  min-height:40px;padding:0 14px;border-radius:11px;border:1px solid rgba(255,255,255,.28);
  background:rgba(255,255,255,.12);color:#fff;font-size:12px;font-weight:750;cursor:pointer
}
.top-sync:hover,.top-signout:hover{background:rgba(255,255,255,.22)}
.top-profile{display:flex;align-items:center;gap:10px;padding:0 2px 0 10px;border-left:1px solid rgba(255,255,255,.24);min-width:0}
.top-profile-avatar{width:44px;height:44px;flex:0 0 44px;border:2px solid #ec69ff;border-radius:50%;display:grid;place-items:center;background:#102d76;color:#fff;font-size:15px;font-weight:850}
.top-profile-copy{display:flex;flex-direction:column;gap:3px;min-width:0}
.top-profile-copy b{font-size:12px;color:#fff;max-width:145px;overflow:hidden;text-overflow:ellipsis}
.top-profile-copy small{font-size:10px;color:#d9e8ff;text-transform:capitalize}

/* Main two-column workspace */
.app-shell{display:grid!important;grid-template-columns:260px minmax(0,1fr)!important;min-height:calc(100vh - 82px)!important;max-width:none!important}
.sidebar{
  position:sticky;top:82px;height:calc(100vh - 82px);min-height:520px;overflow-y:auto;
  display:flex!important;flex-direction:column;min-width:0;
  padding:18px 12px 15px!important;
  background:linear-gradient(180deg,#092b72 0%,#0e347f 54%,#102768 100%)!important;
  border:0!important;border-right:1px solid rgba(255,255,255,.12)!important;
  color:#f4f8ff!important;
}
.workspace-switcher{display:flex!important;align-items:center;gap:12px;padding:10px 9px 18px!important;border-bottom:1px solid rgba(255,255,255,.17)!important}
.workspace-avatar{width:43px!important;height:43px!important;flex:0 0 43px;border-radius:14px!important;background:linear-gradient(145deg,#fff,#e4edff)!important;color:#315fc4!important;font-size:17px!important}
.workspace-meta b{font-size:13px!important;color:#fff!important}
.workspace-meta small{font-size:10px!important;color:#c3d5f4!important}
.switcher-chevron{color:#d1e2ff!important}
.nav-label{margin:21px 12px 9px!important;color:#a9c4ef!important;font-size:10px!important;letter-spacing:1.9px!important;font-weight:850!important}
.side-nav{display:flex;flex-direction:column;gap:5px!important}
.nav-item{
  min-height:48px;width:100%;padding:10px 13px!important;display:flex;align-items:center;gap:12px!important;
  color:#eef5ff!important;background:transparent!important;border:0!important;border-radius:12px!important;
  text-align:left;font-size:14px!important;line-height:1.25;font-weight:650!important;cursor:pointer
}
.nav-item:hover{background:rgba(255,255,255,.10)!important;color:#fff!important}
.nav-item.active{background:linear-gradient(105deg,#0878f8,#1161e8 64%,#2449dd)!important;color:#fff!important;box-shadow:0 7px 20px rgba(0,13,70,.2)}
.nav-icon{display:grid;place-items:center;width:23px;height:23px;flex:0 0 23px;color:#b9d7ff!important;font-size:0!important}
.nav-icon svg{width:21px;height:21px;stroke:currentColor;stroke-width:1.85;fill:none;stroke-linecap:round;stroke-linejoin:round}
.nav-item.active .nav-icon{color:#fff!important}
.nav-count{margin-left:auto!important;padding:3px 7px!important;min-width:22px;text-align:center;border-radius:8px!important;background:rgba(255,255,255,.18)!important;color:#fff!important;font-size:10px!important}
.nav-current{display:none!important}
.sidebar-bottom{margin-top:auto!important}
.sidebar-help{margin:13px 3px 12px!important;padding:12px!important;border:1px solid rgba(255,255,255,.2)!important;background:rgba(255,255,255,.07)!important;border-radius:13px!important}
.help-icon{width:32px;height:32px;border-radius:10px;background:rgba(255,255,255,.14)!important;color:#fff!important}
.sidebar-help b{font-size:11px!important;color:#fff!important}
.sidebar-help small{font-size:9px!important;color:#c2d5f5!important}
.user-mini{border-top:1px solid rgba(255,255,255,.18)!important;padding:13px 6px 0!important}
.user-avatar{width:37px;height:37px;background:#d7f7ec!important;color:#0b765c!important;font-size:12px!important}
.user-meta b{font-size:11px!important;color:#fff!important}
.user-meta small{font-size:9px!important;color:#c1d4f4!important}
#sidebarSignOut{color:#dceaff!important}
.app-content{width:100%!important;max-width:none!important;margin:0!important;min-width:0;padding:20px clamp(16px,1.55vw,27px) 28px!important}

/* Large welcome banner */
.welcome.cps-welcome{
  position:relative;isolation:isolate;overflow:hidden;
  min-height:190px;margin:0 0 20px!important;padding:27px 34px!important;
  display:grid!important;grid-template-columns:minmax(0,1fr) 270px auto;align-items:center;gap:18px;
  border-radius:19px!important;border:0!important;
  color:#fff!important;background:linear-gradient(108deg,#064ce0 0%,#0783f5 44%,#7142f5 100%)!important;
  box-shadow:0 12px 28px rgba(40,76,200,.24)!important;
}
.cps-welcome:before{content:"";position:absolute;z-index:-1;width:380px;height:380px;right:13%;top:-230px;border-radius:50%;background:rgba(255,255,255,.11)}
.cps-welcome:after{content:"";position:absolute;z-index:-1;width:260px;height:260px;left:38%;bottom:-210px;border-radius:50%;background:rgba(255,255,255,.10)}
.welcome-copy{position:relative;z-index:2}
.welcome-kicker{margin:0 0 8px;font-size:10px;font-weight:850;letter-spacing:2px;color:#d9ecff}
.cps-welcome .breadcrumb{margin:0 0 8px!important;color:#d5e7ff!important;font-size:11px!important}
.cps-welcome .breadcrumb b{color:#fff!important}
.cps-welcome h1{margin:0 0 9px!important;color:#fff!important;font-size:clamp(30px,3vw,45px)!important;line-height:1.08!important;letter-spacing:-1.4px!important;font-weight:850!important}
.cps-welcome p{margin:0!important;color:#ecf5ff!important;font-size:14px!important;line-height:1.5!important;max-width:650px}
.welcome-actions{position:relative;z-index:3;display:flex;align-items:center;gap:9px}
.welcome-actions .primary{min-height:44px;padding:0 17px!important;border:1px solid rgba(255,255,255,.46)!important;border-radius:12px!important;background:rgba(255,255,255,.18)!important;color:#fff!important;box-shadow:none!important;font-size:12px!important}
.welcome-art{position:relative;height:150px;display:flex;align-items:center;justify-content:center;z-index:1}
.welcome-lanyard{position:absolute;left:48px;top:-8px;width:95px;height:148px;border:12px solid #0c347e;border-bottom:0;border-radius:55px 55px 0 0;transform:rotate(24deg);opacity:.95;box-shadow:inset 0 0 0 2px rgba(255,255,255,.45),0 9px 18px rgba(0,22,79,.22)}
.welcome-lanyard:after{content:"CPS";position:absolute;left:17px;top:25px;color:#fff;font-size:12px;font-weight:900;letter-spacing:2px;transform:rotate(-7deg)}
.welcome-card-stack{position:relative;width:155px;height:137px;transform:rotate(8deg)}
.welcome-card-back{position:absolute;left:18px;top:15px;width:125px;height:112px;border-radius:13px;background:linear-gradient(145deg,#fff,#dfeaff);transform:rotate(-10deg);box-shadow:0 10px 22px rgba(0,25,95,.24)}
.welcome-id-card{position:absolute;left:27px;top:7px;width:120px;height:132px;border-radius:12px;background:linear-gradient(160deg,#fff 0%,#eaf3ff 100%);box-shadow:0 12px 24px rgba(0,25,95,.28);border:1px solid rgba(255,255,255,.95);padding:10px;display:grid;grid-template-columns:36px 1fr;grid-template-rows:28px 1fr 20px;gap:7px;color:#17478e}
.welcome-id-logo{grid-column:1/-1;justify-self:end;border-radius:6px;padding:4px 7px;background:#075be8;color:#fff;font-size:10px;font-weight:900}
.welcome-id-photo{width:36px;height:48px;border-radius:7px;background:linear-gradient(145deg,#d8edff,#9dc5ee);position:relative}
.welcome-id-photo:before{content:"";position:absolute;left:12px;top:7px;width:13px;height:13px;border-radius:50%;background:#6f9acb}
.welcome-id-photo:after{content:"";position:absolute;left:6px;bottom:5px;width:25px;height:16px;border-radius:13px 13px 5px 5px;background:#6f9acb}
.welcome-id-lines{display:flex;flex-direction:column;gap:6px;padding-top:4px}
.welcome-id-lines i{height:5px;border-radius:6px;background:#b9cdea}
.welcome-id-lines i:nth-child(2){width:78%}.welcome-id-lines i:nth-child(3){width:55%}
.welcome-id-footer{grid-column:1/-1;border-top:1px solid #dbe7f7;padding-top:5px;font-size:6px;font-weight:900;letter-spacing:.7px;text-align:center;color:#607da7}

/* Primary quick actions */
.quick-actions.cps-primary-actions{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:14px!important;margin:0 0 19px!important}
.cps-primary-actions>button{
  min-width:0;min-height:102px;padding:17px 17px!important;display:flex;align-items:center;gap:13px;
  border:0!important;border-radius:17px!important;color:#fff!important;text-align:left;cursor:pointer;
  box-shadow:0 8px 18px rgba(30,73,160,.16)!important
}
.cps-primary-actions>button:hover{transform:translateY(-3px);box-shadow:0 13px 24px rgba(30,73,160,.22)!important}
.cps-primary-actions .action-blue{background:linear-gradient(120deg,#087af5,#0756e4)!important}
.cps-primary-actions .action-green{background:linear-gradient(120deg,#08d58c,#05bfa9)!important}
.cps-primary-actions .action-purple{background:linear-gradient(120deg,#803bf5,#5d33e7)!important}
.cps-primary-actions .action-orange{background:linear-gradient(120deg,#ff9a22,#ff634c)!important}
.cps-primary-actions .quick-icon{width:54px;height:54px;flex:0 0 54px;display:grid;place-items:center;border-radius:15px;background:rgba(255,255,255,.18)!important;color:#fff!important;font-size:0!important}
.cps-primary-actions .quick-icon svg{width:30px;height:30px;stroke:currentColor;stroke-width:1.8;fill:none;stroke-linecap:round;stroke-linejoin:round}
.cps-primary-actions b{display:block;color:#fff!important;font-size:15px!important;font-weight:800!important;line-height:1.3}
.cps-primary-actions small{display:block;margin-top:5px;color:rgba(255,255,255,.88)!important;font-size:11px!important;line-height:1.4}
.cps-primary-actions .quick-arrow{margin-left:auto;width:29px;height:29px;flex:0 0 29px;display:grid;place-items:center;border-radius:50%;background:rgba(255,255,255,.22);color:#fff!important;font-size:21px}

/* KPI cards */
.metrics.cps-metrics{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:14px!important;margin:0 0 17px!important}
.cps-metrics article{
  min-width:0;min-height:146px;position:relative;overflow:hidden;
  display:flex;align-items:flex-start;gap:14px;padding:19px 18px!important;
  border:1px solid #e3ecfa!important;border-radius:17px!important;background:#fff!important;
  box-shadow:var(--cps-shadow)!important
}
.cps-metrics article:after{content:"";position:absolute;right:-24px;bottom:-54px;width:130px;height:130px;border-radius:50%;background:rgba(8,101,245,.06)}
.cps-metrics .metric-icon{position:relative;z-index:1;width:61px;height:61px;flex:0 0 61px;display:grid;place-items:center;border-radius:17px;background:#e3f1ff;color:#0874eb}
.cps-metrics .metric-icon svg{width:31px;height:31px;stroke:currentColor;stroke-width:1.9;fill:none;stroke-linecap:round;stroke-linejoin:round}
.cps-metrics .metric-content{position:relative;z-index:1;min-width:0;display:flex;flex-direction:column;align-items:flex-start}
.cps-metrics .metric-content span{font-size:14px!important;font-weight:800!important;color:#17315d!important;line-height:1.35}
.cps-metrics .metric-content b{margin-top:9px;font-size:34px!important;line-height:1;font-weight:850;letter-spacing:-1px;color:#102c60!important}
.cps-metrics .metric-foot{margin-top:8px;font-size:11px!important;color:#8294b2!important;line-height:1.35}
.cps-metrics .metric-bars{position:absolute;right:17px;bottom:17px;z-index:1;display:flex;align-items:flex-end;gap:4px;height:35px;opacity:.86}
.cps-metrics .metric-bars i{width:7px;border-radius:5px 5px 2px 2px;background:#11c88e;height:16px}
.cps-metrics .metric-bars i:nth-child(2){height:25px}.cps-metrics .metric-bars i:nth-child(3){height:34px}
.metric-records .metric-icon{background:#fff0e8;color:#f36b2f}.metric-records:after{background:rgba(243,107,47,.08)!important}
.metric-records .metric-bars i{background:#f5a54c}
.metric-orders .metric-icon{background:#ffe8f0;color:#e52c79}.metric-orders:after{background:rgba(229,44,121,.07)!important}
.metric-orders .metric-bars i{background:#e86cae}
.metric-templates .metric-icon{background:#eee8ff;color:#7138e9}.metric-templates:after{background:rgba(113,56,233,.08)!important}
.metric-templates .metric-bars i{background:#9568f4}

/* Shortcuts strip */
.cps-shortcuts{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:0;margin:0 0 18px;padding:7px 0;border-radius:15px;background:rgba(255,255,255,.48)}
.cps-shortcuts button,.cps-shortcuts a{
  min-width:0;min-height:72px;display:flex;align-items:center;gap:10px;padding:10px 12px;
  border:0;border-right:1px solid #e4ecf8;border-radius:0;background:transparent;text-align:left;text-decoration:none;color:var(--cps-ink);cursor:pointer
}
.cps-shortcuts button:last-of-type,.cps-shortcuts a:last-child{border-right:0}
.cps-shortcuts button:hover,.cps-shortcuts a:hover{background:#fff;border-radius:12px;box-shadow:0 5px 15px rgba(37,74,140,.09)}
.shortcut-icon{width:51px;height:51px;flex:0 0 51px;display:grid;place-items:center;border-radius:15px}
.shortcut-icon svg{width:27px;height:27px;stroke:currentColor;stroke-width:1.9;fill:none;stroke-linecap:round;stroke-linejoin:round}
.shortcut-cyan{background:#dff4ff;color:#0797dc}.shortcut-green{background:#d8fff0;color:#0da979}
.shortcut-pink{background:#ffe4ed;color:#e13c73}.shortcut-amber{background:#fff1ce;color:#d9910b}
.shortcut-violet{background:#eee6ff;color:#713be5}.shortcut-blue{background:#e2ebff;color:#1b65e9}
.cps-shortcuts b{display:block;font-size:12px;color:#18315e;line-height:1.3}
.cps-shortcuts small{display:block;font-size:10px;color:#7c8eab;line-height:1.35;margin-top:4px}

/* Workspace activity section and recent panels */
.overview-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:2px 0 11px!important}
.overview-heading h2{margin:0;font-size:18px!important;color:#15305d}
.overview-heading p{margin:4px 0 0;font-size:11px;color:#7d8eaa}
.live-pill{display:inline-flex;align-items:center;gap:7px;border:1px solid #deeee8;border-radius:30px;padding:7px 11px;background:#f7fffb;color:#528875;font-size:10px}
.live-pill i{width:7px;height:7px;border-radius:50%;background:#13c88b}
.layout{
  display:grid!important;grid-template-columns:minmax(0,1.05fr) minmax(0,1.18fr) minmax(250px,.9fr)!important;
  gap:14px!important;align-items:stretch;margin:0!important
}
.layout>.card{
  min-width:0;padding:20px!important;border:1px solid #e1eafa!important;border-radius:17px!important;
  background:#fff!important;box-shadow:var(--cps-shadow)!important;min-height:270px
}
.layout #institutionCard{grid-column:1}
.layout #orderCard{grid-column:2}
.layout #recordCard{grid-column:1/-1}
.layout .cps-quick-panel{grid-column:3}
.section-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:17px!important}
.section-head h2{margin:0;font-size:17px!important;font-weight:850;color:#17315d}
.section-head p{margin:5px 0 0;font-size:10px!important;line-height:1.45;color:#8292ad}
.section-head .primary,.header-actions button{min-height:37px;padding:0 13px!important;font-size:11px!important;border-radius:10px!important}
.primary{border:0!important;background:linear-gradient(120deg,#0969f0,#5337ed)!important;color:#fff!important;font-weight:750!important;box-shadow:0 6px 15px rgba(42,88,217,.18)!important}
.secondary{border:1px solid #dce6f6!important;background:#f7faff!important;color:#2b4c7e!important}
.primary:hover,.secondary:hover{transform:translateY(-1px)}
.list.empty{padding:34px 14px!important;text-align:center;color:#8b9bb6!important;font-size:12px!important;background:#f7faff;border:1px dashed #dce7f7;border-radius:13px}
.list{gap:9px}
.list-item{padding:12px!important;border:1px solid #e6edf8!important;border-radius:12px!important;background:#fff}
.list-item b{font-size:12px!important;color:#16325f}
.list-item small{font-size:10px!important;color:#8191ad}
.avatar{width:38px;height:38px;border-radius:50%!important;background:#e5f0ff!important;color:#175fd1!important;font-size:12px!important}
.delete{font-size:10px!important;padding:7px 10px!important;border-radius:9px!important}
.inline-form,.form-grid{border:1px solid #e1eafb!important;background:#f7faff!important;border-radius:12px!important;padding:15px!important}
.cps-quick-panel .section-head{margin-bottom:15px!important}
.cps-quick-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.cps-quick-grid button{min-width:0;min-height:98px;border:0;border-radius:13px;padding:13px 8px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;cursor:pointer}
.cps-quick-grid button>span{width:35px;height:35px;display:grid;place-items:center}
.cps-quick-grid svg{width:29px;height:29px;stroke:currentColor;stroke-width:1.9;fill:none;stroke-linecap:round;stroke-linejoin:round}
.cps-quick-grid b{font-size:11px;text-align:center;line-height:1.3}
.qa-pink{background:#ffe0eb;color:#df2869}.qa-blue{background:#dff4ff;color:#0865d6}
.qa-green{background:#dcffed;color:#079365}.qa-orange{background:#fff0dd;color:#e0691c}
.onboarding{border-radius:15px!important;margin:0 0 16px!important;padding:16px!important}
.footnote{margin-top:17px!important;padding:12px 15px!important;border-radius:12px!important;border:1px solid #dfe9f7!important;background:rgba(255,255,255,.75)!important;color:#7184a2!important;font-size:10px!important;line-height:1.5!important}

/* Secondary views */
.module-screen{min-width:0}
.module-heading h2{font-size:24px!important;color:#16315d}
.module-heading p{font-size:12px!important}
.card{border-radius:16px}
input,select,textarea{font-size:13px!important;border-radius:10px!important}
button{font-size:13px}
.global-message{font-size:12px!important}

/* Responsive layout */
@media(max-width:1350px){
  .cps-top-brand{flex-basis:260px}
  .top-searchbar.searchbar{width:min(35vw,460px);min-width:225px}
  .cps-shortcuts{grid-template-columns:repeat(3,minmax(0,1fr));background:transparent;gap:6px}
  .cps-shortcuts button,.cps-shortcuts a{background:rgba(255,255,255,.68);border:1px solid #e3ecf8;border-radius:12px}
  .layout{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .layout #institutionCard{grid-column:1}
  .layout #orderCard{grid-column:2}
  .layout .cps-quick-panel{grid-column:1/-1}
  .cps-quick-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
}
@media(max-width:1000px){
  .top.cps-topbar{padding:0 17px!important;gap:12px}
  .cps-top-brand{flex-basis:220px;min-width:200px}
  .top .brand b{font-size:15px!important}
  .top .brand small{font-size:8px!important}
  .top-searchbar.searchbar{width:auto;flex:1;min-width:180px}
  .top-profile-copy{display:none}
  .app-shell{grid-template-columns:220px minmax(0,1fr)!important}
  .sidebar{padding-left:9px!important;padding-right:9px!important}
  .nav-item{font-size:12px!important}
  .welcome.cps-welcome{grid-template-columns:minmax(0,1fr) 180px auto;padding:22px!important}
  .welcome-art{transform:scale(.82)}
  .quick-actions.cps-primary-actions{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .cps-metrics{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:700px){
  .top.cps-topbar{height:auto!important;min-height:70px!important;flex-wrap:wrap;padding:9px 12px!important;gap:8px}
  .cps-top-brand{flex:1 1 55%;min-width:0;gap:9px}
  .top .logo{width:43px!important;height:43px!important;min-width:43px;font-size:18px!important;border-radius:13px!important}
  .top .brand b{font-size:13px!important}
  .top .brand small{font-size:7px!important;letter-spacing:1.2px}
  .top-right{gap:7px}
  .network{font-size:9px!important}
  .top-sync,.top-signout{min-height:34px;padding:0 9px;font-size:10px}
  .top-profile{padding-left:6px}
  .top-profile-avatar{width:34px;height:34px;flex-basis:34px;font-size:12px}
  .top-searchbar.searchbar{order:3;flex:1 1 100%;width:100%;min-width:0;height:43px;margin:2px 0 0!important}
  #app{min-height:0}
  .app-shell{display:flex!important;flex-direction:column!important;min-height:0!important}
  .sidebar{order:2;position:sticky;top:auto;bottom:0;height:auto;min-height:0;z-index:30;border-top:1px solid rgba(255,255,255,.18)!important;padding:6px 5px!important}
  .workspace-switcher,.nav-label,.sidebar-bottom{display:none!important}
  .side-nav{display:flex;flex-direction:row;gap:3px!important;overflow-x:auto;scrollbar-width:none}
  .side-nav::-webkit-scrollbar{display:none}
  .nav-item{min-width:66px;min-height:55px;flex:1 0 auto;display:flex;flex-direction:column;justify-content:center;gap:4px!important;padding:5px 3px!important;font-size:9px!important;text-align:center;border-radius:9px!important}
  .nav-icon{height:19px;width:21px}
  .nav-icon svg{width:18px;height:18px}
  .nav-count,.nav-current{display:none!important}
  .app-content{order:1;padding:12px 10px 18px!important}
  .welcome.cps-welcome{min-height:180px;grid-template-columns:minmax(0,1fr) 96px;gap:6px;padding:18px!important}
  .welcome-art{height:105px;transform:scale(.62);transform-origin:center}
  .cps-welcome h1{font-size:26px!important}
  .cps-welcome p{font-size:11px!important}
  .welcome-kicker{font-size:8px}
  .welcome-actions{grid-column:1/-1;justify-content:flex-start}
  .welcome-actions .primary{min-height:36px}
  .quick-actions.cps-primary-actions{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
  .cps-primary-actions>button{min-height:84px;padding:10px!important;gap:8px;border-radius:13px!important}
  .cps-primary-actions .quick-icon{width:38px;height:38px;flex-basis:38px;border-radius:11px}
  .cps-primary-actions .quick-icon svg{width:22px;height:22px}
  .cps-primary-actions b{font-size:11px!important}
  .cps-primary-actions small{font-size:9px!important}
  .cps-primary-actions .quick-arrow{display:none}
  .metrics.cps-metrics{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
  .cps-metrics article{min-height:112px;padding:12px!important;gap:9px}
  .cps-metrics .metric-icon{width:39px;height:39px;flex-basis:39px;border-radius:11px}
  .cps-metrics .metric-icon svg{width:22px;height:22px}
  .cps-metrics .metric-content span{font-size:10px!important}
  .cps-metrics .metric-content b{font-size:25px!important;margin-top:7px}
  .cps-metrics .metric-foot{font-size:8px!important;margin-top:5px}
  .cps-metrics .metric-bars{display:none}
  .cps-shortcuts{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
  .cps-shortcuts button,.cps-shortcuts a{min-height:61px;padding:7px}
  .shortcut-icon{width:38px;height:38px;flex-basis:38px;border-radius:11px}
  .shortcut-icon svg{width:21px;height:21px}
  .cps-shortcuts b{font-size:10px}
  .cps-shortcuts small{font-size:8px}
  .overview-heading h2{font-size:15px!important}
  .layout{grid-template-columns:minmax(0,1fr)!important;gap:9px!important}
  .layout #institutionCard,.layout #orderCard,.layout .cps-quick-panel,.layout #recordCard{grid-column:1!important}
  .layout>.card{min-height:0;padding:14px!important}
  .cps-quick-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .section-head h2{font-size:14px!important}
  .section-head p{font-size:9px!important}
  .footnote{font-size:9px!important}
}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{transition:none!important;scroll-behavior:auto!important}}

body[data-cps-view]:not([data-cps-view="overview"]) .cps-quick-panel{display:none!important}
body[data-cps-view="institutions"] .layout,
body[data-cps-view="records"] .layout,
body[data-cps-view="orders"] .layout{grid-template-columns:minmax(0,1fr)!important}
body[data-cps-view="institutions"] .layout #institutionCard,
body[data-cps-view="records"] .layout #recordCard,
body[data-cps-view="orders"] .layout #orderCard{grid-column:1!important}

#auth{min-height:calc(100vh - 82px);align-items:center}
#auth .hero h1{font-size:clamp(36px,5vw,58px)!important}
#auth .auth-card{border-radius:20px!important;box-shadow:0 12px 35px rgba(17,44,100,.11)!important}
