/* ───────────── Portals, notifications, review inbox, team & sign-in extras (both themes) ───────────── */

/* sign-in extras */
.okbox { background: var(--ok-soft); color: var(--ok); border-radius: 12px; padding: 10px 14px; margin: 12px 0; font-size: 13.5px; font-weight: 550; animation: fadeUp .4s both; }
.authlinks { display: flex; gap: 10px; justify-content: space-between; margin-top: 4px; font-size: 13px; }
.authlinks a { color: var(--brand); font-weight: 600; text-decoration: none; } .authlinks a:hover { text-decoration: underline; }
.pwwrap { position: relative; display: block; }
.pwwrap input { width: 100%; padding-right: 42px; }
.eye { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); width: 32px; min-height: 30px; padding: 0; background: transparent; color: var(--mut); border: 0; box-shadow: none; }
.eye:hover:not(:disabled) { background: var(--surface2); color: var(--brand); transform: translateY(-50%); box-shadow: none; }
.eye svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.meter { height: 6px; border-radius: 9px; background: var(--line); position: relative; margin: -4px 0 14px; }
.meter i { display: block; height: 100%; border-radius: 9px; transition: width .35s, background .35s; background: var(--bad); }
.meter i.s2 { background: var(--warn); } .meter i.s3 { background: #65a30d; } .meter i.s4 { background: var(--ok); }
.meter span { position: absolute; right: 0; top: 9px; font-size: 11.5px; color: var(--mut); }
.demogrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 8px; margin-top: 8px; }
.demogrid button { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; text-align: left; padding: 8px 12px; margin: 0; }
.demogrid button span { font-size: 11.5px; color: var(--mut); font-weight: 500; }

/* header tools + bell */
.headtools { display: flex; align-items: center; gap: 14px; }
.bellbtn { position: relative; color: var(--mut); background: var(--surface); border: 1px solid var(--line); width: 40px; min-height: 40px; border-radius: 12px; box-shadow: var(--shadow); }
.bellbtn:hover:not(:disabled) { color: var(--brand); border-color: var(--brand-glow); background: var(--surface); }
.bellbtn svg { width: 19px; height: 19px; }
.bellbtn.ring svg { animation: ring 2.6s ease-in-out infinite; transform-origin: 50% 0; }
@keyframes ring { 0%, 70%, 100% { transform: rotate(0); } 74% { transform: rotate(14deg); } 80% { transform: rotate(-12deg); } 86% { transform: rotate(8deg); } 92% { transform: rotate(-5deg); } }
.bellc { position: absolute; top: -6px; right: -6px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 99px; background: var(--bad); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; box-shadow: 0 0 0 3px var(--bg); }
.bellc[hidden], .navcount[hidden] { display: none; }
.navcount { margin-left: auto; font-style: normal; font-size: 11px; font-weight: 700; background: var(--warn); color: #fff; border-radius: 99px; padding: 1px 7px; animation: pop .3s both; }
#notepanel { position: fixed; top: 74px; right: 22px; width: min(400px, calc(100vw - 24px)); max-height: min(72vh, 560px); z-index: 60; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line2); border-radius: 18px; box-shadow: var(--shadow-lg); animation: pop .2s cubic-bezier(.2, .9, .3, 1.1) both; overflow: hidden; }
.nphead { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.nplist { overflow: auto; }
.npitem { display: flex; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); cursor: pointer; text-decoration: none; color: var(--ink); transition: background .15s; }
.npitem:hover { background: var(--surface2); } .npitem:last-child { border-bottom: 0; }
.npdot { flex: none; width: 9px; height: 9px; border-radius: 50%; margin-top: 6px; background: transparent; }
.npitem.unread .npdot { background: var(--brand-glow); box-shadow: 0 0 0 4px var(--brand-soft); } .npitem.unread b { color: var(--ink); } .npitem:not(.unread) { opacity: .72; }
.npitem .mut { font-size: 12.5px; margin-top: 2px; } .npitem small { color: var(--mut); font-size: 11.5px; }

/* home strips */
.reviewstrip { background: linear-gradient(135deg, var(--brand-soft), var(--surface) 55%); border-color: var(--brand-glow); animation: fadeUp .5s both; }
.reviewstrip h3 svg, .welcome h3 svg, h3 svg { width: 19px; height: 19px; vertical-align: -4px; stroke: var(--brand); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; margin-right: 4px; }
.donecards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 10px; margin-top: 12px; }
.donecard { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; text-decoration: none; color: var(--ink); transition: transform .2s, box-shadow .2s, border-color .2s; }
.donecard:hover { transform: translateY(-3px); border-color: var(--brand-glow); box-shadow: var(--shadow); }
.donecard .dc { flex: 1; min-width: 0; display: flex; flex-direction: column; } .donecard .dc span { font-size: 12.5px; color: var(--mut); } .donecard .dc small { font-size: 11.5px; color: var(--mut); }
.donecard em { font-style: normal; font-weight: 650; font-size: 12.5px; color: var(--brand); white-space: nowrap; }
.mini { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.minichip { background: var(--surface); border: 1px solid var(--line); border-radius: 99px; padding: 5px 14px; font-size: 13px; color: var(--mut); } .minichip b { color: var(--ink); font-size: 15px; }
.minichip.returned b { color: var(--bad); } .minichip.submitted b { color: var(--warn); } .minichip.merged b { color: var(--ok); }
.avatar.big { width: 48px; height: 48px; font-size: 16px; } .avatar.sm { width: 30px; height: 30px; font-size: 11px; }

/* My Work */
.sechead { margin: 22px 0 10px; font-size: 14px; letter-spacing: .02em; text-transform: uppercase; color: var(--mut); }
.sechead .count { background: var(--surface2); border: 1px solid var(--line); border-radius: 99px; padding: 0 9px; font-size: 12px; margin-left: 6px; color: var(--ink); }
.workcard { border-left: 4px solid var(--info); animation: fadeUp .45s both; }
.workcard.returned { border-left-color: var(--bad); } .workcard.submitted { border-left-color: var(--warn); } .workcard.merged { border-left-color: var(--ok); }
.workcard.deleted, .workcard.reversed { border-left-color: var(--line2); opacity: .8; }
.notice { background: var(--surface2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin: 10px 0; font-size: 13.5px; }
.notice.warn { background: var(--warn-soft); border-color: transparent; color: var(--ink); }
.notice small { color: var(--mut); }
.vtable .sumrow td { font-weight: 700; border-top: 2px solid var(--line2); }
.nw { white-space: nowrap; }
button svg { width: 15px; height: 15px; vertical-align: -3px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; margin-right: 4px; }
button.danger { color: var(--bad); border-color: var(--bad-soft); } button.danger:hover:not(:disabled) { background: var(--bad-soft) !important; color: var(--bad) !important; border-color: var(--bad) !important; }

/* Review inbox */
.inbox { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.inrow { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); text-decoration: none; color: var(--ink); transition: transform .2s, border-color .2s, box-shadow .2s; animation: fadeUp .4s both; }
.inrow:hover { transform: translateX(4px); border-color: var(--brand-glow); box-shadow: var(--shadow); }
.inrow .who { flex: 1; display: flex; flex-direction: column; min-width: 0; } .inrow .who span { font-size: 13px; color: var(--mut); } .inrow .when { font-size: 12.5px; white-space: nowrap; }
.inrow em { font-style: normal; color: var(--brand); font-weight: 650; font-size: 13px; }
.who2 { display: flex; align-items: center; gap: 14px; }
.thread { display: flex; flex-direction: column; gap: 10px; max-height: 420px; overflow: auto; padding-right: 4px; }
.msg { display: flex; gap: 10px; align-items: flex-start; }
.msg .bub { background: var(--surface2); border: 1px solid var(--line); border-radius: 4px 14px 14px 14px; padding: 8px 13px; max-width: min(620px, 100%); font-size: 13.5px; }
.msg.me { flex-direction: row-reverse; } .msg.me .bub { background: var(--brand-soft); border-color: transparent; border-radius: 14px 4px 14px 14px; }
.msg.event .bub { background: transparent; border-style: dashed; color: var(--mut); }
.msg .bub small { color: var(--mut); margin-left: 6px; font-size: 11.5px; } .msg .evt { font-size: 11.5px; font-weight: 700; color: var(--brand); text-transform: uppercase; letter-spacing: .04em; }

/* Team */
.rolepill { display: inline-flex; align-items: center; padding: 2px 11px; border-radius: 99px; font-size: 12px; font-weight: 650; background: var(--surface2); color: var(--mut); }
.rolepill.violet { background: var(--violet-soft); color: var(--violet); } .rolepill.info { background: var(--info-soft); color: var(--info); } .rolepill.warn { background: var(--warn-soft); color: var(--warn); } .rolepill.ok { background: var(--ok-soft); color: var(--ok); }
.addgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px 16px; align-items: start; }
.addgrid label, .accessform label.f { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; font-weight: 600; color: var(--mut); }
.addgrid .posinfo, .addgrid .projpick, .addgrid .tmp, .addgrid .actions { grid-column: 1 / -1; }
.posinfo { background: var(--surface2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; font-size: 13px; }
.privchips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; } .pc { font-size: 11.5px; background: var(--surface); border: 1px solid var(--line); border-radius: 99px; padding: 1px 9px; color: var(--mut); }
.chks { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 6px; } .chks.col { flex-direction: column; flex-wrap: nowrap; }
.chk { display: flex; flex-direction: row !important; align-items: center; gap: 7px !important; font-size: 13px !important; font-weight: 500 !important; color: var(--ink) !important; cursor: pointer; }
.chk.extra { opacity: .85; }
.tmp summary { cursor: pointer; color: var(--brand); font-weight: 600; font-size: 13px; } .tmp label { margin-top: 8px; max-width: 320px; }
.people { display: flex; flex-direction: column; gap: 10px; }
.person { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); animation: fadeUp .4s both; transition: border-color .2s, box-shadow .2s; }
.person:hover { border-color: var(--brand-glow); box-shadow: var(--shadow); } .person.pending { border-style: dashed; }
.pmain { flex: 1 1 220px; display: flex; flex-direction: column; min-width: 0; } .ptags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 5px; }
.pproj { flex: 1 1 160px; display: flex; flex-wrap: wrap; } .pact { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.matrix { font-size: 12.5px; } .matrix th.pos { text-align: center; min-width: 92px; font-size: 12px; } .matrix td.c { text-align: center; }
.matrix tr.grp td { background: var(--surface2); font-weight: 700; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--mut); }
.matrix .yes { font-style: normal; color: var(--ok); font-weight: 800; } .matrix .no { font-style: normal; color: var(--line2); }
.accessform { min-width: min(640px, 86vw); } .accessgrid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; margin-top: 12px; } .accessgrid .chk { margin: 3px 0; }
@media (max-width: 720px) { .accessgrid { grid-template-columns: 1fr; } #notepanel { top: 64px; right: 12px; } .headtools #who { display: none; } }
.linkbox { display: flex; gap: 8px; } .linkbox input { flex: 1; font-family: ui-monospace, monospace; font-size: 12.5px; }

@media (prefers-reduced-motion: reduce) { .bellbtn.ring svg, .inrow, .person, .workcard, .reviewstrip { animation: none; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.chk input { flex: none; width: 18px; }
.acctbox { border: 1px solid var(--line2); border-radius: 12px; margin: 14px 0 0; padding: 10px 14px 12px; } .acctbox legend { font-weight: 700; font-size: 12.5px; padding: 0 6px; }
input[type="checkbox"]:checked:disabled { background: var(--brand) !important; border-color: var(--brand) !important; opacity: .55; }
.wgone { display: none !important; } .welcomecard { font-size: 15px; background: linear-gradient(135deg, var(--brand-soft), var(--surface)); border-color: var(--brand-glow); animation: fadeUp .4s both; } .logo.img { background: var(--surface); padding: 3px; overflow: hidden; } .logo img { width: 100%; height: 100%; object-fit: contain; border-radius: inherit; display: block; }
.supportbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: linear-gradient(90deg, #4c1d95, #7c3aed); color: #fff; padding: 9px 16px; border-radius: 12px; margin-bottom: 12px; font-size: 13px; } .supportbar svg { width: 17px; height: 17px; stroke: #fff; fill: none; stroke-width: 1.8; } .supportbar span { flex: 1; } .supportbar button { background: rgba(255,255,255,.18); box-shadow: none; min-height: 30px; } .supportbar button:hover:not(:disabled) { background: rgba(255,255,255,.3) !important; }
.maint { background: var(--warn); color: #fff; text-align: center; padding: 8px 14px; font-weight: 600; font-size: 13.5px; position: relative; z-index: 5; } .authcard .two { display: grid; grid-template-columns: 1fr 2fr; gap: 12px; }

/* ── branding editor + portal designer (used in workspaces, the Super Portal and dialogs) ── */
.brandgrid { display: grid; grid-template-columns: minmax(280px, 1.1fr) minmax(260px, 1fr); gap: 26px; align-items: start; }
.brandform { display: flex; flex-direction: column; gap: 14px; } .brandform label.f, .brandform .f { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; font-weight: 600; color: var(--mut); }
.brandform .two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.colorin { display: flex; align-items: center; gap: 10px; } .colorin input[type=color] { width: 52px; height: 38px; padding: 2px; border-radius: 10px; cursor: pointer; background: var(--surface); } .colorin code { font-size: 12.5px; color: var(--ink); }
.logorow { display: flex; align-items: center; gap: 14px; } .logoprev { width: 64px; height: 64px; border-radius: 16px; border: 1.5px dashed var(--line2); display: grid; place-items: center; overflow: hidden; background: var(--surface2); }
.logoprev img { width: 100%; height: 100%; object-fit: contain; padding: 5px; } .logoprev svg { width: 28px; height: 28px; stroke: var(--mut); fill: none; stroke-width: 1.6; }
.pv { --pb: #0f766e; --pa: #6366f1; display: grid; grid-template-columns: 38% 1fr; border: 1px solid var(--line2); border-radius: 16px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow); min-height: 190px; }
.pvside { background: var(--surface2); padding: 12px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; } .pvbrand { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; } .pvbrand b { display: block; font-size: 11.5px; line-height: 1.1; } .pvbrand small { font-size: 9.5px; color: var(--mut); }
.pvlogo { flex: none; width: 28px; height: 28px; border-radius: 9px; background: var(--pb); display: grid; place-items: center; overflow: hidden; } .pvlogo svg { width: 15px; height: 15px; stroke: var(--pon); fill: none; stroke-width: 2; } .pvlogo img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.pvnav { height: 18px; border-radius: 7px; background: var(--line); } .pvnav.on { background: var(--pb); opacity: .9; }
.pvmain { padding: 12px; display: flex; flex-direction: column; gap: 10px; } .pvhead { height: 12px; width: 55%; border-radius: 6px; background: var(--line2); } .pvcards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; } .pvcards span { height: 44px; border-radius: 10px; background: var(--line); opacity: .95; }
.pvbtn { align-self: flex-start; background: var(--pb) !important; color: var(--pon) !important; min-height: 28px !important; padding: 3px 12px !important; font-size: 11.5px !important; box-shadow: none !important; pointer-events: none; }
.designer { display: grid; grid-template-columns: 230px 1fr; gap: 22px; margin-top: 14px; } .dpos { display: flex; flex-direction: column; gap: 6px; }
.dp { display: flex; flex-direction: column; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; background: var(--surface); transition: border-color .2s, transform .2s, background .2s; } .dp span { font-size: 11.5px; color: var(--mut); } .dp:hover { border-color: var(--brand-glow); transform: translateX(3px); }
.dp.on { background: var(--brand-soft); border-color: var(--brand); } .dp.on b { color: var(--brand-ink); }
.dgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 22px; margin-top: 16px; } .dedit .top { align-items: flex-start; }
.menuprev { margin-top: 8px; background: var(--surface2); border: 1px solid var(--line); border-radius: 14px; padding: 8px; display: flex; flex-direction: column; gap: 2px; max-height: 330px; overflow: auto; }
.mi { display: flex; align-items: center; gap: 9px; padding: 6px 10px; border-radius: 9px; font-size: 13px; } .mi svg { width: 15px; height: 15px; stroke: var(--mut); fill: none; stroke-width: 1.8; } .mi.land { background: var(--brand-soft); font-weight: 650; } .mi em { margin-left: auto; font-style: normal; font-size: 10.5px; color: var(--brand-ink); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
@media (max-width: 800px) { .brandgrid, .designer { grid-template-columns: 1fr; } }
.cred { border: 1px solid var(--line2); border-radius: 12px; padding: 10px 14px 12px; grid-column: 1 / -1; display: flex; flex-direction: column; gap: 8px; } .cred legend { font-weight: 700; font-size: 12.5px; padding: 0 6px; } .cred .f { max-width: 340px; }
