/* Member and operations backend: aligned header, one button system, one table and list system. Shared by member pages and legacy module pages. */
body.backend{--accent:#bc4f43;--accent-hover:#a3413a;--accent-soft:#fbefec;--accent-line:#f0d4cd;--accent-wash:#fdf8f6;--ink:#1f2329;--ink-2:#454c56;--muted:#6b7280;--line:#e6e8ec;--line-soft:#f0f1f4;--control:#dfe2e7;--danger:#b42318;--danger-soft:#fef3f2;--danger-line:#f6d0cb;--be-wrap:1660px;--be-gutter:24px}

/* Header shares the content width, so the logo and the account edge line up with the sidebar and the right rail. */
body.backend .backend-top{padding-left:max(var(--be-gutter),calc((100% - var(--be-wrap))/2 + var(--be-gutter)));padding-right:max(var(--be-gutter),calc((100% - var(--be-wrap))/2 + var(--be-gutter)))}
body.backend .backend-brand small{font-size:11px;letter-spacing:1.5px}
body.backend .backend-top nav{gap:26px;font-size:14px}
body.backend .backend-top nav a{opacity:.92;transition:opacity .15s,border-color .15s}
body.backend .backend-top nav a:hover{opacity:1;border-color:#f6d2c3}
body.backend .backend-top form{width:240px;border-radius:8px;box-shadow:0 1px 2px #6a1f1720}
body.backend .backend-top input{font-size:13px}
body.backend .backend-account{font-size:13px}
body.backend .backend-account small{font-size:11px}
body.backend .backend-announcement{font-size:13px;border-radius:10px}
body.backend .announcement-badge{font-size:11px}
body.backend .backend-location{font-size:12px;color:var(--muted)}
body.backend .backend-location>a{font-size:12px;color:var(--muted)}
body.backend .backend-location>a:hover{color:var(--accent)}

/* Sidebar menu */
body.backend .backend-sidebar{border-radius:12px;border-color:var(--line)}
body.backend .backend-home{font-size:14px}
body.backend .backend-group summary{font-size:13px;color:var(--ink)}
body.backend .backend-group a,body.backend .backend-group button{position:relative;padding:7px 12px 7px 26px;font-size:13px;color:var(--ink-2);transition:background-color .15s,color .15s}
body.backend .backend-group a.active{background:var(--accent-soft);color:var(--accent);font-weight:600}
body.backend .backend-group a.active:before{content:'';position:absolute;left:10px;top:50%;width:5px;height:5px;margin-top:-2.5px;border-radius:50%;background:var(--accent)}
body.backend .backend-group .menu-preview-label{font-size:11px}
body.backend .backend-menu-note{font-size:11px}

/* Surfaces */
body.backend .page-heading,body.backend .ops-panel,body.backend .ops-metrics>div,body.backend .ops-record,body.backend .workspace-layout>section,body.backend .workspace-rail,body.backend .workspace-shortcuts a,body.backend .panel,body.backend .list-panel,body.backend .tool-group,body.backend .crm-messages,body.backend #admin-engine .ae-panel{border-color:var(--line);border-radius:12px;box-shadow:0 1px 2px rgba(16,24,40,.04)}
body.backend .page-heading h1,body.backend #admin-engine h1{font:600 22px/1.45 var(--sans);color:var(--ink)}
body.backend .page-heading p{font-size:13px;color:var(--muted)}
body.backend .ops-panel h2,body.backend #admin-engine .ae-panel h2{font-size:16px;font-weight:600;color:var(--ink)}
body.backend .ops-metrics span{font-size:12px;color:var(--muted)}
body.backend .ops-metrics strong{font-variant-numeric:tabular-nums;color:var(--ink)}
body.backend .ops-notice,body.backend #admin-engine .ae-status{font-size:13px;border-radius:8px}

/* Buttons: solid only for the main action, white outline for everything else, red outline for destructive actions. */
body.backend .btn,body.backend #admin-engine button:not(.ae-dialog-close),body.backend .ops-tabs button,body.backend .ops-tabs a,body.backend .crm-filter button{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:34px;padding:6px 14px;border:1px solid var(--control);border-radius:8px;background:#fff;color:var(--ink-2);font:500 13px/1.3 var(--sans);white-space:nowrap;cursor:pointer;box-shadow:0 1px 1px rgba(16,24,40,.03);transition:background-color .15s,border-color .15s,color .15s,box-shadow .15s}
body.backend .btn:hover,body.backend #admin-engine button:not(.ae-dialog-close):hover,body.backend .ops-tabs button:hover,body.backend .ops-tabs a:hover,body.backend .crm-filter button:hover{background:#f8f9fa;border-color:#cdd1d8;color:var(--ink)}
body.backend .btn:active,body.backend #admin-engine button:not(.ae-dialog-close):active{transform:translateY(1px)}
body.backend .btn.primary,body.backend #admin-engine .ae-primary{background:var(--accent);border-color:var(--accent);color:#fff;box-shadow:0 1px 2px rgba(188,79,67,.25)}
body.backend .btn.primary:hover,body.backend #admin-engine .ae-primary:hover{background:var(--accent-hover);border-color:var(--accent-hover);color:#fff}
body.backend .btn.small,body.backend .ops-table button,body.backend #admin-engine td button,body.backend .crm-filter button{min-height:28px;padding:3px 10px;border-radius:7px;font-size:12px}
body.backend .btn[data-tone=danger],body.backend #admin-engine button[data-tone=danger]{color:var(--danger);border-color:var(--danger-line)}
body.backend .btn[data-tone=danger]:hover,body.backend #admin-engine button[data-tone=danger]:hover{background:var(--danger-soft);border-color:#eeb4ac;color:var(--danger)}
body.backend .btn:disabled,body.backend #admin-engine button:disabled{opacity:.5;cursor:not-allowed;transform:none}
body.backend .btn .ui-icon,body.backend #admin-engine button .ui-icon{width:15px;height:15px;flex-shrink:0;stroke-width:1.8;opacity:.85}
body.backend .btn.small .ui-icon,body.backend .ops-table button .ui-icon,body.backend #admin-engine td button .ui-icon{width:13px;height:13px}
body.backend .btn.primary .ui-icon,body.backend #admin-engine .ae-primary .ui-icon{opacity:1}
body.backend .post-actions .btn{min-height:0;padding:2px 0;border:0;background:transparent;box-shadow:none;font-size:12px;color:var(--muted)}
body.backend .post-actions .btn:hover{background:transparent;color:var(--accent)}
body.backend #admin-engine .ae-dialog-close{border:0;background:transparent;font-size:22px;color:var(--muted);cursor:pointer}
body.backend .btn.backend-menu-toggle{display:none}

/* Segmented filters and tabs: state is shown with a soft tint, never a solid fill. */
body.backend .ops-tabs,body.backend .crm-filter{gap:6px}
body.backend .ops-tabs button,body.backend .ops-tabs a,body.backend .crm-filter button,body.backend .btn[aria-pressed]{border-radius:999px;padding-left:14px;padding-right:14px}
body.backend .ops-tabs button.active,body.backend .ops-tabs a.active,body.backend .crm-filter button.active,body.backend .btn[aria-pressed=true]{background:var(--accent-soft);border-color:var(--accent-line);color:var(--accent);font-weight:600;box-shadow:none}

/* Form controls */
body.backend .ops-toolbar input,body.backend .ops-toolbar select,body.backend .ops-panel input:not([type=checkbox]):not([type=radio]),body.backend .ops-panel select,body.backend .ops-panel textarea,body.backend .ops-dialog input,body.backend .ops-dialog select,body.backend .ops-dialog textarea,body.backend .crm-inbox input,body.backend .crm-inbox select,body.backend .crm-compose textarea,body.backend .crm-compose select,body.backend #admin-engine input:not([type=checkbox]):not([type=radio]),body.backend #admin-engine select,body.backend #admin-engine textarea,body.backend .field input,body.backend .field select,body.backend .field textarea{min-height:34px;padding:6px 11px;border:1px solid var(--control);border-radius:8px;background:#fff;color:var(--ink);font-size:13px;transition:border-color .15s,box-shadow .15s}
body.backend .ops-panel textarea,body.backend #admin-engine textarea,body.backend .crm-compose textarea,body.backend .field textarea{padding:9px 11px;line-height:1.7}
body.backend input:focus,body.backend select:focus,body.backend textarea:focus{outline:none;border-color:#d99a8e;box-shadow:0 0 0 3px rgba(188,79,67,.12)}
body.backend input[type=checkbox],body.backend input[type=radio]{width:16px;height:16px;accent-color:var(--accent);cursor:pointer}
body.backend .ops-toolbar,body.backend #admin-engine .ae-toolbar{gap:8px}
body.backend .ops-field,body.backend #admin-engine label{font-size:13px;color:var(--ink-2)}

/* Tables */
body.backend .ops-table-wrap,body.backend #admin-engine .ae-scroll{border:1px solid var(--line);border-radius:10px;background:#fff;overflow:auto}
body.backend .ops-table,body.backend #admin-engine table{width:100%;border-collapse:separate;border-spacing:0;font-size:13px;font-variant-numeric:tabular-nums;color:var(--ink)}
body.backend .ops-table th,body.backend #admin-engine th{padding:11px 14px;background:#f8f9fb;border-bottom:1px solid var(--line);color:#5f6672;font-size:12px;font-weight:600;text-align:left;white-space:nowrap}
body.backend .ops-table td,body.backend #admin-engine td{padding:12px 14px;border-bottom:1px solid var(--line-soft);vertical-align:middle}
body.backend .ops-table tbody tr:last-child td,body.backend #admin-engine tbody tr:last-child td{border-bottom:0}
body.backend .ops-table tbody tr,body.backend #admin-engine tbody tr{transition:background-color .12s}
body.backend .ops-table tbody tr:hover,body.backend #admin-engine tbody tr:hover{background:var(--accent-wash)}
body.backend .ops-table tbody tr:has(input[type=checkbox]:checked),body.backend #admin-engine tbody tr:has(input[type=checkbox]:checked){background:#fdf1ee}
body.backend .ops-table th:first-child,body.backend .ops-table td:first-child,body.backend #admin-engine th:first-child,body.backend #admin-engine td:first-child{padding-left:18px}
body.backend .ops-table th:last-child,body.backend .ops-table td:last-child,body.backend #admin-engine th:last-child,body.backend #admin-engine td:last-child{padding-right:18px}
body.backend .ops-table td strong{font-size:13px;font-weight:600;color:var(--ink)}
body.backend .ops-table small{font-size:12px;color:var(--muted)}
body.backend .ops-table td .btn+.btn,body.backend .ops-table td button+button,body.backend #admin-engine td button+button{margin-left:6px}
body.backend .ops-table a,body.backend #admin-engine td a{color:var(--accent)}
body.backend .crm-table-name{color:var(--accent);font-weight:600}

/* Lists */
body.backend .list-line,body.backend .crm-line{padding:13px 0;border-bottom:1px solid var(--line-soft);font-size:13px}
body.backend .list-line:last-child,body.backend .crm-line:last-child{border-bottom:0}
body.backend .crm-line strong{font-size:14px;font-weight:600}
body.backend .ops-record{padding:18px 20px;transition:border-color .15s,box-shadow .15s}
body.backend .ops-record:hover{border-color:#dcdfe5;box-shadow:0 4px 14px rgba(16,24,40,.06)}
body.backend .ops-record h3{font-size:15px;font-weight:600}
body.backend .crm-thread{padding:14px 16px;font-size:13px;transition:background-color .12s}
body.backend .crm-thread:hover{background:#f6f7f9}
body.backend .crm-thread.active{background:var(--accent-soft);border-left-color:var(--accent)}
body.backend .crm-badge,body.backend .tag{font-size:12px;border-radius:999px;padding:1px 8px}
body.backend .ops-empty,body.backend .crm-empty{color:var(--muted);font-size:13px}
body.backend .daily-step{font-size:13px;padding:12px 0;border-color:var(--line-soft)}
body.backend .daily-step strong{font-size:13px}
body.backend .daily-step small{font-size:12px;color:var(--muted)}
body.backend .workspace-shortcuts a{font-size:13px;transition:border-color .15s,box-shadow .15s}
body.backend .workspace-shortcuts a:hover{background:#fff;border-color:var(--accent-line);box-shadow:0 4px 14px rgba(16,24,40,.06)}
body.backend .workspace-shortcuts svg{color:var(--accent)}
body.backend .post-head small,body.backend .post-head time,body.backend .member-heading small,body.backend .member-numbers small,body.backend .support-note p,body.backend .promotion-composer>div>span{font-size:12px}
body.backend .post-head strong,body.backend .member-heading strong{font-size:13px}
body.backend .post-tags span{font-size:12px}
body.backend .promotion-post p{font-size:13px}
body.backend .promotion-composer textarea{font-size:13px}
body.backend .rail-section h2{font-size:13px}
body.backend .feed-tabs button{font-size:14px}
body.backend .tool-link{font-size:13px;color:var(--ink-2)}
body.backend .tool-link:hover{background:var(--accent-wash);color:var(--accent)}
body.backend .global-footer{font-size:12px}

@media(max-width:1250px){body.backend{--be-gutter:16px}body.backend .backend-top nav{gap:16px;font-size:13px}body.backend .backend-top form{width:180px}}
@media(max-width:650px){body.backend{--be-gutter:12px}.demo-enhanced body.backend .btn.backend-menu-toggle{display:flex;justify-content:space-between;width:100%;margin-bottom:12px}body.backend .backend-top nav a{font-size:12px}body.backend .ops-table th,body.backend .ops-table td,body.backend #admin-engine th,body.backend #admin-engine td{padding:10px 12px}}
@media(prefers-reduced-motion:reduce){body.backend .btn:active,body.backend #admin-engine button:active{transform:none}}
