.account-view { min-height: 100dvh; }
.account-auth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(470px, .92fr); min-height: 100dvh; }
.account-brand { display: inline-flex; align-items: center; gap: 11px; font-size: 22px; font-weight: 760; }
.account-brand .brand-mark { width: 37px; height: 37px; }
.account-welcome { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: clamp(30px, 7dvh, 88px); padding: clamp(28px, 5vw, 88px); overflow: hidden; color: #f2f0ff; background: #19172e radial-gradient(circle, #3b3760 1px, transparent 1.3px) 8px 8px / 20px 20px; }
.account-welcome-copy { width: min(100%, 570px); margin: auto 0; }
.account-welcome-copy > p { margin: 0 0 10px; color: #bcb4f7; font-weight: 650; }
.account-welcome-copy > h2 { max-width: 560px; margin: 0 0 clamp(24px, 4vw, 46px); font-size: clamp(34px, 4.4vw, 66px); font-weight: 760; line-height: 1.06; letter-spacing: -.055em; text-wrap: balance; }
.account-preview { overflow: hidden; border: 1px solid #615a84; border-radius: var(--radius); background: #23203c; box-shadow: 0 15px 45px #0b091c55; }
.account-preview-chrome { display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 14px; border-bottom: 1px solid #544d78; color: #eeeaff; font-size: 12px; font-weight: 650; }
.account-preview-dot { width: 8px; height: 8px; border-radius: 2px; background: #9589ff; }
.account-preview-canvas { position: relative; min-height: clamp(130px, 26vw, 295px); background: #211e38 radial-gradient(circle, #3c365f 1px, transparent 1.15px) 3px 3px / 16px 16px; }
.account-preview-section { position: absolute; inset: 16% 14% 15%; border: 1px solid #7864cd; border-radius: 4px; background: #7160c924; }
.account-preview-section > span { display: block; padding: 5px 9px; border-bottom: 1px solid #7864cd; background: #3a2e5d; color: #e8e2ff; font-size: 11px; font-weight: 650; }
.account-preview-note { position: absolute; inset: 41% auto auto 21%; display: grid; gap: 6px; width: 27%; min-height: 76px; align-content: center; padding: 9px; border: 1px solid #7864cd; border-radius: 4px; background: #2d284b; box-shadow: 4px 6px 0 #110f23; }
.account-preview-note .icon { width: 14px; height: 14px; color: #b8aaff; }
.account-preview-note > i { display: block; height: 2px; border-radius: 2px; background: #746a9c; }
.account-preview-note > i:nth-of-type(2) { width: 81%; }
.account-preview-note > i:nth-of-type(3) { width: 57%; }
.account-preview-diagram { position: absolute; top: 45%; left: 62%; width: 15%; height: 26%; min-height: 35px; }
.account-preview-diagram::before { position: absolute; inset: 10% 12% 15%; border: solid #a397e7; border-width: 1px 1px 0 0; transform: rotate(-22deg); content: ''; }
.account-preview-diagram span { position: absolute; z-index: 1; width: 15px; height: 15px; border: 1px solid #b6abff; border-radius: 3px; background: #7866cd; box-shadow: 0 0 0 4px #292544; }
.account-preview-diagram span:nth-child(2) { top: -9%; right: 0; background: #86658f; }
.account-preview-diagram span:nth-child(3) { right: 9%; bottom: 0; background: #536ba1; }

.account-form-side { display: grid; place-items: center; padding: clamp(28px, 5vw, 78px); background: var(--page); }
.account-form-card { width: min(100%, 465px); padding: clamp(22px, 3.5vw, 42px); border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-card); }
.account-tabs { display: inline-flex; gap: 3px; margin-bottom: 19px; padding: 3px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-subtle); }
.account-tabs > button { min-height: 36px; padding: 4px 12px; border: 1px solid transparent; border-radius: 4px; background: transparent; color: var(--muted); font-weight: 680; }
.account-tabs > button[aria-current='page'] { border-color: var(--border); background: var(--surface); color: var(--accent-text); box-shadow: var(--shadow-card); }
.account-tabs > button:hover { color: var(--accent-text); }
.account-form-card h1, .account-hub h1 { margin: 0; font-size: clamp(28px, 3.3vw, 42px); font-weight: 765; line-height: 1.1; letter-spacing: -.047em; }
.account-description { margin: 8px 0 23px; color: var(--muted); }
.account-field input, .account-field textarea { min-height: 44px; font-size: 16px; }
.account-field { margin-bottom: 13px; }
.account-submit { justify-content: space-between; width: 100%; min-height: 44px; margin-top: 3px; }
.account-error { margin: 0 0 10px; padding: 8px 10px; border-radius: 4px; background: var(--red-soft); color: var(--red); font-size: 13px; }
.account-demo { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--border); }
.account-demo h2 { margin: 0 0 9px; color: var(--muted); font-size: 13px; font-weight: 680; }
.account-demo-buttons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.account-demo-buttons > button { align-items: center; justify-content: start; min-height: 53px; padding: 6px 8px; text-align: left; }
.account-demo-buttons > button .icon { flex: 0 0 auto; color: var(--accent-text); }
.account-demo-buttons > button span { display: grid; gap: 2px; }
.account-demo-buttons > button small { color: var(--quiet); font-size: 11px; font-weight: 580; }

.account-hub { min-height: 100dvh; padding: 0 max(16px, env(safe-area-inset-right)) max(38px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); background: var(--page) radial-gradient(circle, var(--grid-dot) 1px, transparent 1.25px) 8px 8px / 18px 18px; }
.account-hub-bar, .account-hub-inner { width: min(100%, 820px); margin: 0 auto; }
.account-hub-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 66px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.account-hub-inner { padding-top: clamp(22px, 4.5vw, 48px); }
.account-hub-title { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 20px; }
.account-hub-title > .button { min-height: 42px; }
.account-profile { display: flex; align-items: center; gap: 13px; margin-bottom: 28px; padding: clamp(14px, 2.4vw, 24px); border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.account-avatar, .account-project-mark { display: grid; flex: 0 0 auto; place-items: center; width: 42px; height: 42px; border-radius: 5px; background: var(--accent-soft); color: var(--accent-text); font-size: 15px; font-weight: 775; }
.account-profile > div { flex: 1 1 auto; min-width: 0; }
.account-profile h2 { margin: 0; font-size: 16px; font-weight: 735; overflow-wrap: anywhere; }
.account-profile p { margin: 2px 0 0; color: var(--muted); overflow-wrap: anywhere; }
.account-demo-label, .account-project-role { flex: 0 0 auto; padding: 4px 8px; border: 1px solid var(--border); border-radius: 4px; color: var(--muted); background: var(--surface-subtle); font-size: 11px; font-weight: 670; }
.account-project-section + .account-project-section { margin-top: 20px; }
.account-project-section h2 { margin: 0 0 7px; font-size: 16px; line-height: 1.35; }
.account-project-section h2 > span { margin-left: 4px; color: var(--quiet); font-size: 12px; font-weight: 600; }
.account-project-grid { display: grid; gap: 6px; }
.account-project { display: flex; align-items: center; gap: 11px; min-height: 69px; width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); text-align: left; }
.account-project:hover { border-color: var(--accent-border); background: var(--surface-hover); }
.account-project-mark { width: 34px; height: 34px; }
.account-project-copy { display: grid; gap: 2px; flex: 1; min-width: 0; }
.account-project-copy strong { font-size: 14px; overflow-wrap: anywhere; }
.account-project-copy > span { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.account-project-empty { margin: 0; padding: 13px 14px; border: 1px dashed var(--border-strong); border-radius: var(--radius); color: var(--muted); background: var(--surface-subtle); }
.account-project-arrow { flex-shrink: 0; color: var(--accent-text); }

.account-project-dialog { width: min(440px, calc(100% - 26px)); max-width: none; padding: 0; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); color: var(--text); box-shadow: var(--shadow-float); }
.account-project-dialog::backdrop { background: var(--scrim); }
.account-project-dialog > form { padding: 16px; }
.account-dialog-header, .account-dialog-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.account-dialog-header { margin-bottom: 11px; }
.account-dialog-header h2 { margin: 0; font-size: 18px; }
.account-dialog-actions { justify-content: end; }
.account-optional { color: var(--muted); font-weight: 500; }

@media (max-width: 860px) {
  .account-auth { grid-template-columns: minmax(0, 1fr) minmax(390px, 1.1fr); }
  .account-welcome { padding: 26px; }
  .account-form-side { padding: 20px; }
}

@media (max-width: 670px) {
  .account-auth { display: block; }
  .account-welcome { display: block; padding: max(15px, env(safe-area-inset-top)) 18px 15px; }
  .account-welcome-copy { display: none; }
  .account-form-side { padding: 14px max(12px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); }
  .account-form-card { padding: 19px; }
  .account-tabs > button { min-height: 40px; }
  .account-project { gap: 7px; padding: 8px; }
  .account-project-role { padding: 3px 5px; }
  .account-project-arrow { display: none; }
}

@media (max-width: 360px) {
  .account-profile { flex-wrap: wrap; }
  .account-demo-label { margin-left: 55px; }
}
.account-profile { flex-wrap: wrap; }
.account-profile-settings { margin-inline-start: auto; }
.account-profile-dialog { margin-block: auto; max-height: calc(100dvh - 24px); overflow: auto; }
