/* The account shares the CRM canvas. All account controls stay within this section. */
#account-frame[hidden] { display: none; }
body.signed-in { display: block; padding: 0; background: #f4f7f5; }
#account-frame { min-height: 100vh; }
.account-brand { background: #fff; border-bottom: 1px solid #d6e0d9; }
.account-brand .stand-header {max-width:1600px;margin:auto;padding:12px clamp(16px,3vw,38px);display:flex;align-items:center;justify-content:space-between;gap:12px;}
main.account-section { width: 100%; max-width: 1600px; margin: 0 auto; padding: clamp(18px, 2.5vw, 32px); box-sizing: border-box; border: 0; border-radius: 0; background: transparent; }
.account-section .page-breadcrumbs { margin-bottom: 10px; }
.crm-account { color: #213732; font: 14px/1.5 "Segoe UI", Arial, sans-serif; }
.crm-account *, .crm-account *::after, .crm-account *::before { box-sizing: border-box; }
.crm-account .account-heading, .crm-account .account-actions, .crm-account .data-row, .crm-account .dialog-buttons, .crm-account .controls { display: flex; align-items: center; gap: 10px; }
.crm-account .account-heading { justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.crm-account .account-heading h1 { margin: 0; font-size: 28px; font-weight: 650; line-height: 1.2; letter-spacing: -.035em; }
.crm-account .account-tabs, .crm-account .work-tabs { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.crm-account .account-tabs { border-bottom: 1px solid #d5dfd8; margin: 14px 0 20px; }
.crm-account .account-tabs a { margin-bottom: -1px; border-bottom: 2px solid transparent; padding: 9px 13px; border-radius: 5px 5px 0 0; text-decoration: none; color: #53675c; font-weight: 550; }
.crm-account .account-tabs a:is(:hover,:focus-visible) { color: #205445; background: #edf3ef; border-bottom-color: #688577; }
.crm-account .account-tabs a[aria-current="page"] { color: #205445; border-bottom-color: currentColor; font-weight: 650; }
.crm-account .account-tabs .work-link { margin-inline-start: auto; }
.crm-account .columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.crm-account .card { background: white; border: 1px solid #d7e0d9; padding: 18px 20px; border-radius: 12px; margin: 0 0 16px; min-width: 0; }
.crm-account h2 { color: #253c31; font-size: 17px; font-weight: 650; line-height: 1.3; margin: 0 0 12px; }
.crm-account .card summary { cursor: pointer; font-weight: 600; }
.crm-account .data-row { justify-content: space-between; min-height: 48px; padding: 10px 0; border-top: 1px solid #e5ebe7; overflow-wrap: anywhere; }
.crm-account .data-row > div { min-width: 0; }
.crm-account .data-row:last-child { padding-bottom: 0; }
.crm-account .muted { color: #556a5f; }
.crm-account .badge { color: #245944; background: #e6f2eb; padding: 3px 9px; border-radius: 6px; font-size: 13px; white-space: nowrap; }
.crm-account button, .crm-account .work-tabs a { display: inline-flex; align-items: center; justify-content: center; width: auto; min-height: 34px; padding: 6px 12px; color: #285440; background: #fff; border: 1px solid #cbd8d0; border-radius: 7px; font: 550 14px/1.3 "Segoe UI", sans-serif; cursor: pointer; }
.crm-account button:hover, .crm-account .work-tabs a:hover { background: #eef4ef; }
.crm-account button.primary, .crm-account .work-tabs a[aria-current] { color: #fff; background: #235a46; border-color: #235a46; }
.crm-account :is(button,a,input,select,summary):focus-visible { outline: 2px solid #317558; outline-offset: 2px; }
.crm-account button:disabled { opacity: .57; cursor: default; }
.crm-account #notice:empty, .crm-account #dialog-error:empty { display: none; }
.crm-account #notice { color: #25513f; }
.crm-account dialog { width: min(440px, calc(100% - 32px)); max-height: 90dvh; border: 1px solid #cdd9d0; border-radius: 12px; padding: 22px; color: #243a30; background: #fff; }
.crm-account dialog::backdrop { background: rgb(15 32 25 / .45); }
.crm-account form, .crm-account #dialog-fields, .crm-account label { display: grid; gap: 9px; }
.crm-account form { margin: 0; }
.crm-account input, .crm-account select { min-width: 0; width: 100%; padding: 8px 10px; color: inherit; background: white; border: 1px solid #adbbb1; border-radius: 6px; font: inherit; letter-spacing: normal; }
.crm-account dialog p { margin: 0; }
.crm-account .pairing { width: min(100%, 16rem); height: auto; justify-self: center; image-rendering: pixelated; }
.crm-account #dialog-error { color: #92442c; }
.crm-account .dialog-buttons { justify-content: flex-end; }
.crm-account .controls, .crm-account .account-actions { flex-wrap: wrap; }
.crm-account .work-tabs { margin: 0 0 16px; }
.crm-account .work-link { color: #215442; text-underline-offset: .18em; }
.crm-account .work-tabs a { text-decoration: none; }
.crm-account .preview-banner { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 10px 14px; margin: 0 0 16px; border-inline-start: 3px solid #58957e; color: #244636; background: #e5efe8; }
@media (max-width: 740px) {
  .crm-account .columns { grid-template-columns: 1fr; gap: 0; }
  .crm-account .card { padding: 14px 16px; }
  .crm-account .data-row { flex-wrap: wrap; }
  .crm-account .account-tabs a { padding-inline: 8px; }
  .crm-account .account-tabs .work-link { margin-inline-start: 0; }
}

.crm-account .account-tabs[hidden] { display: none; }
.crm-account .account-tabs[hidden] ~ #workspace { margin-top: 18px; }
.role-preview-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 8px 18px; padding: 9px max(clamp(16px, 2.5vw, 32px), calc((100% - 1600px)/2 + 32px));
  border-bottom: 1px solid #cddfd3; background: #eaf4ed; color: #274e3c; font: 14px/1.45 "Segoe UI", sans-serif; }
.role-preview-bar > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
.role-preview-bar button { color: #245741; background: white; border: 1px solid #bbcdc2; border-radius: 7px;
  min-height: 32px; padding: 5px 12px; font: inherit; cursor: pointer; }
.role-preview-bar button:focus-visible { outline: 2px solid #317558; outline-offset: 2px; }

.native-account .crm-account #workspace, .crm-account #workspace {max-width:1180px;}
.crm-account .account-person {display:flex;gap:14px;align-items:center;margin:18px 0;}
.crm-account .account-avatar {flex:0 0 48px;height:48px;border-radius:14px;display:grid;place-items:center;color:#214f42;background:#e1f0e8;font-size:21px;font-weight:650;}
.crm-account .account-avatar img {width:100%;height:100%;object-fit:cover;border-radius:inherit;}
.crm-account .account-display-name {display:block;font-size:clamp(17px,2.2vw,22px);line-height:1.3;overflow-wrap:anywhere;}
.crm-account .role-label {display:inline-block;color:#436256;font-size:13px;margin-top:3px;}
.crm-account .identity-card > button {margin-top:8px;}
.crm-account .members-card .data-row > div:first-child,.crm-account .data-row:has(.badge) > div:first-child {margin-right:auto;}
.crm-account .account-actions .work-link {font-size:14px;text-decoration:none;border-bottom:1px solid #adc6b8;}
.crm-account dialog {padding:24px;}
.crm-account dialog h2 {font-size:21px;margin-bottom:10px;}
.crm-account .invite-recipient {display:grid;gap:3px;border-left:3px solid #57947c;background:#f0f6f2;padding:10px 12px;overflow-wrap:anywhere;}
.crm-account .invite-recipient span,.crm-account .invite-scope {color:#465f52;font-size:14px;}
.crm-account .factor-help {border-top:1px solid #e1e8e3;margin-top:12px;padding-top:12px;font-size:14px;color:#415d4e;}
.crm-account .factor-help summary {font-weight:550;}
.crm-account .factor-help p {margin:8px 0;}
.crm-account .copy-status {color:#276146;font-size:14px;}
.crm-account .copy-status:empty,.crm-account button[hidden] {display:none;}
.crm-account .dialog-buttons {margin-top:8px;}
@media(max-width:500px){.crm-account .account-heading {align-items:flex-start;flex-direction:column;gap:8px;}.crm-account .account-tabs {flex-wrap:wrap;}}
