/* RENOVIA "Rent & friskt" – portalene (ledelse, ansatt, kunde, sikkerhet), innlogging, kontovalg, modaler og varsler.
   Lastes etter portal-theme.css og renovia-clean.css. Kun utseende – ingen logikk er endret.
   Eldre regler bruker !important, derfor «html body»-prefiks her for å vinne på spesifisitet. */

:root{
  --font-display:"Bricolage Grotesque",ui-sans-serif,system-ui,sans-serif;
  --font-body:"Figtree",ui-sans-serif,system-ui,sans-serif;
  --ease-out:cubic-bezier(.22,1,.36,1);
}
@keyframes bubbles-rise-s{to{background-position:0 -396px}}

/* ---------- base + rollefarger ---------- */
html body:has(.portal-shell),html body:has(.login-page),html body:has(.portal-choice-page){background:var(--paper);color:var(--ink);font-family:var(--font-body)}
html body .portal-shell,html body .login-page,html body .portal-choice-page,html body .modal,html body .toast-root{font-family:var(--font-body)}
html body .portal-shell :is(input,select,textarea,button),html body .modal :is(input,select,textarea,button),html body .login-page :is(input,select,textarea,button){font-family:inherit}
html body .portal-shell{
  --r-teal:#0b6fc2;--r-teal-dark:#085aa0;--r-primary:#0b6fc2;--r-primary-strong:#085aa0;--r-cyan:#18b7d4;--r-green:#1fb98a;--r-purple:#6c63e0;--r-orange:#f0a92e;--r-red:#e0564f;
  --r-ink:#0a2a3d;--r-muted:#46657a;--r-line:#cfe3ea;--r-bg:#f5fbfd;--r-surface:#fff;--r-sidebar:#0a3a5c;--r-radius:22px;--r-radius-lg:28px;
  --r-shadow-xs:0 1px 2px rgba(10,58,92,.06);--r-shadow-sm:0 14px 30px -22px rgba(10,58,92,.45);--r-shadow-md:0 22px 50px -28px rgba(10,58,92,.5);
  background:linear-gradient(180deg,#f5fbfd 0%,#eaf6fa 100%)!important;color:var(--ink)
}
html body .portal-management{--side-a:#0a3a5c;--side-b:#072e4a;--side-muted:#8fd4e8;--r-role:#0b6fc2;--r-role-soft:#d6f1f9;--banner:#d6f1f9;--ill:url(/assets/ill-building.svg)}
html body .portal-employee{--side-a:#0b5d73;--side-b:#08485b;--side-muted:#a8ecd6;--r-role:#0d8f72;--r-role-soft:#d9f6e9;--banner:#d9f6e9;--ill:url(/assets/ill-tools.svg)}
html body .portal-customer{--side-a:#0b72c8;--side-b:#085aa0;--side-muted:#e6f7fd;--r-role:#1b7fe0;--r-role-soft:#e0efff;--banner:#e0efff;--ill:url(/assets/ill-home.svg)}
html body .portal-security{--side-a:#1c2c63;--side-b:#101a40;--side-muted:#b4c2ff;--r-role:#4b55d6;--r-role-soft:#e8eaff;--banner:#e1e6ff;--ill:url(/assets/ill-shield.svg)}

/* ---------- sidebar: dyp havblå med bobler ---------- */
html body .portal-shell>.sidebar{
  background:linear-gradient(185deg,var(--side-a) 0%,var(--side-b) 100%)!important;border-right:0!important;
  box-shadow:12px 0 40px -22px rgba(7,46,74,.6)!important;color:#eaf6fc;overflow:hidden!important;isolation:isolate;backdrop-filter:none!important
}
html body .portal-shell>.sidebar::before{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;background:url(/assets/bubbles-white.svg) 0 0/220px 396px repeat;opacity:.55;animation:bubbles-rise-s 120s linear infinite;-webkit-mask-image:linear-gradient(180deg,#000 0,rgba(0,0,0,.35) 22%,rgba(0,0,0,.35) 78%,#000 100%);mask-image:linear-gradient(180deg,#000 0,rgba(0,0,0,.35) 22%,rgba(0,0,0,.35) 78%,#000 100%)}
html body .portal-shell .sidebar-brand{min-height:72px;padding:6px 12px 16px!important;gap:12px!important;border-bottom:1px solid rgba(255,255,255,.16)!important}
html body .portal-shell .sidebar-brand img{width:46px!important;height:46px!important;padding:5px!important;border-radius:15px!important;background:#fff!important;box-shadow:0 10px 20px -10px rgba(0,0,0,.55)!important;object-fit:contain!important}
html body .portal-shell .sidebar-brand strong{color:#fff!important;font-family:var(--font-display);font-size:1.2rem!important;font-weight:760!important;letter-spacing:.05em!important}
html body .portal-shell .sidebar-brand span{color:var(--side-muted)!important;font-size:.6rem!important;letter-spacing:.16em!important;font-weight:800!important}
html body .portal-shell .nav-list{scrollbar-color:rgba(255,255,255,.3) transparent!important}
html body .portal-shell .nav-item,html body .portal-shell .nav-primary .nav-item{color:rgba(255,255,255,.93)!important;border-radius:14px!important;font-weight:650!important;font-size:.87rem!important;background:transparent!important;box-shadow:none!important}
html body .portal-shell .nav-item svg{color:var(--side-muted)!important;width:18px!important;height:18px!important}
html body .portal-shell .nav-item:hover,html body .portal-shell .nav-primary .nav-item:hover{background:rgba(255,255,255,.12)!important;color:#fff!important}
html body .portal-shell .nav-item:hover svg{color:#fff!important}
html body .portal-shell .nav-item.active,html body .portal-shell .nav-primary .nav-item.active,html body .portal-shell .nav-section-items .nav-item.active{background:#fff!important;color:var(--navy)!important;font-weight:780!important;box-shadow:0 14px 26px -16px rgba(0,0,0,.65)!important}
html body .portal-shell .nav-item.active svg{color:var(--teal)!important}
html body .portal-shell .nav-section-toggle{color:var(--side-muted)!important;font-size:.64rem!important;font-weight:800!important;letter-spacing:.14em!important;border-radius:12px!important}
html body .portal-shell .nav-section-toggle:hover{background:rgba(255,255,255,.09)!important;color:#fff!important}
html body .portal-shell .nav-section.has-active>.nav-section-toggle{color:#fff!important}
html body .portal-shell .nav-section-chevron{color:var(--side-muted)!important}
html body .portal-shell .sidebar-footer{padding:12px 4px 4px!important;border-top:1px solid rgba(255,255,255,.16)!important}
html body .portal-shell .user-mini{padding:8px 10px!important;border-radius:20px;background:rgba(255,255,255,.1)}
html body .portal-shell .user-mini .avatar{background:#fff!important;color:var(--navy)!important;font-family:var(--font-display);font-weight:760!important}
html body .portal-shell .user-mini strong{color:#fff!important;font-size:.82rem!important}
html body .portal-shell .user-mini span{color:var(--side-muted)!important}
html body .portal-shell .sidebar-footer .icon-btn{background:rgba(255,255,255,.16)!important;border:0!important;color:#fff!important;border-radius:50%!important}
html body .portal-shell .sidebar-footer .icon-btn:hover{background:rgba(255,255,255,.3)!important}

/* ---------- toppfelt ---------- */
html body .portal-shell>.main>.topbar{background:rgba(255,255,255,.95)!important;border-bottom:1px solid var(--rule)!important;box-shadow:none!important}
html body .portal-shell .topbar-title{font-family:var(--font-display);font-size:1.04rem!important;font-weight:700!important;letter-spacing:-.01em;color:var(--navy)!important}
html body .portal-shell .topbar-sub{color:var(--muted)!important}
html body .portal-shell .topbar .icon-btn,html body .portal-shell .topbar-more-btn{width:40px!important;height:40px!important;border-radius:50%!important;border:1.5px solid var(--rule)!important;background:#fff!important;color:var(--navy)!important;box-shadow:none!important}
html body .portal-shell .topbar .icon-btn:hover,html body .portal-shell .topbar-more-btn:hover{background:var(--water)!important;border-color:var(--aqua)!important}
html body .portal-shell .realtime-state-badge{background:var(--mint)!important;color:#0a6b49!important;border:1px solid #bfeed7!important}
html body .portal-shell .realtime-state-badge.warn{background:var(--lemon)!important;color:#7a5a00!important;border-color:#f3dc84!important}
html body .portal-shell .realtime-state-badge.danger{background:#ffe3e0!important;color:#a32920!important;border-color:#f6bdb7!important}
html body .topbar-overflow-menu{border:1px solid var(--rule)!important;border-radius:22px!important;box-shadow:0 30px 60px -28px rgba(7,46,74,.55)!important}

/* ---------- sidetopp som vannblått banner med bobler, bølge og tegning ---------- */
html body .portal-shell :is(.page-title-row,.comm-toolbar){
  position:relative;isolation:isolate;overflow:hidden;min-height:124px;align-items:center!important;
  margin:2px 0 26px!important;padding:clamp(24px,3vw,34px) clamp(22px,3vw,40px) clamp(40px,4vw,50px)!important;
  border-radius:30px;background:var(--banner,#d6f1f9)!important
}
html body .portal-shell :is(.page-title-row,.comm-toolbar)::before{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;background:url(/assets/bubbles.svg) 0 0/400px 720px repeat;animation:bubbles-rise 90s linear infinite;-webkit-mask-image:linear-gradient(90deg,rgba(0,0,0,.12),rgba(0,0,0,.2) 45%,#000 80%);mask-image:linear-gradient(90deg,rgba(0,0,0,.12),rgba(0,0,0,.2) 45%,#000 80%)}
html body .portal-shell :is(.page-title-row,.comm-toolbar)::after{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;background:url(/assets/wave-paper.svg) bottom/100% 22px no-repeat}
html body .portal-shell .page-title-kicker{display:none!important}
html body .portal-shell :is(.page-title-row,.comm-toolbar) h1{font-family:var(--font-display)!important;font-size:clamp(1.8rem,2.7vw,2.55rem)!important;font-weight:760!important;line-height:1.04!important;letter-spacing:-.028em!important;color:var(--navy)!important;margin:0!important}
html body .portal-shell :is(.page-title-row,.comm-toolbar) p{color:var(--navy-2)!important;opacity:.85;font-size:.95rem!important;line-height:1.5!important;max-width:64ch;margin-top:8px!important}
html body .portal-shell .page-title-copy{position:relative;z-index:1}
html body .portal-shell .page-actions{position:relative;z-index:1}
@media(min-width:1180px){
  html body .portal-shell :is(.page-title-row,.comm-toolbar){padding-right:clamp(190px,15vw,230px)!important}
  html body .portal-shell :is(.page-title-row,.comm-toolbar)::after{background:var(--ill,none) right clamp(22px,3vw,44px) bottom 22px/auto calc(100% - 44px) no-repeat,url(/assets/wave-paper.svg) bottom/100% 22px no-repeat}
}

/* ---------- nøkkeltall: pastellkort med bobler ---------- */
html body .portal-shell .stats-grid{gap:16px!important;margin-bottom:20px!important}
html body .portal-shell .stat-card{border:0!important;border-radius:26px!important;background:var(--water)!important;box-shadow:none!important;min-height:122px!important;padding:20px 22px!important;transition:transform .35s var(--ease-out),box-shadow .35s var(--ease-out)!important}
html body .portal-shell .stat-card:nth-child(4n+2){background:var(--mint)!important}
html body .portal-shell .stat-card:nth-child(4n+3){background:var(--lemon)!important}
html body .portal-shell .stat-card:nth-child(4n+4){background:var(--sky)!important}
html body .portal-shell .stat-card:hover{transform:translateY(-3px)!important;box-shadow:0 22px 34px -24px rgba(10,58,92,.65)!important;border-color:transparent!important}
html body .portal-shell .portal-kpi-card::before{inset:auto -28px -36px auto!important;width:124px!important;height:124px!important;border-radius:50%!important;background:rgba(255,255,255,.5)!important;border:2px solid rgba(255,255,255,.95);filter:none!important;opacity:1!important}
html body .portal-shell .stat-card .label{color:var(--navy-2)!important;opacity:.82;font-size:.8rem!important;font-weight:700!important}
html body .portal-shell .stat-card .value{font-family:var(--font-display);font-size:clamp(1.7rem,2.1vw,2.3rem)!important;font-weight:760!important;letter-spacing:-.03em!important;color:var(--navy)!important;line-height:1.05}
html body .portal-shell .portal-date-value{font-size:clamp(1.25rem,1.5vw,1.55rem)!important}
html body .portal-shell .portal-kpi-caption{color:var(--muted)!important;font-size:.72rem!important;font-weight:650!important}
html body .portal-shell .stat-icon,html body .portal-shell .portal-kpi-card .stat-icon{width:46px!important;height:46px!important;border-radius:50%!important;background:#fff!important;color:var(--teal)!important;box-shadow:0 10px 18px -12px rgba(10,58,92,.6)}
html body .portal-shell .stat-icon svg{width:20px!important;height:20px!important}
html body .portal-shell .portal-kpi-trend.positive{color:#0a7d55}
html body .portal-shell .portal-kpi-trend.negative{color:#b3261e}
html body .portal-shell .portal-kpi-trend.neutral{color:var(--muted)}
html body .portal-shell .portal-mini-bars i{background:var(--teal)!important}

/* ---------- paneler, lister og kort ---------- */
html body .portal-shell .panel,html body .portal-shell .info-card,html body .portal-shell .form-card,html body .portal-shell .career-card,html body .portal-shell .account-card,html body .portal-shell .lead-card{background:#fff!important;border:1px solid var(--rule)!important;border-radius:26px!important;box-shadow:0 18px 40px -30px rgba(10,58,92,.45)!important}
html body .portal-shell .panel-head{background:#fff!important;border-bottom:1px solid var(--rule)!important;padding:18px 24px!important;min-height:64px!important}
html body .portal-shell .panel-head h2,html body .portal-shell .panel-head h3{font-family:var(--font-display);font-size:1.12rem!important;font-weight:720!important;letter-spacing:-.01em;color:var(--navy)!important}
html body .portal-shell .panel-head h2::before,html body .portal-shell .panel-head h3::before{content:"";display:inline-block;width:11px;height:11px;margin:0 9px 1px 0;border-radius:50%;border:2.5px solid var(--aqua);background:rgba(255,255,255,.7);vertical-align:middle}
html body .portal-shell .panel-head .muted,html body .portal-shell .panel-head p{color:var(--muted)!important;margin-top:3px!important}
html body .portal-shell .panel-body{padding:22px 24px!important}
html body .portal-shell .job-card{border:1px solid var(--rule)!important;border-radius:24px!important;background:#fff!important;box-shadow:0 16px 34px -28px rgba(10,58,92,.5)!important;transition:transform .35s var(--ease-out),border-color .25s,box-shadow .35s var(--ease-out)}
html body .portal-shell .job-card:hover{transform:translateY(-2px);border-color:var(--aqua)!important;box-shadow:0 24px 40px -28px rgba(10,58,92,.55)!important}
html body .portal-shell .job-card h3{font-family:var(--font-display);color:var(--navy);font-weight:720}
html body .portal-shell .activity-item{border:1px solid var(--rule)!important;border-radius:20px!important;background:#fff}
html body .portal-shell .activity-item:hover{background:#f0fafd!important;border-color:#a9dcea!important}
html body .portal-shell .activity-icon{background:var(--water)!important;color:var(--teal)!important;border-radius:50%!important}
html body .portal-shell .portal-ops-list button{border:1px solid var(--rule)!important;border-radius:20px!important;background:#fff!important}
html body .portal-shell .portal-ops-list button:hover{background:#f0fafd!important;border-color:#a9dcea!important}
html body .portal-shell .portal-ops-icon{background:var(--water)!important;color:var(--teal)!important;border-radius:50%!important}
html body .portal-shell .portal-ops-list b{color:var(--navy)!important}
html body .portal-shell .meta-chip{background:var(--paper-2)!important;border:0!important;color:var(--navy-2)!important;border-radius:999px!important;font-weight:650}
html body .portal-finance-summary>div{background:#fff!important;border:1px solid var(--rule)!important;border-radius:20px!important}
html body .portal-finance-summary strong{font-family:var(--font-display);color:var(--navy)!important;font-weight:740}
html body .portal-revenue-chart{background:linear-gradient(180deg,#f5fbfd,#e3f4f9)!important;border:1px solid var(--rule)!important;border-radius:22px!important}
html body .portal-revenue-grid{background:repeating-linear-gradient(to bottom,transparent 0,transparent 24%,#cfe3ea 25%)!important}
html body .portal-revenue-column i{background:linear-gradient(180deg,var(--aqua),var(--teal))!important;border-radius:14px 14px 4px 4px!important;box-shadow:0 12px 20px -12px rgba(11,111,194,.6)!important}
html body .portal-revenue-column span{color:var(--muted)!important;font-weight:650}

/* ---------- tabeller ---------- */
html body .portal-shell .table-wrap{border:1px solid var(--rule);border-radius:22px;background:#fff}
html body .portal-shell .data-table thead th{background:var(--paper-2)!important;color:var(--navy-2)!important;border-bottom:1px solid var(--rule)!important;font-size:.66rem!important;font-weight:800!important;letter-spacing:.09em!important}
html body .portal-shell .data-table tbody td{border-bottom:1px solid #e3f0f4!important;color:var(--ink)!important}
html body .portal-shell .data-table tbody tr:hover{background:#eef9fc!important}
html body .portal-shell .data-table tbody tr:last-child td{border-bottom:0!important}

/* ---------- knapper ---------- */
html body .portal-shell .btn,html body .modal .btn,html body .login-page .btn,html body .portal-choice-page .btn{border-radius:999px!important;font-weight:700!important;letter-spacing:0;transition:background .25s,border-color .25s,box-shadow .35s var(--ease-out),transform .35s var(--ease-out)}
html body .portal-shell .btn-primary,html body .modal .btn-primary,html body .login-page .btn-primary{background:var(--teal)!important;background-image:none!important;border:1px solid var(--teal)!important;color:#fff!important;box-shadow:0 14px 24px -16px rgba(11,111,194,.9)!important}
html body .portal-shell .btn-primary:hover,html body .modal .btn-primary:hover,html body .login-page .btn-primary:hover{background:var(--teal-dark)!important;border-color:var(--teal-dark)!important;filter:none;transform:translateY(-1px)}
html body .portal-shell .btn-ghost,html body .modal .btn-ghost,html body .portal-choice-page .btn-ghost{background:#fff!important;border:1.5px solid var(--rule)!important;color:var(--navy)!important}
html body .portal-shell .btn-ghost:hover,html body .modal .btn-ghost:hover,html body .portal-choice-page .btn-ghost:hover{background:var(--water)!important;border-color:var(--aqua)!important}
html body .portal-shell .btn-soft,html body .modal .btn-soft{background:var(--water)!important;border:1px solid transparent!important;color:var(--navy)!important}
html body .portal-shell .btn-danger,html body .modal .btn-danger{background:#fff!important;border:1.5px solid #f1b2ac!important;color:#a32920!important}
html body .portal-shell .btn-danger:hover,html body .modal .btn-danger:hover{background:#ffe3e0!important}
html body .portal-shell .btn:focus-visible,html body .modal .btn:focus-visible,html body .login-page .btn:focus-visible,html body .portal-shell .nav-item:focus-visible{outline:3px solid rgba(24,183,212,.55)!important;outline-offset:2px}

/* ---------- merker ---------- */
html body .portal-shell .badge,html body .modal .badge{border-radius:999px!important;padding:5px 11px;font-weight:700!important;background:var(--paper-2);color:var(--navy-2)}
html body .portal-shell .badge:not(.success):not(.info):not(.warn):not(.danger):not(.off),html body .modal .badge:not(.success):not(.info):not(.warn):not(.danger):not(.off){color:var(--navy-2)!important}
html body .portal-shell .badge.success,html body .modal .badge.success{background:var(--mint)!important;color:#0a6b49!important}
html body .portal-shell .badge.info,html body .modal .badge.info{background:var(--sky)!important;color:#0b559a!important}
html body .portal-shell .badge.warn,html body .modal .badge.warn{background:var(--lemon)!important;color:#7a5a00!important}
html body .portal-shell .badge.danger,html body .modal .badge.danger{background:#ffe3e0!important;color:#a32920!important}
html body .portal-shell .badge.off,html body .modal .badge.off{background:#e8f0f4!important;color:#51697a!important}
html body .portal-shell .status-dot{background:currentColor!important;box-shadow:none}

/* ---------- skjema ---------- */
html body .modal .field,html body .portal-shell .field,html body .login-page .field{align-content:start}
html body .portal-shell .field label,html body .modal .field label{color:var(--navy-2)!important;font-weight:750!important}
html body .portal-shell :is(input,select,textarea):not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]),
html body .modal :is(input,select,textarea):not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]){border:1.5px solid var(--rule)!important;border-radius:14px!important;background:#fff!important;color:var(--ink)!important;box-shadow:none!important}
html body .portal-shell :is(input,select,textarea):not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):focus,
html body .modal :is(input,select,textarea):not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):focus{border-color:var(--aqua)!important;box-shadow:0 0 0 4px rgba(24,183,212,.22)!important;outline:none!important}
html body .portal-shell input[type=checkbox],html body .portal-shell input[type=radio],html body .modal input[type=checkbox],html body .modal input[type=radio]{accent-color:var(--teal)}
html body .portal-shell .search,html body .modal .search{border:1.5px solid var(--rule)!important;border-radius:999px!important;background:#fff!important}
html body .portal-shell .search:focus-within{border-color:var(--aqua)!important;box-shadow:0 0 0 4px rgba(24,183,212,.2)}
html body .portal-shell .search input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]){border:0!important;box-shadow:none!important;background:transparent!important;border-radius:0!important}
html body .portal-shell .search svg{color:var(--teal)}

/* ---------- modaler og varsler ---------- */
html body .modal-backdrop,html body #modal-root .modal-backdrop{background:rgba(7,46,74,.58)!important;backdrop-filter:blur(6px)!important}
html body .modal,html body #modal-root .modal{border:0!important;border-radius:30px!important;box-shadow:0 44px 90px -34px rgba(7,46,74,.7)!important;color:var(--ink)}
html body .modal-head,html body #modal-root .modal-head{position:relative;isolation:isolate;overflow:hidden;background:var(--water)!important;border-bottom:0!important;padding:22px 26px!important}
html body .modal-head::before{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;background:url(/assets/bubbles.svg) 0 0/400px 720px repeat;-webkit-mask-image:linear-gradient(90deg,rgba(0,0,0,.1),#000 85%);mask-image:linear-gradient(90deg,rgba(0,0,0,.1),#000 85%)}
html body .modal-head h2,html body #modal-root .modal-head h2{font-family:var(--font-display);font-size:1.4rem!important;font-weight:740;letter-spacing:-.02em;color:var(--navy)!important}
html body #modal-root .modal-body{padding:24px 26px!important}
html body .modal-close,html body #modal-root .modal-close{width:38px!important;height:38px!important;background:#fff!important;color:var(--navy)!important;border-radius:50%!important;box-shadow:0 8px 16px -10px rgba(10,58,92,.6)}
html body .modal-close:hover,html body #modal-root .modal-close:hover{background:var(--mint)!important;transform:none!important}
html body .toast{border:0!important;border-radius:22px!important;background:#fff!important;box-shadow:0 26px 50px -24px rgba(7,46,74,.6)!important}
html body .toast .toast-symbol{border-radius:50%!important;background:var(--mint)!important;color:#0a6b49!important}
html body .toast.error .toast-symbol{background:#ffe3e0!important;color:#a32920!important}
html body .toast-dismiss{border-radius:50%!important}

/* ---------- tomtilstand: spray og bøtte ---------- */
html body .portal-shell .empty{padding:40px 24px!important}
html body .portal-shell .empty-icon{width:150px!important;height:112px!important;border-radius:0!important;background:url(/assets/ill-tools.svg) center/contain no-repeat!important;color:transparent!important;margin:0 auto 6px!important}
html body .portal-shell .empty-icon svg{display:none!important}
html body :is(.features-empty-icon,.audit-log-empty-icon,.email-log-empty-icon){width:132px!important;height:98px!important;border-radius:0!important;background:url(/assets/ill-tools.svg) center/contain no-repeat!important;color:transparent!important;margin:0 auto 10px!important}
html body :is(.features-empty-icon,.audit-log-empty-icon,.email-log-empty-icon) svg{display:none!important}
html body .portal-shell .empty strong{font-family:var(--font-display);font-size:1.1rem!important;color:var(--navy)!important}
html body .portal-shell .empty p{color:var(--muted)!important;font-size:.85rem!important}

/* ---------- sikkerhetsportalen ---------- */
html body .portal-security .security-hero{position:relative;isolation:isolate;overflow:hidden;background:linear-gradient(135deg,#17317f,#0e1f4a)!important;border:0!important;color:#fff!important;border-radius:30px!important;box-shadow:0 30px 50px -34px rgba(14,31,74,.8)!important}
html body .portal-security .security-hero::before{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;background:url(/assets/bubbles-white.svg) 0 0/400px 720px repeat;animation:bubbles-rise 90s linear infinite;opacity:.8;-webkit-mask-image:linear-gradient(90deg,rgba(0,0,0,.2),#000 75%);mask-image:linear-gradient(90deg,rgba(0,0,0,.2),#000 75%)}
html body .portal-security .security-hero :is(h1,h2,h3){color:#fff!important;font-family:var(--font-display)}
html body .portal-security .security-hero p{color:#d3dcff!important}
html body .portal-security .security-hero .kicker{color:#a9e9f7!important}
html body .portal-security .security-state{background:rgba(255,255,255,.14)!important;border:1px solid rgba(255,255,255,.3)!important;color:#fff!important}

/* ---------- innlogging og kontoflyt ---------- */
html body .login-page{background:var(--water)!important;color:var(--ink)!important;font-family:var(--font-body)}
html body .login-page .login-visual{background:linear-gradient(160deg,#0b6fc2 0%,#0a3a5c 88%)!important;color:#fff;position:relative;isolation:isolate;overflow:hidden}
html body .login-page .login-visual::before{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;background:url(/assets/bubbles-white.svg) 0 0/400px 720px repeat;animation:bubbles-rise 70s linear infinite}
html body .login-page .login-visual::after{content:"";position:absolute;inset:6% 7% auto auto;width:min(230px,42%);height:auto;aspect-ratio:4/3;border:0;border-radius:0;box-shadow:none;outline:0;transform:none;background:url(/assets/ill-tools.svg) center/contain no-repeat;pointer-events:none;opacity:1;z-index:-1}
html body .login-page .login-visual .login-logo{background:#fff!important;border-radius:26px!important;padding:12px!important;box-shadow:0 22px 40px -22px rgba(0,0,0,.6)!important}
html body .login-page .login-visual .eyebrow{display:inline-flex;align-items:center;gap:8px;padding:7px 14px;border-radius:999px;background:rgba(255,255,255,.16)!important;color:#fff!important;border:1px solid rgba(255,255,255,.3)!important;font-weight:750;letter-spacing:.06em}
html body .login-page .login-visual h1{font-family:var(--font-display)!important;font-weight:760!important;letter-spacing:-.03em!important;color:#fff!important}
html body .login-page .login-visual p{color:#dff3fb!important}
html body .login-page .login-point{background:rgba(255,255,255,.14)!important;border:1px solid rgba(255,255,255,.28)!important;border-radius:20px!important;color:#fff!important;font-weight:650}
html body .login-page .login-form-wrap{background:var(--water)!important;position:relative!important;isolation:isolate;overflow:hidden}
html body .login-page .login-form-wrap::before{inset:0!important;border:0!important;border-radius:0!important;opacity:1!important;z-index:-1;background:url(/assets/bubbles.svg) 0 0/400px 720px repeat;animation:bubbles-rise 90s linear infinite}
html body .login-page .login-panel-logo{background:#fff;border:0;border-radius:18px;box-shadow:0 14px 26px -16px rgba(10,58,92,.6)}
html body .login-page .login-panel-wordmark strong{font-family:var(--font-display);color:var(--navy);font-size:1.15rem;font-weight:760;letter-spacing:.04em}
html body .login-page .login-panel-wordmark small{color:var(--teal-dark)}
html body .login-page .login-secure-label{background:var(--mint)!important;border:1px solid #bfeed7!important;color:#0a6b49!important}
html body .login-page .login-secure-label::before{background:var(--aqua)!important;box-shadow:0 0 0 4px rgba(24,183,212,.2)!important}
html body .login-page .login-box.login-box-v2,html body .login-page .login-box.auth-flow-box,html body .login-page .auth-flow-box{border:0!important;border-radius:34px!important;background:#fff!important;box-shadow:0 44px 80px -40px rgba(7,46,74,.6)!important;backdrop-filter:none!important}
html body .login-page :is(.login-box-v2,.auth-flow-box) .auth-kicker{display:inline-flex;align-items:center;padding:6px 13px;border-radius:999px;background:var(--water);color:var(--teal-dark)!important;letter-spacing:.1em!important}
html body .login-page :is(.login-box-v2,.auth-flow-box) h2{font-family:var(--font-display)!important;font-size:clamp(2.1rem,3.2vw,2.7rem)!important;font-weight:760!important;letter-spacing:-.03em!important;color:var(--navy)!important}
html body .login-page :is(.login-box-v2,.auth-flow-box) .subtitle{color:var(--muted)!important}
html body .login-page :is(.login-box-v2,.auth-flow-box) .field label{color:var(--navy-2)!important}
html body .login-page :is(.login-box-v2,.auth-flow-box) .field :is(input,select){border:1.5px solid var(--rule)!important;border-radius:16px!important;background:#f5fbfd!important;color:var(--ink)!important}
html body .login-page :is(.login-box-v2,.auth-flow-box) .field :is(input,select):focus{background:#fff!important;border-color:var(--aqua)!important;box-shadow:0 0 0 4px rgba(24,183,212,.22)!important}
html body .login-page :is(.login-box-v2,.auth-flow-box) .login-submit{background:var(--teal)!important;background-image:none!important;border:1px solid var(--teal)!important;border-radius:999px!important;color:#fff!important;box-shadow:0 20px 32px -18px rgba(11,111,194,.9)!important}
html body .login-page :is(.login-box-v2,.auth-flow-box) .login-submit:hover{background:var(--teal-dark)!important;border-color:var(--teal-dark)!important}
html body .login-page :is(.login-forgot-row a,.auth-register-row a,.auth-back-link-v2){color:var(--teal-dark)!important}
html body .login-page .auth-flow-box .auth-flow-note{border:1px solid var(--rule)!important;border-radius:18px!important;background:var(--paper)!important;color:var(--muted)!important}
html body .login-page .auth-flow-box .auth-secondary-button{border-radius:999px!important}
html body .login-page .login-box-v2 .auth-register-row,html body .login-page .login-box-v2 .login-trust-row{border-top-color:var(--rule)!important}

/* ---------- velg portal ---------- */
html body .portal-choice-page{background:var(--water)!important;color:var(--ink)!important;position:relative;isolation:isolate;overflow:hidden}
html body .portal-choice-page::before{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;background:url(/assets/bubbles.svg) 0 0/400px 720px repeat;animation:bubbles-rise 90s linear infinite}
html body .portal-choice-page{grid-template-columns:minmax(0,1fr)!important}
html body .portal-choice-box{display:grid!important;width:100%!important;max-width:1040px!important;padding:clamp(8px,2vw,34px)!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;align-content:start;justify-self:center}
html body .portal-choice-box>.brand,html body .portal-choice-box>.portal-choice-copy,html body .portal-choice-box>.btn{grid-column:1/-1}
html body .portal-choice-box>.btn{justify-self:center}
html body .portal-choice-box>.brand{justify-self:center;color:var(--navy)}
html body .portal-choice-copy{margin:8px auto 14px!important}
html body .portal-choice-copy .eyebrow{display:inline-block;padding:6px 14px;border-radius:999px;background:#fff;color:var(--teal-dark)!important;font-weight:750;letter-spacing:.08em}
html body .portal-choice-copy h1{font-family:var(--font-display)!important;font-size:clamp(2.1rem,4vw,3rem)!important;font-weight:760!important;letter-spacing:-.03em!important;color:var(--navy)!important}
html body .portal-choice-copy p{color:var(--navy-2)!important}
html body .portal-choice-card{position:relative;isolation:isolate;overflow:hidden;min-height:150px;align-items:flex-start!important;padding:24px 150px 24px 24px!important;border:0!important;border-radius:30px!important;background:var(--tile,#fff)!important;box-shadow:0 22px 36px -30px rgba(7,46,74,.65)!important;color:var(--navy)!important}
html body .portal-choice-card::after{content:"";position:absolute;right:16px;bottom:10px;width:124px;height:92px;z-index:-1;background:var(--ill) center/contain no-repeat;pointer-events:none}
html body .portal-choice-card[data-mode=management]{--tile:#fff;--ill:url(/assets/ill-building.svg)}
html body .portal-choice-card[data-mode=employee]{--tile:var(--mint);--ill:url(/assets/ill-tools.svg)}
html body .portal-choice-card[data-mode=customer]{--tile:var(--sky);--ill:url(/assets/ill-office.svg)}
html body .portal-choice-card[data-mode=security]{--tile:var(--lemon);--ill:url(/assets/ill-shield.svg)}
html body .portal-choice-card:hover{transform:translateY(-4px)!important;box-shadow:0 30px 44px -30px rgba(7,46,74,.7)!important}
html body .portal-choice-card strong{font-family:var(--font-display);font-size:1.3rem;font-weight:740;color:var(--navy)}
html body .portal-choice-card small{color:var(--navy-2)!important;opacity:.85;font-size:.85rem}
html body .portal-choice-icon,html body .portal-choice-security .portal-choice-icon{background:#fff!important;color:var(--teal)!important;border-radius:50%!important;box-shadow:0 10px 18px -12px rgba(10,58,92,.6)}
html body .portal-choice-arrow{position:absolute;left:auto;right:16px;top:14px;width:34px;height:34px;display:grid;place-items:center;border-radius:50%;background:#fff;color:var(--teal)!important;font-size:1.3rem;line-height:1;box-shadow:0 10px 16px -10px rgba(10,58,92,.6);transition:transform .35s var(--ease-out)}
html body .portal-choice-card:hover .portal-choice-arrow{transform:translateX(3px)}

/* ---------- lesbarhet: dempet tekst (minst 4,5:1 mot hvit/pastell) ---------- */
html body .portal-shell :is(small,.small,.muted,.help,.label-hint):not(.sidebar *):not(.security-hero *):not(.page-title-row *):not(.badge),
html body .modal :is(small,.small,.muted,.help,.label-hint):not(.badge){color:var(--muted)}
html body .portal-shell :is(.portal-finance-summary span:not(.portal-kpi-trend),.portal-finance-summary small,.activity-item>div:not(.text-right)>span:not(.badge):not(.status-dot),.deviation-meta span,.features-count,.features-empty-inner p,.email-log-count span,.audit-log-count span,.email-log-empty-inner,.audit-log-empty-inner,.account-detail span,.access-person-main small,.access-person-right small,.assignment-picker-head span,.portal-kpi-caption,.deviation-detail-grid span,.deviation-file small,.lead-intelligence span,.inquiry-meta,.renovia-weekdays span,.lead-score span,.hms-routine-bottom>span:not(.hms-confirmed):not(.hms-pending),.security-activity-summary>span,.account-activity-main>span,.account-activity-time){color:var(--muted)!important}

html body .portal-shell .hours-day-head>b{color:var(--teal-dark)}

/* ---------- assistent: flytende boble + panel ---------- */
@keyframes assist-ring{0%{transform:scale(.88);opacity:.85}70%,100%{transform:scale(1.32);opacity:0}}
@keyframes assist-pop{from{opacity:0;transform:translateY(14px) scale(.96);filter:blur(3px)}to{opacity:1;transform:none;filter:none}}
html body .assistant-btn,html body .portal-shell .assistant-btn{
  right:24px!important;bottom:24px!important;width:58px!important;height:58px!important;border-radius:50%!important;border:0!important;
  background:linear-gradient(145deg,var(--aqua),var(--teal))!important;color:#fff!important;font-size:1.45rem!important;line-height:1;
  display:grid;place-items:center;cursor:pointer;
  box-shadow:0 18px 32px -14px rgba(11,111,194,.75),inset 0 0 0 2px rgba(255,255,255,.35)!important;
  transition:transform .35s var(--ease-out),box-shadow .35s var(--ease-out)
}
html body .assistant-btn:hover{transform:translateY(-3px) scale(1.05)}
html body .assistant-btn:focus-visible{outline:3px solid var(--navy);outline-offset:3px}
html body .assistant-btn::after{content:"";position:absolute;inset:-6px;border-radius:50%;border:2px solid rgba(24,183,212,.5);animation:assist-ring 3.6s ease-out infinite;pointer-events:none}
html body .assistant-panel,html body .portal-shell .assistant-panel{
  right:24px!important;bottom:96px!important;border:1px solid var(--rule)!important;border-radius:30px!important;background:#fff;
  box-shadow:0 38px 80px -34px rgba(7,46,74,.6)!important;overflow:hidden;animation:assist-pop .5s var(--ease-out) both
}
html body .assistant-head,html body .portal-shell .assistant-head{
  position:relative;isolation:isolate;align-items:center;padding:18px 20px 28px!important;background:var(--water)!important;color:var(--navy)!important;border-bottom:0!important
}
html body .assistant-head::before{content:"";position:absolute;inset:0;z-index:-1;background:url(/assets/bubbles.svg) 0 0/260px 468px repeat;opacity:.9;pointer-events:none;-webkit-mask:linear-gradient(90deg,transparent 0,#000 80%);mask:linear-gradient(90deg,transparent 0,#000 80%)}
html body .assistant-head::after{content:"";position:absolute;inset:auto 0 -1px 0;height:16px;background:url(/assets/wave-white.svg) bottom/100% 100% no-repeat;pointer-events:none}
html body .assistant-head strong{font-family:var(--font-display);font-size:1.08rem;font-weight:700;color:var(--navy)}
html body .assistant-head .small{margin-top:2px;font-size:.78rem;color:var(--muted)!important}
html body .assistant-head .modal-close{width:34px;height:34px;display:grid;place-items:center;border:0!important;border-radius:50%!important;background:#fff!important;color:var(--navy)!important;box-shadow:0 8px 14px -10px rgba(10,58,92,.6)}
html body .assistant-messages{padding:16px 18px!important;background:#fff}
html body .chat-bubble{padding:11px 14px!important;border-radius:20px!important;font-size:.9rem;line-height:1.45}
html body .chat-bubble.assistant,html body .portal-shell .chat-bubble.assistant{background:var(--paper-2)!important;color:var(--ink)!important;border-bottom-left-radius:6px!important}
html body .chat-bubble.user{background:var(--teal)!important;color:#fff!important;border-bottom-right-radius:6px!important}
html body .assistant-form{padding:12px 14px 14px!important;border-top:1px solid var(--rule)!important;background:#fff}
html body .assistant-form input{border:1.5px solid var(--rule)!important;border-radius:999px!important;padding:11px 16px!important;background:var(--paper)!important;color:var(--ink);font:inherit}
html body .assistant-form input:focus{outline:0;border-color:var(--aqua)!important;box-shadow:0 0 0 4px rgba(24,183,212,.18)}
html body .assistant-form .btn-primary{background:var(--teal)!important;background-image:none!important;border:1px solid var(--teal)!important;color:#fff!important;border-radius:999px!important}
@media(max-width:620px){
  html body .assistant-btn,html body .portal-shell .assistant-btn{right:16px!important;bottom:16px!important;width:54px!important;height:54px!important}
  html body .assistant-panel,html body .portal-shell .assistant-panel{left:12px!important;right:12px!important;bottom:84px!important;width:auto!important}
}
@media(prefers-reduced-motion:reduce){
  html body .assistant-btn::after{animation:none;opacity:0}
  html body .assistant-panel{animation:none}
}

/* ---------- e-post: dempet tekst ---------- */
html body .portal-shell[data-page="mail"] :is(.mail-pro-nav-label,.mailbox-menu-label,.mail-pro-row-time,.mail-pro-row-preview,.mail-pro-row-flag:not(.favorite):not(.important),.mail-pro-sidebar-link,.mail-mobile-drawer-head span,.mail-message-flags,.mail-reader-meta,.mail-attachment-info span,.mail-attachments-title span,.mail-folder-account>small,.mail-pro-reader-empty p,.mail-pro-list-title span,.mail-pro-sender-line>span,.mail-pro-sender-sub){color:var(--muted)!important}
html body .portal-shell[data-page="mail"] :is(.mail-pro-folder,.mail-pro-quick)>b{color:var(--navy-2)!important}
html body .portal-shell[data-page="mail"] :is(.mail-pro-row-flag.favorite,.mail-pro-row-flag.important){color:#8a5d00!important}
html body .modal :is(.security-activity-summary>span,.account-activity-main>span,.account-activity-time,.assignment-picker-head span,.deviation-detail-grid span,.deviation-file small,.renovia-date-copy small,.mail-compose-row>label){color:var(--muted)!important}

/* ---------- oppdragsdetaljer: oppgavestatus og kart ---------- */
html body .task-segmented{background:var(--paper-2)!important;border-radius:999px!important;padding:4px!important}
html body .task-seg{border-radius:999px!important;color:var(--muted)!important;font-weight:750!important;background:transparent!important;box-shadow:none!important}
html body .task-seg:hover{background:#fff!important}
html body .task-seg[aria-pressed="true"]{background:#fff!important;color:var(--navy)!important;box-shadow:0 6px 12px -8px rgba(10,58,92,.55)!important}
html body .task-seg.active[aria-pressed="true"]{background:var(--water)!important;color:var(--teal-dark)!important}
html body .task-seg.completed[aria-pressed="true"]{background:var(--mint)!important;color:#0a6b49!important}
html body .task-seg.blocked[aria-pressed="true"]{background:#ffe3e0!important;color:#a32920!important}
html body .modal :is(.clock-panel,.modern-upload-card,.customer-portal-card,.setting-toggle-row) .form-actions{position:static;background:none;padding:0;margin-top:14px}
html body .job-modal-layout{align-items:stretch}
html body .job-modal-layout>div:first-child{display:grid}
html body .job-modal-layout>div:first-child>:is(.map-box,.map-box-v52){height:100%;min-height:300px;max-height:640px}

/* ---------- kommunikasjon v2.1: samtaler, chat, møter og dialoger ----------
   Markeringen kommer fra app.js (.comm-page-v2). Eldre regler i portal-theme.css er flate og lavt spesifikke,
   derfor «html body .portal-shell»-prefiks. Layouten styres av bredden på selve siden (container query),
   ikke av vinduet, så sidemenyen på/av ikke ødelegger kolonnene. */
html body .portal-shell .comm-page-v2{gap:18px;align-content:start;min-height:0;margin:0;container-type:inline-size;container-name:comm}

/* toppbanner + knapper */
html body .portal-shell .comm-page-v2 .comm-toolbar{display:flex;flex-wrap:wrap;align-items:center!important;justify-content:space-between;gap:14px 22px;margin:0!important;min-height:104px;padding-top:20px!important;padding-bottom:38px!important}
html body .portal-shell .comm-page-v2 .comm-toolbar>*{position:relative;z-index:1}
html body .portal-shell .comm-page-v2 .comm-toolbar>div:first-child{flex:1 1 300px;min-width:0}
html body .portal-shell .comm-page-v2 .comm-toolbar h1{font-size:clamp(1.7rem,2.3vw,2.2rem)!important}
html body .portal-shell .comm-page-v2 .comm-toolbar .eyebrow{display:none!important}
html body .portal-shell .comm-page-v2 .comm-toolbar p{display:block;margin-top:6px!important;max-width:52ch}
html body .portal-shell .comm-page-v2 .comm-toolbar-actions{flex:0 0 auto;gap:8px}
html body .portal-shell .comm-page-v2 .comm-toolbar-actions .btn{display:inline-flex;align-items:center;justify-content:center;height:44px;padding-inline:15px;font-size:.88rem;white-space:nowrap}
@media(min-width:1180px){
  html body .portal-shell .comm-page-v2 .comm-toolbar{padding-right:clamp(180px,14vw,220px)!important}
}

/* filtrering: Aktive / Alle / Arkiv … */
html body .portal-shell .comm-page-v2 .comm-filter-tabs{gap:4px;padding:5px;background:#fff;border:1.5px solid var(--rule);border-radius:999px;box-shadow:none;scrollbar-width:none}
html body .portal-shell .comm-page-v2 .comm-filter-tabs::-webkit-scrollbar{display:none}
html body .portal-shell .comm-page-v2 .comm-filter-tabs button{padding:8px 18px;border-radius:999px;color:var(--muted);font-size:.84rem;font-weight:720;transition:background .25s,color .25s}
html body .portal-shell .comm-page-v2 .comm-filter-tabs button:hover{background:var(--paper-2);color:var(--navy)}
html body .portal-shell .comm-page-v2 .comm-filter-tabs button.active{background:var(--navy);color:#fff;box-shadow:none}
html body .portal-shell .comm-page-v2 .comm-filter-tabs button:focus-visible{outline:3px solid rgba(24,183,212,.55);outline-offset:1px}

/* arbeidsflaten: liste | chat | info */
html body .portal-shell .comm-page-v2 .comm-workspace{
  display:grid;grid-template-columns:minmax(230px,290px) minmax(0,1fr);grid-template-rows:minmax(0,1fr);
  height:max(520px,calc(100vh - 340px));min-height:520px;max-height:none;
  background:#fff;border:1px solid var(--rule);border-radius:30px;box-shadow:0 22px 46px -32px rgba(10,58,92,.5)
}
html body .portal-shell .comm-page-v2 .comm-workspace>*{min-height:0}
html body .portal-shell .comm-page-v2 .comm-conversations{max-height:none;background:var(--paper);border-right:1px solid var(--rule);border-bottom:0}
html body .portal-shell .comm-page-v2 .comm-chat{min-height:0;background:#fff}
html body .portal-shell .comm-page-v2 .comm-info{display:none;background:var(--paper);border-left:1px solid var(--rule)}
@container comm (min-width:980px){
  html body .portal-shell .comm-page-v2 .comm-workspace{grid-template-columns:minmax(230px,300px) minmax(400px,1fr) minmax(230px,280px)}
  html body .portal-shell .comm-page-v2 .comm-workspace:has(>.comm-info:empty){grid-template-columns:minmax(230px,300px) minmax(0,1fr)}
  html body .portal-shell .comm-page-v2 .comm-workspace>.comm-info:not(:empty){display:block}
}
/* lave skjermer (bærbar): kompakt banner og litt lavere arbeidsflate, slik at skrivefeltet vises uten sidescroll */
@media(max-height:820px) and (min-width:700px){
  html body .portal-shell .comm-page-v2{gap:12px}
  html body .portal-shell .comm-page-v2 .comm-toolbar{min-height:0;padding-top:14px!important;padding-bottom:32px!important}
  html body .portal-shell .comm-page-v2 .comm-toolbar p{display:none}
  html body .portal-shell .comm-page-v2 .comm-workspace{height:max(460px,calc(100vh - 292px));min-height:460px}
}

/* samtaleliste */
html body .portal-shell .comm-page-v2 .comm-pane-title{padding:17px 20px;background:#fff;border-bottom:1px solid var(--rule)}
html body .portal-shell .comm-page-v2 .comm-pane-title strong{font-family:var(--font-display);font-size:1.1rem;font-weight:720;letter-spacing:-.01em;color:var(--navy)}
html body .portal-shell .comm-page-v2 .comm-pane-title strong::before{content:"";display:inline-block;width:11px;height:11px;margin:0 9px 1px 0;border-radius:50%;border:2.5px solid var(--aqua);background:rgba(255,255,255,.7);vertical-align:middle}
html body .portal-shell .comm-page-v2 .comm-pane-title>span{background:var(--water);color:var(--navy);font-weight:800}
html body .portal-shell .comm-page-v2 .comm-thread-list{max-height:none;padding:10px 10px 14px;scrollbar-gutter:auto;scrollbar-color:#b3d6e3 transparent}
html body .portal-shell .comm-page-v2 .comm-thread{align-items:center;grid-template-columns:44px minmax(0,1fr) auto;gap:11px;margin:0 0 5px;padding:11px 12px;border:1.5px solid transparent;border-radius:20px;background:transparent;box-shadow:none;transition:background .25s,border-color .25s,box-shadow .35s var(--ease-out)}
html body .portal-shell .comm-page-v2 .comm-thread:hover{background:#fff;border-color:var(--rule)}
html body .portal-shell .comm-page-v2 .comm-thread.active{background:#fff;border-color:var(--aqua);box-shadow:0 14px 26px -20px rgba(10,58,92,.6)}
html body .portal-shell .comm-page-v2 .comm-thread-avatar{width:44px;height:44px;border-radius:50%;background:var(--water);color:var(--navy);font-family:var(--font-display);font-size:.86rem;font-weight:760}
html body .portal-shell .comm-page-v2 .comm-thread:nth-child(4n+2) .comm-thread-avatar{background:var(--mint)}
html body .portal-shell .comm-page-v2 .comm-thread:nth-child(4n+3) .comm-thread-avatar{background:var(--lemon)}
html body .portal-shell .comm-page-v2 .comm-thread:nth-child(4n+4) .comm-thread-avatar{background:var(--sky)}
html body .portal-shell .comm-page-v2 .comm-thread-copy strong{color:var(--navy);font-weight:720}
html body .portal-shell .comm-page-v2 .comm-thread:has(.comm-thread-meta>b) .comm-thread-copy strong{font-weight:800}
html body .portal-shell .comm-page-v2 .comm-thread:has(.comm-thread-meta>b) .comm-thread-copy small{color:var(--ink)}
html body .portal-shell .comm-page-v2 .comm-thread-copy small{color:var(--muted)}
html body .portal-shell .comm-page-v2 .comm-thread-copy em{justify-self:start;padding:1px 9px;border-radius:999px;background:var(--lemon);color:#7a5a00;font-size:.68rem;font-weight:800;line-height:1.55}
html body .portal-shell .comm-page-v2 .comm-thread-copy em:empty{display:none}
html body .portal-shell .comm-page-v2 .comm-thread-meta{display:grid;grid-template-columns:auto auto;align-items:center;justify-items:end;gap:3px 6px;color:var(--muted)}
html body .portal-shell .comm-page-v2 .comm-thread-meta>time{grid-column:1/-1}
html body .portal-shell .comm-page-v2 .comm-thread-meta>b{grid-column:1}
html body .portal-shell .comm-page-v2 .comm-thread-meta>.comm-more{grid-column:2}
html body .portal-shell .comm-page-v2 .comm-thread-meta>b{background:var(--teal);color:#fff;font-weight:800}
html body .portal-shell .comm-page-v2 .comm-more{width:30px;height:30px;border-radius:50%;color:var(--muted);transition:background .25s,color .25s}
html body .portal-shell .comm-page-v2 .comm-more:hover{background:var(--water);color:var(--navy)}
html body .portal-shell .comm-page-v2 .comm-more:focus-visible{outline:3px solid rgba(24,183,212,.55);outline-offset:1px}

/* chat: topp */
html body .portal-shell .comm-page-v2 .comm-chat-head{min-height:72px;padding:14px 20px;background:#fff;border-bottom:1px solid var(--rule)}
html body .portal-shell .comm-page-v2 .comm-chat-head>div:first-child{min-width:0}
html body .portal-shell .comm-page-v2 .comm-chat-head h2{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;white-space:normal;overflow:hidden;font-family:var(--font-display);font-size:1.14rem;font-weight:740;letter-spacing:-.015em;line-height:1.25;color:var(--navy);overflow-wrap:anywhere}
html body .portal-shell .comm-page-v2 .comm-chat-head p{margin-top:3px;color:var(--muted);font-size:.8rem}
html body .portal-shell .comm-page-v2 .comm-typing{color:var(--teal);font-size:.74rem}
html body .portal-shell .comm-page-v2 .comm-chat-actions{flex:0 0 auto;gap:6px}
html body .portal-shell .comm-page-v2 .comm-head-btn{width:40px;height:40px;border:1.5px solid var(--rule);border-radius:50%;background:#fff;color:var(--navy);font-size:16px;transition:background .25s,border-color .25s}
html body .portal-shell .comm-page-v2 .comm-head-btn:hover{background:var(--water);border-color:var(--aqua)}
html body .portal-shell .comm-page-v2 .comm-head-btn:focus-visible{outline:3px solid rgba(24,183,212,.55);outline-offset:2px}

/* chat: meldinger */
html body .portal-shell .comm-page-v2 .comm-message-stream{padding:22px 22px 12px;background:var(--paper);scrollbar-gutter:auto;scrollbar-color:#b3d6e3 transparent}
html body .portal-shell .comm-page-v2 .comm-message{gap:10px;margin:0 0 16px}
html body .comm-message-avatar,html body .portal-shell .comm-page-v2 .comm-message-avatar{width:36px;height:36px;flex:0 0 36px;border-radius:50%;background:var(--water);color:var(--navy);font-family:var(--font-display);font-size:.72rem;font-weight:760;box-shadow:0 0 0 2px #fff}
html body .portal-shell .comm-page-v2 .comm-message-wrap{max-width:min(80%,720px)}
html body .portal-shell .comm-page-v2 .comm-message-bubble{max-width:none;padding:11px 16px 12px;border:1px solid var(--rule);border-radius:22px 22px 22px 6px;background:#fff;color:var(--ink);box-shadow:0 12px 24px -22px rgba(10,58,92,.6)}
html body .portal-shell .comm-page-v2 .comm-message.mine .comm-message-bubble{border-color:transparent;border-radius:22px 22px 6px 22px;background:var(--r-role-soft,var(--water))}
html body .portal-shell .comm-page-v2 .comm-message.internal .comm-message-bubble{border-color:#f3dc84;background:var(--lemon)}
html body .portal-shell .comm-page-v2 .comm-message-bubble header{gap:14px;margin-bottom:4px}
html body .portal-shell .comm-page-v2 .comm-message-bubble header strong{color:var(--navy);font-size:.8rem;font-weight:780}
html body .portal-shell .comm-page-v2 .comm-message-bubble header>span{color:var(--muted);font-size:.72rem}
html body .portal-shell .comm-page-v2 .comm-message-bubble time{color:var(--muted)}
html body .portal-shell .comm-page-v2 .comm-message-bubble p{font-size:.92rem;line-height:1.5}
html body .portal-shell .comm-page-v2 .comm-edited{color:var(--muted);font-size:.7rem}
html body .portal-shell .comm-page-v2 .comm-read{color:var(--teal);font-size:.72rem}
html body .portal-shell .comm-page-v2 .comm-saved{font-size:.8rem}
html body .portal-shell .comm-page-v2 .comm-priority{padding:2px 9px;font-size:.64rem}
html body .portal-shell .comm-page-v2 .comm-priority.important{background:var(--lemon);color:#7a5a00}
html body .portal-shell .comm-page-v2 .comm-priority.urgent{background:#ffe3e0;color:#a32920}
html body .portal-shell .comm-page-v2 .comm-reply-ref{margin:0 0 6px 6px;padding:2px 10px;border-left:3px solid var(--aqua);color:var(--muted);font-size:.76rem}
html body .portal-shell .comm-page-v2 .comm-internal-label{display:inline-block;margin-top:8px;padding:2px 10px;border:1px solid #f3dc84;border-radius:999px;background:#fff;color:#7a5a00;font-size:.72rem}
html body .portal-shell .comm-page-v2 .comm-reactions{gap:6px;margin-top:6px}
html body .portal-shell .comm-page-v2 .comm-reactions:empty{display:none}
html body .portal-shell .comm-page-v2 .comm-reaction{padding:3px 11px;border:1.5px solid var(--rule);border-radius:999px;background:#fff;color:var(--navy);font-size:.8rem;transition:background .25s,border-color .25s}
html body .portal-shell .comm-page-v2 .comm-reaction:hover{border-color:var(--aqua)}
html body .portal-shell .comm-page-v2 .comm-reaction.mine{border-color:var(--aqua);background:var(--water)}
html body .portal-shell .comm-page-v2 .comm-reaction span{font-weight:800}
html body .portal-shell .comm-page-v2 .comm-ack-row{gap:10px;margin-top:10px;padding-top:9px;border-top:1px dashed #b9d6e0}
html body .portal-shell .comm-page-v2 .comm-ack-row small{color:var(--muted)}
/* avstemning */
html body .portal-shell .comm-page-v2 .comm-poll{margin-top:10px;padding:14px;border:1px solid var(--rule);border-radius:22px;background:var(--paper)}
html body .portal-shell .comm-page-v2 .comm-poll>strong{margin-bottom:10px;font-family:var(--font-display);font-size:.98rem;font-weight:740;color:var(--navy)}
html body .portal-shell .comm-page-v2 .comm-poll-option{padding:9px 14px;border:1.5px solid var(--rule);border-radius:999px;background:#fff;color:var(--ink);font-weight:650;transition:background .25s,border-color .25s}
html body .portal-shell .comm-page-v2 .comm-poll-option:hover:not(:disabled){border-color:var(--aqua);background:var(--water)}
html body .portal-shell .comm-page-v2 .comm-poll-option.selected{border-color:var(--aqua);background:var(--water);color:var(--navy);font-weight:760}
html body .portal-shell .comm-page-v2 .comm-poll-option:disabled{opacity:.7}
html body .portal-shell .comm-page-v2 .comm-poll-option b{min-width:28px;padding:1px 9px;border-radius:999px;background:var(--paper-2);color:var(--navy);font-size:.76rem;text-align:center}
html body .portal-shell .comm-page-v2 .comm-poll small{color:var(--muted);font-size:.72rem}
/* vedlegg */
html body .portal-shell .comm-page-v2 .comm-attachments{gap:8px;margin-top:10px}
html body .portal-shell .comm-page-v2 .comm-attachment{gap:10px;padding:9px 12px;border:1px solid var(--rule);border-radius:18px;background:#fff;transition:background .25s,border-color .25s}
html body .portal-shell .comm-page-v2 .comm-attachment:hover{border-color:var(--aqua);background:var(--paper)}
html body .portal-shell .comm-page-v2 .comm-attachment>span{display:grid;place-items:center;flex:0 0 38px;width:38px;height:38px;border-radius:50%;background:var(--water);font-size:18px}
html body .portal-shell .comm-page-v2 .comm-attachment strong{color:var(--navy);font-size:.8rem;font-weight:720}
html body .portal-shell .comm-page-v2 .comm-attachment small{color:var(--muted);font-size:.7rem}
html body .portal-shell .comm-page-v2 .comm-attachment.image{padding:6px}
html body .portal-shell .comm-page-v2 .comm-attachment.image img{border-radius:14px}

/* svar-felt og lukket samtale */
html body .portal-shell .comm-page-v2 .comm-reply-bar{border-top:1px solid #bfe3ee;background:var(--water);color:var(--navy);font-size:.82rem}
html body .portal-shell .comm-page-v2 .comm-reply-bar:not(:empty){padding:10px 20px}
html body .portal-shell .comm-page-v2 .comm-reply-bar button{display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:#fff;color:var(--navy);font-size:18px;line-height:1}
html body .portal-shell .comm-page-v2 .comm-closed-banner{padding:14px 20px;border-top:1px solid #f3dc84;background:var(--lemon);color:#7a5a00;font-size:.86rem}

/* meldingsfelt: tekstfelt og send øverst, verktøy under */
html body .portal-shell .comm-page-v2 .comm-composer-v2{
  display:grid!important;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"input send" "tools tools";
  gap:10px 12px!important;align-items:end!important;padding:14px 18px!important;background:#fff;border-top:1px solid var(--rule)
}
html body .portal-shell .comm-page-v2 .comm-composer-v2 textarea:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]){
  grid-area:input;min-height:48px;max-height:140px;padding:13px 20px;border:1.5px solid var(--rule)!important;border-radius:26px!important;
  background:var(--paper)!important;color:var(--ink)!important;font-size:.92rem;line-height:1.4;resize:none
}
html body .portal-shell .comm-page-v2 .comm-composer-v2 textarea:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):focus{border-color:var(--aqua)!important;background:#fff!important;box-shadow:0 0 0 4px rgba(24,183,212,.22)!important}
html body .portal-shell .comm-page-v2 .comm-composer-v2 textarea::placeholder{color:#5d7a8d}
html body .portal-shell .comm-page-v2 .comm-send-btn{grid-area:send;width:48px;height:48px;border-radius:50%;background:var(--teal);box-shadow:0 14px 24px -16px rgba(11,111,194,.9);font-size:18px;transition:background .25s,transform .35s var(--ease-out)}
html body .portal-shell .comm-page-v2 .comm-send-btn:hover{background:var(--teal-dark);transform:translateY(-1px)}
html body .portal-shell .comm-page-v2 .comm-send-btn:disabled{opacity:.6;transform:none}
html body .portal-shell .comm-page-v2 .comm-send-btn:focus-visible{outline:3px solid rgba(24,183,212,.55);outline-offset:2px}
html body .portal-shell .comm-page-v2 .comm-compose-tools{grid-area:tools;flex-wrap:wrap;gap:6px;min-height:0;padding:0 2px}
html body .portal-shell .comm-page-v2 .comm-attach-trigger,html body .portal-shell .comm-page-v2 .comm-tool-btn{display:grid;place-items:center;width:38px;height:38px;border:1.5px solid var(--rule);border-radius:50%;background:#fff;font-size:16px;transition:background .25s,border-color .25s}
html body .portal-shell .comm-page-v2 .comm-attach-trigger:hover,html body .portal-shell .comm-page-v2 .comm-tool-btn:hover{border-color:var(--aqua);background:var(--water)}
html body .portal-shell .comm-page-v2 .comm-tool-btn:focus-visible,html body .portal-shell .comm-page-v2 .comm-attach-trigger:focus-within{outline:3px solid rgba(24,183,212,.55);outline-offset:2px}
/* appen bytter selv ut <select> og filvelger med egne komponenter – her gjøres de om til små runde verktøy */
html body .portal-shell .comm-page-v2 .comm-attach-trigger{position:relative;cursor:pointer}
html body .portal-shell .comm-page-v2 .comm-attach-trigger .smart-file-upload{position:absolute;width:1px;height:1px;min-height:0;margin:-1px;padding:0;overflow:hidden;border:0;clip-path:inset(50%);white-space:nowrap}
html body .portal-shell .comm-page-v2 .comm-compose-tools .smart-select{flex:0 0 auto;width:auto;min-width:112px}
html body .portal-shell .comm-page-v2 .comm-compose-tools .smart-select-button{height:38px;min-height:38px;gap:8px;padding:0 7px 0 16px;border:1.5px solid var(--rule);border-radius:999px;background:#fff;color:var(--navy);font-size:.8rem;font-weight:720;box-shadow:none}
html body .portal-shell .comm-page-v2 .comm-compose-tools .smart-select-button:hover{border-color:var(--aqua);background:var(--water);box-shadow:none}
html body .portal-shell .comm-page-v2 .comm-compose-tools .smart-select.open .smart-select-button{border-color:var(--aqua);background:#fff;box-shadow:0 0 0 4px rgba(24,183,212,.22)}
html body .portal-shell .comm-page-v2 .comm-compose-tools .smart-select-arrow{width:24px;height:24px;border-radius:50%;background:var(--water);color:var(--navy)}
html body .portal-shell .comm-page-v2 .comm-compose-tools .smart-select-menu{top:auto;bottom:calc(100% + 8px);right:auto;min-width:168px;padding:8px;border:1px solid var(--rule);border-radius:22px;box-shadow:0 30px 60px -28px rgba(7,46,74,.55)}
html body .portal-shell .comm-page-v2 .comm-compose-tools .smart-select-option{border-radius:14px;padding:10px 14px;color:var(--navy);font-size:.84rem;font-weight:700}
html body .portal-shell .comm-page-v2 .comm-compose-tools .smart-select-option:hover,html body .portal-shell .comm-page-v2 .comm-compose-tools .smart-select-option.selected{background:var(--water);color:var(--navy)}
html body .portal-shell .comm-page-v2 .comm-compose-tools>[data-comm-schedule]{margin-left:auto}
html body .portal-shell .comm-page-v2 .comm-priority-select{height:38px;min-width:104px;max-width:none;padding:0 14px;border:1.5px solid var(--rule)!important;border-radius:999px!important;background:#fff!important;color:var(--navy)!important;font-size:.8rem;font-weight:720}
html body .portal-shell .comm-page-v2 .comm-inline-check{display:flex;align-items:center;height:38px;gap:7px;padding:0 14px 0 11px;border:1.5px solid var(--rule);border-radius:999px;background:#fff;color:var(--navy-2);font-size:.78rem;font-weight:700;cursor:pointer;transition:background .25s,border-color .25s}
html body .portal-shell .comm-page-v2 .comm-inline-check:has(input:checked){border-color:#f3dc84;background:var(--lemon);color:#7a5a00}
html body .portal-shell .comm-page-v2 .comm-inline-check input[type=checkbox]{flex:0 0 16px;width:16px!important;height:16px!important;min-width:0;min-height:0!important;margin:0!important;padding:0!important}
html body .portal-shell .comm-page-v2 .comm-composer.dragover{outline:2.5px dashed var(--aqua);outline-offset:-6px;background:var(--water)}

/* tomtilstander */
html body .portal-shell .comm-page-v2 .comm-no-selection{max-width:340px;padding:28px 24px}
html body .portal-shell .comm-page-v2 .comm-no-selection>div{width:176px;height:128px;margin:0 auto 6px;color:transparent;background:url(/assets/ill-office.svg) center/contain no-repeat}
html body .portal-shell .comm-page-v2 .comm-no-selection>div svg{display:none}
html body .portal-shell .comm-page-v2 .comm-no-selection h2{margin:0;font-family:var(--font-display);font-size:1.2rem;font-weight:740;color:var(--navy)}
html body .portal-shell .comm-page-v2 .comm-no-selection p,html body .portal-shell .comm-page-v2 .comm-empty-chat p{margin:6px 0 0;color:var(--muted)}
html body .portal-shell .comm-page-v2 .comm-empty-chat{padding:24px}
html body .portal-shell .comm-page-v2 .comm-empty-chat::before{content:"";display:block;width:160px;height:120px;margin:0 auto 6px;background:url(/assets/ill-window.svg) center/contain no-repeat}
html body .portal-shell .comm-page-v2 .comm-empty-chat strong{font-family:var(--font-display);font-size:1.15rem;font-weight:740;color:var(--navy)}

/* infokolonne: deltakere, møter, oppgaver, koblinger, sak */
html body .portal-shell .comm-page-v2 .comm-info{padding:14px 12px;scrollbar-color:#b3d6e3 transparent}
html body .portal-shell .comm-page-v2 .comm-info-block{margin:0 0 12px;padding:14px 14px 10px;border:1px solid var(--rule);border-radius:24px;background:#fff;box-shadow:0 14px 28px -24px rgba(10,58,92,.5)}
html body .portal-shell .comm-page-v2 .comm-info-block:last-child{margin-bottom:0;border-bottom:1px solid var(--rule)}
html body .portal-shell .comm-page-v2 .comm-info-block:has(h3){background:var(--lemon);border-color:#f3dc84;padding-bottom:16px}
html body .portal-shell .comm-page-v2 .comm-info-block .eyebrow{display:block;margin:0 0 4px;color:var(--navy-2);font-size:.66rem;font-weight:800;letter-spacing:.14em;text-transform:uppercase}
html body .portal-shell .comm-page-v2 .comm-info-heading{margin-bottom:8px}
html body .portal-shell .comm-page-v2 .comm-info-heading .eyebrow{margin:0}
html body .portal-shell .comm-page-v2 .comm-info-block h3{margin:4px 0 6px;font-family:var(--font-display);font-size:1.02rem;font-weight:730;color:var(--navy)}
html body .portal-shell .comm-page-v2 .comm-info-block p{margin:0;color:var(--muted)}
html body .portal-shell .comm-page-v2 .comm-person>span{width:36px;height:36px;flex-basis:36px;border-radius:50%;background:var(--water);color:var(--navy);font-family:var(--font-display);font-weight:760}
html body .portal-shell .comm-page-v2 .comm-person strong{color:var(--navy);font-weight:740}
html body .portal-shell .comm-page-v2 .comm-person small{color:var(--muted)}
html body .portal-shell .comm-page-v2 .comm-side-item{margin:0 0 8px;border:1px solid var(--rule);border-radius:18px;background:var(--paper);transition:background .25s,border-color .25s}
html body .portal-shell .comm-page-v2 .comm-side-item:hover{border-color:#a9dcea;background:var(--water);color:var(--navy)}
html body .portal-shell .comm-page-v2 .comm-side-main{gap:8px;padding:8px 10px}
html body .portal-shell .comm-page-v2 .comm-side-main>span{display:grid;place-items:center;flex:0 0 32px;width:32px;height:32px;border-radius:50%;background:var(--water);font-size:15px}
html body .portal-shell .comm-page-v2 .comm-side-main>div{display:grid;gap:2px;min-width:0}
html body .portal-shell .comm-page-v2 .comm-side-main strong{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;color:var(--navy);font-size:.82rem;font-weight:740;line-height:1.25;white-space:normal;overflow-wrap:anywhere}
html body .portal-shell .comm-page-v2 .comm-side-main small{color:var(--muted);font-size:.72rem}
html body .portal-shell .comm-page-v2 .comm-side-more{flex:0 0 40px;width:40px;border-left:1px solid var(--rule);font-size:15px}
html body .portal-shell .comm-page-v2 .comm-side-more:hover{background:#fff}
html body .portal-shell .comm-page-v2 .comm-task{gap:10px;padding:8px 0;cursor:pointer}
html body .portal-shell .comm-page-v2 .comm-task input[type=checkbox]{flex:0 0 18px;width:18px!important;height:18px!important;min-height:0!important;margin:2px 0 0!important;padding:0!important}
html body .portal-shell .comm-page-v2 .comm-task strong{color:var(--navy);font-size:.84rem;font-weight:720}
html body .portal-shell .comm-page-v2 .comm-task small{color:var(--muted);font-size:.74rem}
html body .portal-shell .comm-page-v2 .comm-task.done strong{color:var(--muted)}
html body .portal-shell .comm-page-v2 .comm-link-item{padding:9px 0;border-bottom:1px solid #e3f0f4}
html body .portal-shell .comm-page-v2 .comm-link-item strong{color:var(--navy);font-size:.84rem}
html body .portal-shell .comm-page-v2 .comm-link-item small{color:var(--muted)}

/* høyreklikkmeny og reaksjonspalett (legges rett i body) */
html body .comm-context-menu{width:244px;padding:8px;border:1px solid var(--rule);border-radius:22px;background:#fff;box-shadow:0 30px 60px -28px rgba(7,46,74,.55)}
html body .comm-context-menu button{min-height:42px;gap:11px;padding:10px 14px;border-radius:14px;color:var(--navy);font-size:.84rem;font-weight:700}
html body .comm-context-menu button:hover,html body .comm-context-menu button:focus-visible{background:var(--water);color:var(--navy);outline:none}
html body .comm-context-menu button.danger{color:#a32920}
html body .comm-context-menu button.danger:hover{background:#ffe3e0;color:#a32920}
html body .comm-context-divider{margin:5px 6px;background:var(--rule)}
html body .comm-context-menu:not(:has(.comm-context-divider)){display:flex;flex-wrap:wrap;gap:4px;width:226px}
html body .comm-context-menu:not(:has(.comm-context-divider)) button{justify-content:center;width:46px;height:46px;min-height:0;padding:0;border-radius:50%;font-size:1.4rem}

/* dialogene: søk, lagret, påminnelser, maler, deltakere, historikk, AI-oppsummering */
html body .modal .comm-search-modal{gap:14px}
html body .modal .comm-search-input{height:50px;padding:0 22px;border-radius:999px!important;font-size:.95rem}
html body .modal .comm-search-result{margin:0 0 8px;padding:13px 18px;border:1.5px solid var(--rule);border-radius:20px;background:#fff;transition:background .25s,border-color .25s}
html body .modal .comm-search-result:hover,html body .modal .comm-search-result:focus-visible{border-color:var(--aqua);background:var(--water);outline:none}
html body .modal .comm-search-result strong{color:var(--navy);font-weight:740}
html body .modal .comm-search-result span{color:var(--muted)}
html body .modal .comm-search-result p{color:var(--ink)}
html body .modal .comm-saved-list{gap:10px;scrollbar-color:#b3d6e3 transparent}
html body .modal :is(.comm-reminder-row,.comm-template-list article,.comm-history article){padding:14px 16px;border:1.5px solid var(--rule);border-radius:20px;background:#fff}
html body .modal .comm-reminder-row small,html body .modal .comm-template-list article p{color:var(--muted)}
html body .modal .comm-template-modal{gap:20px}
html body .modal .comm-template-list{scrollbar-color:#b3d6e3 transparent}
html body .modal .comm-history{scrollbar-color:#b3d6e3 transparent}
html body .modal .comm-history-current{padding:14px 16px;border:1.5px solid #bfe3ee;border-radius:20px;background:var(--water)}
html body .modal .comm-history article header time{color:var(--muted)}
html body .modal .comm-members-modal section h3{margin:0 0 6px;font-family:var(--font-display);font-size:1.02rem;font-weight:730;color:var(--navy)}
html body .modal .comm-member-manage{padding:10px 0;border-bottom:1px solid #e3f0f4}
html body .modal .comm-member-manage strong{color:var(--navy);font-size:.86rem}
html body .modal .comm-member-manage small{color:var(--muted);font-size:.74rem}
html body .modal .comm-ai-summary{min-height:0}
html body .modal .comm-summary-text{padding:18px 20px;border:1.5px solid var(--rule);border-radius:22px;background:var(--paper);color:var(--ink)}
html body .modal .comm-meeting-form .check,html body .modal .comm-settings-form .check,html body .modal .comm-poll-form .check{color:var(--ink)}

/* videomøte */
html body .modal .comm-call-status{gap:10px;color:var(--navy)}
html body .modal .comm-call-status .status-dot{width:10px;height:10px;border-radius:50%;background:#1fb98a!important;box-shadow:0 0 0 4px rgba(31,185,138,.25)}
html body .modal .comm-video-grid{gap:12px;padding:12px;border-radius:26px;background:var(--navy)}
html body .modal .comm-video-card{border-radius:20px;background:var(--navy-2)}
html body .modal .comm-video-card span{padding:4px 12px;border-radius:999px;background:rgba(7,46,74,.72);font-size:.74rem;font-weight:700}
html body .modal .comm-call-controls{gap:8px}
html body .modal .comm-call-btn{padding:11px 18px;border:1.5px solid var(--rule);border-radius:999px;background:#fff;color:var(--navy);font-size:.82rem;font-weight:700;transition:background .25s,border-color .25s}
html body .modal .comm-call-btn:hover{border-color:var(--aqua);background:var(--water)}
html body .modal .comm-call-btn.off{border-color:#f3dc84;background:var(--lemon);color:#7a5a00}
html body .modal .comm-call-btn.active{border-color:#9fe2c4;background:var(--mint);color:#0a6b49}
html body .modal .comm-call-btn.danger{border-color:#c0392b!important;background:#c0392b!important;color:#fff!important}
html body .modal .comm-call-btn:focus-visible{outline:3px solid rgba(24,183,212,.55);outline-offset:2px}

/* ny samtale: personvelger */
html body .modal .comm-people-picker{gap:8px;max-height:min(320px,40vh);padding:2px;scrollbar-color:#b3d6e3 transparent}
@media(max-width:700px){html body .modal .comm-people-picker{max-height:min(320px,28dvh)}}
html body .modal .comm-person-choice{display:flex;align-items:center;gap:12px;margin:0;padding:11px 14px;border:1.5px solid var(--rule);border-radius:18px;background:#fff;cursor:pointer;transition:background .25s,border-color .25s}
html body .modal .comm-person-choice:hover{background:var(--paper);border-color:#a9dcea}
html body .modal .comm-person-choice:has(input:checked){background:var(--water);border-color:var(--aqua)}
html body .modal .comm-person-choice:focus-within{box-shadow:0 0 0 4px rgba(24,183,212,.22)}
html body .modal .comm-person-choice input[type=checkbox]{flex:0 0 20px;width:20px!important;height:20px!important;min-height:0!important;margin:0!important;padding:0!important;accent-color:var(--teal)}
html body .modal .comm-person-choice>span{display:grid;gap:2px;min-width:0;text-align:left}
html body .modal .comm-person-choice strong{color:var(--navy);font-size:.9rem;font-weight:740;text-align:left}
html body .modal .comm-person-choice small{color:var(--muted);font-size:.76rem;text-align:left;text-transform:capitalize}

/* smalere sider: to rader (stablet) under 700 px sidebredde */
@container comm (max-width:699px){
  html body .portal-shell .comm-page-v2 .comm-toolbar{min-height:0;padding:20px 18px 36px!important;border-radius:24px}
  html body .portal-shell .comm-page-v2 .comm-toolbar h1{font-size:1.75rem!important}
  html body .portal-shell .comm-page-v2 .comm-toolbar p{display:block;font-size:.88rem!important}
  html body .portal-shell .comm-page-v2 .comm-toolbar-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%}
  html body .portal-shell .comm-page-v2 .comm-toolbar-actions .btn{width:100%;padding-inline:12px;font-size:.86rem}
  html body .portal-shell .comm-page-v2 .comm-toolbar-actions .btn-ghost{display:inline-flex}
  html body .portal-shell .comm-page-v2 .comm-filter-tabs{width:100%;margin:0}
  html body .portal-shell .comm-page-v2 .comm-filter-tabs button{padding:8px 13px}
  html body .portal-shell .comm-page-v2 .comm-workspace{display:block;height:auto;min-height:0;border:1px solid var(--rule);border-radius:24px}
  html body .portal-shell .comm-page-v2 .comm-conversations{max-height:300px;border-right:0;border-bottom:1px solid var(--rule)}
  html body .portal-shell .comm-page-v2 .comm-chat{height:clamp(480px,78dvh,720px)}
  html body .portal-shell .comm-page-v2 .comm-chat-head{position:static;padding:12px 16px}
  html body .portal-shell .comm-page-v2 .comm-head-btn{width:38px;height:38px}
  html body .portal-shell .comm-page-v2 .comm-message-stream{padding:18px 14px 8px}
  html body .portal-shell .comm-page-v2 .comm-message-avatar{width:30px;height:30px;flex-basis:30px;font-size:.62rem}
  html body .portal-shell .comm-page-v2 .comm-message-wrap{max-width:92%}
  html body .portal-shell .comm-page-v2 .comm-message-bubble{padding:10px 14px 11px}
  html body .portal-shell .comm-page-v2 .comm-attachments{grid-template-columns:minmax(0,1fr)}
  html body .portal-shell .comm-page-v2 .comm-composer-v2{position:static;padding:10px 12px!important}
  html body .portal-shell .comm-page-v2 .comm-attach-trigger,html body .portal-shell .comm-page-v2 .comm-tool-btn{width:36px;height:36px}
  html body .portal-shell .comm-page-v2 .comm-priority-select{height:36px;min-width:92px}
  html body .portal-shell .comm-page-v2 .comm-inline-check{height:36px;padding:0 12px 0 9px;font-size:.74rem}
}
@media(max-width:760px){
  html body .portal-shell .comm-page-v2 .comm-toolbar-actions :is([data-comm-saved],[data-comm-reminders]){padding-inline:12px;font-size:.86rem}
  html body .portal-shell .comm-page-v2 .comm-toolbar-actions :is([data-comm-saved],[data-comm-reminders])::first-letter{font-size:inherit}
}
@media(max-width:620px){
  html body .portal-shell .comm-page-v2{margin:0}
  html body .portal-shell .comm-page-v2 .comm-toolbar{padding-left:18px;padding-right:18px}
  html body .portal-shell .comm-page-v2 .comm-workspace{border-left:1px solid var(--rule);border-right:1px solid var(--rule);border-radius:24px}
}

/* ---------- e-post på nettbrett (721–1100 px) ----------
   Den nye portal-theme.css mangler den responsive e-postblokken, og eldre regler stablet leseruten oppå listen.
   Her holdes de tre rutene (mapper, liste, leser) side om side, med scroll inni hver rute. */
@media(min-width:721px) and (max-width:1100px){
  html body:has(.portal-shell[data-page="mail"]){overflow:hidden!important}
  html body .portal-shell[data-page="mail"]>.main>.content{position:fixed!important;top:var(--renovia-topbar-h,72px)!important;left:0!important;right:0!important;bottom:0!important;width:auto!important;max-width:none!important;height:auto!important;min-height:0!important;margin:0!important;padding:8px!important;box-sizing:border-box!important;overflow:hidden!important}
  html body .portal-shell[data-page="mail"]>.main>.content>.mail-pro{width:100%!important;height:100%!important;min-width:0!important;min-height:0!important;margin:0!important}
  html body .portal-shell[data-page="mail"] .mail-pro-shell{display:grid!important;width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;min-height:0!important;margin:0!important;grid-template-columns:clamp(168px,20vw,200px) clamp(250px,33vw,340px) minmax(0,1fr)!important;border-radius:24px!important}
  html body .portal-shell[data-page="mail"] .mail-pro.focus-reader .mail-pro-shell{grid-template-columns:clamp(168px,20vw,200px) minmax(0,1fr)!important}
  html body .portal-shell[data-page="mail"] .mail-pro-sidebar,html body .portal-shell[data-page="mail"] .mail-pro-list{min-width:0!important;min-height:0!important}
  html body .portal-shell[data-page="mail"] .mail-pro-reader{grid-column:auto!important;min-width:0!important;min-height:0!important;border-top:0!important;overflow:auto!important}
  html body .portal-shell[data-page="mail"] .mail-pro-reader-head{padding-left:18px!important;padding-right:18px!important}
  html body .portal-shell[data-page="mail"] .mail-pro-reader-body{padding-left:16px!important;padding-right:16px!important}
}

/* ---------- e-post på mobil: leseren ---------- */
/* «backdrop-filter» på verktøylinjen gjorde at svar-/videresend-feltet (position:fixed) ble festet til
   verktøylinjen i stedet for bunnen av skjermen, og la seg oppå tilbake-knappen. */
@media(max-width:720px){
  html body .portal-shell[data-page="mail"] .mail-pro-reader-toolbar{backdrop-filter:none!important;-webkit-backdrop-filter:none!important;background:#fff!important}
  html body .portal-shell[data-page="mail"] .mail-pro.mobile-reader-open .mail-pro-reader-card{padding-bottom:calc(88px + env(safe-area-inset-bottom))!important}
}

/* ---------- smal skjerm ---------- */
/* nettbrett (901–1100 px): sidemenyen er skjult bak menyknappen, så innholdet skal bruke hele bredden
   (eldre regel senere i portal-theme.css holdt igjen 268 px tom plass til venstre) */
@media(max-width:1100px){
  html body .portal-shell>.main{margin-left:0!important}
  html body .portal-shell>.main>.topbar{left:0!important}
}
@media(max-width:900px){
  html body .portal-shell>.sidebar{box-shadow:none!important}
  html body .portal-shell>.sidebar.open{box-shadow:18px 0 55px rgba(2,24,34,.35)!important}
}
@media(max-width:620px){
  html body .portal-shell .stat-card{grid-template-columns:minmax(0,1fr)!important;padding:16px 16px 14px!important;min-height:108px!important;border-radius:22px!important}
  html body .portal-shell .stat-card .stat-icon,html body .portal-shell .stat-card .portal-kpi-card .stat-icon{position:absolute;top:12px;right:12px;width:34px!important;height:34px!important}
  html body .portal-shell .stat-card .stat-icon svg{width:16px!important;height:16px!important}
  html body .portal-shell .stat-card .label{padding-right:40px}
  html body .portal-shell .stat-card .value{font-size:1.6rem!important;white-space:normal;overflow-wrap:anywhere}
  html body .portal-shell .portal-date-value{font-size:1.15rem!important;white-space:normal!important}
  html body .portal-shell .portal-kpi-card::before{width:90px!important;height:90px!important;inset:auto -22px -30px auto!important}
  html body .portal-shell .page-title-row{padding:22px 20px 38px!important;min-height:0}
}
@media(max-width:900px){
  html body .portal-shell .page-title-row{border-radius:24px;margin-bottom:20px!important}
  html body .portal-choice-box{grid-template-columns:1fr}
  html body .portal-choice-card{min-height:128px}
}
@media(max-width:560px){
  html body .portal-shell .stat-card .value{font-size:2rem!important}
  html body .portal-choice-card{padding-right:120px!important}
  html body .portal-choice-card::after{width:104px;height:84px}
}

/* ---------- redusert bevegelse ---------- */
@media(prefers-reduced-motion:reduce){
  html body .portal-shell>.sidebar::before,html body .portal-shell .page-title-row::before,html body .portal-shell .comm-toolbar::before,html body .portal-security .security-hero::before,
  html body .login-page .login-visual::before,html body .login-page .login-form-wrap::before,html body .portal-choice-page::before{animation:none!important}
}
