/* ============================================================
   OPS EXCELLENCE HUB — Main Stylesheet
   Palette: warm beige + forest green + cream
   Fonts: DM Serif Display (headings) · DM Sans (body)
   ============================================================ */

/* ── Variables ────────────────────────────────────────────── */
:root {
  --cream:        #FAF7F2;
  --beige:        #EDE8DF;
  --beige-mid:    #D9D1C3;
  --beige-dark:   #B8AE9C;
  --green:        #2D5016;
  --green-mid:    #3D6B1F;
  --green-light:  #4E8A28;
  --green-pale:   #D4E6C3;
  --green-ghost:  #EEF5E8;
  --brown:        #6B5744;
  --text:         #1C1916;
  --text-muted:   #7A7168;
  --white:        #FFFFFF;
  --red:          #C0392B;
  --red-pale:     #FDECEA;
  --shadow-sm:    0 1px 3px rgba(45,80,22,.08);
  --shadow-md:    0 4px 16px rgba(45,80,22,.10);
  --shadow-lg:    0 8px 32px rgba(45,80,22,.13);
  --radius:       10px;
  --radius-sm:    6px;
  --radius-lg:    16px;
  --transition:   .18s ease;
}

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: .9375rem;
  line-height: 1.6;
  background: var(--cream);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--green-mid); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--green); }

img { max-width: 100%; display: block; }

/* ── Top Nav ──────────────────────────────────────────────── */
.topnav {
  background: var(--green);
  color: var(--cream);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(45,80,22,.25);
}

.topnav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topnav-brand {
  display: flex;
  align-items: center;
  gap: .55rem;
  color: var(--cream);
  text-decoration: none;
}

.brand-icon {
  font-size: 1.1rem;
  color: var(--green-pale);
  line-height: 1;
}

.brand-text {
  font-family: 'DM Serif Display', serif;
  font-size: 1.125rem;
  letter-spacing: .01em;
  color: var(--white);
}

.topnav-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-user {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.2;
}

.nav-user-role {
  font-size: .68rem;
  font-weight: 500;
  color: var(--green-pale);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.nav-user-name {
  font-size: .875rem;
  color: var(--white);
  font-weight: 500;
}

.nav-link {
  font-size: .8125rem;
  font-weight: 600;
  padding: .35rem .85rem;
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
  letter-spacing: .02em;
}

.nav-link--admin {
  background: rgba(255,255,255,.12);
  color: var(--white);
}
.nav-link--admin:hover { background: rgba(255,255,255,.22); color: var(--white); }

.nav-link--logout {
  background: transparent;
  color: var(--beige-mid);
  border: 1px solid rgba(255,255,255,.2);
}
.nav-link--logout:hover { background: rgba(255,255,255,.08); color: var(--white); }

.nav-link--news {
  background: rgba(255,255,255,.1);
  color: var(--white);
  border: 1px solid rgba(255,255,255,.2);
}
.nav-link--news:hover { background: rgba(255,255,255,.2); color: var(--white); }

/* ── Page Wrapper ─────────────────────────────────────────── */
.page-wrapper {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 2rem 3rem;
  flex: 1;
  width: 100%;
}

/* ── Page Header ──────────────────────────────────────────── */
.page-header {
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1.5px solid var(--beige-mid);
}

.page-header h1 {
  font-family: 'DM Serif Display', serif;
  font-size: 2rem;
  color: var(--green);
  line-height: 1.2;
}

.page-header p {
  color: var(--text-muted);
  margin-top: .35rem;
  font-size: .9375rem;
}

/* ── Store Selector Bar ───────────────────────────────────── */
.scope-bar {
  background: var(--white);
  border: 1.5px solid var(--beige-mid);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  box-shadow: var(--shadow-sm);
}

.scope-bar label {
  font-size: .8125rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  white-space: nowrap;
}

.scope-bar select {
  flex: 1;
  min-width: 200px;
  max-width: 320px;
}

.scope-tag {
  background: var(--green-ghost);
  color: var(--green);
  font-size: .8125rem;
  font-weight: 600;
  padding: .3rem .75rem;
  border-radius: 99px;
  border: 1px solid var(--green-pale);
}

/* ── Cards & Grid ─────────────────────────────────────────── */
.card {
  background: var(--white);
  border: 1.5px solid var(--beige-mid);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}

.card:hover { box-shadow: var(--shadow-md); }

.card-title {
  font-family: 'DM Serif Display', serif;
  font-size: 1.125rem;
  color: var(--green);
  margin-bottom: .5rem;
}

.card-subtitle {
  font-size: .8125rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }

/* ── Tool Cards ───────────────────────────────────────────── */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.tool-card {
  background: var(--white);
  border: 1.5px solid var(--beige-mid);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem 1.5rem;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: .6rem;
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
  position: relative;
  overflow: hidden;
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--green);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .22s ease;
}

.tool-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--green-pale);
  color: var(--text);
}

.tool-card:hover::before { transform: scaleX(1); }

.tool-card-icon {
  width: 44px;
  height: 44px;
  background: var(--green-ghost);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--green-mid);
  margin-bottom: .25rem;
}

.tool-card-name {
  font-family: 'DM Serif Display', serif;
  font-size: 1.0625rem;
  color: var(--green);
  line-height: 1.3;
}

.tool-card-desc {
  font-size: .8125rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.tool-card--coming-soon {
  opacity: .55;
  pointer-events: none;
}

.badge-soon {
  position: absolute;
  top: .75rem; right: .75rem;
  background: var(--beige);
  color: var(--text-muted);
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  padding: .15rem .5rem;
  border-radius: 99px;
}

/* ── Forms ────────────────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: .375rem;
  margin-bottom: 1.1rem;
}

.form-label {
  font-size: .8125rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
}

.form-control {
  width: 100%;
  padding: .6rem .875rem;
  font-size: .9375rem;
  font-family: inherit;
  background: var(--white);
  border: 1.5px solid var(--beige-mid);
  border-radius: var(--radius-sm);
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
}

.form-control:focus {
  outline: none;
  border-color: var(--green-light);
  box-shadow: 0 0 0 3px rgba(78,138,40,.12);
}

.form-control::placeholder { color: var(--beige-dark); }

select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237A7168' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .875rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .55rem 1.25rem;
  font-size: .9rem;
  font-family: inherit;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background var(--transition), color var(--transition),
              border-color var(--transition), box-shadow var(--transition),
              transform var(--transition);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.4;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--green);
  color: var(--white);
  border-color: var(--green);
}
.btn-primary:hover {
  background: var(--green-mid);
  border-color: var(--green-mid);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(45,80,22,.25);
}

.btn-secondary {
  background: var(--beige);
  color: var(--text);
  border-color: var(--beige-mid);
}
.btn-secondary:hover { background: var(--beige-mid); color: var(--text); }

.btn-outline {
  background: transparent;
  color: var(--green);
  border-color: var(--green);
}
.btn-outline:hover { background: var(--green-ghost); }

.btn-danger {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
}
.btn-danger:hover { background: #a93226; color: var(--white); }

.btn-sm { padding: .35rem .875rem; font-size: .8125rem; }
.btn-lg { padding: .75rem 1.75rem; font-size: 1rem; }

/* ── Alerts ───────────────────────────────────────────────── */
.alert {
  padding: .85rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  margin-bottom: 1.25rem;
  border: 1.5px solid transparent;
  display: flex;
  align-items: flex-start;
  gap: .625rem;
}

.alert-error {
  background: var(--red-pale);
  color: #922b21;
  border-color: #f1948a;
}

.alert-success {
  background: var(--green-ghost);
  color: var(--green);
  border-color: var(--green-pale);
}

.alert-info {
  background: #eaf3fb;
  color: #1a5276;
  border-color: #aed6f1;
}

/* ── Table ────────────────────────────────────────────────── */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1.5px solid var(--beige-mid);
  box-shadow: var(--shadow-sm);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  font-size: .9rem;
}

thead tr {
  background: var(--beige);
  border-bottom: 2px solid var(--beige-mid);
}

th {
  padding: .75rem 1rem;
  text-align: left;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-muted);
  white-space: nowrap;
}

td {
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--beige);
  vertical-align: middle;
}

tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--cream); }

/* ── Status Badges ────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: .2rem .65rem;
  border-radius: 99px;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.badge-active   { background: var(--green-ghost); color: var(--green); }
.badge-inactive { background: var(--beige); color: var(--text-muted); }
.badge-role     { background: #eaf3fb; color: #1a5276; }

/* ── Login Page ───────────────────────────────────────────── */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cream);
  padding: 2rem;
}

.login-card {
  background: var(--white);
  border: 1.5px solid var(--beige-mid);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2.25rem;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-lg);
}

.login-logo {
  text-align: center;
  margin-bottom: 1.75rem;
}

.login-logo-icon {
  font-size: 2.25rem;
  color: var(--green);
  line-height: 1;
  display: block;
}

.login-logo h1 {
  font-family: 'DM Serif Display', serif;
  font-size: 1.5rem;
  color: var(--green);
  margin-top: .5rem;
}

.login-logo p {
  font-size: .8125rem;
  color: var(--text-muted);
  margin-top: .2rem;
}

/* ── Section Titles ───────────────────────────────────────── */
.section-title {
  font-family: 'DM Serif Display', serif;
  font-size: 1.25rem;
  color: var(--green);
  margin-bottom: 1rem;
  padding-bottom: .5rem;
  border-bottom: 1.5px solid var(--beige-mid);
}

/* ── Stat Cards ───────────────────────────────────────────── */
.stat-card {
  background: var(--white);
  border: 1.5px solid var(--beige-mid);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .25rem;
}

.stat-label {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-muted);
}

.stat-value {
  font-family: 'DM Serif Display', serif;
  font-size: 2rem;
  color: var(--green);
  line-height: 1.1;
}

.stat-sub {
  font-size: .8rem;
  color: var(--text-muted);
}

/* ── Divider ──────────────────────────────────────────────── */
.divider {
  border: none;
  border-top: 1.5px solid var(--beige-mid);
  margin: 1.5rem 0;
}

/* ── Footer ───────────────────────────────────────────────── */
.site-footer {
  background: var(--beige);
  border-top: 1.5px solid var(--beige-mid);
  padding: .875rem 2rem;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  font-size: .8rem;
  color: var(--text-muted);
}

/* ── Admin Sidebar Layout ─────────────────────────────────── */
.admin-layout {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.admin-sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--white);
  border: 1.5px solid var(--beige-mid);
  border-radius: var(--radius);
  padding: 1rem 0;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 74px;
}

.admin-sidebar a {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .65rem 1.25rem;
  font-size: .875rem;
  font-weight: 500;
  color: var(--text);
  transition: background var(--transition), color var(--transition);
  text-decoration: none;
}

.admin-sidebar a:hover { background: var(--cream); color: var(--green); }
.admin-sidebar a.active { background: var(--green-ghost); color: var(--green); font-weight: 700; }
.admin-sidebar .sidebar-section {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  padding: .75rem 1.25rem .35rem;
}

.admin-content { flex: 1; min-width: 0; }

/* ── Modal ────────────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(28,25,22,.45);
  z-index: 999;
  align-items: center;
  justify-content: center;
}
.modal-overlay.open { display: flex; }

.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 480px;
  width: 90%;
  box-shadow: var(--shadow-lg);
  animation: modalIn .18s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(-12px) scale(.97); }
  to   { opacity: 1; transform: translateY(0)     scale(1);   }
}

.modal-title {
  font-family: 'DM Serif Display', serif;
  font-size: 1.25rem;
  color: var(--green);
  margin-bottom: .75rem;
}

.modal-actions {
  display: flex;
  gap: .75rem;
  justify-content: flex-end;
  margin-top: 1.5rem;
}


/* ── Dashboard News Feed ──────────────────────────────────────── */

/* Container */
.news-feed-card {
  background: var(--white);
  border: 1.5px solid var(--beige-mid);
  border-radius: var(--radius-lg);
  padding: 1.125rem 1.375rem 1.25rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
}

/* Header row */
.news-feed-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .875rem;
  padding-bottom: .625rem;
  border-bottom: 1.5px solid var(--beige-mid);
}

.news-feed-header-left {
  display: flex;
  align-items: center;
  gap: .45rem;
}

.news-feed-icon {
  font-size: 1rem;
  line-height: 1;
}

.news-feed-title {
  font-family: 'DM Serif Display', serif;
  font-size: 1.0625rem;
  color: var(--green);
}

/* Group labels — Today / Upcoming */
.feed-group-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .3rem 0 .3rem;
  margin-bottom: .4rem;
  margin-top: .1rem;
  font-size: .67rem;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--beige);
}

.feed-group-label + .feed-group-label {
  margin-top: .85rem;
}

.feed-group-date {
  font-weight: 400;
  font-size: .68rem;
  color: var(--beige-dark);
  text-transform: none;
  letter-spacing: .01em;
}

/* Card grid — side by side */
.feed-items-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .45rem;
  margin-bottom: .1rem;
}

/* Individual event card — fully clickable */
.feed-item-card {
  display: block;
  background: var(--white);
  border: 1px solid var(--beige-mid);
  border-radius: 12px;
  padding: .7rem .9rem .65rem;
  text-decoration: none;
  color: var(--text);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.feed-item-card:hover {
  border-color: var(--green-pale);
  box-shadow: 0 2px 12px rgba(45,80,22,.10);
  background: #f9fbf7;
  color: var(--text);
}

.feed-item-card--cancelled {
  opacity: .58;
}

/* Top row: pill left, date right */
.feed-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  margin-bottom: .35rem;
  flex-wrap: wrap;
}

/* Department pill */
.feed-dept-pill {
  display: inline-flex;
  align-items: center;
  gap: .2rem;
  padding: .17rem .58rem;
  border-radius: 99px;
  font-size: .67rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
  background: var(--pill-bg, #2D501618);
  color: var(--pill-fg, #2D5016);
  border: 1px solid var(--pill-border, #2D501630);
  flex-shrink: 0;
  line-height: 1.4;
}

/* Date / range display */
.feed-item-date {
  font-size: .71rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: .3rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  line-height: 1.4;
}

.feed-item-countdown {
  font-weight: 700;
  color: var(--green-mid);
}

/* Title — prominent */
.feed-item-title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: .28rem;
}

/* Body preview — 2-line clamp */
.feed-item-preview {
  font-size: .8125rem;
  color: var(--text-muted);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: .3rem;
}

/* Footer */
.feed-item-footer {
  margin-top: .15rem;
}

.feed-read-more {
  font-size: .775rem;
  font-weight: 600;
  color: var(--green-mid);
  transition: color .15s;
}

.feed-item-card:hover .feed-read-more {
  color: var(--green);
}


/* Upcoming events — compact inline rows (no card) */
.feed-upcoming-row {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .32rem .1rem;
  border-bottom: 1px solid var(--beige);
  text-decoration: none;
  color: var(--text);
  transition: color .15s;
  flex-wrap: wrap;
}

.feed-upcoming-row:last-child {
  border-bottom: none;
}

.feed-upcoming-row:hover {
  color: var(--green);
}

.feed-upcoming-title {
  flex: 1;
  font-size: .825rem;
  font-weight: 600;
  color: var(--text);
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.feed-upcoming-row:hover .feed-upcoming-title {
  color: var(--green);
}

.feed-upcoming-meta {
  font-size: .7rem;
  color: var(--text-muted);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: .25rem;
}

/* Empty state */
.feed-empty-state {
  text-align: center;
  padding: .6rem .5rem .8rem;
  color: var(--beige-dark);
  font-size: .8125rem;
  font-style: italic;
}

/* ── Announcement / News Hub ──────────────────────────────── */

/* Department badge (used in cards + table) */
.dept-badge {
  display: inline-block;
  padding: .15rem .55rem;
  border-radius: 99px;
  font-size: .7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  flex-shrink: 0;
}

/* Dept filter tabs */
.dept-tab-bar {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.dept-tab {
  padding: .3rem .8rem;
  border-radius: 99px;
  font-size: .78rem;
  font-weight: 600;
  border: 1.5px solid var(--beige-mid);
  background: var(--white);
  color: var(--text-muted);
  text-decoration: none;
  transition: all .15s;
  cursor: pointer;
}
.dept-tab:hover { border-color: var(--green-pale); color: var(--green); }
.dept-tab.active {
  background: var(--green);
  border-color: var(--green);
  color: var(--white);
}
.dept-tab--active-colored {
  background: var(--dept-c, var(--green)) !important;
  border-color: var(--dept-c, var(--green)) !important;
  color: var(--white) !important;
}

/* Search toolbar */
.news-toolbar { margin-bottom: .85rem; }
.news-search-form { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.news-search-input { max-width: 340px; }

/* Feed sections */
.feed-section { margin-bottom: 2rem; }
.feed-section-label {
  font-family: 'DM Serif Display', serif;
  font-size: 1.0625rem;
  color: var(--green);
  padding-bottom: .5rem;
  margin-bottom: .75rem;
  border-bottom: 1.5px solid var(--beige-mid);
}
.feed-section--pinned .feed-section-label { color: #6C3483; }
.feed-section--today  .feed-section-label { color: #1A7A6A; }

.feed-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-muted);
  font-size: .9rem;
  background: var(--white);
  border: 1.5px dashed var(--beige-mid);
  border-radius: var(--radius);
}

/* Post card */
.post-card {
  display: flex;
  background: var(--white);
  border: 1.5px solid var(--beige-mid);
  border-radius: var(--radius);
  margin-bottom: .75rem;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}
.post-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.post-card--pinned { border-color: #d4aff0; }
.post-card--pinned .post-card-inner { background: #fdf8ff; }

.post-card-stripe {
  width: 5px;
  flex-shrink: 0;
}

.post-card-inner {
  flex: 1;
  padding: 1rem 1.25rem;
  min-width: 0;
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
  margin-bottom: .5rem;
}

.post-pin-badge {
  font-size: .7rem;
  font-weight: 700;
  color: #6C3483;
  background: #f3eafe;
  padding: .15rem .5rem;
  border-radius: 99px;
  border: 1px solid #d4aff0;
}

.post-today-badge {
  font-size: .7rem;
  font-weight: 700;
  color: #1A7A6A;
  background: #eafaf5;
  padding: .15rem .5rem;
  border-radius: 99px;
  border: 1px solid #a8dfce;
}

.post-date-badge {
  font-size: .72rem;
  color: var(--text-muted);
  margin-left: auto;
}

.post-card-title {
  font-family: 'DM Serif Display', serif;
  font-size: 1.0625rem;
  color: var(--green);
  line-height: 1.3;
  margin-bottom: .35rem;
}

.post-card-body {
  font-size: .875rem;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: .5rem;
}

.post-card-footer {
  font-size: .75rem;
  color: var(--text-muted);
  margin-top: .25rem;
}

@media (max-width: 640px) {
  .news-search-input { max-width: 100%; }
  .post-date-badge   { margin-left: 0; }
}


/* ── Area of Operation Assessment ────────────────────────────── */

.aoa-type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
  gap: .875rem;
  margin-bottom: 2rem;
}

.aoa-type-card {
  display: flex;
  flex-direction: column;
  gap: .2rem;
  background: var(--white);
  border: 1.5px solid var(--beige-mid);
  border-radius: var(--radius);
  padding: .875rem 1rem;
  text-decoration: none;
  color: var(--text);
  position: relative;
  overflow: hidden;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}

.aoa-type-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--green);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .2s ease;
}

.aoa-type-card:hover {
  border-color: var(--green-pale);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  color: var(--text);
}

.aoa-type-card:hover::before { transform: scaleX(1); }

.aoa-type-icon  { font-size: 1.35rem; line-height: 1; margin-bottom: .15rem; }
.aoa-type-label { font-size: .8125rem; font-weight: 600; color: var(--text); line-height: 1.35; }
.aoa-type-count { font-size: .69rem; color: var(--text-muted); }

/* Question blocks in the form */
.aoa-question-block {
  border: 1px solid var(--beige-mid);
  border-radius: var(--radius-sm);
  margin-bottom: .6rem;
  background: var(--white);
  overflow: hidden;
  transition: border-color .12s;
}

.aoa-question-block:last-child   { margin-bottom: 0; }
.aoa-question-block:focus-within { border-color: var(--green-pale); }
.aoa-question-block--no          { border-color: #f1948a; background: #fffafa; }

.aoa-question-text {
  padding: .6rem .875rem .4rem;
  font-size: .875rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
}

.aoa-question-num {
  font-size: .72rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-right: .25rem;
}

.aoa-answer-row {
  display: flex;
  gap: .4rem;
  padding: 0 .875rem .55rem;
  flex-wrap: wrap;
}

.aoa-answer-label {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .28rem .7rem;
  border-radius: 99px;
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid var(--beige-mid);
  color: var(--text-muted);
  transition: all .12s;
  user-select: none;
}

.aoa-answer-label input[type=radio] { display: none; }

.aoa-answer-label.yes:has(input:checked),
.aoa-answer-label.yes:hover { background: var(--green-ghost); color: var(--green); border-color: var(--green-pale); }

.aoa-answer-label.no:has(input:checked),
.aoa-answer-label.no:hover  { background: #fdecea; color: #c0392b; border-color: #f1948a; }

.aoa-answer-label.na:has(input:checked),
.aoa-answer-label.na:hover  { background: var(--beige); color: var(--text-muted); border-color: var(--beige-mid); }

.aoa-comment-input {
  display: block;
  width: 100%;
  padding: .3rem .875rem .4rem;
  font-size: .8rem;
  font-family: inherit;
  background: transparent;
  border: none;
  border-top: 1px solid var(--beige);
  color: var(--text-muted);
  resize: none;
  outline: none;
  line-height: 1.4;
  min-height: 34px;
}

.aoa-comment-input:focus          { background: var(--cream); color: var(--text); }
.aoa-comment-input::placeholder   { color: var(--beige-dark); font-style: italic; }

/* Score summary bar */
.aoa-score-bar {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  align-items: center;
  background: var(--white);
  border: 1.5px solid var(--beige-mid);
  border-radius: var(--radius);
  padding: .9rem 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.aoa-score-stat  { display: flex; flex-direction: column; gap: .05rem; }

.aoa-score-label {
  font-size: .67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
}

.aoa-score-value {
  font-family: 'DM Serif Display', serif;
  font-size: 1.875rem;
  line-height: 1.05;
}

.aoa-score-value--yes { color: var(--green); }
.aoa-score-value--no  { color: #c0392b; }
.aoa-score-value--na  { color: var(--beige-dark); }

/* Result rows */
.aoa-result-row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: .6rem .9rem;
  border-bottom: 1px solid var(--beige);
}

.aoa-result-row:last-child { border-bottom: none; }
.aoa-result-row--no        { background: #fff8f8; }

.aoa-result-q        { flex: 1; min-width: 0; }
.aoa-result-qtext    { font-size: .875rem; font-weight: 500; color: var(--text); line-height: 1.4; }
.aoa-result-qcomment { font-size: .78rem; color: var(--text-muted); margin-top: .25rem; font-style: italic; }

.aoa-result-badge {
  display: inline-block;
  padding: .2rem .6rem;
  border-radius: 99px;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  white-space: nowrap;
}

.aoa-result-badge--yes { background: var(--green-ghost); color: var(--green);    border: 1px solid var(--green-pale); }
.aoa-result-badge--no  { background: #fdecea;            color: #c0392b;          border: 1px solid #f1948a; }
.aoa-result-badge--na  { background: var(--beige);       color: var(--text-muted);border: 1px solid var(--beige-mid); }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .admin-layout { flex-direction: column; }
  .admin-sidebar { width: 100%; position: static; }
}

@media (max-width: 640px) {
  .page-wrapper { padding: 1.25rem 1rem 2rem; }
  .topnav-inner { padding: 0 1rem; }
  .grid-2, .grid-3, .grid-4, .news-section-grid { grid-template-columns: 1fr; }
  .feed-items-grid { grid-template-columns: 1fr; }
  .brand-text { display: none; }
}

/* ── AOA Subsections & References ─────────────────────────── */
.aoa-subsection {
  margin-bottom: 1.5rem;
}
.aoa-subsection-header {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--green);
  padding: .55rem 1.375rem .45rem;
  background: var(--green-ghost);
  border: 1px solid var(--green-pale);
  border-bottom: none;
  border-radius: var(--radius) var(--radius) 0 0;
}
.aoa-question-refs {
  list-style: none;
  margin: .3rem 0 0 1.6rem;
  padding: 0;
}
.aoa-question-refs li {
  font-size: .72rem;
  color: var(--text-muted);
  line-height: 1.5;
  padding-left: .85rem;
  position: relative;
}
.aoa-question-refs li::before {
  content: '–';
  position: absolute;
  left: 0;
}
.aoa-question-refs--view li {
  font-style: italic;
}
/* Section notes at end of each subsection (form) */
.aoa-section-notes-block {
  padding: .75rem 0 .25rem;
  border-top: 1px dashed var(--beige-mid);
  margin-top: .75rem;
}
.aoa-section-notes-label {
  display: block;
  font-size: .72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: .35rem;
}
.aoa-section-notes-input {
  width: 100%;
  resize: vertical;
  min-height: 2.6rem;
}
/* Section notes display (view) */
.aoa-section-notes-view {
  padding: .75rem 1.375rem;
  background: var(--beige);
  border-top: 1px dashed var(--beige-mid);
}
.aoa-section-notes-view-label {
  font-size: .69rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-muted);
  display: block;
  margin-bottom: .3rem;
}
.aoa-section-notes-view-body {
  font-size: .85rem;
  color: var(--text);
  line-height: 1.6;
}

/* ── Tools / Reports section layout ──────────────────────── */
.section-heading-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: .75rem;
  flex-wrap: wrap;
}

/* Store picker bar above the tools grid */
.tool-store-picker-bar {
  display: flex;
  align-items: center;
  gap: .75rem;
  background: var(--cream);
  border: 1px solid var(--beige-mid);
  border-radius: var(--radius);
  padding: .75rem 1.1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.tool-store-picker-label {
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}
.tool-store-select {
  max-width: 320px;
  min-width: 200px;
}
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  background: var(--green-ghost);
  color: var(--green);
  border: 1px solid var(--green-pale);
  border-radius: 999px;
  padding: .2rem .7rem;
  font-size: .75rem;
  font-weight: 600;
  white-space: nowrap;
}

/* Notice when no store selected */
.tool-lock-notice {
  font-size: .82rem;
  color: var(--text-muted);
  background: var(--beige);
  border: 1px dashed var(--beige-mid);
  border-radius: var(--radius);
  padding: .65rem 1rem;
  margin-bottom: .75rem;
  text-align: center;
}

/* Locked / dimmed tool cards */
.tools-grid--locked .tool-card,
.tool-card--locked {
  opacity: .45;
  pointer-events: none;
  filter: grayscale(0.4);
}
.badge-lock {
  background: var(--beige) !important;
  color: var(--text-muted) !important;
  border-color: var(--beige-mid) !important;
  font-size: .75rem !important;
}

/* Reports scope bar (analytics) */
.scope-bar--reports {
  background: var(--cream);
  border: 1px solid var(--beige-mid);
  border-radius: var(--radius);
  padding: .65rem 1.1rem;
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

/* Reports grid can use a different tint */
.tools-grid--reports .tool-card {
  border-color: #d6eaf8;
  background: #f5faff;
}
.tools-grid--reports .tool-card:hover {
  border-color: #aed6f1;
  background: #eaf5fd;
}

/* ── Assessment index: filter/sort bar ───────────────────── */
.aoa-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--green-ghost);
  color: var(--green);
  border: 1px solid var(--green-pale);
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 700;
  min-width: 1.5rem;
  height: 1.5rem;
  padding: 0 .45rem;
  vertical-align: middle;
  margin-left: .4rem;
}
.aoa-filter-bar {
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-wrap: wrap;
  background: var(--cream);
  border: 1px solid var(--beige-mid);
  border-radius: var(--radius);
  padding: .6rem 1rem;
  margin-bottom: 1rem;
}
.aoa-filter-label {
  font-size: .75rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}
.aoa-filter-select {
  max-width: 260px;
  min-width: 160px;
  font-size: .825rem;
}
.aoa-sort-group {
  display: flex;
  align-items: center;
  gap: .35rem;
  margin-left: auto;
  flex-wrap: wrap;
}
.aoa-sort-btn {
  display: inline-flex;
  align-items: center;
  gap: .2rem;
  padding: .28rem .65rem;
  border: 1px solid var(--beige-mid);
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--white);
  text-decoration: none;
  transition: border-color .15s, background .15s, color .15s;
  white-space: nowrap;
}
.aoa-sort-btn:hover { border-color: var(--green-pale); color: var(--green); background: var(--green-ghost); }
.aoa-sort-btn--active { background: var(--green-ghost); color: var(--green); border-color: var(--green-pale); }
.aoa-sort-btn--clear  { color: #c0392b; border-color: #f1948a; background: #fffafa; }
.aoa-sort-btn--clear:hover { background: #fdecea; }
.sort-icon         { font-size: .65rem; }
.sort-icon--neutral { opacity: .4; }
.sort-icon--active  { color: var(--green); }

/* Clickable th sort links */
.th-sort-link {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}
.th-sort-link:hover { color: var(--green); }

/* Area cell icon alignment */
.aoa-area-cell  { display: flex; align-items: center; gap: .4rem; }
.aoa-area-icon  { font-size: 1rem; flex-shrink: 0; }
