:root {
  --bg: #f4f1e8;
  --panel: rgba(255, 252, 245, 0.88);
  --panel-border: rgba(63, 76, 52, 0.14);
  --text: #1d241b;
  --muted: #5f6958;
  --accent: #1d8b62;
  --accent-deep: #136347;
  --shadow: 0 24px 70px rgba(34, 48, 31, 0.12);
}

.admin-directory { margin: 24px 0; }
.admin-directory-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 24px; margin-top: 24px; }
.admin-directory-grid h3 { font-size: 16px; margin: 0 0 12px; }
.admin-directory-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.admin-directory-grid a { display: block; padding: 12px 14px; border: 1px solid var(--panel-border); border-radius: 10px; color: var(--accent-deep); background: rgba(255, 255, 255, .55); text-decoration: none; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.admin-directory-grid a:hover { background: #e8f1e9; border-color: var(--accent); }
.admin-directory-grid a:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* ProveIt Facebook inbox */
body[data-page-name="facebook-inbox"] [hidden] { display: none !important; }
body[data-page-name="facebook-inbox"] .inbox-shell { width: calc(100% - 32px); max-width: none; }
.inbox-header { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 24px; }
.inbox-header h1 { font-size: clamp(32px, 4vw, 48px); letter-spacing: -1.5px; line-height: 1.1; }
.inbox-header p:last-child { margin-bottom: 0; }
.inbox-login { max-width: 460px; margin: 48px auto; }
.inbox-filters { display: flex; align-items: end; gap: 16px; padding: 20px 24px; }
.inbox-filters label { flex: 1; min-width: 135px; display: grid; gap: 7px; }
.inbox-filters label span { font-size: 12px; font-weight: 700; color: var(--muted); }
.inbox-filters .inbox-search { flex: 1.6; }
.inbox-filters input, .inbox-filters select { margin: 0; width: 100%; min-height: 43px; }
.inbox-summary { display: flex; justify-content: space-between; gap: 16px; padding: 20px 4px 0; font-size: 13px; }
.inbox-summary p { margin-bottom: 8px; }
.inbox-error { color: #9b2c2c; }
.inbox-grid { display: grid; grid-template-columns: minmax(300px, .8fr) minmax(0, 1.5fr); gap: 24px; align-items: start; }
.inbox-list-panel { padding: 8px; overflow: hidden; }
#comment-list { max-height: none; }
.inbox-comment { background: transparent; color: var(--text); text-align: left; width: 100%; display: grid; gap: 12px; padding: 20px; border: 1px solid transparent; border-bottom: 1px solid var(--panel-border); border-radius: 12px; box-shadow: none; cursor: pointer; }
.inbox-comment:hover { background: #ecefe4; color: var(--text); }
.inbox-comment[aria-pressed="true"] { background: #e8f1e9; border: 1px solid #97b9a2; box-shadow: inset 3px 0 var(--accent); }
.inbox-row-head { display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.inbox-row-head strong { font-size: 14px; overflow-wrap: anywhere; }
.inbox-badge { white-space: nowrap; font-size: 10px; font-weight: 700; background: #ede8da; color: #6b5725; padding: 5px 8px; border-radius: 99px; }
.inbox-badge[data-status="Replied"] { background: #d6eadb; color: #215334; }
.inbox-badge[data-status="ReplyFailed"],.inbox-badge[data-status="ReplyUncertain"] { background: #f4dddd; color: #7a2b2b; }
.inbox-badge[data-status="AiDraft"] { background: #dde6f4; color: #284a7a; }
.inbox-ai-note { font-size: 12px; margin: 4px 0 8px; }
.inbox-row-meta { font-size: 11px; color: var(--muted); line-height: 1.5; }
.inbox-comment-body { font-size: 14px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.inbox-detail { min-height: 560px; position: sticky; top: 24px; }
.inbox-detail-head { display: flex; justify-content: space-between; align-items: start; gap: 16px; }
.inbox-detail-head h2 { margin-bottom: 8px; font-size: 26px; overflow-wrap: anywhere; }
.inbox-detail-head .button-link { font-size: 12px; white-space: nowrap; }
.inbox-post { background: #eeede4; border-radius: 12px; padding: 16px 20px; margin: 16px 0 24px; }
.inbox-post p:last-child { margin: 0; font-size: 13px; line-height: 1.6; }
.inbox-post .eyebrow { font-size: 10px; margin-bottom: 8px; }
.inbox-original p,.inbox-sent p:not(.eyebrow),.inbox-reply-preview,#review-original { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.7; }
.inbox-original { border-left: 3px solid #9eb6a3; padding-left: 20px; margin-bottom: 28px; }
.inbox-ancestors { list-style: none; margin: 0 0 24px; padding: 0 0 0 20px; border-left: 2px solid #c3cfbd; }
.inbox-ancestors li { padding: 16px 0; border-bottom: 1px solid var(--panel-border); }
.inbox-ancestor-head { display: flex; justify-content: space-between; gap: 16px; font-size: 12px; }
.inbox-ancestors li p { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.65; margin: 12px 0 0; }
#thread-context { margin-bottom: 20px; }
.inbox-toggle { display: flex; align-items: center; gap: 10px; width: fit-content; margin: 10px 0 20px; font-size: 14px; cursor: pointer; }
.inbox-toggle input { width: 18px; height: 18px; min-height: 0; margin: 0; accent-color: var(--accent); }
.inbox-bulk-toolbar { display:flex; align-items:center; flex-wrap:wrap; gap:12px; padding:16px 20px; margin-bottom:16px; }
.inbox-bulk-toolbar strong { font-size:13px; }
.inbox-bulk-toolbar button { font-size:13px; }
.inbox-bulk-toolbar p { flex-basis:100%; margin:0; font-size:12px; line-height:1.6; }
.inbox-bulk-progress { display:flex; flex-basis:100%; align-items:center; flex-wrap:wrap; gap:12px 20px; }
.inbox-bulk-progress p { flex:1 1 360px; }
.inbox-bulk-progress .inbox-toggle { margin:0; font-size:12px; white-space:nowrap; }
.inbox-comment-row { display:grid; grid-template-columns:24px minmax(0,1fr); gap:4px; align-items:start; }
.inbox-select-draft { width:18px; height:18px; min-height:0; padding:0; margin:23px 0 0 4px; accent-color:var(--accent); cursor:pointer; }
.inbox-bulk-review { width:min(850px,calc(100% - 32px)); }
#bulk-preview-list { padding:0; list-style:none; max-height:50vh; overflow:auto; }
#bulk-preview-list li { border:1px solid var(--panel-border); border-radius:12px; padding:16px; margin-bottom:12px; }
#bulk-preview-list h3 { font-size:15px; margin:0 0 8px; }
#bulk-preview-list blockquote { margin:12px 0; padding-left:12px; border-left:3px solid #b9c9b6; font-size:13px; color:var(--muted); white-space:pre-wrap; overflow-wrap:anywhere; }
#bulk-preview-list .inbox-reply-preview { max-height:none; margin:0; }
.inbox-bulk-footer { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:12px; }
.inbox-original .muted { font-size: 12px; }
.inbox-sent { padding: 18px 20px; border: 1px solid #b9d2be; background: #eef5ec; border-radius: 12px; margin-bottom: 24px; }
.inbox-sync { font-size: 11px; line-height: 1.6; }
#reply-form { border-top: 1px solid var(--panel-border); padding-top: 20px; }
#reply-form label { font-size: 13px; font-weight: 700; display: block; margin-bottom: 10px; }
#reply-text { width: 100%; resize: vertical; border: 1px solid #bdc9b8; border-radius: 12px; padding: 16px; background: #fffef8; line-height: 1.65; }
#reply-text:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
.inbox-dialler { display:flex; flex:1 1 240px; flex-wrap:wrap; align-items:center; justify-content:center; gap:8px; overflow-wrap:anywhere; }
.inbox-dialler [role="status"] { flex-basis:100%; text-align:center; }
.inbox-compose-footer { flex-wrap:wrap; display: flex; align-items: center; justify-content: space-between; margin-top: 12px; gap: 12px; }
.inbox-compose-footer span,#reply-message { font-size: 12px; }
#reply-message { margin-top: 14px; line-height: 1.6; color: var(--muted); }
.inbox-placeholder,.inbox-empty { padding: 60px 24px; text-align: center; }
.inbox-placeholder span { display: block; font-size: 50px; color: var(--accent); margin-bottom: 24px; }
#more { width: calc(100% - 24px); margin: 12px; font-size: 13px; }
.inbox-review { width: min(560px, calc(100% - 32px)); max-height: 85vh; padding: 32px; background: #fffdf6; border: 1px solid var(--panel-border); border-radius: 20px; box-shadow: var(--shadow); color: var(--text); }
.inbox-review::backdrop { background: rgba(20, 35, 24, .5); backdrop-filter: blur(3px); }
.inbox-close { float: right; font-size: 24px; padding: 0 8px; }
#review-original { max-height: 140px; overflow-y: auto; margin: 20px 0; padding-left: 16px; border-left: 3px solid #b9c9b6; font-size: 13px; color: var(--muted); }
.inbox-reply-preview { background: #eaf1e6; padding: 20px; border-radius: 12px; max-height: 240px; overflow-y: auto; }
body[data-page-name="facebook-inbox"] button:disabled { opacity: .55; cursor: default; }
body[data-page-name="facebook-inbox"] :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (max-width: 1000px) { .inbox-filters { flex-wrap: wrap; }.inbox-filters label { flex: 1 1 40%; }.inbox-filters .inbox-search { flex: 1 1 55%; } }
@media (max-width: 720px) { .inbox-shell { width: calc(100% - 24px); padding-top: 16px; }.inbox-header { align-items: start; flex-direction: column; padding: 24px; }.inbox-header h1 { font-size: 34px; }.inbox-grid { grid-template-columns: 1fr; gap: 16px; }.inbox-detail { position: static; padding: 24px; }#comment-list { max-height: 350px; }.inbox-summary { flex-direction: column; gap: 0; }.inbox-detail-head { flex-direction: column; }.inbox-filters { padding: 18px; }.inbox-filters label { min-width: 100px; } }

/* Row inbox: all comment actions and composers stay with their comment. */
body[data-page-name="facebook-inbox"] .inbox-table-panel { padding: 0; overflow: hidden; border-radius: 16px; }
.inbox-comments-table { width: 100%; table-layout: fixed; border-collapse: collapse; }
.inbox-comments-table .inbox-comment-col { width: 50%; }
.inbox-comments-table .inbox-reply-col { width: 30%; }
.inbox-comments-table .inbox-thread-col { width: 20%; }
.inbox-comments-table thead { background: #e9ecdf; }
.inbox-comments-table th { text-align: left; color: var(--text); font-size: 13px; padding: 16px 20px; }
.inbox-comments-table td { vertical-align: top; padding: 20px; color: var(--text); overflow-wrap: anywhere; border-top: 1px solid var(--panel-border); }
.inbox-comments-table td + td { border-left: 1px solid var(--panel-border); }
.inbox-comments-table .inbox-row-head { justify-content: start; flex-wrap: wrap; gap: 8px; }
.inbox-comments-table .inbox-select-draft { margin: 0 4px 0 0; width: 18px; height: 18px; padding: 0; flex: 0 0 18px; }
.inbox-row-comment { white-space: pre-wrap; font-size: 15px; line-height: 1.65; margin: 16px 0; }
.inbox-comments-table .inbox-row-meta { margin: 7px 0; font-size: 11px; }
.inbox-row-post { margin: 14px 0; color: var(--muted); font-size: 12px; }
.inbox-row-post summary { cursor: pointer; } .inbox-row-post p { white-space: pre-wrap; line-height: 1.6; }
.inbox-reply-cell form > label { font-size: 12px; font-weight: 700; margin: 0 0 9px; }
.inbox-comments-table .inbox-row-editor { width: 100%; box-sizing: border-box; min-height: 130px; font-family: inherit; font-size: 13px; line-height: 1.6; border-radius: 8px; padding: 12px; }
.inbox-comments-table .inbox-row-editor:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
.inbox-row-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.inbox-row-actions button, .inbox-row-dialler button, .inbox-thread-cell button { padding: 8px 12px; font-size: 12px; }
.inbox-row-dialler { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--panel-border); font-size: 12px; }
.inbox-row-dialler > span { display: block; margin-bottom: 7px; overflow-wrap: anywhere; }
.inbox-row-dialler p, .inbox-row-feedback { font-size: 12px; line-height: 1.6; margin: 7px 0 0; }
.inbox-thread-preview { white-space: pre-line; font-size: 12px; line-height: 1.6; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.inbox-thread-cell .inbox-thread-expand { display: block; margin-top: 4px; padding: 0 8px; font-size: 22px; color: var(--accent-deep); text-decoration: underline; }
.inbox-thread-cell .inbox-thread-expand[aria-expanded="true"] { font-size: 12px; padding: 7px 0; }
.inbox-thread-summary { position: relative; padding-right: 23px; }
.inbox-thread-summary .inbox-thread-expand { position: absolute; right: 0; bottom: 0; margin: 0; line-height: 1.2; }
.inbox-thread-messages { list-style: none; margin: 0; padding: 0; }
.inbox-thread-messages li { border-left: 2px solid #bacbbd; padding: 0 0 12px 12px; margin-bottom: 12px; font-size: 12px; }
.inbox-thread-messages strong, .inbox-thread-messages time { display: block; }
.inbox-thread-messages time { font-size: 10px; color: var(--muted); margin-top: 4px; }
.inbox-thread-messages p { white-space: pre-wrap; line-height: 1.6; margin: 8px 0 0; }
.inbox-thread-warning { font-size: 11px; margin: 10px 0; }
.inbox-table-panel > #more { margin: 20px; }
@media(max-width: 720px) {
  .inbox-comments-table, .inbox-comments-table tbody, .inbox-comments-table tr, .inbox-comments-table td { display: block; width: auto; }
  .inbox-comments-table thead, .inbox-comments-table colgroup { display: none; }
  .inbox-comments-table tr + tr { border-top: 3px solid #c8d3bf; }
  .inbox-comments-table td { padding: 16px; }
  .inbox-comments-table td + td { border-left: 0; }
  .inbox-comments-table td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; font-weight: 800; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
  .inbox-comments-table #comment-list { max-height: none; }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(68, 162, 114, 0.16), transparent 35%),
    radial-gradient(circle at bottom right, rgba(242, 188, 83, 0.18), transparent 30%),
    var(--bg);
}

button,
input,
select,
textarea {
  font: inherit;
}

.shell {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0 56px;
}

.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  align-items: start;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  padding: 28px;
}

.eyebrow {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 12px;
  color: var(--accent-deep);
  font-weight: 700;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(40px, 5vw, 64px);
  line-height: 0.95;
  margin-bottom: 16px;
}

.lede,
.muted,
.status-message,
td,
th {
  color: var(--muted);
}

.auth-panel {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 8px;
}

input,
select,
textarea {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(38, 61, 42, 0.16);
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.8);
}

textarea {
  min-height: 180px;
  resize: vertical;
  color: var(--text);
  font: 13px/1.45 Consolas, "Courier New", monospace;
}

button {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  background: linear-gradient(135deg, var(--accent), #3d9d73);
  color: white;
  font-weight: 700;
  cursor: pointer;
}

a.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 12px 18px;
  text-decoration: none;
  font-weight: 700;
}

button.secondary {
  background: #dcecdf;
  color: #1b4c36;
}

button.danger {
  background: #fee2e2;
  color: #991b1b;
}

a.button-link.secondary {
  background: #dcecdf;
  color: #1b4c36;
}

button.ghost {
  background: transparent;
  color: var(--accent-deep);
  border: 1px solid rgba(29, 99, 71, 0.2);
}

.workspace {
  margin-top: 28px;
  display: grid;
  gap: 20px;
}

.workspace-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.workspace-actions {
  display: flex;
  gap: 12px;
  align-items: end;
}

.dashboard-shell .workspace-header {
  align-items: flex-start;
  flex-wrap: wrap;
}

.dashboard-shell .workspace-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.limit-picker {
  min-width: 88px;
}

.customer-search-picker {
  min-width: 240px;
}

body.tracking-dashboard .workspace-header {
  align-items: flex-start;
  flex-wrap: wrap;
}

body.tracking-dashboard .workspace-header > div:first-child {
  flex: 1 1 360px;
}

body.tracking-dashboard .workspace-actions {
  flex: 1 1 620px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

body.tracking-dashboard .workspace-actions .limit-picker {
  min-width: 150px;
}

body.tracking-dashboard .workspace-actions .page-picker {
  min-width: 240px;
}

.stats-grid,
.views-grid {
  display: grid;
  gap: 20px;
}

.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.views-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pseo-grid {
  grid-template-columns: minmax(360px, 0.9fr) minmax(0, 1.1fr);
}

.stat-card p {
  margin-bottom: 10px;
}

.stat-card strong {
  font-size: 36px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 14px 10px;
  border-bottom: 1px solid rgba(63, 76, 52, 0.1);
  vertical-align: top;
}

th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.person {
  display: grid;
  gap: 4px;
}

.primary-text {
  color: var(--text);
  font-weight: 600;
}

.chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(29, 139, 98, 0.1);
  color: var(--accent-deep);
  font-size: 12px;
  font-weight: 700;
}

a.chip {
  text-decoration: none;
}

.status-panel {
  color: var(--muted);
}

.status-panel--success {
  border-color: rgba(29, 139, 98, 0.28);
  color: var(--accent-deep);
}

.status-panel--error {
  border-color: rgba(155, 44, 44, 0.28);
  color: #9b2c2c;
}

.evidence-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.evidence-form button,
.wide-field {
  grid-column: 1 / -1;
}

.checkbox-field {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  gap: 10px;
}

.checkbox-field input {
  width: auto;
}

.inventory-list {
  display: grid;
  gap: 20px;
}

.dashboard-shell {
  width: min(1440px, calc(100% - 32px));
}

.dashboard-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 240px)) auto minmax(180px, 1fr);
  gap: 14px;
  align-items: end;
}

.dashboard-filters .status-message {
  margin: 0;
}

.funnel-filters {
  grid-template-columns: minmax(260px, 420px) repeat(2, minmax(180px, 220px)) auto minmax(180px, 1fr);
}

.leads-filters {
  grid-template-columns: minmax(280px, 1fr) minmax(220px, 320px) minmax(100px, 140px) auto minmax(180px, 1fr);
}

.job-applications-shell {
  width: min(1500px, calc(100% - 32px));
}

.job-applications-search {
  display: grid;
  grid-template-columns: minmax(240px, 420px) auto minmax(220px, 1fr);
  gap: 14px;
  align-items: end;
}

.job-applications-search .status-message {
  margin: 0;
}

.job-applications-matches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.match-button {
  padding: 8px 12px;
  border-radius: 999px;
  background: #dcecdf;
  color: #1b4c36;
  font-size: 13px;
}

.match-button.selected {
  background: var(--accent-deep);
  color: white;
}

.job-application-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.sheet-field {
  min-width: 0;
  gap: 7px;
}

.sheet-field span {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sheet-field small {
  color: rgba(95, 105, 88, 0.68);
  font-size: 11px;
}

.sheet-field-editable {
  grid-column: span 1;
}

.sheet-field-readonly textarea {
  min-height: 84px;
}

.sheet-input {
  min-height: 44px;
  border-radius: 8px;
}

.sheet-input-readonly {
  background: rgba(255, 255, 255, 0.46);
  color: #4d5548;
}

.sheet-input-editable {
  border-color: rgba(29, 139, 98, 0.34);
  background: white;
  color: var(--text);
}

.sme-metrics-filters {
  grid-template-columns: repeat(2, minmax(180px, 220px)) auto minmax(180px, 1fr);
}

.funnel-table {
  min-width: 760px;
}

.leads-heading {
  gap: 16px;
}

.pagination-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  text-align: right;
}

.pagination-controls button {
  padding: 9px 14px;
}

.pagination-controls button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.leads-table {
  min-width: 1320px;
}

.sme-metrics-table {
  min-width: 1500px;
}

.customers-table {
  min-width: 2100px;
}

.table-action-button {
  width: fit-content;
  padding: 8px 11px;
  font-size: 0.78rem;
}

.email-history-cell {
  max-width: 360px;
  min-width: 280px;
  text-align: left !important;
  line-height: 1.55;
}

.email-history-item {
  color: var(--muted);
  font-size: 13px;
}

.email-history-separator {
  color: rgba(95, 105, 88, 0.58);
  font-weight: 700;
}

.hosted-sites-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.42fr) minmax(0, 1fr);
  gap: 20px;
}

.site-config-list {
  display: grid;
  gap: 12px;
}

.site-config-item {
  display: grid;
  width: 100%;
  gap: 10px;
  border: 1px solid rgba(63, 76, 52, 0.12);
  border-radius: 16px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.52);
  color: var(--text);
  text-align: left;
}

.site-config-item.selected {
  border-color: rgba(29, 139, 98, 0.45);
  background: rgba(29, 139, 98, 0.1);
}

.site-config-item small,
.domain-list {
  color: var(--muted);
}

.site-editor-panel {
  min-width: 0;
}

.site-editor-form {
  display: grid;
  gap: 16px;
}

.create-site-form,
.add-page-form {
  display: grid;
  gap: 12px;
  padding-top: 18px;
  margin-top: 18px;
  border-top: 1px solid rgba(63, 76, 52, 0.12);
}

.create-site-form h3,
.add-page-form h3 {
  margin: 0;
}

.add-page-form {
  grid-template-columns: minmax(160px, 0.85fr) minmax(180px, 1fr) minmax(160px, 0.85fr) auto;
  align-items: end;
  margin-top: 0;
  padding: 16px;
  border: 1px solid rgba(63, 76, 52, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.66);
}

.add-page-form h3,
.add-page-form .status-message {
  grid-column: 1 / -1;
}

.editor-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 360px) auto;
  gap: 12px;
  align-items: end;
}

.text-editor-section,
.page-meta-editor,
.block-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.text-editor-section {
  grid-template-columns: 1fr;
}

.page-meta-editor {
  padding: 16px;
  border: 1px solid rgba(63, 76, 52, 0.12);
  border-radius: 8px;
  background: rgba(250, 248, 241, 0.72);
}

.block-editor-list {
  display: grid;
  gap: 14px;
}

.block-editor {
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(63, 76, 52, 0.12);
  border-radius: 8px;
  background: white;
}

.block-editor legend {
  padding: 0 6px;
  color: var(--accent-deep);
  font-weight: 800;
}

.wide-field,
.text-editor-section label:nth-child(4),
.text-editor-section label:nth-child(6) {
  grid-column: 1 / -1;
}

.text-editor-section textarea,
.block-field-grid textarea {
  min-height: 120px;
  font-family: inherit;
}

.block-field-grid small {
  color: var(--muted);
  font-size: 0.78rem;
}

.preview-frame-wrap {
  overflow: hidden;
  border: 1px solid rgba(63, 76, 52, 0.14);
  border-radius: 16px;
  background: white;
}

.preview-frame-wrap iframe {
  display: block;
  width: 100%;
  height: min(70vh, 760px);
  border: 0;
}

.advanced-json {
  display: grid;
  gap: 14px;
  border: 1px solid rgba(63, 76, 52, 0.12);
  border-radius: 16px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.35);
}

.advanced-json summary {
  cursor: pointer;
  color: var(--accent-deep);
  font-weight: 700;
}

.advanced-json label {
  margin-top: 14px;
}

.domain-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.domain-chip {
  text-decoration: none;
}

.editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.leads-table td:not(:first-child),
.leads-table th:not(:first-child) {
  text-align: left;
}

.leads-table td:first-child {
  white-space: nowrap;
}

.notes-cell {
  max-width: 340px;
  color: var(--muted);
}

.funnel-table th:first-child,
.funnel-table td:first-child,
.funnel-table th:last-child,
.funnel-table td:last-child {
  text-align: left;
}

.funnel-table td:nth-child(2),
.funnel-table td:nth-child(3) {
  color: var(--text);
  font-weight: 700;
}

.distinct-user-cell {
  white-space: nowrap;
}

.text-action {
  margin-left: 10px;
  padding: 7px 10px;
  border-radius: 999px;
  background: #dcecdf;
  color: #1b4c36;
  font-size: 12px;
}

.csv-output {
  width: 100%;
  min-height: 220px;
  resize: vertical;
  border-radius: 14px;
  border: 1px solid rgba(38, 61, 42, 0.16);
  padding: 14px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--text);
  font: 14px/1.6 Consolas, "Courier New", monospace;
}

.dashboard-stats .stat-card strong {
  font-size: 30px;
  line-height: 1.1;
}

.dense-table {
  min-width: 1180px;
}

.schedule-table {
  min-width: 2320px;
}

.dense-table th,
.dense-table td {
  padding: 12px 10px;
}

.dense-table td:not(:first-child),
.dense-table th:not(:first-child) {
  text-align: right;
}

.schedule-table td:nth-child(2),
.schedule-table th:nth-child(2) {
  text-align: left;
}

.sender-summary-row td {
  background: rgba(29, 139, 98, 0.08);
  border-top: 1px solid rgba(29, 99, 71, 0.18);
  border-bottom-color: rgba(29, 99, 71, 0.16);
}

.schedule-total-row td {
  background: rgba(29, 139, 98, 0.1);
  border-top: 1px solid rgba(29, 99, 71, 0.2);
  border-bottom-color: rgba(29, 99, 71, 0.18);
  color: var(--text);
  font-weight: 700;
}

.sender-summary-row td:first-child .primary-text {
  color: var(--accent-deep);
}

.template-detail {
  padding-left: 18px;
  border-left: 3px solid rgba(29, 139, 98, 0.18);
}

.template-outbox-list {
  display: grid;
  gap: 22px;
}

.template-outbox-section {
  display: grid;
  gap: 12px;
}

.template-outbox-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

.template-outbox-table {
  min-width: 1180px;
}

.sender-spacer-row td {
  height: 14px;
  padding: 0;
  border: 0;
  background: transparent;
}

.stacked-list {
  display: grid;
  gap: 16px;
}

.inventory-section {
  display: grid;
  gap: 10px;
}

.inventory-section h4 {
  margin: 0;
}

.inventory-item {
  display: grid;
  gap: 3px;
  padding: 12px;
  border: 1px solid rgba(63, 76, 52, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.45);
}

.inventory-item span {
  color: var(--muted);
  font-size: 13px;
}

.hidden {
  display: none;
}

.empty-state {
  padding: 20px 0;
  color: var(--muted);
}

.background-glow {
  position: fixed;
  inset: auto;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  filter: blur(50px);
  opacity: 0.35;
  pointer-events: none;
}

.background-glow-a {
  top: 40px;
  right: 40px;
  background: rgba(29, 139, 98, 0.35);
}

.background-glow-b {
  bottom: 60px;
  left: 20px;
  background: rgba(242, 188, 83, 0.35);
}

.kids-shell {
  max-width: 1180px;
}

.kids-hero {
  min-height: 220px;
  display: grid;
  align-items: end;
  padding: 32px 0 24px;
}

.kids-hero h1 {
  max-width: 760px;
}

.kids-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.kids-form,
.kids-admin-login,
.kids-setup-form {
  display: grid;
  gap: 14px;
}

.kids-admin-login {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
}

.kids-admin-login .status-message {
  grid-column: 1 / -1;
}

.kids-setup-form {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  margin-top: 16px;
}

.current-session {
  display: grid;
  gap: 4px;
  padding: 14px;
  margin-bottom: 14px;
  border: 1px solid rgba(29, 139, 98, 0.18);
  border-radius: 16px;
  background: rgba(29, 139, 98, 0.08);
}

.current-session span {
  color: var(--muted);
}

.admin-login-panel {
  margin-top: 20px;
}

@media (max-width: 960px) {
  .hero,
  .views-grid,
  .stats-grid,
  .kids-grid,
  .kids-admin-login {
    grid-template-columns: 1fr;
  }

  .workspace-header {
    display: grid;
  }

  .workspace-actions {
    flex-wrap: wrap;
  }

  .evidence-form {
    grid-template-columns: 1fr;
  }

  .kids-setup-form {
    grid-template-columns: 1fr;
  }

  .dashboard-filters {
    grid-template-columns: 1fr;
  }

  .job-applications-search,
  .job-application-form {
    grid-template-columns: 1fr;
  }

  .pagination-controls {
    justify-content: flex-start;
    flex-wrap: wrap;
    text-align: left;
  }

  .template-outbox-heading {
    display: grid;
  }

  .hosted-sites-grid {
    grid-template-columns: 1fr;
  }

  .editor-toolbar,
  .text-editor-section,
  .page-meta-editor,
  .block-field-grid,
  .add-page-form {
    grid-template-columns: 1fr;
  }
}
