/* HFNI Connect - Church Management System */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #3b82f6;
  --secondary: #64748b;
  --success: #16a34a;
  --success-light: #22c55e;
  --warning: #f59e0b;
  --danger: #dc2626;
  --danger-light: #ef4444;
  
  --bg: #f8fafc;
  --bg-card: #ffffff;
  --bg-sidebar: #1e293b;
  --bg-sidebar-hover: #334155;
  
  --text: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --text-light: #ffffff;
  
  --border: #e2e8f0;
  --border-focus: #2563eb;
  
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  
  --radius-sm: 0.375rem;
  --radius: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* Typography */
h1 { font-size: 1.875rem; font-weight: 600; line-height: 1.2; }
h2 { font-size: 1.5rem; font-weight: 600; line-height: 1.3; }
h3 { font-size: 1.25rem; font-weight: 500; line-height: 1.4; }
h4 { font-size: 1.125rem; font-weight: 500; }

.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.text-center { text-align: center; }

/* Layout */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
.container-sm { max-width: 28rem; margin: 0 auto; padding: 0 1rem; }
.container-md { max-width: 42rem; margin: 0 auto; padding: 0 1rem; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }

.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.w-full { width: 100%; }
.h-full { height: 100%; }
.min-h-screen { min-height: 100vh; }

/* Spacing */
.m-0 { margin: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }

.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.card-body { padding: 1.5rem; }
.card-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  line-height: 1.5;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

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

.btn-secondary {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover:not(:disabled) { background: var(--border); }

.btn-success {
  background: var(--success);
  color: white;
}
.btn-success:hover:not(:disabled) { background: var(--success-light); }

.btn-danger {
  background: var(--danger);
  color: white;
}
.btn-danger:hover:not(:disabled) { background: var(--danger-light); }

.btn-warning {
  background: var(--warning);
  color: white;
}
.btn-warning:hover:not(:disabled) { background: #d97706; }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover:not(:disabled) { background: var(--bg); color: var(--text); }

.btn-sm { padding: 0.375rem 0.75rem; font-size: 0.8125rem; }
.btn-lg { padding: 0.875rem 1.75rem; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-icon { padding: 0.5rem; }

/* Ensure form buttons are always clickable (fix for Vite overlay issues) */
form {
  position: relative;
  z-index: 10;
}

form button[type="submit"] {
  position: relative;
  z-index: 11;
}

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

.form-label {
  display: block;
  margin-bottom: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
}

.form-control {
  width: 100%;
  padding: 0.625rem 0.875rem;
  font-size: 0.9375rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: white;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-control::placeholder { color: var(--text-muted); }

textarea.form-control {
  min-height: 8rem;
  resize: vertical;
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.5rem center;
  background-repeat: no-repeat;
  background-size: 1.5em 1.5em;
  padding-right: 2.5rem;
}

.form-hint {
  margin-top: 0.25rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.form-error {
  margin-top: 0.25rem;
  font-size: 0.8125rem;
  color: var(--danger);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 9999px;
  white-space: nowrap;
}

.badge-primary { background: rgba(37, 99, 235, 0.1); color: var(--primary); }
.badge-success { background: rgba(22, 163, 74, 0.1); color: var(--success); }
.badge-warning { background: rgba(245, 158, 11, 0.1); color: var(--warning); }
.badge-danger { background: rgba(220, 38, 38, 0.1); color: var(--danger); }
.badge-secondary { background: var(--bg); color: var(--text-secondary); }

/* Tables */
.table-container {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: white;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

th, td {
  padding: 0.875rem 1rem;
  text-align: left;
}

th {
  background: var(--bg);
  font-weight: 500;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
}

td { border-bottom: 1px solid var(--border); }
tr:last-child td { border-bottom: none; }
tr:hover { background: var(--bg); }

/* Member Layout */
.member-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.member-header {
  background: white;
  border-bottom: 1px solid var(--border);
  padding: 1rem;
}

.member-header-inner {
  max-width: 28rem;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.member-logo {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
}

.member-content {
  flex: 1;
  padding: 2rem 1rem;
  display: flex;
  justify-content: center;
}

.member-card {
  width: 100%;
  max-width: 28rem;
}

/* Action Tiles */
.action-tiles {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.action-tile {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  transition: all 0.15s ease;
}

.action-tile:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.action-tile-icon {
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  flex-shrink: 0;
}

.action-tile-icon.primary { background: rgba(37, 99, 235, 0.1); color: var(--primary); }
.action-tile-icon.success { background: rgba(22, 163, 74, 0.1); color: var(--success); }

.action-tile-content { flex: 1; }
.action-tile-title { font-weight: 600; margin-bottom: 0.25rem; }
.action-tile-desc { font-size: 0.875rem; color: var(--text-secondary); }

.action-tile-arrow {
  color: var(--text-muted);
  transition: transform 0.15s ease;
}
.action-tile:hover .action-tile-arrow { transform: translateX(4px); }

.action-tile.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Admin Layout */
.admin-layout {
  display: flex;
  min-height: 100vh;
  background: url('/theme/hfni-bg.jpg') center center / cover no-repeat fixed;
  position: relative;
}

.admin-layout::before {
  content: '';
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.30) 0%, rgba(255, 255, 255, 0.40) 100%);
  z-index: 0;
  pointer-events: none;
}

.admin-layout > * {
  position: relative;
  z-index: 1;
}

.admin-sidebar {
  width: 16rem;
  background: var(--bg-sidebar);
  color: var(--text-light);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
}

.admin-sidebar-header {
  padding: 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.admin-sidebar-logo {
  font-size: 1.25rem;
  font-weight: 600;
  color: white;
  text-decoration: none;
}

.admin-sidebar-nav {
  flex: 1;
  padding: 1rem 0;
  overflow-y: auto;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 0.9375rem;
  transition: all 0.15s ease;
}

.admin-nav-item:hover {
  background: var(--bg-sidebar-hover);
  color: white;
}

.admin-nav-item.active {
  background: var(--primary);
  color: white;
}

.admin-nav-item svg {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}

.admin-nav-section {
  padding: 0.625rem 1.5rem 0.375rem;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255,255,255,0.4);
  margin-top: 0.75rem;
}

.admin-sidebar-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.admin-main {
  flex: 1;
  margin-left: 16rem;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.90);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.admin-header {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  padding: 1rem 2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 50;
}

.admin-content {
  flex: 1;
  padding: 2rem;
}

/* Stats Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .stats-grid { grid-template-columns: 1fr; }
}

.stat-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.stat-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.stat-card-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.stat-card-icon {
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
}

.stat-card-value {
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.2;
}

.stat-card-footer {
  margin-top: 0.75rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

/* Success/Error States */
.success-icon {
  width: 4rem;
  height: 4rem;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(22, 163, 74, 0.1);
  border-radius: 50%;
  color: var(--success);
}

.error-icon {
  width: 4rem;
  height: 4rem;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(220, 38, 38, 0.1);
  border-radius: 50%;
  color: var(--danger);
}

/* Alerts */
.alert {
  padding: 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
}

.alert-success {
  background: rgba(22, 163, 74, 0.1);
  border: 1px solid rgba(22, 163, 74, 0.2);
  color: var(--success);
}

.alert-error {
  background: rgba(220, 38, 38, 0.1);
  border: 1px solid rgba(220, 38, 38, 0.2);
  color: var(--danger);
}

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

.alert-info {
  background: rgba(37, 99, 235, 0.1);
  border: 1px solid rgba(37, 99, 235, 0.2);
  color: var(--primary);
}

/* QR Code */
.qr-code-container {
  background: white;
  padding: 2rem;
  border-radius: var(--radius-lg);
  text-align: center;
}

.qr-code-container img {
  max-width: 200px;
  margin: 0 auto 1rem;
}

/* Search */
.search-bar {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.search-bar .form-control { flex: 1; }

/* Empty State */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-secondary);
}

.empty-state-icon {
  width: 4rem;
  height: 4rem;
  margin: 0 auto 1rem;
  opacity: 0.5;
}

/* Responsive */
@media (max-width: 768px) {
  .admin-sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }
  
  .admin-sidebar.open { transform: translateX(0); }
  .admin-main { margin-left: 0; }
  .admin-content { padding: 1rem; }
  .grid-cols-4 { grid-template-columns: repeat(2, 1fr); }
  .hide-mobile { display: none; }
}

/* Utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.relative { position: relative; }
.hidden { display: none; }

/* HFNI Theme - Background with dark overlay */
.hfni-hero-bg {
  position: relative;
  background: url('/theme/hfni-bg.jpg') center center / cover no-repeat;
}

.hfni-hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.30) 0%, rgba(255, 255, 255, 0.40) 100%);
  z-index: 0;
}

.hfni-hero-bg > * {
  position: relative;
  z-index: 1;
}

/* Member themed page with background image */
.member-page.hfni-themed {
  background: url('/theme/hfni-bg.jpg') center center / cover no-repeat fixed;
  position: relative;
  min-height: 100vh;
}

.member-page.hfni-themed::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  min-height: 100vh;
  height: 100%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.30) 0%, rgba(255, 255, 255, 0.40) 100%);
  z-index: 0;
  pointer-events: none;
}

/* Member themed header - readable on background */
.member-page.hfni-themed .member-header {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
  z-index: 10;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.member-page.hfni-themed .member-header .member-logo {
  color: var(--text);
  font-weight: 700;
}

.member-page.hfni-themed .member-header .member-name {
  color: var(--text);
  font-weight: 500;
}

/* Member themed content area - glass morphism effect */
.member-page.hfni-themed .member-content {
  position: relative;
  z-index: 1;
  flex: 1;
}

/* Content container with glass effect - scoped to hfni-themed member pages */
.member-page.hfni-themed .member-content .member-dashboard {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius-xl);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
  margin: 1rem;
  padding: 1.5rem;
  max-width: 1000px;
}

.member-page.hfni-themed .member-content .member-section {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius-xl);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
  margin: 1rem;
  padding: 1.5rem;
}

.member-page.hfni-themed .member-content .member-card {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius-xl);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
  padding: 1rem;
}

.member-page.hfni-themed .member-content .member-card .card {
  background: transparent;
  border: none;
  box-shadow: none;
}

/* Login page with background */
.login-hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: url('/theme/hfni-bg.jpg') center center / cover no-repeat;
  position: relative;
}

.login-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0.45) 100%);
}

.login-hero > * {
  position: relative;
  z-index: 1;
}

.login-card {
  width: 100%;
  max-width: 24rem;
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.login-card-header {
  background: var(--primary);
  color: white;
  padding: 2rem;
  text-align: center;
}

.login-logo {
  max-height: 100px;
  width: auto;
  margin-bottom: 1rem;
  background: transparent;
}

@media (max-width: 480px) {
  .login-logo {
    max-height: 80px;
  }
}

.login-card-header h1 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.login-card-header p {
  font-size: 0.875rem;
  opacity: 0.9;
}

.login-card-body {
  padding: 2rem;
}

/* Enhanced Member Dashboard */
.member-dashboard {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.member-welcome {
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.member-welcome h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.member-welcome .subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
}

.member-name {
  font-weight: 500;
  color: var(--text);
}

/* Dashboard Sections */
.dashboard-section {
  margin-bottom: 2rem;
}

.dashboard-section:last-child {
  margin-bottom: 0;
}

.dashboard-section-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary);
}

.dashboard-section-header h2 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.dashboard-section-header svg {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--primary);
}

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

@media (max-width: 768px) {
  .dashboard-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  
  .member-dashboard {
    margin: 0.5rem;
    padding: 1rem;
  }
}

.dashboard-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.25rem 1rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
  position: relative;
  text-align: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.dashboard-tile:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.dashboard-tile:active {
  transform: translateY(-1px);
}

.dashboard-tile.primary { border-color: var(--primary); background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, rgba(37, 99, 235, 0.1) 100%); }
.dashboard-tile.success { border-color: var(--success); background: linear-gradient(135deg, rgba(22, 163, 74, 0.05) 0%, rgba(22, 163, 74, 0.1) 100%); }
.dashboard-tile.info { border-color: #0ea5e9; background: linear-gradient(135deg, rgba(14, 165, 233, 0.05) 0%, rgba(14, 165, 233, 0.1) 100%); }
.dashboard-tile.warning { border-color: var(--warning); background: linear-gradient(135deg, rgba(245, 158, 11, 0.05) 0%, rgba(245, 158, 11, 0.1) 100%); }
.dashboard-tile.secondary { border-color: var(--secondary); background: linear-gradient(135deg, rgba(100, 116, 139, 0.05) 0%, rgba(100, 116, 139, 0.1) 100%); }

.dashboard-tile.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.tile-icon {
  width: 4rem;
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  margin-bottom: 1rem;
  color: var(--primary);
}

.dashboard-tile.primary .tile-icon { color: var(--primary); }
.dashboard-tile.success .tile-icon { color: var(--success); }
.dashboard-tile.info .tile-icon { color: #0ea5e9; }
.dashboard-tile.warning .tile-icon { color: var(--warning); }
.dashboard-tile.secondary .tile-icon { color: var(--secondary); }

.tile-content h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.tile-content p {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.tile-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  padding: 0.25rem 0.5rem;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  background: var(--success);
  color: white;
}

.tile-badge.live {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* Member Section */
.member-section {
  margin-top: 2.5rem;
}

.member-section h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

/* Event List */
.event-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.event-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.event-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  background: var(--primary);
  color: white;
  border-radius: var(--radius);
  flex-shrink: 0;
}

.event-day {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
}

.event-month {
  font-size: 0.6875rem;
  font-weight: 500;
  text-transform: uppercase;
}

.event-info h4 {
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.event-info p {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

/* Member Header Updates */
.member-header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1rem;
}

.member-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--text);
  text-decoration: none;
}

.member-logo svg {
  color: var(--primary);
}

/* =====================================================
   MOBILE NAVIGATION SYSTEM
   ===================================================== */

/* Hamburger Menu Button */
.mobile-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  border-radius: var(--radius);
  color: var(--text);
  transition: background 0.15s ease;
}

.mobile-menu-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

.mobile-menu-btn svg {
  width: 24px;
  height: 24px;
}

/* Mobile Menu Backdrop */
.mobile-menu-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 998;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-menu-backdrop.active {
  display: block;
  opacity: 1;
}

/* Mobile Menu Drawer */
.mobile-menu-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 280px;
  max-width: 85vw;
  background: var(--bg-card);
  z-index: 999;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
}

.mobile-menu-drawer.open {
  transform: translateX(0);
}

/* Mobile Menu Header */
.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--primary);
  color: white;
}

.mobile-menu-title {
  font-weight: 600;
  font-size: 1.125rem;
}

.mobile-menu-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  cursor: pointer;
  border-radius: var(--radius-sm);
  color: white;
  transition: background 0.15s ease;
}

.mobile-menu-close:hover {
  background: rgba(255, 255, 255, 0.25);
}

.mobile-menu-close svg {
  width: 20px;
  height: 20px;
}

/* Mobile Menu Content */
.mobile-menu-content {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 0;
}

.mobile-menu-section {
  padding: 0.5rem 1.25rem;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.mobile-menu-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.25rem;
  color: var(--text);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: background 0.15s ease;
}

.mobile-menu-item:hover {
  background: var(--bg);
}

.mobile-menu-item.active {
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary);
}

.mobile-menu-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.mobile-menu-divider {
  height: 1px;
  background: var(--border);
  margin: 0.75rem 0;
}

/* Mobile Menu Footer */
.mobile-menu-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
}

.mobile-menu-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--danger);
  color: white;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s ease;
}

.mobile-menu-logout:hover {
  background: var(--danger-light);
}

.mobile-menu-logout svg {
  width: 18px;
  height: 18px;
}

/* Show hamburger on mobile, hide desktop logout */
@media (max-width: 768px) {
  .mobile-menu-btn {
    display: flex;
  }
  
  .desktop-only {
    display: none !important;
  }
  
  /* Adjust member header for mobile */
  .member-header-inner {
    padding: 0 0.75rem;
  }
  
  .member-logo {
    font-size: 1rem;
  }
  
  .member-name {
    display: none;
  }
}

/* Keep desktop layout on larger screens */
@media (min-width: 769px) {
  .mobile-menu-drawer,
  .mobile-menu-backdrop,
  .mobile-menu-btn {
    display: none !important;
  }
}

/* Admin mobile menu adjustments */
@media (max-width: 768px) {
  .admin-header {
    display: flex;
    align-items: center;
    gap: 1rem;
  }
  
  .admin-mobile-toggle {
    display: flex;
  }
}
