/* ==========================================================================
   Sakha Connect - Core Design System & Stylesheet
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  /* Color Palette */
  --primary-color: #0f172a;       /* Deep Slate Blue */
  --primary-light: #1e293b;      /* Slate Blue */
  --accent-gold: #ffb300;        /* Pure Gold */
  --accent-gold-light: #ffd54f;  /* Soft Gold */
  --accent-gold-dark: #ff8f00;   /* Rich Amber */
  --bg-base: #f8fafc;            /* Off-white */
  --bg-card: #ffffff;            /* White */
  --text-main: #0f172a;          /* Charcoal */
  --text-muted: #64748b;         /* Muted Slate */
  --text-light: #f8fafc;         /* Off-white Text */
  --border-color: #e2e8f0;       /* Light border */
  --success: #10b981;            /* Emerald */
  --danger: #ef4444;             /* Rose Red */
  --warning: #f59e0b;            /* Warm Amber */

  /* UI Tokens */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 2px 4px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 20px 40px -15px rgba(15, 23, 42, 0.12);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-base);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--primary-color);
}

/* ==========================================================================
   Layout - Fixed Banner & Navigation
   ========================================================================== */

/* Top Fixed Banner */
.fixed-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 100px;
  background: linear-gradient(135deg, var(--accent-gold-light), var(--accent-gold));
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  box-shadow: 0 4px 20px rgba(255, 179, 0, 0.25);
  transition: var(--transition);
}

.banner-left {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.banner-img-container {
  width: 80px;
  height: 80px;
  border-radius: 12px;
  border: 2px solid #ffffff;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #ffffff;
  transition: var(--transition);
}

.banner-img-container:hover {
  transform: scale(1.05) rotate(3deg);
  border-color: var(--primary-color);
}

.banner-img-container img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background-color: #ffffff;
}

.banner-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.banner-title h1 {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary-color);
  letter-spacing: -0.5px;
  line-height: 1.1;
  text-transform: uppercase;
}

.banner-title span {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-light);
  opacity: 0.8;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* User Identity and Status Badge */
.user-identity {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.3);
  padding: 0.5rem 1rem;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(5px);
}

.user-identity img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid #ffffff;
}

.user-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary-color);
}

.user-role-badge {
  font-size: 0.7rem;
  text-transform: uppercase;
  background-color: var(--primary-color);
  color: var(--accent-gold);
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 700;
}

/* Secondary Navigation Bar (Fixed directly under banner) */
.fixed-nav {
  position: fixed;
  top: 100px;
  left: 0;
  right: 0;
  height: 55px;
  background-color: var(--primary-color);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 1rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow-x: auto;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 0.75rem;
  max-width: 1200px;
  width: 100%;
  justify-content: center;
}

.nav-item {
  color: var(--text-light);
  text-decoration: none;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.4rem 1.1rem;
  border-radius: 30px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-item:hover, .nav-item.active {
  background-color: var(--accent-gold);
  color: var(--primary-color);
  transform: translateY(-2px);
}

.nav-item.logout-btn {
  background-color: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.nav-item.logout-btn:hover {
  background-color: var(--danger);
  color: #ffffff;
  border-color: var(--danger);
}

/* ==========================================================================
   Main Layout & Content Area
   ========================================================================== */

main {
  margin-top: 175px;
  min-height: calc(100vh - 165px);
  padding: 2rem 1.5rem;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  transition: var(--transition);
}

/* View Sections */
.view-section {
  display: none;
  animation: fadeIn 0.4s ease-out;
}

.view-section.active {
  display: block;
}

/* Keyframes */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   Reusable UI Components
   ========================================================================== */

/* Glass Cards */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  padding: 2rem;
  margin-bottom: 2rem;
  transition: var(--transition);
}

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

.card-header {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.card-title {
  font-size: 1.5rem;
  position: relative;
  padding-bottom: 4px;
}

.card-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 50px;
  height: 4px;
  background-color: var(--accent-gold);
  border-radius: 2px;
}

/* Form Styles */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
select,
textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background-color: var(--bg-base);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: var(--transition);
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent-gold);
  background-color: #ffffff;
  box-shadow: 0 0 0 4px rgba(255, 179, 0, 0.15);
}

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

/* Photo Upload Button System */
.photo-uploader {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: var(--bg-base);
  padding: 1rem;
  border-radius: var(--radius-md);
  border: 2px dashed var(--border-color);
  transition: var(--transition);
  position: relative;
}

.photo-uploader:hover {
  border-color: var(--accent-gold);
}

.photo-preview-container {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-sm);
  background-color: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 2px solid #ffffff;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.photo-preview-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-preview-container i {
  font-size: 2rem;
  color: var(--text-muted);
}

.upload-controls {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.upload-file-btn {
  background-color: var(--primary-color);
  color: var(--accent-gold);
  border: none;
  font-weight: 600;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
  display: inline-block;
  text-align: center;
}

.upload-file-btn:hover {
  background-color: var(--primary-light);
  transform: translateY(-1px);
}

.photo-uploader input[type="file"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-weight: 600;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.95rem;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
}

.btn-primary {
  background-color: var(--primary-color);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-dark));
  color: var(--primary-color);
  font-weight: 700;
}

.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 179, 0, 0.3);
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background-color: var(--bg-base);
  transform: translateY(-2px);
}

.btn-danger {
  background-color: var(--danger);
  color: #ffffff;
}

.btn-danger:hover {
  background-color: #dc2626;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(239, 68, 68, 0.25);
}

.btn-sm {
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
  border-radius: 6px;
}

/* Buttons Container */
.btn-group {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

/* Data Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  margin-bottom: 1.5rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
  background-color: #ffffff;
}

th {
  background-color: var(--primary-color);
  color: var(--text-light);
  font-family: var(--font-heading);
  font-weight: 600;
  padding: 1rem 1.25rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
  vertical-align: middle;
}

tr:last-child td {
  border-bottom: none;
}

tr.clickable-row {
  cursor: pointer;
  transition: var(--transition);
}

tr.clickable-row:hover {
  background-color: rgba(255, 179, 0, 0.05);
}

.td-photo {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-color);
}

/* Custom Badges */
.badge {
  display: inline-block;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-success {
  background-color: rgba(16, 185, 129, 0.12);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-danger {
  background-color: rgba(239, 68, 68, 0.12);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.badge-warning {
  background-color: rgba(245, 158, 11, 0.12);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

/* ==========================================================================
   Specfic Views - Home, Profile, Infowall
   ========================================================================== */

/* Welcome / Hero Widget */
.hero-widget {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 3rem 2.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.hero-widget::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  background: rgba(255, 179, 0, 0.1);
  filter: blur(20px);
}

.hero-widget h2 {
  color: #ffffff;
  font-size: 2.25rem;
  margin-bottom: 0.75rem;
}

.hero-widget p {
  color: rgba(248, 250, 252, 0.8);
  font-size: 1.1rem;
  max-width: 600px;
  margin-bottom: 1.5rem;
}

/* Grid Layout for Dashboard statistics */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background-color: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 1.25rem;
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-gold);
}

.stat-icon {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-sm);
  background-color: rgba(255, 179, 0, 0.12);
  color: var(--accent-gold-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--primary-color);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* INFOWALL - Modern Pinterest-style Grid or elegant card list */
.wall-layout {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

.post-card {
  background-color: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.post-card:hover {
  transform: translateY(-5px) scale(1.01);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-gold);
}

.post-card-banner {
  height: 8px;
  background: linear-gradient(90deg, var(--accent-gold), var(--accent-gold-dark));
}

.post-card.pending-post .post-card-banner {
  background: linear-gradient(90deg, var(--warning), #f59e0b);
}

.post-card-body {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.post-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.post-date {
  font-weight: 500;
}

.post-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--primary-color);
}

.post-content {
  color: var(--text-main);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  white-space: pre-line;
  flex-grow: 1;
}

.post-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-top: 1px solid var(--border-color);
  padding-top: 1rem;
}

.post-author-img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background-color: #e2e8f0;
}

.post-author-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary-light);
}

.post-card-footer {
  padding: 1rem 1.5rem;
  background-color: var(--bg-base);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Login Panel Layout */
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem 0;
}

.login-card {
  width: 100%;
  max-width: 450px;
  background-color: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.login-header {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  color: #ffffff;
  padding: 2rem;
  text-align: center;
  position: relative;
}

.login-header h2 {
  color: #ffffff;
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.login-header p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

.login-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  background-color: var(--bg-base);
}

.login-tab-btn {
  flex: 1;
  padding: 1rem;
  border: none;
  background: transparent;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.login-tab-btn:hover {
  color: var(--primary-color);
  background-color: rgba(0, 0, 0, 0.02);
}

.login-tab-btn.active {
  color: var(--primary-color);
  background-color: #ffffff;
  border-bottom: 3px solid var(--accent-gold);
}

.login-body {
  padding: 2rem;
}

.login-seed-info {
  background-color: rgba(255, 179, 0, 0.08);
  border: 1px dashed var(--accent-gold);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  margin-top: 1.5rem;
  font-size: 0.8rem;
  color: #b45309;
}

/* ==========================================================================
   Details Drawer / Sliding Overlay Panel
   ========================================================================== */

.details-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(15, 23, 42, 0.6);
  z-index: 2000;
  display: flex;
  justify-content: flex-end;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  backdrop-filter: blur(4px);
}

.details-overlay.active {
  opacity: 1;
  visibility: visible;
}

.details-drawer {
  width: 100%;
  max-width: 750px;
  height: 100%;
  background-color: #ffffff;
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.details-overlay.active .details-drawer {
  transform: translateX(0);
}

.drawer-header {
  background-color: var(--primary-color);
  color: #ffffff;
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-header h3 {
  color: #ffffff;
  font-size: 1.4rem;
}

.drawer-close {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 1.8rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

.drawer-close:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

.drawer-content {
  padding: 2rem;
  overflow-y: auto;
  flex-grow: 1;
}

/* Profile Summary in Drilldown */
.profile-summary {
  display: flex;
  gap: 2rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 2rem;
  flex-wrap: wrap;
}

.profile-avatar-container {
  width: 200px;
  height: 200px;
  background-color: var(--bg-base);
  border: 1px solid var(--border-color);
  padding: 0.75rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.profile-avatar-large {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 2px solid #ffffff;
  box-shadow: var(--shadow-sm);
  background-color: #f1f5f9;
}

.profile-info-block {
  flex: 1;
  min-width: 250px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.profile-name-lg {
  font-size: 1.8rem;
  color: var(--primary-color);
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.profile-meta-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem 1.5rem;
  font-size: 0.9rem;
}

.meta-label {
  font-weight: 600;
  color: var(--text-muted);
}

.meta-value {
  color: var(--text-main);
}

/* Family Grid layout inside drilldown */
.family-drawer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.family-drawer-card {
  background: var(--bg-base);
  border-radius: var(--radius-sm);
  padding: 1rem;
  border: 1px solid var(--border-color);
  display: flex;
  gap: 1rem;
  align-items: center;
}

.family-card-img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  background-color: #e2e8f0;
  border: 2px solid #ffffff;
  box-shadow: var(--shadow-sm);
}

.family-card-det {
  display: flex;
  flex-direction: column;
}

.family-card-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary-color);
}

.family-card-rel {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-gold-dark);
  text-transform: uppercase;
}

.family-card-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Toasts & Notification
   ========================================================================== */

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background-color: var(--primary-color);
  color: #ffffff;
  padding: 1rem 1.5rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transform: translateY(20px);
  opacity: 0;
  animation: toastIn 0.3s forwards;
  min-width: 280px;
}

@keyframes toastIn {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.toast-success {
  border-left: 4px solid var(--success);
}

.toast-error {
  border-left: 4px solid var(--danger);
}

.toast-warning {
  border-left: 4px solid var(--warning);
}

/* ==========================================================================
   Family Member Entry Dynamic List (Inside Member Portal)
   ========================================================================== */

.family-input-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 1rem;
  background-color: var(--bg-base);
  padding: 1.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  margin-bottom: 1rem;
  position: relative;
  align-items: end;
}

.family-input-row .remove-row-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: none;
  border: none;
  color: var(--danger);
  cursor: pointer;
  font-size: 1.1rem;
}

.family-members-container {
  margin-top: 1rem;
}

/* ==========================================================================
   Empty State Visuals
   ========================================================================== */

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

.empty-state i {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--border-color);
}

.empty-state h4 {
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

/* ==========================================================================
   Responsive Viewport Design (Media Queries)
   ========================================================================== */

@media (max-width: 768px) {
  .fixed-banner {
    padding: 0 1rem;
    height: 90px;
  }

  .banner-img-container {
    width: 65px;
    height: 65px;
  }

  .banner-title h1 {
    font-size: 1.3rem;
  }

  .banner-title span {
    font-size: 0.65rem;
  }

  .fixed-nav {
    top: 90px;
    height: 50px;
    justify-content: flex-start;
  }

  .nav-links {
    justify-content: flex-start;
  }

  .nav-item {
    font-size: 0.8rem;
    padding: 0.3rem 0.8rem;
  }

  .user-identity {
    display: none; /* Hide top identity on small mobile, show in menu if needed */
  }

  main {
    margin-top: 160px;
    padding: 1rem;
    min-height: calc(100vh - 160px);
  }

  .hero-widget {
    padding: 2rem 1.5rem;
  }

  .hero-widget h2 {
    font-size: 1.75rem;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .details-drawer {
    max-width: 100%;
  }

  .profile-summary {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .profile-meta-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 0.25rem;
  }
}

/* ==========================================================================
   Governing Body Committee Cards
   ========================================================================== */

.gov-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 2.5rem 2rem;
  padding: 1rem 0;
}

.gov-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  padding: 2.5rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
}

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

.gov-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-gold);
}

.gov-avatar-container {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  border: 3px solid #ffffff;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  margin-bottom: 1.5rem;
  background-color: #f1f5f9;
  transition: var(--transition);
}

.gov-card:hover .gov-avatar-container {
  transform: scale(1.05);
  border-color: var(--accent-gold);
}

.gov-avatar-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gov-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.gov-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-color);
}

.gov-badge {
  background-color: rgba(255, 179, 0, 0.1);
  color: var(--accent-gold-dark);
  border: 1px solid rgba(255, 179, 0, 0.25);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 12px;
  border-radius: 20px;
}
