/* Donor CRM — look & feel matched to the Kindful admin UI staff are used to.
   Measurements: docs/kindful-spec/00-overview-and-look.md */

@font-face { font-family: "Open Sans"; src: url("../fonts/OpenSans.591d60b5878e.ttf") format("truetype"); font-weight: 300 800; font-style: normal; }
@font-face { font-family: "Open Sans"; src: url("../fonts/OpenSans-Italic.d3a2f6dfb26e.ttf") format("truetype"); font-weight: 300 800; font-style: italic; }

:root {
  --text: #242424;
  --text-dark: #0e0e0e;
  --muted: #666;
  --muted-2: #777;
  --muted-3: #999;
  --line: #e6e6e6;
  --line-2: #f2f2f2;
  --menu-bg: #f8fafa;
  --green: #4bbd93;
  --green-btn: #40af86;
  --green-btn-border: #399c77;
  --green-link: #3ca37d;
  --teal-dark: #447685;
  --blue: #6da7bc;
  --red: #da695f;
  --mint: #6ecbaa;
  --lime: #a4d372;
  --amber: #ffb800;
  --info: #6db3c9;
  --info-border: #5aa3ba;
  --danger: #d9534f;
  --well: #f4f4f4;
  --card-head: #8aa4ad;
  --page-blue: #4a90c2;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 14px; line-height: 20px; color: var(--text); background: #fff; }
a { color: var(--green-link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4, h5 { font-weight: 500; margin: 0; }
button, input, select, textarea { font-family: inherit; }
.hidden, [hidden] { display: none !important; }
.text-success { color: var(--green-link) !important; }
.text-danger { color: var(--danger) !important; }
.text-muted { color: var(--muted) !important; }
.pull-right { float: right; }
.clearfix::after { content: ""; display: table; clear: both; }
.nowrap { white-space: nowrap; }
.money { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------- Top bar ---------- */
#main-navbar { position: fixed; top: 0; left: 0; right: 0; height: 46px; background: #fff; z-index: 100; display: flex; align-items: center; padding: 0 0 0 18px; }
#main-navbar .brand { width: 152px; display: flex; align-items: center; gap: 6px; height: 46px; color: #555; }
#main-navbar .brand img { height: 30px; width: auto; }
#main-navbar .brand .brand-text { font-size: 11px; font-weight: 600; line-height: 12px; text-transform: uppercase; letter-spacing: .3px; }
#main-navbar .brand .brand-text small { display: block; font-size: 9px; font-weight: 400; font-style: italic; text-transform: none; color: var(--muted-3); letter-spacing: 0; }
#main-navbar .global-search { flex: 1; display: flex; justify-content: center; position: relative; }
#main-navbar .global-search input { width: 220px; height: 26px; background: #fafafa; border: 1px solid #ddd; border-radius: 4px; font-size: 13px; padding: 4px 4px 4px 9px; color: var(--text); outline: none; }
#main-navbar .global-search input::placeholder { color: var(--muted-3); }
#main-navbar .nav-right { display: flex; align-items: stretch; height: 46px; }
#main-navbar .tasks-link { font-size: 12px; font-weight: 700; color: #555; line-height: 46px; padding: 0 20px; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
#main-navbar .tasks-link .badge { background: var(--red); color: #fff; border-radius: 9px; font-size: 10px; padding: 1px 6px; margin-left: 4px; }
#main-navbar .user-menu { display: flex; align-items: center; gap: 8px; padding: 0 18px 0 12px; cursor: pointer; position: relative; min-width: 190px; }
#main-navbar .user-menu .avatar { width: 30px; height: 30px; border-radius: 50%; background: #ddd url("../img/silhouette.724db557fe2a.svg") center/cover; border: 1px solid #ccc; }
#main-navbar .user-menu .who { font-size: 11.2px; line-height: 13px; letter-spacing: .56px; color: #333; }
#main-navbar .user-menu .who small { display: block; color: var(--muted-3); font-size: 9.5px; letter-spacing: 0; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.color-bar { position: fixed; top: 46px; left: 170px; right: 0; height: 4px; display: flex; z-index: 99; }
.color-bar span { flex: 1; }
.color-bar span:nth-child(1) { background: var(--blue); }
.color-bar span:nth-child(2) { background: var(--red); }
.color-bar span:nth-child(3) { background: var(--mint); }
.color-bar span:nth-child(4) { background: var(--teal-dark); }
.color-bar span:nth-child(5) { background: var(--lime); }

/* ---------- Dropdowns ---------- */
.dropdown { position: relative; }
.dropdown-menu { display: none; position: absolute; top: 100%; right: 0; min-width: 180px; background: #fff; border: 1px solid rgba(0,0,0,.15); border-radius: 4px; box-shadow: 0 6px 12px rgba(0,0,0,.175); padding: 5px 0; z-index: 1000; list-style: none; margin: 2px 0 0; }
.dropdown.open > .dropdown-menu { display: block; }
.dropdown-menu a, .dropdown-menu button { display: block; width: 100%; text-align: left; padding: 4px 20px; color: #333; font-size: 13px; background: none; border: 0; cursor: pointer; white-space: nowrap; }
.dropdown-menu a:hover, .dropdown-menu button:hover { background: #f5f5f5; text-decoration: none; }
.dropdown-menu .divider { height: 1px; margin: 5px 0; background: #e5e5e5; }

/* ---------- Left menu ---------- */
#main-menu { position: fixed; top: 46px; bottom: 0; left: 0; width: 170px; background: var(--menu-bg); border-right: 1px solid var(--line); overflow-y: auto; z-index: 90; }
#add-new-area { padding: 14px 18px 14px; border-bottom: 1px solid var(--line); position: relative; }
#add-new-btn { display: flex; align-items: center; justify-content: space-between; width: 129px; height: 38px; background: var(--green); color: #fff; border-radius: 3px; font-size: 15px; padding: 0 10px 0 12px; border: 0; cursor: pointer; }
#add-new-btn .fa-plus-circle { margin-right: 6px; }
#add-new-btn:hover { background: #43ad86; text-decoration: none; }
#add-new-area .new-activity-list { display: none; position: absolute; left: 18px; top: 54px; width: 160px; background: #fff; border: 1px solid #ccc; border-radius: 3px; box-shadow: 0 6px 12px rgba(0,0,0,.175); z-index: 200; padding: 4px 0; margin: 0; list-style: none; }
#add-new-area.open .new-activity-list { display: block; }
.new-activity-list a { display: block; padding: 6px 14px; font-size: 13px; color: #333; }
.new-activity-list a:hover { background: #f5f5f5; text-decoration: none; }
.nav-item { border-bottom: 1px solid var(--line); }
.nav-item > a { position: relative; display: flex; justify-content: space-between; align-items: center; height: 38px; padding: 10px 14px 8px 18px; font-size: 12px; color: var(--muted); background: var(--menu-bg); }
.nav-item > a .fa { color: #aaa; font-size: 14px; }
.nav-item > a:hover { color: var(--text-dark); text-decoration: none; }
.nav-item.open > a, .nav-item.current > a { background: #fff; color: var(--text-dark); }
.nav-item.open > a .fa { transform: rotate(0); }
.nav-submenu { display: none; }
.nav-item.open .nav-submenu { display: block; }
.nav-submenu a { position: relative; display: block; height: 33px; padding: 7px 14px 5px 27px; font-size: 12px; color: var(--muted); background: #fff; border-top: 1px solid var(--line-2); }
.nav-submenu a:hover { color: var(--text-dark); text-decoration: none; }
.nav-submenu a.active { color: var(--text-dark); border-top-color: var(--line); }
.nav-submenu a.active::after { content: ""; position: absolute; left: 0; top: 0; width: 5px; height: 32px; background: var(--amber); }

/* ---------- Content frame ---------- */
#content-wrapper { margin-left: 170px; padding-top: 50px; min-height: 100vh; }
.page-breadcrumb { background: var(--menu-bg); border-bottom: 1px solid var(--line); font-size: 11px; color: var(--muted); padding: 8px 40px; line-height: 16px; }
.page-breadcrumb .slash { margin: 0 4px; color: #aaa; }
.page-breadcrumb .slash:first-child { display: none; }
.page-breadcrumb a { color: var(--muted); text-decoration: underline; }
.page-header { padding: 20px 40px 18px; border-bottom: 1px solid var(--line); position: relative; }
.page-header h1 { font-size: 20px; font-weight: 600; line-height: 26px; color: #333; }
.page-header .subtitle { font-size: 12px; color: var(--muted); margin-top: 2px; }
.page-header .header-actions { position: absolute; right: 40px; top: 20px; display: flex; gap: 6px; }
.page-body { padding: 20px 40px 60px; }
.page-body.with-rail { margin-right: 52px; }

.flash { margin: 12px 40px 0; padding: 10px 14px; border-radius: 4px; font-size: 13px; border: 1px solid; }
.flash.success, .flash.info { background: #e9f6f0; border-color: #bfe3d3; color: #2e7d60; }
.flash.error { background: #fbeceb; border-color: #f0c2bf; color: #a33a33; }
.flash.warning { background: #fdf6e3; border-color: #f2dca0; color: #8a6d3b; }
.unsaved-bar { position: fixed; left: 170px; right: 0; bottom: 0; background: #fff8e1; border-top: 1px solid #f2dca0; padding: 10px 40px; font-size: 13px; z-index: 80; display: none; }
.unsaved-bar.show { display: flex; justify-content: space-between; align-items: center; }

/* ---------- Right icon rail ---------- */
.right-rail { position: fixed; top: 50px; right: 0; bottom: 0; width: 52px; background: #f1f3f3; border-left: 1px solid var(--line); padding-top: 10px; z-index: 70; }
.right-rail a, .right-rail button { display: block; width: 100%; text-align: center; font-size: 9px; line-height: 10px; color: #555; padding: 6px 2px 8px; background: none; border: 0; cursor: pointer; }
.right-rail a .fa, .right-rail button .fa { display: block; font-size: 15px; margin-bottom: 3px; color: #444; }
.right-rail a:hover, .right-rail button:hover { color: var(--text-dark); background: #e6eaea; text-decoration: none; }
.right-rail .needs-selection { display: none; }
.right-rail.has-selection .needs-selection { display: block; }

/* ---------- Tabs ---------- */
.nav-tabs { display: flex; list-style: none; margin: 0; padding: 0; border-bottom: 2px solid rgba(0,0,0,.11); background: #fff; }
.nav-tabs li { margin-bottom: -2px; }
.nav-tabs li:first-child { margin-left: 20px; }
.nav-tabs a { display: block; padding: 8px 20px; font-size: 14px; color: var(--muted-2); border-bottom: 2px solid transparent; }
.nav-tabs a:hover { color: #555; text-decoration: none; }
.nav-tabs li.active a { color: #555; border-bottom-color: var(--green); }
.tabs-right { display: flex; justify-content: flex-end; gap: 0; }
.tabs-right a { padding: 8px 18px; font-size: 13px; color: var(--muted-2); border-top: 3px solid transparent; background: transparent; }
.tabs-right a.active { background: var(--well); color: #555; border-top-color: var(--green); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; line-height: 15px; padding: 7px 9px; border-radius: 4px; border: 1px solid #ccc; background: #fafafa; color: #555; cursor: pointer; white-space: nowrap; text-decoration: none; }
.btn:hover { background: #f0f0f0; text-decoration: none; color: #333; }
.btn-success { background: var(--green-btn); border-color: var(--green-btn-border); color: #fff; }
.btn-success:hover { background: #39a07a; color: #fff; }
.btn-info { background: var(--info); border-color: var(--info-border); color: #fff; }
.btn-info:hover { background: #5aa3ba; color: #fff; }
.btn-danger { background: var(--danger); border-color: #c9302c; color: #fff; }
.btn-danger:hover { background: #c9302c; color: #fff; }
.btn-grey { background: #e0e0e0; border-color: #e0e0e0; color: #333; font-weight: 400; padding: 11px 20px; }
.btn-sm { font-size: 12px; padding: 4px 8px; }
.btn-lg { font-size: 15px; padding: 10px 16px; }
.btn[disabled], .btn.disabled { opacity: .6; cursor: not-allowed; }
.btn-link { background: none; border: 0; color: var(--green-link); padding: 0; font-weight: 600; cursor: pointer; }

/* ---------- Forms ---------- */
label { font-size: 13px; color: #333; }
.form-row { display: flex; gap: 28px; margin-bottom: 18px; }
.form-row > * { flex: 1; }
.form-group { margin-bottom: 14px; }
.form-group > label { display: block; margin-bottom: 4px; font-weight: 400; }
.form-control, input[type=text], input[type=email], input[type=tel], input[type=number], input[type=date], input[type=password], input[type=url], select, textarea {
  width: 100%; height: 28px; font-size: 13px; color: #333; border: 1px solid #c8c8c8; border-radius: 2px; padding: 3px 8px; background: #fff; outline: none; }
textarea { height: auto; min-height: 60px; }
select { padding: 2px 6px; }
.form-control:focus, input:focus, select:focus, textarea:focus { border-color: #8fc9b2; box-shadow: 0 0 0 2px rgba(75,189,147,.15); }
input[type=checkbox], input[type=radio] { width: auto; height: auto; }
.checkbox { display: flex; align-items: center; gap: 8px; margin: 8px 0; }
.help-block { font-size: 11px; color: var(--muted-3); font-style: italic; }
.required::before { content: "* "; }
.errorlist { color: var(--danger); font-size: 12px; list-style: none; padding: 0; margin: 2px 0; }
.form-centered { max-width: 460px; margin: 0 auto; }
.form-section-title { font-size: 18px; font-weight: 600; color: #333; margin: 26px 0 10px; }

/* ---------- Wells, panels, cards ---------- */
.well { background: var(--well); border: 1px solid #e3e3e3; border-radius: 3px; padding: 19px; }
.panel-box { border: 1px solid var(--line); border-radius: 3px; background: #fff; margin-bottom: 20px; }
.panel-box > .panel-title { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px 6px; font-size: 15px; font-weight: 700; color: var(--teal-dark); }
.panel-box > .panel-title a { font-size: 12px; font-weight: 700; color: var(--green-link); }
.panel-box > .panel-body { padding: 6px 14px 14px; font-size: 13px; }
.section-title { font-size: 15px; font-weight: 700; color: var(--teal-dark); margin: 10px 0 8px; }
.empty-state { color: var(--muted); font-size: 13px; padding: 10px 0; }

/* KPI strip */
.kpi-strip { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--line); }
.kpi-strip > div { padding: 14px 20px 18px; border-right: 1px solid var(--line); }
.kpi-strip > div:last-child { border-right: 0; }
.kpi-strip h3 { font-size: 15px; font-weight: 700; color: var(--teal-dark); margin-bottom: 10px; }
.kpi-strip .kpi-label { font-size: 12px; color: var(--muted); line-height: 17px; }
.kpi-strip .kpi-value { font-size: 16px; font-weight: 700; color: #333; margin: 2px 0 12px; line-height: 16px; }
.kpi-strip .kpi-value a { color: #333; }
.kpi-strip .kpi-value small { font-weight: 400; color: var(--muted); font-size: 12px; }
.kpi-strip .grey { background: #f7f7f7; color: var(--muted); font-size: 12px; }
.kpi-strip .grey h3 { color: #999; }

/* status pills */
.pill { display: inline-block; font-size: 9px; font-weight: 700; letter-spacing: .4px; padding: 1px 6px; border-radius: 2px; text-transform: uppercase; }
.pill-success { background: #e2f4ec; color: #3f9b78; border: 1px solid #c6e8d9; }
.pill-danger { background: #fbe4e2; color: #c9554b; border: 1px solid #f2c5c0; }
.pill-info { background: #e3f0f5; color: #3f7f97; border: 1px solid #c6dfe9; }
.pill-muted { background: #eee; color: #777; border: 1px solid #ddd; }

/* Activity cards (Recent Activity / Activities) */
.activity-card { border: 1px solid var(--line); border-radius: 3px; padding: 10px 12px; margin-bottom: 10px; background: #fff; display: grid; grid-template-columns: 1fr auto auto; gap: 8px 14px; align-items: start; }
.activity-card .sentence { font-size: 12.5px; font-weight: 600; color: #333; line-height: 17px; margin-top: 4px; }
.activity-card .meta { font-size: 11.5px; color: var(--muted); }
.activity-card .amount { font-weight: 700; font-size: 13px; }
.activity-card .amount.declined { color: var(--danger); font-size: 11px; letter-spacing: .3px; }
.activity-card .details { grid-column: 1 / -1; display: none; font-size: 12px; color: #555; border-top: 1px dashed var(--line); padding-top: 8px; }
.activity-card.expanded .details { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 20px; }
.date-group-header { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; color: #555; margin: 18px 0 8px; }

/* ---------- Tables ---------- */
table.table { width: 100%; border-collapse: collapse; font-size: 13px; }
table.table th { text-align: left; font-weight: 600; color: #333; padding: 8px 8px; border-bottom: 2px solid #ddd; white-space: nowrap; }
table.table td { padding: 8px 8px; border-bottom: 1px solid #eee; vertical-align: middle; }
table.table tr:nth-child(even) td { background: #fcfcfc; }
table.table.striped tbody tr:nth-child(odd) td { background: #f6f6f6; }
table.table th.centered, table.table td.centered { text-align: center; }
table.table .money { text-align: right; }

/* ---------- Pagination ---------- */
.pagination { display: flex; justify-content: flex-end; gap: 3px; margin: 10px 0; font-size: 11px; }
.pagination a, .pagination span { display: inline-block; min-width: 24px; height: 24px; line-height: 22px; padding: 0 7px; border: 1px solid #ddd; border-radius: 2px; color: #888; text-align: center; background: #fff; text-transform: uppercase; }
.pagination .current { background: var(--page-blue); border-color: var(--page-blue); color: #fff; }
.pagination a:hover { background: #f4f4f4; text-decoration: none; }
.pagination .gap { border: 0; }

/* ---------- Modals ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 1040; display: none; }
.modal-backdrop.show { display: block; }
.modal { position: fixed; top: 28px; left: 50%; transform: translateX(-50%); width: 570px; max-width: calc(100vw - 24px); max-height: calc(100vh - 56px); background: #fff; border-radius: 3px; box-shadow: 0 5px 15px rgba(0,0,0,.5); z-index: 1050; display: none; flex-direction: column; }
.modal.show { display: flex; }
.modal.modal-wide { width: 720px; }
.modal-header { padding: 12px 18px; border-bottom: 1px solid #e5e5e5; display: flex; justify-content: space-between; align-items: flex-start; }
.modal-header h3 { font-size: 18px; font-weight: 600; color: #333; }
.modal-header .sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.modal-header .close { background: none; border: 0; font-size: 20px; color: #999; cursor: pointer; line-height: 1; }
.modal-body { padding: 20px 18px; overflow-y: auto; flex: 1 1 auto; min-height: 0; }
/* Most modals wrap body + footer in a <form>: let the form shrink to the modal's max-height too, so the body scrolls
   and the header and footer (Save / Cancel) stay in view. */
.modal > form { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.modal-header, .modal-footer { flex: none; }
.modal-body .form-centered { max-width: 380px; }
.modal-footer { padding: 12px 18px; border-top: 1px solid #e5e5e5; display: flex; justify-content: space-between; gap: 8px; }
.modal-footer .left, .modal-footer .right { display: flex; gap: 6px; }
.advanced-options { background: var(--well); border: 1px solid #e3e3e3; padding: 12px 10px; margin-top: 18px; }
.advanced-options .adv-head { display: flex; justify-content: space-between; align-items: center; font-weight: 600; font-size: 13px; }
.advanced-options .adv-body { display: none; margin-top: 14px; }
.advanced-options.open .adv-body { display: block; }

/* ---------- Typeahead ---------- */
.typeahead-menu { position: absolute; top: 100%; left: 0; right: 0; background: #fff; border: 1px solid #ccc; border-radius: 3px; box-shadow: 0 6px 12px rgba(0,0,0,.15); z-index: 300; max-height: 320px; overflow-y: auto; display: none; }
.typeahead-menu.show { display: block; }
.typeahead-menu a { display: block; padding: 6px 10px; font-size: 13px; color: #333; border-bottom: 1px solid #f3f3f3; }
.typeahead-menu a small { color: var(--muted-3); display: block; font-size: 11px; }
.typeahead-menu a.active, .typeahead-menu a:hover { background: #eef7f3; text-decoration: none; }

/* ---------- Login ---------- */
body.login { background: #f6f6f6; }
.login-top { height: 46px; background: #fff; display: flex; align-items: center; padding: 0 18px; border-bottom: 1px solid var(--line); }
.login-top img { height: 32px; }
.login-card { width: 310px; margin: 40px auto; background: #fff; border: 1px solid #e3e3e3; padding: 0 0 22px; }
.login-card .color-bar-static { display: flex; height: 4px; }
.login-card .color-bar-static span { flex: 1; }
.login-card .color-bar-static span:nth-child(1) { background: var(--blue); }
.login-card .color-bar-static span:nth-child(2) { background: var(--red); }
.login-card .color-bar-static span:nth-child(3) { background: var(--mint); }
.login-card .color-bar-static span:nth-child(4) { background: var(--teal-dark); }
.login-card .color-bar-static span:nth-child(5) { background: var(--lime); }
.login-card .inner { padding: 18px 40px 0; }
.login-card h2 { font-size: 15px; font-weight: 600; margin-bottom: 18px; }
.login-card p { font-size: 12px; color: #333; margin: 0 0 12px; }
.login-card label { font-size: 11px; color: #555; }
.login-card input[type=text], .login-card input[type=password], .login-card input[type=email] { height: 32px; margin: 3px 0 12px; }
.login-card .btn-success { width: 100%; justify-content: center; height: 34px; background: #6db89c; border-color: #6db89c; font-weight: 400; }
.login-card .forgot { display: block; text-align: center; font-size: 11px; color: var(--mint); margin-top: 22px; }

@media print {
  #main-navbar, #main-menu, .color-bar, .right-rail, .page-breadcrumb, .no-print { display: none !important; }
  #content-wrapper { margin: 0; padding: 0; }
}

/* ---------- Dashboard ---------- */
.dash { display: grid; grid-template-columns: 1fr 220px; min-height: calc(100vh - 84px); }
.dash-main { border-right: 1px solid var(--line); min-width: 0; }
.dash-welcome { padding: 22px 24px 18px; border-bottom: 1px solid var(--line); }
.dash-welcome h2 { font-size: 20px; font-weight: 500; color: #333; }
.dash-kpis h3 { font-size: 14px; color: #333; }
.dash-section { padding: 14px 24px 10px; border-bottom: 1px solid var(--line); }
.dash-section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.dash-section-head .section-title { margin: 0; color: var(--teal-dark); font-size: 13px; }
.dash-section-head .manage { font-size: 11px; font-weight: 700; }
.legend { font-size: 10px; color: #666; display: flex; gap: 10px; }
.legend i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 4px; }
svg.yoy { width: 100%; height: 170px; }
svg.yoy text { font-size: 9px; fill: #888; }
.dash-two { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); }
.dash-dist { padding: 14px 24px 18px; }
.dash-dist:first-child { border-right: 1px solid var(--line); }
table.dist { width: 100%; font-size: 12px; border-collapse: collapse; }
table.dist td { padding: 4px 4px; }
table.dist .name a { color: #333; text-decoration: underline; }
table.dist .bar { width: 40%; }
table.dist .track { display: block; height: 7px; background: #eaeaea; border-radius: 4px; overflow: hidden; }
table.dist .fill { display: block; height: 7px; border-radius: 4px; }
table.dist .pct, table.dist .amt { text-align: right; white-space: nowrap; font-weight: 600; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; }
.c1 { background: var(--blue); } .c2 { background: var(--red); } .c3 { background: var(--mint); } .c4 { background: var(--teal-dark); } .c5 { background: var(--lime); }
.dash-pyramid { padding: 16px 24px 30px; }
.dash-pyramid .section-title { color: #333; margin: 0; }
.pyr-sub { font-size: 13px; font-weight: 600; margin-bottom: 8px; }
table.pyramid { width: 70%; border-collapse: collapse; font-size: 12px; }
table.pyramid th { text-align: center; font-weight: 600; padding: 4px; }
table.pyramid td { padding: 0 6px; height: 46px; }
table.pyramid .tier { text-align: right; color: #888; font-size: 10px; vertical-align: top; width: 40px; }
table.pyramid .shape { width: 55%; }
table.pyramid .trap { margin: 0 auto; width: var(--w); height: 42px; background: #7aa9be; clip-path: polygon(8% 0, 92% 0, 100% 100%, 0 100%); }
table.pyramid .num { text-align: center; font-weight: 600; }
table.pyramid .num small { display: block; color: var(--green-link); font-weight: 400; }
table.pyramid .num small.b { color: #333; font-weight: 700; }
.dash-recent { background: #fff; font-size: 12px; }
.recent-head { display: flex; justify-content: space-between; padding: 12px 12px 8px; font-weight: 700; color: var(--teal-dark); font-size: 13px; }
.recent-head a { font-size: 11px; }
.recent-date { padding: 6px 12px 2px; font-size: 10px; color: #888; font-weight: 600; border-top: 1px solid var(--line); }
.recent-item { position: relative; padding: 8px 12px 10px; border-bottom: 1px solid var(--line-2); }
.ri-top { display: flex; justify-content: space-between; gap: 6px; }
.ri-top a { color: var(--green-link); font-weight: 400; }
.ri-amt { font-weight: 700; color: #333; }
.ri-amt.declined { font-size: 11px; }
.ri-text { font-size: 10.5px; font-weight: 700; color: #333; line-height: 14px; }
.ri-camp { font-size: 10px; color: #666; }
.ri-menu { position: absolute; right: 12px; bottom: 6px; }
.ri-menu .dots { font-size: 9px; color: #fff; background: var(--green); padding: 1px 6px; border-radius: 2px; letter-spacing: 1px; }

/* ---------- Filter panel (Basic Search / Saved Searches) ---------- */
.filter-panel-wrap { margin-bottom: 18px; }
.filter-panel-wrap .tabs-right { margin-right: 0; }
.filter-panel-wrap .tabs-right .hidden-list { display: none; }
.fp-tab { padding: 8px 18px; font-size: 13px; color: var(--muted-2); border-top: 3px solid transparent; }
.fp-tab.active { background: var(--well); color: #555; border-top-color: var(--green); }
.fp-tab:hover { text-decoration: none; }
.filter-panel { background: var(--well); padding: 0 16px 16px; min-height: 180px; }
.fp-subtabs { display: flex; list-style: none; margin: 0 0 6px; padding: 0; border-bottom: 1px solid #ddd; flex-wrap: wrap; }
.fp-subtabs a { display: block; padding: 10px 18px 8px; font-size: 12.5px; color: #666; border-bottom: 2px solid transparent; }
.fp-subtabs li.active a { color: #333; border-bottom-color: var(--green); }
.fp-subtabs a:hover { text-decoration: none; color: #333; }
.fp-section h3 { font-size: 22px; font-weight: 300; color: #777; margin: 10px 0 4px; }
.fp-help { font-style: italic; font-size: 11.5px; color: #777; margin: 0 0 14px; }
.fp-field-title { font-size: 10px; font-weight: 700; color: #555; text-transform: uppercase; letter-spacing: .3px; margin: 10px 0 4px; display: flex; justify-content: space-between; gap: 12px; }
.fp-note { font-weight: 400; text-transform: none; font-style: italic; color: #888; letter-spacing: 0; font-size: 11px; }
.fp-row { display: flex; gap: 14px; align-items: flex-end; padding-bottom: 12px; border-bottom: 1px solid #ddd; }
.fp-row label { flex: 1; font-size: 10px; font-weight: 700; color: #555; text-transform: uppercase; }
.fp-row input { margin-top: 3px; height: 30px; }
.fp-line { display: flex; gap: 8px; align-items: center; padding: 6px 0; }
.fp-line .fp-label { width: 190px; font-size: 10px; font-weight: 700; color: #555; text-transform: uppercase; }
.fp-line select.isnot { width: 80px; }
.fp-line input.val, .fp-line select.val { width: 260px; }
.fp-letters { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.fp-letters a { display: inline-block; width: 24px; height: 24px; line-height: 24px; text-align: center; background: #fff; border: 1px solid #ddd; color: #555; font-size: 12px; }
.fp-letters a:hover { background: var(--green); color: #fff; text-decoration: none; }
.fp-chips { display: flex; flex-wrap: wrap; gap: 6px; max-height: 200px; overflow-y: auto; margin-bottom: 8px; }
.fp-chips a { background: #fff; border: 1px solid #ddd; border-radius: 3px; padding: 3px 9px; font-size: 12px; color: #444; }
.fp-chips a:hover { border-color: var(--green); text-decoration: none; }
.fp-validation { color: var(--danger); font-size: 12px; }
.saved-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding-top: 12px; }
.saved-cols header { font-weight: 700; font-size: 12px; color: #555; margin-bottom: 6px; }
.saved-list { list-style: none; margin: 0; padding: 0; max-height: 228px; overflow-y: auto; }
.saved-list li { background: #fff; border: 1px solid #e3e3e3; border-radius: 3px; padding: 5px 8px; margin-bottom: 4px; font-size: 12px; cursor: pointer; position: relative; padding-right: 22px; }
.saved-list li:hover { border-color: var(--green); }
.saved-list .filter-name { font-weight: 600; color: #333; }
.saved-list .filter-description { color: #777; }
.saved-list .destroy { position: absolute; right: 6px; top: 6px; color: #aaa; }
.current-view { margin-top: 14px; }
.cv-label { font-size: 12px; font-weight: 600; color: #333; margin-bottom: 4px; }
.cv-bar { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; border: 1px solid #ddd; background: #fff; padding: 4px 8px; min-height: 34px; }
.cv-add { display: flex; align-items: center; gap: 4px; color: #888; font-size: 12px; }
.cv-add input { border: 0; width: 70px; height: 24px; padding: 0 2px; font-size: 12px; box-shadow: none !important; }
.cv-add input:focus { width: 200px; }
.cv-chips { display: flex; flex-wrap: wrap; gap: 4px; flex: 1; align-items: center; }
.cv-chip { background: #e7f5ef; border: 1px solid #bfe3d3; border-radius: 3px; padding: 2px 6px; font-size: 12px; color: #2e7d60; }
.cv-chip.cv-not { background: #fbeceb; border-color: #f0c2bf; color: #a33a33; }
.cv-chip a { color: inherit; font-weight: 700; margin-left: 2px; }
.cv-chip a:hover { text-decoration: none; }
.cv-connector { font-size: 11px; font-weight: 700; text-transform: uppercase; color: #888; padding: 0 2px; }
.cv-save, .cv-clear { font-size: 11px; color: #c9554b; margin-left: auto; }
.cv-save { color: var(--green-link); margin-left: 0; }
.cv-bar .typeahead-menu { top: 100%; left: 0; right: auto; width: 320px; }
.cv-editor { position: absolute; top: 100%; left: 0; z-index: 310; background: #fff; border: 1px solid #ccc; box-shadow: 0 6px 12px rgba(0,0,0,.15); padding: 12px; width: 360px; border-radius: 3px; }
.cv-editor input, .cv-editor select { margin-bottom: 6px; }
.cv-editor-title { font-weight: 700; margin-bottom: 6px; }
.cv-editor .ed-multi { max-height: 220px; overflow-y: auto; border: 1px solid #eee; padding: 4px 8px; margin-bottom: 6px; }
.cv-editor .ed-multi .checkbox { margin: 3px 0; font-size: 12px; }
.cv-editor-actions { display: flex; justify-content: flex-end; gap: 6px; }

/* ---------- Results ---------- */
.results-head { display: flex; align-items: baseline; gap: 22px; margin: 22px 0 6px; }
.results-head h2 { font-size: 30px; font-weight: 400; color: #555; }
.results-head h2 .count { color: var(--green); }
.results-toggle { font-size: 13px; text-transform: uppercase; color: #555; letter-spacing: .3px; }
.results-toggle.active { color: var(--green); }
.selection-line { font-size: 13px; color: #555; }
.selection-line a { color: #bbb; margin-left: 8px; font-size: 11px; }
.avatar-circle { display: inline-block; width: 30px; height: 30px; border-radius: 50%; background: #fff url("../img/silhouette.724db557fe2a.svg") center/cover; border: 2px solid #fff; box-shadow: 0 0 0 1px #c9d6da; flex-shrink: 0; }
.avatar-circle.lg { width: 54px; height: 54px; }
.contact-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.contact-card { border: 1px solid #dfe5e7; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.cc-head { position: relative; background: #8ea7ae; color: #fff; padding: 12px 8px 16px 8px; display: flex; align-items: center; gap: 8px; min-height: 58px; }
.cc-name { color: #fff; font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: calc(100% - 50px); }
.cc-head input { position: absolute; top: 6px; right: 6px; }
.cc-code { position: absolute; right: 8px; bottom: 3px; font-size: 9px; letter-spacing: .4px; opacity: .9; }
.cc-body { display: flex; justify-content: space-around; padding: 16px 6px 18px; text-align: center; }
.cc-body span { display: block; font-size: 11px; color: #888; }
.cc-body b { font-size: 14px; color: #333; }
table.contact-list .avatar-cell { width: 44px; }
.cl-name { font-size: 15px; font-weight: 600; color: #333; }
.cl-loc { font-size: 10.5px; color: #777; }
.cl-info { font-size: 11.5px; color: #666; }

/* ---------- Contact header & overview ---------- */
.contact-header { padding: 18px 40px 0; background: #fff; }
.ch-main { display: flex; gap: 16px; align-items: center; margin-bottom: 14px; }
.ch-main h1 { font-size: 21px; font-weight: 600; color: #333; }
.ch-code { font-size: 11px; color: #999; font-weight: 400; margin-left: 4px; }
.ch-social { font-size: 15px; color: #999; margin-left: 4px; }
.ch-line { font-size: 12px; color: #666; margin-top: 2px; }
.ch-line a { color: #666; }
.ch-note { font-size: 11px; color: #777; font-style: italic; margin-top: 3px; }
.contact-tabs li:first-child { margin-left: 0; }
.overview-mid { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); }
.ov-contrib { padding: 14px 24px 18px; border-right: 1px solid var(--line); }
.ov-chart { padding: 14px 24px 10px; }
.small-tabs { border-bottom-width: 1px; margin-bottom: 14px; }
.small-tabs li:first-child { margin-left: 0; }
.small-tabs a { font-size: 12px; padding: 6px 12px; }
.contrib-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 10px; }
.contrib-grid span { display: block; font-size: 11.5px; color: #666; }
.contrib-grid b { font-size: 14px; color: #333; }
.overview-lower { display: grid; grid-template-columns: 1.3fr 1fr 0.8fr; gap: 20px; padding: 18px 24px 40px; background: #fafbfb; }
.ov-block-head { display: flex; justify-content: space-between; align-items: center; margin: 6px 0 8px; }
.ov-block-head .section-title { margin: 0; }
.ov-block-head a { font-size: 12px; font-weight: 700; }
.rel-row { margin-bottom: 8px; }
.rel-label { font-size: 11.5px; color: #666; }
.dot-list a { color: var(--green-link); }
.pledge-row { margin-bottom: 8px; }
.kpi-strip .grey p { margin: 0; line-height: 18px; }

/* ---------- Profile ---------- */
.profile-layout { display: grid; grid-template-columns: 170px 1fr; min-height: 60vh; }
.profile-subnav { border-right: 1px solid var(--line); padding: 16px 0; background: #fbfcfc; }
.profile-subnav a { display: block; padding: 8px 20px; font-size: 13px; color: #666; }
.profile-subnav a.active { color: #222; font-weight: 600; border-left: 3px solid var(--green); padding-left: 17px; background: #fff; }
.profile-panes { padding: 6px 40px 60px; }
.contact-tab-header { border-bottom: 1px solid var(--line); margin: 26px 0 14px; padding-bottom: 6px; }
.contact-tab-header.first-on-page { margin-top: 12px; }
.contact-tab-header h2 { font-size: 17px; font-weight: 600; color: #333; overflow: hidden; }
.control-group { display: grid; grid-template-columns: 200px 1fr; align-items: center; gap: 12px; margin-bottom: 10px; max-width: 640px; }
.control-group > label { text-align: right; font-size: 12.5px; color: #555; }
.control-group .controls.readonly { font-size: 13px; }
.form-actions { margin: 18px 0 0 212px; }
.pref-grid { display: grid; grid-template-columns: repeat(2, minmax(200px, 280px)); gap: 2px 20px; margin-bottom: 12px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.profile-card { border: 1px solid var(--line); background: #fff; padding: 14px; min-height: 120px; }
.profile-card h4 { font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.profile-card.add-new { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; background: #fbfcfc; }
.profile-card.add-new h3 { font-size: 15px; color: #555; }
.profile-card .card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.pledge-status { font-weight: 700; color: #555; }
.external-info-item { display: flex; justify-content: space-between; max-width: 560px; font-size: 13px; padding: 5px 0; border-bottom: 1px dotted #e3e3e3; color: #555; }
.external-info-item span { color: #222; }
.no-history-msg { color: #888; font-weight: 400; font-size: 14px; }
.audit-row { border-bottom: 1px solid var(--line); padding: 10px 0; }
.audit-statement { display: flex; align-items: center; gap: 10px; font-size: 13px; flex-wrap: wrap; }
.audit-ts { color: #888; font-size: 12px; }
.audit-table { display: none; margin-top: 8px; max-width: 760px; }
.audit-row.open .audit-table { display: table; }

/* ---------- New contact ---------- */
.new-contact-form { max-width: 480px; margin: 0 auto; }
.nc-row { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; margin-bottom: 18px; }
.nc-row.three { grid-template-columns: 70px 1fr 1fr; gap: 26px; }
.nc-row .full { grid-column: 1 / -1; }
.nc-col-half { max-width: 210px; }
.nc-actions { margin: 26px 0 40px; }

/* ---------- Giving pages ---------- */
.date-group-header { border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.date-group-header a { font-size: 11px; font-weight: 400; }
.sum-list { columns: 2; font-size: 12.5px; }
.split-row { display: flex; gap: 6px; margin: 6px 0; }
.pledge-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.pledge-tiles > * { border: 1px solid var(--line); padding: 12px 14px; color: #555; background: #fff; }
.pledge-tiles > a.active { border-color: var(--green); }
.pledge-tiles span { display: block; font-size: 12px; }
.pledge-tiles b { font-size: 20px; color: #333; }
.campaign-list { list-style: none; padding: 0; margin: 14px 0; max-width: 760px; }
.campaign-list li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); margin-bottom: -1px; background: #fff; cursor: grab; }
.campaign-list .cname { flex: 1; font-weight: 600; color: #333; }
.campaign-list .fund { font-size: 12px; color: #777; }
.form-narrow { max-width: 460px; }
.batch-defaults .bd-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 18px; margin: 8px 0 12px; }
.batch-head { display: flex; justify-content: space-between; align-items: center; margin: 22px 0 6px; }
.batch-total { font-size: 18px; font-weight: 600; }
.batch-row-form { display: flex; gap: 6px; align-items: center; }
.batch-row-form input[type=text], .batch-row-form select { width: auto; }
.batch-row-form #batch-contact { width: 260px; }
.has-error input, .has-error select, .has-error textarea { border-color: var(--danger); }

/* ---------- Groups / Duplicates / Tasks ---------- */
.inline-form { display: flex; gap: 8px; align-items: center; }
.inline-form input, .inline-form select { width: auto; }
.dup-pair { border: 1px solid var(--line); margin-bottom: 12px; background: #fff; }
.dup-cols { display: grid; grid-template-columns: 1fr 1fr 0.9fr; }
.dup-cols > div { padding: 12px 14px; border-right: 1px solid var(--line); font-size: 12.5px; }
.dup-cols > div:last-child { border-right: 0; }
.dup-tag { font-size: 10px; text-transform: uppercase; font-weight: 700; color: #888; margin-bottom: 4px; letter-spacing: .4px; }
.dup-why ul { padding-left: 16px; margin: 0 0 10px; }
.dup-why form { display: flex; flex-wrap: wrap; gap: 4px; }
.tasks-count { font-size: 24px; font-weight: 600; margin-bottom: 6px; }
.task-card { display: flex; gap: 14px; align-items: flex-start; border: 1px solid var(--line); padding: 10px 14px; margin-bottom: 8px; background: #fff; }

/* ---------- Settings pages (Kindful settings-menu tiles; header + well forms) ---------- */
.settings-menu { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 30px; padding: 22px 40px 40px; max-width: 1180px; }
@media (min-width: 1500px) { .settings-menu { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.settings-panel { display: block; min-height: 78px; padding: 19px 20px 16px; background: #f5f5f5; border: 1px solid #e3e3e3; border-radius: 3px; box-shadow: inset 0 1px 1px rgba(0,0,0,.03); color: #333; }
.settings-panel:hover { background: #fff; border-color: #8c8c8c; color: #333; text-decoration: none; }
.settings-panel h4 { font-size: 16px; font-weight: 600; line-height: 20px; color: #333; }
.settings-panel p { margin: 6px 0 0; font-size: 12px; line-height: 16px; color: var(--muted); }
.settings-form { padding: 10px 40px 60px; max-width: 1000px; }
.settings-header { font-size: 20px; font-weight: 400; line-height: 26px; color: #333; margin: 26px 0 12px; }
.settings-hr { border: 0; border-top: 1px solid var(--line); margin: 26px 0 0; }
.settings-well { background: #f7f7f7; border: 1px solid #e6e6e6; border-radius: 3px; padding: 14px 12px 16px; margin-bottom: 18px; }
.settings-well h4 { font-size: 14px; font-weight: 600; color: #333; margin: 18px 0 8px; }
.settings-well > h4:first-child, .settings-well > form > h4:first-child { margin-top: 0; }
.settings-well .form-group { margin-bottom: 12px; }
.settings-well .form-group > label { font-size: 12.5px; font-weight: 600; color: #333; margin-bottom: 3px; }
.settings-well input[type=text], .settings-well input[type=email], .settings-well input[type=tel], .settings-well input[type=url],
.settings-well input[type=number], .settings-well input[type=password], .settings-well select, .settings-well textarea { max-width: 410px; }
.settings-well textarea.wide { max-width: none; }
.settings-well .help-block { font-style: normal; font-size: 10.5px; color: #777; margin-top: 3px; line-height: 14px; }
.settings-well .checkbox { font-size: 12.5px; font-weight: 600; align-items: flex-start; margin: 10px 0; }
.settings-well .checkbox input { margin-top: 3px; }
.settings-well small, .settings-note { display: block; font-size: 11.5px; color: #666; line-height: 16px; }
.settings-well .required-mark { color: #333; margin-right: 2px; }
.settings-well .img-preview { display: flex; align-items: center; gap: 12px; margin: 8px 0; }
.settings-well .img-preview img { max-width: 200px; max-height: 80px; border: 1px solid #ddd; background: #fff; padding: 2px; }
.settings-well .errorlist { margin-top: 3px; }
.settings-well input:disabled, .settings-well select:disabled, .settings-well textarea:disabled { background: #f0f0f0; color: #777; }
.settings-actions { margin-top: 14px; display: flex; gap: 8px; align-items: center; }
.settings-aside { font-size: 12px; color: var(--muted); margin: 22px 0 0; max-width: 760px; }
.k-alert { display: flex; gap: 10px; align-items: flex-start; border: 1px solid; border-radius: 3px; padding: 11px 14px; font-size: 13px; line-height: 18px; margin: 0 0 16px; max-width: 760px; }
.k-alert .fa { font-size: 17px; line-height: 18px; }
.k-alert strong { font-weight: 700; }
.k-alert-info { background: #eef6f9; border-color: #c6e0ea; color: #2f6273; }
.k-alert-danger { background: #f2dede; border-color: #ebccd1; color: #a94442; }
.k-alert-danger a { color: #843534; text-decoration: underline; }
.k-alert-big { font-size: 15px; font-weight: 600; }
.st-tab-body { padding: 18px 40px 50px; }
.st-tab-title { font-size: 20px; font-weight: 400; color: #333; margin: 8px 0 2px; }
.st-tab-sub { font-size: 13px; color: var(--muted); margin: 0 0 14px; }
.st-spread { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-top: 30px; }
table.table.bordered { border: 1px solid #ddd; }
table.table.bordered th, table.table.bordered td { border: 1px solid #ddd; }
table.table .actions { text-align: right; white-space: nowrap; }
table.table td.empty-row { text-align: center; color: var(--muted); padding: 14px 8px; }
.btn.is-disabled { background: #e9e9e9; border-color: #ddd; color: #999; cursor: not-allowed; }
.st-max { max-width: 900px; }

/* Account cards (Kindful's Account › Overview) */
.account-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; padding: 22px 40px 50px; max-width: 1180px; }
.account-card { border: 1px solid #e3e3e3; border-radius: 3px; background: #fff; padding: 18px 20px 20px; display: flex; flex-direction: column; min-height: 150px; }
.account-card h4 { font-size: 16px; font-weight: 600; color: #333; margin-bottom: 6px; }
.account-card p { font-size: 13px; color: #666; margin: 0 0 16px; flex: 1; }
.account-card .btn { align-self: flex-start; }
.account-sub { display: flex; gap: 0; padding: 0 40px; border-bottom: 2px solid rgba(0,0,0,.11); }
.account-sub a { padding: 8px 20px; font-size: 14px; color: #555; border-bottom: 2px solid var(--green); margin-bottom: -2px; }

/* Users */
.role-pill { display: inline-block; font-size: 11px; padding: 1px 8px; border-radius: 10px; background: #eef3f4; color: #447685; border: 1px solid #d6e3e7; white-space: nowrap; }
.role-pill.admin { background: #e7f5ef; color: #2e7d60; border-color: #bfe3d3; }
.user-inactive td { color: #999; }
.role-help { margin: 8px 0 0; padding: 0; list-style: none; font-size: 12px; color: #555; }
.role-help li { margin-bottom: 4px; }
.role-help b { color: #333; }

/* Forms (registration) cards */
.reg-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; margin-top: 16px; }
.reg-card { border: 1px solid #e3e3e3; background: #fff; display: flex; flex-direction: column; }
.reg-card .reg-top { height: 8px; background: var(--blue); }
.reg-card .reg-body { padding: 14px 14px 12px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.reg-card h2 { font-size: 15px; font-weight: 600; line-height: 20px; margin: 0; }
.reg-card h2 a { color: #333; }
.reg-card .reg-actions { margin-top: auto; font-size: 12px; color: #555; border-top: 1px solid var(--line-2); padding-top: 8px; }
.amount-boxes { display: flex; gap: 8px; flex-wrap: wrap; }
.amount-boxes .amt { display: flex; align-items: stretch; border: 1px solid #c8c8c8; border-radius: 2px; overflow: hidden; }
.amount-boxes .amt span { background: #eee; padding: 4px 8px; font-size: 13px; color: #555; border-right: 1px solid #c8c8c8; }
.amount-boxes .amt input { border: 0; width: 70px; height: 28px; }
.code-well { font-family: Menlo, Consolas, monospace; font-size: 12px; background: #f5f5f5; border: 1px solid #e3e3e3; padding: 8px 10px; }
fieldset.plain { border: 0; margin: 0; padding: 0; min-width: 0; }
.settings-well abbr.required-mark { text-decoration: none; border: 0; cursor: default; }
.settings-well textarea[rows="1"] { min-height: 34px; }
.settings-well textarea[rows="2"] { min-height: 48px; }
.settings-well > .form-group:last-child, .settings-well fieldset > .form-group:last-child { margin-bottom: 0; }

/* ---------- Import Data (/admin/import_jobs) ---------- */
.import-lead { font-size: 13px; color: #555; max-width: 860px; margin: 0 0 16px; }
.small-note { font-size: 12px; color: var(--muted); }
.import-steps { display: flex; list-style: none; margin: 0 0 24px; padding: 0; border-bottom: 1px solid var(--line); counter-reset: none; }
.import-steps li { flex: 1; position: relative; }
.import-steps li > a, .import-steps li > span { display: flex; align-items: center; gap: 8px; padding: 6px 4px 12px; font-size: 13px; color: var(--muted-3); border-bottom: 3px solid transparent; margin-bottom: -1px; }
.import-steps li > a:hover { text-decoration: none; color: #333; }
.import-steps .num { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; border: 2px solid #ccc; font-size: 12px; font-weight: 700; color: #999; background: #fff; flex-shrink: 0; }
.import-steps .is-done > a, .import-steps .is-done > span { color: #555; }
.import-steps .is-done .num { border-color: var(--green); background: var(--green); color: #fff; font-size: 11px; }
.import-steps .is-active > a, .import-steps .is-active > span { color: #333; font-weight: 600; border-bottom-color: var(--green); }
.import-steps .is-active .num { border-color: var(--green); color: var(--green-link); }
.import-form { max-width: 900px; }
.import-type-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 8px; }
.import-type-card { position: relative; display: flex; flex-direction: column; gap: 6px; border: 1px solid #d9e0e2; border-radius: 3px; padding: 14px 14px 12px 38px; background: #fff; cursor: pointer; min-height: 132px; }
.import-type-card:hover { border-color: var(--green); }
.import-type-card input { position: absolute; left: 14px; top: 16px; }
.import-type-card:has(input:checked) { border-color: var(--green); box-shadow: 0 0 0 2px rgba(75,189,147,.2); background: #f6fcf9; }
.itc-title { font-weight: 700; font-size: 14px; color: #333; }
.itc-help { font-size: 12px; color: var(--muted); line-height: 17px; flex: 1; }
.itc-template { font-size: 11.5px; font-weight: 600; }
.import-actions { display: flex; justify-content: flex-end; gap: 8px; margin: 22px 0 10px; padding-top: 16px; border-top: 1px solid var(--line); }
.import-actions.left { justify-content: flex-start; border-top: 0; padding-top: 0; margin: 4px 0 18px; }
.import-preset-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; background: var(--well); border: 1px solid #e3e3e3; padding: 10px 12px; margin-bottom: 16px; font-size: 13px; }
.import-preset-bar select { width: 280px; }
.import-preset-bar .import-note-warn { flex-basis: 100%; }
.import-note-warn { font-size: 12px; color: #8a6d3b; background: #fdf6e3; border: 1px solid #f2dca0; border-radius: 3px; padding: 5px 8px; margin-top: 4px; }
.import-problems { margin: 0 0 14px; }
.import-problems ul { margin: 4px 0 0; padding-left: 18px; }
.import-map-table td { vertical-align: top; }
.import-map-table tr.is-mapped td { background: #f6fcf9 !important; }
.import-map-table select.is-dup { border-color: var(--danger); }
.import-dup-msg { color: var(--danger); font-size: 11px; margin-top: 2px; }
.import-samples span { display: inline-block; background: #f3f5f5; border: 1px solid #e6eaea; border-radius: 2px; padding: 0 6px; margin: 0 4px 3px 0; font-size: 12px; color: #444; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: top; }
.import-help-box { background: #f3f8fa; border: 1px solid #d6e6ec; border-radius: 3px; padding: 10px 12px; font-size: 12.5px; color: #3f5f6a; margin: 14px 0; line-height: 19px; }
.import-save-preset { display: flex; align-items: center; gap: 10px; }
.import-save-preset .checkbox { margin: 0; }
.import-save-preset input[type=text] { width: 280px; }
.import-match-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 26px; align-items: start; }
.import-options h4 { font-size: 12px; font-weight: 700; color: #555; text-transform: uppercase; letter-spacing: .3px; margin: 14px 0 4px; }
.import-options h4:first-child { margin-top: 0; }
.import-options .checkbox { align-items: flex-start; font-size: 12.5px; margin: 5px 0; line-height: 17px; }
.import-options .checkbox input { margin-top: 2px; }
.import-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 0 0 14px; }
.import-tiles .tile { border: 1px solid var(--line); border-top: 3px solid #ccc; background: #fff; padding: 10px 14px 12px; }
.import-tiles .tile span { display: block; font-size: 12px; color: var(--muted); }
.import-tiles .tile b { display: block; font-size: 24px; line-height: 30px; color: #333; font-weight: 600; }
.import-tiles .tile small { font-size: 11.5px; color: var(--muted); }
.import-tiles .tile.ok { border-top-color: var(--green); }
.import-tiles .tile.new { border-top-color: var(--blue); }
.import-tiles .tile.warn { border-top-color: var(--amber); }
.import-tiles .tile.bad { border-top-color: var(--red); }
.import-tiles .tile.muted { border-top-color: #bbb; }
.import-bulk { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12.5px; margin: 6px 0 12px; }
.amb-group { display: grid; grid-template-columns: minmax(220px, 0.9fr) minmax(0, 1.4fr); border: 1px solid var(--line); border-left: 4px solid var(--amber); background: #fff; margin-bottom: 10px; }
.amb-group.is-decided { border-left-color: var(--green); }
.amb-row { padding: 10px 14px; border-right: 1px solid var(--line); font-size: 12.5px; }
.amb-tag { font-size: 10px; text-transform: uppercase; font-weight: 700; color: #888; letter-spacing: .4px; }
.amb-name { font-size: 14px; font-weight: 600; color: #333; margin: 2px 0; }
.amb-info { color: #555; line-height: 17px; }
.amb-why { margin-top: 6px; font-size: 11.5px; color: #8a6d3b; }
.amb-choices { padding: 8px 12px; }
.amb-choice { display: flex; gap: 8px; align-items: flex-start; padding: 5px 4px; border-bottom: 1px dotted #eee; font-size: 12.5px; cursor: pointer; }
.amb-choice:last-child { border-bottom: 0; }
.amb-choice input { margin-top: 3px; }
.amb-choice small { display: block; color: var(--muted); font-size: 11.5px; }
.amb-choice:has(input:checked) { background: #f6fcf9; }
.pagination .page-btn { display: inline-block; min-width: 24px; height: 24px; line-height: 22px; padding: 0 7px; border: 1px solid #ddd; border-radius: 2px; color: #888; background: #fff; font-size: 11px; cursor: pointer; }
.import-small-table { margin-bottom: 14px; }
.import-small-table td, .import-small-table th { font-size: 12.5px; padding: 6px 8px; }
.import-small-table tr.needs-choice td { background: #fdf6e3 !important; }
.import-details { margin: 12px 0; }
.import-details summary { cursor: pointer; font-size: 14px; font-weight: 700; color: var(--teal-dark); padding: 6px 0; }
.import-values-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 30px; }
.import-values-grid select { max-width: 100%; }
.new-campaign-fund { margin-top: 4px; font-size: 12px; color: #555; }
.new-campaign-fund select { margin-top: 2px; }
.import-history td { vertical-align: top; }
.import-undone { margin: 0 0 16px; }
.import-run-form .btn-lg { padding: 10px 22px; }
@media (max-width: 1100px) {
  .import-type-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .import-match-layout, .import-values-grid, .amb-group { grid-template-columns: 1fr; }
  .amb-row { border-right: 0; border-bottom: 1px solid var(--line); }
}

/* ======================================================================================================
   Responsive layer. Desktop (1024px and wider) keeps the Kindful look above unchanged; these rules only
   take over on narrower windows: laptops/iPad landscape → iPad mini portrait (744–768px) → phones (320px+).
   ====================================================================================================== */
#menu-toggle { display: none; align-items: center; justify-content: center; flex: none; width: 40px; height: 40px; margin: 0 4px 0 -10px;
  background: none; border: 0; border-radius: 4px; color: #555; font-size: 20px; cursor: pointer; }
#menu-toggle:hover { background: #f2f4f4; }
.menu-backdrop { display: none; position: fixed; top: 46px; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.35); z-index: 1020; }
.table-scroll { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-scroll > table { margin-bottom: 0; }
img, video { max-width: 100%; }
input, select, textarea { max-width: 100%; }
body { overflow-wrap: break-word; }

/* Year-over-year line charts, drawn by static/js/charts.js at the real width (crisp text, round dots) */
.yoy-chart { position: relative; width: 100%; height: 170px; }
.yoy-chart.small { height: 150px; }
.yoy-chart > svg { display: block; width: 100%; height: 100%; overflow: visible; }
.yoy-chart text { font-size: 9px; fill: #888; }
.yoy-chart .yoy-hover { stroke: #ccc; stroke-dasharray: 2 2; }
.yoy-tip { position: absolute; z-index: 5; pointer-events: none; background: #fff; border: 1px solid #ddd; border-radius: 3px;
  box-shadow: 0 3px 8px rgba(0,0,0,.12); padding: 5px 8px; font-size: 11px; line-height: 15px; color: #333; white-space: nowrap; }
.yoy-tip b { display: block; font-size: 11px; margin-bottom: 2px; }
.yoy-tip i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 5px; }

/* ---------- Tablets & small laptops (iPad mini landscape 1133 is still desktop) ---------- */
@media (max-width: 1023px) {
  #menu-toggle { display: inline-flex; }
  #main-menu { width: 250px; transform: translateX(-100%); transition: transform .2s ease; z-index: 1030; box-shadow: none; }
  body.menu-open #main-menu { transform: none; box-shadow: 4px 0 18px rgba(0,0,0,.18); }
  body.menu-open .menu-backdrop { display: block; }
  #add-new-btn { width: 100%; }
  #add-new-area .new-activity-list { width: calc(100% - 36px); }
  #content-wrapper { margin-left: 0; }
  .color-bar, .unsaved-bar { left: 0; }
  #main-navbar { padding-left: 12px; }
  #main-navbar .global-search { min-width: 0; padding: 0 10px; }
  #main-navbar .global-search input { width: 100%; max-width: 260px; }
  #main-navbar .user-menu { min-width: 0; }
  .page-header .header-actions { position: static; margin-top: 10px; flex-wrap: wrap; }
  .nav-tabs { overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
  .nav-tabs li { flex: none; }
  .dash { grid-template-columns: 1fr; }
  .dash-main { border-right: 0; }
  .dash-recent { border-top: 1px solid var(--line); }
  .dup-cols { grid-template-columns: 1fr 1fr; }
  .dup-cols > div:last-child { grid-column: 1 / -1; border-top: 1px solid var(--line); }
  .dup-cols > div:nth-child(2) { border-right: 0; }
  .tpl-edit { flex-direction: column; }
  .tpl-edit .tags { width: 100%; position: static; max-height: 320px; }
  .cr-picker .cr-cols { column-count: 2; }
  .settings-menu { grid-template-columns: 1fr 1fr; }
  .overview-mid { grid-template-columns: 1fr; }
  .overview-lower { grid-template-columns: 1fr 1fr; }
  .overview-lower > :last-child { grid-column: 1 / -1; }
  .ov-contrib { border-right: 0; border-bottom: 1px solid var(--line); }
}

/* ---------- Phones & small tablets ---------- */
@media (max-width: 767px) {
  .page-breadcrumb, .page-header, .page-body, .contact-header, .rv, .settings-form, .st-tab-body, .profile-panes { padding-left: 16px; padding-right: 16px; }
  .settings-menu, .account-cards { padding-left: 16px; padding-right: 16px; }
  .account-sub { padding: 0 16px; overflow-x: auto; }
  .flash { margin-left: 16px; margin-right: 16px; }
  .unsaved-bar { padding: 10px 16px; }
  .unsaved-bar.show { flex-wrap: wrap; gap: 8px; }
  .page-header h1 { font-size: 18px; line-height: 24px; }
  .page-body { padding-top: 16px; }
  .nav-tabs li:first-child { margin-left: 8px; }
  .nav-tabs a { padding: 8px 14px; }

  #main-navbar .brand { width: auto; }
  #main-navbar .brand .brand-text { display: none; }
  #main-navbar .tasks-link { padding: 0 12px; }
  #main-navbar .user-menu { padding: 0 10px; gap: 0; }
  #main-navbar .user-menu .who { display: none; }
  .typeahead-menu { min-width: 260px; }

  .table-scroll > table { min-width: min(var(--natural-w, 0px), 760px); }

  /* forms: labels above fields, rows stack */
  .form-row { flex-direction: column; gap: 0; }
  .control-group { grid-template-columns: 1fr; gap: 4px; }
  .control-group > label { text-align: left; }
  .form-actions { margin-left: 0; }
  .pref-grid, .saved-cols, .batch-defaults .bd-grid { grid-template-columns: 1fr; }
  .fp-row, .fp-line, .inline-form, .batch-row-form, .fct-form, .st-spread, .ts-year, .import-save-preset { flex-wrap: wrap; }
  .fp-line .fp-label { width: 100%; }
  .fp-line input.val, .fp-line select.val, .batch-row-form #batch-contact, .import-preset-bar select, .import-save-preset input[type=text] { width: 100%; }
  .cv-editor { width: min(360px, calc(100vw - 32px)); }
  .cv-bar .typeahead-menu { width: min(320px, calc(100vw - 32px)); }
  .cv-add input:focus { width: 150px; }
  .settings-menu { grid-template-columns: 1fr; }
  .margins-row { grid-template-columns: 1fr 1fr; }
  .cr-picker .cr-cols { column-count: 1; }
  .import-type-cards { grid-template-columns: 1fr; }
  .import-steps li { flex: none; }
  .import-steps li.is-active { flex: 1; }
  .import-steps li:not(.is-active) .lbl { display: none; }
  .sum-list { columns: 1; }
  .receipt-preview dl { grid-template-columns: 1fr; }

  /* dashboards & summary tiles */
  .kpi-strip { grid-template-columns: 1fr 1fr; }
  .kpi-strip > div { padding: 12px 16px 6px; border-bottom: 1px solid var(--line); }
  .kpi-strip > div:nth-child(2n) { border-right: 0; }
  .dash-welcome { padding: 16px; }
  .dash-welcome h2 { font-size: 18px; line-height: 24px; }
  .dash-section, .dash-dist, .dash-pyramid { padding-left: 16px; padding-right: 16px; }
  .dash-two { grid-template-columns: 1fr; }
  .dash-dist:first-child { border-right: 0; border-bottom: 1px solid var(--line); }
  table.pyramid { width: 100%; }
  .pledge-tiles { grid-template-columns: 1fr 1fr; }
  .ov-contrib, .ov-chart { padding-left: 16px; padding-right: 16px; }
  .overview-lower { grid-template-columns: 1fr; padding: 16px; }
  .overview-lower > :last-child { grid-column: auto; }
  .ch-main { flex-wrap: wrap; gap: 10px; }
  .ch-main h1 { font-size: 19px; }
  .results-head { flex-wrap: wrap; gap: 6px 16px; }
  .results-head h2 { font-size: 24px; }
  .rv-title { font-size: 22px; line-height: 28px; }
  .dup-cols { grid-template-columns: 1fr; }
  .dup-cols > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .dup-cols > div:last-child { border-bottom: 0; }

  /* contact profile: the section list becomes a scrolling row of links */
  .profile-layout { grid-template-columns: 1fr; }
  .profile-subnav { display: flex; overflow-x: auto; padding: 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .profile-subnav a { flex: none; padding: 10px 14px; white-space: nowrap; }
  .profile-subnav a.active { border-left: 0; border-bottom: 3px solid var(--green); padding-left: 14px; }

  /* the contacts/activities icon rail moves to a bar along the bottom */
  .page-body.with-rail { margin-right: 0; padding-bottom: 80px; }
  .right-rail { top: auto; left: 0; right: 0; bottom: 0; width: auto; display: flex; overflow-x: auto; padding: 0; border-left: 0; border-top: 1px solid var(--line); }
  .right-rail a, .right-rail button { flex: none; width: auto; min-width: 64px; padding: 8px 6px; }
  .right-rail.has-selection .needs-selection { display: block; }

  /* modals fill the screen; the body scrolls between a fixed header and footer */
  .modal, .modal.modal-wide { top: 0; left: 0; transform: none; width: 100%; max-width: 100%; height: 100%; height: 100dvh; max-height: 100dvh; border-radius: 0; }
  .modal-footer { flex-wrap: wrap; }
  .modal-body .form-centered { max-width: none; }
}

@media (max-width: 479px) {
  .nc-row, .nc-row.three { grid-template-columns: 1fr; gap: 0; }
  .nc-row > * { margin-bottom: 12px; }
  .nc-col-half { max-width: none; }
  .contrib-grid { grid-template-columns: 1fr 1fr; }
  .activity-card.expanded .details { grid-template-columns: 1fr; }
  .pledge-tiles { grid-template-columns: 1fr; }
  #main-navbar .tasks-link { padding: 0 8px; font-size: 11px; }
}
