:root {
    color-scheme: light;
    font: 15px/1.7 "Vazirmatn", "IRANSans", "Segoe UI", Tahoma, sans-serif;
    color: #192333;
    background: #eef3f9;
    --navy: #273a51;
    --muted: #66778d;
    --border: #dce5f1;
    --blue: #0967ef;
}
* { box-sizing: border-box; }
body {
    margin: 0; min-height: 100vh; min-height: 100svh;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 30px 16px 18px;
    background: radial-gradient(ellipse at 80% 8%, #fff 0, transparent 48%), linear-gradient(135deg, #e9eff7, #f6f8fc);
    isolation: isolate;
}
.background-video, .background-overlay { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.background-video { z-index: -2; object-fit: cover; opacity: 0; transition: opacity 2200ms ease-in-out; }
.background-video.has-played { opacity: 1; }
.background-overlay { z-index: -1; background: #14283f55; opacity: 0; transition: opacity 2200ms ease-in-out; }
.background-video.has-played + .background-overlay { opacity: 1; }
.video-toggle { position: fixed; z-index: 2; inset-inline-start: 16px; inset-block-end: 15px; border: 1px solid #dce5f1; border-radius: 8px; background: #fff; color: var(--navy); padding: 7px 12px; font: inherit; font-size: 12px; cursor: pointer; box-shadow: 0 3px 14px #152e4722; }
[hidden] { display: none !important; }
svg { display: block; width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.portal {
    width: min(100%, 740px); display: grid; grid-template-columns: 1fr 1.2fr; direction: ltr;
    border-radius: 22px; overflow: hidden;
    box-shadow: 0 22px 65px #1b395526; background: #fff; border: 1px solid #d5e0ef;
}
.portal-brand, .portal-content { direction: rtl; }
.portal-brand {
    min-height: 340px; position: relative; isolation: isolate;
    display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 12px;
    padding: 34px; background: linear-gradient(145deg, #354a63, #1f2e43); color: #fff;
    overflow: hidden;
}
.portal-brand::before, .portal-brand::after {
    content: ""; position: absolute; border: 1px solid #ffffff17; border-radius: 50%; z-index: -1; pointer-events: none;
    width: 260px; height: 260px; inset-inline-end: -115px; bottom: -115px;
}
.portal-brand::after { width: 350px; height: 350px; inset-inline-end: -160px; bottom: -160px; }
.brand-mark { display: grid; place-items: center; height: 57px; width: 57px; border-radius: 16px; background: linear-gradient(145deg, #3997ff, #0967ef); box-shadow: 0 8px 24px #10294355; }
.brand-mark svg { width: 34px; height: 34px; }
h1 { margin: 0; font-size: clamp(22px, 3vw, 30px); line-height: 1.65; font-weight: 850; }
.portal-brand p { margin: 0; color: #cfdbeb; font-size: 13px; }
.portal-content { padding: 35px 28px; align-self: center; min-width: 0; }
.intro { margin-bottom: 24px; }
.intro h2 { margin: 0 0 3px; font-size: 20px; color: var(--navy); }
.intro p { margin: 0; font-size: 13px; color: var(--muted); }
.entry { width: 100%; min-height: 79px; display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-radius: 12px; text-decoration: none; color: #253c57; cursor: pointer; }
.manager-entry { background: linear-gradient(138deg, #2786fa, #0965e6); color: #fff; box-shadow: 0 5px 15px #0967ef25; margin-bottom: 12px; }
.entry-icon { display: grid; place-items: center; flex: 0 0 43px; height: 43px; border-radius: 10px; color: #135ebd; background: #e8f1ff; }
.manager-entry .entry-icon { background: #ffffff25; color: #fff; }
.entry-text { display: grid; gap: 2px; min-width: 0; flex: 1; }
.entry-text strong { font-size: 16px; }
.entry-text small { font-size: 11px; color: var(--muted); overflow-wrap: anywhere; }
.manager-entry .entry-text small { color: #e8f2ff; }
.arrow { flex: 0 0 18px; width: 18px; height: 18px; }
.organizations { border: 1px solid var(--border); border-radius: 12px; background: #f8faff; overflow: hidden; }
.organization-summary { list-style: none; }
.organization-summary::-webkit-details-marker { display: none; }
.organization-summary::marker { content: ""; }
.organizations[open] .expand-arrow { transform: rotate(180deg); }
.organizations.is-closing .expand-arrow { transform: rotate(0); }
.organization-list { padding: 0 12px 12px; }
.organization-list ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; max-height: 310px; overflow: auto; }
.organization-link { display: flex; align-items: center; gap: 10px; min-height: 43px; padding: 9px 12px; text-decoration: none; color: #263e5c; background: #fff; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; font-weight: 650; }
.organization-link span:nth-child(2) { flex: 1; overflow-wrap: anywhere; }
.organization-dot { flex: 0 0 7px; width: 7px; height: 7px; border-radius: 50%; background: #24a878; }
.organization-link .arrow { color: #647b98; width: 15px; height: 15px; }
.empty { color: var(--muted); padding: 10px; margin: 0; font-size: 13px; text-align: center; }
.portal-footer { font-size: 12px; color: #536880; text-align: center; padding-top: 17px; }
body:has(.background-video.has-played) .portal-footer { color: #fff; text-shadow: 0 1px 4px #14283f; }
:focus-visible { outline: 3px solid #77adff; outline-offset: -3px; }
@media (hover:hover) {
    .manager-entry:hover { filter: brightness(1.06); }
    .organization-summary:hover { background: #edf4ff; }
    .organization-link:hover { background: #edf4ff; border-color: #adcaf5; }
}
@media (prefers-reduced-motion:no-preference) {
    .entry, .organization-link { transition: background-color 180ms, border-color 180ms, filter 180ms; }
    .expand-arrow { transition: transform 450ms cubic-bezier(.25,.8,.25,1); }
    .organizations[open]:not(.is-enhanced) .organization-list { animation: reveal 400ms ease-out both; }
    @keyframes reveal { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }
}
@media (prefers-reduced-motion: reduce) { .background-video, .background-overlay { transition: none; } }
@media (max-width: 600px) {
    .portal { grid-template-columns: 1fr; width: min(100%, 425px); border-radius: 18px; }
    .portal-brand { min-height: auto; padding: 25px 23px; gap: 8px; }
    .brand-mark { width: 46px; height: 46px; border-radius: 12px; }
    .brand-mark svg { width: 28px; height: 28px; }
    .portal-content { padding: 23px 19px; }
    .intro { margin-bottom: 18px; }
    .entry { min-height: 72px; padding: 11px; }
}
