:root {
    --navy: #112f46;
    --teal: #087f83;
    --muted: #647887;
    --line: #dce5eb;
    --paper: #f5f8fa;
    --soft: #e9f5f3;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--navy); background: var(--paper); font: 16px/1.6 Manrope, sans-serif; }
button, input, select, a { font: inherit; }
button, a, input { outline-offset: 4px; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid #79c9bd; }
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }
button { cursor: pointer; }
.skip { position: absolute; left: 16px; top: -64px; z-index: 5; background: #fff; padding: 8px 16px; }
.skip:focus { top: 16px; }
.page { max-width: 1440px; min-height: 100svh; margin: auto; padding: 40px 64px 24px; display: flex; flex-direction: column; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; gap: 12px; align-items: center; color: var(--navy); font-size: 24px; font-weight: 700; letter-spacing: -1px; }
.brand:hover { text-decoration: none; }
.mark { width: 40px; height: 40px; display: grid; place-items: center; position: relative; background: var(--navy); color: #fff; border-radius: 12px; font-size: 24px; }
.mark::after { content: ''; position: absolute; right: 6px; top: 6px; width: 6px; height: 6px; background: #63cdb3; border-radius: 2px; }
.preview { border: 1px solid var(--line); border-radius: 24px; background: #fff; padding: 8px 16px; color: var(--muted); font-size: 12px; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 80px; flex: 1; padding: 48px 0; }
.intro { max-width: 400px; width: 100%; margin-inline: auto; }
.intro h1 { margin: 0; color: #345367; font-size: 32px; line-height: 1.35; letter-spacing: -1px; font-weight: 500; }
.form-area { width: 100%; max-width: 448px; justify-self: center; }
.card { border: 1px solid var(--line); border-radius: 24px; background: #fff; padding: 32px; box-shadow: 0 16px 64px -48px #112f4638; }
.card h2 { margin: 0 0 24px; font-size: 30px; line-height: 1.3; letter-spacing: -1px; font-weight: 600; }
.socials { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.socials > :only-child { grid-column: 1 / -1; }
.social { min-height: 48px; display: flex; align-items: center; justify-content: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 8px; color: var(--navy); font-size: 16px; font-weight: 600; transition: background .3s cubic-bezier(.22, 1, .36, 1); }
.social:hover { background: var(--paper); }
.google { color: #4285f4; font-size: 20px; font-weight: 700; }
.ms { display: grid; grid-template-columns: 7px 7px; gap: 2px; flex-shrink: 0; }
.ms i { width: 7px; height: 7px; background: #f25022; }
.ms i:nth-child(2) { background: #7fba00; }
.ms i:nth-child(3) { background: #00a4ef; }
.ms i:nth-child(4) { background: #ffb900; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; margin: 24px 0; }
.divider::before, .divider::after { content: ''; height: 1px; background: var(--line); flex: 1; }
.field { margin-bottom: 16px; }
label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 8px; }
input[type=email], input[type=password], input[type=text] { width: 100%; height: 48px; padding: 12px 16px; border: 1px solid #d0dce4; border-radius: 8px; background: #fff; color: var(--navy); font-size: 16px; transition: border-color .3s cubic-bezier(.22, 1, .36, 1); }
input::placeholder { color: #788c9b; }
input:focus { border-color: var(--teal); }
.password { position: relative; }
.password input { padding-right: 64px; }
.show { position: absolute; right: 8px; top: 8px; height: 32px; border: 0; background: transparent; color: var(--muted); padding: 4px 8px; font-size: 14px; }
.options { display: flex; justify-content: space-between; gap: 8px; align-items: center; font-size: 14px; margin: 8px 0 24px; }
.remember { display: flex; align-items: center; gap: 8px; font-size: inherit; font-weight: 400; margin: 0; }
.remember input { accent-color: var(--teal); width: 16px; height: 16px; margin: 0; }
.submit { width: 100%; height: 48px; display: flex; align-items: center; justify-content: center; gap: 12px; color: #fff; background: var(--teal); border: 1px solid var(--teal); border-radius: 8px; font-size: 16px; font-weight: 600; transition: background .3s cubic-bezier(.22, 1, .36, 1); }
.submit:hover { background: #076a6d; }
.cancel-action { width: 100%; margin-top: 16px; }
.submit:active, .social:active { transform: translateY(1px); }
.register { text-align: center; margin: 24px 0 0; color: var(--muted); font-size: 14px; }
.register a { font-weight: 700; }
.footer { display: flex; justify-content: space-between; gap: 16px; color: var(--muted); font-size: 12px; }
.footer nav { display: flex; gap: 24px; }
.footer a { color: var(--muted); }
.field-error, .validation { color: #a22b35; font-size: 14px; }
.validation ul { padding-left: 20px; }
.validation-summary-valid { display: none; }
.input-validation-error { border-color: #a22b35 !important; }
#feedback { display: none; padding: 12px 16px; background: var(--soft); border: 1px solid #c7e3dd; border-radius: 8px; color: var(--teal); font-size: 14px; margin-top: 16px; }
#feedback.visible { display: block; }
@media (max-width: 1000px) {
    .page { padding: 32px; }
    .layout { gap: 40px; }
    .intro h1 { font-size: 30px; }
}
@media (max-width: 720px) {
    .page { padding: 24px 16px; }
    .top { padding: 0 8px; }
    .brand { font-size: 20px; }
    .mark { width: 32px; height: 32px; font-size: 20px; border-radius: 8px; }
    .preview { font-size: 10px; padding: 4px 8px; }
    .layout { display: block; padding: 40px 0 24px; }
    .intro { display: none; }
    .form-area { margin: auto; }
    .card { padding: 32px 24px; border-radius: 16px; }
    .card h2 { font-size: 24px; }
    .options { font-size: 13px; }
    .footer { flex-direction: column; align-items: center; gap: 8px; }
    .footer nav { gap: 16px; }
}
@media (max-width: 380px) {
    .preview { display: none; }
    .card { padding: 24px 16px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; transform: none !important; }
}
.portal-main { width: 100%; max-width: 1040px; margin: 48px auto; flex: 1; }
.portal-nav, .member-actions, .compact-form, .workspace-controls { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.portal-nav { font-size: 14px; }
.text-action { border: 0; background: none; color: var(--teal); padding: 4px 0; font-size: inherit; }
.text-action:hover { text-decoration: underline; }
.section-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: 24px; }
.section-heading h1 { margin: 0; font-size: 30px; line-height: 1.3; letter-spacing: -1px; font-weight: 600; }
.action { display: inline-flex; justify-content: center; align-items: center; min-height: 48px; padding: 8px 24px; border: 1px solid var(--teal); border-radius: 8px; background: var(--teal); color: #fff; font-weight: 600; }
.action:hover { background: #076a6d; text-decoration: none; }
.panel { padding: 24px 32px; border: 1px solid var(--line); border-radius: 16px; background: #fff; margin-bottom: 24px; }
.panel h2 { font-size: 20px; margin: 0 0 16px; }
.workspace-row, .member-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.workspace-row:last-child, .member-row:last-child { border-bottom: 0; }
.workspace-row > span, .muted { color: var(--muted); }
.member-email { display: block; font-size: 14px; overflow-wrap: anywhere; }
.session-details { min-width: 0; overflow-wrap: anywhere; }
.member-actions { gap: 16px; font-size: 14px; }
.compact-form { gap: 8px; }
.compact-form select { border: 1px solid var(--line); border-radius: 8px; padding: 8px; background: #fff; color: var(--navy); font-size: 16px; }
.inline-form { display: flex; align-items: flex-end; gap: 16px; }
.inline-form .field { margin: 0; flex: 1; }
.inline-form input, .danger-form input { width: 100%; min-height: 48px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 16px; background: #fff; color: var(--navy); }
.workspace-controls { gap: 32px; align-items: flex-start; }
.workspace-controls summary { cursor: pointer; color: #a22b35; padding: 4px 0; }
.danger-form { max-width: 448px; padding-top: 16px; }
.danger { background: #a22b35; border-color: #a22b35; }
.danger:hover { background: #81232b; }
.minor-link { font-size: 14px; }
.notice { padding: 12px 16px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.invite-form { display: grid; grid-template-columns: minmax(0, 1fr) 140px auto; gap: 16px; align-items: end; }
.invite-form .field { margin: 0; }
.invite-form input, .invite-form select { width: 100%; min-height: 48px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 16px; background: #fff; color: var(--navy); font-size: 16px; }
.account-nav { display: flex; flex-wrap: wrap; gap: 12px 24px; margin-bottom: 24px; font-size: 14px; }
.account-panel { max-width: 640px; }
.account-panel .muted { overflow-wrap: anywhere; }
.account-panel select { width: 100%; min-height: 48px; padding: 8px 16px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--navy); }
.account-panel textarea { display: block; width: 100%; min-height: 96px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--navy); font: inherit; resize: vertical; }
.account-panel details summary { cursor: pointer; color: var(--teal); }
.account-panel hr { margin: 24px 0; border: 0; border-top: 1px solid var(--line); }
.admin-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.admin-actions .action { text-align: center; }
.admin-identifier { overflow-wrap: anywhere; min-width: 0; }
.account-panel h2, .section-heading h1 { overflow-wrap: anywhere; }
.action.secondary { background: #fff; color: var(--teal); }
.action.secondary:hover { background: var(--soft); }
.audit-event { padding: 16px 0; border-bottom: 1px solid var(--line); }
.audit-event:first-child { padding-top: 0; }
.audit-event:last-child { padding-bottom: 0; border-bottom: 0; }
.audit-event p { margin: 8px 0; }
.audit-event .workspace-row { padding: 0; border: 0; }
.audit-event summary { cursor: pointer; color: var(--teal); }
.account-panel details + .action { margin-top: 16px; }
.audit-details { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 16px; font-size: 14px; }
.audit-details dt { color: var(--muted); }
.audit-details dd { margin: 0; overflow-wrap: anywhere; }
.authenticator-key { overflow-wrap: anywhere; letter-spacing: 2px; }
.recovery-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 24px; list-style: none; padding: 0; }
@media (max-width: 720px) {
    .portal .top { align-items: flex-start; flex-wrap: wrap; }
    .portal-nav { gap: 16px; }
    .portal-main { margin: 32px auto; }
    .section-heading h1 { font-size: 24px; }
    .panel { padding: 16px 24px; }
    .member-row, .inline-form { align-items: stretch; flex-direction: column; gap: 12px; }
    .workspace-row { align-items: flex-start; }
    .invite-form { grid-template-columns: 1fr; }
}
.avatar-image { object-fit: cover; border-radius: 50%; }
