/* ═══════════════════════════════════════════════════════
   Colony Trace HOA — Public Site Styles
   Brand: teal/gold, Playfair Display + Open Sans
   ═══════════════════════════════════════════════════════ */

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

/* ── Variables ──────────────────────────────────────────── */
:root {
  --teal-dark:  #005a72;   /* deep Gulf */
  --teal:       #0090b0;   /* ocean blue */
  --teal-light: #00b4d0;   /* turquoise shallows */
  --gold:       #d4962a;   /* sandy gold */
  --gold-light: #f0c042;   /* light gold */
  --coral:      #e05f45;   /* tropical coral */
  --seafoam:    #64bdb5;   /* seafoam */
  --cream:      #f2eedf;   /* warm sand */
  --sand:       #faf7f1;   /* light sand page bg */
  --white:      #ffffff;
  --text:       #1e3848;   /* deep ocean-tinted */
  --text-light: #5a7888;
  --border:     #c8dde6;
  --shadow:     0 2px 12px rgba(0,50,80,.10);
  --shadow-lg:  0 6px 28px rgba(0,50,80,.15);
  --radius:     6px;
  --radius-lg:  12px;
  --transition: .2s ease;
}

/* ── Reset / Base ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Open Sans', sans-serif;
  background: var(--sand);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--teal-dark); }

h1, h2, h3, h4 {
  font-family: 'Playfair Display', serif;
  line-height: 1.25;
  color: var(--teal-dark);
}

/* ── Layout ─────────────────────────────────────────────── */
.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

main { flex: 1; }

/* ── Navbar ─────────────────────────────────────────────── */
.site-nav {
  background: var(--teal-dark);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0,0,0,.25);
  border-bottom: 3px solid var(--coral);
}

.site-nav .container {
  max-width: 1440px;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  text-decoration: none;
}

.nav-brand img {
  height: 44px;
  width: auto;
}

.nav-brand-text {
  display: flex;
  flex-direction: column;
}

.nav-brand-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.1;
}

.nav-brand-sub {
  font-size: .7rem;
  color: var(--gold-light);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: .25rem;
  align-items: center;
}

.nav-links a {
  color: rgba(255,255,255,.85);
  font-size: .88rem;
  padding: .45rem .75rem;
  border-radius: var(--radius);
  transition: all var(--transition);
  font-weight: 500;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--white);
  background: rgba(255,255,255,.12);
}

.nav-links .btn-member {
  background: var(--gold);
  color: var(--white) !important;
  border-radius: 30px;
  padding: .4rem 1.1rem;
  font-weight: 600;
  margin-left: .5rem;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
  vertical-align: middle;
}

.nav-links .btn-member:hover {
  background: var(--gold-light);
  color: var(--teal-dark) !important;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: .5rem;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all var(--transition);
}

/* ── Gold rule divider ──────────────────────────────────── */
.gold-rule {
  border: none;
  border-top: 2px solid var(--gold);
  opacity: .4;
  margin: 2rem 0;
}

/* ── Hero ───────────────────────────────────────────────── */
.hero {
  background-image: url('../images/entrance.jpg');
  background-size: cover;
  background-position: center 40%;
  padding: 5rem 0 6.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(0,70,100,.82)  0%,
    rgba(0,100,130,.68) 45%,
    rgba(0,60,80,.75)   100%
  );
  pointer-events: none;
}

/* Palm tree silhouette */
.hero-palm {
  position: absolute;
  right: 2%;
  bottom: 40px;
  height: 88%;
  width: auto;
  pointer-events: none;
  user-select: none;
}

/* Wave break at hero bottom */
.hero-wave {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  line-height: 0;
  pointer-events: none;
}
.hero-wave svg { display: block; width: 100%; }

.hero-logo {
  width: 160px;
  height: auto;
  margin: 0 auto 1.5rem;
  filter: drop-shadow(0 4px 20px rgba(0,0,0,.3));
}

.hero h1 {
  color: var(--white);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  margin-bottom: .75rem;
}

.hero p {
  color: rgba(255,255,255,.8);
  font-size: 1.1rem;
  max-width: 540px;
  margin: 0 auto 2rem;
}

.hero-badges {
  display: flex;
  gap: .75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.badge-pill {
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.3);
  color: var(--white);
  padding: .35rem 1rem;
  border-radius: 30px;
  font-size: .85rem;
  backdrop-filter: blur(4px);
}

/* ── Section headings ───────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.section-header h2 {
  font-size: 1.6rem;
}

.section-header .section-line {
  flex: 1;
  height: 2px;
  background: linear-gradient(to right, var(--gold), transparent);
}

/* ── Announcement banner ────────────────────────────────── */
.announcements-wrap {
  padding: 2.5rem 0 2rem;
  background: linear-gradient(135deg, #0d5c6b14 0%, #c9952a12 100%);
  border-top: 3px solid var(--gold);
  border-bottom: 3px solid var(--gold);
  margin-top: 0;
}

.announcements-wrap .section-header h2 {
  font-size: 1.4rem;
}

.announcement-item {
  background: var(--white);
  border-left: 5px solid var(--gold);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  padding: 1.1rem 1.4rem;
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  box-shadow: 0 2px 8px rgba(13,92,107,.10), 0 1px 3px rgba(0,0,0,.06);
  transition: box-shadow .2s;
}

.announcement-item:last-child { margin-bottom: 0; }

.announcement-item:hover {
  box-shadow: 0 4px 16px rgba(13,92,107,.14), 0 2px 6px rgba(0,0,0,.08);
}

.announcement-item h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--teal-dark);
  margin-bottom: .35rem;
}

.announcement-item p {
  font-size: .92rem;
  color: var(--text);
  line-height: 1.6;
}

.ann-dismiss {
  background: none;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--text-light);
  flex-shrink: 0;
  line-height: 1;
  padding: .2rem;
}

.ann-dismiss:hover { color: var(--teal-dark); }

/* ── Home layout (two-column) ───────────────────────────── */
.home-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2.5rem;
  padding: 2.5rem 0 3rem;
}

/* ── Quick-link cards ───────────────────────────────────── */
.quick-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.quick-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.25rem;
  text-align: center;
  text-decoration: none;
  transition: all var(--transition);
  box-shadow: var(--shadow);
}

.quick-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--gold);
  color: var(--teal-dark);
}

.quick-card .qc-icon {
  font-size: 2.25rem;
  margin-bottom: .75rem;
}

.quick-card .qc-label {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: 1rem;
  color: var(--teal-dark);
}

/* ── Sidebar events card ────────────────────────────────── */
.sidebar-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.sidebar-card-header {
  background: var(--teal-dark);
  padding: 1rem 1.25rem;
}

.sidebar-card-header h3 {
  color: var(--white);
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.sidebar-event {
  padding: .85rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: .85rem;
}

.sidebar-event:last-child { border-bottom: none; }

.event-date-badge {
  background: var(--teal-dark);
  color: var(--white);
  text-align: center;
  border-radius: var(--radius);
  min-width: 44px;
  padding: .3rem .4rem;
  flex-shrink: 0;
}

.event-date-badge .edb-month { font-size: .65rem; text-transform: uppercase; letter-spacing: .06em; opacity: .8; }
.event-date-badge .edb-day   { font-size: 1.3rem; font-weight: 700; line-height: 1; }

.event-info .ei-title { font-weight: 600; font-size: .9rem; color: var(--text); }
.event-info .ei-sub   { font-size: .8rem; color: var(--text-light); margin-top: .15rem; }

.sidebar-card-footer {
  padding: .75rem 1.25rem;
  text-align: center;
}

.sidebar-card-footer a {
  font-size: .85rem;
  font-weight: 600;
  color: var(--teal);
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .6rem 1.4rem;
  border-radius: 30px;
  font-size: .9rem;
  font-weight: 600;
  font-family: 'Open Sans', sans-serif;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  line-height: 1;
}

.btn-primary { background: var(--teal-dark); color: var(--white); border-color: var(--teal-dark); }
.btn-primary:hover { background: var(--teal); border-color: var(--teal); color: var(--white); }

.btn-gold { background: var(--gold); color: var(--white); border-color: var(--gold); }
.btn-gold:hover { background: var(--gold-light); border-color: var(--gold-light); color: var(--teal-dark); }

.btn-outline { background: transparent; color: var(--teal-dark); border-color: var(--teal-dark); }
.btn-outline:hover { background: var(--teal-dark); color: var(--white); }

.btn-sm { padding: .4rem 1rem; font-size: .82rem; }

/* ── Calendar ────────────────────────────────────────────── */
.calendar-page { padding: 2.5rem 0 4rem; }

.cal-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1.75rem;
}

.cal-nav h2 { font-size: 1.75rem; min-width: 260px; text-align: center; }

.cal-nav a {
  color: var(--teal);
  font-size: 1.5rem;
  padding: .3rem .6rem;
  border-radius: var(--radius);
  transition: background var(--transition);
}
.cal-nav a:hover { background: var(--cream); }

.cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1.5rem;
  margin-bottom: 1.5rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .82rem;
  color: var(--text-light);
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.cal-grid-wrap { overflow-x: auto; }

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  min-width: 560px;
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow);
}

/* Flatten header and body into the parent grid so all columns share one layout */
.cal-header { display: contents; }
.cal-body   { display: contents; }

.cal-header-cell {
  background: var(--teal-dark);
  text-align: center;
  padding: .75rem;
  color: rgba(255,255,255,.85);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.cal-cell {
  min-height: 110px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: .5rem;
  position: relative;
  vertical-align: top;
}

.cal-cell:nth-child(7n) { border-right: none; }

.cal-cell.other-month { background: #faf8f5; }
.cal-cell.other-month .cal-day { color: #ccc; }

.cal-cell.today { background: #eef9fb; }
.cal-cell.today .cal-day {
  background: var(--teal-dark);
  color: var(--white);
  border-radius: 50%;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cal-day {
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-light);
  margin-bottom: .4rem;
}

.cal-event {
  display: block;
  padding: .2rem .45rem;
  border-radius: 3px;
  font-size: .74rem;
  color: var(--white);
  margin-bottom: .2rem;
  cursor: pointer;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity var(--transition);
}
.cal-event:hover { opacity: .85; color: var(--white); }
.cal-event-cont  { opacity: .7; border-radius: 0 3px 3px 0; font-size: .7rem; }

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

.modal-box {
  background: var(--white);
  border-radius: var(--radius-lg);
  max-width: 480px;
  width: 90%;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  animation: slideUp .2s ease;
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.modal-head {
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.modal-head h3 { font-size: 1.2rem; }

.modal-close {
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--text-light);
  line-height: 1;
  padding: .2rem;
}
.modal-close:hover { color: var(--text); }

.modal-body {
  padding: 0 1.5rem 1.5rem;
}

.modal-row {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  margin-bottom: .75rem;
  font-size: .92rem;
}

.modal-row .mr-icon { font-size: 1.1rem; flex-shrink: 0; padding-top: .1rem; }
.modal-row .mr-label { font-weight: 600; color: var(--text-light); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; display: block; margin-bottom: .1rem; }

.event-type-badge {
  display: inline-block;
  padding: .2rem .75rem;
  border-radius: 30px;
  font-size: .78rem;
  font-weight: 600;
  color: var(--white);
}

/* ── Documents page ──────────────────────────────────────── */
.docs-page { padding: 2.5rem 0 4rem; }

.docs-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2rem;
}

.docs-sidebar {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  height: fit-content;
  position: sticky;
  top: 80px;
}

.docs-sidebar h3 {
  background: var(--teal-dark);
  color: var(--white);
  font-size: .9rem;
  padding: .85rem 1rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.cat-list { list-style: none; }

.cat-list li a {
  display: block;
  padding: .7rem 1rem;
  font-size: .88rem;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  transition: all var(--transition);
}

.cat-list li a:hover,
.cat-list li a.active {
  background: var(--cream);
  color: var(--teal-dark);
  padding-left: 1.25rem;
}

.cat-list li:last-child a { border-bottom: none; }

.docs-search {
  margin-bottom: 1.5rem;
}

.docs-search input {
  width: 100%;
  padding: .65rem 1rem .65rem 2.5rem;
  border: 1px solid var(--border);
  border-radius: 30px;
  font-size: .9rem;
  background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23888' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.099zm-5.44 1.157a5.5 5.5 0 1 1 0-11 5.5 5.5 0 0 1 0 11z'/%3E%3C/svg%3E") no-repeat .85rem center;
  outline: none;
  transition: border-color var(--transition);
}

.docs-search input:focus { border-color: var(--teal); }

.doc-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  box-shadow: var(--shadow);
  transition: all var(--transition);
}

.doc-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-1px); }

.doc-icon {
  font-size: 2.25rem;
  flex-shrink: 0;
}

.doc-info { flex: 1; min-width: 0; }
.doc-info h4 { font-size: 1rem; color: var(--teal-dark); margin-bottom: .25rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-info p  { font-size: .83rem; color: var(--text-light); }
.doc-meta    { display: flex; align-items: center; gap: .5rem; margin-top: .4rem; flex-wrap: wrap; }

.badge {
  display: inline-block;
  padding: .15rem .6rem;
  border-radius: 30px;
  font-size: .72rem;
  font-weight: 600;
}

.badge-public   { background: #e6f7f0; color: #1a7a4a; }
.badge-members  { background: #eef5fb; color: #1a4a8a; }
.badge-owners   { background: #ede9fe; color: #5b21b6; }
.badge-board    { background: #fef3c7; color: #92400e; }
.badge-category { background: var(--cream); color: var(--teal-dark); }

.doc-actions {
  display: flex;
  gap: .5rem;
  flex-shrink: 0;
}

.doc-locked {
  text-align: center;
  padding: 3rem 2rem;
  background: var(--white);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
}

.doc-locked .lock-icon { font-size: 3rem; margin-bottom: 1rem; }
.doc-locked h3 { color: var(--teal-dark); margin-bottom: .5rem; }
.doc-locked p  { color: var(--text-light); font-size: .9rem; margin-bottom: 1.5rem; }

/* ── Page header strip ───────────────────────────────────── */
.page-header {
  background: linear-gradient(135deg, var(--teal-dark) 0%, var(--teal) 60%, var(--seafoam) 100%);
  padding: 2.5rem 0 4rem;
  margin-bottom: 0;
  position: relative;
}

.page-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 48px;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 1440 48' xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none'%3E%3Cpath d='M0,24 C360,48 720,0 1080,24 C1260,36 1360,18 1440,24 L1440,48 L0,48 Z' fill='%23faf7f1'/%3E%3C/svg%3E") no-repeat bottom center;
  background-size: 100% 100%;
}

.page-header h1 {
  color: var(--white);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: .25rem;
}

.page-header p {
  color: rgba(255,255,255,.75);
  font-size: .95rem;
}

/* ── Auth forms (login / register) ──────────────────────── */
.auth-wrap {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.auth-card {
  background: var(--white);
  border-top: 5px solid var(--teal-dark);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-lg);
}

.auth-logo {
  width: 90px;
  margin: 0 auto 1.5rem;
}

.auth-card h2 {
  text-align: center;
  margin-bottom: .25rem;
  font-size: 1.5rem;
}

.auth-card .auth-sub {
  text-align: center;
  font-size: .88rem;
  color: var(--text-light);
  margin-bottom: 2rem;
}

.form-group { margin-bottom: 1.25rem; }

.form-group label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: .4rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: .65rem .9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: .95rem;
  font-family: 'Open Sans', sans-serif;
  color: var(--text);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(26,122,142,.15);
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.form-error {
  background: #fef2f2;
  border-left: 4px solid #c0392b;
  padding: .8rem 1rem;
  margin-bottom: 1.25rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: .88rem;
  color: #c0392b;
}

.form-success {
  background: #f0fdf4;
  border-left: 4px solid #3a8a3a;
  padding: .8rem 1rem;
  margin-bottom: 1.25rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: .88rem;
  color: #1a5c1a;
}

.form-warning {
  background: #fffbeb;
  border-left: 4px solid var(--gold);
  padding: .8rem 1rem;
  margin-bottom: 1.25rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: .88rem;
  color: #7a5a10;
}

.btn-block { width: 100%; justify-content: center; }

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: .88rem;
  color: var(--text-light);
}

/* ── Document viewer ─────────────────────────────────────── */
.doc-viewer { padding: 2rem 0 4rem; }
.doc-viewer-inner {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.doc-viewer-toolbar {
  background: var(--teal-dark);
  padding: .85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.doc-viewer-toolbar h3 { color: var(--white); font-size: 1rem; }

.doc-viewer-content {
  padding: 2.5rem;
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.8;
  font-size: .97rem;
}

/* ── Footer ──────────────────────────────────────────────── */
.site-footer {
  background: var(--teal-dark);
  color: rgba(255,255,255,.75);
  padding: 3rem 0 1.5rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255,255,255,.12);
}

.footer-logo {
  width: 80px;
  margin-bottom: 1rem;
  opacity: .9;
}

.footer-desc {
  font-size: .88rem;
  line-height: 1.65;
  max-width: 260px;
}

.footer-col h4 {
  color: var(--white);
  font-size: .9rem;
  font-family: 'Playfair Display', serif;
  margin-bottom: .85rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--gold);
  display: inline-block;
}

.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: .5rem; }
.footer-col ul li a { color: rgba(255,255,255,.7); font-size: .88rem; transition: color var(--transition); }
.footer-col ul li a:hover { color: var(--gold-light); }

.footer-col address { font-style: normal; font-size: .88rem; line-height: 1.7; }
.footer-col address a { color: rgba(255,255,255,.7); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.25rem;
  font-size: .8rem;
  flex-wrap: wrap;
  gap: .5rem;
}

.footer-bottom a { color: rgba(255,255,255,.6); }
.footer-bottom a:hover { color: var(--gold-light); }

/* ── Community resources ─────────────────────────────────── */
.resource-section { margin-bottom: 2.5rem; }

.resource-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

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

.resource-table thead th {
  background: var(--teal-dark);
  color: var(--white);
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: .7rem 1.1rem;
  text-align: left;
  white-space: nowrap;
}

.resource-table tbody tr {
  border-top: 1px solid var(--border);
  transition: background var(--transition);
}

.resource-table tbody tr:hover { background: var(--sand); }
.resource-row-locked { opacity: .65; background: var(--sand) !important; }
.resource-row-locked:hover { background: var(--sand) !important; }

.resource-table td { padding: .8rem 1.1rem; vertical-align: middle; }

.resource-row-title {
  font-weight: 600;
  color: var(--teal-dark);
  white-space: nowrap;
}

.resource-row-title a { color: var(--teal-dark); text-decoration: none; }
.resource-row-title a:hover { text-decoration: underline; }

.resource-row-host {
  font-size: .75rem;
  color: var(--text-light);
  font-weight: 400;
  margin-top: .1rem;
}

.resource-row-desc { font-size: .85rem; color: var(--text-light); }

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

.badge-public  { background: #dcfce7; color: #15803d; }
.badge-members { background: #dbeafe; color: #1d4ed8; }
.badge-owners  { background: #ede9fe; color: #5b21b6; }
.badge-board   { background: #fef3c7; color: #92400e; }

.resource-visit-btn,
.resource-signin-link {
  font-size: .82rem;
  font-weight: 600;
  color: var(--teal-dark);
  text-decoration: none;
  white-space: nowrap;
}

.resource-visit-btn:hover,
.resource-signin-link:hover { text-decoration: underline; }

/* ── Member directory ────────────────────────────────────── */
.dir-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

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

.dir-table thead th {
  background: var(--teal-dark);
  color: var(--white);
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: .8rem 2rem;
  text-align: left;
  white-space: nowrap;
  border-right: 1px solid rgba(255,255,255,.12);
}
.dir-table thead th:last-child { border-right: none; }

.dir-table thead th[data-sortable] {
  cursor: pointer;
  user-select: none;
}
.dir-table thead th[data-sortable]:hover { background: var(--teal); }
.dir-table thead th.sort-asc::after  { content: ' ↑'; font-size: .8em; opacity: .8; }
.dir-table thead th.sort-desc::after { content: ' ↓'; font-size: .8em; opacity: .8; }

.dir-table tbody tr {
  border-top: 1px solid var(--border);
  transition: background var(--transition);
}

.dir-table tbody tr:nth-child(odd)  { background: var(--white); }
.dir-table tbody tr:nth-child(even) { background: #edf5f8; }
.dir-table tbody tr:hover           { background: #d4edf5 !important; }

.dir-table td {
  padding: .95rem 2rem;
  vertical-align: middle;
  border-right: 1px solid var(--border);
}
.dir-table td:last-child { border-right: none; }

.dir-name {
  font-weight: 700;
  color: var(--teal-dark);
  white-space: nowrap;
}

.dir-maps-link {
  color: var(--teal-dark);
  text-decoration: none;
}

.dir-maps-link:hover { text-decoration: underline; }

.dir-table td a { color: var(--teal-dark); }

.dir-household { color: var(--text-light); }

.dir-empty { color: #cbd5e1; }

/* ── Profile page ────────────────────────────────────────── */
.profile-page { padding: 2.5rem 0 3.5rem; }

.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
  margin-top: 1.5rem;
}

.profile-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow);
}

.profile-card-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  color: var(--teal-dark);
  margin-bottom: .3rem;
}

.profile-card-desc {
  font-size: .87rem;
  color: var(--text-light);
  margin-bottom: 1.25rem;
}

.dir-toggle {
  display: flex;
  align-items: center;
  gap: .6rem;
  cursor: pointer;
  padding: .5rem 0;
  font-size: .95rem;
  font-weight: 500;
}

.dir-toggle input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: var(--teal-dark);
  flex-shrink: 0;
  cursor: pointer;
}

.dir-toggle-sub { margin-left: 1.5rem; font-size: .9rem; font-weight: 400; }

.dir-options {
  border-left: 3px solid var(--teal);
  padding-left: 1rem;
  margin: .15rem 0 .75rem;
}

.profile-subsection {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.profile-subsection h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: .2rem;
}

.profile-hint { font-size: .82rem; color: var(--text-light); margin-bottom: .75rem; }

.household-list { display: flex; flex-direction: column; gap: .45rem; }

.household-row { display: flex; gap: .5rem; align-items: center; }

.hh-input {
  flex: 1;
  padding: .5rem .8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: .9rem;
  color: var(--text);
  background: var(--white);
  transition: border-color var(--transition);
}

.hh-input:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(26,122,142,.1);
}

.household-remove {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: #94a3b8;
  cursor: pointer;
  font-size: 1.1rem;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
  transition: all var(--transition);
}

.household-remove:hover { border-color: #dc2626; color: #dc2626; }

/* Nav sign-out button */
.nav-signout-btn {
  background: none;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 30px;
  color: rgba(255,255,255,.8);
  cursor: pointer;
  font-family: inherit;
  font-size: .85rem;
  padding: .3rem .85rem;
  transition: all var(--transition);
  margin-left: .15rem;
}

.nav-signout-btn:hover { background: rgba(255,255,255,.12); color: var(--white); }

/* Alert for public pages */
.alert {
  padding: .85rem 1.1rem;
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
  font-size: .9rem;
}

.alert-success { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.alert-danger,
.alert-error   { background: #fee2e2; color: #dc2626; border: 1px solid #fecaca; }
.alert .btn-close { display: none; }

/* ── Board of Directors ──────────────────────────────────── */
.board-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
  max-width: 900px;
  margin: 0 auto;
}

.board-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 2rem 1.5rem 1.75rem;
  text-align: center;
  border-top: 3px solid var(--gold);
  transition: transform var(--transition), box-shadow var(--transition);
}

.board-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,.1);
}

.board-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal-dark), var(--teal));
  color: var(--white);
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  letter-spacing: .03em;
  overflow: hidden;
  flex-shrink: 0;
}

.board-avatar--photo {
  background: none;
  border: 3px solid var(--gold);
}

.board-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.board-name {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--teal-dark);
  margin-bottom: .35rem;
  line-height: 1.3;
}

.board-position {
  font-size: .83rem;
  font-weight: 600;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: .07em;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 960px) {
  .home-grid { grid-template-columns: 1fr; }
  .docs-layout { grid-template-columns: 1fr; }
  .docs-sidebar { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .profile-grid { grid-template-columns: 1fr; }
  .board-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}

@media (max-width: 680px) {
  .nav-links { display: none; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: var(--teal-dark); padding: 1rem; gap: .25rem; }
  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }
  .site-nav { position: relative; }
  .nav-inner { position: static; }
  .cal-cell { min-height: 70px; }
  .cal-event { display: none; }
  .cal-cell.has-events::after { content: '●'; color: var(--gold); font-size: .6rem; display: block; }
  .doc-card { flex-wrap: wrap; }
  .doc-actions { width: 100%; justify-content: flex-end; }
  .footer-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .hero { padding: 3rem 0 2.5rem; }
  .quick-links { grid-template-columns: repeat(2, 1fr); }
}

/* ── Address autocomplete dropdown ──────────────────────────────────────────── */
.addr-ac-list {
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  background: #fff;
  border: 1px solid var(--border, #c8dde6);
  border-top: none;
  border-radius: 0 0 7px 7px;
  box-shadow: 0 6px 18px rgba(0,50,80,.13);
  list-style: none;
  margin: 0; padding: 0;
  z-index: 9999;
  max-height: 260px;
  overflow-y: auto;
  display: none;
}
.addr-ac-item {
  padding: .5rem .8rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: .1rem;
  border-bottom: 1px solid #f1f5f9;
}
.addr-ac-item:last-of-type { border-bottom: none; }
.addr-ac-item:hover, .addr-ac-active { background: #f0f9fc; }
.addr-ac-main { font-size: .875rem; color: var(--text, #1e3848); }
.addr-ac-sub  { font-size: .775rem; color: var(--text-light, #5a7888); }
.addr-ac-attr {
  padding: .3rem .8rem;
  font-size: .71rem;
  color: #94a3b8;
  background: #fafafa;
  border-top: 1px solid #f1f5f9;
  border-radius: 0 0 7px 7px;
}
.addr-ac-attr a { color: #94a3b8; text-decoration: none; }
.addr-ac-attr a:hover { text-decoration: underline; }

/* ── ARB Request page ────────────────────────────────────── */
.arb-page { padding: 2.5rem 0 4rem; }

.arb-layout { display: flex; flex-direction: column; gap: 1.75rem; }

/* Contact card */
.arb-contact-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 4px solid var(--teal-dark);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}
.arb-contact-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.arb-contact-header h3 { font-size: 1rem; margin: 0; }
.arb-edit-link { font-size: .83rem; color: var(--teal); }
.arb-contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem 2rem;
}
.arb-label { display: block; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-light); margin-bottom: .15rem; }
.arb-value { font-size: .9rem; color: var(--text); }

/* Form card */
.arb-form-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.arb-section {
  padding: 1.75rem;
  border-bottom: 1px solid #f1f5f9;
}
.arb-section:last-child { border-bottom: none; }

.arb-section-title {
  font-size: 1.05rem;
  margin-bottom: 1.25rem;
}
.arb-section-sub { font-size: .85rem; color: var(--text-light); margin-bottom: 1rem; }

/* Work type radio cards */
.arb-work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: .6rem;
}
.arb-work-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .4rem;
  padding: .9rem .5rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color .15s, background .15s;
  text-align: center;
}
.arb-work-option input[type="radio"] { display: none; }
.arb-work-option:hover { border-color: var(--teal); background: #f0fafc; }
.arb-work-option.selected { border-color: var(--teal-dark); background: #e8f7fa; }
.arb-work-icon { font-size: 1.6rem; line-height: 1; }
.arb-work-label { font-size: .78rem; font-weight: 600; color: var(--text); }

/* Performer radio cards */
.arb-performer-options { display: flex; gap: 1rem; flex-wrap: wrap; }
.arb-performer-option {
  flex: 1;
  min-width: 200px;
  display: flex;
  align-items: flex-start;
  gap: .9rem;
  padding: 1rem 1.25rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.arb-performer-option input[type="radio"] { display: none; }
.arb-performer-option:hover { border-color: var(--teal); background: #f0fafc; }
.arb-performer-option.selected { border-color: var(--teal-dark); background: #e8f7fa; }
.arb-performer-icon { font-size: 1.8rem; flex-shrink: 0; }
.arb-performer-option strong { display: block; font-size: .9rem; margin-bottom: .2rem; }
.arb-performer-option p { font-size: .8rem; color: var(--text-light); margin: 0; }

/* Contractor box */
.arb-contractor-box {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.arb-contractor-box h4 { font-size: .95rem; margin-bottom: 1rem; }
.arb-contractor-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.25rem; }

/* File upload slots */
.arb-upload-slots { display: flex; flex-direction: column; gap: .6rem; }

.arb-upload-slot {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .65rem .9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fafafa;
  transition: border-color .15s, background .15s;
}
.arb-upload-slot.has-file { border-color: var(--teal); background: #f0fafc; }
.arb-upload-slot input[type="file"] { display: none; }

.arb-slot-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--border);
  color: var(--text-light);
  font-size: .75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .15s, color .15s;
}
.arb-upload-slot.has-file .arb-slot-num { background: var(--teal); color: #fff; }

.arb-slot-body { flex: 1; }
.arb-slot-label {
  display: flex;
  align-items: center;
  gap: .55rem;
  cursor: pointer;
  font-size: .88rem;
  color: var(--text-light);
}
.arb-slot-icon { font-size: 1rem; }
.arb-slot-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arb-upload-slot.has-file .arb-slot-text { color: var(--text); font-weight: 600; }

/* Submit row */
.arb-submit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 1.75rem;
  background: #f8fafc;
  border-top: 1px solid #e8eff4;
  flex-wrap: wrap;
}

/* Required asterisk */
.req { color: #dc2626; font-size: .85em; }

/* My submissions table */
.arb-history { margin-top: 3rem; }
.arb-history h2 { font-size: 1.3rem; margin-bottom: 1.25rem; }
.table-wrap { overflow-x: auto; }
.arb-history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.arb-history-table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 700;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: .75rem 1rem;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
.arb-history-table td { padding: .8rem 1rem; border-bottom: 1px solid #f1f5f9; color: var(--text); vertical-align: middle; }
.arb-history-table tr:last-child td { border-bottom: none; }
.arb-notes-row td { padding-top: 0; padding-bottom: .75rem; font-size: .82rem; color: var(--text-light); }

/* ARB status badges */
.arb-badge { display: inline-block; padding: .25rem .7rem; border-radius: 20px; font-size: .75rem; font-weight: 700; }
.arb-badge-pending  { background: #fff7ed; color: #9a3412; }
.arb-badge-approved { background: #f0fdf4; color: #166534; }
.arb-badge-rejected { background: #fef2f2; color: #991b1b; }
.arb-badge-revision { background: #fefce8; color: #713f12; }

@media (max-width: 640px) {
  .arb-contact-grid { grid-template-columns: 1fr; }
  .arb-contractor-grid { grid-template-columns: 1fr; }
  .arb-work-grid { grid-template-columns: repeat(3, 1fr); }
  .arb-submit-row { flex-direction: column; align-items: stretch; text-align: center; }
}

/* ── My ARB Requests — list view ─────────────────────────────────────────── */
.arb-my-list { display: flex; flex-direction: column; gap: .75rem; }
.arb-my-list-item {
  display: flex;
  align-items: stretch;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  transition: box-shadow var(--transition), border-color var(--transition);
}
.arb-my-list-item:hover { box-shadow: 0 4px 12px rgba(0,0,0,.08); border-color: var(--teal-light); color: var(--text); }
.arb-mli-accent { width: 5px; flex-shrink: 0; }
.arb-mli-body { flex: 1; padding: .85rem 1.1rem; }
.arb-mli-top { display: flex; align-items: center; gap: .65rem; margin-bottom: .25rem; }
.arb-mli-id { font-weight: 700; color: var(--teal-dark); font-size: .95rem; }
.arb-mli-work { font-size: .95rem; font-weight: 600; color: var(--text); margin-bottom: .2rem; }
.arb-mli-meta { font-size: .8rem; color: var(--text-light); }
.arb-mli-notes { font-size: .8rem; color: var(--text-light); margin-top: .3rem; font-style: italic; }
.arb-mli-arrow { display: flex; align-items: center; padding: 0 1.1rem; font-size: 1.1rem; color: var(--text-light); }

/* ── My ARB Requests — detail view ──────────────────────────────────────── */
.arb-detail-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 1.5rem;
  align-items: start;
}
.arb-detail-col-main { display: flex; flex-direction: column; gap: 1.25rem; }
.arb-section-head { padding: 1rem 1.5rem; border-bottom: 1px solid #f1f5f9; background: #f8fafc; }

/* Detail definition list */
.arb-detail-dl {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: .4rem .75rem;
  margin: 0;
  font-size: .9rem;
}
.arb-detail-dl dt { font-weight: 600; color: var(--text-light); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; padding-top: .2rem; }
.arb-detail-dl dd { margin: 0; color: var(--text); line-height: 1.5; }
.arb-detail-dl .dd-full { grid-column: 1 / -1; }
.arb-view-desc {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: .75rem;
  font-size: .88rem;
  line-height: 1.6;
  color: #334155;
  white-space: pre-wrap;
  word-break: break-word;
  margin-top: .25rem;
}

/* Document list */
.arb-view-docs { display: flex; flex-direction: column; gap: .6rem; }
.arb-view-doc-row {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .6rem .75rem;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 6px;
}
.arb-view-doc-icon { font-size: 1.3rem; flex-shrink: 0; }
.arb-view-doc-info { flex: 1; min-width: 0; }
.arb-view-doc-name { display: block; font-size: .85rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arb-view-doc-meta { display: block; font-size: .75rem; color: var(--text-light); }

/* Status alert banners */
.arb-status-alert {
  display: flex;
  align-items: flex-start;
  gap: .85rem;
  padding: .9rem 1.1rem;
  border-radius: var(--radius);
  border: 1px solid currentColor;
  margin-bottom: 1.5rem;
  font-size: .9rem;
  line-height: 1.5;
}
.arb-alert-revision { background: #fef3c7; border-color: #fde68a; color: #92400e; }
.arb-alert-rejected  { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.arb-alert-approved  { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.arb-alert-icon { font-size: 1.25rem; flex-shrink: 0; line-height: 1.3; }
.arb-status-alert a { color: inherit; font-weight: 600; }

/* Member activity timeline */
.arb-member-tl {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 0;
}
.arb-member-tl::before {
  content: '';
  position: absolute;
  left: .6rem;
  top: .5rem;
  bottom: .5rem;
  width: 2px;
  background: var(--border);
}
.arb-mt-item { position: relative; margin-bottom: 1.2rem; }
.arb-mt-item:last-child { margin-bottom: 0; }
.arb-mt-dot {
  position: absolute;
  left: -1.65rem;
  top: .25rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--white);
  z-index: 1;
}
.arb-mt-dot.dot-submitted { border-color: var(--teal-dark); background: var(--teal-dark); }
.arb-mt-dot.dot-status    { border-color: #7c3aed; background: #7c3aed; }
.arb-mt-dot.dot-mine      { border-color: var(--teal); background: #e0f7fa; }
.arb-mt-dot.dot-board     { border-color: #0891b2; background: #e0f2fe; }
.arb-mt-meta {
  font-size: .83rem;
  color: var(--text-light);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .3rem;
  margin-bottom: .3rem;
  line-height: 1.4;
}
.arb-mt-meta strong { color: var(--text); }
.arb-mt-time { color: #94a3b8; font-size: .77rem; margin-left: .2rem; }
.arb-mt-body {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: .6rem .85rem;
  font-size: .875rem;
  color: #334155;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}
.arb-mt-body.body-mine  { background: #f0fafc; border-color: #a5f3fc; }
.arb-mt-body.body-board { background: #f0f9ff; border-color: #bae6fd; }

/* Comment input */
.arb-member-comment-box {
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
  margin-top: 1.25rem;
}
.arb-member-textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .65rem .85rem;
  font-size: .9rem;
  font-family: inherit;
  line-height: 1.5;
  resize: vertical;
  transition: border-color var(--transition);
  box-sizing: border-box;
}
.arb-member-textarea:focus { outline: none; border-color: var(--teal); }

@media (max-width: 768px) {
  .arb-detail-layout { grid-template-columns: 1fr; }
  .arb-detail-col-side { order: -1; }
  .arb-mli-arrow { display: none; }
}

/* ── ARB Progress Tracker ────────────────────────────────── */
.arb-req-progress {
  display: flex;
  align-items: flex-start;
  padding: 1.4rem 1.5rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}
.arb-ps-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 0 0 auto;
  min-width: 80px;
}
.arb-ps-line {
  flex: 1;
  height: 2px;
  margin-top: 15px;
  min-width: 32px;
  border-radius: 2px;
}
.arb-ps-line.arb-s-done    { background: var(--teal-dark); }
.arb-ps-line.arb-s-upcoming { background: #e2e8f0; }
.arb-ps-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .82rem;
  font-weight: 700;
  border: 2px solid;
  margin-bottom: .5rem;
  flex-shrink: 0;
}
.arb-ps-label { text-align: center; }
.arb-ps-name { font-size: .78rem; font-weight: 600; color: var(--text); }
.arb-ps-sub  { font-size: .68rem; color: var(--text-light); margin-top: .1rem; }

/* done */
.arb-ps-step.arb-s-done .arb-ps-dot {
  background: var(--teal-dark); border-color: var(--teal-dark); color: #fff;
}
/* active (pulsing) */
.arb-ps-step.arb-s-active .arb-ps-dot {
  background: #eff6ff; border-color: #3b82f6; color: #3b82f6;
  animation: arb-dot-pulse 2s infinite;
}
.arb-ps-step.arb-s-active .arb-ps-name { color: #2563eb; }
/* warn */
.arb-ps-step.arb-s-warn .arb-ps-dot {
  background: #fffbeb; border-color: #d97706; color: #b45309;
}
.arb-ps-step.arb-s-warn .arb-ps-name { color: #b45309; }
/* upcoming */
.arb-ps-step.arb-s-upcoming .arb-ps-dot {
  background: #f8fafc; border-color: #cbd5e1; color: #94a3b8;
}
.arb-ps-step.arb-s-upcoming .arb-ps-name { color: #94a3b8; }
/* approved */
.arb-ps-step.arb-s-approved .arb-ps-dot {
  background: #16a34a; border-color: #16a34a; color: #fff;
}
.arb-ps-step.arb-s-approved .arb-ps-name { color: #16a34a; }
/* rejected */
.arb-ps-step.arb-s-rejected .arb-ps-dot {
  background: #dc2626; border-color: #dc2626; color: #fff;
}
.arb-ps-step.arb-s-rejected .arb-ps-name { color: #dc2626; }

@keyframes arb-dot-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(59,130,246,.35); }
  50%       { box-shadow: 0 0 0 7px rgba(59,130,246,0); }
}

/* ── ARB Work Type Hero Banner ───────────────────────────── */
.arb-work-hero {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.15rem 1.25rem;
  background: linear-gradient(135deg, var(--teal-dark) 0%, var(--teal) 100%);
  color: #fff;
}
.arb-work-hero-icon  { font-size: 2rem; line-height: 1; flex-shrink: 0; }
.arb-work-hero-label { font-size: 1rem; font-weight: 700; }
.arb-work-hero-sub   { font-size: .73rem; opacity: .75; margin-top: .1rem; }

/* ── ARB Revision CTA ────────────────────────────────────── */
.arb-revision-cta {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  background: #fffbeb;
  border: 1.5px solid #d97706;
  border-radius: var(--radius-lg);
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.arb-cta-icon    { font-size: 1.8rem; flex-shrink: 0; }
.arb-cta-content { flex: 1; min-width: 0; }
.arb-cta-title   { font-weight: 700; color: #92400e; margin-bottom: .25rem; font-size: .95rem; }
.arb-cta-text    { font-size: .855rem; color: #78350f; line-height: 1.5; }
.arb-cta-btn     { flex-shrink: 0; white-space: nowrap; }

/* ── ARB Sidebar Meta Table ──────────────────────────────── */
.arb-sidebar-meta {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-top: .75rem;
}
.arb-smeta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .55rem 1rem;
  font-size: .815rem;
  border-bottom: 1px solid var(--border);
  gap: .5rem;
}
.arb-smeta-row:last-child { border-bottom: none; }
.arb-smeta-label { color: var(--text-light); flex-shrink: 0; }
.arb-smeta-val   { font-weight: 600; color: var(--text); text-align: right; }

/* ── Responsive progress tracker ────────────────────────── */
@media (max-width: 600px) {
  .arb-req-progress { flex-direction: column; align-items: stretch; padding: 1.1rem 1.1rem; }
  .arb-ps-line { width: 2px; height: 20px; min-width: auto; margin-top: 0; margin-left: 14px; flex: 0 0 20px; }
  .arb-ps-step { flex-direction: row; align-items: center; gap: .75rem; min-width: auto; }
  .arb-ps-dot  { margin-bottom: 0; }
  .arb-ps-label { text-align: left; }
  .arb-revision-cta { flex-direction: column; }
  .arb-cta-btn { width: 100%; text-align: center; }
}
