/* ============================================================
   Sinakagon Datu Lidau Family Tree — Main Stylesheet
   Theme: Heritage / Traditional Sabahan
   ============================================================ */

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

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'Open Sans', sans-serif;
  background: #FDF6EC;
  color: #2C1A0E;
  min-height: 100vh;
  display: flex;
}

/* ── CSS Variables ────────────────────────────────────────── */
:root {
  --gold:        #C9A84C;
  --gold-light:  #E8D08A;
  --gold-dark:   #9A7A2E;
  --burgundy:    #7B2D42;
  --burgundy-dk: #5A1E30;
  --cream:       #FDF6EC;
  --cream-dark:  #F5E8CC;
  --brown:       #3D2314;
  --brown-light: #6B3A22;
  --text:        #2C1A0E;
  --text-muted:  #7A6050;
  --male-bg:     #EBF3FB;
  --male-border: #5B9BD5;
  --female-bg:   #FCF0F4;
  --female-border:#D4607A;
  --sidebar-w:   260px;
  --shadow:      0 2px 12px rgba(61,35,20,0.12);
  --shadow-lg:   0 8px 32px rgba(61,35,20,0.18);
  --radius:      10px;
  --radius-sm:   6px;
}

/* ── Sidebar Navigation ───────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: linear-gradient(180deg, var(--brown) 0%, var(--burgundy-dk) 100%);
  position: fixed;
  top: 0; left: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
  box-shadow: 3px 0 20px rgba(0,0,0,0.3);
}

.sidebar-header {
  padding: 28px 20px 20px;
  border-bottom: 1px solid rgba(201,168,76,0.3);
  text-align: center;
}

.sidebar-crest {
  width: 120px; height: 120px;
  border-radius: 12px;
  margin: 0 auto 12px;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.35));
}

.sidebar-title {
  font-family: 'Playfair Display', serif;
  color: var(--gold-light);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
}

.sidebar-subtitle {
  color: rgba(255,255,255,0.5);
  font-size: 0.72rem;
  margin-top: 4px;
  letter-spacing: 0.5px;
}

.sidebar-nav { flex: 1; padding: 16px 0; }

.nav-section-label {
  color: var(--gold);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 14px 20px 6px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 20px;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}

.nav-link:hover {
  background: rgba(201,168,76,0.12);
  color: #fff;
  border-left-color: var(--gold);
}

.nav-link.active {
  background: rgba(201,168,76,0.18);
  color: var(--gold-light);
  border-left-color: var(--gold);
  font-weight: 600;
}

.nav-icon { font-size: 1.1rem; width: 20px; text-align: center; }

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(201,168,76,0.2);
  font-size: 0.72rem;
  color: rgba(255,255,255,0.35);
  text-align: center;
}

/* ── Main Content ─────────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-header {
  background: linear-gradient(135deg, var(--brown) 0%, var(--burgundy) 100%);
  padding: 28px 36px;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.page-header::after {
  content: '';
  position: absolute;
  bottom: 0; right: 0;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(201,168,76,0.15) 0%, transparent 70%);
  pointer-events: none;
}

.page-header h1 {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: #fff;
  position: relative;
}

.page-header p {
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  margin-top: 4px;
  position: relative;
}

.page-header-actions {
  position: absolute;
  top: 28px; right: 36px;
  display: flex; gap: 10px;
}

.content-body { padding: 32px 36px; flex: 1; }

/* ── Cards ────────────────────────────────────────────────── */
.card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(201,168,76,0.2);
}

.card-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--cream-dark);
  display: flex; align-items: center; gap: 10px;
}

.card-header h2, .card-header h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  color: var(--brown);
}

.card-body { padding: 22px; }

/* ── Stats Grid ───────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}

.stat-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(201,168,76,0.2);
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}

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

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--gold), var(--burgundy));
}

.stat-icon { font-size: 2rem; margin-bottom: 8px; }
.stat-value {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--brown);
  line-height: 1;
}
.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ── Member Card ──────────────────────────────────────────── */
.members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}

.member-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(201,168,76,0.15);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  color: inherit;
  display: block;
}

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

.member-card-header {
  padding: 20px 16px 14px;
  text-align: center;
  background: var(--cream-dark);
  border-bottom: 2px solid var(--gold-light);
  position: relative;
}

.member-card.male   .member-card-header { background: var(--male-bg);   border-bottom-color: var(--male-border); }
.member-card.female .member-card-header { background: var(--female-bg); border-bottom-color: var(--female-border); }

.member-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  margin: 0 auto 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem;
  border: 3px solid rgba(255,255,255,0.8);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.member-avatar.male   { background: linear-gradient(135deg, #5B9BD5, #3A7BBF); color: #fff; }
.member-avatar.female { background: linear-gradient(135deg, #D4607A, #B8405F); color: #fff; }

.member-card-name {
  font-family: 'Playfair Display', serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--brown);
  line-height: 1.3;
}

.member-card-title-badge {
  display: inline-block;
  background: var(--gold);
  color: var(--brown);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.member-card-body { padding: 14px 16px; }

.member-card-info {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
}

.living-badge {
  display: inline-block;
  background: #D4EDDA;
  color: #155724;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
}

.deceased-badge {
  display: inline-block;
  background: #F5F5F5;
  color: #6C757D;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
}

/* ── Generation Badge ─────────────────────────────────────── */
.gen-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--cream-dark);
  border: 1px solid var(--gold-light);
  color: var(--brown-light);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-family: 'Open Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--brown);
  box-shadow: 0 2px 8px rgba(201,168,76,0.4);
}
.btn-primary:hover { filter: brightness(1.1); transform: translateY(-1px); }

.btn-secondary {
  background: #fff;
  color: var(--brown);
  border: 1.5px solid var(--gold);
}
.btn-secondary:hover { background: var(--cream-dark); }

.btn-danger {
  background: #E53E3E;
  color: #fff;
}
.btn-danger:hover { background: #C53030; }

.btn-sm { padding: 6px 14px; font-size: 0.8rem; }

/* ── Search Bar ───────────────────────────────────────────── */
.search-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
  align-items: center;
}

.search-input {
  flex: 1;
  padding: 12px 18px;
  border: 1.5px solid var(--cream-dark);
  border-radius: var(--radius-sm);
  font-family: 'Open Sans', sans-serif;
  font-size: 0.9rem;
  background: #fff;
  color: var(--text);
  transition: border-color 0.2s;
}
.search-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.15);
}

.filter-select {
  padding: 12px 16px;
  border: 1.5px solid var(--cream-dark);
  border-radius: var(--radius-sm);
  font-family: 'Open Sans', sans-serif;
  font-size: 0.875rem;
  background: #fff;
  color: var(--text);
  cursor: pointer;
}
.filter-select:focus { outline: none; border-color: var(--gold); }

/* ── Profile Page ─────────────────────────────────────────── */
.profile-hero {
  background: linear-gradient(135deg, var(--brown) 0%, var(--burgundy) 60%, var(--burgundy-dk) 100%);
  padding: 36px;
  display: flex;
  gap: 28px;
  align-items: flex-start;
  color: #fff;
}

.profile-avatar-lg {
  width: 110px; height: 110px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem;
  flex-shrink: 0;
  border: 4px solid rgba(201,168,76,0.6);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.profile-avatar-lg.male   { background: linear-gradient(135deg, #5B9BD5, #3A7BBF); }
.profile-avatar-lg.female { background: linear-gradient(135deg, #D4607A, #B8405F); }

.profile-info-main h1 {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: #fff;
}

.profile-dates {
  display: flex;
  gap: 20px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.profile-date-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.8);
}

.profile-tabs {
  display: flex;
  border-bottom: 2px solid var(--cream-dark);
  margin-bottom: 24px;
  gap: 0;
  background: #fff;
}

.profile-tab {
  padding: 12px 24px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: 'Open Sans', sans-serif;
}

.profile-tab:hover { color: var(--brown); }
.profile-tab.active { color: var(--gold-dark); border-bottom-color: var(--gold-dark); }

.profile-section { display: none; }
.profile-section.active { display: block; }

/* ── Info Grid ────────────────────────────────────────────── */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.info-item label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.info-item span {
  font-size: 0.9rem;
  color: var(--text);
  font-weight: 500;
}

/* ── Timeline ─────────────────────────────────────────────── */
.timeline { position: relative; padding-left: 32px; }
.timeline::before {
  content: '';
  position: absolute;
  left: 10px; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--gold), var(--burgundy));
}

.timeline-item {
  position: relative;
  margin-bottom: 24px;
}

.timeline-dot {
  position: absolute;
  left: -27px;
  top: 4px;
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.5rem;
}

.timeline-dot.birth    { background: #D4EDDA; border-color: #28A745; }
.timeline-dot.death    { background: #F8D7DA; border-color: #DC3545; }
.timeline-dot.marriage { background: #FFF3CD; border-color: var(--gold); }
.timeline-dot.milestone{ background: #D1ECF1; border-color: #17A2B8; }

.timeline-date {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.timeline-label {
  font-size: 0.9rem;
  color: var(--text);
  font-weight: 500;
}

.timeline-member {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ── Family Relationships ─────────────────────────────────── */
.relation-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.relation-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--cream-dark);
  border: 1px solid var(--gold-light);
  border-radius: 50px;
  padding: 6px 14px;
  text-decoration: none;
  color: var(--brown);
  font-size: 0.82rem;
  font-weight: 500;
  transition: all 0.2s;
}
.relation-chip:hover { background: var(--gold-light); }
.relation-chip .chip-avatar {
  width: 24px; height: 24px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; color: #fff;
}
.relation-chip .chip-avatar.male   { background: #5B9BD5; }
.relation-chip .chip-avatar.female { background: #D4607A; }

/* ── Tree Visualization ───────────────────────────────────── */
.tree-container {
  width: 100%;
  height: calc(100vh - 140px);
  overflow: hidden;
  position: relative;
  background: linear-gradient(135deg, #FDF6EC 0%, #F5E8CC 100%);
  border-radius: var(--radius);
  border: 1px solid rgba(201,168,76,0.3);
}

.tree-canvas {
  position: absolute;
  top: 0; left: 0;
  transform-origin: 0 0;
  cursor: grab;
}
.tree-canvas:active { cursor: grabbing; }

.tree-node {
  position: absolute;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 3px 14px rgba(61,35,20,0.15);
  border: 2px solid var(--gold-light);
  width: 160px;
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.2s;
  overflow: hidden;
}

.tree-node:hover { box-shadow: 0 6px 24px rgba(61,35,20,0.25); transform: scale(1.03); z-index: 10; }
.tree-node.male   { border-color: var(--male-border); }
.tree-node.female { border-color: var(--female-border); }
.tree-node.highlighted { border-color: var(--gold); border-width: 3px; box-shadow: 0 0 0 4px rgba(201,168,76,0.25); }

.tree-node-top {
  padding: 10px 10px 8px;
  text-align: center;
}

.tree-node.male   .tree-node-top { background: var(--male-bg); }
.tree-node.female .tree-node-top { background: var(--female-bg); }

.tree-node-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  margin: 0 auto 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; color: #fff;
  border: 2px solid rgba(255,255,255,0.8);
}

.tree-node.male   .tree-node-avatar { background: linear-gradient(135deg, #5B9BD5, #3A7BBF); }
.tree-node.female .tree-node-avatar { background: linear-gradient(135deg, #D4607A, #B8405F); }

.tree-node-name {
  font-family: 'Playfair Display', serif;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--brown);
  line-height: 1.3;
}

.tree-node-body {
  padding: 6px 10px 8px;
  font-size: 0.68rem;
  color: var(--text-muted);
  border-top: 1px solid var(--cream-dark);
  text-align: center;
}

.tree-node-datu {
  display: inline-block;
  background: var(--gold);
  color: var(--brown);
  font-size: 0.58rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  text-transform: uppercase;
  margin-bottom: 3px;
}

.tree-controls {
  position: absolute;
  top: 16px; right: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 50;
}

.tree-ctrl-btn {
  width: 36px; height: 36px;
  background: #fff;
  border: 1.5px solid var(--gold-light);
  border-radius: 8px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  box-shadow: var(--shadow);
  transition: all 0.2s;
  color: var(--brown);
}
.tree-ctrl-btn:hover { background: var(--cream-dark); }

.tree-legend {
  position: absolute;
  bottom: 16px; left: 16px;
  background: rgba(255,255,255,0.95);
  border: 1px solid var(--gold-light);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.75rem;
  box-shadow: var(--shadow);
  display: flex; gap: 14px;
}

.legend-item {
  display: flex; align-items: center; gap: 6px; color: var(--text-muted);
}

.legend-dot {
  width: 12px; height: 12px;
  border-radius: 3px;
  border: 2px solid;
}

/* ── Form Styles ──────────────────────────────────────────── */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full-width { grid-column: 1 / -1; }

.form-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--brown-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-input, .form-select, .form-textarea {
  padding: 10px 14px;
  border: 1.5px solid var(--cream-dark);
  border-radius: var(--radius-sm);
  font-family: 'Open Sans', sans-serif;
  font-size: 0.9rem;
  color: var(--text);
  background: #fff;
  transition: border-color 0.2s;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.12);
}

.form-textarea { resize: vertical; min-height: 100px; }

.form-hint { font-size: 0.75rem; color: var(--text-muted); }

.form-section {
  margin-bottom: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--cream-dark);
}

.form-section:last-child { border-bottom: none; }

.form-section-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  color: var(--brown);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ── Table ────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
thead th {
  padding: 12px 16px;
  text-align: left;
  background: var(--cream-dark);
  color: var(--brown-light);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--gold-light);
}
tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--cream-dark);
  color: var(--text);
  vertical-align: middle;
}
tbody tr:hover { background: rgba(201,168,76,0.05); }
tbody tr:last-child td { border-bottom: none; }

/* ── Alerts ───────────────────────────────────────────────── */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 18px;
}
.alert-success { background: #D4EDDA; color: #155724; border: 1px solid #C3E6CB; }
.alert-info    { background: #D1ECF1; color: #0C5460; border: 1px solid #BEE5EB; }
.alert-warning { background: #FFF3CD; color: #856404; border: 1px solid #FFEEBA; }

/* ── Decorative Divider ───────────────────────────────────── */
.ornament-divider {
  text-align: center;
  color: var(--gold);
  font-size: 1.2rem;
  margin: 24px 0;
  letter-spacing: 12px;
}

/* ── Home Hero ────────────────────────────────────────────── */
.home-hero {
  background: linear-gradient(135deg, var(--brown) 0%, var(--burgundy) 60%, #9B4560 100%);
  padding: 48px 36px;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.home-hero::before {
  content: '⬡ ⬡ ⬡ ⬡ ⬡';
  position: absolute;
  top: 20px; right: 30px;
  font-size: 2rem;
  color: rgba(201,168,76,0.2);
  letter-spacing: 10px;
}

.home-hero-title {
  font-family: 'Playfair Display', serif;
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 8px;
}

.home-hero-subtitle {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1.1rem;
  color: var(--gold-light);
  margin-bottom: 14px;
}

.home-hero-desc {
  color: rgba(255,255,255,0.75);
  font-size: 0.9rem;
  line-height: 1.7;
  max-width: 600px;
  margin-bottom: 24px;
}

.gold-line {
  height: 2px;
  background: linear-gradient(90deg, var(--gold), transparent);
  margin: 14px 0;
  max-width: 300px;
}

/* ── Documents ────────────────────────────────────────────── */
.doc-card {
  background: #fff;
  border: 1px solid var(--cream-dark);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  transition: box-shadow 0.2s;
}
.doc-card:hover { box-shadow: var(--shadow); }

.doc-icon {
  width: 48px; height: 48px;
  border-radius: 8px;
  background: var(--cream-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

/* ── Pagination ───────────────────────────────────────────── */
.pagination {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 28px;
  align-items: center;
}
.page-btn {
  padding: 7px 14px;
  border: 1.5px solid var(--cream-dark);
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--text);
  transition: all 0.2s;
}
.page-btn:hover { background: var(--cream-dark); }
.page-btn.active { background: var(--gold); border-color: var(--gold); color: var(--brown); font-weight: 700; }

/* ── Mobile Nav ───────────────────────────────────────────── */
.mobile-nav-toggle {
  display: none;
  position: fixed;
  top: 14px; left: 14px;
  z-index: 200;
  background: var(--brown);
  color: var(--gold);
  border: none;
  border-radius: 8px;
  width: 40px; height: 40px;
  font-size: 1.2rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s;
  }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .mobile-nav-toggle { display: flex; }
  .content-body { padding: 20px; }
  .page-header { padding: 20px; }
  .home-hero { padding: 32px 20px; }
  .home-hero-title { font-size: 1.7rem; }
  .page-header-actions { position: static; margin-top: 14px; }
  .page-header { padding-bottom: 20px; }
}

@media (max-width: 600px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .members-grid { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .profile-hero { flex-direction: column; align-items: center; text-align: center; }
  .profile-dates { justify-content: center; }
}

/* ── Utility ──────────────────────────────────────────────── */
.text-gold    { color: var(--gold-dark); }
.text-muted   { color: var(--text-muted); }
.text-center  { text-align: center; }
.mt-4  { margin-top: 1rem; }
.mt-6  { margin-top: 1.5rem; }
.mb-4  { margin-bottom: 1rem; }
.mb-6  { margin-bottom: 1.5rem; }
.gap-3 { gap: 0.75rem; }
.flex  { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.hidden { display: none !important; }
.divider { height: 1px; background: var(--cream-dark); margin: 20px 0; }
