/* Compact working pages: account selection stays visible; details live in a menu. */
.kalapat-settings-sync[hidden], .kalapat-account-menu[hidden], .kalapat-account-menu [hidden] { display: none !important; }
.kalapat-compact-portfolio .header { height: 60px; }
.kalapat-compact-portfolio .mobile-menu { top: 60px; }
.kalapat-compact-portfolio .main-content { margin: 72px auto 20px; padding: 0 14px; max-width: 1400px; }
.kalapat-workspace-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; min-width: 0; }
.kalapat-page-title { margin: 0; color: #e5e7eb; font-size: 22px; line-height: 1.2; font-weight: 600; }
#kalapatAccountSlot { flex: 0 1 350px; min-width: 0; margin-left: auto; }
#kalapatWorkspaceActions { flex: none; margin-left: auto; }
.kalapat-workspace-heading #kalapatWorkspaceActions { margin-left: 0; }
.kalapat-workspace-heading .kalapat-account-panel { display: flex; flex-wrap: nowrap; gap: 8px; padding: 0; background: none; }
.kalapat-workspace-heading .kalapat-account-select { display: block; flex: 1; margin: 0; min-width: 0; }
.kalapat-account-select select { width: 100%; min-width: 0; height: 38px; border: 1px solid #526170; border-radius: 8px; font-size: 14px; }
.kalapat-source-status { flex: none; width: 8px; height: 8px; overflow: hidden; border-radius: 50%; font-size: 0; background: #a6aeb6; }
.kalapat-source-status[data-state=connected] { background: #10b981; }
.kalapat-source-status[data-state=error] { background: #f59e0b; }
.kalapat-account-menu { position: relative; font: 14px/1.45 'Segoe UI',Arial,sans-serif; color: #e5e7eb; }
.kalapat-account-menu > summary { display: flex; align-items: center; justify-content: center; list-style: none; width: 38px; height: 38px; padding: 0 0 5px; border: 1px solid #526170; border-radius: 8px; background: #1f2937; color: #e5e7eb; font: 25px/1 Arial,sans-serif; cursor: pointer; }
.kalapat-account-menu > summary::-webkit-details-marker { display: none; }
.kalapat-account-menu > summary:focus-visible { outline: 2px solid #10b981; outline-offset: 3px; }
.kalapat-account-menu.needs-attention > summary { border-color: #f59e0b; }
.kalapat-account-menu-panel { position: absolute; z-index: 1100; right: 0; top: calc(100% + 7px); display: flex; flex-direction: column; gap: 10px; width: min(300px,calc(100vw - 28px)); max-height: calc(100dvh - 140px); overflow-y: auto; padding: 14px; border: 1px solid #526170; border-radius: 12px; background: #1f2937; box-shadow: 0 12px 32px #0006; text-align: left; }
.kalapat-account-menu-panel > a, .kalapat-account-menu-panel > button { display: block; width: 100%; padding: 9px 10px; border: 1px solid #526170; border-radius: 7px; background: #263646; color: #f1f5f9; font: inherit; text-align: left; text-decoration: none; cursor: pointer; }
.kalapat-session-email, .kalapat-settings-summary, .kalapat-connection-summary { font-size: 12px; color: #c8d3dd; overflow-wrap: anywhere; }
.kalapat-account-menu #licenseBlock, .kalapat-account-menu #riskAgreementBlock { display: block; margin: 0 !important; width: 100%; padding: 8px 0; min-height: 0; border: 0; border-top: 1px solid #526170; border-radius: 0; background: none; color: #d6e0e9; font-size: 12px; font-weight: normal; white-space: normal; overflow: visible; }
.kalapat-account-menu #riskAgreementBlock .agreement-content { display: flex; flex-wrap: wrap; }
.kalapat-account-menu #riskAgreementBlock.collapsed::after { content: none; }
.kalapat-account-menu .agreement-text { display: block; width: 100%; font-size: 12px; }
.kalapat-account-menu .agreement-label { font-size: 12px; }
.kalapat-compact-portfolio .card > #portfolioStatusBlock { width: 100%; margin: 10px 0; justify-content: flex-start; flex-wrap: wrap; }
.kalapat-settings-sync { border: 1px solid #a67732; border-radius: 8px; margin: 0 0 12px; }
.kalapat-compact-journal .at10-shell { max-width: 1400px; margin: auto; padding: 14px 20px 24px; }
.kalapat-compact-journal .at10-header { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; padding-bottom: 12px; }
.kalapat-compact-journal .at10-header-left { flex: 1; }
.kalapat-compact-journal .at10-title { margin: 0; font-size: 20px; line-height: 1.2; letter-spacing: 0; text-transform: none; }
.kalapat-back-link { font-size: 13px; color: #334155; text-decoration: none; }
.kalapat-journal-profile { display: flex; align-items: end; flex-wrap: wrap; gap: 10px; margin: 0 0 14px; }
.kalapat-journal-profile .profile-field { flex: 0 1 240px; }
.kalapat-journal-profile .profile-input { width: 100%; }
.kalapat-journal-profile .profile-btn { align-self: end; margin-bottom: 1px; }
.kalapat-journal-profile .profile-error:empty { display: none; }
@media(max-width:600px) {
  .kalapat-compact-portfolio .main-content { margin-top: 68px; padding: 0 8px; }
  .kalapat-workspace-heading { gap: 8px; margin-bottom: 10px; }
  .kalapat-workspace-heading .kalapat-page-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  #kalapatAccountSlot { flex: 1; margin-left: 0; }
  .kalapat-compact-journal .at10-shell { padding: 10px 12px 20px; }
  .kalapat-compact-journal .at10-header { flex-direction: row; gap: 9px; }
  .kalapat-compact-journal .at10-header .logo-container { margin: 0; }
  .kalapat-compact-journal .at10-title { font-size: 17px; }
  .kalapat-compact-journal .kalapat-back-link { font-size: 12px; }
  .kalapat-journal-profile .profile-field { flex: 1 1 150px; }
}
