/* G3B74: self-hosted webfonts. No external CDN at runtime - the woff2 files are
   served by the BFF from /fonts/. Inter carries Latin, Noto Sans Bengali carries
   Bengali; unicode-range lets the browser fetch only the subsets a page needs. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Noto Sans Bengali';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/notosansbengali-bengali.woff2') format('woff2');
  unicode-range: U+0951-0952, U+0964-0965, U+0980-09FE, U+1CD0, U+1CD2, U+1CD5-1CD6, U+1CD8, U+1CE1, U+1CEA, U+1CED, U+1CF2, U+1CF5-1CF7, U+200C-200D, U+20B9, U+25CC, U+A8F1;
}
@font-face {
  font-family: 'Noto Sans Bengali';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/notosansbengali-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Noto Sans Bengali';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/notosansbengali-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Noto Sans Bengali';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/notosansbengali-bengali.woff2') format('woff2');
  unicode-range: U+0951-0952, U+0964-0965, U+0980-09FE, U+1CD0, U+1CD2, U+1CD5-1CD6, U+1CD8, U+1CE1, U+1CEA, U+1CED, U+1CF2, U+1CF5-1CF7, U+200C-200D, U+20B9, U+25CC, U+A8F1;
}
@font-face {
  font-family: 'Noto Sans Bengali';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/notosansbengali-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Noto Sans Bengali';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/notosansbengali-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root{font-family:Inter,'Noto Sans Bengali','Nirmala UI',ui-sans-serif,system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;color:#202631;background:#f5f6f8;color-scheme:light;--brand:#334155;--brand-dark:#111827;--brand-soft:#eef2f6;--line:#dde1e7;--muted:#667085;--warn:#a65f00;--warn-soft:#fff4dc;--danger:#b3261e;--danger-soft:#fdebea;--facebook:#1877f2;--youtube:#ff0033;--shadow:0 8px 24px rgba(15,23,42,.06)}
*{box-sizing:border-box}body{margin:0;min-height:100vh;background:var(--background,#f5f6f8)}main{max-width:1240px;margin:auto;padding:32px}.card,.login-card{background:#fff;border:1px solid var(--line);border-radius:14px;padding:22px;margin:16px 0;box-shadow:var(--shadow)}.narrow{max-width:460px;margin:9vh auto}.login-card{padding:38px}.brand-mark{display:grid;place-items:center;width:52px;height:52px;border-radius:13px;background:#1f2937;color:#fff;font-weight:800;letter-spacing:-.04em;box-shadow:0 6px 14px #11182726}.brand-mark.small{width:42px;height:42px;border-radius:10px}.brand-lockup,.header-actions,.account-head,.card-heading,.metric-top,.automation-summary{display:flex;align-items:center;gap:12px}.brand-lockup p{margin:2px 0}.header-actions{justify-content:flex-end;flex-wrap:wrap}header{display:flex;justify-content:space-between;align-items:center;padding:8px 0 4px}h1,h2,h3{margin:.2em 0;letter-spacing:-.025em}h1{font-size:1.75rem}h2{font-size:1.5rem}p{color:var(--muted);line-height:1.5}.eyebrow{text-transform:uppercase;letter-spacing:.12em;color:#667085;font-size:.75rem;font-weight:800;margin:18px 0 5px}nav{display:flex;gap:6px;flex-wrap:wrap;margin:25px 0 10px;padding:5px;background:#e9ecf0;border-radius:10px;width:max-content;max-width:100%}button{border:1px solid transparent;border-radius:8px;padding:10px 14px;background:#1f2937;color:white;font:inherit;font-weight:700;cursor:pointer;transition:.15s ease}button:hover{filter:brightness(.96);transform:translateY(-1px)}button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #93b4e8;outline-offset:2px}nav button{background:transparent;color:#475467}nav button.active{background:#fff;color:#101828;box-shadow:0 2px 7px #10182818}.sign-out,.secondary{background:#fff;border-color:#cfd4dc;color:#344054}.primary.wide{width:100%;margin-top:10px;background:#1f2937}.icon-button{position:absolute;right:5px;top:5px;padding:7px;background:transparent;color:#475467}.icon-button svg{display:block;width:20px;height:20px;fill:currentColor}.password-field{position:relative;display:block}.password-field input{width:100%;padding-right:48px}button:disabled{opacity:.55;cursor:not-allowed}label{display:grid;gap:7px;margin:15px 0;font-weight:700}input,textarea,select{font:inherit;padding:11px 12px;border:1px solid #c8ced7;border-radius:8px;background:#fff;color:#202631;max-width:100%}textarea{min-height:90px;width:100%}.security-note{font-size:.82rem;text-align:center;margin:20px 0 0}.security-note span{color:#1877f2}.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px}.metric{margin:0;min-height:150px;display:flex;flex-direction:column}.metric-top{justify-content:space-between}.metric strong{font-size:2.1rem;display:block;margin:auto 0 2px}.metric small{color:var(--muted)}.metric.warning{border-color:#efc77c}.metric.healthy{border-top:3px solid #b8c1cc}.state-card{margin-top:20px}.state-list{display:grid;gap:0}.state-row{display:grid;grid-template-columns:minmax(140px,1fr) auto minmax(220px,2fr);align-items:center;gap:14px;padding:13px 0;border-bottom:1px solid var(--line)}.state-row:last-child{border:0}.notice{min-height:1.5em;padding:8px 0}.notice:not(:empty){padding:10px 14px;background:#eef4ff;border-radius:8px}.notice.error{background:var(--danger-soft)}.error{color:var(--danger)}.health{display:flex;align-items:center;gap:7px;padding:7px 10px;border-radius:99px;background:#fff;border:1px solid var(--line);color:#344054;font-size:.85rem;font-weight:750}.health span{width:9px;height:9px;border-radius:50%;background:#98a2b3}.health-good span{background:#26845b}.health-warning span{background:#e18a00}.table-wrap{overflow:auto;max-width:100%;border:1px solid var(--line);border-radius:12px;background:#fff}table{width:100%;border-collapse:separate;border-spacing:0}th,td{text-align:left;padding:13px 12px;border-bottom:1px solid var(--line);vertical-align:top}tbody tr:last-child td{border-bottom:0}tbody tr:hover{background:#fafbfc}th{position:sticky;top:0;z-index:1;font-size:.75rem;text-transform:uppercase;letter-spacing:.05em;color:#596273;background:#f7f8fa}.cell-preview{min-width:160px;max-width:260px;line-height:1.45}.pill{display:inline-flex;align-items:center;border-radius:99px;padding:4px 9px;background:#eef0f3;color:#475467;font-size:.78rem;font-weight:750;text-transform:capitalize;white-space:nowrap}.pill.success{background:#e9f4ef;color:#216748}.pill.warning{background:var(--warn-soft);color:#7d4900}.pill.danger{background:var(--danger-soft);color:#92221c}.pill.facebook{background:#e7f1ff;color:#0b5bc5}.pill.youtube{background:#ffe8ed;color:#c70028}.control-card{padding:4px 22px 8px}.card-heading{justify-content:space-between;padding:16px 0}.control{display:flex;justify-content:space-between;align-items:center;gap:20px;border-top:1px solid var(--line);padding:16px 0}.control-action{display:flex;align-items:center;gap:10px}.toggle{display:block;position:relative;width:48px;height:28px;margin:0}.toggle input{position:absolute;opacity:0}.toggle-track{display:block;width:100%;height:100%;border-radius:99px;background:#b9c0ca;transition:.2s}.toggle-track:after{content:'';position:absolute;width:22px;height:22px;left:3px;top:3px;border-radius:50%;background:#fff;box-shadow:0 2px 5px #0003;transition:.2s}.toggle input:checked+.toggle-track{background:#426b9b}.toggle input:checked+.toggle-track:after{transform:translateX(20px)}.toggle input:focus-visible+.toggle-track{outline:3px solid #93b4e8;outline-offset:2px}.limit-input{width:130px}.actions{display:flex;gap:6px;flex-wrap:wrap}.actions button,.modal-actions button{padding:8px 11px;font-size:.84rem}.action-edit{background:#fff;border-color:#b9c1cc;color:#344054}.action-reject,.danger{background:var(--danger)}.action-escalate{background:var(--warn)}.link-button{background:transparent;color:#175cd3;border-color:#b2ccff;padding:7px 10px}.filters{display:flex;align-items:end;gap:10px;margin:16px 0;flex-wrap:wrap}.filters>input{min-width:250px}.compact-label{font-size:.78rem;margin:0;gap:4px}.pagination{display:flex;justify-content:space-between;align-items:center;gap:16px;margin:12px 0;color:var(--muted);font-size:.88rem}.pagination-controls{display:flex;align-items:center;gap:8px}.pagination button{padding:7px 10px}.pagination select{padding:7px}.page-current{white-space:nowrap}code{font-family:ui-monospace,monospace;font-size:.78rem;white-space:pre-wrap;color:#455249}.empty-state{padding:40px;text-align:center;background:#fff;border:1px dashed #b8c0ca;border-radius:12px;color:var(--muted)}.account-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:16px}.account-card{margin:0;border-top:4px solid #98a2b3}.account-card.platform-border-facebook{border-top-color:var(--facebook)}.account-card.platform-border-youtube{border-top-color:var(--youtube)}.account-head{justify-content:space-between;align-items:flex-start}.account-details{display:grid;grid-template-columns:110px 1fr;gap:7px;margin:18px 0}.account-details dt{color:var(--muted);font-size:.85rem}.account-details dd{margin:0;font-size:.9rem}.automation-summary{flex-wrap:wrap;padding-top:14px;border-top:1px solid var(--line)}.muted{color:var(--muted);font-size:.9rem}.loading{padding:40px;text-align:center}.modal[hidden]{display:none}.modal{position:fixed;inset:0;z-index:20;display:flex;justify-content:flex-end}.modal-backdrop{position:absolute;inset:0;width:100%;height:100%;border:0;border-radius:0;background:#10182880}.modal-panel{position:relative;width:min(560px,92vw);height:100%;overflow:auto;background:#fff;padding:28px;box-shadow:-20px 0 50px #10182830}.modal-panel>header{border-bottom:1px solid var(--line);padding-bottom:16px}.modal-close{background:transparent;color:#475467;font-size:1.6rem;padding:5px 10px}.modal-actions{display:flex;justify-content:flex-end;gap:8px;padding-top:18px;border-top:1px solid var(--line)}.detail-stack section{padding:12px 0;border-bottom:1px solid var(--line)}.detail-stack p{white-space:pre-wrap}.health-row{display:grid;grid-template-columns:auto 1fr auto auto;align-items:center;gap:12px;padding:14px 0;border-bottom:1px solid var(--line)}.health-row p{margin:3px 0}.callout{padding:12px;border-radius:8px}.callout.warning{background:var(--warn-soft)}
@media(max-width:800px){main{padding:16px}.login-card{padding:25px}header{align-items:flex-start;gap:14px}.header-actions{align-items:flex-end}.state-row{grid-template-columns:1fr auto}.state-row small{grid-column:1/-1}.control{align-items:flex-start;flex-direction:column}.control-action{width:100%;justify-content:space-between}.filters{align-items:stretch}.filters input,.filters select{min-width:0;width:100%}.pagination{align-items:flex-start;flex-direction:column}.pagination-controls{width:100%;flex-wrap:wrap}.health-row{grid-template-columns:auto 1fr auto}.health-row .link-button{grid-column:2/-1;width:max-content}th,td{padding:10px}}
.section-heading{display:flex;align-items:end;justify-content:space-between;gap:20px}.metric.interactive{cursor:pointer;transition:transform .15s ease,box-shadow .15s ease,border-color .15s ease}.metric.interactive:hover,.metric.interactive:focus-visible{transform:translateY(-2px);box-shadow:0 12px 28px rgba(15,23,42,.1);border-color:#9aa7b8;outline:none}.metric-top>span:first-child{font-weight:750;color:#344054}.actions.approval-actions{display:grid;grid-template-columns:repeat(2,minmax(88px,1fr));min-width:190px}.approval-actions button{min-width:88px;min-height:36px;display:inline-flex;align-items:center;justify-content:center}.approval-actions .link-button{grid-column:1/-1}.action-approve{background:#287653}.action-reject{background:#b3261e}.action-escalate{background:#a65f00}.is-loading{position:relative;cursor:wait;opacity:.78}.filters{padding:14px;background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:0 3px 10px rgba(15,23,42,.03)}.filters select,.filters input{min-height:42px}.table-wrap{box-shadow:0 3px 12px rgba(15,23,42,.035)}tbody tr:nth-child(even){background:#fcfcfd}td{line-height:1.45}.pagination{padding:7px 2px}.pagination:first-child{border-bottom:1px solid var(--line);padding-bottom:12px}.pagination:last-child{border-top:1px solid var(--line);padding-top:12px}.control-group>.eyebrow{margin-top:28px}.control-group .control-card{margin-top:8px}.scope-source{margin:5px 0 0;font-size:.85rem}.modal-panel{width:min(620px,94vw)}.modal-panel>header{position:sticky;top:-28px;z-index:3;background:#fff;padding-top:28px}.modal-actions{position:sticky;bottom:-28px;background:#fff;padding-bottom:28px;flex-wrap:wrap}.detail-stack section h3{font-size:.78rem;text-transform:uppercase;letter-spacing:.06em;color:#667085}.detail-stack section p{color:#202631;margin:.45rem 0;line-height:1.65}.health-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:18px 0}.health-summary .metric{min-height:125px;padding:16px}.health-summary .metric strong{font-size:1.7rem}.automation-summary>strong{width:100%;font-size:.85rem}.login-card form{margin-top:24px}.login-card>p{margin-top:6px}.login-card .error{min-height:1.5em;padding:0}.login-card .error:not(:empty){padding:10px 12px;background:var(--danger-soft);border-radius:8px}.login-card input{width:100%}
@media(max-width:1024px){main{max-width:100%;padding:24px}.grid.metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.account-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.table-wrap{overflow-x:auto}.table-wrap table{min-width:780px}}
@media(max-width:700px){main{padding:14px;overflow-x:hidden}.grid.metrics,.account-grid,.health-summary{grid-template-columns:1fr}.header-actions{max-width:52%}.actions.approval-actions{grid-template-columns:1fr;min-width:110px}.approval-actions .link-button{grid-column:auto}.modal-panel{width:96vw;padding:20px}.modal-panel>header{top:-20px;padding-top:20px}.modal-actions{bottom:-20px;padding-bottom:20px}.pagination-controls select{width:100%}.pagination-controls{display:grid;grid-template-columns:1fr 1fr}.page-current{grid-column:1/-1;grid-row:1;text-align:left}.health-row{grid-template-columns:auto 1fr auto}.login-card.narrow{margin:4vh auto}}
.approval-form label{margin:18px 0}.approval-form textarea{min-height:150px;resize:vertical;line-height:1.55}.approval-form .form-error{min-height:1.5em;margin:8px 0}.approval-form .callout{color:#6f4500}
.toast{position:fixed;right:24px;bottom:24px;z-index:50;max-width:min(360px,calc(100vw - 32px));padding:11px 15px;border-radius:10px;background:#1f2937;color:#fff;font-size:.9rem;font-weight:700;box-shadow:0 12px 30px rgba(15,23,42,.22);opacity:0;transform:translateY(10px);pointer-events:none;transition:opacity .18s ease,transform .18s ease}.toast.visible{opacity:1;transform:translateY(0)}.toast.error{background:var(--danger)}
@media(max-width:700px){.toast{right:16px;bottom:16px;left:16px;max-width:none}}
.approval-counts{display:flex;gap:12px;flex-wrap:wrap;margin:18px 0}.approval-count{display:flex;align-items:baseline;gap:8px;min-width:180px;padding:13px 16px;border:1px solid var(--line);border-radius:10px;background:#fff}.approval-count strong{font-size:1.35rem}.approval-count span{color:var(--muted);font-size:.88rem}.approval-tabs{display:flex;gap:5px;overflow-x:auto;margin:18px 0;padding:5px;border-radius:10px;background:#e9ecf0}.approval-tab{display:flex;align-items:center;gap:7px;flex:0 0 auto;background:transparent;color:#475467}.approval-tab.active{background:#fff;color:#101828;box-shadow:0 2px 7px #10182818}.tab-count{display:inline-grid;place-items:center;min-width:22px;height:22px;padding:0 6px;border-radius:99px;background:#dfe3e8;color:#475467;font-size:.75rem}.approval-tab.active .tab-count{background:#e8eef7;color:#284e7d}
.account-toolbar{display:flex;justify-content:space-between;align-items:flex-end;gap:20px;flex-wrap:wrap}.facebook-connect{background:#1769c2}.youtube-connect{background:#c5222d}.account-actions{padding-top:14px;border-top:1px solid var(--line)}.readiness-list{display:grid;gap:8px}.readiness-row{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:9px 0;border-bottom:1px solid var(--line)}.readiness-row:last-child{border-bottom:0}

/* Isolated Facebook sandbox tenant: an explicit, separately credentialed operator route.
   The badge must stay visually distinct from production chrome so an operator can never
   mistake which tenant they are acting in. */
.sandbox-entry{margin-top:1rem;padding-top:1rem;border-top:1px solid rgba(148,163,184,.25)}
.sandbox-hint{margin:.5rem 0 0;font-size:.78rem;line-height:1.4;color:#64748b}
/* [hidden] only works through the UA-equivalent rule `[hidden]{display:none}` earlier in this
   sheet. That selector and `.sandbox-badge` have identical (0,1,0) specificity, so source order
   alone would let the display rule below win and the badge would render for every session.
   Pair the display rule with a (0,2,0) [hidden] override, exactly as .modal[hidden] does. */
.sandbox-badge[hidden]{display:none}
.sandbox-badge{display:inline-flex;align-items:center;gap:.4rem;padding:.3rem .7rem;border-radius:999px;
  font-size:.75rem;font-weight:600;letter-spacing:.02em;text-transform:uppercase;
  color:#92400e;background:#fef3c7;border:1px solid #f59e0b}
body.sandbox-session #dashboard>header{box-shadow:inset 0 -3px 0 #f59e0b}

/* G3B74: Bengali conjuncts and matras need more vertical room than Latin. */
:lang(bn),[lang='bn']{line-height:1.75}
.cell-preview,.detail-stack p,.approval-form textarea{line-height:1.7}
.action-execute{grid-column:1/-1;background:#1769c2}.action-execute:disabled{background:#8fa8c4}

/* G3B76: Approvals cards — one card per review, built for phone review. */
.approval-toolbar{display:flex;align-items:end;justify-content:space-between;gap:14px;flex-wrap:wrap}
.approval-live{display:inline-flex;align-items:center;gap:7px;color:var(--muted);font-size:.82rem;font-weight:650}
.approval-live:before{content:'';width:8px;height:8px;border-radius:50%;background:#26845b;animation:approval-pulse 2s ease-in-out infinite}
@keyframes approval-pulse{0%,100%{opacity:1}50%{opacity:.25}}
.approval-list{display:grid;gap:16px;margin:16px 0}
.approval-card{margin:0;display:grid;gap:12px;border-left:4px solid #b8c1cc}
.approval-card.approval-new{border-left-color:#e18a00;animation:approval-enter .5s ease}
@keyframes approval-enter{from{background:#fff8e8;transform:translateY(-4px)}to{background:#fff;transform:none}}
.approval-card-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;flex-wrap:wrap}
.approval-source{display:flex;align-items:center;gap:9px;flex-wrap:wrap;min-width:0}
.approval-source strong{font-size:1rem;overflow-wrap:anywhere}
/* G3B95-B: the commenter's name and photo. The name is the heading of the card; the page
   and the time move to a quieter line beneath it. */
.approval-who{display:flex;flex-direction:column;gap:2px;min-width:0}
.approval-context{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:.82rem}
.avatar{position:relative;flex:0 0 auto;width:38px;height:38px;border-radius:50%;overflow:hidden;
  display:inline-flex;align-items:center;justify-content:center;
  color:#fff;font-weight:700;font-size:.82rem;letter-spacing:.02em;line-height:1;
  background:#667085;user-select:none}
/* The photo sits ON TOP of the initials, so removing it on an image error uncovers them
   again with no second render. */
.avatar img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;background:inherit}
.approval-card-state{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.approval-comment{background:#f7f8fa;border:1px solid var(--line);border-radius:10px;padding:12px 14px}
.approval-comment h4{margin:0 0 6px;font-size:.72rem;text-transform:uppercase;letter-spacing:.07em;color:#667085}
.approval-comment p{margin:0;color:#202631;line-height:1.7;overflow-wrap:anywhere}
.analysis-chips{display:flex;gap:7px;flex-wrap:wrap}
.chip{display:inline-flex;align-items:center;border-radius:8px;padding:4px 10px;font-size:.78rem;font-weight:700;background:#eef0f3;color:#475467;text-transform:capitalize;white-space:nowrap}
.chip-intent{background:#e8eef7;color:#284e7d}
.chip-conf{background:#eef2f6;color:#475467}
.chip-decision{background:#f2eefb;color:#5b3f9e}
.chip-risk.risk-low{background:#e9f4ef;color:#216748}
.chip-risk.risk-medium{background:var(--warn-soft);color:#7d4900}
.chip-risk.risk-high,.chip-risk.risk-critical{background:var(--danger-soft);color:#92221c}
.approval-reply,.approval-reason{margin:0;gap:6px;font-size:.78rem;text-transform:uppercase;letter-spacing:.05em;color:#667085;font-weight:800}
.approval-reply textarea{min-height:110px;line-height:1.75;font-size:.95rem;text-transform:none;letter-spacing:normal;color:#202631;font-weight:400}
.approval-reason input{text-transform:none;letter-spacing:normal;color:#202631;font-weight:400}
.approval-card .form-error{margin:0;min-height:0}
.approval-card .form-error:empty{display:none}
/* G3B77 item 4 — the moderation chip and the Hide action. */
.chip-moderation{background:var(--danger-soft);color:#92221c;text-transform:capitalize}
.approval-cta .action-hide{background:#8a2b24;color:#fff;min-height:44px;padding:11px 18px}
.approval-cta .action-hide:hover{background:#73211b}
/* G3B77 item 2 — the automatic reply policy card. */
.auto-reply-card{display:grid;gap:14px;border-left:4px solid #e18a00}
.auto-reply-intents{border:1px solid var(--line);border-radius:10px;padding:12px 14px;margin:0;display:grid;gap:8px}
.auto-reply-intents legend{font-size:.72rem;text-transform:uppercase;letter-spacing:.07em;color:#667085;font-weight:800;padding:0 4px}
.auto-reply-intent{display:grid;grid-template-columns:auto 1fr;gap:4px 10px;align-items:center;margin:0;cursor:pointer}
.auto-reply-intent input{grid-row:span 2;width:18px;height:18px;min-height:0}
.auto-reply-intent-label{font-weight:700;color:#202631}
.auto-reply-intent small{grid-column:2;color:#667085}
.auto-reply-card .limit-input{max-width:140px}
.auto-reply-card .form-error:empty{display:none}
/* G3B77 item 1 — Published history cards. Read-only: no textarea, no buttons. */
.published-card{border-left-color:#287653}
.published-reply{background:#eef4f0;border:1px solid #cfe1d6;border-radius:10px;padding:12px 14px}
.published-reply h4{margin:0 0 6px;font-size:.72rem;text-transform:uppercase;letter-spacing:.07em;color:#3d6b54}
.published-reply p{margin:0;color:#1b3a2b;line-height:1.7;overflow-wrap:anywhere}
.published-meta{display:grid;grid-template-columns:auto 1fr;gap:4px 14px;margin:0;font-size:.85rem}
.published-meta dt{color:#667085;font-weight:700}
.published-meta dd{margin:0;color:#202631;overflow-wrap:anywhere}
.published-link{color:#1d4ed8;text-decoration:underline}
@media(max-width:700px){.published-meta{grid-template-columns:1fr;gap:2px}.published-meta dd{margin-bottom:6px}}
.approval-cta{display:flex;gap:9px;flex-wrap:wrap;align-items:center}
.action-approve-publish{background:#287653;min-height:44px;padding:11px 18px;flex:1 1 auto}
.approval-cta .action-reject{min-height:44px;padding:11px 18px}
.approval-cta .link-button{margin-left:auto}
@media(max-width:700px){
  .approval-card{padding:16px}
  .approval-card-head{flex-direction:column;gap:8px}
  .approval-cta{flex-direction:column;align-items:stretch}
  .approval-cta button{width:100%}
  .approval-cta .link-button{margin-left:0}
  .approval-toolbar{flex-direction:column;align-items:stretch}
  .approval-toolbar select{width:100%}
}

/* G3B83 — AI Agent section. Mobile first: the operator writes these prompts on a phone,
   in Bengali, so the textarea gets a real line-height, the self-hosted Bengali face, and
   enough height to see a paragraph without scrolling. */
.agent-card{display:flex;flex-direction:column;gap:.75rem}
.agent-field{display:flex;flex-direction:column;gap:.35rem;font-weight:600}
.agent-textarea{
  width:100%;box-sizing:border-box;min-height:14rem;padding:.85rem .9rem;
  font-family:'Noto Sans Bengali','Inter',system-ui,sans-serif;
  font-size:1.02rem;line-height:1.85;font-weight:400;
  border:1px solid var(--border);border-radius:12px;background:var(--surface);color:var(--text);
  resize:vertical;
}
.agent-textarea:focus{outline:2px solid var(--accent);outline-offset:1px}
.agent-reason{
  width:100%;box-sizing:border-box;padding:.6rem .75rem;font-size:.95rem;font-weight:400;
  border:1px solid var(--border);border-radius:10px;background:var(--surface);color:var(--text);
}
.agent-actions{margin-top:.25rem}
.agent-history{margin-top:.5rem;border-top:1px solid var(--border);padding-top:.75rem}
.agent-history summary{cursor:pointer;font-weight:600;padding:.35rem 0}
.agent-version{padding:.6rem 0;border-bottom:1px solid var(--border)}
.agent-version:last-child{border-bottom:0}
.agent-version-head{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap}
.agent-version-text{
  margin:.4rem 0 0;padding:.6rem .7rem;border-radius:10px;background:var(--surface-muted,rgba(0,0,0,.04));
  font-family:'Noto Sans Bengali','Inter',system-ui,sans-serif;
  font-size:.92rem;line-height:1.7;white-space:pre-wrap;word-break:break-word;
}
.agent-version.is-current .agent-version-text{background:rgba(34,139,102,.08)}
@media (max-width:640px){
  .agent-textarea{min-height:16rem;font-size:1.05rem}
  .agent-actions button{width:100%}
}

/* G3B84 — custom auto rules. Same Bengali-first treatment as the agent prompt: these
   templates are written on a phone, in Bangla, and read back at a glance. */
.auto-rules-card{display:flex;flex-direction:column;gap:.75rem}
.rule-list{display:flex;flex-direction:column;gap:.5rem}
.rule-row{display:flex;gap:.75rem;justify-content:space-between;align-items:flex-start;
  padding:.7rem .8rem;border:1px solid var(--border);border-radius:12px}
.rule-row-head{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap}
.rule-template{margin:.35rem 0 0;padding:.5rem .65rem;border-radius:10px;
  background:var(--surface-muted,rgba(0,0,0,.04));
  font-family:'Noto Sans Bengali','Inter',system-ui,sans-serif;
  font-size:.95rem;line-height:1.75;white-space:pre-wrap;word-break:break-word}
.rule-editor{display:flex;flex-direction:column;gap:.6rem}
.rule-keywords{min-height:7rem}
.rule-enabled{display:flex;align-items:center;gap:.55rem;font-weight:600}
@media (max-width:640px){
  .rule-row{flex-direction:column}
  .rule-row .actions{width:100%}
  .rule-row .actions button{width:100%}
}

/* G3B85 — Posts section and the automation-mode selector. */
.post-card{display:flex;flex-direction:column;gap:.6rem}
.automation-mode{border:1px solid var(--border);border-radius:12px;padding:.75rem;margin:.5rem 0;
  display:flex;flex-direction:column;gap:.55rem}
.automation-mode legend{font-weight:600;padding:0 .35rem}
.mode-choice{display:flex;gap:.6rem;align-items:flex-start;padding:.5rem .55rem;
  border:1px solid transparent;border-radius:10px}
.mode-choice:has(input:checked){border-color:var(--accent);background:rgba(34,139,102,.06)}
.mode-choice input{margin-top:.3rem;flex:none}
.mode-bengali{margin:.2rem 0 0;font-family:'Noto Sans Bengali','Inter',system-ui,sans-serif;
  font-size:.92rem;line-height:1.8;font-weight:400;opacity:.85}
@media (max-width:640px){
  .post-card .actions{flex-direction:column}
  .post-card .actions button,.post-card .actions a{width:100%}
}

/* G3B86 — the attachment on an approval card. The operator has to see a prescription photo
   to judge it, without leaving the dashboard. */
.attachment{margin:.5rem 0 0;display:flex;flex-direction:column;gap:.4rem}
.attachment-chips{display:flex;gap:.35rem;flex-wrap:wrap}
.attachment-thumb{max-width:100%;max-height:22rem;width:auto;border-radius:12px;
  border:1px solid var(--border);object-fit:contain;background:var(--surface-muted,rgba(0,0,0,.04))}
.attachment-link{word-break:break-all;font-size:.9rem;padding:.4rem .55rem;border-radius:8px;
  background:var(--surface-muted,rgba(0,0,0,.04))}
@media (max-width:640px){ .attachment-thumb{max-height:16rem} }

/* G3B88 — one switch, the fixed escalation list, the Advanced accordion, and the Overview
   card that now states the effective state in a sentence instead of a table row. */
.master-card{border-top:4px solid var(--accent,#228b66)}
.master-control{border-top:0;padding-top:6px;align-items:flex-start}
.master-control>div:first-child{flex:1}
.master-bengali{margin:.35rem 0 .2rem;font-family:'Noto Sans Bengali','Inter',system-ui,sans-serif;
  font-size:1rem;line-height:1.85;color:#344054}
.toggle-large{width:62px;height:34px}
.toggle-large .toggle-track:after{width:28px;height:28px}
.toggle-large input:checked+.toggle-track:after{transform:translateX(28px)}

.escalation-note{margin:.4rem 0 1rem;padding:.85rem 1rem;border-radius:10px;
  background:var(--warn-soft,#fdf3e2);border:1px solid #efd9b0}
.escalation-note h4{margin:0;font-size:.9rem;letter-spacing:-.01em;color:#7d4900}
.escalation-list{margin:.6rem 0 0;padding-left:1.1rem;display:grid;gap:.45rem}
.escalation-list li{color:#5f4413}
.escalation-en{display:block;font-weight:650;font-size:.9rem}
.escalation-bn{display:block;font-family:'Noto Sans Bengali','Inter',system-ui,sans-serif;
  font-size:.9rem;line-height:1.8;opacity:.85}

/* <details> rather than a scripted disclosure, so it works with a keyboard and a screen
   reader without any code of ours. */
.advanced-panel{margin:14px 0 6px;border:1px solid var(--line);border-radius:12px;
  background:#fbfcfd;padding:0 14px}
.advanced-panel>summary{cursor:pointer;padding:12px 2px;font-weight:800;color:#475467;
  letter-spacing:.02em}
.advanced-panel>summary::marker{color:#98a2b3}
.advanced-panel[open]>summary{border-bottom:1px solid var(--line)}
.advanced-panel>.muted{margin:10px 2px}

.effective-state{border-top:4px solid #98a2b3}
.effective-state.is-on{border-top-color:#26845b}
.effective-state.is-off{border-top-color:#c2410c}
.effective-bengali{margin:.4rem 0 .1rem;font-family:'Noto Sans Bengali','Inter',system-ui,sans-serif;
  font-size:1.05rem;line-height:1.85;color:#101828;font-weight:600}
.effective-english{margin:0 0 .6rem}

/* G3B89 — the engagement chips on a published reply. A like is a public act in the page's
   own name, so it is shown as plainly as the publish itself. */
.published-card .approval-card-state .pill.success{letter-spacing:.01em}

/* G3B92-A — Delete, next to Edit on an auto rule. It is a link-button like Edit rather
   than a filled danger button: the pair sits inside a list row, and one loud red button per
   rule would read as the row's primary action when Edit is. The colour is the only
   difference, and the confirmation dialog is where the weight belongs. */
.link-button.danger-link{color:#b3261e;border-color:#f2c0bd}
.link-button.danger-link:hover{background:var(--danger-soft)}

/* G3B93 - the Hidden tab's reason filter. Chips, not a select: there are four and the
   count on the Complaints one is the number the operator is actually looking for. */
.hidden-reason-filter{margin:12px 0 4px}
.hidden-reason-filter button{font-size:.82rem}
