/* The original Manager shell, theme and assets are reused. Entry-only rules
   also isolate the standalone login layout from Manager's global form rules. */
html[data-portal-auth]:not([data-portal-auth=ready]) body{display:block!important}
html[data-portal-auth]:not([data-portal-auth=ready]) body>.sidebar,html[data-portal-auth]:not([data-portal-auth=ready]) body>.workspace,html[data-portal-auth]:not([data-portal-auth=ready]) body>dialog,html[data-portal-auth]:not([data-portal-auth=ready]) body>.province-gate,html[data-portal-auth]:not([data-portal-auth=ready]) #portalJobsDock{display:none!important}
html[data-portal-auth=ready] #portalEntry{display:none}
html[data-portal-auth]:not([data-portal-auth=ready]) #sidebarResize{display:none!important}
.organization-entry-card{padding:18px;margin:14px 0;display:grid;gap:10px}
.organization-entry-card p{margin:6px 0 0}
.organization-entry-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.organization-entry-actions input{flex:1;min-width:180px;font-family:monospace;text-align:left}
.organization-entry-actions a{white-space:nowrap;text-decoration:none;border:1px solid var(--line);border-radius:9px;padding:9px 13px}
@media(min-width:1101px){html[data-portal-auth=ready] body>#sidebarResize{width:14px;inset-inline-start:calc(var(--sidebar-width) - 7px);z-index:95;touch-action:none}html[data-portal-auth=ready] body>#sidebarResize:after{left:6px}}
.portal-jobs-dock{margin-top:16px;padding:0;background:var(--paper);border:1px solid var(--line);border-radius:11px;overflow:hidden}
.portal-jobs-dock summary{padding:12px 16px;cursor:pointer;font-size:12px;display:flex;align-items:center;gap:8px}.portal-jobs-dock details:not([open])>#portalJobsList{display:none}.portal-jobs-dock #portalJobsList{max-height:340px;overflow:auto}.portal-job{border-top:1px solid var(--line);padding:12px 16px;font-size:12px;display:grid;gap:6px}.portal-job button{font-size:11px;min-height:30px;padding:5px 10px}.portal-job p{margin:0;color:var(--muted)}.portal-job.failed p{color:var(--danger-ink)}
html[data-portal-auth]:not([data-portal-auth=ready]) #ambientDust{display:none}#portalEntry{font-size:16px;line-height:normal;font-weight:400;letter-spacing:normal}

/* Scope selection uses the same navy surfaces, mint actions and Vazirmatn
   typography as the local application. These rules never reach Manager. */
#portalEntry{position:relative;isolation:isolate;min-height:100svh;background:radial-gradient(ellipse at 13% 16%,#1b555b66,transparent 56%),radial-gradient(ellipse at 90% 90%,#1d3d5266,transparent 50%),#091e2a}
#portalEntry .entry-shell{width:min(1120px,calc(100% - 64px));grid-template-columns:minmax(0,.88fr) minmax(0,1.3fr);gap:64px;padding:48px 0}
#portalEntry .entry-intro{position:relative;min-width:0;gap:32px}
#portalEntry .entry-brand{font-weight:800;color:#e9f4f5}
#portalEntry .entry-mark{filter:drop-shadow(0 4px 9px #62e0c822)}
#portalEntry .entry-message h1{font-size:clamp(30px,3vw,42px);line-height:1.6;letter-spacing:-.7px;color:#e9f4f5}
#portalEntry .entry-message p{font-size:14px;line-height:2.1}
#portalEntry .entry-steps{flex-wrap:wrap;row-gap:14px}
#portalEntry .entry-steps li{min-width:0}
#portalEntry .entry-catalog{position:relative;overflow:hidden;padding:30px;border:1px solid #426a76;border-radius:23px;background:linear-gradient(145deg,#1a3e4bd9,#112f3de8);box-shadow:0 24px 72px #020c1540,inset 0 1px 0 #c7f7ed08;animation:portal-entry-in .4s ease-out both}
#portalEntry .entry-catalog::before{content:"";position:absolute;inset:0 24px auto;height:1px;background:linear-gradient(90deg,transparent,#7debd555,transparent);pointer-events:none}
#portalEntry .catalog-heading{align-items:flex-start;gap:18px}
#portalEntry .catalog-heading h2{margin:6px 0 7px;font-size:22px;line-height:1.8;font-weight:750}
#portalEntry .catalog-heading p{font-size:12px;line-height:1.9}
#portalEntry .eyebrow{color:#7debd5;line-height:1.7}
#portalEntry .icon-button{min-width:38px;width:38px;height:38px;min-height:38px;padding:8px!important;border-radius:10px!important;transform:none;box-shadow:none;line-height:1;flex:none}
#portalEntry .icon-button:hover{background:#1d4350;color:#e9f4f5;border-color:#5bbfae;transform:none;box-shadow:none}
#portalEntry .catalog-search{display:flex;flex-direction:row;align-items:center;flex:none;min-width:0;width:100%;gap:12px;min-height:52px;margin:24px 0 0;padding:0 15px;border:1px solid #426572;border-radius:12px;background:#0d2634;color:#acc7d1;cursor:text;transition:border-color .18s,box-shadow .18s}
#portalEntry .catalog-search>svg{display:block;flex:0 0 19px;width:19px;height:19px;pointer-events:none}
#portalEntry .catalog-search input{display:block;flex:1;min-width:0;width:100%;height:50px;min-height:50px;margin:0;padding:0;border:0;border-radius:0;background:transparent;color:#e9f4f5;font-size:13px;line-height:1.8;box-shadow:none;outline:none;cursor:text}
#portalEntry .catalog-search input:disabled{cursor:text;opacity:.6}
#portalEntry .catalog-search input:focus{background:transparent;box-shadow:none;outline:none}
#portalEntry .catalog-search:focus-within{border-color:#62e0c8;box-shadow:0 0 0 3px #62e0c814}
#portalEntry .catalog-status{margin:14px 0;min-height:22px;font-size:12px;line-height:1.9}
#portalEntry .workspace-list{gap:12px;padding:2px;grid-template-columns:repeat(2,minmax(0,1fr))}
#portalEntry .workspace-card{min-height:88px;padding:17px 16px;gap:14px;border:1px solid #426572;border-radius:14px;background:#102d3a;box-shadow:none;transition:border-color .18s,background .18s,transform .18s}
#portalEntry .workspace-card:only-child{grid-column:1/-1;min-height:90px}
#portalEntry a.workspace-card{text-decoration:none;cursor:pointer}
#portalEntry .scope-symbol.has-avatar{background:#fff;overflow:hidden}
#portalEntry .scope-symbol.has-avatar>svg{display:none}
#portalEntry .scope-symbol img{display:block;width:100%;height:100%;object-fit:contain;padding:3px}
#portalEntry .directory-pagination{display:flex;align-items:center;justify-content:center;gap:16px;margin-top:14px;color:var(--muted);font-size:12px}
#portalEntry .directory-account{display:block;margin:18px auto 0;padding:8px 14px}
#portalEntry .workspace-card:hover,#portalEntry .workspace-card.is-selected{background:#1a444b;border-color:#62e0c8;box-shadow:0 5px 18px #020c1526;transform:translateY(-1px)}
#portalEntry .workspace-card strong{font-size:14px;font-weight:750;line-height:1.8}
#portalEntry .workspace-card small{font-size:11px;line-height:1.8;margin-top:4px}
#portalEntry .scope-symbol{width:42px;height:42px;border-radius:12px;background:#62e0c80d;border-color:#477778;color:#7debd5}
#portalEntry .catalog-foot{margin-top:24px;padding-top:17px;line-height:1.9;font-size:11px}

/* Manager's global three-column form and column labels otherwise leak into
   this dialog: the two inputs and submit must each occupy a complete row. */
#portalEntry .credentials-dialog{width:min(456px,calc(100% - 32px));max-width:456px;max-height:calc(100svh - 32px);margin:auto;padding:30px;border-radius:22px;border-color:#547b86;background:linear-gradient(145deg,#193d4a,#102b38);box-shadow:0 30px 100px #020c1577}
#portalEntry .credentials-dialog[open]{animation:portal-entry-in .22s ease-out both}
#portalEntry .credentials-dialog::backdrop{background:#03131ed9;backdrop-filter:blur(7px)}
#portalEntry .dialog-heading{align-items:center}
#portalEntry .dialog-heading h2{margin:5px 0 0;font-size:23px;font-weight:750;line-height:1.7}
#portalEntry .selected-workspace{margin:22px 0 15px;padding:15px;border-color:#426572;border-radius:13px;background:#0d2936;gap:13px}
#portalEntry .selected-workspace strong{font-size:14px;line-height:1.9}
#portalEntry .selected-workspace small{min-height:0;line-height:1.8}
#portalEntry .dialog-hint{font-size:12px;line-height:2;margin:0 0 22px;color:#acc7d1;white-space:normal}
#portalEntry #credentialsForm{display:grid;grid-template-columns:minmax(0,1fr);grid-auto-flow:row;align-items:stretch;justify-items:stretch;gap:17px;width:100%;min-width:0;margin:0;padding:0}
#portalEntry #credentialsForm>*{grid-column:1/-1;min-width:0;margin:0}
#portalEntry #credentialsForm>label{display:flex;flex-direction:column;align-items:stretch;gap:8px;min-width:0;width:100%;font-size:13px;line-height:1.8;font-weight:650;color:#e9f4f5}
#portalEntry #credentialsForm input{display:block;width:100%;height:51px;min-height:51px;margin:0;padding:12px 14px;border:1px solid #426572;border-radius:11px;background:#0d2634;color:#e9f4f5;font-size:15px;line-height:1.7;box-shadow:none;outline:none}
#portalEntry #credentialsForm input:focus{border-color:#62e0c8;box-shadow:0 0 0 3px #62e0c81f;background:#0b2532;outline:none}
#portalEntry #credentialsForm input[aria-invalid=true]{border-color:#e2929f}
#portalEntry #credentialsForm .password-field{position:relative;display:flex;align-items:center;min-width:0}
#portalEntry #credentialsForm .password-field input{padding-left:52px!important;padding-right:14px!important}
#portalEntry #credentialsForm .password-field .icon-button{position:absolute;inset-inline-start:auto;inset-inline-end:auto;left:8px;right:auto;top:50%;transform:translateY(-50%);width:35px;height:35px;min-width:35px;min-height:35px;background:transparent;border-color:transparent;padding:8px!important}
#portalEntry #credentialsForm .password-field .icon-button:hover{color:#7debd5;background:#62e0c80d;box-shadow:none}
#portalEntry #loginSubmit{width:100%;min-height:51px;margin-top:3px;border:1px solid #62e0c8;border-radius:11px;padding:13px 18px;background:#62e0c8;color:#062d32;gap:12px;line-height:1.8;font-size:14px;font-weight:800;box-shadow:0 7px 20px #020c1526;white-space:normal}
#portalEntry #loginSubmit:hover{background:#8aeedb;border-color:#8aeedb;transform:translateY(-1px)}
#portalEntry #loginSubmit:disabled{cursor:wait;transform:none}
#portalEntry #chooseAnotherWorkspace{min-height:32px;padding:3px 6px;background:transparent;border:0;color:#acc7d1;font-size:12px;box-shadow:none;transform:none}
#portalEntry #chooseAnotherWorkspace:hover{color:#7debd5;background:transparent;box-shadow:none}
#portalEntry .password-note{font-size:11px;line-height:1.9;padding-top:17px;margin:20px 0 0;color:#9bb6c2;white-space:normal}
#portalEntry .entry-error{font-size:12px;line-height:1.95;white-space:normal}
#portalEntry button:focus-visible{outline:3px solid #62e0c8;outline-offset:3px}
@keyframes portal-entry-in{from{opacity:0;transform:translateY(9px)}to{opacity:1;transform:translateY(0)}}
@media(min-width:900px) and (max-height:720px){#portalEntry .entry-shell{padding:28px 0;gap:48px}#portalEntry .entry-intro{gap:25px}#portalEntry .entry-catalog{padding:25px}#portalEntry .entry-message h1{font-size:32px}}
@media(max-width:800px){#portalEntry .entry-shell{width:min(620px,calc(100% - 32px));grid-template-columns:minmax(0,1fr);gap:27px;padding:27px 0}#portalEntry .entry-intro{gap:17px;padding:0}#portalEntry .entry-message h1{font-size:28px;max-width:none;margin:7px 0}#portalEntry .entry-message p{max-width:none;font-size:13px}#portalEntry .entry-catalog{padding:25px}#portalEntry .catalog-search{margin-top:20px}}
@media(max-width:440px){#portalEntry .entry-shell{width:calc(100% - 24px);padding:20px 0;gap:22px}#portalEntry .entry-message h1{font-size:24px}#portalEntry .entry-catalog{padding:20px;border-radius:19px}#portalEntry .catalog-heading h2{font-size:19px}#portalEntry .workspace-list{grid-template-columns:minmax(0,1fr)}#portalEntry .workspace-card{min-height:78px;padding:14px}#portalEntry .credentials-dialog{padding:24px;width:calc(100% - 24px);max-height:calc(100svh - 24px)}#portalEntry .dialog-heading h2{font-size:21px}}
@media(prefers-reduced-motion:reduce){#portalEntry .entry-catalog,#portalEntry .credentials-dialog[open]{animation:none}#portalEntry *{transition:none!important}}

/* The team pager follows the page direction; its number and total stay inline. */
body #users-section .portal-team-page-indicator{display:flex;align-items:center;gap:7px;white-space:nowrap;min-height:34px}
body #users-section .team-pagination .portal-team-page-indicator>label{display:flex;flex-direction:row;align-items:center;gap:7px;white-space:nowrap}
body #users-section .portal-team-page-indicator #teamPageTotal{display:inline;white-space:nowrap;font-variant-numeric:tabular-nums}
html[dir=rtl] body #teamPrev>.icon,html[dir=ltr] body #teamNext>.icon{transform:rotate(180deg)}

/* A successful sign-in opens the workspace without flashing the catalog again. */
#portalEntry .portal-entry-loading{display:none}
html[data-portal-auth=loading] #portalEntry>.entry-shell{display:none}
html[data-portal-auth=loading] #portalEntry>.portal-entry-loading{display:flex;min-height:100svh;width:min(520px,calc(100% - 40px));margin:auto;padding:48px 0;box-sizing:border-box;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:19px;animation:portal-entry-in .4s ease-out both}
#portalEntry .portal-entry-loading h2{margin:0;color:#e9f4f5;font-size:23px;line-height:1.8}
#portalEntry .portal-entry-loading p{margin:0;color:#acc7d1;font-size:13px;line-height:2.1;overflow-wrap:anywhere}
#portalEntry .portal-entry-loading .entry-brand{display:flex;align-items:center;gap:13px;margin-bottom:12px;font-size:22px}
#portalEntry .portal-entry-progress{width:40px;height:40px;margin:6px 0;border:3px solid #7debd526;border-top-color:#7debd5;border-radius:50%;animation:portal-entry-progress 1s linear infinite}
@keyframes portal-entry-progress{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){html[data-portal-auth=loading] #portalEntry>.portal-entry-loading,#portalEntry .portal-entry-progress{animation:none}}

/* The heat source remains explicit: boundary locations never become visits. */
body #iran-map-section .portal-heat-source[hidden]{display:none!important}
body #iran-map-section #iranMapLegend .portal-heat-empty{flex-basis:100%;padding:9px 12px;border:1px solid #f1bd6b55;border-radius:8px;background:#f1bd6b0a;color:var(--iran-amber,#f1bd6b);font-size:11px;line-height:1.9}

/* Keep reset credentials out of the manager's global three-column form. */
body #provinceResetDialog{box-sizing:border-box;width:680px;max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px);margin:auto;padding:24px;overflow:auto;scrollbar-gutter:stable}
body #provinceResetDialog .member-dialog-heading{display:flex;align-items:center;gap:16px;margin:0 0 18px;padding-bottom:16px}
body #provinceResetDialog .member-dialog-heading h2{flex:1;min-width:0;margin:0;font-size:20px;line-height:1.8}
body #provinceResetDialog #closeProvinceReset{flex:0 0 40px;width:40px;height:40px;min-height:40px;padding:10px}
body #provinceResetDialog>p{margin:0 0 12px;line-height:2;overflow-wrap:anywhere}
body #provinceResetPreviewForm{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-flow:row;align-items:end;gap:20px 16px;width:100%;min-width:0;margin:22px 0 0;padding:0}
body #provinceResetPreviewForm>label{display:flex;flex-direction:column;align-items:stretch;gap:8px;width:100%;min-width:0;margin:0;font-size:13px;line-height:1.85;overflow-wrap:anywhere}
body #provinceResetDialog input{box-sizing:border-box;display:block;width:100%;min-width:0;min-height:46px;margin:0;padding:10px 12px;line-height:1.7}
body #provinceResetDialog input[dir=ltr]{text-align:left}
body #provinceResetPreviewForm>button{grid-column:1/-1;justify-self:end;min-width:200px;min-height:46px;margin:0;padding:10px 20px;white-space:normal;line-height:1.8}
body #provinceResetReview{grid-template-columns:minmax(0,1fr);min-width:0;margin-top:22px;gap:16px;padding-top:20px;border-top:1px solid var(--line)}
body #provinceResetReview>label{display:flex;flex-direction:column;gap:8px;min-width:0;line-height:1.85}
body #provinceResetCounts{min-width:0;overflow-wrap:anywhere}
body #applyProvinceReset{min-width:0;min-height:46px;white-space:normal;line-height:1.9}
@media(max-width:560px){body #provinceResetDialog{max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);padding:18px}body #provinceResetDialog .member-dialog-heading{gap:10px;margin-bottom:14px}body #provinceResetDialog .member-dialog-heading h2{font-size:18px}body #provinceResetPreviewForm{grid-template-columns:minmax(0,1fr);gap:17px;margin-top:18px}body #provinceResetPreviewForm>button{justify-self:stretch;width:100%;min-width:0}}
