/* Shared workspace foundations. The compact workspace shell is defined below. */
:root {
  --pioneers-border: #e2dcd2;
  --pioneers-border-light: #eee9e1;
  --pioneers-muted: #716b63;
  --shadow-card: 0 5px 24px #30241905;
}
html, body { font-family: var(--font-latin); }
html[dir="rtl"] body, [dir="rtl"] { font-family: var(--font-arabic); }
body { font-size: 14px; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button:disabled { opacity: .5; cursor: not-allowed; }
button { touch-action: manipulation; }
a { color: var(--pioneers-burgundy); }
svg { flex-shrink: 0; }
[hidden] { display: none !important; }
::selection { background: #edd5df; color: #651331; }
* { scrollbar-width: thin; scrollbar-color: #b9c4d4 transparent; }
/* Chromium uses the custom track below, without native arrow buttons. */
@supports selector(::-webkit-scrollbar) {
  * { scrollbar-width: auto; scrollbar-color: auto; }
  ::-webkit-scrollbar { width: 6px; height: 6px; }
  ::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
  ::-webkit-scrollbar-thumb { background: #b9c4d4; border-radius: 20px; }
  ::-webkit-scrollbar-thumb:hover { background: #8999af; }
  ::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
}
.app-container { height: 100dvh; min-height: 0; overflow: hidden; }
.app-sidebar { width: 232px; height: 100%; background: #fff; border-color: var(--pioneers-border-light); }
.sidebar-header { min-height: 84px; padding: 22px; border: 0; }
.brand-symbol { width: 44px; height: 44px; border-radius: 10px; background: transparent; }
.brand-text strong { display: block; font-family: var(--font-latin); font-size: 25px; font-weight: 800; letter-spacing: -.9px; color: var(--pioneers-ink); line-height: 1.25; }
.brand-text strong span { font-size: inherit; color: var(--pioneers-burgundy); letter-spacing: inherit; }
.brand-text small { display: block; font: 8px var(--font-latin); letter-spacing: 1.5px; color: #83745d; margin-top: 3px; }
.workspace-label { margin: 3px 16px 10px; background: var(--pioneers-canvas); padding: 11px; border: 1px solid var(--pioneers-border-light); border-radius: 12px; display: flex; gap: 10px; align-items: center; }
.workspace-label strong { display: block; font-size: 12px; }
.workspace-label small { font-size: 10px; color: var(--pioneers-muted); }
.workspace-monogram { width: 32px; height: 32px; background: var(--pioneers-surface); border-radius: 9px; display: grid; place-items: center; color: #79633d; font-weight: 700; }
.sidebar-nav { padding: 0 13px 12px; gap: 3px; }
.nav-section-title { font-size: 10px; color: #8a8277; padding: 21px 12px 8px; letter-spacing: 1px; }
.nav-link-pioneers { padding: 10px 12px; font-size: 12.5px; min-height: 40px; border-radius: 9px; color: #58544e; gap: 11px; }
.nav-link-pioneers:not(.active):hover { background: var(--pioneers-canvas); color: var(--pioneers-burgundy-dark); }
.nav-link-pioneers.active { box-shadow: 0 4px 12px #7c193f1c; }
.nav-link-pioneers.active:hover,
.nav-link-pioneers.active:focus-visible { background: var(--pioneers-burgundy-dark); color: #fff; }
.sidebar-guide { margin: 10px 15px; padding: 14px 11px; border: 1px solid #e8ddca; background: #faf7f1; border-radius: 12px; display: flex; gap: 9px; align-items: center; color: #7a623b; }
.sidebar-guide strong { display: block; font-size: 11.5px; }
.sidebar-guide div span { color: var(--pioneers-muted); font-size: 10px; }
.sidebar-footer { font-size: 10px; color: #8a8173; text-align: center; padding: 10px 12px 18px; }
.brand-star { color: var(--pioneers-bronze); }
.app-main { overflow: hidden; }
.app-header { flex-shrink: 0; height: 76px; padding: 0 30px; background: #fcfaf6eF; border-bottom: 1px solid var(--pioneers-border-light); }
.header-context, .header-actions { display: flex; align-items: center; gap: 14px; min-width: 0; }
.header-context { font-size: 12px; }
.header-context strong { font-weight: 600; white-space: nowrap; }
.header-workspace { color: var(--pioneers-muted); }
.header-divider { color: #c4bbaa; }
.workspace-search-trigger { display: flex; align-items: center; gap: 10px; border: 1px solid var(--pioneers-border-light); border-radius: 10px; background: #fff; color: var(--pioneers-muted); font-size: 11px; padding: 9px 12px; cursor: pointer; }
kbd { font: 10px var(--font-latin); padding: 2px 5px; border: 1px solid var(--pioneers-border-light); border-radius: 4px; background: var(--pioneers-canvas); color: var(--pioneers-muted); white-space: nowrap; }
.header-help { font-family: var(--font-latin); font-weight: 700; width: 31px; height: 31px; border-radius: 50%; }
.user-avatar { width: 36px; height: 36px; border-radius: 12px; background: #ede4d4; color: #71542e; font-size: 12px; font-weight: 700; display: grid; place-items: center; flex-shrink: 0; }
.profile-menu { position: relative; }
.profile-menu summary { display: flex; align-items: center; gap: 9px; cursor: pointer; list-style: none; }
.profile-menu summary::-webkit-details-marker { display: none; }
.profile-name { max-width: 110px; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-popover { position: absolute; inset-inline-end: 0; top: calc(100% + 14px); padding: 20px; width: 260px; display: grid; gap: 10px; background: #fff; border: 1px solid var(--pioneers-border); border-radius: 14px; box-shadow: var(--shadow-elevated); z-index: 45; font-size: 12px; }
.app-content-wrapper { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.app-content { padding: 30px 34px 42px; scrollbar-gutter: stable; min-width: 0; width: 100%; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 24px; }
.page-heading h1 { font-size: 26px !important; letter-spacing: -.5px; }
.page-heading p { max-width: 740px; line-height: 1.8; }
.page-heading > div:last-child { flex-wrap: wrap; }
.eyebrow { display: inline-flex; align-items: center; gap: 7px; color: #8b7350; font-size: 10px; font-weight: 700; letter-spacing: 1.5px; }
[dir="rtl"] .eyebrow { letter-spacing: .2px; font-size: 11px; }
.workspace-banner { display: grid; grid-template-columns: 1.4fr 1fr; min-height: 235px; background: var(--pioneers-surface); border: 1px solid #e7dfd2; border-radius: 20px; overflow: hidden; margin-bottom: 24px; position: relative; }
.banner-copy { padding: 28px 32px; align-self: center; z-index: 1; }
.banner-copy h2 { font-size: clamp(23px, 2.25vw, 33px); line-height: 1.45; letter-spacing: -.6px; margin: 8px 0; font-weight: 700; }
.banner-copy p { max-width: 500px; color: #746b5d; font-size: 12.5px; line-height: 1.8; }
.banner-actions { display: flex; gap: 10px; align-items: center; margin-top: 19px; }
.banner-art { position: relative; min-height: 100%; overflow: hidden; }
.banner-art img { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: cover; object-position: 50% 58%; }
.workspace-banner.compact { min-height: 160px; grid-template-columns: 1.8fr 1fr; }
.compact .banner-copy { padding-block: 22px; }
.compact .banner-copy h2 { font-size: 24px; }
.pioneers-card { border-color: var(--pioneers-border-light); box-shadow: var(--shadow-card); border-radius: 15px; }
.pioneers-card-header { border: 0; padding-bottom: 0; margin-bottom: 22px; }
.btn-pioneers-primary, .btn-pioneers-secondary, .btn-pioneers-bronze { min-height: 39px; font-size: 12px; border-radius: 9px; padding: 9px 14px; }
.btn-pioneers-primary { box-shadow: 0 3px 8px #7c193f10; }
.btn-pioneers-primary:active, .btn-pioneers-secondary:active { transform: translateY(1px); }
.btn-pioneers-secondary.active { border-color: #caa9b7; background: var(--pioneers-burgundy-light); color: var(--pioneers-burgundy); }
.btn-pioneers-bronze, .composer-tab-btn.note-active { color: var(--pioneers-ink); }
.btn-pioneers-sm { font-size: 11px; padding: 6px 10px; min-height: 31px; }
.pioneers-input, .pioneers-select, .pioneers-textarea { min-height: 41px; border-color: #e4ded4; font-size: 12.5px; }
.pioneers-input::placeholder, .pioneers-textarea::placeholder { color: #9a9389; }
.pioneers-table { text-align: start; }
.pioneers-table th { text-align: start; font-size: 10.5px; letter-spacing: .4px; background: #faf8f4; color: #867d70; padding: 15px 20px; white-space: nowrap; }
.pioneers-table td { padding: 18px 20px; font-size: 12px; }
.pioneers-card:has(> .pioneers-table) { overflow-x: auto !important; }
.pioneers-table tbody tr:last-child td { border-bottom: 0; }
.metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 22px; }
.metric-card { padding: 21px !important; position: relative; overflow: hidden; }
.metric-card::after { content: ''; position: absolute; inset-inline-end: 20px; top: 20px; width: 7px; height: 7px; background: var(--pioneers-bronze); border-radius: 50%; }
.metric-card:nth-child(2)::after, .metric-card:nth-child(3)::after { background: var(--pioneers-burgundy); }
.metric-card .label-caps { font-size: 11px; font-weight: 500; letter-spacing: 0; }
.metric-card > div:nth-child(2) { font: 800 32px var(--font-latin) !important; color: var(--pioneers-ink) !important; margin-top: 12px !important; }
.charts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.svg-bar-track { height: 7px; margin-top: 9px; }
.svg-bar-fill-charcoal { background: #b39a6d; }
.svg-bar-fill-burgundy { background: #7c193f; }
.section-label { display: flex; align-items: center; gap: 10px; margin: 27px 0 17px; font-size: 15px; font-weight: 600; }
.section-label span { color: var(--pioneers-muted); font-size: 11px; font-weight: 400; }
.quick-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 24px; }
.quick-link { display: flex; align-items: center; gap: 13px; border: 1px solid var(--pioneers-border-light); padding: 16px 19px; border-radius: 12px; background: #fff; color: var(--pioneers-ink); transition: border-color .15s; }
.quick-link:hover { border-color: var(--pioneers-bronze); }
.quick-link > svg { color: var(--pioneers-burgundy); }
.quick-link strong { display: block; font-size: 12px; }
.quick-link small { display: block; font-size: 10px; color: var(--pioneers-muted); margin-top: 3px; }
.quick-link > span:last-child { margin-inline-start: auto; color: var(--pioneers-bronze); }
.feedback-banner { display: flex; gap: 14px; align-items: center; justify-content: space-between; border: 1px solid #e4c8cd; background: var(--state-danger-bg); color: var(--state-danger); padding: 13px 18px; border-radius: 10px; margin-bottom: 18px; font-size: 12px; }
.feedback-banner-success { justify-content: flex-start; gap: 10px; border-color: #b8dfc8; background: #edf8f0; color: #17643b; }
.loading-state { display: grid; gap: 13px; padding: 30px; color: var(--pioneers-muted); text-align: center; }
.skeleton { height: 80px; border-radius: 12px; background: linear-gradient(90deg,#f2eee6 25%,#fbf9f5 50%,#f2eee6 75%); background-size: 200% 100%; animation: shimmer 1.8s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.inbox-page-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 26px 16px; flex-shrink: 0; gap: 14px; }
.inbox-page-header h1 { font-size: 23px; }
.inbox-page-header p { font-size: 11px; color: var(--pioneers-muted); margin-top: 3px; }
.inbox-container { flex: 1; min-height: 0; height: auto; margin: 0 24px 22px; border: 1px solid var(--pioneers-border); border-radius: 16px; grid-template-columns: 165px 290px minmax(0,1fr); background: #fff; }
.inbox-queues-pane { background: #faf8f4; padding: 16px 10px; gap: 14px; border-color: var(--pioneers-border-light); }
.inbox-queues-pane > div:first-child { padding: 0 5px 10px; font-size: 13px !important; }
.queue-buttons { display: flex; flex-direction: column; gap: 4px; }
.inbox-queue-item { padding: 9px 8px; font-size: 11px; }
.inbox-queue-item.active { background: #eee2e6; color: var(--pioneers-burgundy); }
.inbox-queue-item.active .badge-count { background: #7c193f; color: #fff; }
.badge-count { min-width: 22px; text-align: center; background: #eae5db; font-size: 10px; }
.inbox-list-pane { border-color: var(--pioneers-border-light); min-height: 0; }
.inbox-list-header { padding: 16px 13px 13px; }
.inbox-items-scroll { padding: 6px; }
.conv-card-item { border: 1px solid transparent; border-radius: 11px; margin-bottom: 4px; padding: 14px 10px; gap: 10px; }
.conv-card-item.selected { border: 1px solid #e5c6d1; background: #fbf4f6; }
.conv-contact-name { font-size: 12px; }
.conv-preview { width: 100%; font-size: 11.5px; }
.conv-time { font-size: 9px; white-space: nowrap; }
.badge-pioneers { font-size: 9.5px; padding: 3px 7px; }
.inbox-workspace-pane { position: relative; background: #fcfaf6; min-width: 0; }
.workspace-top-bar { padding: 15px 18px; gap: 14px; flex-wrap: wrap; }
.workspace-top-bar > div { flex-wrap: wrap; }
.workspace-top-bar h2 { font-size: 14px !important; }
.workspace-top-bar .pioneers-select { min-height: 31px; max-width: 145px; }
.workspace-body { position: relative; }
.workspace-messages-area { padding: 23px; background-image: radial-gradient(#d6cfc155 .7px, transparent .7px); background-size: 15px 15px; }
.msg-row { max-width: 88%; }
.bubble-inbound { background: #fff; border-color: #e8e1d6; box-shadow: 0 2px 4px #30241903; }
.bubble-outbound { background: #f2e5eb; border-color: #ead3dd; }
.bubble-inbound, .bubble-outbound { padding: 12px 15px; overflow-wrap: anywhere; }
.bubble-internal { background: #faf3e5; }
.workspace-composer { padding: 13px 18px; }
.workspace-composer textarea { border: 1px solid #e5ded3; min-height: 75px; max-height: 160px; font-size: 13px; }
.composer-tabs { gap: 14px; margin-bottom: 10px; }
.composer-tab-btn { border: 0; border-radius: 0; padding: 4px 0 7px; background: transparent; font-size: 11px; color: var(--pioneers-muted); border-bottom: 2px solid transparent; }
.composer-tab-btn.active { background: transparent; color: var(--pioneers-burgundy); border-bottom-color: var(--pioneers-burgundy); }
.composer-tab-btn.note-active { background: transparent; color: #7a623b; border-bottom-color: #b39a6d; }
.composer-actions-bar { gap: 8px; flex-wrap: wrap; }
.composer-actions-bar > div { flex-wrap: wrap; }
.conversation-drawer { position: absolute; inset-block: 0; inset-inline-end: 0; width: min(340px,100%); background: #faf7f1; padding: 18px; overflow-y: auto; z-index: 5; border-inline-start: 1px solid var(--pioneers-border); box-shadow: -10px 0 30px #18171512; }
.empty-workspace { display: flex; flex-direction: column; align-items: center; justify-content: center; flex: 1; padding: 28px; text-align: center; }
.empty-workspace img { width: min(260px,70%); aspect-ratio: 1.25; object-fit: cover; border-radius: 90px 90px 20px 20px; margin-bottom: 22px; }
.empty-workspace h3 { font-size: 21px; }
.empty-workspace p { color: var(--pioneers-muted); max-width: 320px; line-height: 1.8; margin-top: 10px; font-size: 12px; }
.inbox-mobile-back, .filter-toggle { display: none; }
.draft-hint { font-size: 10px; color: #89765c; margin-inline-start: auto; }
.pioneers-modal-backdrop { backdrop-filter: blur(5px); background: #18171555; padding: 18px; }
.pioneers-modal-dialog { width: min(620px,100%); border: 1px solid #e8e0d4; border-radius: 20px; max-height: 88dvh; display: flex; flex-direction: column; box-shadow: 0 30px 90px #18171530; }
.modal-header, .modal-footer { padding: 20px 24px; flex-shrink: 0; }
.modal-body { overflow-y: auto; padding: 24px; min-height: 0; }
.modal-footer { background: #fcfaf6; }
.contact-profile-header { display: flex; gap: 16px; align-items: center; padding: 20px; background: #faf7f1; border-radius: 12px; margin-bottom: 22px; }
.contact-profile-header .user-avatar { width: 54px; height: 54px; font-size: 18px; }
.profile-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.profile-fields dt { font-size: 11px; color: var(--pioneers-muted); margin-bottom: 6px; }
.profile-fields dd { font-size: 13px; overflow-wrap: anywhere; }
.article-card { min-height: 210px; }
.article-category-icon { width: 42px; height: 42px; display: grid; place-items: center; color: #7c193f; background: #f5eaf0; border-radius: 12px; margin-bottom: 17px; }
.article-preview { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.article-content { white-space: pre-wrap; line-height: 1.9; font-size: 14px; }
.guide-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
.guide-card { padding: 26px; }
.guide-number { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid #e3d3b9; color: #8b7350; border-radius: 50%; font-family: var(--font-latin); font-size: 12px; margin-bottom: 18px; }
.guide-card h3 { margin-bottom: 12px; }
.guide-card p { color: var(--pioneers-muted); font-size: 13px; line-height: 1.9; margin-bottom: 20px; }
.command-dialog { margin: auto; width: min(560px,calc(100% - 32px)); max-height: 80dvh; border: 1px solid var(--pioneers-border); padding: 23px; border-radius: 18px; box-shadow: var(--shadow-elevated); color: var(--pioneers-ink); background: #fff; }
.command-dialog::backdrop { background: #18171566; backdrop-filter: blur(4px); }
.command-heading { display: flex; gap: 16px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.command-heading h2 { font-size: 18px; }
.command-results { max-height: 45dvh; overflow-y: auto; display: grid; gap: 4px; margin-top: 15px; }
.command-results a { display: flex; gap: 13px; padding: 12px; color: var(--pioneers-ink); border-radius: 8px; font-size: 13px; }
.command-results a:hover { background: #f9f1f4; color: #7c193f; }
.command-empty { padding: 20px 0; font-size: 12px; color: var(--pioneers-muted); }
.command-dialog footer { border-top: 1px solid var(--pioneers-border-light); padding-top: 12px; margin-top: 12px; color: var(--pioneers-muted); font-size: 11px; }
.skip-link { position: fixed; top: -90px; inset-inline-start: 24px; background: #7c193f; color: #fff; padding: 12px 20px; z-index: 100; border-radius: 8px; }
.skip-link:focus { top: 10px; color: #fff; }
.nav-scrim, .mobile-nav-button { display: none; }
.account-shell { display: block; padding: 0; min-height: 100dvh; background: #fcfaf6; }
.login-experience { min-height: 100dvh; display: grid; grid-template-columns: 1fr 1fr; padding: 18px; gap: 18px; }
.login-form-panel { padding: 20px 40px 14px; display: flex; flex-direction: column; }
.login-top { display: flex; justify-content: space-between; align-items: center; }
.login-wordmark { display: flex; align-items: center; gap: 9px; direction: ltr; font: 800 27px var(--font-latin); letter-spacing: -1px; color: #181715; }
.login-brand-name > span { color: #7c193f; }
.login-wordmark small { display: block; font-size: 8px; letter-spacing: 1.5px; color: #8b7350; margin-top: 3px; }
.account-card { width: 100%; max-width: 410px; margin: auto; padding: 60px 0; background: transparent; border: 0; border-radius: 0; box-shadow: none; }
.account-card h1 { font-size: 39px; letter-spacing: -.7px; margin: 14px 0 12px; }
.account-sub { font-size: 14px; margin-bottom: 34px; line-height: 1.9; }
.account-field { gap: 9px; font-size: 12px; }
.account-field input { height: 49px; font-size: 14px; border-radius: 10px; background: #fff; }
.account-form { gap: 21px; }
.account-submit { min-height: 49px; justify-content: space-between; padding-inline: 20px; font-size: 14px; }
.password-field { display: flex; align-items: stretch; gap: 8px; }
.password-field input { flex: 1; min-width: 0; width: 0; padding-inline: 14px; }
.password-toggle { position: static; display: grid; place-items: center; flex: 0 0 44px; min-height: 49px; border: 0; border-radius: 8px; color: #746b60; background: transparent; padding: 10px; cursor: pointer; }
.password-toggle:hover { color: #7c193f; background: #f2eee6; }
.password-eye-slash { display: none; }
.password-toggle[aria-pressed="true"] .password-eye-slash { display: initial; }
.password-toggle:focus-visible { outline: 2px solid #7c193f; outline-offset: 3px; }
.account-field input[dir="ltr"] { text-align: left; }
.login-support { color: var(--pioneers-muted); font-size: 11px; text-align: center; margin-top: 24px; line-height: 1.8; }
.login-footer { display: flex; justify-content: space-between; font-size: 10px; color: #8b8275; margin-top: auto; }
.login-art-panel { border-radius: 22px; position: relative; overflow: hidden; background: #eee1cc; min-height: 650px; }
.login-art-panel > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; }
.login-art-panel::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg,#271820ed 0%,#271820a0 23%,transparent 60%); }
.login-art-label { position: relative; z-index: 1; display: flex; align-items: center; gap: 9px; margin: 30px; color: #583e28; font: 600 10px var(--font-latin); letter-spacing: 2px; }
.login-story { position: absolute; bottom: 45px; inset-inline: 40px; z-index: 1; color: #fff; }
.login-story .eyebrow { color: #dec9a7; }
.login-story h2 { color: #fff; font-size: clamp(29px,3vw,44px); line-height: 1.45; white-space: pre-line; margin: 15px 0; }
.login-story p { color: #eadfda; max-width: 430px; font-size: 13px; line-height: 1.9; }
.login-channel-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.login-channel-tags span { padding: 5px 12px; border: 1px solid #ffffff35; border-radius: 30px; color: #f5eee6; font: 10px var(--font-latin); }
@media (min-width: 1600px) {
  .inbox-container { grid-template-columns: 190px 330px minmax(0,1fr); }
  .app-content { padding-inline: 44px; }
}
@media (max-width: 1250px) {
  .app-sidebar { width: 205px; }
  .app-header { padding-inline: 22px; }
  .header-workspace, .header-divider, .profile-name, .workspace-search-trigger kbd { display: none; }
  .app-content { padding: 24px; }
  .inbox-container { grid-template-columns: 260px minmax(0,1fr); margin-inline: 18px; }
  .inbox-queues-pane { display: none; position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 215px; z-index: 10; box-shadow: var(--shadow-elevated); }
  .inbox-container { position: relative; }
  .inbox-container.filters-open .inbox-queues-pane { display: flex; }
  .filter-toggle { display: inline-flex; }
  .login-form-panel { padding-inline: 24px; }
}
@media (max-width: 900px) {
  .app-container { display: flex; height: 100dvh; }
  .app-sidebar { position: fixed; z-index: 60; top: 0; bottom: 0; inset-inline-start: 0; width: 260px; max-height: none; height: 100dvh; transform: translateX(-100%); transition: transform .2s; visibility: hidden; }
  [dir="rtl"] .app-sidebar { transform: translateX(100%); }
  .nav-open .app-sidebar { transform: translateX(0); visibility: visible; }
  .nav-open .nav-scrim { display: block; position: fixed; inset: 0; border: 0; background: #18171566; backdrop-filter: blur(3px); z-index: 59; }
  .mobile-nav-button { display: inline-flex; }
  .app-header { height: 68px; min-height: 68px; flex-wrap: nowrap; padding: 0 18px; }
  .header-actions, .header-context { gap: 10px; }
  .header-context strong { font-size: 11px; }
  .app-content-wrapper { overflow: hidden !important; }
  .inbox-container { display: grid; grid-template-columns: 270px minmax(0,1fr); height: auto; min-height: 0; overflow: hidden; flex-direction: initial; }
  .inbox-list-pane { min-height: 0; border: 0; border-inline-end: 1px solid var(--pioneers-border-light); }
  .inbox-workspace-pane { min-height: 0; }
  .inbox-queues-pane { border-bottom: 0; }
  .workspace-top-bar { padding: 12px; }
  .workspace-messages-area { padding: 15px; }
  .charts-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .workspace-banner { grid-template-columns: 1.3fr 1fr; }
  .banner-copy { padding: 22px; }
  .login-experience { grid-template-columns: 1.1fr 1fr; padding: 12px; gap: 0; }
  .login-form-panel { padding: 20px; }
  .login-story { inset-inline: 23px; bottom: 30px; }
}
@media (max-width: 640px) {
  .app-header { padding-inline: 12px; gap: 8px; }
  .header-context strong, .workspace-search-trigger span, .header-help, .profile-chevron { display: none; }
  .workspace-search-trigger { padding: 9px; border-radius: 50%; }
  .header-actions { gap: 9px; }
  .app-content { padding: 22px 16px; }
  .page-heading { gap: 14px; margin-bottom: 20px; }
  .page-heading h1 { font-size: 23px !important; }
  .page-heading p { font-size: 12px !important; }
  .workspace-banner, .workspace-banner.compact { grid-template-columns: 1fr; }
  .banner-art { height: 125px; min-height: 0; }
  .banner-art img { object-position: 50% 48%; }
  .banner-copy { padding: 22px; }
  .banner-copy h2 { font-size: 25px; }
  .metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .metric-card { padding: 16px !important; }
  .metric-card::after { display: none; }
  .metric-card > div:nth-child(2) { font-size: 27px !important; }
  .charts-grid, .quick-links, .guide-grid { grid-template-columns: 1fr; }
  .quick-links { gap: 8px; }
  .quick-link { padding: 13px 16px; }
  .pioneers-table { min-width: 620px; }
  .app-content div[style*="grid-template-columns"]:not(.metric-grid):not(.quick-links) { grid-template-columns: minmax(0,1fr) !important; }
  .app-content div[style*="display: flex"] { flex-wrap: wrap; }
  .inbox-page-header { padding: 16px; }
  .inbox-page-header p { max-width: 210px; }
  .inbox-container { grid-template-columns: minmax(0,1fr); margin: 0 10px 10px; }
  .inbox-container .inbox-workspace-pane { display: none; }
  .inbox-container.thread-open .inbox-list-pane { display: none; }
  .inbox-container.thread-open .inbox-workspace-pane { display: flex; }
  .inbox-mobile-back { display: inline-flex; flex-shrink: 0; }
  .workspace-top-bar > div { gap: 7px !important; }
  .workspace-top-bar { gap: 10px; }
  .workspace-top-bar h2 { max-width: 170px; }
  .workspace-top-bar .badge-pioneers { font-size: 9px; }
  .workspace-composer { padding: 12px; }
  .workspace-composer textarea { font-size: 16px; }
  .composer-actions-bar .text-muted { display: none; }
  .workspace-messages-area { padding: 17px 12px; }
  .msg-row { max-width: 94%; }
  .draft-hint { display: none; }
  .login-experience { display: flex; flex-direction: column; padding: 0; }
  .login-form-panel { min-height: 100dvh; padding: 24px; }
  .account-card { padding: 50px 0; }
  .account-card h1 { font-size: 35px; }
  .login-art-panel { display: none; }
  .pioneers-modal-backdrop { padding: 10px; }
  .modal-header, .modal-footer, .modal-body { padding: 18px; }
  .profile-fields { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
.page-search { display: flex; align-items: center; gap: 11px; margin-bottom: 22px; background: #fff; border: 1px solid var(--pioneers-border-light); border-radius: 12px; padding: 7px 15px; color: var(--pioneers-muted); max-width: 600px; }
.page-search input { border: 0; background: transparent; min-width: 0; }
.page-search input:focus { outline: 0; box-shadow: none; }
.page-search:focus-within { outline: 2px solid #7c193f; outline-offset: 2px; }
.field-help { color: var(--pioneers-muted); font-size: 11px; line-height: 1.8; margin-top: 8px; }
.canned-response-choice { background: #fff; text-align: start; }
.canned-response-choice:hover { background: #faf5f7; }

/* Focused inbox shell: keep navigation available without taking space from messages. */
.app-container:has(.inbox-container) .app-header { height: 52px; min-height: 52px; padding-inline: 14px; }
.app-container:has(.inbox-container) .mobile-nav-button { display: inline-flex; }
.app-container:has(.inbox-container) .header-workspace,
.app-container:has(.inbox-container) .header-divider { display: none; }
.device-setup { display: flex; flex-shrink: 0; align-items: center; gap: 8px; padding: 6px 12px; background: #fff; }
.device-setup:has(.notification-prompt[hidden]):has(.install-app[hidden]) { display: none; }
.notification-prompt { display: flex; flex: 1; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid #cfac68; border-inline-start: 4px solid #a67b31; background: #fff9ec; border-radius: 9px; font-size: 12px; color: #654918; }
.notification-prompt > div { flex: 1; }
.notification-prompt strong { margin-inline-end: 10px; }
.notification-prompt button { flex-shrink: 0; }
.device-help { margin: auto; width: min(460px, calc(100% - 32px)); padding: 24px; border: 1px solid #e2dcd2; border-radius: 16px; }
.device-help::backdrop { background: #18171566; }
.device-help h2 { font-size: 19px; }
.device-help p { line-height: 1.9; margin: 16px 0; }
@media (min-width: 901px) {
  .app-container:has(.inbox-container):not(.nav-open) .app-sidebar { width: 64px; }
  .app-container:has(.inbox-container):not(.nav-open) .sidebar-header { min-height: 64px; padding: 12px; }
  .app-container:has(.inbox-container):not(.nav-open) .brand-symbol { width: 38px; }
  .app-container:has(.inbox-container):not(.nav-open) .sidebar-nav { padding-inline: 8px; gap: 6px; }
  .app-container:has(.inbox-container):not(.nav-open) .nav-link-pioneers { padding: 12px; justify-content: center; min-height: 44px; }
  .app-container:has(.inbox-container):not(.nav-open) .nav-link-pioneers span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .app-container:has(.inbox-container):not(.nav-open) :is(.brand-text,.workspace-label,.nav-section-title,.sidebar-guide,.sidebar-footer) { display: none; }
  .app-container.nav-open:has(.inbox-container) .app-sidebar { position: fixed; inset-block: 0; inset-inline-start: 0; width: 250px; z-index: 60; }
  .app-container.nav-open:has(.inbox-container) .nav-scrim { display: block; position: fixed; inset: 0; z-index: 59; border: 0; background: #18171566; }
}
@media (max-width: 640px) {
  .app-container { min-height: 0; height: var(--app-height, 100dvh); }
  .app-container:has(.inbox-container) .header-context strong { display: none; }
  .device-setup { padding: 5px 8px; gap: 5px; }
  .notification-prompt { padding: 6px 8px; gap: 6px; font-size: 10px; }
  .notification-prompt > span, .notification-prompt strong { display: none; }
  .notification-prompt button, .device-setup .install-app { font-size: 10px; padding: 7px; min-height: 40px; }
  .notification-prompt button { max-width: 95px; }
  .install-app { max-width: 75px; }
  .app-container:has(.inbox-container) .app-header { height: 48px; min-height: 48px; }
  .app-container:has(.inbox-container) .header-actions { gap: 6px; }
  .app-container:has(.inbox-container):has([data-reply-composer]:focus) .app-header,
  .app-container:has(.inbox-container):has([data-reply-composer]:focus) .inbox-page-header { display: none; }
}

@media (max-width: 640px) {
  .app-container:has(.inbox-container.thread-open) .app-header,
  .app-container:has(.inbox-container.thread-open) .inbox-page-header { display: none; }
  .app-container:has(.inbox-container.thread-open) .device-setup { padding-top: max(5px,env(safe-area-inset-top)); }
  .app-sidebar { transition: none; }
  .app-header { padding-top: env(safe-area-inset-top); }
  .app-container:has(.inbox-container) .pioneers-modal-backdrop { align-items: flex-end; padding: 0; }
  .app-container:has(.inbox-container) .pioneers-modal-dialog { width: 100%; max-height: 85dvh; margin: 0; border-radius: 20px 20px 0 0; padding-bottom: env(safe-area-inset-bottom); }
  .device-setup .notification-prompt button, .device-setup .install-app { min-height: 44px; }
  .device-help button, .modal-header button, .modal-footer button { min-width: 44px; min-height: 44px; }
}
@media (max-width: 900px) and (max-height: 500px) {
  .app-container { min-height: 0; height: var(--app-height,100dvh); }
  .app-container:has(.inbox-container.thread-open) .app-header,
  .app-container:has(.inbox-container.thread-open) .inbox-page-header { display: none; }
  .device-setup { padding: 4px 8px; }
  .notification-prompt { padding: 4px 8px; font-size: 11px; }
  .notification-prompt strong { display: none; }
}
.nav-close-button { display: none; }
.nav-open .nav-close-button { display: inline-flex; position: absolute; inset-inline-end: 10px; top: 14px; width: 44px; height: 44px; font-size: 26px; z-index: 1; }
.nav-open .sidebar-header { padding-inline-end: 60px; }

/* The inbox owns the viewport; only its individual panels may scroll. */
html:has(.inbox-container), body:has(.inbox-container) {
  height: 100%;
  min-height: 0;
  overflow: hidden;
  overscroll-behavior: none;
}
body:has(.inbox-container) {
  position: fixed;
  inset: 0;
  width: 100%;
}
.app-container:has(.inbox-container) {
  height: var(--app-height, 100dvh);
  max-height: 100%;
  min-height: 0;
}
.app-container:has(.inbox-container) .app-main,
.app-content-wrapper:has(.inbox-container),
.inbox-container,
.inbox-list-pane,
.inbox-workspace-pane,
.workspace-body > div {
  min-height: 0;
  min-width: 0;
}
.app-content-wrapper:has(.inbox-container) { overflow: hidden !important; }
.inbox-container { grid-template-rows: minmax(0, 1fr); }
.inbox-items-scroll, .workspace-messages-area {
  min-height: 0;
  overflow-y: auto;
}
.inbox-list-header, .workspace-top-bar, .workspace-composer { flex-shrink: 0; }
.workspace-messages-area > .msg-row { flex-shrink: 0; }
body:has(.inbox-container) :is(.inbox-items-scroll, .workspace-messages-area, .inbox-queues-pane, .sidebar-nav, .modal-body, textarea) {
  overscroll-behavior: contain;
}
.app-container:has(.inbox-container) .pioneers-modal-backdrop {
  height: var(--app-height, 100dvh);
  overflow: hidden;
}
.app-container:has(.inbox-container) .pioneers-modal-dialog { max-height: 100%; }

/* Compact, blue workspace shell inspired by the onboarding reference. */
.workspace-refresh {
  --pioneers-canvas: #f8f9fb;
  --pioneers-surface: #eef3fc;
  --pioneers-ink: #29313a;
  --pioneers-burgundy: #1c6bff;
  --pioneers-burgundy-dark: #1254d3;
  --pioneers-burgundy-light: #eaf1ff;
  --pioneers-border: #d9dee6;
  --pioneers-border-light: #e6eaf0;
  --pioneers-muted: #728096;
  background: #f8f9fb;
}
.workspace-refresh .app-sidebar { background: #f0f5ff; border-inline-end: 1px solid #c8d9fb; }
.workspace-refresh .app-header { background: #e7efff; border-bottom: 0; padding-inline: 20px; gap: 20px; min-height: 68px; height: auto; padding-block: 14px; }
.workspace-refresh .header-context { flex: 1; gap: 13px; }
.workspace-refresh .header-context .setup-notice { white-space: normal; font-size: 14px; line-height: 1.55; font-weight: 600; }
.setup-notice-icon { display: grid; place-items: center; width: 22px; height: 22px; flex-shrink: 0; border-radius: 50%; background: #2372ff; color: #fff; font-weight: 700; }
.setup-checklist-link { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 6px 17px; border: 1px solid #c5d2e9; border-radius: 10px; color: #29313a; font-size: 14px; white-space: nowrap; }
.setup-checklist-link:hover { background: #d8e5ff; }
.workspace-refresh .header-actions { gap: 12px; }
.workspace-refresh .workspace-search-trigger, .workspace-refresh .header-help, .workspace-refresh .profile-name, .workspace-refresh .profile-chevron { display: none; }
.workspace-refresh .user-avatar { background: #fff; color: #3475e5; border-radius: 50%; }
.rail-tools { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 0; margin-top: auto; }
.rail-tool { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex-shrink: 0; border: 0; border-radius: 10px; background: transparent; color: #334558; cursor: pointer; }
.rail-tool:hover { background: #dfebff; }
.rail-profile { background: #e3edff; border-radius: 50%; }
.workspace-refresh .nav-link-pioneers.active { color: #a650dc !important; background: #ede7fb; box-shadow: none; }
.workspace-refresh .nav-link-pioneers.active svg { stroke: currentColor !important; }
.workspace-refresh .nav-link-pioneers.active:hover, .workspace-refresh .nav-link-pioneers.active:focus-visible { color: #8a30bc; background: #e8def9; }
.workspace-refresh .nav-link-pioneers { position: relative; }
.workspace-refresh .nav-link-pioneers.active::before { content: ''; position: absolute; inset-inline-start: -10px; top: 8px; bottom: 8px; width: 4px; background: #b452e0; border-radius: 4px; }
@media (min-width: 901px) {
  .workspace-refresh:not(.nav-open) .app-sidebar { width: 64px !important; flex-shrink: 0; }
  .workspace-refresh:not(.nav-open) .sidebar-header { padding: 19px 10px; min-height: 78px; justify-content: center; }
  .workspace-refresh:not(.nav-open) .brand-symbol, .workspace-refresh:not(.nav-open) .brand-symbol img { width: 40px; height: 40px; }
  .workspace-refresh:not(.nav-open) .brand-symbol { background: #fff; border: 1px solid #548bff; border-radius: 11px; padding: 5px; }
  .workspace-refresh:not(.nav-open) .brand-symbol img { width: 28px; height: 28px; }
  .workspace-refresh:not(.nav-open) :is(.brand-text, .workspace-label, .nav-section-title, .sidebar-guide, .sidebar-footer, .secondary-nav-link) { display: none; }
  .workspace-refresh:not(.nav-open) .sidebar-nav { padding: 6px 10px; gap: 8px; }
  .workspace-refresh:not(.nav-open) .nav-link-pioneers { min-height: 45px; padding: 10px; justify-content: center; border-radius: 8px; }
  .workspace-refresh:not(.nav-open) .nav-link-pioneers svg { width: 23px; height: 23px; }
  .workspace-refresh:not(.nav-open) .nav-link-pioneers span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .workspace-refresh.nav-open .app-sidebar { position: fixed; inset-block: 0; inset-inline-start: 0; width: 270px; z-index: 60; }
  .workspace-refresh.nav-open .app-main { margin-inline-start: 64px; }
  .workspace-refresh.nav-open .nav-scrim { display: block; position: fixed; inset: 0; z-index: 59; border: 0; background: #23324850; }
  .workspace-refresh.nav-open .nav-close-button { display: inline-flex; position: absolute; top: 8px; inset-inline-end: 8px; }
  .workspace-refresh.nav-open .rail-tools { flex-direction: row; justify-content: center; }
}
@media (max-width: 1100px) { .workspace-refresh .header-context .setup-notice { font-size: 12px; } .setup-checklist-link { font-size: 12px; padding-inline: 10px; } }
@media (max-width: 900px) {
  .workspace-refresh .rail-tools { flex-direction: row; justify-content: center; }
  .workspace-refresh .app-header { gap: 12px; }
  .workspace-refresh .header-context .setup-notice { display: block; }
  .workspace-refresh .setup-notice-icon { display: none; }
}
@media (max-width: 600px) {
  .workspace-refresh .app-header { flex-wrap: wrap; padding: 12px; }
  .workspace-refresh .header-context { flex-basis: 100%; }
  .workspace-refresh .header-actions { margin-inline-start: 36px; flex-wrap: wrap; }
}
/* Consistent workspace surfaces, contextual settings, and readable forms. */
.workspace-page-layout { display: flex; flex: 1; min-height: 0; min-width: 0; overflow: hidden; }
.workspace-page-layout > .app-content-wrapper { min-width: 0; }
/* Keep page actions outside the scrolling content so nothing appears beneath them. */
.workspace-form-page { display: flex; flex-direction: column; flex: 1; min-height: 0; min-width: 0; overflow: hidden; }
.workspace-form-page > .workspace-form-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior-y: contain; }
.workspace-form-actions { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 28px; padding-bottom: max(20px, env(safe-area-inset-bottom)); border-top: 1px solid var(--pioneers-border); border-radius: 0; background: #f3f7ff; }
@media (max-width: 640px) {
  .workspace-form-actions { flex-direction: column; align-items: stretch; gap: 12px; padding: 16px; padding-bottom: max(16px, env(safe-area-inset-bottom)); }
  .workspace-form-actions > button { width: 100%; }
}
.settings-navigation { width: 225px; flex-shrink: 0; overflow-y: auto; background: #fff; border-inline-end: 1px solid #e0e5ec; padding: 24px 14px; }
.settings-navigation h2 { font-size: 17px; margin: 0 10px 22px; }
.settings-navigation p { font-size: 11px; font-weight: 600; color: #7a8798; margin: 23px 12px 9px; }
.settings-navigation a { display: flex; gap: 10px; align-items: center; padding: 11px 12px; border-radius: 8px; color: #617083; font-size: 13px; margin-block: 3px; }
.settings-navigation a:hover { background: #f5f7fb; }
.settings-navigation a.active { color: #245fc7; background: #edf3ff; font-weight: 650; }
.workspace-refresh .app-content:not(.onboarding-page) { background: #fff; }
.workspace-refresh .page-heading { margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid #e7ebf1; }
.workspace-refresh .page-heading h1 { font-size: 23px !important; letter-spacing: -.3px; }
.workspace-refresh .page-heading p { font-size: 13px; margin-top: 6px; color: #738095; }
.workspace-refresh .pioneers-card { box-shadow: none; border-radius: 11px; border-color: #e0e5ec; }
.workspace-refresh :is(.pioneers-input,.pioneers-select,.pioneers-textarea) { border-color: #dbe1e9; border-radius: 8px; min-height: 40px; font-size: 13px; background: #fff; }
.workspace-refresh :is(.pioneers-input,.pioneers-select,.pioneers-textarea):focus { border-color: #729bff; box-shadow: 0 0 0 3px #246fff12; }
.workspace-refresh .page-search { background: #f5f6f8; border-radius: 9px; box-shadow: none; padding: 0 12px; min-height: 42px; }
.workspace-refresh .page-search input { background: transparent; min-height: 42px; }
.workspace-refresh .pioneers-table th { background: #f8f9fc; font-size: 12px; color: #6d798a; }
.workspace-refresh .pioneers-table td { font-size: 13px; }
.workspace-refresh .btn-pioneers-primary { box-shadow: none; }
.surface-tabs { display: flex; gap: 22px; border-bottom: 1px solid #e2e7ee; overflow-x: auto; }
.surface-tabs button { border: 0; border-bottom: 3px solid transparent; border-radius: 0; padding: 14px 2px; background: transparent; color: #748195; white-space: nowrap; font: inherit; font-weight: 600; cursor: pointer; }
.surface-tabs button.active { color: #246dff; border-bottom-color: #246dff; }
.surface-tabs button span { font-size: 11px; background: #eff3f9; border-radius: 5px; padding: 2px 6px; margin-inline-start: 6px; }
.surface-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 25px 0 20px; }
.surface-section-heading h2 { font-size: 18px; }
.surface-section-heading p { color: #758196; font-size: 13px; margin-top: 6px; }
.surface-empty { display: flex; align-items: center; flex-direction: column; justify-content: center; gap: 16px; text-align: center; min-height: 300px; padding: 40px 20px; color: #7a8798; }
.surface-empty h2 { font-size: 22px; color: #303a47; }
.surface-empty p { max-width: 520px; font-size: 14px; line-height: 1.8; }
.empty-symbol { display: grid; place-items: center; width: 130px; height: 120px; background: #edf3ff; color: #6598f7; border-radius: 30px; margin-bottom: 10px; }
.empty-symbol.purple { background: #f0edff; color: #8972e8; }
.contacts-page > .btn-pioneers-secondary { margin-bottom: 16px; }
.contacts-empty { min-height: 430px; }
.workspace-refresh .empty-workspace { gap: 14px; background: #fff; }
.workspace-refresh .empty-workspace > .btn-pioneers-secondary { margin-top: 12px; }
.workspace-refresh .device-setup { padding-block: 4px; border-bottom: 1px solid #edf0f5; }
.workspace-refresh .notification-prompt { background: #f7f9fd; border: 0; border-radius: 6px; padding: 4px 10px; color: #718095; font-size: 11px; }
.workspace-refresh .notification-prompt strong { display: none; }
.workspace-refresh .notification-prompt button { background: transparent; color: #2869d9; min-height: 30px; padding: 4px 10px; }
.workspace-refresh:not(:has(.onboarding-page)) .app-header { min-height: 56px; padding-block: 8px; }
.workspace-refresh:not(:has(.onboarding-page)) .header-context .setup-notice { font-size: 12px; }
.workspace-refresh :is(button,a,input,select,textarea):focus-visible { outline: 2px solid #6695ff; outline-offset: 3px; }
@media (max-width: 1250px) { .settings-navigation { width: 195px; padding-inline: 10px; } }
@media (max-width: 1000px) { .settings-navigation { display: none; } }
@media (max-width: 640px) { .surface-section-heading { align-items: flex-start; flex-direction: column; } .surface-tabs { gap: 16px; } .workspace-refresh .page-heading h1 { font-size: 21px !important; } }

.header-project-context { display: none; font-weight: 650; font-size: 14px; }
.workspace-refresh:not(:has(.onboarding-page)) .header-project-context { display: block; }
.workspace-refresh:not(:has(.onboarding-page)) .header-context .setup-notice { display: none; }
/* Readable management forms and record-first screens. */
.simple-admin { max-width: 1260px; margin-inline: auto; }
.simple-admin > h1 { font-size: 24px; margin-bottom: 8px; }
.simple-admin > p { color: #68778b; margin-bottom: 24px; line-height: 1.8; }
.simple-admin > .surface-tabs { margin-bottom: 24px; }
.simple-admin :is(section.pioneers-card,details.pioneers-card) { margin-block: 22px; }
.simple-admin .pioneers-card > h2 { font-size: 19px; margin-bottom: 22px; }
.simple-admin label { display: block; font-size: 13px; font-weight: 500; margin-block: 18px 8px; }
.simple-admin label > :is(input:not([type=checkbox]),select,textarea) { margin-top: 8px; }
.simple-admin :is(input:not([type=checkbox]),select,textarea) { max-width: 760px; }
.simple-admin :is(input[type=email],input[type=url]) { direction: ltr; text-align: left; }
.simple-admin label:has(input[type=checkbox]) { display: flex; gap: 9px; align-items: flex-start; line-height: 1.8; }
.simple-admin input[type=checkbox] { margin-top: 5px; accent-color: #246bff; }
.simple-admin .pioneers-card > button { margin-block: 16px; margin-inline-end: 8px; }
.simple-admin .pioneers-card > p { color: #68778b; line-height: 1.9; font-size: 13px; margin-block: 14px; overflow-wrap: anywhere; }
.simple-admin details { border: 1px solid #e2e7ee; padding: 15px; border-radius: 8px; margin-block: 18px; }
.simple-admin summary { font-weight: 600; cursor: pointer; }
.simple-admin details[open] summary { margin-bottom: 16px; }
.plain-fieldset { border: 0; min-width: 0; padding: 0; }
.form-panel { max-width: 900px; padding: 28px; }
.form-section-title { font-size: 16px; border-top: 1px solid #e3e8ef; margin-top: 28px; padding-top: 22px; color: #365276; }
.form-help { color: #68778b; line-height: 1.8; font-size: 13px; margin-block: 16px; }
.record-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(220px,1fr)); gap: 16px; margin-block: 24px; }
.record-card { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; border: 1px solid #dfe5ef; background: #fff; border-radius: 12px; padding: 22px; font: inherit; text-align: start; color: #34445a; cursor: pointer; }
.record-card:hover { background: #f8faff; border-color: #84a9ed; }
.record-card strong { font-size: 17px; overflow-wrap: anywhere; }
.record-card svg, .record-card small { color: #557bcc; }
.record-card > span { color: #68778b; font-size: 12px; }
.table-empty { padding: 32px !important; text-align: center; color: #68778b; }
.standard-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-block: 22px; }
.workspace-refresh .pioneers-modal-dialog { max-height: calc(100dvh - 40px); display: flex; flex-direction: column; }
.workspace-refresh .pioneers-modal-dialog .modal-body { overflow-y: auto; min-height: 0; }
.workspace-refresh .pioneers-modal-dialog :is(.modal-header,.modal-footer) { flex-shrink: 0; }
.workspace-refresh .pioneers-modal-backdrop {
  background: radial-gradient(ellipse at 20% 20%, #6c83bb20, transparent 65%), #1e293b66;
  -webkit-backdrop-filter: blur(12px) saturate(120%);
  backdrop-filter: blur(12px) saturate(120%);
}
.workspace-refresh .pioneers-modal-dialog {
  background: linear-gradient(145deg, #fffffff5, #f2f6fff2 65%, #f8f0f5f2);
  border: 1px solid #ffffffcc;
  border-radius: 22px;
  box-shadow: 0 28px 90px #172b4d40, inset 0 1px 0 #fff;
}
.workspace-refresh .pioneers-modal-dialog :is(.modal-header,.modal-footer) {
  background: #ffffff59;
  border-color: #dce3edb3;
}
.app-content-wrapper:has(.pioneers-modal-backdrop),
.app-content:has(.pioneers-modal-backdrop) { overflow: hidden !important; }
@media(max-width:640px) { .form-panel { padding: 18px; } .record-grid { grid-template-columns: 1fr; } .simple-admin .pioneers-card { padding: 18px !important; } }

/* Consistent standalone registration and recovery forms. */
.account-utility-header { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:24px clamp(20px,5vw,72px); }
.account-utility-card { width:calc(100% - 40px); max-width:560px; margin:32px auto 64px; padding:32px; background:var(--surface,#fff); border:1px solid #e2e7ef; border-radius:16px; }
.account-utility-card h1 { margin:0 0 12px; font-size:28px; line-height:1.4; }
.account-utility-card p { line-height:1.8; color:#607086; }
.account-utility-card .account-form { margin:24px 0; }
.account-utility-card label { display:grid; gap:8px; }
.account-utility-card input { width:100%; box-sizing:border-box; }
.account-utility-card a { color:#1769e8; }
.account-utility-card [role=status] { padding:14px; background:#eef8f1; border-radius:8px; color:#24663a; }
@media(max-width:600px) { .account-utility-card { margin-top:12px; padding:22px; } }

/* Readability and space for everyday work on laptop screens. */
.workspace-refresh .settings-navigation { padding-block:16px; }
.workspace-refresh .settings-navigation h2 { margin-bottom:16px; }
.workspace-refresh .settings-navigation p { margin-block:16px 6px; font-size:12px; color:#617083; }
.workspace-refresh .settings-navigation a { padding-block:8px; font-size:14px; }
.workspace-refresh .page-heading p { font-size:14px; line-height:1.7; }
.workspace-refresh :is(.pioneers-input,.pioneers-select,.pioneers-textarea) { font-size:14px; }
.workspace-refresh .pioneers-table td { font-size:14px; }
.workspace-refresh .app-content { padding:24px 28px; }
.device-setup[hidden] { display:none !important; }
.device-dismiss { flex-shrink:0; width:32px; height:32px; border:0; border-radius:6px; background:transparent; color:#58677c; font-size:22px; cursor:pointer; }
.device-dismiss:hover { background:#e7edf7; }
.audit-details { min-width:150px; max-width:380px; }
.audit-details summary { cursor:pointer; color:#2166ca; white-space:nowrap; }
.audit-details p { margin-top:10px; overflow-wrap:anywhere; line-height:1.7; }
@media(min-width:901px) and (max-height:750px) {
 .workspace-refresh:not(.nav-open) .sidebar-header { min-height:64px; padding-block:12px; }
 .workspace-refresh:not(.nav-open) .sidebar-nav { gap:3px; }
 .workspace-refresh:not(.nav-open) .nav-link-pioneers { min-height:38px; padding-block:7px; }
}
@media(max-width:640px) { .workspace-refresh .app-content { padding:20px 16px; } }

/* Persistent setup actions belong to the global header. */
.workspace-refresh .app-header { height:auto; min-height:56px; flex-wrap:wrap; }
.workspace-refresh .header-actions { flex-wrap:wrap; }
.workspace-refresh .header-device-actions { padding:0; background:transparent; border:0; gap:8px; }
.workspace-refresh .header-device-actions .notification-prompt { flex:initial; padding:0; margin:0; background:transparent; border:0; }
.header-device-actions .device-description { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
.workspace-refresh .header-device-actions button:not([data-close-device-help]) { min-height:36px; max-width:none; padding:7px 12px; font-size:13px; white-space:nowrap; }
.workspace-refresh .header-device-actions [data-enable-notifications] { background:#1769e8; color:#fff; }
.workspace-refresh .header-device-actions [data-enable-notifications]:hover { background:#1255bc; }
.header-device-actions [hidden] { display:none !important; }
@media(max-width:640px) {
 .workspace-refresh .header-actions { gap:8px; margin-inline-start:0; }
 .workspace-refresh .header-device-actions button:not([data-close-device-help]) { min-height:44px; }
}

/* A fixed, uncluttered navigation rail; all other destinations remain in All pages. */
.workspace-refresh .app-sidebar { overflow:hidden; }
.workspace-refresh :is(.sidebar-nav,.settings-navigation) { scrollbar-width:none !important; -ms-overflow-style:none; }
.workspace-refresh :is(.sidebar-nav,.settings-navigation)::-webkit-scrollbar { display:none; width:0; height:0; }
.workspace-refresh .rail-tools { flex-shrink:0; }
.workspace-refresh .rail-tool:focus-visible { outline:2px solid #3475e5; outline-offset:2px; }
@media(min-width:901px) {
 .workspace-refresh:not(.nav-open) .sidebar-header { min-height:70px; flex-shrink:0; padding:14px 10px; }
 .workspace-refresh:not(.nav-open) .sidebar-nav { flex:0 0 auto; overflow:visible; padding:8px 10px; gap:5px; }
 .workspace-refresh:not(.nav-open) .nav-link-pioneers { width:44px; height:44px; min-height:44px; flex-shrink:0; padding:10px; color:#526279; transition:background .15s,color .15s; }
 .workspace-refresh:not(.nav-open) .nav-link-pioneers.active { color:#2166d5 !important; background:#dfeaff; }
 .workspace-refresh:not(.nav-open) .nav-link-pioneers.active::before { background:#2874f0; inset-inline-start:-10px; width:3px; top:12px; bottom:12px; }
 .workspace-refresh:not(.nav-open) .nav-link-pioneers:hover { background:#e3ecfc; color:#2166d5; }
 .workspace-refresh:not(.nav-open) .rail-tools { padding:10px 0 12px; gap:5px; position:relative; }
 .workspace-refresh:not(.nav-open) .rail-tools::before { content:''; width:26px; height:1px; background:#d3dff2; margin-bottom:4px; }
 .workspace-refresh.nav-open .sidebar-guide,.workspace-refresh.nav-open .sidebar-footer { display:none; }
 .workspace-refresh.nav-open .sidebar-nav { min-height:0; overflow-y:auto; overscroll-behavior:contain; }
 .workspace-refresh.nav-open .rail-tools { padding:12px; border-top:1px solid #dce5f4; }
}
@media(min-width:901px) and (max-height:650px) {
 .workspace-refresh:not(.nav-open) .sidebar-header { min-height:60px; padding-block:10px; }
 .workspace-refresh:not(.nav-open) .sidebar-nav { gap:2px; padding-block:4px; }
 .workspace-refresh:not(.nav-open) .nav-link-pioneers { height:38px; min-height:38px; padding-block:7px; }
 .workspace-refresh:not(.nav-open) .rail-tools { gap:2px; padding-block:6px; }
 .workspace-refresh:not(.nav-open) .rail-tool { height:36px; }
}
@media(min-width:901px) and (max-height:540px) { .workspace-refresh:not(.nav-open) .compact-optional { display:none; } }
@media(min-width:901px) and (max-height:420px) {
 .workspace-refresh:not(.nav-open) .sidebar-nav { display:none; }
 .workspace-refresh:not(.nav-open) .rail-tools { margin-top:auto; }
}

/* Native popover escapes sidebar clipping and supports Escape/outside click. */
.sidebar-user-menu { position:fixed; inset:auto; inset-inline-start:84px; bottom:20px; width:min(340px,calc(100vw - 104px)); max-height:calc(100dvh - 40px); overflow:auto; margin:0; padding:12px; border:1px solid #dce4ef; border-radius:18px; background:linear-gradient(145deg,#fffffff5,#f3f7fff5); backdrop-filter:blur(18px); color:#303b4c; box-shadow:0 18px 60px #1c355030; }
.sidebar-user-menu::backdrop { background:transparent; }
.sidebar-user-identity { display:flex; align-items:center; gap:12px; padding:12px 8px 18px; border-bottom:1px solid #e2e8f0; margin-bottom:8px; }
.sidebar-user-identity > div { min-width:0; }
.sidebar-user-identity strong,.sidebar-user-identity small { display:block; overflow-wrap:anywhere; }
.sidebar-user-identity small { color:#718096; font-size:12px; margin-top:4px; }
.sidebar-user-menu > a,.sidebar-user-menu form button { display:flex; align-items:center; gap:12px; width:100%; padding:13px 12px; border:0; border-radius:10px; background:transparent; text-decoration:none; font:inherit; font-size:14px; color:inherit; cursor:pointer; text-align:start; }
.sidebar-user-menu > a:hover { background:#eaf1ff; color:#246bff; }
.sidebar-user-menu form { border-top:1px solid #e2e8f0; padding-top:8px; margin-top:8px; }
.sidebar-user-menu form button { color:#b42318; }
.sidebar-user-menu form button:hover { background:#fff0ed; }
@media(max-width:640px) { .sidebar-user-menu { inset-inline-start:16px; bottom:16px; width:calc(100vw - 32px); } }
