:root {
  --account-glass: rgba(17, 20, 27, .78);
  --account-glass-strong: rgba(10, 12, 17, .94);
  --account-line: rgba(255, 255, 255, .085);
  --account-line-bright: rgba(124, 236, 215, .26);
  --account-mint: #51dec4;
  --account-violet: #8d77ff;
}

#account-center-trigger {
  display: flex; align-items: center; gap: 9px; min-width: 0; height: 38px;
  padding: 4px 10px 4px 5px; border: 1px solid var(--account-line);
  border-radius: 12px; color: var(--text-headline); cursor: pointer;
  background: linear-gradient(145deg, rgba(255,255,255,.055), rgba(255,255,255,.018));
  box-shadow: inset 0 1px rgba(255,255,255,.055), 0 8px 24px rgba(0,0,0,.16);
  backdrop-filter: blur(18px) saturate(130%);
}
#account-center-trigger:hover { border-color: var(--account-line-bright); background: linear-gradient(145deg, rgba(81,222,196,.10), rgba(141,119,255,.045)); }
#account-trigger-copy { display: flex; flex-direction: column; min-width: 0; text-align: left; line-height: 1.08; }
#account-trigger-copy strong { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 750; }
#account-trigger-copy small { margin-top: 3px; color: var(--text-muted); font-size: 8px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; }

/* Profile is part of the established workspace-actions island, not a fifth
   top-level ribbon column. Trading terminals keep identity compact here so
   the workflow tabs never wrap or jump when an account signs in. */
#workspace-controls #account-center-trigger {
  width:38px; min-width:38px; padding:3px; justify-content:center;
}
#workspace-controls #account-trigger-copy { display:none; }

.account-avatar {
  display: inline-grid; place-items: center; flex: 0 0 auto; width: 30px; height: 30px;
  overflow: hidden; border: 1px solid rgba(112,235,216,.35); border-radius: 10px;
  background: linear-gradient(145deg, #176f68, #6b56d7); color: #fff;
  box-shadow: inset 0 1px rgba(255,255,255,.16), 0 0 18px rgba(81,222,196,.12);
  font-size: 11px; font-weight: 850; letter-spacing: -.02em;
}
.account-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }

#account-center {
  width: min(1120px, calc(100vw - 34px)); max-width: none; height: min(760px, calc(100dvh - 34px));
  max-height: none; padding: 0; overflow: hidden; border: 1px solid rgba(255,255,255,.12);
  border-radius: 22px; color: var(--text-body); background: #07090d;
  box-shadow: 0 34px 110px rgba(0,0,0,.74), inset 0 1px rgba(255,255,255,.055);
}
#account-center[open] { display: block; }
#account-center::backdrop { background: rgba(1,3,7,.76); backdrop-filter: blur(9px) saturate(90%); }
.account-center-shell { position: relative; display: grid; grid-template-rows: 70px minmax(0,1fr); height: 100%; isolation: isolate; }
.account-center-shell::before {
  content: ""; position: absolute; z-index: -1; inset: 0; pointer-events: none;
  background: radial-gradient(800px 420px at 10% -10%, rgba(81,222,196,.105), transparent 58%),
    radial-gradient(720px 430px at 100% 16%, rgba(141,119,255,.11), transparent 58%);
}
.account-center-header {
  display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 0 22px;
  border-bottom: 1px solid var(--account-line); background: rgba(8,10,14,.72); backdrop-filter: blur(22px);
}
.account-center-heading { display: flex; align-items: center; gap: 11px; }
.account-center-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: linear-gradient(145deg, rgba(81,222,196,.25), rgba(141,119,255,.24)); border: 1px solid rgba(255,255,255,.12); color: #dffef8; font-size: 12px; font-weight: 900; box-shadow: inset 0 1px rgba(255,255,255,.08); }
.account-center-heading small,.account-pane-heading small,.account-module header small,.account-plan-hero small { color: #82938f; font-size: 8.5px; font-weight: 800; letter-spacing: .15em; }
.account-center-heading h2 { margin: 3px 0 0; color: #f4f7f7; font-size: 17px; font-weight: 720; letter-spacing: -.02em; text-transform: none; }
#account-center-close { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 1px solid var(--account-line); border-radius: 10px; background: rgba(255,255,255,.025); color: #9ca5ad; font-size: 20px; cursor: pointer; }
#account-center-close:hover { color: #fff; border-color: rgba(255,255,255,.2); }
.account-center-layout { display: grid; grid-template-columns: 228px minmax(0,1fr); min-height: 0; }
.account-center-nav { display: flex; flex-direction: column; min-height: 0; padding: 22px 14px 15px; border-right: 1px solid var(--account-line); background: linear-gradient(180deg, rgba(255,255,255,.023), rgba(255,255,255,.008)); }
.account-center-identity { display: grid; grid-template-columns: 42px minmax(0,1fr); grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 0 8px 20px; }
.account-center-identity .account-avatar { grid-row: 1/3; width: 42px; height: 42px; border-radius: 13px; }
.account-center-identity strong { align-self: end; overflow: hidden; color: #eef4f3; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.account-center-identity small { align-self: start; margin-top: 3px; overflow: hidden; color: #778089; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.account-center-nav nav { display: flex; flex-direction: column; gap: 4px; }
.account-center-nav nav button,.account-nav-signout { width: 100%; margin: 0; padding: 10px 11px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: #8c959e; text-align: left; font-size: 11.5px; cursor: pointer; }
.account-center-nav nav button:hover,.account-center-nav nav button[aria-selected="true"] { color: #e9f4f1; border-color: rgba(255,255,255,.065); background: linear-gradient(90deg, rgba(81,222,196,.09), rgba(141,119,255,.035)); }
.account-center-nav nav button[aria-selected="true"] { box-shadow: inset 2px 0 var(--account-mint); }
.account-nav-signout { margin-top: auto; color: #aa858b; }
.account-nav-signout:hover { color: #ffabb7; background: rgba(255,80,105,.055); }
.account-center-content { min-width: 0; overflow: auto; padding: 28px 30px 38px; scrollbar-gutter: stable; }
.account-pane { max-width: 810px; margin: 0 auto; }
.account-pane[hidden] { display: none !important; }
.account-pane-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 22px; margin-bottom: 22px; }
.account-pane-heading h3 { margin: 6px 0 5px; color: #f2f6f5; font-size: 24px; font-weight: 690; letter-spacing: -.035em; }
.account-pane-heading p { max-width: 590px; margin: 0; color: #848d95; font-size: 11.5px; line-height: 1.55; }
.account-pane-heading [role="status"] { max-width: 260px; color: #7fdcc8; font-size: 10.5px; text-align: right; }
.account-stat-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; }
.account-stat-grid article,.account-module,.account-plan-hero {
  position: relative; overflow: hidden; border: 1px solid var(--account-line); border-radius: 15px;
  background: linear-gradient(150deg, rgba(255,255,255,.047), rgba(255,255,255,.014));
  box-shadow: inset 0 1px rgba(255,255,255,.035), 0 15px 34px rgba(0,0,0,.12);
  backdrop-filter: blur(18px);
}
.account-stat-grid article { min-width: 0; padding: 14px; }
.account-stat-grid article::after { content:""; position:absolute; inset:auto -35px -45px auto; width:90px; height:90px; border-radius:50%; background:rgba(81,222,196,.07); filter:blur(12px); }
.account-stat-grid span { display: block; color: #7f898f; font-size: 9.5px; }
.account-stat-grid strong { display: block; margin: 8px 0 5px; color: #f5f8f8; font-size: 21px; font-weight: 720; letter-spacing: -.035em; }
.account-stat-grid small { display: block; overflow: hidden; color: #626b72; font-size: 8.5px; text-overflow: ellipsis; white-space: nowrap; }
.account-module-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.account-module { padding: 17px; }
.account-module header { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.account-module h4 { margin: 5px 0 0; color: #e9f0ef; font-size: 13px; font-weight: 680; }
.account-module header > span { color: #93dccc; font-size: 11px; font-weight: 750; }
.account-module p { margin: 11px 0; color: #7c858c; font-size: 10.5px; line-height: 1.55; }
.account-progress { height: 4px; margin: 14px 0 12px; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.055); }
.account-progress i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg,var(--account-mint),var(--account-violet)); box-shadow: 0 0 12px rgba(81,222,196,.34); transition: width .25s ease; }
.account-glass-button,.account-primary-button,.account-text-button {
  width: auto; margin: 0; border-radius: 10px; cursor: pointer; font-size: 10.5px; font-weight: 680;
}
.account-glass-button { padding: 8px 11px; border: 1px solid var(--account-line); background: rgba(255,255,255,.035); color: #d7dedf; box-shadow: inset 0 1px rgba(255,255,255,.035); }
.account-glass-button:hover { border-color: var(--account-line-bright); color: #f6fffd; }
.account-primary-button { padding: 9px 15px; border: 1px solid rgba(97,238,214,.42); background: linear-gradient(135deg, #39bea8, #6b62dd); color: #fff; box-shadow: 0 9px 25px rgba(71,167,158,.16), inset 0 1px rgba(255,255,255,.16); }
.account-primary-button:hover { filter: brightness(1.08); }
.account-text-button { padding: 5px 0; border: 0; background: transparent; color: #79d9c6; }
.account-text-button:hover { color: #b7f5e8; }
.account-profile-photo-module { margin-bottom: 12px; }
.account-profile-photo { display: flex; align-items: center; gap: 16px; }
.account-profile-photo .account-avatar { width: 66px; height: 66px; border-radius: 18px; font-size: 18px; }
.account-profile-photo h4 { margin: 0 0 3px; }
.account-profile-photo p { margin: 0 0 8px; }
.account-profile-photo div div { display: flex; align-items: center; gap: 12px; }
.account-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.account-form-grid label { display: flex; flex-direction: column; gap: 6px; min-width: 0; color: #aeb7bb; font-size: 10px; font-weight: 680; }
.account-form-grid label > small { color: #616a71; font-size: 8.8px; font-weight: 500; line-height: 1.4; }
.account-field-wide { grid-column: 1/-1; }
.account-form-grid input,.account-form-grid textarea,.account-preference-list select {
  width: 100%; box-sizing: border-box; margin: 0; padding: 10px 11px; outline: none;
  border: 1px solid var(--account-line); border-radius: 10px; background: rgba(2,5,9,.5); color: #e7edec;
  font: 11.5px/1.4 inherit; box-shadow: inset 0 1px 4px rgba(0,0,0,.24);
}
.account-form-grid textarea { resize: vertical; min-height: 88px; }
.account-form-grid input:focus,.account-form-grid textarea:focus,.account-preference-list select:focus { border-color: rgba(81,222,196,.48); box-shadow: 0 0 0 3px rgba(81,222,196,.07); }
.account-handle-field { display: grid; grid-template-columns: 30px minmax(0,1fr); align-items: center; border: 1px solid var(--account-line); border-radius: 10px; background: rgba(2,5,9,.5); }
.account-handle-field b { color: #667078; text-align: center; }
.account-handle-field input { border: 0; background: transparent; }
.account-form-actions { display: flex; justify-content: flex-end; margin-top: 18px; }
.account-plan-hero { display: flex; align-items: center; justify-content: space-between; min-height: 160px; padding: 22px 28px; }
.account-plan-hero h3 { margin: 8px 0; color: #f4f9f7; font-size: 28px; letter-spacing: -.04em; }
.account-plan-hero p { color: #7e888e; font-size: 11px; }
.account-plan-orbit { position: relative; display: grid; place-items: center; width: 115px; height: 115px; }
.account-plan-orbit::before,.account-plan-orbit::after,.account-plan-orbit i { content:""; position:absolute; border:1px solid rgba(81,222,196,.15); border-radius:50%; }
.account-plan-orbit::before { inset:0; }
.account-plan-orbit::after { inset:17px; border-color:rgba(141,119,255,.22); }
.account-plan-orbit i:nth-child(1) { width:7px; height:7px; top:5px; left:54px; background:var(--account-mint); box-shadow:0 0 12px var(--account-mint); }
.account-plan-orbit i:nth-child(2) { width:5px; height:5px; bottom:20px; right:14px; background:var(--account-violet); }
.account-plan-orbit i:nth-child(3) { width:3px; height:3px; left:26px; bottom:26px; background:#fff; }
.account-plan-orbit span { display:grid; place-items:center; width:44px; height:44px; border-radius:14px; background:linear-gradient(145deg,rgba(81,222,196,.25),rgba(141,119,255,.27)); color:#fff; font-weight:900; }
.account-plan-stats { margin-top: 12px; grid-template-columns: repeat(3,1fr); }
#account-password-form { margin-bottom: 12px; }
#account-password-form .account-form-grid { margin-top: 16px; }
.account-sessions-module > header { align-items: center; margin-bottom: 8px; }
.account-session-row { display: grid; grid-template-columns:32px minmax(0,1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid rgba(255,255,255,.055); }
.account-session-row:first-child { border-top: 0; }
.account-session-icon { display:grid; place-items:center; width:30px; height:30px; border:1px solid rgba(255,255,255,.075); border-radius:9px; background:rgba(255,255,255,.025); color:#84918f; font-size:13px; }
.account-session-row strong { display: block; color: #dbe2e2; font-size: 11px; }
.account-session-row small { display: block; margin-top: 4px; color: #687177; font-size: 9px; }
.account-current-session { display: inline-block; margin-left: 6px; padding: 3px 6px; border:1px solid rgba(81,222,196,.13); border-radius: 6px; background: rgba(81,222,196,.07); color: #83dfcd; font-size: 7.5px; letter-spacing: .08em; text-transform: uppercase; }
.account-session-row button { padding: 6px 8px; border: 1px solid rgba(255,114,133,.17); border-radius: 8px; background: rgba(255,80,105,.035); color: #c68b94; font-size: 9px; cursor: pointer; }
.account-session-empty { margin:10px 0 0; color:#727d82; font-size:10px; }
.account-state-error { color:#ff8795!important; }
.account-preference-list { padding: 0 17px; }
.account-preference-list > label { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 0; border-top: 1px solid rgba(255,255,255,.055); }
.account-preference-list > label:first-child { border-top: 0; }
.account-preference-list strong,.account-preference-list small { display: block; }
.account-preference-list strong { color: #dce3e2; font-size: 11px; }
.account-preference-list small { margin-top: 4px; color: #687177; font-size: 9.5px; }
.account-preference-list input[type="checkbox"] { width: 34px; height: 18px; accent-color: var(--account-mint); }
.account-preference-list select { width: 150px; }
.account-data-module { margin-top: 22px; }

/* Public creator profile ------------------------------------------------ */
#community-view.community-profile-open > .community-hero,
#community-view.community-profile-open > .publication-path-note,
#community-view.community-profile-open > #community-account-panel,
#community-view.community-profile-open > #community-signed-in,
#community-view.community-profile-open > #community-account-status,
#community-view.community-profile-open > #community-moderation,
#community-view.community-profile-open > #community-feeds,
#community-view.community-profile-open > #community-sections,
#community-view.community-profile-open > #community-starters { display:none !important; }
#community-view.community-profile-open { max-width: 1180px; }
#community-view #community-author-filter {
  display:block; position:relative; overflow:hidden; margin:14px 0 18px; padding:0;
  border:1px solid var(--account-line); border-radius:20px;
  background:linear-gradient(160deg,rgba(15,19,24,.96),rgba(7,9,13,.98));
  box-shadow:0 22px 60px rgba(0,0,0,.18),inset 0 1px rgba(255,255,255,.04);
}
#community-view #community-author-filter[hidden] { display:none!important; }
.community-profile-cover { position:relative; height:112px; overflow:hidden; border-bottom:1px solid rgba(255,255,255,.05); background:radial-gradient(500px 180px at 18% 20%,rgba(81,222,196,.22),transparent 65%),radial-gradient(480px 200px at 78% -5%,rgba(141,119,255,.25),transparent 62%),linear-gradient(140deg,#0c1718,#0b0c14 55%,#111021); }
.community-profile-cover::after { content:""; position:absolute; inset:0; opacity:.13; background-image:linear-gradient(rgba(255,255,255,.1) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.1) 1px,transparent 1px); background-size:38px 38px; mask-image:linear-gradient(to right,#000,transparent 85%); }
.community-profile-cover i { position:absolute; border-radius:50%; background:#fff; box-shadow:0 0 14px #fff; }
.community-profile-cover i:nth-child(1){width:2px;height:2px;left:62%;top:28px}.community-profile-cover i:nth-child(2){width:3px;height:3px;left:79%;top:68px}.community-profile-cover i:nth-child(3){width:2px;height:2px;left:44%;top:84px}
.community-profile-main { position:relative; z-index:2; display:grid; grid-template-columns:84px minmax(0,1fr) auto; gap:18px; align-items:start; padding:0 24px 22px; }
#community-view #community-author-avatar { position:relative; z-index:3; display:grid; place-items:center; box-sizing:border-box; width:78px; height:78px; margin-top:-34px; overflow:hidden; border:4px solid #0c1015; border-radius:21px; background:linear-gradient(145deg,#176f68,#6b56d7); color:#fff; font-size:21px; font-weight:850; box-shadow:0 10px 28px rgba(0,0,0,.42),0 0 0 1px rgba(112,235,216,.28); isolation:isolate; }
#community-author-avatar img { display:block; width:100%; height:100%; object-fit:cover; }
#community-view #community-author-copy { min-width:0; padding-top:16px; }
.community-profile-name-row { display:flex; align-items:center; gap:9px; }
.community-profile-name-row h2 { margin:0; color:#f5f8f8; font-size:22px; font-weight:720; letter-spacing:-.035em; text-transform:none!important; }
#community-author-badge { padding:3px 7px; border:1px solid rgba(81,222,196,.25); border-radius:6px; background:rgba(81,222,196,.07); color:#88dfcf; font-size:8px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }
#community-view #community-author-filter-name { display:block; margin-top:3px; color:#7d898f; font-size:11px; font-weight:570; }
#community-author-bio { max-width:650px; margin:11px 0 8px; color:#b2bbbe; font-size:11.5px; line-height:1.55; }
#community-view #community-author-meta { display:block; color:#677078; font-size:9.5px; }
#community-author-links { display:flex; flex-wrap:wrap; gap:10px; margin-top:9px; }
#community-author-links a { color:#75d4c2; font-size:9.5px; text-decoration:none; }
#community-author-links a:hover { color:#b6f4e8; }
#community-view #community-author-actions { display:flex; align-items:center; gap:7px; padding-top:18px; white-space:nowrap; }
#community-view #community-author-follow[aria-pressed="true"] { border-color:rgba(83,216,194,.42); background:rgba(24,101,87,.42); color:#a7eedc; }
.community-profile-stats { display:grid!important; grid-template-columns:repeat(5,minmax(0,1fr)); margin:0 24px; padding:12px 0; border-top:1px solid rgba(255,255,255,.055); border-bottom:1px solid rgba(255,255,255,.04); border-radius:12px; background:linear-gradient(90deg,rgba(255,255,255,.012),rgba(255,255,255,.024),rgba(255,255,255,.012)); }
.community-profile-stats button { display:flex; flex-direction:column; gap:4px; min-width:0; padding:7px 14px; border:0; border-left:1px solid rgba(255,255,255,.05); background:transparent; color:inherit; text-align:left; cursor:default; }
.community-profile-stats button:first-child { border-left:0; }
.community-profile-stats strong { color:#eef4f3; font-size:16px; font-weight:720; letter-spacing:-.025em; }
.community-profile-stats span { color:#687278; font-size:8.5px; }
.community-profile-tabs { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:0; padding:0 24px; }
.community-profile-tabs button { position:relative; padding:14px 2px 13px; border:0; background:transparent; color:#737d84; font-size:10.5px; font-weight:680; text-align:center; cursor:pointer; }
.community-profile-tabs button[aria-selected="true"] { color:#eaf3f1; }
.community-profile-tabs button[aria-selected="true"]::after { content:""; position:absolute; right:0; bottom:0; left:0; height:2px; border-radius:2px 2px 0 0; background:linear-gradient(90deg,var(--account-mint),var(--account-violet)); box-shadow:0 0 10px rgba(81,222,196,.32); }
#community-view.community-profile-open > .community-controls { margin-top:0; }

.community-profile-empty-bio { color:#687278!important; font-style:italic; }

.account-dialog-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; }
#account-dialog-dismiss { display:grid; place-items:center; flex:0 0 30px; width:30px; height:30px; padding:0; border:1px solid var(--account-line); border-radius:9px; background:rgba(255,255,255,.025); color:#8f989f; font-size:18px; cursor:pointer; }

@media (max-width: 760px) {
  #account-trigger-copy { display:none; }
  #account-center { width: calc(100vw - 14px); height: calc(100dvh - 14px); border-radius: 16px; }
  .account-center-shell { grid-template-rows: 60px minmax(0,1fr); }
  .account-center-layout { grid-template-columns: 1fr; }
  .account-center-nav { display:block; padding:10px 12px; border-right:0; border-bottom:1px solid var(--account-line); overflow-x:auto; }
  .account-center-identity,.account-nav-signout { display:none; }
  .account-center-nav nav { flex-direction:row; width:max-content; }
  .account-center-nav nav button { width:auto; white-space:nowrap; }
  .account-center-content { padding:22px 17px 30px; }
  .account-pane-heading { flex-direction:column; }
  .account-stat-grid,.account-module-grid,.account-form-grid { grid-template-columns:1fr 1fr; }
  .account-stat-grid { gap:8px; }
  .account-field-wide { grid-column:1/-1; }
  .community-profile-main { grid-template-columns:70px minmax(0,1fr); padding:0 16px 18px; }
  #community-view #community-author-avatar { width:64px; height:64px; border-radius:18px; }
  #community-view #community-author-actions { grid-column:1/-1; padding-top:0; }
  .community-profile-stats { grid-template-columns:repeat(3,1fr); margin:0 16px; }
  .community-profile-stats button:nth-child(4),.community-profile-stats button:nth-child(5){border-top:1px solid rgba(255,255,255,.05)}
}

@media (max-width: 480px) {
  .account-stat-grid,.account-module-grid,.account-form-grid { grid-template-columns:1fr; }
  .account-field-wide { grid-column:auto; }
  .account-plan-orbit { display:none; }
  .account-plan-stats { grid-template-columns:1fr; }
}
