@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@500;600;700;800&display=swap');

:root {
  font-family: 'DM Sans', sans-serif;
  color: #172321;
  background: #f6f7f4;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --ink: #172321;
  --muted: #77817d;
  --line: #e7eae5;
  --paper: #fff;
  --canvas: #f6f7f4;
  --green: #176b58;
  --green-dark: #105140;
  --mint: #e5f3ed;
  --orange: #e89357;
  --shadow: 0 12px 30px rgba(31, 52, 45, .07);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--canvas); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid #83c8ad; outline-offset: 2px; }
a { color: inherit; }
.shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 5; display: flex; width: 248px; flex-direction: column; padding: 26px 16px 18px; border-right: 1px solid var(--line); background: #fbfcfa; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 10px 31px; }
.brand-mark { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 13px; color: #fff; background: var(--green); font: 800 19px 'Manrope', sans-serif; letter-spacing: -1px; }
.brand-name { font: 800 19px 'Manrope', sans-serif; letter-spacing: -.7px; }
.brand-sub { color: var(--muted); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.nav-label { padding: 0 11px 9px; color: #9aa29e; font-size: 10px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.nav { display: grid; gap: 5px; }
.nav-button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 12px; border: 0; border-radius: 11px; color: #63706b; background: transparent; text-align: left; font-size: 13px; font-weight: 600; }
.nav-button:hover { color: var(--ink); background: #f0f4f0; }
.nav-button.active { color: var(--green-dark); background: var(--mint); }
.nav-icon { display: grid; width: 22px; place-items: center; font-size: 16px; }
.nav-count { margin-left: auto; color: #82908a; font-size: 11px; }
.sidebar-bottom { margin-top: auto; }
.prototype-note { padding: 13px; border: 1px solid #e8ede7; border-radius: 13px; color: #66736d; background: #f5f7f3; font-size: 11px; line-height: 1.55; }
.prototype-note strong { display: block; margin-bottom: 4px; color: var(--ink); font-size: 11px; }
.main { min-height: 100vh; margin-left: 248px; }
.topbar { position: sticky; top: 0; z-index: 4; display: flex; height: 72px; align-items: center; justify-content: space-between; padding: 0 42px; border-bottom: 1px solid var(--line); background: rgba(251,252,250,.92); backdrop-filter: blur(12px); }
.breadcrumb { color: var(--muted); font-size: 12px; }
.breadcrumb strong { color: var(--ink); font-weight: 600; }
.top-actions { display: flex; align-items: center; gap: 12px; }
.avatar { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid #dce6df; border-radius: 50%; color: var(--green-dark); background: var(--mint); font-size: 11px; font-weight: 700; }
.content { max-width: 1400px; margin: 0 auto; padding: 38px 42px 60px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 27px; }
.eyebrow { margin: 0 0 8px; color: var(--green); font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: 'Manrope', sans-serif; }
h1 { margin-bottom: 8px; font-size: clamp(27px, 3vw, 36px); letter-spacing: -1.6px; line-height: 1.12; }
h2 { margin-bottom: 8px; font-size: 19px; letter-spacing: -.6px; }
h3 { margin-bottom: 7px; font-size: 15px; letter-spacing: -.3px; }
.subtitle { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.button { display: inline-flex; min-height: 39px; align-items: center; justify-content: center; gap: 8px; padding: 0 15px; border: 1px solid transparent; border-radius: 10px; color: #fff; background: var(--green); font-size: 12px; font-weight: 700; text-decoration: none; transition: transform .15s, background .15s; }
.button:hover { transform: translateY(-1px); background: var(--green-dark); }
.button.secondary { border-color: #dfe5df; color: #31413a; background: #fff; }
.button.secondary:hover { background: #f7f9f6; }
.button.ghost { min-height: 34px; padding: 0 11px; color: #53625b; background: transparent; }
.button.ghost:hover { background: #eff3ee; }
.button.danger { color: #9d4137; background: #fff1ee; }
.button.small { min-height: 32px; padding: 0 10px; font-size: 11px; }
.button:disabled { cursor: not-allowed; opacity: .48; transform: none; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin-bottom: 31px; }
.stat-card { padding: 17px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
.stat-label { color: var(--muted); font-size: 11px; font-weight: 600; }
.stat-value { margin: 8px 0 3px; font: 700 27px 'Manrope', sans-serif; letter-spacing: -1px; }
.stat-hint { color: #98a19b; font-size: 10px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 14px; }
.section-head h2 { margin: 0; }
.section-head p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.feed-source-list { display: grid; gap: 12px; }
.feed-source-actions { flex-wrap: wrap; justify-content: flex-end; }
.section { margin-top: 30px; }
.board-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 15px; }
.board-card { position: relative; overflow: hidden; padding: 17px; border: 1px solid var(--line); border-radius: 15px; background: var(--paper); transition: box-shadow .18s, transform .18s; }
.board-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.board-accent { width: 100%; height: 5px; margin: -17px -17px 16px; width: calc(100% + 34px); background: var(--board-color, var(--green)); }
.board-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.board-card-title { margin-bottom: 3px; font: 700 15px 'Manrope', sans-serif; letter-spacing: -.4px; }
.board-niche { color: var(--muted); font-size: 11px; }
.badge { display: inline-flex; min-height: 23px; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 20px; color: #63716a; background: #f0f3ef; font-size: 9px; font-weight: 700; letter-spacing: .035em; text-transform: uppercase; white-space: nowrap; }
.badge.green { color: #22634f; background: #e8f4ed; }
.badge.amber { color: #94642c; background: #fff3df; }
.board-description { min-height: 34px; margin: 14px 0 16px; color: #77817c; font-size: 11px; line-height: 1.5; }
.board-metrics { display: flex; gap: 17px; padding: 12px 0; border-top: 1px solid #eef0ed; border-bottom: 1px solid #eef0ed; }
.board-metric { color: var(--muted); font-size: 10px; }
.board-metric strong { display: block; margin-bottom: 2px; color: var(--ink); font: 700 15px 'Manrope', sans-serif; }
.board-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 13px; }
.slug { overflow: hidden; color: #87918b; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.empty-state { padding: 38px 20px; border: 1px dashed #cfd9d1; border-radius: 14px; color: var(--muted); background: #fbfcfa; text-align: center; }
.empty-state .empty-icon { display: grid; width: 42px; height: 42px; margin: 0 auto 13px; place-items: center; border-radius: 14px; color: var(--green); background: var(--mint); font-size: 20px; }
.empty-state h3 { margin-bottom: 6px; color: var(--ink); }
.empty-state p { max-width: 410px; margin: 0 auto 15px; font-size: 12px; line-height: 1.5; }
.panel { border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
.panel-pad { padding: 18px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-bottom: 14px; }
.input, .select, .textarea { width: 100%; min-height: 40px; padding: 10px 12px; border: 1px solid #dde4dd; border-radius: 9px; color: var(--ink); background: #fff; font-size: 12px; }
.textarea { min-height: 92px; resize: vertical; line-height: 1.5; }
.input:focus, .select:focus, .textarea:focus { border-color: #72ae97; outline: 3px solid #e2f2eb; }
.search { width: min(330px, 100%); padding-left: 35px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23808a84' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-4-4'/%3E%3C/svg%3E") 12px center / 15px no-repeat; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { padding: 11px 12px; border-bottom: 1px solid var(--line); color: #89938d; font-size: 9px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
td { padding: 13px 12px; border-bottom: 1px solid #eff1ee; color: #65716a; font-size: 11px; vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td strong { display: block; margin-bottom: 3px; color: var(--ink); font-size: 12px; font-weight: 700; }
.row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 4px; white-space: nowrap; }
.text-link { border: 0; color: var(--green); background: transparent; font-size: 11px; font-weight: 700; }
.tabs { display: flex; overflow-x: auto; gap: 5px; margin: 23px 0 21px; border-bottom: 1px solid var(--line); }
.tab { position: relative; min-height: 39px; padding: 0 13px; border: 0; color: #7a8580; background: transparent; font-size: 11px; font-weight: 700; white-space: nowrap; }
.tab.active { color: var(--green-dark); }
.tab.active:after { position: absolute; right: 10px; bottom: -1px; left: 10px; height: 2px; background: var(--green); content: ''; }
.board-hero { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 19px; border: 1px solid var(--line); border-radius: 15px; background: linear-gradient(112deg, #fff 0%, #f0f6f1 100%); }
.board-hero-info { display: flex; align-items: center; gap: 14px; }
.board-logo { display: grid; width: 47px; height: 47px; place-items: center; border-radius: 14px; color: #fff; background: var(--board-color, var(--green)); font: 800 17px 'Manrope', sans-serif; }
.board-hero h2 { margin: 0 0 4px; }
.board-hero .subtitle { font-size: 11px; }
.two-col { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(250px,.8fr); gap: 15px; }
.mini-list { display: grid; gap: 0; }
.mini-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid #eff1ee; font-size: 11px; }
.mini-row:last-child { border-bottom: 0; }
.mini-row strong { display: block; margin-bottom: 3px; color: var(--ink); font-size: 11px; }
.mini-row span { color: var(--muted); }
.progress { overflow: hidden; height: 6px; border-radius: 20px; background: #e9ede9; }
.progress span { display: block; height: 100%; border-radius: inherit; background: var(--green); }
.callout { padding: 14px 15px; border: 1px solid #dcebe2; border-radius: 12px; color: #5e7167; background: #f1f8f3; font-size: 11px; line-height: 1.55; }
.callout strong { display: block; margin-bottom: 4px; color: #2d5847; }
.callout.warning { border-color: #f0dfc2; color: #806a49; background: #fff9ef; }
.callout.warning strong { color: #835c22; }
.field-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.field { display: grid; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { color: #52615a; font-size: 11px; font-weight: 700; }
.field small { color: #929b95; font-size: 10px; line-height: 1.45; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 19px; padding-top: 15px; border-top: 1px solid var(--line); }
.color-control { display: flex; align-items: center; gap: 9px; }
.color-control input[type=color] { width: 44px; height: 39px; padding: 3px; border: 1px solid #dde4dd; border-radius: 9px; background: #fff; }
.matrix-wrap { overflow-x: auto; }
.matrix th, .matrix td { min-width: 75px; padding: 10px 8px; text-align: center; }
.matrix th:first-child, .matrix td:first-child { min-width: 155px; text-align: left; }
.matrix input { width: 15px; height: 15px; accent-color: var(--green); }
.audit-summary { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 13px; margin-bottom: 15px; padding: 14px 15px; border-radius: 11px; background: #f3f7f3; }
.audit-number { color: var(--green); font: 800 23px 'Manrope', sans-serif; }
.audit-summary strong { display: block; margin-bottom: 3px; font-size: 11px; }
.audit-summary span { color: var(--muted); font-size: 10px; }
.check { color: #287755; font-size: 14px; font-weight: 800; }
.cross { color: #be6e4b; font-size: 14px; font-weight: 800; }
.switch-row { display: flex; align-items: flex-start; gap: 11px; padding: 13px 0; border-bottom: 1px solid #eff1ee; }
.switch-row:last-child { border-bottom: 0; }
.switch-row input { width: 16px; height: 16px; margin-top: 1px; accent-color: var(--green); }
.switch-row strong { display: block; margin-bottom: 3px; font-size: 11px; }
.switch-row span { display: block; color: var(--muted); font-size: 10px; line-height: 1.45; }
.modal-backdrop { position: fixed; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(18, 30, 26, .48); backdrop-filter: blur(4px); }
.modal { width: min(610px, 100%); max-height: min(92vh, 850px); overflow-y: auto; padding: 22px; border: 1px solid rgba(255,255,255,.6); border-radius: 18px; background: #fff; box-shadow: 0 25px 80px rgba(14, 31, 24, .22); }
.modal.wide { width: min(760px,100%); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; margin-bottom: 18px; }
.modal-head h2 { margin-bottom: 4px; font-size: 20px; }
.modal-head p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.close-button { display: grid; width: 30px; height: 30px; flex: 0 0 auto; place-items: center; border: 1px solid var(--line); border-radius: 9px; color: #6b7770; background: #fff; font-size: 16px; }
.close-button:hover { background: #f4f6f3; }
.public-shell { min-height: 100vh; background: #fff; }
.public-bar { display: flex; min-height: 69px; align-items: center; justify-content: space-between; gap: 15px; padding: 0 max(28px, calc((100vw - 1180px)/2)); border-bottom: 1px solid #edf0eb; }
.public-brand { display: flex; align-items: center; gap: 10px; color: #1a2722; font: 800 16px 'Manrope',sans-serif; text-decoration: none; }
.public-mark { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 10px; color: white; background: var(--board-color,var(--green)); font-size: 12px; }
.public-nav { display: flex; align-items: center; gap: 14px; }
.public-nav button { border: 0; color: #69756f; background: transparent; font-size: 10px; font-weight: 600; }
.public-nav button:hover { color: var(--board-color,var(--green)); }
.public-content { max-width: 1120px; margin: 0 auto; padding: 50px 28px 72px; }
.public-hero { padding: 48px 28px; border-radius: 18px; background: #f4f8f4; text-align: center; }
.public-hero h1 { max-width: 730px; margin: 0 auto 12px; font-size: clamp(28px, 4vw, 44px); }
.public-hero p { max-width: 590px; margin: 0 auto 20px; color: #67736d; font-size: 13px; line-height: 1.6; }
.public-search { display: flex; max-width: 660px; gap: 8px; margin: 0 auto; }
.public-search .input { min-height: 45px; }
.public-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 13px; }
.public-job { padding: 17px; border: 1px solid #e7ebe6; border-radius: 13px; background: #fff; }
.public-job h3 { margin: 10px 0 5px; font-size: 14px; }
.public-job p { margin: 0; color: var(--muted); font-size: 10px; }
.public-footer { padding: 24px 28px; border-top: 1px solid #edf0eb; color: #87918b; font-size: 10px; text-align: center; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 40; max-width: min(430px,calc(100vw - 36px)); padding: 12px 16px; border: 1px solid #d7e7dd; border-radius: 11px; color: #245643; background: #f1faf4; box-shadow: var(--shadow); font-size: 12px; animation: rise .2s ease-out; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.right { text-align: right; }
.nowrap { white-space: nowrap; }

@media (max-width: 1080px) {
  .sidebar { width: 210px; }
  .main { margin-left: 210px; }
  .topbar { padding: 0 26px; }
  .content { padding-right: 26px; padding-left: 26px; }
  .board-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .sidebar { position: fixed; inset: auto 0 0; width: 100%; height: 64px; flex-direction: row; align-items: center; justify-content: center; padding: 5px 8px; border-top: 1px solid var(--line); border-right: 0; background: rgba(251,252,250,.97); }
  .brand, .nav-label, .sidebar-bottom { display: none; }
  .nav { width: 100%; grid-template-columns: repeat(4,1fr); gap: 2px; }
  .nav-button { flex-direction: column; justify-content: center; gap: 2px; min-height: 52px; padding: 4px 2px; font-size: 9px; text-align: center; }
  .nav-icon { font-size: 15px; }
  .nav-count { display: none; }
  .main { margin-left: 0; padding-bottom: 65px; }
  .topbar { height: 59px; padding: 0 17px; }
  .content { padding: 26px 17px 36px; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 13px; }
  .page-heading .button { width: 100%; }
  .stats { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
  .stat-card { padding: 13px; }
  .stat-value { font-size: 23px; }
  .board-grid { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .field-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .board-hero { align-items: flex-start; flex-direction: column; }
  .public-bar { align-items: flex-start; flex-direction: column; padding: 14px 18px; }
  .public-nav { width: 100%; overflow-x: auto; gap: 11px; }
  .public-nav button { white-space: nowrap; }
  .public-content { padding: 28px 16px 50px; }
  .public-hero { padding: 34px 15px; }
  .public-search { flex-direction: column; }
  .public-search .button { width: 100%; }
  .public-grid { grid-template-columns: 1fr; }
  .audit-summary { grid-template-columns: auto 1fr; }
  .audit-summary .badge { grid-column: 1 / -1; justify-self: start; }
}
