/* Shared admin UI. Colors follow the existing data-theme tokens, resolved from
   the saved preference or prefers-color-scheme by _theme_head.html. */
body.admin-body {
  --ui-space-1:4px; --ui-space-2:8px; --ui-space-3:12px;
  --ui-space-4:16px; --ui-space-6:24px; --ui-space-8:32px;
  --ui-radius-sm:8px; --ui-radius-md:12px; --ui-radius-lg:16px;
  --ui-focus:0 0 0 3px color-mix(in srgb,var(--admin-blue) 30%,transparent);
}
html[data-theme=dark] body.admin-body {color-scheme:dark}
html[data-theme=light] body.admin-body {color-scheme:light}
body.admin-body .dashboard-main {font-size:14.5px;line-height:1.55;color:var(--admin-text)}
body.admin-body .dashboard-main :is(p,td,li,input,select,textarea,button) {font-size:inherit}
body.admin-body .dashboard-main h1 {font-size:26px;line-height:1.25}
body.admin-body .dashboard-main h2 {font-size:20px;line-height:1.3}
body.admin-body .dashboard-main h3 {font-size:16px;line-height:1.4}
body.admin-body .dashboard-main :is(label,.field-label) {font-size:13px;font-weight:600}
body.admin-body .dashboard-main :is(small,.muted,.help-text,.settings-help,.field-help,.page-heading-row p) {color:var(--admin-muted);font-size:13px}
body.admin-body .dashboard-main :is(button,.btn,.primary-action,.secondary-action,.admin-button) {
  display:inline-flex;align-items:center;justify-content:center;gap:8px;box-sizing:border-box;
  min-height:40px;padding:8px 16px;border:1px solid var(--admin-border);border-radius:8px;
  background:var(--admin-card-soft);color:var(--admin-text);font:inherit;font-weight:600;
  line-height:1.4;text-decoration:none;cursor:pointer;box-shadow:none;
  transition:background-color .15s,border-color .15s,box-shadow .15s;
}
body.admin-body .dashboard-main :is(.primary-action,.btn-primary,.btn--primary,.admin-button--primary) {
  background:var(--admin-blue);border-color:var(--admin-blue);color:var(--brand-blue-fg);
}
body.admin-body .dashboard-main :is(.secondary-action,.btn-secondary,.btn--secondary) {background:var(--admin-card-soft);color:var(--admin-text);border-color:var(--admin-border)}
body.admin-body .dashboard-main :is(.btn-ghost,.btn--ghost,.admin-button--ghost) {background:transparent;border-color:transparent;color:var(--admin-text)}
body.admin-body .dashboard-main :is(.btn-danger,.btn--danger) {background:var(--danger-bg);border-color:var(--danger);color:var(--danger)}
body.admin-body .dashboard-main :is(.btn-link,.danger-link) {background:transparent;border-color:transparent;color:var(--admin-blue);padding-inline:4px;min-height:32px}
body.admin-body .dashboard-main .danger-link {color:var(--danger)}
body.admin-body .dashboard-main :is(button,.btn,.primary-action,.secondary-action):hover {filter:brightness(.96);border-color:var(--admin-blue)}
body.admin-body .dashboard-main :is(.btn-sm,.btn--sm) {min-height:32px;padding:4px 12px;font-size:13px}
body.admin-body .dashboard-main :is(.btn-lg,.btn--lg) {min-height:48px;padding:12px 24px}
body.admin-body .dashboard-main :is(button,.btn,.primary-action,.secondary-action):is(:disabled,[aria-disabled=true],[aria-busy=true],.is-loading) {opacity:.55;cursor:default;pointer-events:none}
body.admin-body .dashboard-main [aria-busy=true]::after {content:'…';margin-inline-start:8px}
body.admin-body .dashboard-main :is(input:not([type=hidden]):not([type=checkbox]):not([type=radio]):not([type=range]),select,textarea,.admin-input) {
  box-sizing:border-box;max-width:100%;min-height:40px;padding:8px 12px;border:1px solid var(--admin-border);
  border-radius:8px;background:var(--admin-card-soft);color:var(--admin-text);font:inherit;line-height:1.55;
}
body.admin-body .dashboard-main :is(.modal-field,.settings-field,.field-group) {display:flex;flex-direction:column;gap:8px;margin-bottom:16px;min-width:0}
body.admin-body .dashboard-main :is(.modal-field,.field-group) :is(input,select,textarea) {width:100%}
body.admin-body .dashboard-main textarea {resize:vertical;min-height:112px}
body.admin-body .dashboard-main :is(input,select,textarea):disabled {opacity:.55;cursor:not-allowed}
body.admin-body .dashboard-main :is(input[type=checkbox],input[type=radio]) {appearance:auto;accent-color:var(--admin-blue);width:18px;height:18px;min-height:0;padding:0;vertical-align:middle}
body.admin-body .dashboard-main input[type=range] {accent-color:var(--admin-blue);min-height:24px;background:var(--admin-card-soft)}
body.admin-body .dashboard-main input[type=file]::file-selector-button {font:inherit;font-weight:600;padding:8px 12px;margin-inline-end:12px;border:1px solid var(--admin-border);border-radius:8px;background:var(--admin-card);color:var(--admin-text);cursor:pointer}
body.admin-body .dashboard-main :is(button,a,input,select,textarea,[tabindex]):focus-visible {outline:2px solid var(--admin-blue);outline-offset:3px;box-shadow:var(--ui-focus)}
body.admin-body .dashboard-main :is([aria-invalid=true],.field-error) {border-color:var(--danger);color:var(--danger)}
body.admin-body .dashboard-main :is(.overview-card,.settings-panel,.settings-card,.module-overview-card,.delivery-card,.admin-card,.panel) {background:var(--admin-card);border:1px solid var(--admin-border);border-radius:16px;padding:24px;color:var(--admin-text);box-shadow:none}
body.admin-body .dashboard-main :is(.table-wrap,.table-scroll,.delivery-table) {overflow-x:auto;max-width:100%;border:1px solid var(--admin-border);border-radius:12px}
body.admin-body .dashboard-main table {width:100%;border-collapse:collapse;font-size:14.5px}
body.admin-body .dashboard-main :is(th,td) {padding:12px 16px;text-align:start;border-bottom:1px solid var(--admin-border)}
body.admin-body .dashboard-main th {background:var(--admin-card-soft);color:var(--admin-muted);font-size:13px;font-weight:600}
body.admin-body .dashboard-main :is(tbody tr:hover,.table--striped tbody tr:nth-child(even)) {background:var(--admin-card-soft)}
body.admin-body .dashboard-main :is(.badge,.status-pill,.msg-badge,.settings-badge) {display:inline-flex;align-items:center;padding:4px 8px;border:1px solid var(--admin-border);border-radius:999px;background:var(--admin-blue-soft);color:var(--admin-text);font-size:12px;font-weight:600;white-space:nowrap}
body.admin-body .dashboard-main :is(.tabs,[role=tablist],.segmented-control,.theme-segmented,.ctv-viewtoggle) {display:flex;flex-wrap:wrap;gap:4px;padding:4px;border:1px solid var(--admin-border);border-radius:12px;background:var(--admin-card-soft);width:fit-content}
body.admin-body .dashboard-main :is(.segmented-control,.theme-segmented,.ctv-viewtoggle,[role=tablist]) :is(button,a) {background:transparent;border-color:transparent;min-height:32px;padding:6px 12px}
body.admin-body .dashboard-main :is(.segmented-control,.theme-segmented,.ctv-viewtoggle,[role=tablist]) :is(.active,[aria-selected=true],[aria-pressed=true]) {background:var(--admin-card);color:var(--admin-blue);border-color:var(--admin-border)}
body.admin-body :is(dialog,.modal-card,.modal-content) {background:var(--admin-card);color:var(--admin-text);border:1px solid var(--admin-border);border-radius:16px;padding:24px;max-width:min(640px,calc(100vw - 32px))}
body.admin-body dialog::backdrop {background:color-mix(in srgb,var(--admin-text) 40%,transparent)}
body.admin-body .dashboard-main :is(.empty-state,.admin-empty) {padding:32px;text-align:center;color:var(--admin-muted);border:1px dashed var(--admin-border);border-radius:12px}
body.admin-body .dashboard-main :is(.page-heading-row,.overview-head,.toolbar,.filter-row,.admin-toolbar,.delivery-nav) {display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-bottom:24px}
body.admin-body .dashboard-main :is(.page-actions,.admin-toolbar,.filter-row) {display:flex;gap:12px;flex-wrap:wrap;align-items:center}
body.admin-body .dashboard-main .page-heading-row>div:first-child {flex:1;min-width:200px}
body.admin-body .dashboard-main .page-heading-row :is(h1,h2,p) {margin:0 0 8px}
body.admin-body .dashboard-main .erp-section-grid {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr));gap:24px;align-items:start}
body.admin-body .dashboard-main .erp-item-list {list-style:none;padding:0;margin:0}
body.admin-body .dashboard-main .erp-item-list a {display:flex;align-items:center;gap:12px;padding:12px 0;color:var(--admin-text);text-decoration:none;border-bottom:1px solid var(--admin-border)}
body.admin-body .dashboard-main .erp-item-label {flex:1}
body.admin-body .dashboard-main .erp-item-icon {color:var(--admin-blue);display:inline-flex}
body.admin-body .dashboard-main .erp-item-icon svg {width:20px;height:20px}
body.admin-body .dashboard-main .erp-item-list a:hover {color:var(--admin-blue)}
body.admin-body .dashboard-main #delivery-map {height:360px;max-width:100%;margin:16px 0;border:1px solid var(--admin-border);border-radius:12px;background:var(--admin-card-soft);isolation:isolate}
body.admin-body .dashboard-main .delivery-form {gap:16px}
body.admin-body .dashboard-main .delivery-form label {min-width:min(100%,200px)}
body.admin-body .dashboard-main .delivery-filter-card {padding:16px;background:var(--admin-card);border:1px solid var(--admin-border);border-radius:12px}
body.admin-body .dashboard-main .msg-tpl textarea {font-family:ui-monospace,SFMono-Regular,Consolas,monospace;min-height:160px}
body.admin-body .dashboard-main .msg-tokens {display:flex;gap:8px;flex-wrap:wrap;align-items:center;color:var(--admin-muted)}
body.admin-body .dashboard-main .profile-form {display:grid;gap:16px}
body.admin-body .dashboard-main .profile-form>p {margin:0}
body.admin-body .dashboard-main .profile-form label {display:flex;flex-direction:column;gap:8px}
body.admin-body .dashboard-main .profile-form>button {justify-self:start}
@media(max-width:640px) {body.admin-body .dashboard-main :is(.overview-card,.settings-panel,.delivery-card){padding:16px} body.admin-body .dashboard-main .page-heading-row{align-items:flex-start} body.admin-body .dashboard-main .page-actions{width:100%}}
@media(prefers-reduced-motion:reduce) {body.admin-body .dashboard-main *,body.admin-body .dashboard-main *::before,body.admin-body .dashboard-main *::after {animation:none!important;transition:none!important;scroll-behavior:auto!important}}
/* Aurora marks legacy buttons !important. Confine the necessary overrides to
   admin content so every alias, including bare buttons, has one appearance. */
body.admin-body .dashboard-main :is(button,.btn,.primary-action,.secondary-action,.admin-button) {
  background:var(--admin-card-soft)!important;border:1px solid var(--admin-border)!important;
  color:var(--admin-text)!important;box-shadow:none!important;backdrop-filter:none;
  transition:background-color .15s,border-color .15s,box-shadow .15s!important;transform:none;
}
body.admin-body .dashboard-main :is(.primary-action,.btn-primary,.btn--primary,.admin-button--primary) {background:var(--admin-blue)!important;border-color:var(--admin-blue)!important;color:var(--brand-blue-fg)!important}
body.admin-body .dashboard-main :is(.btn-ghost,.btn--ghost,.admin-button--ghost,.btn-link,.danger-link) {background:transparent!important;border-color:transparent!important}
body.admin-body .dashboard-main .btn-link {color:var(--admin-blue)!important}
body.admin-body .dashboard-main :is(.btn-danger,.btn--danger) {background:var(--danger-bg)!important;border-color:var(--danger)!important;color:var(--danger)!important}
body.admin-body .dashboard-main .danger-link {color:var(--danger)!important}
body.admin-body .dashboard-main :is(.segmented-control,.theme-segmented,.ctv-viewtoggle,[role=tablist]) :is(button,a) {background:transparent!important;border-color:transparent!important}
body.admin-body .dashboard-main :is(.segmented-control,.theme-segmented,.ctv-viewtoggle,[role=tablist]) :is(.active,[aria-selected=true],[aria-pressed=true]) {background:var(--admin-card)!important;color:var(--admin-blue)!important;border-color:var(--admin-border)!important}
body.admin-body .dashboard-main :is(button,.btn,.primary-action,.secondary-action):focus-visible {box-shadow:var(--ui-focus)!important}
@media(prefers-reduced-motion:reduce) {body.admin-body .dashboard-main :is(button,.btn,.primary-action,.secondary-action) {transition:none!important}}
body.admin-body .dashboard-main .admin-check {display:flex;align-items:center;gap:8px;margin:8px 0}
body.admin-body .dashboard-main a.stat-card {color:var(--admin-text);text-decoration:none}
body.admin-body .dashboard-main .filter-row select {min-width:180px;flex:1}
/* Shared surfaces also supersede Aurora's important glass declarations. */
body.admin-body .dashboard-main :is(.overview-card,.settings-panel,.settings-card,.stat-card,.module-overview-card,.module-card,.home-panel,.home-tile,.form-card,.content-card,.component-card,.type-card,.action-card,.cms-setting-tile,.builder-card,.delivery-card,.admin-card,.panel) {
  background:var(--admin-card)!important;border:1px solid var(--admin-border)!important;
  border-radius:16px;box-shadow:none;backdrop-filter:none;
}
body.admin-body .dashboard-main :is(.data-table thead th,table.data-table th) {background:var(--admin-card-soft)!important;border-bottom-color:var(--admin-border)!important}
body.admin-body .dashboard-main :is(input,select,textarea):focus-visible {outline:2px solid var(--admin-blue)!important;border-color:var(--admin-blue)!important;box-shadow:var(--ui-focus)!important}
body.admin-body .dashboard-main :is(.badge-green,.status-pill--success,.msg-badge.ok,.msg-badge.delivered,.msg-badge.sent) {background:var(--success-bg);color:var(--success);border-color:color-mix(in srgb,var(--success) 30%,var(--admin-border))}
body.admin-body .dashboard-main :is(.badge-red,.status-pill--danger,.msg-badge.failed) {background:var(--danger-bg);color:var(--danger);border-color:color-mix(in srgb,var(--danger) 30%,var(--admin-border))}
body.admin-body .dashboard-main :is(.badge-yellow,.status-pill--warning,.msg-badge.queued) {background:var(--warning-bg);color:var(--warning);border-color:color-mix(in srgb,var(--warning) 30%,var(--admin-border))}

/* Deliveries/Transport section menus: one left-aligned row of tabs that wraps, not spread across the width. */
body.admin-body .dashboard-main .delivery-nav{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-start;align-items:center;margin-bottom:16px}
body.admin-body .dashboard-main .delivery-nav>*{flex:0 0 auto}

/* Wide workspaces keep their own size: the shared 640px dialog cap squeezed the Social composer. */
body.admin-body dialog.social-composer-dialog{width:min(1320px,94vw);max-width:94vw;max-height:92dvh;padding:24px}
@media(max-width:540px){body.admin-body dialog.social-composer-dialog{width:96vw;max-width:96vw;max-height:96dvh;padding:12px}}

/* Dialogs are solid: the glass card colour let the page show through the Social composer. */
body.admin-body :is(dialog,.modal-card,.modal-content){background:#11141f;box-shadow:0 30px 80px rgba(0,0,0,.55)}
[data-theme="light"] body.admin-body :is(dialog,.modal-card,.modal-content),
body.admin-body[data-theme="light"] :is(dialog,.modal-card,.modal-content){background:#ffffff;box-shadow:0 30px 80px rgba(15,23,42,.25)}
@media (prefers-color-scheme: light){:root:not([data-theme="dark"]) body.admin-body :is(dialog,.modal-card,.modal-content){background:#ffffff}}
body.admin-body dialog::backdrop{background:rgba(5,7,14,.72);backdrop-filter:blur(3px)}

body.admin-body .dashboard-main .record-media-panel {width:100%;min-height:360px;border:1px solid var(--admin-border);border-radius:12px;margin-block:16px;background:var(--admin-card)}
body.admin-body .dashboard-main .record-thumbnail {width:44px;height:44px;object-fit:contain;vertical-align:middle;margin-inline-end:8px}

/* Attachments panel on record pages. */
body.admin-body .dashboard-main iframe.record-media-panel{display:block;width:100%;min-height:220px;border:0;background:transparent;color-scheme:normal}
body.admin-body .dashboard-main .record-media-wrap{margin-bottom:20px}
body.admin-body .dashboard-main .record-media-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:8px}
body.admin-body .dashboard-main .record-media-head h3{margin:0}
body.admin-body dialog.admin-file-viewer{width:min(1100px,94vw);max-width:94vw;height:92dvh;padding:0;display:flex;flex-direction:column}
body.admin-body dialog.admin-file-viewer:not([open]){display:none}
body.admin-body .afv-bar{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 16px;border-bottom:1px solid var(--admin-border)}
body.admin-body .afv-body{flex:1;min-height:0;display:grid;place-items:center;padding:12px;overflow:auto}
body.admin-body .afv-body img{max-width:100%;max-height:100%;object-fit:contain}
body.admin-body .afv-body iframe{width:100%;height:100%;border:0;border-radius:8px;background:#fff}
/* Social composer like Business Suite: fixed-height window, the form column scrolls, the preview stays in view. */
body.admin-body dialog.social-composer-dialog[open]{display:flex;flex-direction:column;height:92dvh;overflow:hidden}
body.admin-body dialog.social-composer-dialog .social-compose-layout{flex:1;min-height:0;align-items:stretch;margin-top:8px}
body.admin-body dialog.social-composer-dialog .social-compose-layout>.settings-panel{overflow-y:auto;min-height:0;margin:0}
body.admin-body dialog.social-composer-dialog .social-compose-layout>.settings-panel>h3:first-child{display:none}
body.admin-body dialog.social-composer-dialog .social-preview-panel{position:static;overflow-y:auto;min-height:0;display:flex;flex-direction:column;align-items:center;padding:4px 8px}
body.admin-body dialog.social-composer-dialog .social-preview-panel>*{width:100%;max-width:460px}
@media(max-width:1000px){body.admin-body dialog.social-composer-dialog[open]{height:auto;max-height:96dvh;overflow:auto}
  body.admin-body dialog.social-composer-dialog .social-compose-layout>.settings-panel,body.admin-body dialog.social-composer-dialog .social-preview-panel{overflow:visible}}

/* Composer: compact chrome; the preview scales to the free height instead of leaving gaps above or below it. */
body.admin-body dialog.social-composer-dialog[open]{padding:14px 20px 18px}
body.admin-body dialog.social-composer-dialog>.social-label-row{margin:0 0 10px}
body.admin-body dialog.social-composer-dialog>.social-label-row h3{margin:0;font-size:18px}
body.admin-body dialog.social-composer-dialog .social-compose-layout{margin-top:0;gap:20px}
body.admin-body dialog.social-composer-dialog .social-compose-layout>.settings-panel{padding:16px 18px}
body.admin-body dialog.social-composer-dialog .social-compose-layout>.settings-panel>p:first-of-type{margin-top:0}
body.admin-body dialog.social-composer-dialog fieldset{margin:14px 0}
body.admin-body dialog.social-composer-dialog .social-choice{padding:10px 12px;gap:2px;position:relative}
body.admin-body dialog.social-composer-dialog .social-segments .social-choice input{position:absolute;opacity:0;pointer-events:none}
body.admin-body dialog.social-composer-dialog .social-segments .social-choice:has(input:focus-visible){outline:3px solid var(--admin-accent,#7c6cff);outline-offset:2px}
body.admin-body dialog.social-composer-dialog .social-segments .social-choice>span[aria-hidden]{font-size:18px;line-height:1}
body.admin-body dialog.social-composer-dialog .social-preview-panel{display:flex;flex-direction:column;align-items:stretch;gap:10px;padding:0;overflow:hidden}
body.admin-body dialog.social-composer-dialog .social-preview-panel>*{max-width:none}
.social-preview-toolbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.social-preview-toolbar h3{margin:0 auto 0 0;font-size:16px}
.social-preview-toolbar select{width:auto;min-height:36px;padding:6px 10px}
.social-preview-stage{flex:1;min-height:0;container-type:size;overflow:auto;display:flex;justify-content:center;align-items:flex-start}
.social-preview-stage>.social-preview{margin:0 auto;flex:none;width:clamp(350px,min(440px,100cqw,calc(100cqh - 150px)),440px);max-width:100%}
.social-preview-stage>.social-preview.preview-portrait{width:clamp(320px,min(440px,100cqw,calc((100cqh - 150px) * .8)),440px)}
.social-preview-stage .social-feed-actions{justify-content:space-between;padding:10px 14px;gap:6px}
.social-preview-stage .social-feed-actions span{white-space:nowrap}
.social-preview-stage :is(.preview-story,.preview-reel) .social-preview-visual{place-items:start center;padding-top:22%}
.social-preview-stage>.social-preview:is(.preview-story,.preview-reel){width:clamp(220px,min(380px,100cqw,calc(100cqh * 9 / 16)),380px)}
@media(max-width:1000px){body.admin-body dialog.social-composer-dialog .social-preview-panel{overflow:visible}.social-preview-stage{flex:none;container-type:normal;overflow:visible}.social-preview-stage>.social-preview{width:min(440px,100%)}.social-preview-stage>.social-preview:is(.preview-story,.preview-reel){width:min(340px,100%)}}

/* Team members and Messaging & Social access */
body.admin-body .member-cell{display:flex;align-items:center;gap:12px;min-width:220px}
body.admin-body .member-cell small{display:block;color:var(--admin-muted);font-size:12px;margin-top:2px}
body.admin-body .member-avatar,body.admin-body .access-avatar{flex:none;width:36px;height:36px;border-radius:50%;display:grid;place-items:center;font-weight:800;color:#fff;background:linear-gradient(135deg,var(--admin-accent,#6d5efc),#22b8cf)}
body.admin-body .member-role-form{display:flex;gap:8px;align-items:center;flex-wrap:nowrap}
body.admin-body .member-role-form select{min-width:120px}
body.admin-body .member-access{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
body.admin-body .member-access .badge{white-space:nowrap}
body.admin-body .member-muted{color:var(--admin-muted);font-size:13px}
body.admin-body .member-access-btn{padding:5px 12px;min-height:0;font-size:13px}
body.admin-body .access-page{display:grid;gap:18px;max-width:980px}
body.admin-body .access-back{color:var(--admin-muted);text-decoration:none;font-weight:600;font-size:14px}
body.admin-body .access-back:hover{color:var(--admin-text)}
body.admin-body .access-person{display:flex;align-items:center;gap:14px}
body.admin-body .access-person h2{margin:0;font-size:20px}
body.admin-body .access-person small{color:var(--admin-muted)}
body.admin-body .access-avatar{width:48px;height:48px;font-size:20px}
body.admin-body .access-form{display:grid;gap:18px}
body.admin-body .access-form .settings-panel{margin:0}
body.admin-body .access-form h3{margin:0 0 4px}
body.admin-body .access-hint{margin:0 0 16px;color:var(--admin-muted)}
body.admin-body .access-roles{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:12px}
body.admin-body .access-role{display:flex;gap:12px;align-items:flex-start;padding:16px;border:1.5px solid var(--admin-border);border-radius:14px;cursor:pointer;transition:border-color .15s,background .15s}
body.admin-body .access-role:hover{border-color:color-mix(in srgb,var(--admin-accent,#6d5efc) 50%,var(--admin-border))}
body.admin-body .access-role:has(input:checked){border-color:var(--admin-accent,#6d5efc);background:color-mix(in srgb,var(--admin-accent,#6d5efc) 8%,transparent)}
body.admin-body .access-role input,body.admin-body .access-toggle input{width:18px;height:18px;margin:2px 0 0;flex:none;accent-color:var(--admin-accent,#6d5efc)}
body.admin-body .access-role-body{display:grid;gap:4px;font-size:13.5px;color:var(--admin-muted)}
body.admin-body .access-role-body strong{color:var(--admin-text);font-size:15px}
body.admin-body .access-role-body ul{margin:6px 0 0;padding-inline-start:18px;display:grid;gap:2px;font-size:12.5px}
body.admin-body .access-toggle{display:flex;gap:12px;align-items:flex-start;margin-top:14px;cursor:pointer}
body.admin-body .access-toggle span{display:grid;gap:2px}
body.admin-body .access-toggle small{color:var(--admin-muted)}
body.admin-body .access-note{margin:0;padding:12px 14px;border-radius:12px;background:color-mix(in srgb,var(--admin-accent,#6d5efc) 8%,transparent)}
body.admin-body .access-note.is-ok{background:color-mix(in srgb,#22c55e 14%,transparent);color:var(--admin-text)}
body.admin-body .access-note.is-error{background:color-mix(in srgb,#ef4444 14%,transparent);color:var(--admin-text)}
body.admin-body .access-actions{display:flex;gap:10px;align-items:center}

/* Inbox: Mine / All / Unassigned as a segmented control (only shown to people who can see every inbox). */
body.admin-body .inbox-views{display:inline-flex;gap:4px;padding:4px;margin:0 0 16px;border:1px solid var(--admin-border);border-radius:12px;background:var(--admin-card)}
body.admin-body .inbox-views a{padding:7px 16px;border-radius:9px;color:var(--admin-muted);font-weight:650;font-size:14px;text-decoration:none}
body.admin-body .inbox-views a:hover{color:var(--admin-text)}
body.admin-body .inbox-views a[aria-current=page]{background:var(--admin-accent,#6d5efc);color:#fff}

/* Social planner: calendar days as cards, "+ Create post" as a quiet dashed button. */
body.admin-body .social-calendar{gap:8px;min-width:900px}
body.admin-body .social-weekday{padding:6px 10px;font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--admin-muted)}
body.admin-body .social-day{border:1px solid var(--admin-border);border-radius:12px;background:var(--admin-card);padding:10px;min-height:132px;display:flex;flex-direction:column;gap:6px}
body.admin-body .social-day time{font-size:13px;color:var(--admin-muted)}
body.admin-body .social-day.is-today{box-shadow:none;border-color:var(--admin-accent,#6d5efc)}
body.admin-body .social-day.is-today time{color:var(--admin-accent,#6d5efc)}
body.admin-body .social-slot{margin-top:auto;padding:6px 8px;border:1px dashed var(--admin-border);border-radius:8px;text-align:center;font-size:12px;font-weight:650;color:var(--admin-muted);text-decoration:none;opacity:.55;transition:opacity .15s,border-color .15s,color .15s}
body.admin-body .social-day:hover .social-slot,body.admin-body .social-slot:focus-visible{opacity:1}
body.admin-body .social-slot:hover{border-color:var(--admin-accent,#6d5efc);color:var(--admin-accent,#6d5efc)}
body.admin-body .social-calendar-chip{border-radius:8px;margin:0;align-items:center}
body.admin-body .social-calendar-chip img{border-radius:6px;flex:none}
body.admin-body .social-calendar-chip{flex-direction:column;align-items:stretch;gap:6px;padding:6px;font-size:12px;line-height:1.35}
body.admin-body .social-calendar-chip img{width:100%;height:72px;object-fit:cover}
body.admin-body .social-calendar-chip span{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}
body.admin-body .social-calendar-chip img{object-position:top}

/* Social content list: clickable thumbnails (video frames too) and a post viewer. */
body.admin-body .social-subtabs{margin:4px 0 14px}
body.admin-body .social-post-cell{display:flex;align-items:center;gap:12px;min-width:280px}
body.admin-body .social-post-cell small{display:block;margin-top:2px;color:var(--admin-muted);font-size:12px}
body.admin-body .social-thumb-button{position:relative;flex:none;padding:0;border:0;background:none;cursor:zoom-in;border-radius:8px;overflow:hidden}
body.admin-body .social-thumb-button .social-table-thumb{width:56px;height:56px;margin:0;object-fit:cover;display:block;border-radius:8px}
body.admin-body .social-thumb-play{position:absolute;inset:0;display:grid;place-items:center;color:#fff;font-size:16px;text-shadow:0 1px 6px #000;background:#0003}
body.admin-body .social-post-open{padding:0;border:0;background:none;color:var(--admin-text);font:inherit;font-weight:600;text-align:start;cursor:pointer;line-height:1.4}
body.admin-body .social-post-open:hover{color:var(--admin-accent,#6d5efc);text-decoration:underline}
body.admin-body dialog.social-viewer{width:min(1000px,94vw);max-width:94vw;max-height:92dvh;padding:0;border:1px solid var(--admin-border);border-radius:16px;background:var(--admin-card);color:var(--admin-text);overflow:hidden}
body.admin-body dialog.social-viewer::backdrop{background:#05070ecc}
body.admin-body .social-viewer-close{position:absolute;top:12px;right:12px;z-index:1}
body.admin-body .social-viewer-body{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(280px,1fr);max-height:92dvh}
body.admin-body .social-viewer-media{display:flex;gap:6px;overflow:auto;background:#000;align-items:center;justify-content:center;max-height:92dvh}
body.admin-body .social-viewer-media img,body.admin-body .social-viewer-media video{max-width:100%;max-height:88dvh;object-fit:contain;display:block}
body.admin-body .social-viewer-copy{padding:56px 22px 22px;overflow:auto;display:flex;flex-direction:column;gap:14px}
body.admin-body .social-viewer-copy p{margin:0;white-space:pre-wrap;line-height:1.55}
body.admin-body .social-viewer-meta{display:flex;gap:10px;align-items:center;flex-wrap:wrap;color:var(--admin-muted);font-size:13px}
@media(max-width:760px){body.admin-body .social-viewer-body{grid-template-columns:1fr}body.admin-body .social-viewer-media{max-height:55dvh}}
body.admin-body .social-best-hint{margin:6px 0 0;color:var(--admin-muted);font-size:13px;max-width:720px}
body.admin-body .social-best-time{display:block;margin-top:6px;font-size:12.5px;font-weight:650;color:var(--admin-accent,#6d5efc)}
