:root { color-scheme: light; --background: #f4f6f5; --surface: #fff; --foreground: #203932; --muted: #64736d; --accent: #275b48; --line: #dce4df; --soft: #edf3ef; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--background); color: var(--foreground); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Malgun Gothic", "Apple SD Gothic Neo", sans-serif; line-height: 1.65; word-break: keep-all; overflow-wrap: anywhere; -webkit-font-smoothing: antialiased; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
button, input, textarea, summary, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #407b61; outline-offset: 4px; }
::selection { background: #cee3d6; color: #173d2c; }
.portal-page { min-height: 100vh; display: flex; flex-direction: column; }
.page-width { width: min(1120px, calc(100% - 80px)); margin-inline: auto; }
.skip-link { position: fixed; z-index: 10; top: -90px; left: 20px; padding: 12px 18px; border-radius: 8px; color: #fff; background: var(--accent); }
.skip-link:focus { top: 12px; }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 35px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-symbol { position: relative; display: grid; place-items: center; width: 42px; height: 44px; border-radius: 12px 12px 12px 3px; background: var(--foreground); color: #fff; font-size: 28px; font-weight: 650; line-height: 1; }
.brand-symbol > span { position: absolute; right: 8px; bottom: 10px; width: 6px; height: 6px; border-radius: 50%; background: #a8c5aa; }
.brand-wordmark { font-size: 23px; font-weight: 750; line-height: 1.15; letter-spacing: .09em; }
.brand-wordmark > span { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; font-weight: 500; letter-spacing: .09em; }
.header-caption { margin: 0; color: var(--muted); font-size: 12px; }
.auth-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); align-items: center; gap: 70px; flex: 1; padding-block: 44px 72px; }
.portal-intro { padding-bottom: 30px; }
.section-label { margin: 0 0 12px; color: var(--accent); font-size: 10px; font-weight: 750; letter-spacing: .16em; line-height: 1.6; }
.intro-label { display: flex; align-items: center; gap: 9px; margin-bottom: 26px; font-size: 11px; }
.intro-label > span { width: 7px; height: 7px; border-radius: 50%; background: #779981; }
.portal-intro h2 { margin: 0; font-size: clamp(32px, 3.4vw, 44px); font-weight: 650; letter-spacing: -.055em; line-height: 1.45; }
.portal-intro h2 > span { color: var(--accent); }
.intro-description { margin: 24px 0 0; color: var(--muted); font-size: 14px; line-height: 1.9; }
.intro-divider { width: 42px; height: 2px; margin: 33px 0 24px; background: #b6c9bb; }
.intro-points { display: grid; gap: 13px; padding: 0; margin: 0; list-style: none; }
.intro-points li { display: flex; align-items: center; gap: 10px; color: #52665b; font-size: 13px; }
.point-icon { display: grid; flex: 0 0 21px; place-items: center; width: 21px; height: 21px; border: 1px solid #d7e3da; border-radius: 50%; background: #edf3ee; color: #547960; font-size: 11px; font-weight: 700; }
.intro-caption { margin: 42px 0 0; color: #7c8981; font-size: 11px; letter-spacing: .02em; }
.auth-card, .account-card { min-width: 0; padding: 38px; border: 1px solid #e1e8e2; border-radius: 18px; background: var(--surface); box-shadow: 0 14px 45px -26px #29433440; }
.card-heading { margin-bottom: 27px; }
.card-heading h1, .card-heading h2 { margin: 0; font-size: 25px; font-weight: 650; letter-spacing: -.04em; line-height: 1.5; }
.card-heading > p:last-child { margin: 10px 0 0; color: var(--muted); font-size: 13px; line-height: 1.8; }
.auth-form { display: grid; gap: 19px; }
.field { display: grid; gap: 8px; min-width: 0; }
.field label, .secret-label { color: #344c40; font-size: 12px; font-weight: 650; }
.field input, .secret-value, .recovery-codes { width: 100%; min-width: 0; border: 1px solid #d4ded7; border-radius: 8px; color: var(--foreground); background: #fff; }
.field input { height: 48px; padding: 11px 13px; font-size: 14px; line-height: 1.5; }
.field input::placeholder { color: #87958c; opacity: 1; }
.field input:hover { border-color: #a8bcb0; }
.field input:focus, .secret-value:focus, .recovery-codes:focus { outline: 2px solid #b1ceba; outline-offset: 2px; border-color: #668e73; }
.field-help { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.8; }
.button { display: flex; align-items: center; justify-content: center; gap: 15px; width: 100%; min-height: 49px; padding: 12px 18px; border: 1px solid transparent; border-radius: 8px; font-size: 13px; font-weight: 650; line-height: 1.5; }
.button-primary { margin-top: 5px; background: var(--accent); color: #fff; }
.button-primary:hover { background: #1b4636; }
.button-primary > span { font-size: 19px; font-weight: 400; line-height: 1; }
.button-secondary { background: var(--soft); border-color: #d5e1d8; color: var(--accent); }
.button-secondary:hover { background: #e3ece6; }
.account-help { margin-top: 29px; padding-top: 22px; border-top: 1px solid #e8ede9; text-align: center; }
.account-help strong { font-size: 11px; font-weight: 550; color: #5c6d62; }
.account-help p { margin: 5px 0 0; color: #78877d; font-size: 11px; }
.form-error, .form-notice { margin: 0 0 22px; padding: 12px 14px; border: 1px solid #e4c8c4; border-radius: 8px; color: #8a3930; background: #fff6f4; font-size: 12px; line-height: 1.8; }
.form-notice { background: #f2f5ef; border-color: #d8e2d1; color: #526447; }
.forgot-link { justify-self: end; margin-top: -7px; padding-block: 3px; color: #5d7365; font-size: 11px; text-decoration: none; }
.forgot-link:hover, .return-link a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.return-link { margin: 22px 0 0; text-align: center; font-size: 12px; color: #5d7365; }
.return-link a { text-decoration: none; }
.field .otp-input { height: 56px; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 23px; letter-spacing: .35em; padding-left: calc(13px + .35em); text-align: center; }
.recovery-option { margin-top: 26px; padding-top: 20px; border-top: 1px solid #e6ece7; }
.recovery-option summary { width: fit-content; color: #5a6e60; font-size: 12px; cursor: pointer; }
.recovery-form { padding-top: 20px; }
.setup-steps { display: flex; gap: 15px; padding: 0 0 22px; margin: -4px 0 24px; border-bottom: 1px solid #e6ece7; list-style: none; }
.setup-steps li { display: flex; align-items: center; gap: 7px; color: #77877b; font-size: 11px; }
.setup-steps li > span { display: grid; place-items: center; width: 21px; height: 21px; border: 1px solid #d8e2db; border-radius: 50%; font-size: 10px; }
.setup-steps .is-current { color: var(--accent); font-weight: 650; }
.setup-steps .is-current > span { background: var(--accent); border-color: var(--accent); color: #fff; }
.setup-steps .is-complete > span { background: var(--soft); color: var(--accent); }
.enrollment-guide { margin: 0 0 24px; }
.enrollment-guide ol { display: grid; gap: 9px; margin: 0 0 22px; padding-left: 18px; color: var(--muted); font-size: 12px; line-height: 1.8; }
.secret-label { display: block; margin-bottom: 8px; }
.secret-value { padding: 12px; margin-bottom: 8px; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 12px; background: #f6f8f6; user-select: all; }
.recovery-notice { margin: 0 0 23px; padding: 14px; border-radius: 8px; background: #f2f5ee; color: #526447; font-size: 12px; }
.recovery-notice strong { font-weight: 650; }
.recovery-notice p { margin: 5px 0 0; font-size: 11px; }
.recovery-codes { display: block; resize: vertical; min-height: 130px; padding: 14px 18px; margin-bottom: 8px; background: #f6f8f6; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 14px; line-height: 1.9; letter-spacing: .06em; user-select: all; }
.recovery-ack { margin-top: 23px; }
.site-footer { display: flex; justify-content: space-between; gap: 20px; padding-block: 23px 27px; border-top: 1px solid #e1e7e2; color: #7b8a80; font-size: 10px; }
.site-footer > span:first-child { font-weight: 600; letter-spacing: .05em; }
.header-account { display: flex; align-items: center; gap: 20px; }
.role-badge { display: inline-flex; padding: 4px 10px; border: 1px solid #d4e1d6; border-radius: 5px; background: #eaf1eb; color: #4c7058; font-size: 11px; }
.logout-button { min-height: 40px; border: 0; padding: 6px 0; color: #64766a; background: transparent; font-size: 12px; }
.logout-button:hover { color: var(--foreground); text-decoration: underline; text-underline-offset: 5px; }
.dashboard-main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); align-items: center; column-gap: 70px; row-gap: 45px; flex: 1; padding-block: 48px 70px; }
.dashboard-intro h1 { margin: 19px 0 0; font-size: clamp(30px, 3.3vw, 42px); font-weight: 650; line-height: 1.5; letter-spacing: -.04em; }
.dashboard-intro h1 > span { color: var(--accent); }
.signed-in { display: flex; align-items: center; gap: 9px; margin-top: 24px; color: #557460; font-size: 12px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #6b9978; }
.account-details { display: grid; gap: 0; margin: 0; }
.account-details > div { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 14px; padding-block: 15px; border-bottom: 1px solid #edf1ed; font-size: 13px; }
.account-details dt { color: var(--muted); font-size: 12px; }
.account-details dd { margin: 0; }
.account-footnote { margin: 23px 0 0; color: #77867c; font-size: 11px; }
.workspace-note { display: flex; align-items: center; gap: 21px; grid-column: 1 / -1; padding: 26px 30px; border: 1px solid #dce5de; border-radius: 12px; }
.workspace-mark { display: grid; flex: 0 0 45px; place-items: center; height: 45px; border: 1px solid #dae4dc; border-radius: 12px; color: #7f9b86; font-size: 25px; }
.workspace-note h2 { margin: 0; font-size: 14px; font-weight: 600; }
.workspace-note p { margin: 5px 0 0; color: #738277; font-size: 12px; }
body:not(.portal-page) > main { width: min(100%, 48rem); margin: 0 auto; padding: clamp(5rem, 15vh, 10rem) 1.5rem 4rem; }
.eyebrow { margin: 0 0 1.25rem; color: var(--accent); font-size: .95rem; }
body:not(.portal-page) h1 { margin: 0 0 1.25rem; font-size: clamp(1.8rem, 5vw, 2.6rem); line-height: 1.4; font-weight: 600; }
.message { max-width: 34rem; margin: 0; color: var(--muted); font-size: 1.05rem; }
@media (min-width: 1200px) and (min-height: 850px) { .auth-layout { padding-block: 62px 105px; } }
@media (max-width: 960px) {
    .page-width { width: calc(100% - 56px); }
    .auth-layout, .dashboard-main { gap: 35px; grid-template-columns: minmax(0, 1fr) minmax(0, 410px); }
    .portal-intro h2 { font-size: 32px; }
    .auth-card, .account-card { padding: 30px; }
    .intro-description { font-size: 13px; }
    .desktop-break { display: none; }
}
@media (max-width: 760px) {
    .page-width { width: min(480px, calc(100% - 40px)); }
    .site-header { padding-block: 25px; }
    .header-caption { display: none; }
    .brand-symbol { width: 36px; height: 38px; font-size: 24px; border-radius: 10px 10px 10px 3px; }
    .brand-wordmark { font-size: 20px; }
    .brand-wordmark > span { font-size: 10px; }
    .auth-layout, .dashboard-main { grid-template-columns: minmax(0, 1fr); gap: 27px; padding-block: 14px 40px; }
    .portal-intro { padding-bottom: 0; }
    .intro-label { margin-bottom: 12px; font-size: 9px; }
    .portal-intro h2 { font-size: 29px; line-height: 1.4; }
    .intro-description { margin-top: 14px; font-size: 12px; }
    .intro-divider, .intro-points, .intro-caption { display: none; }
    .auth-card, .account-card { padding: 29px; border-radius: 14px; }
    .card-heading h1, .card-heading h2 { font-size: 23px; }
    .card-heading { margin-bottom: 24px; }
    .field input { font-size: 16px; }
    .site-footer { padding-block: 20px; }
    .dashboard-intro h1 { font-size: 32px; }
    .dashboard-intro { padding-block: 10px; }
    .workspace-note { gap: 15px; padding: 22px; }
    .workspace-note h2 { font-size: 13px; }
    .workspace-note p { font-size: 11px; }
}
@media (max-width: 360px) {
    .page-width { width: calc(100% - 32px); }
    .auth-card, .account-card { padding: 23px 20px; }
    .portal-intro h2 { font-size: 26px; }
    .setup-steps { gap: 11px; }
    .setup-steps li { gap: 5px; font-size: 10px; }
    .header-account { gap: 12px; }
}
@media (prefers-reduced-motion: no-preference) { .button, .field input, .logout-button { transition: background-color .15s ease, border-color .15s ease, color .15s ease; } }
select { font: inherit; }
.field select { width: 100%; min-height: 48px; padding: 11px 13px; border: 1px solid #d4ded7; border-radius: 8px; background: #fff; color: var(--foreground); font-size: 14px; }
.field select:focus { outline: 2px solid #b1ceba; outline-offset: 2px; border-color: #668e73; }
.social-login { margin-top: 27px; }
.social-divider { display: flex; align-items: center; gap: 12px; margin: 0 0 17px; color: #76857a; font-size: 10px; white-space: nowrap; }
.social-divider::before, .social-divider::after { content: ''; flex: 1; height: 1px; background: #e2e9e3; }
.social-buttons { display: grid; gap: 9px; }
.social-button { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 10px 14px; border: 1px solid #dce4dd; border-radius: 8px; color: #385142; background: #fff; font-size: 12px; text-decoration: none; }
.social-button:not(:disabled):hover { border-color: #8eae98; background: #f5f8f5; }
.social-button:disabled { background: #f6f8f6; color: #65766a; cursor: default; }
.provider-status { font-size: 10px; color: #79887e; }
.social-help { margin-top: 10px; text-align: center; }
.social-button { display: grid; grid-template-columns: 20px minmax(0, 1fr); min-height: 48px; column-gap: 10px; padding: 11px 12px; font-size: 14px; font-weight: 500; line-height: 20px; }
.social-label { min-width: 0; text-align: center; }
.social-logo { display: block; width: 20px; height: 20px; flex-shrink: 0; }
.social-button.provider-google { border: 1px solid #747775; border-radius: 4px; background: #fff; color: #1f1f1f; font-family: 'Roboto', Arial, sans-serif; }
.social-button.provider-google:not(:disabled):hover { background: #f8faff; border-color: #747775; }
.social-button.provider-naver { padding-inline: 20px; border-color: #03a94d; background: #03a94d; color: #fff; border-radius: 8px; }
.social-button.provider-naver:not(:disabled):hover { background: #03a94d; border-color: #03a94d; box-shadow: 0 0 0 2px #03a94d22; }
.social-button.provider-kakao { border: 0; border-radius: 12px; background: #fee500; color: rgb(0 0 0 / 85%); }
.social-button.provider-kakao:not(:disabled):hover { background: #fee500; box-shadow: 0 0 0 2px #fee50044; }
.social-button:disabled { cursor: not-allowed; }
.social-pending-note { margin: 5px 0 0; color: #768279; font-size: 10px; text-align: right; }
.first-login-help { margin-top: 20px; line-height: 1.9; }
.register-prompt { margin: 22px 0 0; color: #6b7a70; text-align: center; font-size: 11px; }
.register-prompt a { margin-left: 6px; color: var(--accent); font-weight: 650; text-underline-offset: 4px; }
.workspace-actions { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.workspace-action { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px; border: 1px solid #d4e1d7; border-radius: 12px; background: #edf3ee; color: #365b43; font-size: 14px; text-decoration: none; }
.workspace-action:hover { background: #e5eee7; border-color: #9bb5a3; }
@media (max-width: 760px) { .field select { font-size: 16px; } .workspace-actions { grid-template-columns: minmax(0, 1fr); } }
.header-back { color: #597361; font-size: 12px; text-decoration: none; text-underline-offset: 4px; }
.header-back:hover { text-decoration: underline; }
.management-main { flex: 1; padding-block: 32px 65px; }
.management-heading { margin-bottom: 30px; }
.management-heading h1 { margin: 0; font-size: 32px; line-height: 1.5; font-weight: 650; letter-spacing: -.04em; }
.management-heading > p:last-child { margin: 10px 0 0; font-size: 14px; color: var(--muted); }
.management-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); align-items: start; gap: 24px; }
.management-stack { display: grid; gap: 24px; min-width: 0; }
.management-panel { min-width: 0; padding: 30px; border: 1px solid #dfe7e1; border-radius: 14px; background: #fff; }
.management-panel h2 { margin: 0 0 10px; font-size: 19px; font-weight: 650; letter-spacing: -.03em; }
.panel-help { margin: 0 0 20px; font-size: 12px; color: #697a6e; line-height: 1.9; }
.account-details + .panel-help { margin: 20px 0 0; }
.panel-help a { color: var(--accent); text-underline-offset: 4px; }
.panel-footnote { margin: 20px 0 0; color: #738277; font-size: 11px; }
.connection-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 19px; border-bottom: 1px solid #e7ede8; }
.connection-row:last-child { border-bottom: 0; }
.connection-detail { min-width: 0; }
.connection-detail > strong { font-size: 14px; font-weight: 600; }
.connection-detail > div { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 3px; }
.connection-state, .connection-date { color: #75847b; font-size: 11px; }
.connection-state.is-linked { color: #39704d; }
.compact-button { min-height: 37px; padding: 8px 12px; border: 1px solid #cbdacf; border-radius: 7px; color: #44674f; background: #f4f7f4; white-space: nowrap; font-size: 11px; }
.compact-button:hover:not(:disabled) { background: #e8f0e9; }
.compact-button:disabled { color: #86938a; border-color: #e0e7e2; background: #f5f7f5; cursor: default; }
@media (max-width: 760px) {
    .header-back { max-width: 115px; text-align: right; font-size: 11px; }
    .management-main { padding-block: 20px 40px; }
    .management-heading h1 { font-size: 27px; }
    .management-heading > p:last-child { font-size: 12px; }
    .management-grid { grid-template-columns: minmax(0, 1fr); }
    .management-panel { padding: 25px; }
}
@media (max-width: 360px) { .management-panel { padding: 21px 18px; } .connection-row { gap: 10px; } }
.heading-with-action { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.heading-with-action > div > p:last-child { margin: 10px 0 0; font-size: 14px; color: var(--muted); }
.management-link { display: inline-flex; align-items: center; gap: 12px; padding: 10px 13px; border: 1px solid #cbdacf; border-radius: 8px; color: #44674f; font-size: 12px; text-decoration: none; }
.management-link:hover { background: #e9f0ea; }
.request-count { margin: 0 0 15px; color: #738277; font-size: 12px; }
.request-count strong { margin-left: 6px; color: var(--accent); }
.request-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 22px; }
.request-card { min-width: 0; padding: 27px; border: 1px solid #dfe7e1; border-radius: 14px; background: #fff; }
.request-heading { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.request-heading h2 { margin: 10px 0 0; font-size: 20px; font-weight: 650; }
.request-date { color: #7a897e; font-size: 10px; }
.request-details { display: grid; gap: 12px; margin: 24px 0; font-size: 12px; }
.request-details > div { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 13px; }
.request-details dt { color: #708176; }
.request-details dd { margin: 0; }
.review-note { margin: 0 0 23px; padding: 12px; border-radius: 7px; color: #68795f; background: #f3f6ef; font-size: 11px; line-height: 1.9; }
.review-actions { display: grid; grid-template-columns: 1fr 1.5fr; gap: 10px; }
.review-actions .button { min-height: 43px; margin-top: 0; font-size: 12px; }
.empty-state { grid-column: 1 / -1; padding: 65px 25px; border: 1px solid #e0e8e2; border-radius: 14px; background: #fff; text-align: center; }
.empty-mark { display: grid; place-items: center; width: 44px; height: 44px; margin: 0 auto 19px; border-radius: 50%; background: #ecf2ec; color: #608368; font-size: 23px; }
.empty-state h2 { margin: 0; font-size: 18px; font-weight: 600; }
.empty-state p { margin: 10px 0 0; color: #77877c; font-size: 12px; }
.approver-row { display: flex; align-items: center; justify-content: space-between; gap: 25px; padding-block: 22px; border-bottom: 1px solid #e3ebe5; }
.approver-row:first-child { padding-top: 5px; }
.approver-row:last-child { padding-bottom: 5px; border-bottom: 0; }
.approver-person { display: grid; gap: 4px; min-width: 0; }
.approver-person > strong { font-size: 14px; font-weight: 600; }
.approver-person > span { font-size: 12px; color: #77877b; }
.permission-form { display: flex; flex-shrink: 0; align-items: center; gap: 20px; }
.checkbox-label { display: inline-flex; align-items: center; gap: 9px; min-height: 36px; color: #52715c; font-size: 12px; cursor: pointer; }
.checkbox-label input { width: 17px; height: 17px; margin: 0; accent-color: var(--accent); }
@media (max-width: 760px) {
    .heading-with-action { align-items: start; flex-direction: column; gap: 18px; }
    .heading-with-action > div > p:last-child { font-size: 12px; }
    .request-grid { grid-template-columns: minmax(0, 1fr); }
    .request-card { padding: 25px; }
    .request-details > div { grid-template-columns: 78px minmax(0, 1fr); gap: 10px; }
    .approver-row { align-items: start; flex-direction: column; gap: 13px; }
    .permission-form { width: 100%; justify-content: space-between; gap: 10px; }
}
@media (max-width: 360px) { .request-card { padding: 21px 18px; } .request-heading { flex-direction: column; gap: 9px; } }
.qr-heading { margin: 0 0 9px; color: #35543f; font-size: 15px; font-weight: 650; line-height: 1.65; letter-spacing: -.025em; }
.qr-description { margin: 0; color: #687b6d; font-size: 12px; line-height: 1.85; }
.enrollment-qr { width: 220px; max-width: 100%; margin: 20px auto 15px; padding: 9px; border: 1px solid #e0e8e2; border-radius: 12px; background: #fff; }
.enrollment-qr svg { display: block; width: 100%; height: auto; }
.qr-help { margin: 0; color: #5f7867; font-size: 11px; text-align: center; line-height: 1.85; }
.qr-unavailable { margin: 17px 0; padding: 13px; border-radius: 8px; background: #f1f5ed; color: #64765a; font-size: 12px; }
.enrollment-manual { margin-top: 20px; border: 1px solid #dde6df; border-radius: 8px; background: #f8faf7; }
.enrollment-manual summary { padding: 13px 15px; color: #54715b; font-size: 12px; cursor: pointer; }
.manual-content { padding: 3px 15px 15px; }
.enrollment-guide .manual-content ol { margin-bottom: 16px; font-size: 11px; }
.manual-content .secret-value { background: #fff; }
.otp-explainer { margin: 0 0 22px; padding: 16px 18px; border-radius: 10px; background: #edf3ee; color: #375a43; font-size: 13px; line-height: 1.85; }
.otp-explainer strong { font-weight: 650; }
.otp-explainer p { margin: 7px 0 0; font-size: 12px; }
.otp-install-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 13px; }
.otp-install-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 9px 13px; border: 1px solid #b9cdbf; border-radius: 8px; background: #f4f8f3; color: #365c42; font-size: 12px; text-decoration: none; }
.otp-install-links a:hover { background: #e6f0e6; }
.otp-install-note { margin: 9px 0 24px; color: #63766a; font-size: 11px; line-height: 1.85; }
.otp-final-step { margin-top: 25px; }
.otp-help { margin-top: 25px; border: 1px solid #dce6de; border-radius: 9px; background: #f7f9f6; }
.otp-help summary { padding: 15px; color: #41624b; font-size: 12px; line-height: 1.85; cursor: pointer; }
.otp-help-content { padding: 0 16px 17px; color: #536c5b; font-size: 12px; line-height: 1.9; }
.otp-help-content h3 { margin: 18px 0 7px; font-size: 13px; font-weight: 650; }
.otp-help-content h3:first-child { margin-top: 2px; }
.otp-help-content p { margin: 0 0 9px; }
.otp-help-content a, .social-link-steps a { color: #365f43; text-underline-offset: 4px; }
.otp-help-note { padding-top: 12px; border-top: 1px solid #dce6de; }
.social-link-steps { display: grid; gap: 10px; padding-left: 20px; margin: 0 0 18px; color: #486751; font-size: 13px; line-height: 1.85; }
.otp-help summary:focus-visible, .enrollment-manual summary:focus-visible, .otp-install-links a:focus-visible { outline: 2px solid #668e73; outline-offset: 3px; }
.permissions-layout { display: grid; grid-template-columns: minmax(0, 330px) minmax(0, 1fr); align-items: start; gap: 25px; }
.permissions-content { min-width: 0; display: grid; gap: 23px; }
.account-picker .auth-form { margin-top: 22px; gap: 15px; }
.account-picker select { min-width: 0; text-overflow: ellipsis; }
.selected-account { margin-top: 27px; padding-top: 26px; border-top: 1px solid #e4ebe5; }
.selected-account h3 { margin: 12px 0 5px; font-size: 19px; font-weight: 650; }
.selected-email { margin: 0; color: #6a7c6e; font-size: 12px; }
.permission-account-details { display: grid; gap: 13px; margin: 23px 0 0; font-size: 12px; }
.permission-account-details > div { display: grid; grid-template-columns: 65px minmax(0, 1fr); gap: 14px; }
.permission-account-details dt { color: #78877d; }
.permission-account-details dd { margin: 0; color: #47634e; }
.permission-owner-note { margin: 20px 0 5px; padding: 18px; border-radius: 9px; background: #edf3e9; color: #4d704e; font-size: 13px; }
.permission-owner-note strong { font-weight: 650; }
.permission-owner-note p { margin: 7px 0 0; color: #73816c; font-size: 12px; }
.capability-list { display: grid; }
.capability-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 23px; align-items: center; padding-block: 23px; border-bottom: 1px solid #e7ede7; }
.capability-row:last-child { border-bottom: 0; }
.capability-title { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }
.capability-title h3 { margin: 0; font-size: 14px; font-weight: 650; }
.permission-action { display: inline-block; padding: 1px 7px; border: 1px solid #e0e8e1; border-radius: 5px; color: #77917b; background: #f7f9f5; font-size: 10px; }
.capability-copy p { margin: 8px 0 0; color: #748276; font-size: 11px; line-height: 1.85; }
.permission-state { padding: 5px 9px; border-radius: 6px; font-size: 11px; text-align: center; }
.permission-state.is-allowed { background: #edf4ed; color: #4d7856; }
.permission-state.is-unavailable { background: #f1f3ef; color: #89918a; }
.capability-toggle { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: #476e51; font-size: 12px; cursor: pointer; }
.capability-toggle input { width: 19px; height: 19px; margin: 0; accent-color: var(--accent); }
.permission-reauth { margin: 22px 0 1px; padding: 17px; border: 1px solid #e4dfca; border-radius: 9px; background: #faf8ef; font-size: 12px; color: #7b6c42; }
.permission-reauth > strong { font-weight: 650; }
.permission-reauth p { margin: 6px 0 13px; font-size: 11px; }
.permission-reauth a { display: flex; gap: 15px; width: fit-content; align-items: center; color: #5a6d47; font-size: 12px; font-weight: 650; text-underline-offset: 4px; }
.permission-fresh { display: flex; gap: 8px; align-items: baseline; margin: 20px 0 0; color: #64806a; font-size: 11px; }
.permission-save { display: grid; gap: 14px; padding-top: 22px; margin-top: 3px; border-top: 1px solid #e2e9e3; }
.permission-save p { margin: 0; color: #7c887b; font-size: 11px; }
.permission-save .button { justify-self: end; width: min(100%, 190px); margin: 0; }
.permission-save .button:disabled { cursor: default; background: #a6b6a9; color: #fff; }
.permission-policy { padding: 23px 26px; border: 1px solid #dde6dc; border-radius: 12px; }
.permission-policy h2 { margin: 0 0 10px; font-size: 14px; font-weight: 600; }
.permission-policy p { margin: 0 0 8px; color: #748471; font-size: 12px; line-height: 1.9; }
.permission-policy p:last-child { margin-bottom: 0; }
.permission-empty { padding-block: 55px; text-align: center; }
.permission-empty .workspace-mark { width: 45px; margin: 0 auto 22px; }
.permission-empty h2 { font-size: 18px; }
.permission-empty p { margin: 15px auto 0; max-width: 30em; color: #7a8979; font-size: 13px; }
@media (max-width: 960px) { .permissions-layout { grid-template-columns: minmax(0, 290px) minmax(0, 1fr); gap: 20px; } .account-picker, .permissions-editor { padding: 25px; } .capability-row { gap: 15px; } }
@media (max-width: 760px) { .permissions-layout { grid-template-columns: minmax(0, 1fr); } .capability-row { gap: 13px; } .permission-policy { padding: 23px; } }
@media (max-width: 440px) { .capability-row { grid-template-columns: minmax(0, 1fr); gap: 10px; } .permission-state, .capability-toggle { justify-self: start; } .permission-save .button { width: 100%; } }
.header-tools { display: flex; align-items: center; gap: 27px; }
.header-context { min-width: 0; }
.task-bell { position: relative; display: grid; place-items: center; flex: 0 0 46px; width: 46px; height: 46px; margin-right: 7px; border: 1px solid #d8e4db; border-radius: 50%; color: #43634e; background: #fff; text-decoration: none; }
.task-bell:hover { background: #eaf2eb; border-color: #a0b9a6; }
.task-bell > svg { display: block; }
.task-badge { position: absolute; right: -8px; top: -8px; display: grid; place-items: center; min-width: 23px; width: max-content; aspect-ratio: 1; padding: 4px; border: 2px solid var(--background); border-radius: 50%; background: #d13b3b; color: #fff; font-size: 10px; font-weight: 750; font-variant-numeric: tabular-nums; line-height: 1; letter-spacing: -.035em; }
.tasks-main { max-width: 940px; }
.task-heading { display: flex; align-items: center; justify-content: space-between; gap: 25px; padding-bottom: 29px; margin-bottom: 29px; border-bottom: 1px solid #dce6de; }
.task-heading > div > p:last-child { margin: 10px 0 0; color: var(--muted); font-size: 14px; }
.task-total { display: flex; align-items: baseline; flex-shrink: 0; gap: 10px; color: #6f8274; }
.task-total strong { color: #365e44; font-size: 43px; font-weight: 650; line-height: 1.2; letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.task-total span { font-size: 12px; }
.task-category { display: flex; align-items: center; gap: 13px; padding: 0 2px; margin-bottom: 18px; }
.task-category h2 { margin: 0; font-size: 15px; font-weight: 650; }
.task-category > span { padding: 3px 9px; border-radius: 6px; background: #e5eee5; color: #5b7c62; font-size: 11px; }
.task-list { display: grid; gap: 14px; padding: 0; margin: 0; list-style: none; }
.task-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 30px; padding: 25px 28px; border: 1px solid #dce6df; border-radius: 13px; background: #fff; }
.task-item-copy { min-width: 0; }
.task-type { color: #78917c; font-size: 10px; }
.task-item h2 { margin: 5px 0 7px; color: #365240; font-size: 17px; font-weight: 650; }
.task-organization { margin: 0; color: #667d6c; font-size: 12px; }
.task-date { display: flex; flex-wrap: wrap; column-gap: 9px; margin: 12px 0 0; color: #8a978d; font-size: 10px; }
.task-review { display: inline-flex; align-items: center; justify-content: center; gap: 20px; min-height: 42px; padding: 10px 17px; border: 1px solid #cadbcf; border-radius: 7px; background: #f2f7f1; color: #42684b; font-size: 12px; text-decoration: none; }
.task-review:hover { background: #e6f0e5; border-color: #93b09b; }
.task-pagination { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding-top: 25px; color: #6b8171; font-size: 12px; }
.task-pagination a { display: inline-flex; align-items: center; min-height: 40px; text-underline-offset: 5px; }
.task-pagination .is-disabled { color: #a0aaa2; }
.task-pagination > span[aria-current] { font-size: 11px; }
.task-footer-note { margin: 23px 0 0; color: #839084; font-size: 11px; line-height: 1.9; }
.task-empty .management-link { margin-top: 26px; font-size: 11px; }
@media (max-width: 760px) { .header-tools { gap: 17px; } .task-heading { align-items: start; } .task-heading > div > p:last-child { font-size: 12px; } .task-total { flex-direction: column; align-items: end; gap: 3px; } .task-total strong { font-size: 35px; } .task-total span { font-size: 10px; } .task-item { padding: 22px; gap: 20px; } }
@media (max-width: 480px) { .site-header.has-tasks { display: grid; grid-template-columns: minmax(0, 1fr) auto; row-gap: 15px; padding-block: 23px 21px; } .has-tasks .header-tools { display: contents; } .has-tasks .task-bell { grid-column: 2; grid-row: 1; } .has-tasks .header-context { grid-column: 1 / -1; grid-row: 2; justify-self: end; } .has-tasks .header-back { max-width: none; } .has-tasks .header-account { gap: 20px; } .task-item { grid-template-columns: minmax(0, 1fr); gap: 19px; } .task-review { justify-self: stretch; justify-content: space-between; } .task-heading { gap: 17px; } .task-total strong { font-size: 31px; } }

/* Append to the existing portal stylesheet during controller integration. */
.account-security-main{padding-bottom:28px}
.security-notice{margin:0 0 22px;padding:17px 20px;border:1px solid #d5e2d9;border-radius:12px;background:#edf4ee;color:#31513e;overflow-wrap:anywhere}
.security-reauth{display:flex;align-items:center;justify-content:space-between;gap:22px;padding:20px 23px;margin:22px 0;border:1px solid #e5dec7;border-radius:12px;background:#faf8ef}
.security-reauth strong{display:block;font-size:14px;color:#665934}
.security-reauth p{margin:6px 0 0;font-size:13px;line-height:1.75;color:#786b48}
.security-reauth a{flex-shrink:0;font-size:13px;font-weight:650;color:#53684e;text-underline-offset:4px}
.security-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px}
.security-action{display:flex;flex-direction:column;min-width:0}
.security-action h2,.security-closure h2{font-size:20px;line-height:1.5;margin:0 0 13px}
.security-action>p,.security-closure>p{font-size:14px;line-height:1.85;color:#68766b}
.security-action>form{margin-top:auto;padding-top:12px}
.security-action .field-help{font-size:12px}
.security-action-label{display:block;color:#668070;font-size:11px;font-weight:700;letter-spacing:.08em;margin-bottom:12px}
.security-title-row{display:flex;align-items:baseline;flex-wrap:wrap;gap:10px;margin-bottom:12px}
.security-title-row h2{margin-bottom:0}
.security-status{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;border-radius:20px;padding:5px 11px;font-size:11px;line-height:1.5;font-weight:650;background:#edf1eb;color:#64735c;white-space:nowrap}
.security-status.is-active{background:#e7f0e8;color:#3e694b}
.security-status.is-paused{background:#f4eee2;color:#806b42}
.security-profile{display:flex;justify-content:space-between;align-items:center;gap:20px}
.security-profile h2{margin:0 0 8px;font-size:23px;overflow-wrap:anywhere}
.security-profile .section-label{margin:0 0 10px}
.security-user-email,.security-address{margin:0;font-size:14px;line-height:1.7;color:#69776e;overflow-wrap:anywhere;word-break:break-word}
.security-address{padding:12px 15px;border:1px solid #e4eae3;border-radius:9px;background:#f7f9f5;margin-bottom:20px}
.security-complete{padding:13px 15px;background:#edf4eb;border-radius:9px;color:#4c6b48!important;font-size:13px!important}
.security-closure{margin-top:24px;border-color:#e5d8d1}
.security-closure .auth-form{margin-top:19px}
.security-confirm{display:flex;align-items:flex-start;gap:11px;cursor:pointer;font-size:13px;line-height:1.85;color:#5b6e60}
.security-confirm input{width:18px;height:18px;flex:0 0 18px;margin:4px 0 0;accent-color:#315e48}
.security-destructive{color:#815646;border-color:#dfcbc0;max-width:280px}
.security-page-links{display:flex;flex-wrap:wrap;gap:12px 24px;margin:0 0 22px}
.security-page-links a{font-size:13px;font-weight:600;color:#466952;text-underline-offset:4px}
.security-account-list,.security-review-list{display:grid;gap:20px}
.security-user-card{border:1px solid #dce5dc;background:#fff;border-radius:15px;padding:27px 30px}
.security-user-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:18px}
.security-user-heading>div{min-width:0}
.security-user-heading h2{font-size:20px;line-height:1.5;margin:11px 0 6px;overflow-wrap:anywhere}
.security-user-org{font-size:13px;color:#6c7d6e;margin:5px 0 0;overflow-wrap:anywhere}
.security-user-actions{display:flex;gap:12px;margin-top:22px;flex-wrap:wrap}
.security-user-actions .button{min-width:155px;padding-inline:22px}
.security-user-card>.field-help{margin:13px 0 0}
.security-footnote{font-size:12px;color:#7a857c;line-height:1.9;margin:22px 0 0;max-width:850px}
.security-single{max-width:720px;padding-top:30px}
.security-enrollment{padding:32px 38px}
.security-enrollment>h1{font-size:27px;line-height:1.45;margin:10px 0 15px;letter-spacing:-.04em}
.security-enrollment>.panel-help{margin-bottom:25px}
.security-enrollment .auth-form{margin-top:24px}
.security-enrollment .otp-install-links{margin-bottom:14px}
.security-enrollment .enrollment-manual{margin-top:20px}
.security-info{margin-top:25px;padding:19px 21px;border-radius:11px;background:#f0f4ed}
.security-info strong{font-size:13px;color:#4b654d}
.security-info p{font-size:12px;line-height:1.9;color:#6c7a63;margin:10px 0 0}
.security-request-card h2{font-size:22px;line-height:1.45;margin:0 0 6px;overflow-wrap:anywhere}
.security-request-date{font-size:12px;color:#7b877c;margin:11px 0 0}
.security-request-reason{white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px;line-height:1.8;color:#647565;border-left:3px solid #d9e4d8;padding-left:14px;margin:20px 0 0}
.security-review-effect{font-size:13px;line-height:1.85;color:#6c785f;padding:16px 18px;border-radius:10px;background:#f2f5ec;margin:20px 0}
.security-review-actions{display:grid;grid-template-columns:minmax(0,1fr) 160px;gap:16px;align-items:end}
.security-review-actions>.auth-form{gap:17px}
.security-review-actions>.auth-form>.button{max-width:280px}
@media(max-width:760px){.security-grid{grid-template-columns:1fr;gap:20px}.security-user-card{padding:24px}.security-enrollment{padding:28px}.security-reauth{align-items:flex-start;flex-direction:column;gap:12px}.security-reauth a{white-space:normal}.security-review-actions{grid-template-columns:1fr}.security-review-actions>.auth-form>.button,.security-review-actions>form>.button{width:100%;max-width:none}.security-profile{align-items:flex-start}.security-single{padding-top:20px}}
@media(max-width:420px){.security-user-heading{flex-wrap:wrap}.security-user-actions{display:grid;grid-template-columns:1fr}.security-user-actions form,.security-user-actions .button{width:100%}.security-profile{flex-direction:column;gap:15px}.security-enrollment{padding:24px 20px}.security-enrollment>h1{font-size:24px}.security-reauth{padding:18px}.security-info{padding:17px}.security-action h2,.security-closure h2{font-size:19px}.security-destructive{max-width:none}}

.policy-document { max-width: 900px; margin: 0 auto; line-height: 1.95; font-size: 14px; }
.policy-document h2 { margin-top: 32px; font-size: 18px; }
.policy-document a { color: #365f43; }

/* ==========================================================
   ARGO UI v2 — Unified controls and dropdown navigation
   Sizes: primary 50px | navigation 42px | compact 38px | footer 32px
   Palette: evergreen = action, sage = support, white = navigation,
            terracotta = irreversible/high-impact action.
   CSS-only dropdown preserves the strict script-src CSP.
   ========================================================== */
:root {
  --argo-deep: #245441;
  --argo-deep-hover: #173e2e;
  --argo-soft: #eaf2ed;
  --argo-soft-hover: #dcece1;
  --argo-text: #294c3a;
  --argo-border: #cbded1;
  --argo-danger: #88463a;
  --argo-danger-soft: #fcf1ed;
  --argo-radius: 10px;
  --argo-control-shadow: 0 4px 12px -10px rgb(24 55 39 / 40%);
}
/* Every ordinary content anchor gets a restrained pill/button treatment.
   Specialized controls below use their own positional treatment. */
.portal-page :where(a:not(.brand):not(.skip-link):not(.nav-home):not(.nav-item):not(.task-bell):not(.social-button):not(.workspace-action):not(.management-link):not(.task-review):not(.header-back):not(.button)) {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 32px; padding: 5px 11px;
  border: 1px solid var(--argo-border); border-radius: 8px;
  background: #fff; color: var(--argo-text); text-decoration: none;
  font-weight: 650; vertical-align: middle;
}
.portal-page :where(a:not(.brand):not(.skip-link)):hover { text-decoration: none; }
.portal-page :where(a:not(.brand):not(.skip-link)):focus-visible,
.portal-page :where(button, summary):focus-visible { outline: 3px solid #4e9473; outline-offset: 2px; }
.portal-page :where(.button, .nav-home, .nav-toggle, .nav-item, .header-back, .task-bell,
  .workspace-action, .management-link, .task-review, .compact-button, .logout-button, .brand) {
  transition: background-color .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.portal-page :where(button, a):not(:disabled):active { transform: translateY(1px); }
.portal-page :where(button:disabled, .button:disabled) { opacity: .62; cursor: not-allowed; box-shadow: none; }

/* Branding: one large safe click area, no overlapping controls. */
.site-header .brand {
  display: inline-flex; align-items: center; flex: 0 1 auto; gap: 11px;
  padding: 9px 13px 9px 9px; min-height: 58px;
  border: 1px solid transparent; border-radius: 13px;
  color: var(--foreground); background: transparent;
  text-decoration: none; cursor: pointer;
}
.site-header .brand:hover { border-color: #dbe8df; background: #fff; box-shadow: var(--argo-control-shadow); }
.site-header .brand-logo { display: block; width: 42px; height: 44px; flex: 0 0 42px; object-fit: contain; }
.site-header .brand-wordmark { white-space: nowrap; }

/* Primary and secondary form actions: same radius, typography and vertical rhythm. */
.portal-page .button,
.portal-page a.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 12px 18px; width: 100%;
  border: 1px solid transparent; border-radius: var(--argo-radius);
  font-size: 13px; font-weight: 720; line-height: 1.45;
  text-align: center; text-decoration: none;
  box-shadow: var(--argo-control-shadow);
}
.portal-page .button-primary,
.portal-page a.button-primary { background: var(--argo-deep); color: #fff; border-color: var(--argo-deep); }
.portal-page .button-primary:hover,
.portal-page a.button-primary:hover { background: var(--argo-deep-hover); border-color: var(--argo-deep-hover); color: #fff; }
.portal-page .button-secondary,
.portal-page a.button-secondary { background: var(--argo-soft); color: var(--argo-deep); border-color: var(--argo-border); }
.portal-page .button-secondary:hover,
.portal-page a.button-secondary:hover { background: var(--argo-soft-hover); color: var(--argo-deep-hover); border-color: #a9c5b3; }
/* Destructive actions are NOT the same colour as approving/saving. */
.portal-page .security-destructive,
.portal-page .button.security-destructive {
  background: var(--argo-danger-soft); border-color: #dfbcb2; color: var(--argo-danger);
}
.portal-page .security-destructive:hover,
.portal-page .button.security-destructive:hover {
  background: #f8e2dc; border-color: #c7978a; color: #703529;
}
/* Moderation: the reject/deny action must be a visually quiet alternative. */
.portal-page .review-actions .button-secondary { background: #fcf2ee; border-color: #dfc9c0; color: #845346; }
.portal-page .review-actions .button-secondary:hover { background: #f6e3dc; border-color: #d4afa3; }

/* Quiet actions in heading, inside a card, and in an information paragraph. */
.portal-page .header-back,
.portal-page .logout-button,
.portal-page .compact-button,
.portal-page .management-link,
.portal-page .task-review,
.portal-page .task-pagination a,
.portal-page .security-page-links a,
.portal-page .otp-install-links a,
.portal-page .permission-reauth a {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 38px; padding: 8px 13px;
  width: auto; border: 1px solid var(--argo-border); border-radius: 9px;
  background: #fff; color: var(--argo-text); font-size: 12px;
  font-weight: 670; line-height: 1.45; text-decoration: none;
  box-shadow: var(--argo-control-shadow);
}
.portal-page :is(.header-back, .logout-button, .compact-button, .management-link,
    .task-review, .task-pagination a, .security-page-links a, .otp-install-links a,
    .permission-reauth a):hover {
  background: var(--argo-soft); border-color: #9dbba6; color: var(--argo-deep-hover); text-decoration: none;
}
.portal-page .compact-button:disabled { background: #f4f5f3; }
.portal-page .task-bell {
  display: grid; place-items: center; width: 44px; height: 44px; min-height: 44px;
  flex: 0 0 44px; padding: 0; margin: 0;
  border: 1px solid var(--argo-border); border-radius: 50%;
  background: #fff; color: var(--argo-deep);
}
.portal-page .task-bell:hover { background: var(--argo-soft); border-color: #9dbba6; }
.portal-page .task-badge { right: -7px; top: -7px; }

/* Links within large work tiles are intentionally CARD-buttons, not tiny pills. */
.portal-page .workspace-action {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  width: 100%; min-height: 64px; padding: 19px 21px;
  border: 1px solid var(--argo-border); border-radius: 12px;
  background: #fff; color: var(--argo-text); text-decoration: none;
  font-size: 13px; font-weight: 680; box-shadow: var(--argo-control-shadow);
}
.portal-page .workspace-action:hover { background: var(--argo-soft); border-color: #a2c0ab; box-shadow: 0 7px 22px -15px #173e2e70; }
.portal-page .workspace-action > span:last-child { flex: 0 0 auto; font-size: 20px; }

/* In-form small text links are still visibly clickable buttons. */
.portal-page :is(.forgot-link, .return-link a, .register-prompt a) {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 32px; padding: 5px 11px; border: 1px solid #dbe6dd;
  border-radius: 8px; background: #f8fbf9; color: var(--argo-deep);
  font-size: 11px; font-weight: 680; text-decoration: none;
}
.portal-page :is(.forgot-link, .return-link a, .register-prompt a):hover {
  border-color: #a2bdab; background: var(--argo-soft); text-decoration: none;
}
.portal-page .site-footer > span:last-child { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 7px; }
.portal-page .site-footer a { min-height: 32px; padding: 5px 11px; border: 1px solid #d7e3d9; border-radius: 8px; background: #fff; color: #4e6a57; text-decoration: none; font-size: 10px; }
.portal-page .site-footer a:hover { background: var(--argo-soft); }

/* Navigation: always rendered server-side. Details/summary requires no JS. */
.portal-navigation { position: relative; z-index: 80; margin-top: -13px; margin-bottom: 14px; }
.portal-navigation .nav-rail {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  width: 100%; padding: 10px 12px; min-height: 65px;
  border: 1px solid #d4e4d9; border-radius: 14px;
  background: #e9f1eb; box-shadow: 0 8px 23px -20px #183e2d65;
}
.nav-caption { display: inline-block; padding: 0 6px; color: #557363; font-size: 11px; font-weight: 770; letter-spacing: .04em; }
.portal-navigation .nav-home,
.portal-navigation .nav-toggle {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 9px 15px; margin: 0;
  border: 1px solid #d5e2d8; border-radius: 10px;
  background: #fff; color: #365a45;
  font-family: inherit; font-size: 13px; font-weight: 700; line-height: 1.4;
  text-decoration: none; white-space: nowrap; cursor: pointer; user-select: none;
  box-shadow: var(--argo-control-shadow);
}
.portal-navigation :is(.nav-home, .nav-toggle):hover,
.portal-navigation .nav-dropdown[open] > .nav-toggle { border-color: #9fbea9; background: #f7faf8; color: var(--argo-deep-hover); }
.portal-navigation .nav-home[aria-current="page"],
.portal-navigation .nav-dropdown.is-active > .nav-toggle {
  border-color: var(--argo-deep); background: var(--argo-deep); color: #fff;
}
.portal-navigation :is(.nav-home[aria-current="page"], .nav-dropdown.is-active > .nav-toggle):hover { background: var(--argo-deep-hover); color: #fff; }
.nav-home-icon { font-family: Georgia, serif; font-size: 22px; font-weight: 700; line-height: .8; transform: translateY(-1px); }
.nav-dropdown { position: relative; min-width: 0; }
.nav-dropdown > summary { list-style: none; }
.nav-dropdown > summary::-webkit-details-marker { display: none; }
.nav-chevron { display: inline-block; width: 7px; height: 7px; margin: -3px 0 0 3px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .15s ease; }
.nav-dropdown[open] .nav-chevron { transform: rotate(225deg); margin-top: 3px; }
.nav-panel {
  position: absolute; z-index: 120; left: 0; top: calc(100% + 8px);
  display: grid; gap: 5px; min-width: 235px;
  width: max-content; max-width: min(330px, calc(100vw - 40px));
  padding: 8px; border: 1px solid var(--argo-border); border-radius: 12px;
  background: #fff; box-shadow: 0 18px 44px -19px #1d47316e;
}
.portal-navigation .nav-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; min-height: 44px; padding: 10px 13px;
  border: 1px solid transparent; border-radius: 9px;
  background: #fff; color: var(--argo-text);
  font-size: 12px; font-weight: 650; line-height: 1.5; text-decoration: none; text-align: left;
}
.portal-navigation .nav-item:hover { border-color: #d1e2d6; background: #edf5ef; color: var(--argo-deep-hover); }
.portal-navigation .nav-item[aria-current="page"] { background: #eaf3ec; color: var(--argo-deep); font-weight: 780; }
.nav-item-arrow { color: #789b85; font-size: 16px; }
@media (max-width: 760px) {
  .site-header .brand { min-height: 48px; padding: 5px 8px 5px 4px; gap: 7px; }
  .site-header .brand-logo { width: 36px; height: 38px; flex-basis: 36px; }
  .portal-navigation { margin-top: -7px; margin-bottom: 11px; }
  .portal-navigation .nav-rail { min-height: 0; padding: 8px; gap: 7px; }
  .portal-navigation .nav-home, .portal-navigation .nav-toggle { min-height: 42px; padding-inline: 12px; font-size: 12px; }
  .site-header .header-account { flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
  .portal-page .header-back { max-width: 165px; text-align: center; }
}
@media (max-width: 480px) {
  .portal-navigation .nav-rail { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .portal-navigation .nav-caption { grid-column: 1 / -1; padding: 2px 5px 0; }
  .portal-navigation :is(.nav-home, .nav-toggle) { width: 100%; min-width: 0; padding-inline: 8px; gap: 7px; }
  .portal-navigation .nav-dropdown { position: static; min-width: 0; }
  .portal-navigation .nav-panel {
    position: absolute; left: 0; right: 0; top: calc(100% + 8px);
    min-width: 0; width: 100%; max-width: none;
  }
  .site-header { gap: 8px; }
  .site-header .brand-wordmark { font-size: 17px; }
  .site-header .brand-wordmark > span { font-size: 9px; }
  .site-header .header-tools { gap: 9px; }
  .site-header .header-context { max-width: 145px; }
  .site-header .header-back { max-width: 135px; }
  .site-header .task-bell { width: 42px; height: 42px; flex-basis: 42px; }
  .site-footer { align-items: flex-start; }
  .portal-page .site-footer > span:last-child { justify-content: flex-end; }
  .portal-page .workspace-action { min-height: 60px; padding: 17px; }
  .portal-page .security-user-actions .button { min-height: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  .portal-page :is(.button, .nav-home, .nav-toggle, .nav-item, .header-back, .task-bell, .brand) { transition: none; }
}

/* Finishing refinements — consistent navigation and buttons in ARGO */
.portal-page .brand:focus-visible { outline: 3px solid #407b61; outline-offset: 3px; }
.portal-navigation .nav-dropdown[open] > .nav-panel { visibility: visible; }
.portal-page .security-review-actions .button-secondary { background: #fcf2ee; border-color: #dfc9c0; color: #845346; }
.portal-page .security-review-actions .button-secondary:hover { background: #f6e3dc; border-color: #d4afa3; }
@media (max-width: 480px) {
  .portal-navigation .nav-rail { align-items: stretch; }
  .portal-navigation .nav-dropdown > .nav-toggle { display: flex; width: 100%; }
  .portal-navigation .nav-dropdown .nav-panel { box-shadow: 0 15px 30px -12px #1d473155; }
}


/* =============================================================
   ARGO EXTENDED FUNCTION NAVIGATION — owner catalogue F-001..031
   Replaces only authenticated navigation presentation.
   Uses GET navigation/search + native <details>; CSP still script-src none.
   The existing public navigation and button palette are unchanged.
   ============================================================= */
.portal-workspace-nav .nav-rail {
  display: flex; align-items: center; gap: 8px; flex-wrap: nowrap;
  overflow-x: auto; scrollbar-width: thin; min-height: 66px;
  padding: 10px 12px;
}
.portal-workspace-nav .nav-home,
.portal-workspace-nav .nav-section-link {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; min-width: fit-content; min-height: 42px; padding: 8px 14px;
  border: 1px solid #d5e2d8; border-radius: 10px;
  background: #fff; color: #365a45; font-size: 12px;
  font-weight: 720; line-height: 1.4; white-space: nowrap;
  text-decoration: none; box-shadow: var(--argo-control-shadow);
}
.portal-workspace-nav :is(.nav-home, .nav-section-link):hover {
  background: #f7faf8; border-color: #a5bdac; color: var(--argo-deep-hover);
}
.portal-workspace-nav .nav-section-link.is-active,
.portal-workspace-nav .nav-home[aria-current="page"] {
  background: var(--argo-deep); border-color: var(--argo-deep); color: #fff;
}
.portal-workspace-nav .nav-section-link.is-active:hover,
.portal-workspace-nav .nav-home[aria-current="page"]:hover { background: var(--argo-deep-hover); color:#fff; }
/* Only pages containing the sidebar change layout. Public pages remain untouched. */
body.portal-page:has(> .portal-workspace-sidebar) {
  display: grid; align-items: start;
  grid-template-columns: minmax(0, 250px) minmax(0, 1fr);
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  column-gap: 24px;
  width: 100%; max-width: 1360px; min-height: 100vh;
  padding-inline: clamp(16px, 3vw, 42px); margin-inline: auto;
}
body.portal-page:has(> .portal-workspace-sidebar) > :is(.site-header, .portal-navigation, .site-footer) {
  grid-column: 1 / -1; width: 100%; max-width: none; margin-inline: 0;
}
body.portal-page:has(> .portal-workspace-sidebar) > .site-header { grid-row: 1; }
body.portal-page:has(> .portal-workspace-sidebar) > .portal-navigation { grid-row: 2; margin-bottom: 20px; }
body.portal-page:has(> .portal-workspace-sidebar) > .portal-workspace-sidebar { grid-column: 1; grid-row: 3; }
body.portal-page:has(> .portal-workspace-sidebar) > main {
  grid-column: 2; grid-row: 3; width: 100%; max-width: none; min-width: 0;
  margin: 0; padding-top: 10px; padding-bottom: 52px;
}
body.portal-page:has(> .portal-workspace-sidebar) > .site-footer { grid-row: 4; }
.portal-workspace-sidebar {
  position: sticky; top: 14px; align-self: start; min-width: 0;
  border: 1px solid var(--argo-border); border-radius: 14px;
  background: #fff; overflow: hidden;
  box-shadow: 0 12px 35px -28px #173e2e70;
}
.portal-sidebar-head {
  display: flex; flex-direction: column; padding: 17px 17px 12px;
  background: #edf4ef; border-bottom: 1px solid #dce8df;
}
.portal-sidebar-kicker {
  margin: 0 0 2px; color: #60826a; font-size: 9px;
  font-weight: 750; letter-spacing: .11em;
}
.portal-sidebar-head strong { color: #234936; font-size: 16px; line-height: 1.4; }
.portal-sidebar-subtitle { margin-top: 4px; color: #6f8476; font-size: 10px; }
.portal-menu-search { padding: 14px 14px 0; }
.portal-menu-search > label { display: block; margin: 0 0 6px; font-size: 11px; font-weight: 700; color: #395845; }
.portal-menu-search-row { display: flex; align-items: stretch; gap: 5px; }
.portal-menu-search-row input {
  min-width: 0; flex: 1; width: 0; height: 38px;
  padding: 7px 9px; border: 1px solid #cadccd; border-radius: 8px;
  background: #fff; color: #234936; font-size: 12px;
}
.portal-menu-search-row input:focus { outline: 2px solid #91bda0; outline-offset: 0; }
.portal-menu-search-row button {
  flex: 0 0 auto; min-width: 49px; height: 38px; padding: 6px 8px;
  border: 1px solid var(--argo-deep); border-radius: 8px;
  background: var(--argo-deep); color: #fff; font-size: 11px; font-weight: 700;
}
.portal-menu-search-row button:hover { background: var(--argo-deep-hover); }
.portal-workspace-sidebar .portal-menu-reset {
  display: inline-flex; justify-content: center; align-items: center;
  min-height: 30px; margin: 10px 14px 0; padding: 5px 10px;
  background: #f1f6f2; border: 1px solid #d3e2d8;
  border-radius: 7px; color: #315b42; font-size: 11px;
  font-weight: 700; text-decoration: none;
}
.portal-menu-count { margin: 9px 14px 9px; color: #6e8375; font-size: 10px; }
.portal-menu-count b { color: #325d45; font-weight: 750; }
.portal-menu-scroll { max-height: min(61vh, 700px); overflow-y: auto; padding: 0 10px 12px; scrollbar-width: thin; }
.portal-menu-section-title {
  margin: 11px 4px 5px; padding: 6px 9px; border-radius: 7px;
  color: #25563e; background: #edf4ee; font-size: 11px; font-weight: 800;
}
.portal-menu-group { min-width: 0; margin-bottom: 7px; border: 1px solid #e5ece6; border-radius: 9px; background: #fff; }
.portal-menu-group > summary {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 10px 10px; list-style: none; cursor: pointer;
  color: #3e5f4c; font-size: 11px; font-weight: 750; line-height: 1.45;
}
.portal-menu-group > summary::-webkit-details-marker { display: none; }
.portal-menu-group > summary::before { content: '▸'; margin-right: 5px; color: #699377; font-size: 11px; }
.portal-menu-group[open] > summary::before { content: '▾'; }
.portal-menu-group > summary > span { margin-left: auto; color: #749482; font-size: 10px; }
.portal-menu-items { display: grid; gap: 3px; padding: 0 6px 7px; }
.portal-workspace-sidebar .portal-menu-item {
  display: flex; align-items: center; justify-content: space-between; gap: 7px;
  width: 100%; min-height: 38px; margin: 0; padding: 8px 8px;
  border: 1px solid transparent; border-radius: 8px;
  font-size: 11px; line-height: 1.4; text-decoration: none;
}
.portal-workspace-sidebar .portal-menu-live { background: #fff; color: #365743; font-weight: 700; }
.portal-workspace-sidebar .portal-menu-live:hover { background: #edf5ef; border-color: #c3d9c9; }
.portal-workspace-sidebar .portal-menu-live.is-current { background: #e5f1e8; color: #205039; border-color: #c5ddcc; }
.portal-menu-item-text { display: flex; flex-direction: column; min-width: 0; text-align: left; }
.portal-menu-item-label { overflow-wrap: anywhere; }
.portal-menu-code { color: #7b9383; font-weight: 500; font-size: 9px; }
.portal-menu-arrow { color: #7d9d86; font-size: 14px; flex: 0 0 auto; }
.portal-workspace-sidebar .portal-menu-future {
  border-color: #eff2ef; background: #f8faf8; color: #7b8b7e; cursor: default;
}
.portal-menu-status { flex: 0 0 auto; padding: 2px 5px; border-radius: 5px; background: #ecefeb; color: #718273; font-size: 9px; font-weight: 700; }
.portal-menu-empty { padding: 18px 7px; color: #777; font-size: 12px; }
.portal-menu-note { padding: 12px 13px 14px; margin: 0; border-top: 1px solid #e6ede7; background: #fafcfb; color: #738477; font-size: 10px; line-height: 1.65; }
@media (max-width: 1240px) {
  body.portal-page:has(> .portal-workspace-sidebar) > .dashboard-main { grid-template-columns: minmax(0,1fr); row-gap: 22px; }
  body.portal-page:has(> .portal-workspace-sidebar) > .dashboard-main .workspace-actions { grid-column: 1; }
}
@media (max-width: 1080px) {
  body.portal-page:has(> .portal-workspace-sidebar) > .management-main .permissions-layout { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  body.portal-page:has(> .portal-workspace-sidebar) { grid-template-columns: minmax(0,1fr); grid-template-rows: auto auto auto minmax(0,1fr) auto; }
  body.portal-page:has(> .portal-workspace-sidebar) > .portal-workspace-sidebar { position: static; grid-column: 1; grid-row: 3; margin-bottom: 18px; }
  body.portal-page:has(> .portal-workspace-sidebar) > main { grid-column: 1; grid-row: 4; padding-top: 0; }
  body.portal-page:has(> .portal-workspace-sidebar) > .site-footer { grid-row: 5; }
  .portal-menu-scroll { max-height: 225px; }
  .portal-workspace-nav .nav-rail { min-height: 58px; }
}
@media (max-width: 480px) {
  .portal-workspace-nav .nav-rail { display: flex; flex-wrap: nowrap; gap: 6px; padding: 7px; }
  .portal-workspace-nav :is(.nav-home, .nav-section-link) { min-height: 40px; padding: 7px 11px; font-size: 11px; }
  .portal-sidebar-head { padding: 12px 14px 10px; }
  .portal-menu-scroll { max-height: 185px; }
  .portal-menu-count { margin-top: 6px; }
}

/* =====================================================================
   ARGO WIDE & READABLE — UI style-only refinement (2026-11-10)
   Preserve menu catalogue, PHP routes, authentication and DB unchanged.
   Root cause addressed: a 1360px container cap and 9-11px metadata.
   Korean legibility: local system fonts only (no remote font dependency).
   ===================================================================== */
body.portal-page {
  font-family: "Malgun Gothic", "맑은 고딕", "Apple SD Gothic Neo",
    "Noto Sans CJK KR", "Noto Sans KR", "Segoe UI", sans-serif;
  text-rendering: optimizeLegibility;
}

/* Use actual desktop viewport; keep a consistent, narrow safe gutter. */
body.portal-page:has(> .portal-workspace-sidebar) {
  width: 100%;
  max-width: none;
  margin: 0;
  padding-inline: clamp(12px, 1.65vw, 32px);
  grid-template-columns: clamp(272px, 18vw, 312px) minmax(0, 1fr);
  column-gap: clamp(14px, 1.2vw, 24px);
}
body.portal-page:has(> .portal-workspace-sidebar) > .site-header {
  padding-block: 16px 14px;
}
body.portal-page:has(> .portal-workspace-sidebar) > .portal-navigation {
  margin-top: 0;
  margin-bottom: 16px;
}
body.portal-page:has(> .portal-workspace-sidebar) > main {
  min-width: 0;
  max-width: none;
  padding-top: 0;
  padding-bottom: 36px;
}
body.portal-page:has(> .portal-workspace-sidebar) > .dashboard-main {
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, .85fr);
  column-gap: clamp(20px, 2vw, 44px);
  row-gap: clamp(20px, 2vw, 34px);
}
body.portal-page:has(> .portal-workspace-sidebar) > .tasks-main { max-width: none; }
body.portal-page:has(> .portal-workspace-sidebar) .dashboard-intro,
body.portal-page:has(> .portal-workspace-sidebar) .account-card { min-width: 0; }

/* Font legibility: 12px for secondary identifiers, 13px for metadata,
   and 14px+ for links/forms. Avoid barely rendered 9px Hangul glyphs. */
.portal-page :is(
  .section-label, .intro-label, .intro-caption, .header-caption,
  .field-help, .account-help strong, .account-help p,
  .forgot-link, .return-link, .recovery-option summary,
  .setup-steps li, .enrollment-guide ol, .recovery-notice p,
  .account-footnote, .workspace-note p, .provider-status,
  .social-pending-note, .register-prompt, .panel-footnote,
  .connection-state, .connection-date, .request-date,
  .review-note, .permission-action, .capability-copy p,
  .permission-fresh, .permission-save p, .task-type,
  .task-date, .task-footer-note, .task-total span,
  .security-action-label, .security-status, .security-info p,
  .security-footnote, .security-request-date,
  .security-user-org
) {
  font-size: 13px;
  line-height: 1.65;
}
.portal-page :is(
  .field label, .secret-label, .management-heading > p:last-child,
  .panel-help, .request-details, .permission-account-details,
  .permission-owner-note p, .permission-policy p,
  .security-request-reason, .site-footer,
  .site-footer a
) { font-size: 13px; line-height: 1.65; }
.portal-page :is(
  .button, .button-primary, .button-secondary, .compact-button,
  .logout-button, .header-back, .social-button, .workspace-action,
  .management-link, .task-review, .security-page-links a,
  .otp-install-links a, .permission-reauth a
) { font-size: 14px; }
.portal-page .brand-wordmark > span { font-size: 12px; }
.portal-page .role-badge { font-size: 12px; }
.portal-page .site-footer { color: #53675a; }
.portal-page .site-footer a { color: #31523d; }
.portal-page .nav-caption,
.portal-page .social-divider,
.portal-page .point-icon { font-size: 12px; }
.portal-page .task-badge { font-size: 12px; min-width: 24px; }
.portal-page .section-label { letter-spacing: .075em; }
.portal-page .register-prompt a,
.portal-page :is(.forgot-link, .return-link a) { font-size: 13px; }

/* Larger, higher-contrast navigation: preserve all existing menu entries. */
.portal-workspace-nav :is(.nav-home, .nav-section-link) {
  min-height: 44px;
  padding: 9px 15px;
  font-size: 14px;
  font-weight: 700;
}
.portal-workspace-nav .nav-rail { min-height: 60px; }
.portal-workspace-nav .nav-home-icon {
  font-family: "Segoe UI Symbol", "Apple Symbols", "Noto Sans Symbols 2", sans-serif;
  font-size: 20px;
}
.portal-workspace-sidebar .portal-sidebar-head { padding: 18px 18px 14px; }
.portal-workspace-sidebar .portal-sidebar-kicker {
  font-size: 13px; letter-spacing: .06em; color: #45654e; line-height: 1.5;
}
.portal-workspace-sidebar .portal-sidebar-head strong { font-size: 19px; }
.portal-workspace-sidebar .portal-sidebar-subtitle {
  margin-top: 6px; font-size: 14px; line-height: 1.55; color: #4c6655;
}
.portal-workspace-sidebar .portal-menu-search { padding: 14px 14px 0; }
.portal-workspace-sidebar .portal-menu-search > label { font-size: 13px; }
.portal-workspace-sidebar .portal-menu-search-row input {
  height: 43px; font-size: 14px; padding: 8px 11px;
}
.portal-workspace-sidebar .portal-menu-search-row button {
  height: 43px; min-width: 54px; font-size: 14px; padding-inline: 10px;
}
.portal-workspace-sidebar .portal-menu-reset {
  min-height: 36px; font-size: 13px;
}
.portal-workspace-sidebar .portal-menu-count {
  font-size: 13px; line-height: 1.6; color: #48604f;
}
.portal-workspace-sidebar .portal-menu-section-title {
  font-size: 14px; padding-block: 8px;
}
.portal-workspace-sidebar .portal-menu-group > summary {
  min-height: 44px; padding: 10px 11px; font-size: 14px;
  line-height: 1.5; color: #2b513b;
}
.portal-workspace-sidebar .portal-menu-group > summary::before { font-size: 14px; }
.portal-workspace-sidebar .portal-menu-group > summary > span { font-size: 13px; color: #456f53; }
.portal-workspace-sidebar .portal-menu-item {
  min-height: 46px; padding: 9px 10px; font-size: 14px; line-height: 1.5;
}
.portal-workspace-sidebar .portal-menu-item-label { font-size: 14px; }
.portal-workspace-sidebar .portal-menu-code { font-size: 13px; color: #526d59; line-height: 1.5; }
.portal-workspace-sidebar .portal-menu-status {
  font-size: 13px; color: #516754; padding: 4px 7px; background: #e6ece7;
}
.portal-workspace-sidebar .portal-menu-future { color: #516754; }
.portal-workspace-sidebar .portal-menu-note {
  font-size: 13px; line-height: 1.65; color: #4d6656; padding: 13px 14px;
}
.portal-workspace-sidebar .portal-menu-empty { font-size: 14px; }
.portal-workspace-sidebar .portal-menu-scroll {
  max-height: min(63vh, 780px);
  padding-inline: 10px;
}

/* Keep the workspace usable at laptop/tablet widths. */
@media (max-width: 1240px) {
  body.portal-page:has(> .portal-workspace-sidebar) > .dashboard-main {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 24px;
  }
  body.portal-page:has(> .portal-workspace-sidebar) > .dashboard-main .workspace-actions {
    grid-column: 1;
  }
}
@media (max-width: 900px) {
  body.portal-page:has(> .portal-workspace-sidebar) {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto minmax(0, 1fr) auto;
    padding-inline: clamp(12px, 2.4vw, 20px);
  }
  body.portal-page:has(> .portal-workspace-sidebar) > .portal-workspace-sidebar {
    position: static;
  }
  .portal-workspace-sidebar .portal-menu-scroll { max-height: min(35vh, 330px); }
  .portal-workspace-nav .nav-rail { min-height: 0; }
}
@media (max-width: 480px) {
  body.portal-page:has(> .portal-workspace-sidebar) { padding-inline: 12px; }
  body.portal-page:has(> .portal-workspace-sidebar) > .site-header { padding-block: 13px 12px; }
  body.portal-page:has(> .portal-workspace-sidebar) > .portal-navigation { margin-bottom: 14px; }
  .portal-workspace-sidebar .portal-menu-scroll { max-height: 260px; }
  .portal-workspace-nav :is(.nav-home, .nav-section-link) {
    min-height: 44px; padding-inline: 12px; font-size: 13px;
  }
  .portal-workspace-sidebar .portal-menu-search-row input { font-size: 16px; }
  .portal-workspace-sidebar .portal-menu-group > summary { font-size: 14px; }
  .portal-workspace-sidebar .portal-menu-item-label { font-size: 14px; }
  .portal-page .brand-wordmark > span { font-size: 12px; }
  .portal-page .site-footer a { font-size: 12px; }
}


/* ================================================================
   ARGO NAV FAVORITES + COLOR CONCEPTS (2026-11-10)
   16 selectable palettes, no JS / remote fonts / DB / CSP changes.
   Evergreen defaults to the pre-existing colors exactly.
   ================================================================ */
.portal-navigation .nav-favorites {
  margin-left: auto; flex: 0 0 auto; min-height: 44px;
  display: inline-flex; justify-content: center; align-items: center; gap: 8px;
  padding: 9px 16px; border: 1px solid var(--argo-border);
  border-radius: 11px; background: #fff; color: var(--argo-deep);
  box-shadow: var(--argo-control-shadow);
  font-family: inherit; font-size: 14px; font-weight: 750;
  line-height: 1.5; text-decoration: none; white-space: nowrap;
}
.portal-navigation .nav-favorites:hover { background: var(--argo-soft); border-color: var(--argo-deep); color: var(--argo-deep-hover); }
.portal-navigation .nav-favorites:focus-visible { outline: 3px solid var(--argo-deep); outline-offset: 3px; }
.portal-navigation .nav-favorites svg { flex: 0 0 auto; }
@media (max-width: 900px) {
  .portal-workspace-nav .nav-favorites { margin-left: 12px; }
}
@media (max-width: 480px) {
  .portal-navigation:not(.portal-workspace-nav) .nav-favorites { grid-column: 1 / -1; width: 100%; }
  .portal-workspace-nav .nav-favorites { min-height: 44px; padding-inline: 13px; }
}

/* Collapsible theme settings are available only in the administrator sidebar. */
.portal-theme-picker {
  margin: 10px 12px 12px; border: 1px solid var(--argo-border);
  border-radius: 12px; background: var(--surface); overflow: hidden;
}
.portal-theme-picker > summary {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  min-height: 48px; padding: 11px 12px; cursor: pointer; list-style: none;
  background: var(--argo-soft); color: var(--argo-deep);
  font-size: 14px; line-height: 1.5; font-weight: 750;
}
.portal-theme-picker > summary::-webkit-details-marker { display: none; }
.portal-theme-picker > summary::before { content: '◈'; margin-right: 2px; font-size: 17px; }
.portal-theme-picker .portal-theme-current {
  margin-left: auto; font-size: 13px; font-weight: 650; color: var(--argo-text);
}
.portal-theme-picker .portal-theme-inner { padding: 12px; }
.portal-theme-inner > p {
  margin: 0 0 12px; font-size: 13px; line-height: 1.6; color: var(--muted);
}
.portal-theme-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.portal-theme-grid .portal-theme-choice {
  display: flex; min-width: 0; align-items: center; gap: 7px;
  min-height: 48px; padding: 7px 8px;
  font-size: 13px; line-height: 1.35; font-weight: 650; text-align: left;
  color: var(--foreground); background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px;
  box-shadow: none; cursor: pointer;
}
.portal-theme-choice:hover { border-color: var(--argo-deep); background: var(--argo-soft); }
.portal-theme-choice.is-selected { border: 2px solid var(--argo-deep); background: var(--argo-soft); padding: 6px 7px; }
.portal-theme-choice:focus-visible { outline: 2px solid var(--argo-deep); outline-offset: 2px; }
.portal-theme-swatch {
  display: block; width: 20px; height: 20px; flex: 0 0 20px;
  border-radius: 6px; background: var(--swatch, #275b48);
  border: 1px solid rgb(0 0 0 / 12%);
}
.portal-theme-name { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.portal-theme-check { color: var(--argo-deep); flex: 0 0 auto; font-size: 15px; font-weight: 800; }
.portal-theme-choice[data-palette="forest"] { --swatch: #245441; }
.portal-theme-choice[data-palette="jade"] { --swatch: #126850; }
.portal-theme-choice[data-palette="mint"] { --swatch: #146753; }
.portal-theme-choice[data-palette="teal"] { --swatch: #096978; }
.portal-theme-choice[data-palette="ocean"] { --swatch: #175d8c; }
.portal-theme-choice[data-palette="sky"] { --swatch: #14688e; }
.portal-theme-choice[data-palette="navy"] { --swatch: #263e72; }
.portal-theme-choice[data-palette="indigo"] { --swatch: #4548a1; }
.portal-theme-choice[data-palette="violet"] { --swatch: #713c98; }
.portal-theme-choice[data-palette="lavender"] { --swatch: #6550a0; }
.portal-theme-choice[data-palette="rose"] { --swatch: #983b68; }
.portal-theme-choice[data-palette="coral"] { --swatch: #9c4241; }
.portal-theme-choice[data-palette="orange"] { --swatch: #975020; }
.portal-theme-choice[data-palette="amber"] { --swatch: #806016; }
.portal-theme-choice[data-palette="cocoa"] { --swatch: #754936; }
.portal-theme-choice[data-palette="slate"] { --swatch: #455464; }
body.portal-page:has(.argo-theme-marker[data-theme="jade"]),
html:has(> body.portal-page .argo-theme-marker[data-theme="jade"]) {
  --theme-accent: #126850; --theme-hover: #09523d;
  --theme-text: #1b4036; --theme-muted: #526c61;
  --theme-background: #f2f8f5; --theme-soft: #e5f3eb; --theme-border: #bedecf;
}
body.portal-page:has(.argo-theme-marker[data-theme="mint"]),
html:has(> body.portal-page .argo-theme-marker[data-theme="mint"]) {
  --theme-accent: #146753; --theme-hover: #0d4d3f;
  --theme-text: #1d3e37; --theme-muted: #5a716a;
  --theme-background: #f2faf8; --theme-soft: #e0f3ec; --theme-border: #bee4d8;
}
body.portal-page:has(.argo-theme-marker[data-theme="teal"]),
html:has(> body.portal-page .argo-theme-marker[data-theme="teal"]) {
  --theme-accent: #096978; --theme-hover: #084e5c;
  --theme-text: #173d43; --theme-muted: #546f75;
  --theme-background: #f1f8f9; --theme-soft: #e3f1f3; --theme-border: #bddde2;
}
body.portal-page:has(.argo-theme-marker[data-theme="ocean"]),
html:has(> body.portal-page .argo-theme-marker[data-theme="ocean"]) {
  --theme-accent: #175d8c; --theme-hover: #124568;
  --theme-text: #1d3548; --theme-muted: #5a7181;
  --theme-background: #f2f7fa; --theme-soft: #e4f0f7; --theme-border: #c3dbea;
}
body.portal-page:has(.argo-theme-marker[data-theme="sky"]),
html:has(> body.portal-page .argo-theme-marker[data-theme="sky"]) {
  --theme-accent: #14688e; --theme-hover: #0a4f72;
  --theme-text: #1e394b; --theme-muted: #566f80;
  --theme-background: #f3f8fc; --theme-soft: #e5f2fa; --theme-border: #c3deef;
}
body.portal-page:has(.argo-theme-marker[data-theme="navy"]),
html:has(> body.portal-page .argo-theme-marker[data-theme="navy"]) {
  --theme-accent: #263e72; --theme-hover: #192c55;
  --theme-text: #23334f; --theme-muted: #617083;
  --theme-background: #f3f5fa; --theme-soft: #e9edf7; --theme-border: #cbd3e9;
}
body.portal-page:has(.argo-theme-marker[data-theme="indigo"]),
html:has(> body.portal-page .argo-theme-marker[data-theme="indigo"]) {
  --theme-accent: #4548a1; --theme-hover: #333783;
  --theme-text: #302f60; --theme-muted: #676787;
  --theme-background: #f5f4fc; --theme-soft: #eeecfa; --theme-border: #d2cef1;
}
body.portal-page:has(.argo-theme-marker[data-theme="violet"]),
html:has(> body.portal-page .argo-theme-marker[data-theme="violet"]) {
  --theme-accent: #713c98; --theme-hover: #572a7b;
  --theme-text: #442c56; --theme-muted: #786684;
  --theme-background: #f8f4fb; --theme-soft: #f2eaf8; --theme-border: #e0caec;
}
body.portal-page:has(.argo-theme-marker[data-theme="lavender"]),
html:has(> body.portal-page .argo-theme-marker[data-theme="lavender"]) {
  --theme-accent: #6550a0; --theme-hover: #493985;
  --theme-text: #43385e; --theme-muted: #756c88;
  --theme-background: #f8f6fc; --theme-soft: #efebf8; --theme-border: #d9d0ed;
}
body.portal-page:has(.argo-theme-marker[data-theme="rose"]),
html:has(> body.portal-page .argo-theme-marker[data-theme="rose"]) {
  --theme-accent: #983b68; --theme-hover: #722b4c;
  --theme-text: #512d3f; --theme-muted: #806776;
  --theme-background: #fbf4f7; --theme-soft: #f8e8ef; --theme-border: #edccdc;
}
body.portal-page:has(.argo-theme-marker[data-theme="coral"]),
html:has(> body.portal-page .argo-theme-marker[data-theme="coral"]) {
  --theme-accent: #9c4241; --theme-hover: #7b302f;
  --theme-text: #513333; --theme-muted: #816867;
  --theme-background: #fcf6f4; --theme-soft: #f9eae7; --theme-border: #eccdca;
}
body.portal-page:has(.argo-theme-marker[data-theme="orange"]),
html:has(> body.portal-page .argo-theme-marker[data-theme="orange"]) {
  --theme-accent: #975020; --theme-hover: #744015;
  --theme-text: #543a2b; --theme-muted: #806e60;
  --theme-background: #fcf7f1; --theme-soft: #f8ecdf; --theme-border: #ead4bb;
}
body.portal-page:has(.argo-theme-marker[data-theme="amber"]),
html:has(> body.portal-page .argo-theme-marker[data-theme="amber"]) {
  --theme-accent: #806016; --theme-hover: #674b0c;
  --theme-text: #4c432a; --theme-muted: #776d55;
  --theme-background: #fbf9f0; --theme-soft: #f6f0d9; --theme-border: #e7dcb7;
}
body.portal-page:has(.argo-theme-marker[data-theme="cocoa"]),
html:has(> body.portal-page .argo-theme-marker[data-theme="cocoa"]) {
  --theme-accent: #754936; --theme-hover: #5b3528;
  --theme-text: #49352f; --theme-muted: #79675f;
  --theme-background: #f9f6f3; --theme-soft: #f1eae4; --theme-border: #e0d1c5;
}
body.portal-page:has(.argo-theme-marker[data-theme="slate"]),
html:has(> body.portal-page .argo-theme-marker[data-theme="slate"]) {
  --theme-accent: #455464; --theme-hover: #2b3948;
  --theme-text: #303945; --theme-muted: #6b737d;
  --theme-background: #f5f7f9; --theme-soft: #e9edf2; --theme-border: #cfd9e2;
}

/* Alternate concepts recolor the application; brand mark and danger actions
   keep their established identity and semantic warning colors. */
body.portal-page:has(.argo-theme-marker[data-theme]:not([data-theme="forest"])) {
  --accent: var(--theme-accent);
  --background: var(--theme-background);
  --foreground: var(--theme-text);
  --muted: var(--theme-muted);
  --line: var(--theme-border);
  --soft: var(--theme-soft);
  --argo-deep: var(--theme-accent);
  --argo-deep-hover: var(--theme-hover);
  --argo-text: var(--theme-text);
  --argo-border: var(--theme-border);
  --argo-soft: var(--theme-soft);
  --argo-soft-hover: var(--theme-border);
}
body.portal-page:has(.argo-theme-marker[data-theme]:not([data-theme="forest"])) :is(
  .portal-navigation .nav-rail, .portal-sidebar-head, .portal-workspace-sidebar .portal-menu-section-title
) { background: var(--theme-soft); border-color: var(--theme-border); }
body.portal-page:has(.argo-theme-marker[data-theme]:not([data-theme="forest"])) :is(
  .portal-workspace-nav .nav-home, .portal-workspace-nav .nav-section-link,
  .portal-navigation .nav-home, .portal-navigation .nav-toggle,
  .portal-navigation .nav-favorites
) { color: var(--theme-text); border-color: var(--theme-border); }
body.portal-page:has(.argo-theme-marker[data-theme]:not([data-theme="forest"])) :is(
  .portal-workspace-nav .nav-section-link.is-active,
  .portal-workspace-nav .nav-home[aria-current="page"],
  .portal-navigation .nav-home[aria-current="page"],
  .portal-navigation .nav-dropdown.is-active > .nav-toggle
) { background: var(--theme-accent); border-color: var(--theme-accent); color: #fff; }
body.portal-page:has(.argo-theme-marker[data-theme]:not([data-theme="forest"])) :is(
  .portal-workspace-nav .nav-home, .portal-workspace-nav .nav-section-link,
  .portal-navigation .nav-favorites
):hover { border-color: var(--theme-accent); background: var(--theme-soft); color: var(--theme-hover); }
body.portal-page:has(.argo-theme-marker[data-theme]:not([data-theme="forest"])) :is(
  .portal-menu-group > summary, .portal-sidebar-head strong, .portal-sidebar-kicker,
  .portal-sidebar-subtitle, .portal-menu-count, .portal-menu-count b,
  .portal-workspace-sidebar .portal-menu-live, .portal-menu-group > summary > span,
  .portal-menu-group > summary::before
) { color: var(--theme-text); }
body.portal-page:has(.argo-theme-marker[data-theme]:not([data-theme="forest"])) .portal-workspace-sidebar .portal-menu-live:hover { border-color: var(--theme-border); background: var(--theme-soft); }
body.portal-page:has(.argo-theme-marker[data-theme]:not([data-theme="forest"])) .portal-workspace-sidebar .portal-menu-live.is-current { border-color: var(--theme-border); background: var(--theme-soft); color: var(--theme-hover); }
body.portal-page:has(.argo-theme-marker[data-theme]:not([data-theme="forest"])) .portal-workspace-sidebar .portal-menu-reset { border-color: var(--theme-border); background: var(--theme-soft); color: var(--theme-hover); }
body.portal-page:has(.argo-theme-marker[data-theme]:not([data-theme="forest"])) :is(
  .portal-page .button-secondary, .portal-page a.button-secondary,
  .site-header .brand:hover, .portal-theme-choice.is-selected
) { border-color: var(--theme-border); }
body.portal-page:has(.argo-theme-marker[data-theme]:not([data-theme="forest"])) :is(
  .portal-page .button-primary, .portal-page a.button-primary,
  .portal-menu-search-row button
) { background: var(--theme-accent); border-color: var(--theme-accent); color: #fff; }
body.portal-page:has(.argo-theme-marker[data-theme]:not([data-theme="forest"])) :is(
  .portal-page .button-primary:hover, .portal-page a.button-primary:hover,
  .portal-menu-search-row button:hover
) { background: var(--theme-hover); border-color: var(--theme-hover); }
body.portal-page:has(.argo-theme-marker[data-theme]:not([data-theme="forest"])) :is(
  .portal-intro h2 > span, .section-label, .brand-wordmark,
  .site-footer a, .policy-document a
) { color: var(--theme-accent); }
body.portal-page:has(.argo-theme-marker[data-theme]:not([data-theme="forest"])) :is(
  .auth-card, .account-card, .portal-workspace-sidebar,
  .portal-menu-group
) { border-color: var(--theme-border); }
body.portal-page:has(.argo-theme-marker[data-theme]:not([data-theme="forest"])) :is(
  .point-icon, .portal-menu-code, .portal-menu-status, .portal-menu-future
) { color: var(--theme-muted); }
/* The intentionally fixed brand symbol and destructive buttons must retain meaning. */
@media (prefers-reduced-motion: reduce) { .portal-navigation .nav-favorites { transition: none; } }
/* Small navigation accents should follow the selected concept as well. */
body.portal-page:has(.argo-theme-marker[data-theme]:not([data-theme="forest"])) :is(
  .portal-menu-arrow, .portal-menu-group > summary::before,
  .portal-menu-search > label, .portal-workspace-sidebar .portal-menu-item-label,
  .portal-sidebar-kicker, .portal-workspace-sidebar .portal-menu-count b
) { color: var(--theme-accent); }
body.portal-page:has(.argo-theme-marker[data-theme]:not([data-theme="forest"])) :is(
  .portal-menu-group, .portal-theme-choice, .portal-theme-picker,
  .portal-menu-search-row input, .portal-sidebar-head
) { border-color: var(--theme-border); }
body.portal-page:has(.argo-theme-marker[data-theme]:not([data-theme="forest"])) :is(
  .portal-theme-picker > summary, .portal-workspace-sidebar .portal-menu-future
) { background: var(--theme-soft); }

/* Workspace status and account roles share the selected portal concept. */
body.portal-page:has(.argo-theme-marker[data-theme]) :is(.role-badge, .portal-menu-status) {
  background: var(--argo-soft);
  color: var(--argo-deep);
  border-color: var(--argo-border);
}

/* Ordinary portal chrome uses one palette, including keyboard/text selection. */
body.portal-page:has(.argo-theme-marker[data-theme]) {
  --argo-control-shadow: 0 4px 12px -10px color-mix(in srgb, var(--argo-deep) 40%, transparent);
  accent-color: var(--argo-deep);
  caret-color: var(--argo-deep);
}
body.portal-page:has(.argo-theme-marker[data-theme])::selection,
body.portal-page:has(.argo-theme-marker[data-theme]) *::selection {
  background: var(--argo-deep);
  color: #fff;
}
body.portal-page:has(.argo-theme-marker[data-theme]) :is(
  .auth-card, .account-card, .management-panel, .request-card, .empty-state,
  .workspace-note, .workspace-mark, .workspace-action, .permission-policy,
  .account-details > div, .connection-row, .approver-row, .capability-row,
  .selected-account, .task-item, .task-heading, .security-user-card,
  .site-footer, .site-footer a, .portal-navigation .nav-rail,
  .portal-navigation .nav-panel, .portal-sidebar-head, .portal-menu-group,
  .portal-menu-future, .portal-menu-note, .portal-theme-picker, .portal-theme-choice,
  .field input, .field select, .secret-value, .recovery-codes,
  .portal-menu-search-row input, .portal-menu-reset, .portal-menu-live,
  .header-back, .logout-button, .compact-button, .management-link,
  .task-review, .task-pagination a, .security-page-links a, .otp-install-links a,
  .forgot-link, .return-link a, .register-prompt a, .task-bell, .permission-action
) { border-color: var(--argo-border); }
body.portal-page:has(.argo-theme-marker[data-theme]) :is(
  .permission-action, .task-category > span, .point-icon
) { color: var(--argo-deep); background: var(--argo-soft); border-color: var(--argo-border); }
body.portal-page:has(.argo-theme-marker[data-theme]) :is(
  .header-back, .logout-button, .compact-button:not(:disabled), .management-link,
  .task-review, .task-pagination a, .security-page-links a, .otp-install-links a,
  .forgot-link, .return-link a, .register-prompt a, .task-bell,
  .workspace-action, .field input, .field select, .portal-menu-live,
  .portal-navigation .nav-item
):hover { border-color: var(--argo-deep); }
body.portal-page:has(.argo-theme-marker[data-theme]) .button-secondary:not(.review-actions *):not(.security-review-actions *):not(.security-destructive) {
  border-color: var(--argo-border);
}
body.portal-page:has(.argo-theme-marker[data-theme]) .button-secondary:not(.review-actions *):not(.security-review-actions *):not(.security-destructive):hover {
  border-color: var(--argo-deep);
}
body.portal-page:has(.argo-theme-marker[data-theme]) :is(
  .field input, .field select, .secret-value, .recovery-codes, .portal-menu-search-row input
):focus { border-color: var(--argo-deep); outline-color: var(--argo-deep); }
body.portal-page:has(.argo-theme-marker[data-theme]) :is(
  a, button, summary, input, select, textarea, [tabindex]
):focus-visible { outline-color: var(--argo-deep); }
body.portal-page:has(.argo-theme-marker[data-theme]) :is(input[type=checkbox], input[type=radio]) {
  accent-color: var(--argo-deep);
}
body.portal-page:has(.argo-theme-marker[data-theme]) :is(
  .form-notice, .recovery-notice, .review-note, .qr-unavailable, .otp-explainer,
  .permission-owner-note, .security-notice, .security-address, .security-info,
  .security-review-effect
) { background: var(--argo-soft); color: var(--argo-text); border-color: var(--argo-border); }
body.portal-page:has(.argo-theme-marker[data-theme]) .portal-menu-note {
  background: var(--background); color: var(--muted);
}
body.portal-page:has(.argo-theme-marker[data-theme]) :is(.auth-card, .account-card) {
  box-shadow: 0 14px 45px -26px color-mix(in srgb, var(--argo-deep) 25%, transparent);
}

/* One compact navigation system for every authenticated portal page. Body scrolling is unchanged. */
body.portal-page:has(>.portal-workspace-sidebar){grid-template-columns:210px minmax(0,1fr);column-gap:12px;padding-inline:16px}
body.portal-page>.portal-workspace-sidebar{align-self:start;max-height:calc(100dvh - 130px);overflow:auto;border-color:var(--argo-border)}
.portal-workspace-sidebar .portal-sidebar-head{padding:11px}
.portal-workspace-sidebar .portal-sidebar-head strong{font-size:16px}
.portal-workspace-sidebar .portal-sidebar-kicker{font-size:10px}
.portal-workspace-sidebar .portal-sidebar-subtitle{font-size:11px}
.portal-workspace-sidebar [data-menu-scope]{line-height:1.45;overflow-wrap:anywhere}
.portal-workspace-sidebar .portal-menu-search{padding:8px 10px 0}
.portal-workspace-sidebar .portal-menu-search>label{font-size:12px}
.portal-workspace-sidebar .portal-menu-search-row{gap:5px}
.portal-workspace-sidebar .portal-menu-search-row input{height:34px;padding:5px 7px;min-width:0;font-size:12px}
.portal-workspace-sidebar .portal-menu-search-row button{height:34px;min-width:42px;padding:5px 7px;font-size:12px}
.portal-workspace-sidebar .portal-menu-count{margin:9px 10px;font-size:11px;padding:0}
.portal-workspace-sidebar .portal-menu-scroll{max-height:none;overflow:visible}
.portal-workspace-sidebar .portal-menu-section-title{margin:7px 0 4px;padding:6px 10px;border-top:1px solid var(--argo-border);color:var(--argo-deep);font-size:12px;font-weight:750}
.portal-workspace-sidebar .portal-menu-group{margin-bottom:6px;border-color:var(--argo-border)}
.portal-workspace-sidebar .portal-menu-group>summary{min-height:34px;padding:8px 9px;font-size:12px}
.portal-workspace-sidebar .portal-menu-group>summary>span{font-size:11px}
.portal-workspace-sidebar .portal-menu-item{min-height:34px;padding:7px 9px}
.portal-workspace-sidebar .portal-menu-item-label{font-size:12px}
.portal-workspace-sidebar .portal-menu-code{font-size:11px}
.portal-workspace-sidebar .portal-menu-status{font-size:10px;padding:2px 5px}
.portal-workspace-sidebar .portal-menu-note{padding:10px;font-size:11px;line-height:1.6}
.portal-workspace-sidebar .portal-menu-live.is-current{background:var(--argo-deep);border-color:var(--argo-deep);color:#fff;box-shadow:inset 3px 0 0 var(--argo-deep-hover);font-weight:800}
.portal-workspace-sidebar .portal-menu-live.is-current :is(.portal-menu-item-label,.portal-menu-code,.portal-menu-arrow){color:#fff;font-weight:800}
.portal-workspace-sidebar .portal-menu-live.is-current:hover{background:var(--argo-deep-hover);border-color:var(--argo-deep-hover);color:#fff}
body.portal-page:has(.argo-theme-marker[data-theme]) .portal-workspace-sidebar .portal-menu-item.portal-menu-live.is-current[aria-current=page]{background:var(--argo-deep);border-color:var(--argo-deep);color:#fff;font-weight:800}
body.portal-page:has(.argo-theme-marker[data-theme]) .portal-workspace-sidebar .portal-menu-item.portal-menu-live.is-current[aria-current=page] :is(.portal-menu-item-label,.portal-menu-code,.portal-menu-arrow){color:#fff;font-weight:800}
body.portal-page:has(.argo-theme-marker[data-theme]) .portal-workspace-sidebar .portal-menu-item.portal-menu-live.is-current[aria-current=page]:hover{background:var(--argo-deep-hover);color:#fff}
.portal-workspace-sidebar [hidden]{display:none!important}
.portal-mobile-menu-button,.portal-mobile-menu-fallback,.portal-mobile-menu-heading{display:none}
.portal-workspace-sidebar[popover]{display:none}
.portal-live-region{display:contents}
form[data-live-search=main]{position:relative}
.portal-live-status{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
.portal-live-status[data-live-state=error]{z-index:8;inset:auto 0 auto auto;top:100%;width:auto;max-width:min(520px,100%);height:auto;margin:2px 0 0;padding:7px 10px;clip:auto;white-space:normal;background:var(--surface);color:var(--foreground);border:1px solid var(--argo-border);border-radius:5px;font-size:12px;box-shadow:var(--argo-control-shadow)}
.portal-live-status a{font-size:12px}
@media(max-width:1100px){
 body.portal-page:has(>.portal-workspace-sidebar){grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto auto minmax(0,1fr) auto;padding-inline:12px}
 body.portal-page:has(>.portal-workspace-sidebar)>main{grid-column:1;grid-row:4}
 body.portal-page:has(>.portal-workspace-sidebar)>.site-footer{grid-row:5}
 body.portal-page>.portal-workspace-sidebar:not([popover]){grid-column:1;grid-row:3;position:static;max-height:230px;margin-bottom:12px}
 body.portal-page.aw-workspace>.portal-workspace-sidebar:not([popover]){display:none}
 .portal-mobile-menu-fallback{display:inline-flex!important;align-items:center;min-height:30px;padding:4px 9px;border:1px solid var(--argo-border);border-radius:5px;background:var(--surface);color:var(--argo-deep);font-size:12px;white-space:nowrap}
 .portal-mobile-enhanced .portal-mobile-menu-fallback{display:none!important}
 .portal-mobile-enhanced .portal-mobile-menu-button{display:inline-flex;align-items:center;min-height:30px;margin:0;padding:4px 9px;border:1px solid var(--argo-border);border-radius:5px;background:var(--surface);color:var(--argo-deep);font:inherit;font-size:12px;white-space:nowrap}
 body.portal-page.portal-mobile-enhanced:has(>.portal-workspace-sidebar)>.portal-workspace-sidebar[popover]:popover-open{display:block;position:fixed;inset:0 auto 0 0;grid-column:auto;grid-row:auto;width:min(340px,92vw);height:100vh;height:100dvh;max-width:92vw;max-height:100dvh;min-height:0;margin:0;padding:0;border:0;border-right:1px solid var(--argo-border);border-radius:0;background:var(--surface);color:var(--foreground);overflow:auto;box-shadow:8px 0 30px rgb(0 0 0/.2)}
 .portal-workspace-sidebar[popover]::backdrop{background:rgb(0 0 0/.15)}
 .portal-workspace-sidebar[popover] .portal-mobile-menu-heading{position:sticky;top:0;z-index:3;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px;background:var(--argo-soft);border-bottom:1px solid var(--argo-border);color:var(--argo-deep)}
 .portal-mobile-menu-heading button{min-height:34px;margin:0;padding:5px 10px;border:1px solid var(--argo-border);border-radius:4px;background:var(--surface);color:var(--argo-deep);font:inherit;font-size:12px}
}

/* Compact portal scrollbars v5. Standard thin is the fallback; supported WebKit controls use 4px.
   https://developer.chrome.com/docs/css-ui/scrollbar-styling */
html:has(> body.portal-page), body.portal-page, body.portal-page * {
  scrollbar-width: thin;
  scrollbar-color: var(--theme-accent, var(--accent)) transparent;
}
@supports selector(::-webkit-scrollbar) {
  html:has(> body.portal-page), body.portal-page, body.portal-page *,
  body.portal-page .portal-menu-scroll, body.portal-page .nav-rail, body.portal-page .aw-stats {
    scrollbar-width: auto;
    scrollbar-color: auto;
  }
  html:has(> body.portal-page)::-webkit-scrollbar, body.portal-page::-webkit-scrollbar, body.portal-page *::-webkit-scrollbar {
    width: 4px;
    height: 6px;
  }
  html:has(> body.portal-page)::-webkit-scrollbar-track, body.portal-page::-webkit-scrollbar-track, body.portal-page *::-webkit-scrollbar-track {
    background: transparent;
  }
  html:has(> body.portal-page)::-webkit-scrollbar-thumb, body.portal-page::-webkit-scrollbar-thumb, body.portal-page *::-webkit-scrollbar-thumb {
    min-height: 32px;
    border: 0;
    border-radius: 4px;
    background: var(--theme-accent, var(--accent));
    background: color-mix(in srgb, var(--theme-accent, var(--accent)) 60%, transparent);
  }
  html:has(> body.portal-page)::-webkit-scrollbar-thumb:hover, body.portal-page::-webkit-scrollbar-thumb:hover, body.portal-page *::-webkit-scrollbar-thumb:hover {
    background: var(--theme-accent, var(--accent));
  }
  html:has(> body.portal-page)::-webkit-scrollbar-corner, body.portal-page::-webkit-scrollbar-corner, body.portal-page *::-webkit-scrollbar-corner {
    background: transparent;
  }
}

/* Shared, counted-list pagination. Scrollbar and workspace layout rules are unchanged. */
.portal-page .portal-row-number{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;vertical-align:middle;min-width:22px;min-height:20px;padding:1px 5px;margin-inline-end:5px;border:1px solid var(--argo-border,var(--line));border-radius:5px;background:var(--argo-soft,var(--soft));color:var(--argo-deep,var(--accent));font-size:10px;font-weight:700;line-height:1.3;font-variant-numeric:tabular-nums;white-space:nowrap;box-sizing:border-box}
.portal-page .aw-name-line>.portal-row-number{margin-inline-end:0}
.portal-page .aw-order-options .portal-row-number{color:var(--argo-deep,var(--accent))}
.portal-page .permission-numbered-options{display:flex;flex-direction:column;gap:4px;min-width:0;max-height:min(360px,45dvh);overflow:auto;padding:2px;margin:0;border:0}
.portal-page .permission-numbered-option{display:flex;align-items:center;gap:7px;margin:0;padding:7px 8px;border:1px solid var(--argo-border,var(--line));border-radius:5px;background:var(--surface);color:var(--foreground);cursor:pointer;font-size:12px;line-height:1.5}
.portal-page .permission-numbered-option:has(input:checked){border-color:var(--argo-deep,var(--accent));background:var(--argo-soft,var(--soft))}
.portal-page .permission-numbered-option:focus-within{outline:2px solid var(--argo-deep,var(--accent));outline-offset:1px}
.portal-page .permission-numbered-option input[type=radio]{width:14px;height:14px;min-height:0;flex:0 0 auto;margin:0;padding:0;accent-color:var(--argo-deep,var(--accent))}
.portal-page .permission-numbered-copy{display:flex;flex-direction:column;min-width:0;overflow-wrap:anywhere}
.portal-page .permission-numbered-copy small{font-size:11px;color:var(--muted)}
.portal-page .portal-pagination{display:flex;flex:0 0 auto;justify-content:center;align-items:center;min-width:0;margin:12px 0;padding:6px 0;color:var(--foreground,#24372d)}
.portal-page .portal-pagination-links{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:7px;max-width:100%}
.portal-page .portal-pagination-pages,.portal-page .portal-pagination-controls{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:4px;max-width:100%}
.portal-page .portal-pagination .portal-page-link{display:inline-flex;align-items:center;justify-content:center;min-width:32px;min-height:32px;padding:4px 8px;border:1px solid var(--argo-border,#cbd8cd);border-radius:5px;background:var(--surface,#fff);color:var(--argo-deep,#234936);font-size:12px;font-weight:650;line-height:1.3;text-decoration:none;font-variant-numeric:tabular-nums;white-space:nowrap;box-sizing:border-box}
.portal-page .portal-pagination a.portal-page-link:hover{background:var(--argo-soft,#edf4ef);border-color:var(--argo-deep,#234936)}
.portal-page .portal-pagination a.portal-page-link:focus-visible{outline:2px solid var(--argo-deep,#234936);outline-offset:2px}
.portal-page .portal-pagination .portal-page-link[aria-current=page]{background:var(--argo-deep,#234936);border-color:var(--argo-deep,#234936);color:#fff;font-weight:800}
@media(max-width:600px){.portal-page .portal-pagination{margin:8px 0;padding:4px 0}.portal-page .portal-pagination-links{gap:5px}.portal-page .portal-pagination .portal-page-link{min-width:26px;min-height:30px;padding:4px 5px;font-size:11px}.portal-page .portal-pagination-pages,.portal-page .portal-pagination-controls{gap:3px}}

/* Shared administrator document layout. Public/sign-in pages have no workspace sidebar. */
body.portal-page:has(>.portal-workspace-sidebar):not(.mpc-wide){height:auto!important;min-height:100dvh!important;overflow:visible!important;grid-template-rows:auto auto minmax(0,1fr)!important}
body.portal-page:has(>.portal-workspace-sidebar)>.site-footer{display:none!important}
body.portal-page:has(>.portal-workspace-sidebar)>.portal-workspace-sidebar:not([popover]){align-self:start!important;position:sticky!important;top:var(--portal-column-top,12px)!important;height:auto!important;max-height:none!important;min-height:0!important;overflow:visible!important;border-bottom:0;border-radius:12px 12px 0 0;box-shadow:none}
body.portal-page:has(>.portal-workspace-sidebar)>.portal-workspace-sidebar:not([popover]) .portal-menu-scroll{max-height:none!important;overflow:visible!important}
body.portal-page:has(>.portal-workspace-sidebar)>main{align-self:start!important;height:auto!important;max-height:none!important;min-height:0!important;overflow:visible!important;padding-bottom:24px!important}
body.portal-page:has(>.portal-workspace-sidebar):not(.mpc-wide)>main{position:sticky;top:var(--portal-column-top,12px)}
.portal-page .portal-list-content{display:block;min-width:0;flex:0 0 auto}
body.portal-page.aw-workspace .portal-list-content>.aw-table-scroll{flex:none}
body.portal-page:has(>.portal-workspace-sidebar)>main :is(.aw-table-scroll,.sales-table-scroll,.commerce-table-scroll){height:auto!important;max-height:none!important;overflow:visible!important;overscroll-behavior:auto;scrollbar-gutter:auto}
body.portal-page:has(>.portal-workspace-sidebar)>main .sales-results{overflow:visible}
.portal-page .portal-sticky-search{position:sticky!important;top:8px;z-index:30;background:var(--surface,#fff);box-shadow:0 5px 12px -10px var(--argo-deep,#243932)}
.portal-page .portal-sticky-search.portal-sticky-search-tall{position:static!important}
body.portal-page>main :is(.aw-table,.sales-table,.commerce-table,.mpc-table)>thead{position:sticky;top:var(--portal-table-top,8px)!important;z-index:20;background:var(--argo-soft,var(--soft,#edf3ef))}
body.portal-page>main [popover] thead{top:0!important;z-index:2}
.portal-page :is(.portal-sort-link,.portal-sort-button){display:inline-flex;align-items:center;gap:6px;min-height:30px;padding:2px 0;border:0;border-radius:3px;background:transparent;color:inherit;font:inherit;font-weight:600;line-height:1.4;text-align:inherit;text-decoration:none;cursor:pointer}
.portal-page :is(.portal-sort-link,.portal-sort-button):hover{color:var(--argo-deep);text-decoration:underline;text-underline-offset:3px}
.portal-page :is(.portal-sort-link,.portal-sort-button):focus-visible{outline:2px solid var(--argo-deep);outline-offset:2px}
.portal-page .portal-sort-arrow{font-size:12px;opacity:.75}
.portal-page th:is([aria-sort=ascending],[aria-sort=descending]){color:var(--argo-deep)}
/* Every list reuses the customer list's counted, numbered pager. */
.portal-page .aw-pagination-footer{position:relative;flex:0 0 auto;min-width:0;margin-top:3px;padding:0 100px;color:var(--muted);font-size:11px}
.portal-page .aw-pagination-footer>.portal-pagination{margin:5px 0}
.portal-page .aw-pagination-meta{position:absolute;left:0;top:50%;max-width:95px;transform:translateY(-50%);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(max-width:1100px){
 body.portal-page:has(>.portal-workspace-sidebar):not(.mpc-wide){grid-template-rows:auto auto auto auto!important}
 body.portal-page:has(>.portal-workspace-sidebar)>main{position:static!important}
 body.portal-page:has(>.portal-workspace-sidebar)>.portal-workspace-sidebar:not([popover]){position:static!important}
}
@media(max-width:900px){.portal-page .aw-pagination-footer{padding:0}.portal-page .aw-pagination-meta{position:static;display:block;transform:none;max-width:none;text-align:center}}

/* Lists adapt to their content column, so sticky headings never sit inside a horizontal scroll pane. */
body.portal-page>main :is(.aw-table-scroll,.sales-table-scroll,.commerce-table-scroll){container:portal-list-table / inline-size}
@container portal-list-table (max-width:1080px){
 .portal-page main table.portal-list-table{display:block;min-width:0;width:100%;table-layout:auto}
 .portal-page main table.portal-list-table>:is(thead,tbody){display:block;width:100%}
 .portal-page main table.portal-list-table>thead>tr{display:flex;flex-wrap:wrap;align-items:center;gap:6px;padding:8px;grid-template-columns:none;background:var(--argo-soft)}
 .portal-page main table.portal-list-table>thead>tr>th{display:block;width:auto;padding:0;border:0;white-space:normal;text-align:left}
 .portal-page main table.portal-list-table>thead :is(.portal-sort-link,.portal-sort-button){padding:4px 7px;border:1px solid var(--argo-border);background:var(--surface);font-size:12px}
 .portal-page main table.portal-list-table>tbody>tr{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px 16px;width:100%;padding:12px;border-bottom:1px solid var(--argo-border)}
 .portal-page main table.portal-list-table>tbody>tr>td{display:block;min-width:0;width:auto;max-width:none;padding:0;border:0;white-space:normal;text-align:left}
 .portal-page main table.portal-list-table>tbody>tr>td::before{content:attr(data-portal-column-label);display:block;margin-bottom:3px;color:var(--muted);font-size:11px;font-weight:500}
 .portal-page main table.portal-list-table>tbody>tr>td:is(:first-child,:last-child){grid-column:1/-1}
 .portal-page main .aw-table-orders>tbody>tr>td:nth-child(4),.portal-page main .sales-table>tbody>tr>td:is(:nth-child(3),:nth-child(8)){grid-column:1/-1}
 .portal-page main table.portal-list-table .sales-title-cell{min-width:0;max-width:none}
}
@media(max-width:700px){
 .portal-page .sales-filter-panel.portal-sticky-search{padding:8px}
 .portal-page .sales-filter-panel .sales-filters{gap:8px}
 .portal-page .sales-filter-panel .field :is(input,select){min-height:38px;padding:6px 8px}
 .portal-page .sales-filter-panel .sales-filter-actions,.portal-page .sales-filter-panel .sales-filter-actions .button{min-height:38px}
}

body.portal-page>main :is(.aw-table-scroll,.sales-table-scroll,.commerce-table-scroll,.mpc-table-wrap){scroll-margin-top:calc(var(--portal-table-top,8px) + 8px)}
