/* Institute portal: sign-up / sign-in pages (.inst-auth, inside the site layout)
   and the portal itself (.ip-*, its own layout). Brand: #015caa blue, #17a43b green. */

:root {
    --ip-blue: #015caa;
    --ip-blue-dark: #024a87;
    --ip-green: #17a43b;
    --ip-amber: #d97706;
    --ip-red: #dc2626;
    --ip-ink: #0f172a;
    --ip-text: #334155;
    --ip-muted: #64748b;
    --ip-line: #e2e8f0;
    --ip-soft: #f1f5f9;
    --ip-bg: #f6f8fb;
    --ip-card: #ffffff;
    --ip-radius: 12px;
}

/* ---------------------------------------------------------------- auth pages */
.inst-auth { background: var(--ip-bg); padding: 48px 16px 64px; font-family: 'Inter', 'Roboto', sans-serif; }
.inst-auth-wrap { max-width: 1040px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1.25fr; gap: 0;
    background: var(--ip-card); border-radius: 18px; overflow: hidden; box-shadow: 0 20px 50px -24px rgba(15, 23, 42, .25); }
.inst-auth-wrap.is-narrow { max-width: 860px; grid-template-columns: 1fr 1fr; }
.inst-auth-side { background: linear-gradient(150deg, var(--ip-blue) 0%, var(--ip-blue-dark) 100%); color: #fff; padding: 40px 34px; }
/* sign-in page: heading level with the form's heading (same top padding), picture centred in the space below */
.inst-auth-side.is-compact { display: flex; flex-direction: column; padding-top: 36px; }
.inst-auth-side.is-compact h1 { margin-top: 0; }
.inst-auth-side.is-compact .inst-auth-art { margin: auto; }
.inst-auth-side h1 { font-size: 26px; line-height: 1.25; margin: 0 0 12px; color: #fff; font-weight: 700; }
.inst-auth-side p { color: rgba(255, 255, 255, .85); font-size: 15px; line-height: 1.6; margin: 0 0 22px; }
.inst-auth-art { display: block; width: 100%; height: auto; max-width: 420px; margin: 4px auto 24px; }
.inst-auth-side ul { list-style: none; padding: 0; margin: 0; }
.inst-auth-side > ul > li { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 16px; font-size: 14.5px; line-height: 1.5; color: rgba(255, 255, 255, .92); }
.inst-auth-side > ul > li .fa { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 8px; background: rgba(255, 255, 255, .15);
    display: inline-flex; align-items: center; justify-content: center; font-size: 14px; }
/* "How it works": numbered steps joined by a line */
.inst-steps { margin-top: 28px; padding: 20px 18px 6px; border-radius: 14px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); }
.inst-steps-title { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #bfdbfe; margin-bottom: 16px; }
.inst-steps ol { list-style: none; margin: 0; padding: 0; }
.inst-steps li { position: relative; display: flex; gap: 14px; padding-bottom: 18px; margin: 0; font-size: 14px; }
.inst-steps li::before { content: ''; position: absolute; left: 15px; top: 32px; bottom: 2px; width: 2px; background: rgba(255, 255, 255, .25); }
.inst-steps li.is-last { padding-bottom: 14px; }
.inst-steps li.is-last::before { display: none; }
.inst-step-num { flex: 0 0 32px; width: 32px; height: 32px; border-radius: 50%; background: #fff; color: var(--ip-blue);
    display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; position: relative; z-index: 1;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, .12); line-height: 1; }
.inst-steps li.is-last .inst-step-num { background: var(--ip-green); color: #fff; }
.inst-steps li > div > b { display: block; color: #fff; font-size: 14.5px; line-height: 1.3; margin: 5px 0 3px; }
.inst-steps li > div > span { display: block; color: rgba(255, 255, 255, .8); font-size: 13px; line-height: 1.5; }
.inst-steps li > div > em { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; font-style: normal; font-size: 11.5px; font-weight: 600;
    color: #fde68a; background: rgba(0, 0, 0, .15); padding: 2px 9px; border-radius: 999px; }
.inst-auth-main { padding: 36px 38px; }
.inst-auth-main h2 { font-size: 22px; color: var(--ip-ink); margin: 0 0 6px; font-weight: 700; }
.inst-other { display: flex; align-items: center; gap: 12px; margin-top: 22px; padding: 12px 14px; border: 1px dashed #cbd5e1; border-radius: 10px;
    background: #f8fafc; color: var(--ip-text) !important; font-size: 13.5px; line-height: 1.45; text-decoration: none !important; transition: border-color .15s, background .15s; }
.inst-other:hover { border-color: var(--ip-blue); background: #f1f7fd; }
.inst-other > .fa:first-child { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 50%; background: #e7f6ec; color: var(--ip-green);
    display: inline-flex; align-items: center; justify-content: center; font-size: 15px; }
.inst-other > .fa:last-child { margin-left: auto; color: #94a3b8; font-size: 18px; }
.inst-other b { display: block; color: var(--ip-ink); } /* question on its own line, the hint below it */
.inst-auth-main .inst-sub { color: var(--ip-muted); font-size: 14px; margin: 0 0 22px; }
.inst-section-title { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ip-blue);
    margin: 18px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--ip-line); }
.inst-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.inst-field { margin-bottom: 14px; }
.inst-field label { display: block; font-size: 13px; font-weight: 600; color: var(--ip-text); margin-bottom: 5px; }
.inst-field label .req { color: var(--ip-red); }
.inst-field input, .inst-field select, .inst-field textarea, .ip-input {
    width: 100%; height: 42px; padding: 8px 12px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 14px; color: var(--ip-ink);
    background: #fff; box-shadow: none; transition: border-color .15s, box-shadow .15s; }
.inst-field textarea, textarea.ip-input { height: auto; min-height: 110px; line-height: 1.5; }
.inst-field input:focus, .inst-field select:focus, .inst-field textarea:focus, .ip-input:focus {
    outline: none; border-color: var(--ip-blue); box-shadow: 0 0 0 3px rgba(1, 92, 170, .15); }
.inst-field .inst-hint { font-size: 12px; color: var(--ip-muted); margin-top: 4px; }
.inst-check { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--ip-text); margin: 6px 0 16px; }
.inst-check input { margin-top: 3px; }
.inst-honey { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.inst-links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 13.5px; margin-top: 16px; color: var(--ip-muted); }
.inst-links a { color: var(--ip-blue); font-weight: 600; }
.inst-link-btn { background: none; border: 0; padding: 0; color: var(--ip-blue); font-weight: 600; font-size: 13.5px; cursor: pointer; }
.inst-link-btn:hover { text-decoration: underline; }
.inst-code-input { height: 54px !important; font-size: 26px !important; font-weight: 700; letter-spacing: .5em; text-align: center; }

/* ---------------------------------------------------------------- shared bits */
.ip-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 20px; border-radius: 8px;
    border: 1px solid transparent; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none !important; white-space: nowrap;
    transition: background .15s, border-color .15s, color .15s; line-height: 1; }
.ip-btn--primary { background: var(--ip-blue); color: #fff !important; }
.ip-btn--primary:hover { background: var(--ip-blue-dark); }
.ip-btn--green { background: var(--ip-green); color: #fff !important; }
.ip-btn--green:hover { background: #128232; }
.ip-btn--ghost { background: #fff; border-color: #cbd5e1; color: var(--ip-text) !important; }
.ip-btn--ghost:hover { border-color: var(--ip-blue); color: var(--ip-blue) !important; }
.ip-btn--danger { background: #fff; border-color: #fecaca; color: var(--ip-red) !important; }
.ip-btn--danger:hover { background: #fef2f2; }
.ip-btn--sm { height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 6px; }
.ip-btn--block { width: 100%; }
.ip-btn[disabled] { opacity: .55; cursor: not-allowed; }

/* messages: a coloured bar on the left, a stronger tint, the icon in a filled circle (icon and text on one centre line) */
.ip-alert { --a-main: #015caa; border-radius: 12px; padding: 12px 16px 12px 14px; font-size: 14px; line-height: 1.5; margin-bottom: 16px;
    display: flex; gap: 12px; align-items: center; border: 1px solid; border-left-width: 5px; box-shadow: 0 6px 16px -12px var(--a-main); }
.ip-alert > .fa { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    background: var(--a-main); color: #fff; font-size: 14px; margin: 0; box-shadow: 0 3px 8px -3px var(--a-main); }
.ip-alert > div { min-width: 0; flex: 1 1 auto; }
.ip-alert b { color: inherit; }
.ip-alert a { color: inherit; text-decoration: underline; text-underline-offset: 2px; font-weight: 600; }
.ip-alert--ok   { --a-main: #16a34a; background: linear-gradient(135deg, #dcfce7 0%, #f0fdf4 100%); border-color: #86efac; border-left-color: #16a34a; color: #14532d; }
.ip-alert--err  { --a-main: #dc2626; background: linear-gradient(135deg, #fee2e2 0%, #fef2f2 100%); border-color: #fca5a5; border-left-color: #dc2626; color: #7f1d1d; }
.ip-alert--info { --a-main: #015caa; background: linear-gradient(135deg, #dbeafe 0%, #eff6ff 100%); border-color: #93c5fd; border-left-color: #015caa; color: #1e3a8a; }
.ip-alert--warn { --a-main: #f59e0b; background: linear-gradient(135deg, #fef3c7 0%, #fffbeb 100%); border-color: #fcd34d; border-left-color: #f59e0b; color: #78350f; }
.ip-alert form { margin: 8px 0 0; }

/* ---------------------------------------------------------------- portal layout
   Light sidebar (white, thin border), grouped menu with a page finder, institute card at the bottom;
   white top bar with a search and the user menu. Its own look: not the student or admin copy. */
body.ip-body { margin: 0; background: var(--ip-bg); font-family: 'Inter', 'Roboto', Arial, sans-serif; color: var(--ip-text); font-size: 14px; }
.ip-body *, .ip-body *::before, .ip-body *::after { box-sizing: border-box; }
.ip-body a { color: var(--ip-blue); }
.ip-shell { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; }

.ip-side { background: #ffffff; border-right: 1px solid var(--ip-line); padding: 18px 14px 16px; position: sticky; top: 0; height: 100vh;
    display: flex; flex-direction: column; overflow-y: auto; }
.ip-side-head { display: flex; align-items: center; height: 62px; padding: 0 6px 16px; }
.ip-brand { display: flex; align-items: center; gap: 12px; min-width: 0; text-decoration: none !important; }
.ip-brand img { height: 46px; width: auto; display: block; }
.ip-brand .ip-brand-mini { display: none; height: 40px; }
.ip-brand span { padding-left: 12px; border-left: 2px solid var(--ip-line); font-size: 16px; line-height: 1.12; font-weight: 800;
    letter-spacing: .02em; text-transform: uppercase; color: var(--ip-blue); }
.ip-side-edge { display: none; }
@media (min-width: 992px) {
    /* square button with round corners on the sidebar's right edge, level with the brand; slides with the edge */
    .ip-side-edge { --side: 264px; position: fixed; z-index: 40; top: 25px; left: calc(var(--side) - 16px); width: 32px; height: 32px; padding: 0;
        display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; border: 1px solid #cbd5e1; background: #fff;
        color: #475569; box-shadow: 0 2px 6px rgba(15, 23, 42, .12); cursor: pointer; overflow: hidden;
        transition: left .28s cubic-bezier(.4, 0, .2, 1), background .15s, color .15s, border-color .15s, transform .2s; }
    html.ip-collapsed .ip-side-edge { --side: 76px; }
    .ip-side-edge .fa { position: relative; z-index: 1; font-size: 12px; transition: transform .28s; }
    html.ip-collapsed .ip-side-edge .fa { transform: rotate(180deg); }
    .ip-side-edge:hover { background: var(--ip-blue); border-color: var(--ip-blue); color: #fff; transform: scale(1.08); }
    .ip-side-edge:focus-visible { outline: 2px solid var(--ip-blue); outline-offset: 2px; }
    /* pulse + shine on every page load */
    .ip-side-edge::after { content: ''; position: absolute; top: -20%; left: -60%; width: 40%; height: 140%; transform: rotate(25deg);
        background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .95), rgba(255, 255, 255, 0)); opacity: 0; pointer-events: none; }
    .ip-side-edge.is-hint { animation: ipEdgePulse 1.6s ease-out .6s 1 both; }
    .ip-side-edge.is-hint::after { animation: ipEdgeShine 1s ease-in-out .7s 1 both; }
}
@keyframes ipEdgePulse {
    0%   { box-shadow: 0 2px 6px rgba(15, 23, 42, .12), 0 0 0 0 rgba(1, 92, 170, .45); }
    25%  { background: #015caa; color: #fff; border-color: #015caa; }
    60%  { box-shadow: 0 2px 6px rgba(15, 23, 42, .12), 0 0 0 10px rgba(1, 92, 170, 0); background: #015caa; color: #fff; border-color: #015caa; }
    100% { box-shadow: 0 2px 6px rgba(15, 23, 42, .12), 0 0 0 0 rgba(1, 92, 170, 0); }
}
@keyframes ipEdgeShine {
    0%   { left: -60%; opacity: 0; }
    20%  { opacity: 1; }
    100% { left: 130%; opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .ip-side-edge, .ip-side-edge .fa, .ip-side-edge.is-hint, .ip-side-edge.is-hint::after { animation: none; transition: none; } }

/* page finder */
.ip-find { position: relative; display: flex; align-items: center; margin: 0 0 14px; }
.ip-find .fa { position: absolute; left: 12px; color: #94a3b8; font-size: 13px; pointer-events: none; }
.ip-find input { width: 100%; height: 38px; padding: 0 36px 0 34px; border: 1px solid var(--ip-line); border-radius: 10px; background: var(--ip-soft);
    font-size: 13.5px; color: var(--ip-ink); transition: border-color .15s, background .15s, box-shadow .15s; }
.ip-find input:focus { outline: none; background: #fff; border-color: var(--ip-blue); box-shadow: 0 0 0 3px rgba(1, 92, 170, .12); }
.ip-find kbd { position: absolute; right: 9px; font: 600 11px/1 'Inter', Arial, sans-serif; color: #64748b; background: #fff;
    border: 1px solid #cbd5e1; border-bottom-width: 2px; border-radius: 5px; padding: 3px 6px; pointer-events: none; }
.ip-find input:focus ~ kbd, .ip-find input:not(:placeholder-shown) ~ kbd { display: none; }

/* menu */
.ip-nav { flex: 1 1 auto; }
.ip-nav [hidden], .ip-logo-preview [hidden], .ip-logo-actions [hidden] { display: none !important; } /* the finder hides items; display:flex would win otherwise */
.ip-nav-group { margin-bottom: 14px; }
.ip-nav-label { font-size: 10.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: #94a3b8; padding: 0 10px 6px; }
.ip-nav a { position: relative; display: flex; align-items: center; gap: 11px; min-height: 40px; padding: 0 10px; border-radius: 9px;
    color: #475569; text-decoration: none !important; font-weight: 500; margin-bottom: 2px; transition: background .15s, color .15s; }
.ip-nav a .fa { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center;
    font-size: 14px; color: #64748b; background: var(--ip-soft); transition: background .15s, color .15s; }
.ip-nav a span { flex: 1 1 auto; min-width: 0; }
.ip-nav a:hover { background: var(--ip-soft); color: var(--ip-ink); }
.ip-nav a:hover .fa { background: #fff; color: var(--ip-blue); }
.ip-nav a.is-active { background: #eaf2fb; color: var(--ip-blue); font-weight: 600; }
.ip-nav a.is-active .fa { background: var(--ip-blue); color: #fff; }
.ip-nav a.is-active::before { content: ''; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--ip-blue); }
.ip-nav a.is-first { box-shadow: inset 0 0 0 1px var(--ip-blue); }
.ip-badge-count { font-style: normal; font-size: 11px; font-weight: 700; line-height: 1; min-width: 22px; text-align: center;
    padding: 4px 7px; border-radius: 999px; background: #e0ecf8; color: var(--ip-blue); }
.ip-nav-search-all { margin-top: 4px; }
.ip-nav-search-all b { color: var(--ip-ink); }
.ip-nav-empty { margin: 4px 10px 12px; font-size: 13px; color: var(--ip-muted); }

/* institute card + sign out */
.ip-side-foot { margin-top: 2px; padding-top: 10px; border-top: 1px solid var(--ip-line); }
/* the menu still scrolls on a very short window, but without a visible scroll bar */
.ip-side { scrollbar-width: none; }
.ip-side::-webkit-scrollbar { display: none; }
.ip-org-card { display: flex; align-items: center; gap: 11px; padding: 10px; border-radius: 12px; background: var(--ip-soft); margin-bottom: 10px;
    text-decoration: none !important; border: 1px solid transparent; transition: border-color .15s; }
.ip-org-card:hover { border-color: var(--ip-line); }
.ip-org-logo { width: 42px; height: 42px; flex: 0 0 42px; border-radius: 10px; background: #fff; border: 1px solid var(--ip-line);
    display: inline-flex; align-items: center; justify-content: center; overflow: hidden; }
.ip-org-logo img { max-width: 36px; max-height: 36px; object-fit: contain; display: block; }
.ip-org-logo--sm { width: 34px; height: 34px; flex-basis: 34px; border-radius: 50%; }
.ip-org-logo--sm img { max-width: 26px; max-height: 26px; }
.ip-org-card > div { min-width: 0; }
.ip-org-card b { display: block; font-size: 13.5px; line-height: 1.3; color: var(--ip-ink); }
.ip-org-card small { display: block; font-size: 12px; color: var(--ip-muted); margin-top: 2px; }
.ip-avatar { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(150deg, var(--ip-blue) 0%, var(--ip-blue-dark) 100%); color: #fff; font-size: 13px; font-weight: 700; letter-spacing: .02em; }
.ip-avatar--sm { width: 34px; height: 34px; flex-basis: 34px; border-radius: 50%; font-size: 12px; }
.ip-signout { width: 100%; height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--ip-line);
    border-radius: 9px; background: #fff; color: #b91c1c; font-size: 13px; font-weight: 600; cursor: pointer; transition: background .15s, border-color .15s; }
.ip-signout:hover { background: #fef2f2; border-color: #fecaca; }

/* top bar */
.ip-main { min-width: 0; }
.ip-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px; min-height: 66px; padding: 10px 28px;
    background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--ip-line); }
.ip-top-title { flex: 1 1 auto; min-width: 0; }
.ip-top h1 { font-size: 19px; margin: 0; color: var(--ip-ink); font-weight: 700; line-height: 1.3; }
.ip-top-search { position: relative; display: flex; align-items: center; width: 330px; max-width: 40%; margin: 0; }
.ip-top-search .fa { position: absolute; left: 13px; color: #94a3b8; font-size: 13px; pointer-events: none; }
.ip-top-search input { width: 100%; height: 40px; padding: 0 14px 0 36px; border: 1px solid var(--ip-line); border-radius: 999px; background: var(--ip-soft);
    font-size: 13.5px; color: var(--ip-ink); transition: border-color .15s, background .15s, box-shadow .15s; }
.ip-top-search input:focus { outline: none; background: #fff; border-color: var(--ip-blue); box-shadow: 0 0 0 3px rgba(1, 92, 170, .12); }

/* user menu */
.ip-user { position: relative; }
.ip-user-btn { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 10px 0 5px; border: 1px solid transparent; border-radius: 999px;
    background: none; cursor: pointer; color: var(--ip-ink); transition: background .15s, border-color .15s; }
.ip-user-btn:hover, .ip-user.is-open .ip-user-btn { background: var(--ip-soft); border-color: var(--ip-line); }
.ip-user-text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; text-align: left; }
.ip-user-text b { font-size: 13px; }
.ip-user-text small { font-size: 11.5px; color: var(--ip-muted); }
.ip-user-btn .fa-angle-down { color: #94a3b8; font-size: 16px; }
.ip-user-menu { display: none; position: absolute; right: 0; top: calc(100% + 8px); width: 250px; background: #fff; border: 1px solid var(--ip-line);
    border-radius: 12px; box-shadow: 0 18px 40px -18px rgba(15, 23, 42, .35); padding: 6px; z-index: 30; }
.ip-user.is-open .ip-user-menu { display: block; }
.ip-user-head { padding: 10px 10px 12px; border-bottom: 1px solid var(--ip-line); margin-bottom: 6px; }
.ip-user-head b { display: block; color: var(--ip-ink); font-size: 14px; }
.ip-user-head small { display: block; color: var(--ip-muted); font-size: 12px; margin: 2px 0 8px; word-break: break-all; }
.ip-user-head .ip-role { margin-left: 0; }
.ip-user-menu a, .ip-user-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 8px;
    background: none; color: var(--ip-text) !important; font-size: 13.5px; text-decoration: none !important; cursor: pointer; text-align: left; }
.ip-user-menu a .fa, .ip-user-menu button .fa { width: 16px; text-align: center; color: #64748b; }
.ip-user-menu a:hover, .ip-user-menu button:hover { background: var(--ip-soft); }
.ip-user-menu form { margin: 0; border-top: 1px solid var(--ip-line); margin-top: 6px; padding-top: 6px; }
.ip-user-menu button { color: #b91c1c !important; }
.ip-user-menu button .fa { color: #b91c1c; }

.ip-role { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; margin-left: 6px; }
.ip-role--manager { background: #e0ecf8; color: var(--ip-blue); }
.ip-role--viewer { background: #f1f5f9; color: #475569; }
.ip-menu-btn { display: none; flex: 0 0 auto; background: #fff; border: 1px solid var(--ip-line); border-radius: 10px; height: 40px; width: 42px;
    font-size: 17px; color: var(--ip-ink); cursor: pointer; }
.ip-content { padding: 24px 28px 48px; max-width: 1280px; }

/* folded menu (desktop): icons only, tooltips from the title attribute */
@media (min-width: 992px) {
    .ip-shell { transition: grid-template-columns .28s cubic-bezier(.4, 0, .2, 1); }
    html.ip-collapsed .ip-shell { grid-template-columns: 76px minmax(0, 1fr); }
    html.ip-collapsed .ip-side { padding: 16px 10px; }
    html.ip-collapsed .ip-side-head { justify-content: center; padding: 0 0 16px; }
    html.ip-collapsed .ip-brand span, html.ip-collapsed .ip-brand .ip-brand-full { display: none; }
    html.ip-collapsed .ip-brand .ip-brand-mini { display: block; }
    html.ip-collapsed .ip-find { justify-content: center; cursor: pointer; }
    html.ip-collapsed .ip-find input { width: 44px; padding: 0; color: transparent; cursor: pointer; }
    html.ip-collapsed .ip-find input::placeholder { color: transparent; }
    html.ip-collapsed .ip-find .fa { left: 50%; transform: translateX(-50%); }
    html.ip-collapsed .ip-find kbd { display: none; }
    html.ip-collapsed .ip-nav-label { height: 1px; padding: 0; margin: 4px 8px 10px; background: var(--ip-line); overflow: hidden; color: transparent; }
    html.ip-collapsed .ip-nav a { justify-content: center; padding: 0; }
    html.ip-collapsed .ip-nav a span { display: none; }
    html.ip-collapsed .ip-nav a.is-active::before { left: -10px; }
    html.ip-collapsed .ip-badge-count { position: absolute; top: 2px; right: 6px; min-width: 18px; padding: 3px 5px; font-size: 10px;
        background: var(--ip-blue); color: #fff; box-shadow: 0 0 0 2px #fff; }
    html.ip-collapsed .ip-org { border: 0; background: none; box-shadow: none; overflow: visible; }
    html.ip-collapsed .ip-org-name, html.ip-collapsed .ip-org-meta,
    html.ip-collapsed .ip-org-act span, html.ip-collapsed .ip-org-tick::after, html.ip-collapsed .ip-org-tick::before { display: none; }
    html.ip-collapsed .ip-org-tick { width: 18px; height: 18px; right: -5px; bottom: -5px; font-size: 9px; border-width: 2px; }
    html.ip-collapsed .ip-org-main { padding: 0 0 10px; }
    html.ip-collapsed .ip-org-crest { width: 48px; height: 48px; margin: 0 auto; border-width: 1px; border-radius: 12px; }
    html.ip-collapsed .ip-org-crest img { max-width: 38px; max-height: 38px; }
    html.ip-collapsed .ip-org-initials { font-size: 15px; }
    html.ip-collapsed .ip-org-actions { flex-direction: column; padding: 0; border: 0; gap: 6px; background: none; }
    html.ip-collapsed .ip-org-act { width: 44px; height: 42px; margin: 0 auto; flex: 0 0 auto; border-radius: 10px; font-size: 16px; }
    html.ip-collapsed .ip-org-act.is-out { background: #fef2f2; border-color: #fecaca; }
    html.ip-collapsed .ip-org-act.is-out:hover { background: #fee2e2; border-color: #fca5a5; }
}

/* account page: the logo */
.ip-logo-row { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.ip-logo-preview { width: 104px; height: 104px; flex: 0 0 104px; border-radius: 16px; border: 1px dashed #cbd5e1; background: var(--ip-soft);
    display: flex; align-items: center; justify-content: center; overflow: hidden; }
.ip-logo-preview img { max-width: 88px; max-height: 88px; object-fit: contain; display: block; }
.ip-avatar--lg { width: 72px; height: 72px; flex-basis: 72px; border-radius: 16px; font-size: 24px; }
.ip-logo-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; flex: 1 1 220px; min-width: 0; }
.ip-logo-actions form { margin: 0; display: flex; gap: 8px; }
.ip-logo-actions .inst-hint { flex: 1 1 100%; margin: 2px 0 0; }
.ip-file-btn { position: relative; overflow: hidden; }
.ip-file-btn input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 0; }

.ip-card { background: var(--ip-card); border: 1px solid var(--ip-line); border-radius: var(--ip-radius); padding: 20px; margin-bottom: 20px; }
.ip-card h2 { font-size: 16px; margin: 0 0 4px; color: var(--ip-ink); font-weight: 700; }
.ip-card .ip-card-sub { color: var(--ip-muted); font-size: 13px; margin: 0 0 16px; }
.ip-card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.ip-card-head > div:first-child { flex: 1 1 320px; min-width: 0; }

.ip-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
/* dashboard cards: each status in its own colour (--k), an icon tile, the count, what it means and its share of all licenses */
.ip-kpi { --k: #015caa; --k-soft: #eaf2fb; position: relative; overflow: hidden; display: flex; flex-direction: column; padding: 16px 16px 14px;
    background: #fff; border: 1px solid var(--ip-line); border-radius: 14px; text-decoration: none !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04); transition: transform .18s, box-shadow .18s, border-color .18s; }
.ip-kpi::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--k); }
.ip-kpi::after { content: ''; position: absolute; right: -40px; top: -40px; width: 120px; height: 120px; border-radius: 50%;
    background: radial-gradient(circle, var(--k-soft) 0%, rgba(255, 255, 255, 0) 70%); pointer-events: none; }
a.ip-kpi:hover { transform: translateY(-3px); border-color: var(--k); box-shadow: 0 14px 28px -16px var(--k); }
.ip-kpi-top { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ip-kpi-label { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #64748b; }
.ip-kpi-icon { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center;
    background: var(--k-soft); color: var(--k); font-size: 16px; transition: background .18s, color .18s; }
a.ip-kpi:hover .ip-kpi-icon { background: var(--k); color: #fff; }
.ip-kpi b { position: relative; z-index: 1; display: block; margin-top: 8px; font-size: 32px; line-height: 1.1; font-weight: 800; color: var(--ip-ink); letter-spacing: -.02em; }
.ip-kpi-hint { position: relative; z-index: 1; margin-top: 4px; font-size: 12.5px; color: var(--ip-muted); }
.ip-kpi-bar { position: relative; z-index: 1; display: block; height: 5px; margin-top: 12px; border-radius: 999px; background: var(--ip-soft); overflow: hidden; }
.ip-kpi-bar > span { display: block; height: 100%; border-radius: inherit; background: var(--k); min-width: 4px; }
/* the same colours as the status dots and badges elsewhere in the portal */
.ip-kpi--Total     { --k: #0f172a; --k-soft: #e2e8f0; }
.ip-kpi--Available { --k: var(--ip-blue); --k-soft: #e0ecf8; }   /* the site's own blue (#015caa) */
.ip-kpi--Assigned  { --k: #f59e0b; --k-soft: #fef3c7; }
.ip-kpi--Consumed  { --k: #16a34a; --k-soft: #dcfce7; }
.ip-kpi--Expired   { --k: #94a3b8; --k-soft: #f1f5f9; }
.ip-kpi--Expired .ip-kpi-icon { color: #64748b; }
.ip-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

.ip-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.ip-badge--Available { background: #e0ecf8; color: var(--ip-blue); }
.ip-badge--Assigned { background: #fef3c7; color: #92400e; }
.ip-badge--Consumed { background: #dcfce7; color: #166534; }
.ip-badge--Expired { background: #f1f5f9; color: #64748b; }
.ip-badge--other { background: #fee2e2; color: #991b1b; }
.dot-Available { background: var(--ip-blue); } .dot-Assigned { background: #f59e0b; } .dot-Consumed { background: #22c55e; } .dot-Expired { background: #94a3b8; } .dot-Total { background: var(--ip-ink); }

.ip-table-wrap { overflow-x: auto; border: 1px solid var(--ip-line); border-radius: 10px; }
.ip-table { width: 100%; border-collapse: collapse; background: #fff; font-size: 13.5px; }
.ip-table th { background: var(--ip-soft); text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--ip-muted); font-weight: 700; padding: 10px 12px; white-space: nowrap; }
.ip-table td { padding: 11px 12px; border-top: 1px solid var(--ip-line); vertical-align: middle; }
.ip-table tr:hover td { background: #fafcff; }
.ip-table .ip-key, .ip-key { font-family: Consolas, 'Courier New', monospace; font-size: 13px; color: var(--ip-ink); letter-spacing: .02em; white-space: nowrap; }
.ip-table .ip-muted, .ip-muted { color: var(--ip-muted); font-size: 12.5px; }
.ip-actions { display: flex; gap: 6px; flex-wrap: wrap; }
/* licences table: small lines under a value (validity, order) and the student's story */
.ip-meta { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 12px; color: var(--ip-muted); white-space: nowrap; }
.ip-meta .fa { width: 13px; text-align: center; color: #94a3b8; }
.ip-meta.is-warn, .ip-meta.is-warn .fa { color: #b45309; }
.ip-meta.is-bad, .ip-meta.is-bad .fa { color: #b91c1c; }
.ip-student { min-width: 260px; }
.ip-student .ip-email { color: var(--ip-ink); word-break: break-all; }
.ip-facts { list-style: none; margin: 6px 0 0; padding: 0; }
.ip-facts li { display: flex; align-items: flex-start; gap: 7px; margin: 0 0 3px; font-size: 12.5px; line-height: 1.4; color: #475569; }
.ip-facts li .fa { width: 14px; flex: 0 0 14px; text-align: center; margin-top: 2px; color: #94a3b8; }
.ip-facts li.is-ok, .ip-facts li.is-ok .fa { color: #15803d; }
.ip-facts li.is-warn, .ip-facts li.is-warn .fa { color: #b45309; }
.ip-facts li.is-bad, .ip-facts li.is-bad .fa { color: #b91c1c; }
.ip-facts li.is-note, .ip-facts li.is-note .fa { color: var(--ip-blue); }
.ip-actions form { margin: 0; }
.ip-empty { text-align: center; padding: 36px 16px; color: var(--ip-muted); }
.ip-empty .fa { font-size: 30px; color: #cbd5e1; display: block; margin-bottom: 10px; }

.ip-filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.ip-filters .ip-input { width: auto; min-width: 170px; height: 38px; }
.ip-filters .ip-input[type=search] { min-width: 240px; }
/* licences: students still to take the test + Remind all */
.ip-remind-bar { display: flex; align-items: center; gap: 14px; padding: 12px 14px; margin-bottom: 16px; border-radius: 12px;
    background: linear-gradient(135deg, #fef3c7 0%, #fffbeb 100%); border: 1px solid #fcd34d; border-left: 5px solid #f59e0b;
    box-shadow: 0 6px 16px -12px #f59e0b; }
.ip-remind-bar > .fa { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 50%; background: #f59e0b; color: #fff;
    display: inline-flex; align-items: center; justify-content: center; font-size: 16px; box-shadow: 0 3px 8px -3px #f59e0b; }
.ip-remind-text { flex: 1 1 auto; min-width: 0; font-size: 13.5px; line-height: 1.45; color: #78350f; }
.ip-remind-text b { display: block; color: #78350f; }
.ip-remind-text span { color: #92400e; }
.ip-remind-bar form { margin: 0; flex: 0 0 auto; }
@media (max-width: 600px) { .ip-remind-bar { flex-wrap: wrap; } .ip-remind-bar form { width: 100%; } .ip-remind-bar .ip-btn { width: 100%; } }
.ip-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.ip-tab { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--ip-line); background: #fff; color: var(--ip-text) !important; text-decoration: none !important; font-size: 13px; font-weight: 600; }
.ip-tab.is-active { background: var(--ip-ink); border-color: var(--ip-ink); color: #fff !important; }
.ip-tab span { opacity: .7; margin-left: 4px; }

.ip-two { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.ip-two { margin-bottom: 20px; }
.ip-two > .ip-card { margin-bottom: 0; }
@media (max-width: 1200px) { .ip-two { grid-template-columns: minmax(0, 1fr); } }
.ip-pager { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; font-size: 13px; color: var(--ip-muted); gap: 10px; flex-wrap: wrap; }
.ip-pager .ip-btn { height: 34px; }
.ip-dl { display: grid; grid-template-columns: 160px 1fr; gap: 8px 16px; margin: 0; font-size: 14px; }
.ip-dl dt { color: var(--ip-muted); font-weight: 600; }
.ip-dl dd { margin: 0; color: var(--ip-ink); }

/* my account */
.ip-sec-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.ip-sec-item { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: #fff; border: 1px solid var(--ip-line); border-radius: var(--ip-radius); }
.ip-sec-item > .fa { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
    font-size: 16px; background: var(--ip-soft); color: var(--ip-blue); }
.ip-sec-item.is-ok > .fa { background: #dcfce7; color: #15803d; }
.ip-sec-item.is-warn > .fa { background: #fef3c7; color: #b45309; }
.ip-sec-item > div { min-width: 0; }
.ip-sec-item b { display: block; font-size: 13.5px; color: var(--ip-ink); }
.ip-sec-item span { display: block; font-size: 12.5px; color: var(--ip-muted); }
.ip-ok { color: #15803d; }
.ip-warn { color: #b45309; }
.ip-lock { font-size: 12px; color: #94a3b8; margin-left: 4px; }
.ip-locked { display: flex; align-items: center; min-height: 42px; padding: 8px 12px; border: 1px dashed #cbd5e1; border-radius: 8px; background: var(--ip-soft);
    color: var(--ip-text); font-size: 14px; word-break: break-all; }
.ip-inline-form { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; margin: 0; }
.ip-inline-form:has(.inst-code-input) .ip-btn { height: 54px; } /* same height as the big code box, so both sit on one centre line */
.ip-coming { display: flex; align-items: flex-start; gap: 10px; margin-top: 16px; padding: 10px 12px; border-radius: 10px; background: var(--ip-soft);
    font-size: 12.5px; line-height: 1.5; color: var(--ip-muted); }
.ip-coming .fa { font-size: 16px; color: #94a3b8; margin-top: 1px; }
.ip-history { list-style: none; margin: 0; padding: 0; }
.ip-history li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--ip-line); }
.ip-history li:first-child { border-top: 0; }
.ip-history-icon { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 9px; background: var(--ip-soft); color: #64748b;
    display: inline-flex; align-items: center; justify-content: center; font-size: 15px; }
.ip-history li > div { min-width: 0; }
.ip-history b { font-size: 13.5px; color: var(--ip-ink); }
.ip-history li > div > span:not(.ip-badge) { display: block; font-size: 12.5px; color: var(--ip-muted); } /* the text line, not the icon box */
.ip-history b + .ip-badge { margin-left: 6px; font-size: 11px; padding: 1px 8px; }
@media (max-width: 991px) { .ip-sec-summary { grid-template-columns: minmax(0, 1fr); } }
/* two-step: choosing, the app setup, backup codes */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ip-method-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; }
.ip-method-choices form { margin: 0; }
.ip-method-choice { width: 100%; height: 100%; display: flex; align-items: center; gap: 12px; padding: 14px; text-align: left; cursor: pointer;
    background: #fff; border: 1px solid var(--ip-line); border-radius: 12px; transition: border-color .15s, box-shadow .15s; }
.ip-method-choice:hover { border-color: var(--ip-blue); box-shadow: 0 8px 20px -12px rgba(1, 92, 170, .5); }
.ip-method-choice > .fa, .ip-method > .fa { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
    font-size: 18px; background: #eaf2fb; color: var(--ip-blue); }
.ip-method-choice span { display: block; min-width: 0; color: var(--ip-text); }
.ip-method-choice b { color: var(--ip-ink); font-size: 14px; }
.ip-method-choice em { font-style: normal; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #15803d;
    background: #dcfce7; border-radius: 999px; padding: 1px 7px; margin-left: 4px; vertical-align: middle; }
.ip-method-choice small { display: block; margin-top: 3px; font-size: 12.5px; line-height: 1.45; color: var(--ip-muted); }
.ip-method { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; background: #f0fdf4; border: 1px solid #bbf7d0; }
.ip-method.is-on > .fa { background: #dcfce7; color: #15803d; }
.ip-method b { display: block; color: var(--ip-ink); font-size: 14px; }
.ip-method span { display: block; font-size: 12.5px; color: var(--ip-muted); }
.ip-off-form { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--ip-line); }
.ip-app-setup { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; padding: 14px; border: 1px dashed #cbd5e1; border-radius: 12px; background: var(--ip-soft); }
.ip-qr { width: 184px; height: 184px; flex: 0 0 184px; padding: 8px; background: #fff; border-radius: 10px; border: 1px solid var(--ip-line); }
.ip-qr img, .ip-qr canvas { display: block; }
.ip-app-steps { flex: 1 1 240px; min-width: 0; }
.ip-app-steps ol { margin: 0 0 10px; padding-left: 18px; font-size: 13.5px; line-height: 1.6; color: var(--ip-text); }
.ip-secret { display: inline-block; margin-top: 4px; padding: 3px 8px; border-radius: 6px; background: #fff; border: 1px solid var(--ip-line);
    font: 600 13px/1.4 Consolas, 'Courier New', monospace; color: var(--ip-ink); letter-spacing: .04em; word-break: break-all; }
.ip-backup { margin-bottom: 14px; padding: 14px; border-radius: 12px; background: #fffbeb; border: 1px solid #fde68a; color: #78350f; }
.ip-backup > b { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.ip-backup p { margin: 6px 0 10px; font-size: 13px; line-height: 1.5; }
.ip-backup-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.ip-backup-list li { padding: 7px 10px; border-radius: 8px; background: #fff; border: 1px solid #fde68a; text-align: center;
    font: 700 15px/1.3 Consolas, 'Courier New', monospace; letter-spacing: .06em; color: var(--ip-ink); }
@media (max-width: 600px) { .ip-method-choices { grid-template-columns: minmax(0, 1fr); } }
/* passkeys */
.ip-passkeys li { flex-wrap: wrap; }
.ip-passkeys li > div { flex: 1 1 200px; }
.ip-pk-remove { margin-left: auto; }
.ip-pk-remove summary { list-style: none; cursor: pointer; }
.ip-pk-remove summary::-webkit-details-marker { display: none; }
.ip-pk-remove[open] summary { display: none; }
.ip-pk-remove form { align-items: center; }
.ip-pk-remove .ip-input { width: 170px; height: 32px; font-size: 13px; }
.ip-pk-add { margin-top: 6px; }
.ip-pk-msg { margin: 10px 0 0; font-size: 13px; }
.ip-pk-msg.is-ok { color: var(--ip-blue); }
.ip-pk-msg.is-bad { color: #b91c1c; }
/* sign-in page: passkey option */
.inst-or { display: flex; align-items: center; gap: 12px; margin: 18px 0 14px; font-size: 12px; color: var(--ip-muted); text-transform: uppercase; letter-spacing: .08em; }
.inst-or::before, .inst-or::after { content: ''; flex: 1; height: 1px; background: var(--ip-line); }
.inst-pk-msg { margin: 8px 0 0; font-size: 13px; text-align: center; }
.inst-pk-msg.is-bad { color: #b91c1c; }
@media print { .ip-side, .ip-top, .ip-side-edge, .ip-card:not(#two-step), .ip-sec-summary, #two-step > :not(.ip-backup),
    .ip-acc-group-title, .ip-policy-note, .ip-acc:not(#two-step), #two-step > summary, #two-step .ip-acc-body > :not(.ip-backup) { display: none !important; }
    #two-step.ip-acc { border: 0; box-shadow: none; } #two-step .ip-acc-body { padding: 0; border: 0; }
    .ip-shell { display: block; } .ip-content { padding: 0; } }

/* buy page */
.ip-includes { list-style: none; margin: 10px 0 0; padding: 0; }
.ip-includes li { position: relative; padding: 5px 0 5px 28px; font-size: 14px; line-height: 1.5; color: var(--ip-text); }
.ip-includes li .fa { position: absolute; left: 0; top: 8px; width: 18px; height: 18px; border-radius: 50%; background: #15803d; color: #fff;
    font-size: 10px; display: inline-flex; align-items: center; justify-content: center; }
.ip-price-box { background: var(--ip-soft); border-radius: 10px; padding: 16px; margin: 6px 0 16px; }
.ip-price-row { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.ip-price-row.is-total { border-top: 1px solid #cbd5e1; margin-top: 6px; padding-top: 10px; font-size: 18px; font-weight: 700; color: var(--ip-ink); }
.ip-price-row .is-save { color: var(--ip-green); font-weight: 600; }
.ip-tiers { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.ip-tiers td { padding: 8px 4px; border-bottom: 1px dashed var(--ip-line); }
.ip-tiers tr.is-current td { color: var(--ip-blue); font-weight: 700; }

/* mobile */
@media (max-width: 991px) {
    .inst-auth-wrap, .inst-auth-wrap.is-narrow { grid-template-columns: 1fr; }
    .inst-auth-side { padding: 28px 24px; }
    .ip-shell { grid-template-columns: 1fr; }
    .ip-side { position: fixed; z-index: 50; left: 0; top: 0; width: 280px; transform: translateX(-100%); transition: transform .2s; }
    .ip-top-search { display: none; }
    .ip-user-text { display: none; }
    .ip-shell.is-open .ip-side { transform: none; box-shadow: 0 0 0 100vmax rgba(15, 23, 42, .45); }
    .ip-menu-btn { display: inline-flex; align-items: center; justify-content: center; }
    .ip-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ip-two { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .inst-auth { padding: 16px 0 40px; }
    .inst-auth-wrap { border-radius: 0; }
    .inst-auth-main { padding: 24px 16px; }
    .inst-grid { grid-template-columns: 1fr; }
    .ip-top { padding: 10px 16px; gap: 10px; }
    .ip-content { padding: 16px 16px 40px; }
    .ip-filters .ip-input, .ip-filters .ip-input[type=search] { width: 100%; min-width: 0; }
    .ip-dl { grid-template-columns: 1fr; gap: 2px; }
    .ip-dl dd { margin-bottom: 10px; }
}

/* ---- security phase 4: recovery email, two-step policy, team security ---- */
@media (max-width: 1199px) and (min-width: 992px) { .ip-sec-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ip-method.is-pending { background: #eff6ff; border-color: #bfdbfe; }
.ip-inline-links { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 10px; }
.ip-inline-links form { margin: 0; }
.ip-policy-note { display: flex; align-items: center; gap: 12px; padding: 14px 16px; margin-bottom: 18px; border-radius: var(--ip-radius);
    background: #fffbeb; border: 1px solid #fde68a; color: #78350f; }
.ip-policy-note > .fa { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
    background: #fef3c7; color: #b45309; font-size: 18px; }
.ip-policy-note b { display: block; font-size: 14px; color: #78350f; }
.ip-policy-note span { display: block; font-size: 13px; }
.inst-alt-box { margin-top: 16px; padding: 12px 14px; border: 1px dashed #cbd5e1; border-radius: 12px; background: var(--ip-soft); font-size: 13.5px; }
.ip-sec-pill { white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: #f1f5f9; color: #475569; }
.ip-sec-pill.is-ok { background: #dcfce7; color: #15803d; }
.ip-sec-pill.is-warn { background: #fef3c7; color: #b45309; }
.ip-toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }

/* ---- My Account: sections that open and close (like the student My Account) ---- */
.ip-acc-group { margin-bottom: 22px; }
.ip-acc-group-title { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ip-muted); margin: 0 0 10px 2px; }
.ip-acc { background: #fff; border: 1px solid var(--ip-line); border-radius: var(--ip-radius); margin-bottom: 10px; overflow: hidden; transition: border-color .2s, box-shadow .2s; scroll-margin-top: 80px; }
.ip-acc:hover { border-color: #cbd5e1; }
.ip-acc[open] { border-color: #bfdbfe; box-shadow: 0 8px 24px -16px rgba(1, 92, 170, .45); }
.ip-acc-head { display: flex; align-items: center; gap: 14px; padding: 14px 18px; cursor: pointer; list-style: none; user-select: none; }
.ip-acc-head::-webkit-details-marker { display: none; }
.ip-acc-head::marker { content: ''; }
.ip-acc-head:hover { background: #f8fafc; }
.ip-acc[open] > .ip-acc-head { background: #fafcff; border-bottom: 1px solid #eef2f7; }
.ip-acc-head:focus-visible { outline: 2px solid var(--ip-blue); outline-offset: -2px; }
.ip-acc-icon { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
    background: #eaf2fb; color: var(--ip-blue); font-size: 17px; }
.ip-acc-title { flex: 1 1 auto; min-width: 0; }
.ip-acc-title b { display: block; font-size: 15px; color: var(--ip-ink); }
.ip-acc-title small { display: block; font-size: 12.5px; color: var(--ip-muted); line-height: 1.4; margin-top: 1px; }
.ip-acc-meta { flex: 0 1 auto; max-width: 34%; font-size: 12.5px; color: var(--ip-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ip-acc-chevron { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center;
    background: var(--ip-soft); color: var(--ip-muted); font-size: 12px; transition: transform .25s, background .2s, color .2s; }
.ip-acc[open] .ip-acc-chevron { transform: rotate(180deg); background: rgba(1, 92, 170, .1); color: var(--ip-blue); }
.ip-acc-body { padding: 18px 18px 20px 72px; animation: ipAccIn .2s ease-out; }
.ip-acc-body > form, .ip-acc-body > .ip-method, .ip-acc-body > .ip-method-choices, .ip-acc-body > .ip-history,
.ip-acc-body > .ip-acc-sub, .ip-acc-body > .ip-app-setup, .ip-acc-body > .ip-backup { max-width: 760px; }
.ip-acc-sub { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--ip-line); }
a.ip-sec-item { text-decoration: none; color: inherit; transition: border-color .2s, box-shadow .2s; }
a.ip-sec-item:hover { border-color: #bfdbfe; box-shadow: 0 8px 20px -14px rgba(1, 92, 170, .5); text-decoration: none; }
@keyframes ipAccIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@media (max-width: 767px) {
    .ip-acc-head { padding: 12px 14px; gap: 10px; }
    .ip-acc-meta { display: none; }
    .ip-acc-title small { display: none; }
    .ip-acc-body { padding: 16px 14px 18px; }
    .ip-hide-sm { display: none; }
}

/* ---- fingerprint / face sign-in (passkeys): one button, like the student My Account ---- */
.ip-pk-hero { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 12px; border: 1px solid #bfdbfe; background: linear-gradient(180deg, #f8fbff 0%, #eff6ff 100%); max-width: 760px; }
.ip-pk-hero-icon { width: 48px; height: 48px; flex: 0 0 48px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: #fff; color: var(--ip-blue); box-shadow: 0 4px 12px -6px rgba(1, 92, 170, .45); }
.ip-pk-hero-text { flex: 1 1 auto; min-width: 0; }
.ip-pk-hero-text b { display: block; font-size: 14.5px; color: var(--ip-ink); }
.ip-pk-hero-text span { display: block; font-size: 12.5px; line-height: 1.45; color: var(--ip-muted); margin-top: 2px; }
.ip-pk-hero .ip-btn { flex: 0 0 auto; }
.ip-pk-confirm { margin-top: 12px; padding: 14px; border: 1px dashed #cbd5e1; border-radius: 12px; background: var(--ip-soft); max-width: 760px; }
.ip-pk-confirm[hidden] { display: none; }
.ip-acc-icon svg { display: block; }
@media (max-width: 767px) { .ip-pk-hero { flex-wrap: wrap; } .ip-pk-hero .ip-btn { width: 100%; justify-content: center; } }

/* a section that is only a link (Institute & Team → My Account) */
a.ip-acc-link { display: block; text-decoration: none; color: inherit; }
a.ip-acc-link:hover { text-decoration: none; border-color: #bfdbfe; }
a.ip-acc-link:hover .ip-acc-chevron { background: rgba(1, 92, 170, .1); color: var(--ip-blue); }
.ip-acc-body > .ip-logo-row, .ip-acc-body > .ip-dl, .ip-acc-body > .ip-inline-form, .ip-acc-body > .ip-off-form, .ip-acc-body > .ip-card-sub { max-width: 760px; }

/* ---- institute ID card at the bottom of the menu ---- */
.ip-org { position: relative; border: 1px solid var(--ip-line); border-radius: 14px; background: #fff; overflow: hidden;
    box-shadow: 0 10px 24px -18px rgba(1, 92, 170, .55); }
.ip-org-main { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 14px 12px 10px;
    text-decoration: none !important; color: inherit; }
.ip-org-crest { width: 84px; height: 84px; border-radius: 18px; background: #fff; border: 3px solid #fff; position: relative;
    display: inline-flex; align-items: center; justify-content: center; overflow: hidden;
    box-shadow: 0 6px 16px -6px rgba(2, 74, 135, .45), 0 0 0 1px var(--ip-line); transition: transform .2s; }
.ip-org-crest img { max-width: 70px; max-height: 70px; object-fit: contain; display: block; }
.ip-org-initials { width: 100%; height: 100%; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px;
    background: linear-gradient(150deg, #eaf2fb 0%, #dbeafe 100%); color: var(--ip-blue); font-weight: 800; font-size: 24px; letter-spacing: .03em; }
.ip-org-name { margin-top: 9px; font-size: 13.5px; font-weight: 700; line-height: 1.3; color: var(--ip-ink);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ip-org-meta { margin-top: 2px; font-size: 12px; color: var(--ip-muted); }
.ip-org-meta:empty { display: none; }
/* green tick on the logo = approved ("Verified institute" shows on hover) */
.ip-org-crest-wrap { position: relative; display: inline-flex; transition: transform .2s; }
.ip-org-main:hover .ip-org-crest-wrap { transform: translateY(-2px); }
.ip-org-tick { position: absolute; right: -7px; bottom: -7px; width: 26px; height: 26px; border-radius: 50%; display: inline-flex;
    align-items: center; justify-content: center; background: #16a34a; color: #fff; font-size: 12px; border: 3px solid #fff;
    box-shadow: 0 3px 8px -2px rgba(22, 163, 74, .55); cursor: default; }
.ip-org-tick::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 9px); left: 50%; transform: translate(-50%, 4px);
    white-space: nowrap; padding: 5px 9px; border-radius: 7px; background: #0f172a; color: #fff; font-size: 11.5px; font-weight: 600;
    opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s; }
.ip-org-tick::before { content: ''; position: absolute; bottom: calc(100% + 3px); left: 50%; transform: translate(-50%, 4px);
    border: 6px solid transparent; border-top-color: #0f172a; border-bottom: 0; opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s; }
.ip-org-tick:hover::after, .ip-org-tick:hover::before { opacity: 1; transform: translate(-50%, 0); }
.ip-org-actions { display: flex; gap: 6px; padding: 6px; border-top: 1px solid #eef2f7; background: #fafcff; }
.ip-org-actions form { margin: 0; flex: 1 1 0; display: flex; }
.ip-org-act { flex: 1 1 0; height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 10px;
    border: 1px solid transparent; background: transparent; color: #475569; font-size: 14px; font-weight: 600; cursor: pointer;
    text-decoration: none !important; transition: background .15s, color .15s, border-color .15s; }
.ip-org-act:hover { background: #fff; border-color: var(--ip-line); color: var(--ip-blue); }
.ip-org-act .fa { font-size: 15px; }
.ip-org-act.is-out { color: #b91c1c; width: 100%; }
.ip-org-act.is-out:hover { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }

/* Licenses > Assign: how to type the emails; the assign + sample buttons */
.ip-email-help { margin: 2px 0 10px; padding: 12px 14px; border-radius: 10px; background: #f8fbff; border: 1px solid #dbeafe; font-size: 13px; color: var(--ip-text); }
.ip-email-help > b { display: flex; align-items: center; gap: 7px; color: var(--ip-ink); font-size: 13.5px; }
.ip-email-help > b .fa { color: var(--ip-blue); }
.ip-email-help ul { margin: 6px 0 10px; padding-left: 20px; line-height: 1.6; }
.ip-email-examples { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 10px; }
.ip-email-examples > div { min-width: 0; }
.ip-email-examples span { display: block; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ip-muted); margin-bottom: 4px; }
.ip-email-examples code { display: block; padding: 8px 10px; border-radius: 8px; background: #fff; border: 1px dashed #cbd5e1; color: #334155;
    font-size: 12.5px; line-height: 1.6; white-space: normal; word-break: break-word; }
.ip-assign-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ip-assign-actions .inst-hint { margin: 0; }
@media (max-width: 767px) { .ip-email-examples { grid-template-columns: minmax(0, 1fr); } }
.ip-short-warn { margin: 8px 0 0; font-size: 13px; }
.ip-short-warn[hidden] { display: none; }
.ip-short-warn a { font-weight: 600; white-space: nowrap; }
#email-count.is-warn { color: #b45309; }

/* Licenses > Assign: student emails as chips */
.ip-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 112px; max-height: 260px; overflow-y: auto; padding: 8px;
    border: 1px solid #cbd5e1; border-radius: 10px; background: #fff; cursor: text; align-content: flex-start; transition: border-color .15s, box-shadow .15s; }
.ip-chips:focus-within { border-color: var(--ip-blue); box-shadow: 0 0 0 3px rgba(1, 92, 170, .12); }
.ip-chips-input { flex: 1 1 180px; min-width: 140px; height: 30px; border: 0; outline: 0; padding: 0 4px; font-size: 14px; background: transparent; color: var(--ip-ink); }
.ip-chip { display: inline-flex; align-items: center; gap: 2px; height: 30px; max-width: 100%; padding: 0 2px 0 10px; border-radius: 999px;
    background: #eaf2fb; border: 1px solid #bfdbfe; color: #1e3a8a; font-size: 13px; line-height: 1; }
.ip-chip-text { border: 0; background: none; padding: 0; color: inherit; font: inherit; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.ip-chip-x { width: 22px; height: 22px; flex: 0 0 22px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 50%;
    background: transparent; color: inherit; font-size: 16px; line-height: 1; cursor: pointer; opacity: .65; }
.ip-chip-x:hover { opacity: 1; background: rgba(15, 23, 42, .08); }
.ip-chip > .fa { margin-right: 4px; font-size: 13px; }
.ip-chip.is-bad { background: #fef2f2; border-color: #fecaca; color: #b91c1c; text-decoration: line-through; text-decoration-color: rgba(185, 28, 28, .45); }
.ip-chip.is-bad .ip-chip-x { text-decoration: none; }
.ip-chip.is-over { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.ip-chip.is-flash { animation: ipChipFlash .9s ease-out 1; }
@keyframes ipChipFlash { 0%, 40% { box-shadow: 0 0 0 3px rgba(1, 92, 170, .35); transform: scale(1.06); } 100% { box-shadow: none; transform: none; } }
.ip-chips-clear { float: right; margin-top: 4px; font-size: 12.5px; }
.ip-chip-text { flex: 0 1 auto; min-width: 0; }

/* Licenses: the Assign dropdown above the list */
.ip-assign-acc { margin-bottom: 20px; }
.ip-assign-acc .ip-acc-body { padding-left: 18px; }
.ip-assign-top { display: flex; justify-content: flex-end; margin: -4px 0 6px; }

/* Students & Reports: search, then one line of filter chips that open small lists */
.ip-students-search { flex: 1 1 320px; min-width: 0; }
.ip-fbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: -4px 0 14px; }
.ip-fchip { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid #cbd5e1;
    background: #fff; color: #334155; font-size: 13px; font-weight: 500; white-space: nowrap; cursor: pointer; list-style: none; user-select: none;
    transition: border-color .15s, background .15s, color .15s; }
.ip-fchip::-webkit-details-marker { display: none; }
.ip-fchip > .fa:first-child { color: var(--ip-muted); font-size: 13px; }
.ip-fchip b { font-weight: 700; }
.ip-fchip:hover { border-color: var(--ip-blue); color: var(--ip-blue); }
.ip-fchip.is-on { background: #eaf2fb; border-color: var(--ip-blue); color: var(--ip-blue); }
.ip-fchip.is-on > .fa:first-child { color: var(--ip-blue); }
.ip-fdrop-caret { font-size: 14px; transition: transform .2s; }
.ip-fdrop { position: relative; }
.ip-fdrop[open] > .ip-fchip { border-color: var(--ip-blue); box-shadow: 0 0 0 3px rgba(1, 92, 170, .12); }
.ip-fdrop[open] .ip-fdrop-caret { transform: rotate(180deg); }
.ip-fdrop-menu { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; min-width: 230px; max-height: 300px; overflow-y: auto; padding: 6px;
    background: #fff; border: 1px solid var(--ip-line); border-radius: 12px; box-shadow: 0 16px 32px -12px rgba(15, 23, 42, .28); }
.ip-fdrop-menu a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px; border-radius: 8px;
    color: #334155; font-size: 13.5px; text-decoration: none !important; }
.ip-fdrop-menu a:hover { background: var(--ip-soft); color: var(--ip-ink); }
.ip-fdrop-menu a.is-on { background: #eaf2fb; color: var(--ip-blue); font-weight: 600; }
.ip-fdrop-menu a.is-zero:not(.is-on) { opacity: .5; }
.ip-fdrop-menu em { font-style: normal; font-size: 11px; font-weight: 700; min-width: 22px; padding: 2px 7px; border-radius: 999px; background: var(--ip-soft);
    color: #475569; text-align: center; }
.ip-fchip-x { width: 22px; height: 22px; margin-left: -6px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%;
    background: var(--ip-blue); color: #fff !important; font-size: 11px; text-decoration: none !important; }
.ip-fchip-x:hover { background: var(--ip-blue-dark); }
.ip-fbar-clear { font-size: 13px; }
.ip-fbar { margin: 0 0 16px; }
.ip-fbar-search { position: relative; flex: 1 1 240px; min-width: 200px; }
.ip-fbar-search .fa { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ip-muted); font-size: 13px; pointer-events: none; }
.ip-fbar-search .ip-input { width: 100%; height: 34px; padding-left: 32px; border-radius: 999px; font-size: 13.5px; }
.ip-fbar-btn { height: 34px; border-radius: 999px; font-size: 13px; }

/* Licenses: status as always-visible buttons (All · Available · Assigned · Used · Expired), at the start of the filter line */
.ip-seg { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 999px; background: var(--ip-soft); border: 1px solid var(--ip-line); }
.ip-seg a { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border-radius: 999px; color: #475569; font-size: 13px;
    font-weight: 600; white-space: nowrap; text-decoration: none !important; transition: background .15s, color .15s, box-shadow .15s; }
.ip-seg a:hover { color: var(--ip-blue); background: #fff; }
.ip-seg a.is-on { background: #fff; color: var(--ip-blue); box-shadow: 0 1px 3px rgba(15, 23, 42, .14); }
.ip-seg a.is-zero:not(.is-on) { opacity: .55; }
.ip-seg em { font-style: normal; font-size: 11px; font-weight: 700; min-width: 18px; padding: 1px 6px; border-radius: 999px; background: #fff; color: #475569; text-align: center; }
.ip-seg a.is-on em { background: #e0ecf8; color: var(--ip-blue); }
.ip-seg .ip-dot { width: 8px; height: 8px; }
@media (max-width: 767px) { .ip-seg { width: 100%; overflow-x: auto; } }
.ip-fbar-icon { width: 34px; padding: 0; justify-content: center; }
.ip-fbar .ip-seg ~ .ip-fbar-search { flex-basis: 150px; min-width: 130px; }
/* on the Licenses line: slimmer status buttons and chips, so status, filters, search and CSV fit on one line */
.ip-fbar .ip-seg a { padding: 0 8px; gap: 5px; font-size: 12.5px; }
.ip-fbar .ip-seg em { padding: 1px 5px; min-width: 16px; }
.ip-seg ~ .ip-fdrop > .ip-fchip { padding: 0 10px; gap: 5px; }
.ip-seg ~ .ip-fdrop > .ip-fchip > .fa:first-child { display: none; }
