.account-portal { margin: 14px 20px; border: 1px solid var(--line, #d5dad3); border-radius: 24px; background: #fff; color: #0d100e; overflow: hidden; }
.account-portal [hidden] { display: none !important; }
.portal-header { padding: 28px 32px; display: flex; align-items: center; justify-content: space-between; gap: 20px; background: #f1f2ef; border-bottom: 1px solid #d5dad3; }
.account-portal h2 { font-size: clamp(25px, 3vw, 34px); letter-spacing: -.04em; margin: 0 0 8px; line-height: 1.15; }
.account-portal h3 { font-size: 21px; margin: 0 0 12px; letter-spacing: -.02em; line-height: 1.3; }
.account-portal h4 { margin: 0 0 8px; font-size: 16px; }
.account-portal p { font-size: 15px; line-height: 1.55; margin: 8px 0; }
.portal-muted { color: #485347; }
.portal-content, .portal-auth { padding: 30px 32px; }
.portal-auth { max-width: 580px; }
.portal-nav { display: flex; flex-wrap: wrap; gap: 8px; padding: 18px 32px; border-bottom: 1px solid #d5dad3; }
.account-portal button, .account-portal input, .account-portal select, .account-portal textarea { font: inherit; font-size: 16px; }
.account-portal button, .portal-link-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 17px; border: 1px solid #9ca798; border-radius: 10px; background: #fff; color: #0d100e; font-weight: 600; cursor: pointer; line-height: 1.35; text-align: center; text-decoration: none; }
.account-portal button:hover:not(:disabled), .portal-link-button:hover { background: #edf1e9; }
.account-portal button.primary, .portal-nav button[aria-current='page'] { background: #17351e; color: #fff; border-color: #17351e; }
.account-portal button.primary:hover:not(:disabled) { background: #244d2c; }
.account-portal button.danger { color: #922222; border-color: #b99c9c; }
.account-portal button:disabled { cursor: wait; opacity: .55; }
.account-portal :focus-visible, .portal-link-button:focus-visible { outline: 3px solid #325ebb; outline-offset: 3px; }
.portal-field { display: flex; flex-direction: column; gap: 8px; margin: 14px 0; min-width: 0; font-size: 14px; font-weight: 600; }
.portal-field input, .portal-field select, .portal-field textarea { width: 100%; min-height: 46px; padding: 11px 12px; border: 1px solid #8b9786; border-radius: 8px; background: #fff; color: #0d100e; box-sizing: border-box; }
.portal-field textarea { min-height: 90px; resize: vertical; }
.portal-field input:read-only { background: #f1f2ef; }
.portal-check { display: flex; align-items: flex-start; gap: 12px; margin: 16px 0; font-size: 15px; line-height: 1.5; }
.portal-check input { width: 22px; height: 22px; flex: 0 0 22px; margin-top: 1px; accent-color: #17351e; }
.portal-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 18px; }
.portal-stack { display: grid; gap: 22px; }
.portal-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 20px; }
.portal-card { padding: 24px; border: 1px solid #d5dad3; border-radius: 16px; background: #fff; min-width: 0; }
.portal-card.soft { background: #f5f7f2; }
.portal-card p, .portal-card dd, .portal-card td { overflow-wrap: anywhere; }
.portal-status { padding: 0 32px; min-height: 0; color: #244d2c; font-size: 15px; line-height: 1.5; }
.portal-status:not(:empty) { padding-top: 16px; padding-bottom: 16px; border-bottom: 1px solid #d5dad3; }
.portal-status[data-error='true'] { color: #8a251c; background: #fff7f3; }
.portal-badge { display: inline-block; white-space: nowrap; padding: 5px 9px; border-radius: 6px; background: #e9efe3; color: #27482b; font-size: 13px; font-weight: 600; line-height: 1.4; }
.portal-table-wrap { overflow-x: auto; border: 1px solid #d5dad3; border-radius: 10px; margin-top: 14px; }
.portal-table { width: 100%; border-collapse: collapse; font-size: 14px; text-align: left; }
.portal-table caption { text-align: left; padding: 14px; font-weight: 600; }
.portal-table th, .portal-table td { padding: 13px 14px; border-bottom: 1px solid #dce1d8; vertical-align: top; line-height: 1.5; min-width: 90px; }
.portal-table th { background: #f2f5ee; font-weight: 600; }
.portal-table tr:last-child td { border-bottom: 0; }
.portal-table td .portal-actions { margin: 0; }
.portal-kv { margin: 0; display: grid; grid-template-columns: minmax(90px, 1fr) minmax(90px, 2fr); gap: 10px 18px; font-size: 15px; }
.portal-kv dt { color: #485347; }
.portal-kv dd { margin: 0; font-weight: 500; }
.portal-intro { max-width: 720px; margin-bottom: 24px; }
.portal-empty { padding: 22px; border: 1px dashed #a9b5a2; border-radius: 12px; background: #f6f8f3; color: #485347; }
.portal-secret { font-family: ui-monospace, monospace; overflow-wrap: anywhere; padding: 16px; border: 1px solid #b7c4af; background: #f4f8ef; border-radius: 8px; user-select: all; }
.portal-confirm { width: min(560px, calc(100% - 32px)); box-sizing: border-box; max-height: calc(100dvh - 48px); overflow: auto; padding: 28px; border: 1px solid #a9b5a2; border-radius: 18px; color: #0d100e; background: #fff; box-shadow: 0 24px 80px #0004; }
.portal-confirm::backdrop { background: #0d100e99; }
.portal-confirm h2 { font-size: 25px; }
.portal-confirm .portal-actions { justify-content: flex-end; }
.portal-confirm button { min-height: 44px; padding: 10px 16px; font: inherit; border: 1px solid #8b9786; border-radius: 9px; background: #fff; cursor: pointer; }
.portal-confirm button.primary { background: #17351e; color: #fff; }
.portal-confirm p { line-height: 1.6; }
.portal-confirm :focus-visible { outline: 3px solid #325ebb; outline-offset: 3px; }
.portal-skip { position: absolute; left: 20px; top: -100px; padding: 12px; background: #fff; color: #0d100e; z-index: 999; }
.portal-skip:focus { top: 12px; }
@media (max-width: 650px) { .account-portal { margin: 14px; } .portal-header { align-items: flex-start; flex-direction: column; padding: 24px 20px; } .portal-content, .portal-auth { padding: 24px 20px; } .portal-nav { padding: 16px 20px; } .portal-status { padding-left: 20px; padding-right: 20px; } .portal-card { padding: 20px; } .portal-kv { grid-template-columns: 1fr; gap: 5px; } .portal-kv dd { margin-bottom: 10px; } .portal-actions > button { flex-grow: 1; } }
@media (prefers-reduced-motion: reduce) { .account-portal *, .portal-confirm * { scroll-behavior: auto !important; transition: none !important; } }
