.account-toggle {
  min-height: 42px;
  border-color: #385266;
  background: #102433;
  color: var(--text);
}
.account-mount { gap: 8px; }
.account-entry-compact { display: none; }
.workspace-account .account-mount { display: flex; flex-wrap: wrap; }
.account-toggle.is-authenticated { display: inline-flex; align-items: center; gap: 9px; padding: 5px 12px 5px 6px; }
.account-avatar {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #1f67a2;
  color: #fff;
  font-size: 14px;
  font-weight: 750;
}
.account-name { max-width: 152px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.account-dialog {
  width: min(610px, calc(100vw - 24px));
  max-height: calc(100vh - 30px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .5);
}

.account-dialog::backdrop { background: rgba(2, 7, 11, .76); backdrop-filter: blur(3px); }
.account-dialog [hidden] { display: none !important; }
.account-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.account-head h2 { margin: 0; font-size: 20px; }
.account-head p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.account-close { width: 40px; min-width: 40px; min-height: 40px; padding: 0; font-size: 24px; }
.account-status { min-height: 20px; margin: 10px 0 4px; color: var(--muted); font-size: 12px; }
.account-status.account-error { color: #ff9ca6; }
.account-status.account-success { color: var(--mint); }
.account-section { display: grid; gap: 14px; }
.account-email-form { display: grid; gap: 6px; }
.account-email-form > label, .account-fee-row > label { color: var(--muted); font-size: 11px; }
.account-email-form > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.account-email-form input, .account-fee-input input {
  min-width: 0;
  min-height: 42px;
  border: 1px solid #385266;
  border-radius: 9px;
  background: #0b1b27;
  color: var(--text);
  padding: 9px 11px;
  font: inherit;
}
.account-divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 11px; }
.account-divider::before, .account-divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.account-providers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.account-provider-action { display: inline-flex; align-items: center; justify-content: center; gap: 9px; }
.account-provider-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.account-note { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.account-signed-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.account-identity { display: flex; align-items: center; gap: 10px; min-width: 0; }
.account-identity > span:last-child { display: grid; min-width: 0; }
.account-identity strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-identity small { color: var(--muted); font-size: 11px; }
.account-shortcuts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.account-shortcuts a {
  min-height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid #385266;
  border-radius: 9px;
  color: var(--text);
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
}
.account-shortcuts a:hover { border-color: var(--mint); color: var(--mint); }
.account-section h3 { margin: 4px 0 -7px; font-size: 14px; }
.account-methods { display: grid; gap: 8px; }
.account-methods h3 { margin: 4px 0 0; }
.account-methods-list { display: grid; gap: 7px; }
.account-method-row {
  min-height: 46px;
  display: grid;
  grid-template-columns: 36px minmax(130px, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 7px 8px 7px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0b1b27;
}
.account-method-row strong { font-size: 12px; }
.account-method-provider {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  justify-self: start;
  color: inherit;
  line-height: 0;
}
.account-method-icon {
  width: 22px;
  height: 22px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.account-method-provider-connected { color: var(--mint); }
.account-method-provider-unavailable {
  color: var(--muted);
  opacity: .56;
}
.account-method-provider-name {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.account-method-state { color: var(--muted); font-size: 11px; }
.account-method-connected { color: var(--mint); }
.account-method-row button { min-height: 34px; padding: 7px 10px; }
.account-fees { display: grid; gap: 8px; }
.account-fee-row { display: grid; grid-template-columns: minmax(105px, 1fr) 110px auto auto; align-items: center; gap: 8px; }
.account-fee-input { position: relative; display: block; }
.account-fee-input input { width: 100%; padding-right: 26px; }
.account-fee-input > span { position: absolute; right: 9px; top: 50%; translate: 0 -50%; color: var(--muted); font-size: 12px; pointer-events: none; }
.account-fee-row button { min-height: 38px; padding-inline: 10px; }

.auth-confirm-shell {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 16px;
}
.auth-confirm-card { padding: 24px; }
.auth-confirm-card h1 { margin: 0 0 8px; font-size: 24px; }
.auth-confirm-card > p { color: var(--muted); }
.auth-confirm-actions { display: flex; align-items: center; gap: 14px; margin-top: 20px; }
.auth-confirm-actions a { color: var(--muted); }

.shark-connect-panel { padding: 12px 0; border-block: 1px solid var(--line); margin-block: 12px; }
.shark-connect-panel h3 { margin: 0 0 8px; }
.shark-connect-panel p, .shark-connect-panel details { color: var(--muted); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.shark-connect-panel button { margin: 0 8px 8px 0; }
.shark-connect-panel summary { cursor: pointer; }

@media (max-width: 720px) {
  .site-header .account-entry-wide { display: none; }
  .site-header .account-entry-compact { display: inline; }
  .account-dialog { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); padding: 15px; }
  .account-email-form input, .account-fee-input input { font-size: 16px; }
  .account-email-form > div, .account-providers { grid-template-columns: 1fr; }
  .account-fee-row { grid-template-columns: minmax(0, 1fr) 105px; }
  .account-fee-row button { grid-column: auto; }
  .account-method-row { grid-template-columns: 36px minmax(0, 1fr); }
  .account-method-row button { grid-column: 1 / -1; }
  .account-name { max-width: 105px; }
}

.shark-connection-dialog { width: min(440px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); overflow-y: auto; padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel, #0c1b26); color: var(--text, #e9f2f6); box-sizing: border-box; }
.shark-connection-dialog::backdrop { background: rgb(0 8 14 / .72); }
.shark-connection-dialog .shark-confirmation-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.shark-connection-dialog h2 { font-size: 19px; margin: 0; }
.shark-connection-dialog .shark-confirmation-close { padding: 0 4px; border: 0; background: transparent; color: inherit; font-size: 26px; cursor: pointer; }
.shark-connection-dialog .shark-connect-panel { border: 0; margin-bottom: 0; padding-bottom: 0; }
.shark-connection-dialog .shark-connect-panel button { min-height: 42px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 9px; background: #19303d; color: #e9f2f6; font: inherit; cursor: pointer; }
.shark-connection-dialog .shark-connect-panel button:disabled { opacity: .5; cursor: default; }

.shark-order-intent { margin: 12px 0; }
.shark-order-intent pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; line-height: 1.5; max-height: 240px; overflow-y: auto; }

.shark-connection-dialog { width: min(640px, calc(100vw - 32px)); }
.shark-portfolio { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 18px; }
.shark-portfolio-balances { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; }
.shark-portfolio-balances > div { border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.shark-portfolio-balances dt, .shark-portfolio-time, .shark-portfolio-note { color: var(--muted); font-size: 12px; }
.shark-portfolio-balances dd { margin: 8px 0 0; font-weight: 700; overflow-wrap: anywhere; }
.shark-portfolio-bets { padding: 0; list-style: none; max-height: 280px; overflow-y: auto; }
.shark-portfolio-bets li { border-bottom: 1px solid var(--line); padding: 10px 0; overflow-wrap: anywhere; }
.shark-portfolio-bets li p { margin: 6px 0; font-size: 12px; color: var(--muted); }
.shark-portfolio button, .shark-portfolio-link { display: inline-block; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: #19303d; color: #e9f2f6; font: inherit; margin: 4px 8px 4px 0; text-decoration: none; cursor: pointer; }
.shark-portfolio button:disabled { opacity: .5; cursor: default; }
@media (max-width: 480px) { .shark-portfolio-balances { grid-template-columns: 1fr; } .shark-portfolio-balances > div { display: flex; justify-content: space-between; align-items: center; gap: 12px; } .shark-portfolio-balances dd { margin: 0; } }
