:root {
    --portal-bg: var(--igs-color-canvas, #f8fafc);
    --portal-surface: var(--igs-color-surface, #ffffff);
    --portal-surface-soft: var(--igs-color-surface-subtle, #f8fafc);
    --portal-border: var(--igs-color-border, #e2e8f0);
    --portal-text: var(--igs-color-text, #0f172a);
    --portal-muted: var(--igs-color-muted, #64748b);
    --portal-primary: var(--igs-color-primary, #4f46e5);
    --portal-primary-strong: var(--igs-color-primary-hover, #4338ca);
    --portal-primary-soft: var(--igs-color-primary-soft, #eef2ff);
    --portal-success: var(--igs-color-success, #15803d);
    --portal-warning: var(--igs-color-warning, #b45309);
    --portal-danger: var(--igs-color-danger, #b91c1c);
    --portal-radius: var(--igs-radius-xl, 16px);
    --portal-shadow: var(--igs-shadow-lg, 0 20px 48px rgba(15, 23, 42, .10));
    --portal-shadow-soft: var(--igs-shadow-sm, 0 5px 18px rgba(15, 23, 42, .05));
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body.portal-body {
    min-height: 100vh;
    margin: 0;
    color: var(--portal-text);
    font-family: "Vazirmatn", Tahoma, "Segoe UI", Arial, sans-serif;
    background:
        radial-gradient(circle at 92% -5%, rgba(79,70,229,.14), transparent 30rem),
        radial-gradient(circle at 5% 18%, rgba(14,165,233,.08), transparent 26rem),
        var(--portal-bg);
}

a { color: var(--portal-primary); }
.portal-container { width: min(1180px, calc(100% - 32px)); margin-inline: auto; }

.portal-topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    border-bottom: 1px solid rgba(226,232,240,.85);
    background: rgba(255,255,255,.88);
    backdrop-filter: blur(16px);
}
.portal-topbar__inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.portal-brand { display: flex; align-items: center; gap: 12px; color: var(--portal-text); text-decoration: none; }
.portal-brand__mark {
    width: 42px; height: 42px; border-radius: 14px;
    display: grid; place-items: center;
    color: #fff; font-weight: 850; letter-spacing: -.04em;
    background: linear-gradient(145deg, #312e81, #6366f1 70%, #818cf8);
    box-shadow: 0 10px 28px rgba(79,70,229,.28);
}
.portal-brand__text { display: grid; gap: 1px; }
.portal-brand__text strong { font-size: 1.05rem; }
.portal-brand__text small { color: var(--portal-muted); font-size: .72rem; }
.portal-topbar__actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.portal-main { padding-block: 34px 54px; }
.portal-footer { padding: 26px 0 34px; color: var(--portal-muted); text-align: center; font-size: .82rem; }

.portal-btn {
    min-height: var(--igs-control-height, 42px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 15px;
    border: 1px solid transparent;
    border-radius: var(--igs-radius-lg, 12px);
    background: linear-gradient(135deg, var(--portal-primary), #6366f1);
    box-shadow: 0 8px 20px rgba(79,70,229,.2);
    color: #fff !important;
    cursor: pointer;
    font: inherit;
    font-weight: 650;
    text-decoration: none;
    transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}
.portal-btn:hover { transform: translateY(-1px); box-shadow: 0 12px 26px rgba(79,70,229,.26); filter: saturate(1.08); }
.portal-btn--secondary { background: #fff; border-color: var(--portal-border); box-shadow: none; color: #334155 !important; }
.portal-btn--ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--portal-primary) !important; }
.portal-btn--danger { background: #fff; border-color: #fecaca; box-shadow: none; color: var(--portal-danger) !important; }
.portal-btn--wide { width: 100%; }

.portal-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    margin-bottom: 22px;
    padding: 28px;
    border: 1px solid rgba(199,210,254,.75);
    border-radius: 26px;
    background: linear-gradient(125deg, #ffffff 12%, #f5f3ff 58%, #eef2ff);
    box-shadow: var(--portal-shadow-soft);
}
.portal-hero::after {
    content: "";
    position: absolute;
    inset-inline-start: -80px;
    top: -120px;
    width: 290px;
    height: 290px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99,102,241,.16), rgba(99,102,241,0) 70%);
}
.portal-hero__content { position: relative; z-index: 1; min-width: 0; }
.portal-kicker { color: var(--portal-primary); font-size: .8rem; font-weight: 800; margin-bottom: 8px; }
.portal-hero h1 { margin: 0 0 8px; font-size: clamp(1.55rem, 4vw, 2.35rem); letter-spacing: -.035em; }
.portal-hero p { margin: 0; color: var(--portal-muted); line-height: 1.9; }
.portal-hero__actions { position: relative; z-index: 1; display: flex; gap: 8px; flex-wrap: wrap; }

.portal-preview {
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    margin-bottom: 18px; padding: 14px 16px;
    border: 1px solid #fcd34d; border-radius: 16px;
    background: #fffbeb; color: #92400e;
}
.portal-preview p { margin: 2px 0 0; font-size: .86rem; }

.portal-grid { display: grid; gap: 16px; grid-template-columns: repeat(12, minmax(0,1fr)); }
.portal-card {
    grid-column: span 4;
    min-width: 0;
    border: 1px solid var(--portal-border);
    border-radius: var(--portal-radius);
    background: var(--portal-surface);
    box-shadow: var(--portal-shadow-soft);
    overflow: hidden;
}
.portal-card--wide { grid-column: 1 / -1; }
.portal-card--half { grid-column: span 6; }
.portal-card__head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 18px 20px 13px;
    border-bottom: 1px solid #f1f5f9;
}
.portal-card__head h2, .portal-card__head h3 { margin: 0; font-size: 1.05rem; }
.portal-card__count { min-width: 28px; padding: 3px 8px; border-radius: 999px; background: var(--portal-primary-soft); color: var(--portal-primary); font-size: .75rem; font-weight: 800; text-align: center; }
.portal-card__body { padding: 5px 20px 16px; }

.portal-list { display: grid; }
.portal-list__item {
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid #f1f5f9;
    color: inherit; text-decoration: none;
}
.portal-list__item:last-child { border-bottom: 0; }
.portal-list__item:hover .portal-list__title { color: var(--portal-primary); }
.portal-list__main { min-width: 0; }
.portal-list__title { font-weight: 700; color: #1e293b; transition: color .14s ease; }
.portal-list__meta { color: var(--portal-muted); font-size: .78rem; margin-top: 4px; line-height: 1.7; }
.portal-list__value { white-space: nowrap; font-weight: 750; font-variant-numeric: tabular-nums; }
.portal-status { display: inline-flex; align-items: center; padding: 4px 9px; border-radius: 999px; background: #f1f5f9; color: #475569; font-size: .72rem; font-weight: 700; }
.portal-empty { padding: 24px 8px; text-align: center; color: var(--portal-muted); }
.portal-empty__mark { width: 44px; height: 44px; display: grid; place-items: center; margin: 0 auto 10px; border-radius: 15px; background: var(--portal-surface-soft); color: #94a3b8; font-size: 1.2rem; }

.portal-feature-card { padding: 22px; background: linear-gradient(135deg, #312e81, #4f46e5); color: #fff; }
.portal-feature-card h2 { margin: 0 0 8px; }
.portal-feature-card p { color: #e0e7ff; line-height: 1.9; }
.portal-feature-card .portal-btn { background: #fff; color: #4338ca !important; box-shadow: none; }

.portal-account-switcher { margin-bottom: 18px; display: flex; gap: 8px; flex-wrap: wrap; }
.portal-account-switcher a { padding: 7px 11px; border: 1px solid var(--portal-border); border-radius: 999px; background: #fff; color: #475569; text-decoration: none; font-size: .82rem; }

.portal-auth {
    min-height: calc(100vh - 145px);
    display: grid;
    place-items: center;
    padding-block: 26px;
}
.portal-auth__box {
    width: min(920px, 100%);
    display: grid;
    grid-template-columns: minmax(0, .85fr) minmax(340px, 1fr);
    overflow: hidden;
    border: 1px solid var(--portal-border);
    border-radius: 28px;
    background: #fff;
    box-shadow: var(--portal-shadow);
}
.portal-auth__visual {
    position: relative; overflow: hidden;
    padding: 44px 36px;
    display: flex; flex-direction: column; justify-content: space-between;
    color: #fff;
    background: linear-gradient(145deg, #312e81, #4f46e5 62%, #7c3aed);
}
.portal-auth__visual::after { content:""; position:absolute; width:330px; height:330px; border-radius:50%; inset-inline-start:-130px; bottom:-160px; background:rgba(255,255,255,.1); }
.portal-auth__visual h2 { position: relative; z-index: 1; margin: 0 0 12px; font-size: 1.8rem; }
.portal-auth__visual p { position: relative; z-index: 1; margin: 0; color: #e0e7ff; line-height: 2; }
.portal-auth__visual small { position: relative; z-index: 1; color: #c7d2fe; }
.portal-auth__form { padding: 42px 38px; }
.portal-auth__form h1 { margin: 0 0 7px; font-size: 1.55rem; }
.portal-auth__form > p.portal-muted { margin: 0 0 22px; }
.portal-muted { color: var(--portal-muted); line-height: 1.8; }

.portal-form p { margin: 0 0 16px; }
.portal-form label { display: block; margin-bottom: 7px; color: #334155; font-size: .83rem; font-weight: 700; }
.portal-form input:not([type="checkbox"]),
.portal-form textarea,
.portal-form select {
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    background: #fff;
    color: var(--portal-text);
    font: inherit;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.portal-form textarea { min-height: 130px; resize: vertical; }
.portal-form input:focus, .portal-form textarea:focus, .portal-form select:focus { border-color: #818cf8; box-shadow: 0 0 0 4px rgba(99,102,241,.12); }
.portal-form ul.errorlist { list-style: none; margin: 5px 0 8px; padding: 9px 11px; border-radius: 10px; background: #fef2f2; color: var(--portal-danger); font-size: .8rem; }
.portal-form .helptext { display: block; margin-top: 5px; color: var(--portal-muted); font-size: .74rem; line-height: 1.7; }
.igs-identity-live-status { display:block; font-size:.74rem; line-height:1.7; margin-top:5px; }
.igs-identity-live-status[data-status="available"] { color:#047857; }
.igs-identity-live-status[data-status="already_registered"],
.igs-identity-live-status[data-status="invalid"] { color:#b91c1c; font-weight:750; }
.portal-terms { max-height: 190px; overflow: auto; margin-bottom: 18px; padding: 14px; border: 1px solid var(--portal-border); border-radius: 14px; background: var(--portal-surface-soft); color: #475569; white-space: pre-wrap; line-height: 1.9; font-size: .83rem; }

.portal-page-card { max-width: 900px; margin-inline: auto; padding: 24px; border: 1px solid var(--portal-border); border-radius: 22px; background: #fff; box-shadow: var(--portal-shadow-soft); }
.portal-page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 20px; }
.portal-page-head h1 { margin: 0 0 6px; font-size: 1.45rem; }
.portal-ticket-message { padding: 16px 0; border-bottom: 1px solid #f1f5f9; }
.portal-ticket-message:last-child { border-bottom: 0; }
.portal-ticket-message__meta { display: flex; justify-content: space-between; gap: 10px; color: var(--portal-muted); font-size: .77rem; }
.portal-ticket-message p { margin-bottom: 0; line-height: 1.9; }
.portal-ticket-description { margin: 14px 0 20px; padding: 16px; border-radius: 14px; background: var(--portal-surface-soft); line-height: 2; }

@media (max-width: 900px) {
    .portal-card { grid-column: span 6; }
    .portal-card--wide { grid-column: 1 / -1; }
    .portal-auth__box { grid-template-columns: 1fr; max-width: 560px; }
    .portal-auth__visual { min-height: 210px; padding: 30px; }
}
@media (max-width: 640px) {
    .portal-container { width: min(100% - 22px, 1180px); }
    .portal-topbar__inner { min-height: 64px; }
    .portal-brand__text small { display: none; }
    .portal-main { padding-block: 22px 38px; }
    .portal-hero { align-items: stretch; flex-direction: column; padding: 21px; border-radius: 20px; }
    .portal-card, .portal-card--half { grid-column: 1 / -1; }
    .portal-preview, .portal-page-head { align-items: stretch; flex-direction: column; }
    .portal-auth__form { padding: 28px 22px; }
    .portal-auth__visual { padding: 26px 22px; }
}

/* IranGS V0.9.2 portal consistency/polish */
.portal-main { min-height: calc(100vh - 150px); }
.portal-topbar { box-shadow: 0 8px 28px rgba(15,23,42,.035); }
.portal-card { transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.portal-card:hover { border-color: #c7d2fe; box-shadow: 0 16px 34px rgba(15,23,42,.08); transform: translateY(-1px); }
.portal-card__head h2, .portal-card__head h3 { letter-spacing: -.015em; }
.portal-list__item { border-radius: 10px; margin-inline: -7px; padding-inline: 7px; transition: background .14s ease; }
.portal-list__item:hover { background: #fafbff; }
.portal-status { border: 1px solid #e2e8f0; }
.portal-empty { min-height: 115px; display: grid; place-items: center; align-content: center; border: 1px dashed #dbe3ef; border-radius: 15px; background: #fbfdff; }
.portal-empty__mark { font-weight: 850; }
.portal-page-card { box-shadow: 0 18px 45px rgba(15,23,42,.07); }
.portal-ticket-message { border-radius: 12px; padding-inline: 12px; }
.portal-ticket-message:hover { background: #fafbff; }
.portal-auth__box { box-shadow: 0 24px 70px rgba(15,23,42,.11); }
.portal-form input:not([type="checkbox"]), .portal-form textarea, .portal-form select { box-shadow: inset 0 1px 2px rgba(15,23,42,.025); }
.portal-form input::placeholder, .portal-form textarea::placeholder { color: #94a3b8; }
.portal-btn:focus-visible, .portal-form input:focus-visible, .portal-form textarea:focus-visible, .portal-form select:focus-visible, .portal-list__item:focus-visible { outline: 3px solid rgba(99,102,241,.22); outline-offset: 2px; }
.portal-account-switcher a { transition: border-color .14s ease, background .14s ease, color .14s ease; }
.portal-account-switcher a:hover { border-color: #a5b4fc; background: #eef2ff; color: #4338ca; }
@media (max-width: 640px) {
    .portal-topbar__actions .portal-btn { min-height: 38px; padding-inline: 11px; }
    .portal-card:hover { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
    .portal-card, .portal-btn, .portal-list__item, .portal-account-switcher a { transition: none; }
}

/* IranGS V0.11.6 — restrained enterprise visual refinement.
   Rules: one visual language, low-noise surfaces, fast rendering, touch-safe controls. */
:root {
    --portal-radius: 16px;
    --portal-shadow: 0 18px 48px rgba(15,23,42,.075);
    --portal-shadow-soft: 0 5px 18px rgba(15,23,42,.045);
    --portal-focus: rgba(79,70,229,.16);
}
body.portal-body {
    background:
        radial-gradient(circle at 96% -8%, rgba(79,70,229,.085), transparent 24rem),
        var(--portal-bg);
}
.portal-container { width: min(1240px, calc(100% - 36px)); }
.portal-topbar { box-shadow: 0 3px 14px rgba(15,23,42,.035); }
.portal-topbar__inner { min-height: 66px; gap: 14px; }
.portal-brand { gap: 10px; flex: 0 0 auto; }
.portal-brand__mark {
    width: 38px; height: 38px; border-radius: 11px;
    box-shadow: 0 7px 20px rgba(79,70,229,.20);
}
.portal-topbar__actions { margin-inline-start: auto; flex-wrap: nowrap; min-width: 0; }
.portal-topbar__logout { display: inline-flex; margin: 0; }
.portal-quick-action {
    min-height: 38px;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 7px 10px; border: 1px solid transparent; border-radius: 10px;
    background: transparent; color: #334155 !important; cursor: pointer;
    font: inherit; font-size: .79rem; font-weight: 700; text-decoration: none;
    white-space: nowrap; transition: background .14s ease, border-color .14s ease, color .14s ease;
}
.portal-quick-action:hover { background: #f8fafc; border-color: #e2e8f0; color: var(--portal-primary) !important; }
.portal-quick-action__icon { width: 20px; height: 20px; display: grid; place-items: center; color: var(--portal-primary); font-size: .94rem; }
.portal-quick-action__badge {
    min-width: 21px; height: 21px; display: inline-grid; place-items: center;
    padding-inline: 5px; border-radius: 999px; background: #e2e8f0; color: #334155;
    font-size: .68rem; font-weight: 850; font-variant-numeric: tabular-nums;
}
.portal-quick-action__badge--danger { background: #fee2e2; color: #b91c1c; }
.portal-quick-action--quiet { color: #64748b !important; font-weight: 650; }
.portal-role-menu { position: relative; }
.portal-role-menu > summary { list-style: none; }
.portal-role-menu > summary::-webkit-details-marker { display: none; }
.portal-role-menu[open] > summary { background: #eef2ff; border-color: #c7d2fe; color: #4338ca !important; }
.portal-role-menu__panel {
    position: absolute; inset-inline-end: 0; top: calc(100% + 8px); z-index: 80;
    width: min(360px, calc(100vw - 28px)); max-height: min(65vh, 520px); overflow: auto;
    padding: 10px 12px; border: 1px solid var(--portal-border); border-radius: 14px;
    background: #fff; box-shadow: 0 18px 45px rgba(15,23,42,.14);
}
.portal-role-menu__title { padding: 5px 4px 9px; color: #64748b; font-size: .75rem; font-weight: 800; }
.portal-message { margin-bottom: 12px; padding: 11px 14px; border: 1px solid #dbe3ef; border-radius: 12px; background: #fff; box-shadow: 0 2px 9px rgba(15,23,42,.03); }
.portal-main { padding-block: 28px 48px; }
.portal-card { box-shadow: 0 2px 10px rgba(15,23,42,.035); }
.portal-card:hover { border-color: #cbd5e1; box-shadow: 0 8px 22px rgba(15,23,42,.06); transform: translateY(-1px); }
.portal-btn { border-radius: 10px; box-shadow: 0 5px 14px rgba(79,70,229,.16); }
.portal-btn:hover { box-shadow: 0 8px 20px rgba(79,70,229,.20); }
.portal-btn--secondary, .portal-btn--ghost, .portal-btn--danger { box-shadow: none; }
.portal-hero { padding: 24px; border-radius: 18px; box-shadow: 0 3px 14px rgba(15,23,42,.04); }
.portal-page-card { border-radius: 16px; box-shadow: 0 3px 16px rgba(15,23,42,.045); }
.portal-form input:not([type="checkbox"]), .portal-form textarea, .portal-form select { border-radius: 10px; }

@media (max-width: 900px) {
    .portal-container { width: min(100% - 28px, 1240px); }
    .portal-topbar__inner { align-items: center; }
    .portal-quick-action__text { display: none; }
    .portal-quick-action { min-width: 38px; padding-inline: 8px; }
    .portal-quick-action--quiet { display: none; }
    .portal-role-menu__panel .portal-list__item { min-height: 48px; }
}
@media (max-width: 640px) {
    .portal-container { width: min(100% - 18px, 1240px); }
    .portal-topbar__inner { min-height: 58px; gap: 8px; }
    .portal-brand__mark { width: 34px; height: 34px; border-radius: 10px; font-size: .85rem; }
    .portal-brand__text strong { font-size: .92rem; }
    .portal-topbar__actions { gap: 3px; }
    .portal-quick-action { min-width: 36px; min-height: 36px; border-radius: 9px; padding: 6px; }
    .portal-quick-action__badge { min-width: 18px; height: 18px; padding-inline: 4px; font-size: .62rem; }
    .portal-main { padding-block: 18px 32px; }
    .portal-hero { padding: 18px; border-radius: 15px; }
    .portal-page-card { padding: 17px; border-radius: 14px; }
    .portal-card { border-radius: 14px; }
    .portal-list__item { min-height: 50px; }
}
@media (max-width: 390px) {
    .portal-brand__text { display: none; }
}
@media (hover: none) {
    .portal-card:hover, .portal-btn:hover { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
    .portal-quick-action { transition: none; }
}

/* IranGS v0.11.9 — resilient identity + account surface normalization.
   Keep the visual language quiet: one content column, predictable cards, no decorative noise. */
.portal-account-shell {
    width: min(1040px, 100%);
    margin-inline: auto;
    display: grid;
    gap: 16px;
}
.portal-account-shell--narrow { width: min(820px, 100%); }
.portal-account-shell--form { width: min(680px, 100%); }
.portal-account-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 24px;
    border: 1px solid var(--portal-border);
    border-radius: 18px;
    background: rgba(255,255,255,.96);
    box-shadow: 0 3px 16px rgba(15,23,42,.04);
}
.portal-account-head--accent { background: linear-gradient(125deg,#fff 15%,#f8f7ff 100%); border-color:#dbe2ff; }
.portal-account-head h1 { margin: 2px 0 5px; font-size: clamp(1.45rem,3vw,2rem); letter-spacing: -.025em; }
.portal-account-head p { margin: 0; color: var(--portal-muted); line-height: 1.85; }
.portal-account-card {
    min-width: 0;
    padding: 20px 22px;
    border: 1px solid var(--portal-border);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 3px 15px rgba(15,23,42,.04);
}
.portal-account-card--main { min-height: 100%; }
.portal-account-grid { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(280px,.75fr); gap: 16px; }
.portal-card-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:14px; }
.portal-card-heading h2 { margin:0 0 3px; font-size:1.05rem; }
.portal-card-heading p { margin:0; color:var(--portal-muted); font-size:.78rem; }
.portal-keylines { display:grid; }
.portal-keyline { display:flex; align-items:center; justify-content:space-between; gap:18px; min-height:48px; padding:10px 0; border-top:1px solid #f1f5f9; }
.portal-keyline:first-child { border-top:0; }
.portal-keyline span { color:var(--portal-muted); font-size:.8rem; }
.portal-keyline strong { min-width:0; overflow-wrap:anywhere; }
.portal-state { display:inline-flex; align-items:center; min-height:30px; padding:5px 10px; border:1px solid #e2e8f0; border-radius:999px; background:#f8fafc; color:#475569; font-size:.72rem; font-weight:800; white-space:nowrap; }
.portal-state--success { background:#f0fdf4; border-color:#bbf7d0; color:#166534; }
.portal-state--warning { background:#fffbeb; border-color:#fde68a; color:#92400e; }
.portal-account-actions { display:flex; align-items:center; gap:9px; flex-wrap:wrap; margin-top:18px; }
.portal-account-actions form { margin:0; }
.portal-account-actions--bar { margin-top:0; padding:14px 16px; border:1px solid var(--portal-border); border-radius:14px; background:#fff; box-shadow:0 2px 10px rgba(15,23,42,.03); }
.portal-empty-compact { display:grid; gap:4px; padding:15px 16px; border:1px dashed #cbd5e1; border-radius:12px; background:#f8fafc; color:#64748b; }
.portal-empty-compact strong { color:#334155; }
.portal-note { margin:16px 0 0; padding:10px 12px; border-radius:10px; background:#f8fafc; color:#64748b; font-size:.76rem; line-height:1.8; }
.portal-note--success { background:#f0fdf4; color:#166534; }
.portal-attention-card { display:flex; align-items:center; justify-content:space-between; gap:18px; border-color:#fde68a; background:#fffbeb; }
.portal-attention-card p { margin:5px 0 0; color:#92400e; line-height:1.8; }
.portal-security-row { display:flex; align-items:center; justify-content:space-between; gap:18px; padding:15px 0; border-top:1px solid #f1f5f9; }
.portal-security-row:first-child { border-top:0; padding-top:2px; }
.portal-security-row > div { display:grid; gap:4px; }
.portal-security-row span:not(.portal-state) { color:var(--portal-muted); font-size:.78rem; line-height:1.7; }
.portal-list--compact .portal-list__item { padding-block:11px; }
.portal-page-title { margin-bottom:20px; }
.portal-page-title h1 { margin:3px 0 6px; font-size:1.6rem; }
.portal-page-title p { margin:0; }
.portal-auth__box--single { grid-template-columns:1fr; width:min(800px,100%); }
.portal-auth__box--single .portal-auth__form { padding:32px 34px; }
.portal-form--registration .portal-form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 14px; }
.portal-form--registration .portal-form-grid > p { min-width:0; }
.portal-form--registration .portal-form-grid > p:has(input[type="checkbox"]),
.portal-form--registration .portal-form-grid > p:has(input[type="hidden"]) { grid-column:1/-1; }
.portal-auth__back { margin:16px 0 0 !important; text-align:center; }

/* Personal work desk must always own one full-width flow. This explicit grid
   prevents theme/admin CSS from squeezing metric cards into a narrow auto-column. */
.mydesk { width:100%; max-width:100%; display:grid !important; grid-template-columns:minmax(0,1fr) !important; gap:14px !important; }
.mydesk > * { grid-column:1 / -1 !important; min-width:0; }
.mydesk-hero { width:100%; padding:20px 22px; border:1px solid var(--portal-border); border-radius:16px; background:#fff; box-shadow:0 3px 14px rgba(15,23,42,.04); }
.mydesk-metrics { width:100%; grid-template-columns:repeat(5,minmax(120px,1fr)) !important; }
.mydesk-metric { min-width:0; }
.mydesk-grid { width:100%; grid-template-columns:minmax(0,1.5fr) minmax(300px,.65fr) !important; }
.portal-card.mydesk-focus, .portal-card.mydesk-tenants, .portal-card.mydesk-feed { padding:18px 20px; }

@media (max-width: 900px) {
    .portal-account-grid { grid-template-columns:1fr; }
    .portal-form--registration .portal-form-grid { grid-template-columns:1fr; }
    .mydesk-metrics { grid-template-columns:repeat(3,minmax(0,1fr)) !important; }
    .mydesk-grid { grid-template-columns:1fr !important; }
}
@media (max-width: 640px) {
    .portal-account-head { align-items:flex-start; flex-direction:column; padding:17px; border-radius:14px; }
    .portal-account-card { padding:16px; border-radius:14px; }
    .portal-account-actions, .portal-account-actions--bar { align-items:stretch; flex-direction:column; }
    .portal-account-actions .portal-btn, .portal-account-actions form, .portal-account-actions form .portal-btn { width:100%; }
    .portal-attention-card { align-items:stretch; flex-direction:column; }
    .portal-keyline { align-items:flex-start; flex-direction:column; gap:4px; }
    .portal-security-row { align-items:flex-start; flex-direction:column; gap:8px; }
    .portal-auth__box--single .portal-auth__form { padding:24px 18px; }
    .mydesk-hero { padding:16px; }
    .mydesk-metrics { grid-template-columns:repeat(2,minmax(0,1fr)) !important; }
    .portal-card.mydesk-focus, .portal-card.mydesk-tenants, .portal-card.mydesk-feed { padding:15px; }
}
@media (max-width: 390px) {
    .mydesk-metrics { grid-template-columns:1fr !important; }
}

/* IranGS v0.12.7 — authenticated account/customer surfaces use the same visual shell. */
body.portal-body--unified { background: #f4f7fb; }
.portal-unified-shell { direction: rtl; display: grid; grid-template-columns: 250px minmax(0,1fr); min-height: 100vh; }
.portal-unified-sidebar {
    background: rgba(255,255,255,.97);
    border-inline-end: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 18px 14px;
    position: sticky;
    top: 0;
    z-index: 35;
}
.portal-unified-brand { align-items: center; color: #0f172a; display: flex; gap: 10px; padding: 4px 6px 15px; text-decoration: none; }
.portal-unified-scope { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; display: grid; gap: 3px; margin: 4px 2px 14px; padding: 10px 11px; }
.portal-unified-scope span { color: #94a3b8; font-size: .64rem; font-weight: 750; }
.portal-unified-scope strong { color: #0f172a; font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.portal-unified-scope small { color: #64748b; font-size: .66rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.portal-unified-scope--personal { background: #eef2ff; border-color: #c7d2fe; }
.portal-unified-nav { display: grid; gap: 3px; }
.portal-unified-nav a { align-items: center; border-radius: 10px; color: #475569; display: grid; font-size: .78rem; gap: 9px; grid-template-columns: 22px minmax(0,1fr) auto; min-height: 42px; padding: 8px 10px; text-decoration: none; }
.portal-unified-nav a:hover { background: #f8fafc; color: #4338ca; }
.portal-unified-nav a span { color: #6366f1; text-align: center; }
.portal-unified-nav a b { font-weight: 700; }
.portal-unified-nav a em { background: #fee2e2; border-radius: 999px; color: #b91c1c; font-size: .65rem; font-style: normal; font-weight: 850; min-width: 21px; padding: 2px 5px; text-align: center; }
.portal-unified-sidebar__bottom { margin-top: auto; padding-top: 16px; }
.portal-unified-sidebar__bottom button { background: transparent; border: 0; color: #64748b; cursor: pointer; font: inherit; font-size: .76rem; padding: 8px 10px; width: 100%; text-align: right; }
.portal-unified-stage { min-width: 0; }
.portal-unified-topbar { align-items: center; background: rgba(255,255,255,.94); border-bottom: 1px solid #e2e8f0; display: flex; gap: 12px; justify-content: space-between; min-height: 64px; padding: 9px 22px; position: sticky; top: 0; z-index: 30; backdrop-filter: blur(12px); }
.portal-unified-topbar__scope { display: grid; min-width: 0; }
.portal-unified-topbar__scope strong { color: #0f172a; font-size: .82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.portal-unified-topbar__scope small { color: #64748b; font-size: .68rem; margin-top: 2px; }
.portal-unified-topbar__signals { align-items: center; display: flex; gap: 6px; }
.portal-unified-topbar__signals > a { align-items: center; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 9px; color: #475569; display: inline-flex; font-size: .7rem; font-weight: 850; justify-content: center; min-height: 32px; min-width: 32px; padding: 5px 8px; text-decoration: none; }
.portal-unified-topbar__signals > a.is-danger { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }
.portal-unified-topbar__signals > a.is-today { background: #f0fdf4; border-color: #bbf7d0; color: #15803d; }
.portal-body--unified .portal-main { min-height: calc(100vh - 64px); padding-block: 24px 44px; }
.portal-body--unified .portal-container { width: min(1220px, calc(100% - 32px)); }
@media (max-width: 900px) {
    .portal-unified-shell { grid-template-columns: 1fr; }
    .portal-unified-sidebar { border-bottom: 1px solid #e2e8f0; border-inline-end: 0; min-height: 0; padding: 9px 12px; position: sticky; top: 0; }
    .portal-unified-brand, .portal-unified-scope, .portal-unified-sidebar__bottom { display: none; }
    .portal-unified-nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
    .portal-unified-nav::-webkit-scrollbar { display: none; }
    .portal-unified-nav a { flex: 0 0 auto; grid-template-columns: 18px auto auto; min-height: 38px; padding: 6px 9px; white-space: nowrap; }
    .portal-unified-topbar { top: 57px; padding-inline: 14px; }
}
@media (max-width: 560px) {
    .portal-unified-nav a b { font-size: .7rem; }
    .portal-unified-topbar__scope small { display: none; }
    .portal-body--unified .portal-container { width: min(100% - 18px, 1220px); }
}

/* IranGS v0.12.10 — intentionally quiet unified login. */
.portal-auth--minimal { min-height:calc(100vh - 138px); }
.portal-auth__box--minimal { width:min(480px,100%); border-radius:22px; }
.portal-auth__box--minimal .portal-auth__form { padding:34px 32px; }
.portal-auth__box--minimal .portal-auth__form h1 { margin:0 0 24px; text-align:center; }
.portal-auth-actions { display:grid; gap:8px; grid-template-columns:repeat(2,minmax(0,1fr)); margin-top:18px; }
.portal-auth-actions a { align-items:center; background:#f8fafc; border:1px solid #e2e8f0; border-radius:10px; color:#475569; display:flex; font-size:.78rem; font-weight:700; justify-content:center; min-height:40px; padding:8px 10px; text-align:center; text-decoration:none; }
.portal-auth-actions a:hover { background:#eef2ff; border-color:#c7d2fe; color:#4338ca; }
@media(max-width:520px){.portal-auth__box--minimal .portal-auth__form{padding:26px 20px}.portal-auth-actions{grid-template-columns:1fr}}

.portal-brand__logo{width:40px;height:40px;border-radius:10px;object-fit:cover;flex:0 0 auto}.portal-unified-brand .portal-brand__logo{width:42px;height:42px}.igs-reset-timer{margin:0 0 16px;padding:12px 14px;border:1px solid #cbd5e1;border-radius:10px;background:#f8fafc;font-variant-numeric:tabular-nums}html.dark .igs-reset-timer{background:#111827;border-color:#334155;color:#e2e8f0}

/* v0.22 profile/preferences */
.portal-profile-edit-grid{align-items:start}.portal-profile-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 14px}.portal-profile-fields>p{min-width:0}.portal-profile-wide{grid-column:1/-1}.portal-profile-preferences{position:sticky;top:88px}.portal-profile-preferences select{width:100%}.portal-profile-preferences small{display:block;color:#64748b;font-size:12px;line-height:1.8;margin-top:6px}.portal-preference-note{display:flex;gap:10px;align-items:flex-start;background:#f8fafc;border:1px solid #e2e8f0;border-radius:12px;padding:12px;margin-top:14px}.portal-preference-note>.material-symbols-outlined{color:#16a34a}.portal-preference-note strong{display:block;font-size:13px}.portal-preference-note p{color:#64748b;font-size:12px;line-height:1.8;margin:4px 0 0}@media(max-width:900px){.portal-profile-fields{grid-template-columns:1fr}.portal-profile-wide{grid-column:auto}.portal-profile-preferences{position:static}}

/* v0.30 — delegated workspace provisioning + invitation center */
.portal-provisioning-card{display:grid;gap:16px}.portal-provisioning-modules{display:grid;gap:8px}.portal-provisioning-modules>small{color:var(--portal-muted);font-size:.74rem;font-weight:750}.portal-provisioning-modules>div,.invitation-card__roles>div{display:flex;flex-wrap:wrap;gap:7px}.portal-provisioning-modules span,.invitation-card__roles span{background:#f8fafc;border:1px solid #e2e8f0;border-radius:999px;color:#334155;font-size:.72rem;font-weight:700;padding:6px 9px}.portal-account-note{background:#f8fafc;border:1px solid #e2e8f0;border-radius:11px;color:#64748b;font-size:.76rem;line-height:1.8;margin:0;padding:10px 12px}.invitation-center__list{display:grid;gap:13px}.invitation-card{display:grid;gap:14px}.invitation-card.is-pending{border-color:#fde68a;box-shadow:0 5px 18px rgba(146,64,14,.06)}.invitation-card__head{align-items:flex-start;display:flex;gap:14px;justify-content:space-between}.invitation-card__head h2{font-size:1rem;margin:3px 0 0}.invitation-card__roles{display:grid;gap:7px}.invitation-card__roles>small{color:var(--portal-muted);font-size:.72rem;font-weight:750}.invitation-card__history{background:#f8fafc;border-radius:10px;color:#64748b;font-size:.73rem;margin:0;padding:9px 11px}.invitation-card__actions{display:flex;gap:8px;margin:0}.invitation-card__actions .portal-btn{min-width:120px}.workspace-member-limit-note{color:#64748b;display:block;font-size:.73rem;line-height:1.8;margin-top:8px}.portal-body--unified .workspace-setup{margin-inline:auto;max-width:1320px}
@media(max-width:640px){.invitation-card__head{align-items:stretch;flex-direction:column}.invitation-card__actions{display:grid;grid-template-columns:1fr 1fr}.invitation-card__actions .portal-btn{min-width:0;width:100%}}

/* v0.31.2 — customer profile command center */
.portal-profile-command-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.portal-profile-command{align-items:center;background:#fff;border:1px solid #e2e8f0;border-radius:16px;color:#334155;display:grid;gap:12px;grid-template-columns:42px minmax(0,1fr) auto;min-height:116px;padding:16px;text-decoration:none;box-shadow:0 3px 14px rgba(15,23,42,.035)}.portal-profile-command>span{align-items:center;background:#eef2ff;border-radius:12px;color:#4f46e5;display:flex;font-size:24px;height:42px;justify-content:center;width:42px}.portal-profile-command>div{display:grid;gap:3px;min-width:0}.portal-profile-command small{color:#94a3b8;font-size:.7rem;font-weight:750}.portal-profile-command strong{color:#0f172a;font-size:.88rem}.portal-profile-command p{color:#64748b;font-size:.7rem;line-height:1.7;margin:0}.portal-profile-command>b,.portal-profile-command>a,.portal-command-action{background:transparent;border:0;color:#4f46e5;cursor:pointer;font:inherit;font-size:.72rem;font-weight:800;padding:7px;text-decoration:none;white-space:nowrap}.portal-profile-command.is-attention{background:#fffbeb;border-color:#fde68a}.portal-profile-command.is-attention>span{background:#fef3c7;color:#b45309}.portal-profile-command--workspace form{margin:0}.portal-profile-invite-preview{display:grid;gap:12px}.portal-profile-invite-preview .portal-card-heading>a{color:#4f46e5;font-size:.75rem;font-weight:800;text-decoration:none}.portal-profile-invite-list{display:grid;gap:8px}.portal-profile-invite-row{align-items:center;background:#f8fafc;border:1px solid #e2e8f0;border-radius:12px;color:#334155;display:flex;gap:14px;justify-content:space-between;padding:11px 13px;text-decoration:none}.portal-profile-invite-row>div{display:grid;gap:3px}.portal-profile-invite-row span,.portal-profile-invite-row small{color:#64748b;font-size:.7rem}.portal-profile-invite-row:hover{background:#eef2ff;border-color:#c7d2fe}.portal-profile-hub .portal-card-heading>a{color:#4f46e5;font-size:.73rem;font-weight:800;text-decoration:none}@media(max-width:900px){.portal-profile-command-grid{grid-template-columns:1fr}.portal-profile-command{min-height:94px}}@media(max-width:560px){.portal-profile-command{align-items:flex-start;grid-template-columns:38px minmax(0,1fr);padding:14px}.portal-profile-command>b,.portal-profile-command>a,.portal-profile-command>form{grid-column:2}.portal-profile-invite-row{align-items:flex-start;flex-direction:column;gap:6px}}

/* v0.33 — central login identity & multi-mobile security */
.portal-account-head--split{align-items:flex-start;display:flex;justify-content:space-between;gap:18px}.portal-security-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.portal-security-card{display:grid;align-content:start;gap:16px}.portal-security-card--full{grid-column:1/-1}.portal-security-card__head{align-items:flex-start;display:flex;justify-content:space-between;gap:16px}.portal-security-card__head>div{display:flex;gap:11px;min-width:0}.portal-security-card__head .material-symbols-outlined{align-items:center;background:#eef2ff;border-radius:11px;color:#4f46e5;display:flex;flex:0 0 auto;height:40px;justify-content:center;width:40px}.portal-security-card__head h2{font-size:1rem;margin:0 0 4px}.portal-security-card__head p{color:#64748b;font-size:.76rem;line-height:1.8;margin:0}.portal-auth-methods{display:grid;gap:9px}.portal-auth-method{align-items:center;background:#f8fafc;border:1px solid #e2e8f0;border-radius:13px;display:grid;gap:12px;grid-template-columns:36px minmax(0,1fr) auto;padding:12px}.portal-auth-method.is-primary{background:#f8faff;border-color:#c7d2fe}.portal-auth-method__icon{align-items:center;background:#fff;border:1px solid #e2e8f0;border-radius:10px;color:#6366f1;display:flex;height:36px;justify-content:center;width:36px}.portal-auth-method__body{display:grid;gap:7px;min-width:0}.portal-auth-method__title{font-size:.85rem;font-weight:850;overflow-wrap:anywhere}.portal-auth-method__badges{display:flex;flex-wrap:wrap;gap:5px}.portal-auth-method__badges .portal-state{font-size:.64rem;min-height:25px;padding:3px 8px}.portal-auth-method__actions{align-items:center;display:flex;flex-wrap:wrap;gap:6px}.portal-auth-method__actions form{margin:0}.portal-btn--small{font-size:.7rem;min-height:34px;padding:6px 9px}.portal-inline-form{display:grid;gap:10px}.portal-inline-form>p{margin:0}.portal-inline-form small{color:#64748b;display:block;font-size:.7rem;line-height:1.7;margin-top:5px}.portal-attention-card--danger{border-color:#fecaca;background:#fef2f2}.portal-attention-card--danger p{color:#991b1b}.portal-auth-actions--stack{grid-template-columns:1fr;margin-top:16px}
html.dark .portal-security-card,html.dark .portal-auth-method__icon{background:#111827;border-color:#334155}html.dark .portal-auth-method{background:#0f172a;border-color:#334155}html.dark .portal-auth-method.is-primary{background:#172554;border-color:#3730a3}html.dark .portal-security-card__head .material-symbols-outlined{background:#1e1b4b;color:#c7d2fe}html.dark .portal-security-card__head p,html.dark .portal-inline-form small{color:#94a3b8}
@media(max-width:900px){.portal-security-grid{grid-template-columns:1fr}.portal-security-card--full{grid-column:auto}.portal-account-head--split{align-items:stretch;flex-direction:column}}
@media(max-width:640px){.portal-security-card__head{align-items:stretch;flex-direction:column}.portal-security-card__head>.portal-btn{width:100%}.portal-auth-method{align-items:flex-start;grid-template-columns:34px minmax(0,1fr)}.portal-auth-method__actions{grid-column:2}.portal-auth-method__actions form,.portal-auth-method__actions .portal-btn{width:100%}}

/* IGS 0.34.0 — simple public workspace join flow */
.workspace-join-card{align-items:center;display:grid;gap:18px;grid-template-columns:minmax(0,1fr) minmax(300px,460px)}
.workspace-join-card__copy h2,.workspace-join-history__head h2{margin:3px 0 5px}
.workspace-join-card__copy p{color:#64748b;font-size:.72rem;line-height:1.8;margin:0}
.workspace-join-card__form{display:grid;gap:6px}
.workspace-join-card__form label{color:#334155;font-size:.66rem;font-weight:800}
.workspace-join-card__form small{color:#64748b;font-size:.58rem;line-height:1.7}
.workspace-join-card__input{align-items:stretch;display:flex;gap:7px}
.workspace-join-card__input input{background:#fff;border:1px solid #cbd5e1;border-radius:11px;box-sizing:border-box;color:#0f172a;flex:1;font:inherit;font-size:.84rem;font-weight:800;letter-spacing:.12em;min-width:0;padding:10px 12px;text-align:left;text-transform:uppercase}
.workspace-join-history{margin-top:16px}
.workspace-join-history__head{align-items:end;display:flex;gap:12px;justify-content:space-between;margin:18px 2px 9px}
.workspace-join-history__head>span{background:#f1f5f9;border-radius:999px;color:#475569;font-size:.6rem;font-weight:800;padding:5px 9px}
html.dark .workspace-join-card__input input{background:#111827;border-color:#475569;color:#f8fafc}
html.dark .workspace-join-card__form label,html.dark .workspace-join-card__copy h2,html.dark .workspace-join-history__head h2{color:#f8fafc}
@media(max-width:760px){.workspace-join-card{grid-template-columns:1fr}.workspace-join-card__input{display:grid;grid-template-columns:1fr}.workspace-join-card__input .portal-btn{width:100%}}

/* IGS v0.40.2 — floating-menu containment and touch-safe account actions. */
.portal-role-menu__panel,
.portal-account-card,
.portal-list__item,
.portal-account-actions { box-sizing: border-box; max-width: 100%; min-width: 0; }
.portal-account-actions--wrap { flex-wrap: wrap; }
.portal-account-actions--stack-mobile { align-items: stretch; display: flex; gap: 9px; }
.portal-role-menu__panel { max-width: calc(100vw - 24px); }
@media (max-width: 900px) {
    .portal-role-menu__panel {
        inset-inline: 12px;
        max-height: calc(100dvh - 92px - env(safe-area-inset-bottom));
        position: fixed;
        top: calc(64px + env(safe-area-inset-top));
        width: auto;
    }
    .portal-account-actions--stack-mobile { flex-direction: column; }
    .portal-account-actions--stack-mobile .portal-btn { justify-content: center; width: 100%; }
}
@media (max-width: 640px) {
    .portal-account-actions--wrap { align-items: stretch; flex-direction: column; }
    .portal-account-actions--wrap > *,
    .portal-account-actions--wrap form,
    .portal-account-actions--wrap .portal-btn { width: 100%; }
    .portal-account-actions--wrap .portal-btn { justify-content: center; }
}

/* v0.45.50 — personal settings hub. */
.portal-profile-hub--v2{width:min(1380px,100%)}
.portal-profile-hero-v2{align-items:center;padding:24px 28px}
.portal-profile-hero-v2__copy{display:grid;gap:5px;min-width:0}
.portal-profile-hero-v2__copy h1{font-size:clamp(1.45rem,2.7vw,2.15rem);margin:0}
.portal-profile-hero-v2__badges{display:flex;flex-wrap:wrap;gap:6px;margin-top:7px}
.portal-profile-hero-v2__actions{align-items:center;display:flex;flex:0 0 auto;gap:7px;flex-wrap:wrap}
.portal-profile-hero-v2__actions .portal-btn{align-items:center;display:inline-flex;gap:5px;margin:0}
.portal-profile-hero-v2__actions .material-symbols-outlined{font-size:18px}
.portal-profile-section-nav{background:#fff;border:1px solid var(--portal-border);border-radius:14px;display:flex;gap:4px;overflow:auto;padding:6px;scrollbar-width:thin}
.portal-profile-section-nav a{align-items:center;border-radius:9px;color:#64748b;display:inline-flex;flex:0 0 auto;font-size:.72rem;font-weight:800;gap:5px;min-height:36px;padding:6px 10px;text-decoration:none;white-space:nowrap}
.portal-profile-section-nav a:hover{background:#eef2ff;color:#4338ca}
.portal-profile-section-nav .material-symbols-outlined{font-size:18px}
.portal-profile-preference-center{border-color:#c7d2fe;background:linear-gradient(145deg,#fff 40%,#f8f7ff)}
.portal-profile-preference-grid{display:grid;gap:12px 14px;grid-template-columns:repeat(2,minmax(0,1fr))}
.portal-profile-preference-grid label{display:grid;gap:5px;min-width:0}
.portal-profile-preference-grid label>span{color:#334155;font-size:.72rem;font-weight:850}
.portal-profile-preference-grid select,.portal-profile-preference-grid input{background:#fff;border:1px solid #dbe3ee;border-radius:10px;box-sizing:border-box;color:#0f172a;font:inherit;min-height:42px;padding:8px 10px;width:100%}
.portal-profile-preference-grid select:focus,.portal-profile-preference-grid input:focus{border-color:#818cf8;box-shadow:0 0 0 3px rgba(99,102,241,.09);outline:0}
.portal-profile-preference-grid small{color:#64748b;font-size:.6rem;line-height:1.65}
.portal-profile-preference-grid .errorlist{color:#b91c1c;font-size:.63rem;margin:0;padding:0;list-style:none}
.portal-profile-preference-actions{align-items:center;border-top:1px dashed #dbe3ee;display:flex;gap:12px;justify-content:space-between;margin-top:16px;padding-top:14px}
.portal-profile-preference-actions>span{color:#64748b;font-size:.63rem;line-height:1.75;max-width:720px}
.portal-profile-preference-actions .portal-btn{align-items:center;display:inline-flex;gap:5px;margin:0;white-space:nowrap}
.portal-profile-preference-actions .material-symbols-outlined{font-size:18px}
.portal-profile-list-reset{align-items:center;background:#f8fafc;border:1px solid #e2e8f0;border-radius:12px;display:flex;gap:12px;justify-content:space-between;margin-top:12px;padding:10px 12px}
.portal-profile-list-reset>div{align-items:center;display:flex;gap:9px;min-width:0}.portal-profile-list-reset>div>.material-symbols-outlined{color:#64748b}.portal-profile-list-reset>div>div{display:grid;gap:2px}.portal-profile-list-reset strong{font-size:.69rem}.portal-profile-list-reset small{color:#64748b;font-size:.59rem;line-height:1.6}.portal-profile-list-reset .portal-btn{margin:0}
.portal-profile-settings-grid{display:grid;gap:10px;grid-template-columns:repeat(3,minmax(0,1fr))}
.portal-profile-setting-tile{align-items:center;background:#fff;border:1px solid var(--portal-border);border-radius:14px;color:#334155;display:grid;gap:10px;grid-template-columns:40px minmax(0,1fr);min-height:82px;padding:12px;text-decoration:none;transition:border-color .15s ease,box-shadow .15s ease,transform .15s ease}
.portal-profile-setting-tile:hover{border-color:#a5b4fc;box-shadow:0 6px 18px rgba(79,70,229,.07);transform:translateY(-1px)}
.portal-profile-setting-tile>.material-symbols-outlined{align-items:center;background:#eef2ff;border-radius:10px;color:#4f46e5;display:flex;height:40px;justify-content:center;width:40px}
.portal-profile-setting-tile>div{display:grid;gap:3px;min-width:0}.portal-profile-setting-tile strong{font-size:.75rem}.portal-profile-setting-tile small{color:#64748b;font-size:.6rem;line-height:1.55}
.portal-profile-command-grid--compact .portal-profile-command{min-height:120px}
.portal-profile-workspaces-center,.portal-profile-security-center{scroll-margin-top:90px}
.portal-profile-subsection{border-top:1px solid #edf1f5;margin-top:18px;padding-top:16px}
.portal-profile-subsection h3{font-size:.88rem;margin:0 0 3px}
.portal-profile-bot-code{align-items:center;display:flex;flex-wrap:wrap;gap:8px}.portal-profile-bot-code input{border:1px solid #dbe3ee;border-radius:10px;letter-spacing:.35rem;max-width:12rem;min-height:42px;padding:8px;text-align:center}
.portal-profile-security-icon{color:#6366f1;font-size:30px!important}
.portal-profile-security-actions{display:flex;flex-wrap:wrap;gap:8px}.portal-profile-security-actions .portal-btn{margin:0}
.portal-profile-identity-edit .portal-account-head{align-items:center}.portal-profile-identity-edit .portal-account-head .portal-btn{margin:0}
#personal-preferences,#identity,#communications,#workspaces,#security{scroll-margin-top:90px}

@media(max-width:980px){
 .portal-profile-settings-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .portal-profile-preference-grid{grid-template-columns:1fr}
 .portal-profile-preference-actions{align-items:flex-start;flex-direction:column}
}
@media(max-width:700px){
 .portal-profile-hero-v2{align-items:flex-start;flex-direction:column;padding:18px}
 .portal-profile-hero-v2__actions{width:100%}.portal-profile-hero-v2__actions .portal-btn{flex:1;justify-content:center}
 .portal-profile-settings-grid{grid-template-columns:1fr}
 .portal-profile-list-reset{align-items:flex-start;flex-direction:column}.portal-profile-list-reset .portal-btn{width:100%}
 .portal-profile-security-actions{align-items:stretch;flex-direction:column}.portal-profile-security-actions .portal-btn{width:100%}
}

/* Minimal authentication shell: keep brand compact without template-local CSS. */
.portal-auth--minimal .portal-brand__text small{display:none!important}
