:root {
  --brand: #2f7d6d;
  --brand-dark: #23604f;
  --brand-soft: #e8f3f0;
}
body { background: #f7f9f9; }
.bg-brand { background: var(--brand); }
.btn-brand { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-brand:hover, .btn-brand:focus { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
a { color: var(--brand-dark); }
.btn-outline-brand { color: var(--brand-dark); border-color: var(--brand); background: #fff; }
.btn-outline-brand:hover, .btn-outline-brand:focus { background: var(--brand-soft); color: var(--brand-dark); border-color: var(--brand); }
.sessions-btn .badge { min-width: 1.6em; margin-left: .2rem; }

/* Admin summary counters */
.stat-chip { display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .75rem; border-radius: 2rem; background: #fff; border: 1px solid #dfe7e5; color: #34433f; font-size: .9rem; text-decoration: none; }
.stat-chip strong { font-size: 1rem; color: var(--brand-dark); }
a.stat-chip:hover { background: var(--brand-soft); }
.stat-of { align-self: center; color: #8a9a96; font-weight: 600; }
.stat-divider { width: 1px; align-self: stretch; background: #cfd9d6; margin: 0 .35rem; }
.stat-chip.stat-open { background: #e3eefc; border-color: #b6d0f3; color: #1d5fae; }
.stat-chip.stat-open strong { color: #1d5fae; }
.stat-chip.stat-closed { background: #d1f2df; border-color: #a3e0bd; color: #146c43; }
.stat-chip.stat-closed strong { color: #146c43; }

/* Case status badges */
.status-badge { font-weight: 600; padding: .4em .7em; }
.status-closed { background: #d1f2df; color: #146c43; border: 1px solid #a3e0bd; }
.status-open { background: #e3eefc; color: #1d5fae; border: 1px solid #b6d0f3; }
.status-dot { display: inline-block; width: .55em; height: .55em; border-radius: 50%; background: #2f80ed; margin-right: .15em; vertical-align: .05em; }
.navbar .nav-link.active { font-weight: 600; text-decoration: underline; text-underline-offset: 6px; }

.guest-bg { background: linear-gradient(160deg, var(--brand-soft), #fff 60%); }
.guest-card { width: 100%; max-width: 560px; margin-top: 2vh; margin-bottom: 4vh; }
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form-page { max-width: 860px; }
.form-page.narrow { max-width: 480px; }
.form-section { border-bottom: 2px solid var(--brand-soft); padding-bottom: .35rem; color: var(--brand-dark); }
.q-field { background: #fff; border: 1px solid #e6ecea; border-radius: .5rem; padding: .75rem 1rem; }
.checkbox-columns { columns: 2 260px; }
.checkbox-columns .form-check { break-inside: avoid; }
.sticky-actions { position: sticky; bottom: 0; background: linear-gradient(transparent, #f7f9f9 35%); padding: 1rem 0; }
.contact-row .contact-type { max-width: 8.5rem; }
.contact-row .contact-country { max-width: 11rem; }
.is-invalid-group .contact-number { border-color: var(--bs-danger); }
.contact-link { white-space: nowrap; text-decoration: none; }
.contact-link img { vertical-align: -3px; }
.answer-list { margin: 0; padding-left: 1.1rem; }
.profile-table th { width: 38%; font-weight: 600; color: #4b5b57; }
.avatar-placeholder { width: 96px; height: 96px; background: var(--brand-soft); color: var(--brand-dark); display: flex; align-items: center; justify-content: center; font-size: 2.2rem; font-weight: 600; }
.alert form.js-ajax-dismiss { position: absolute; top: 0; right: 0; }
.alert form.js-ajax-dismiss .btn-close { padding: 1.25rem 1rem; }
.setup-page { max-width: 980px; }

/* Admin tables: let long text wrap instead of forcing a horizontal scroll */
.table-fit { font-size: .9rem; }
.table-fit th { font-size: .85rem; vertical-align: bottom; }
.table-fit td { overflow-wrap: anywhere; }
.table-fit td .badge, .table-fit td .contact-link { white-space: nowrap; }
.table-fit .col-email { min-width: 11rem; }
.table-fit .col-wrap { min-width: 9rem; max-width: 18rem; }

/* Tables become stacked cards on small screens */
@media (max-width: 767.98px) {
  .responsive-table thead { display: none; }
  .responsive-table tr { display: block; background: #fff; border: 1px solid #e6ecea; border-radius: .5rem; margin-bottom: .75rem; padding: .5rem .75rem; }
  .responsive-table td { display: flex; justify-content: space-between; gap: 1rem; border: 0; padding: .25rem 0; }
  .responsive-table td[data-label]::before { content: attr(data-label); font-weight: 600; color: #4b5b57; }
  .responsive-table td.d-none { display: none !important; }
}
