:root {
    --bg: #0f172a;
    --panel: #111827;
    --muted: #94a3b8;
    --text: #e5e7eb;
    --primary: #6366f1;
    --primary-700: #4f46e5;
    --danger: #ef4444;
    --success: #22c55e;
    --border: #1f2937;
    --sidebar-bg: linear-gradient(180deg, rgba(2,6,23,0.9), rgba(2,6,23,0.75));
    --topbar-bg: linear-gradient(180deg, rgba(2,6,23,0.85), rgba(2,6,23,0.7));
    --body-glow-1: rgba(99,102,241,0.18);
    --body-glow-2: rgba(139,92,246,0.16);
    --icon-btn-danger-bg: #1f0b0b;
    --icon-btn-danger-color: #fecaca;
    --icon-btn-danger-border: #7f1d1d;
    --icon-btn-edit-bg: #0b1029;
    --icon-btn-edit-color: #dbeafe;
    --icon-btn-edit-border: #1e3a8a;
    --shadow-color: rgba(0,0,0,0.3);
  }
  
  * { box-sizing: border-box; }
  html, body { height: 100%; }
  
  /* Performance optimizations */
  img { image-rendering: -webkit-optimize-contrast; will-change: auto; }
  .card, .table-wrap, .modal { will-change: transform; }
  .table tbody { contain: layout style paint; }
  body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial;
    background: var(--bg);
    color: var(--text);
  }
  
  /* Enhanced animated background glow */
  body::before {
    content: '';
    position: fixed;
    inset: -20% -10% auto -10%;
    height: 60vh;
    background: radial-gradient(800px 400px at 20% 20%, var(--body-glow-1), transparent 60%),
                radial-gradient(600px 300px at 80% 10%, var(--body-glow-2), transparent 60%),
                radial-gradient(500px 250px at 50% 50%, rgba(139,92,246,0.12), transparent 70%);
    filter: blur(60px);
    pointer-events: none;
    z-index: 0;
    animation: backgroundPulse 8s ease-in-out infinite;
  }
  @keyframes backgroundPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
  }
  
  
  .hidden { display: none !important; }
  .spacer { flex: 1; }
  .muted { color: var(--muted); margin: 0 0 8px; font-size: 14px; }
  
  .app { display: flex; min-height: 100vh; position: relative; z-index: 1; }
  .app img { width: 50px; height: 50px; margin-left: 10px; border-radius: 50%; margin-top: 10px; }
  .sidebar {
    width: 240px;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(12px) saturate(180%);
    box-shadow: 4px 0 30px rgba(0,0,0,0.4), inset -1px 0 0 rgba(255,255,255,0.05);
    position: relative;
  }
  .sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(99,102,241,0.5), transparent);
  }
  .brand { 
    padding: 16px; 
    font-weight: 800; 
    letter-spacing: 0.5px; 
    font-size: 20px; 
    background: linear-gradient(135deg, var(--primary), #8b5cf6, #ec4899);
    background-size: 200% 200%;
    -webkit-background-clip: text; 
    -webkit-text-fill-color: transparent; 
    background-clip: text;
    animation: gradientShift 4s ease infinite;
    filter: drop-shadow(0 2px 8px rgba(99,102,241,0.4));
  }
  .sidebar nav { display: flex; flex-direction: column; gap: 4px; padding: 8px; }
  .nav-link {
    text-align: left;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--text);
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
  }
  .nav-link { 
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
  }
  .nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: linear-gradient(180deg, var(--primary), #8b5cf6);
    transform: scaleY(0);
    transition: transform 0.3s ease;
  }
  .nav-link.active {
    background: linear-gradient(90deg, rgba(99,102,241,0.2), rgba(139,92,246,0.15));
    border-color: rgba(99,102,241,0.4);
    box-shadow: inset 0 0 20px rgba(99,102,241,0.1);
  }
  .nav-link.active::before {
    transform: scaleY(1);
  }
  .nav-link:hover { 
    background: linear-gradient(90deg, rgba(99,102,241,0.15), rgba(139,92,246,0.1));
    border-color: rgba(99,102,241,0.4);
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(99,102,241,0.2);
  }
  .sidebar-footer { margin-top: auto; padding: 12px; }
  
  .main { display: flex; flex-direction: column; flex: 1; }
  .topbar {
    position: sticky; top: 0;
    display: flex; align-items: center; gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    background: var(--topbar-bg);
    backdrop-filter: blur(12px) saturate(180%);
    z-index: 5;
    box-shadow: 0 2px 20px rgba(0,0,0,0.2);
  }
  .topbar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(99,102,241,0.3), transparent);
  }
  .icon-btn {
    border: 1px solid var(--border);
    background: var(--panel);
    color: var(--text);
    border-radius: 10px;
    padding: 10px 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
  }
  .icon-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(99,102,241,0.2);
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
  }
  .icon-btn:hover::before {
    width: 200px;
    height: 200px;
  }
  .icon-btn:hover { 
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(99,102,241,0.3);
    border-color: rgba(99,102,241,0.5);
  }
  .icon-btn.danger { color: var(--icon-btn-danger-color); border-color: var(--icon-btn-danger-border); background: var(--icon-btn-danger-bg); }
  .icon-btn.edit { color: var(--icon-btn-edit-color); border-color: var(--icon-btn-edit-border); background: var(--icon-btn-edit-bg); }
  
  .owner { 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    padding: 8px 16px; 
    border-radius: 12px; 
    background: linear-gradient(135deg, rgba(99,102,241,0.15), rgba(139,92,246,0.1));
    border: 1px solid rgba(99,102,241,0.3);
    box-shadow: 0 2px 8px rgba(99,102,241,0.2);
    font-weight: 600;
    transition: all 0.3s ease;
  }
  .owner:hover {
    background: linear-gradient(135deg, rgba(99,102,241,0.2), rgba(139,92,246,0.15));
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99,102,241,0.3);
  }
  
  .content { padding: 24px; animation: fadeIn 0.4s ease; }
  .view-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .view-header h1 { 
    font-size: 36px; 
    font-weight: 800; 
    background: linear-gradient(135deg, var(--primary), #8b5cf6, var(--primary));
    background-size: 200% 200%;
    -webkit-background-clip: text; 
    -webkit-text-fill-color: transparent; 
    background-clip: text; 
    letter-spacing: -0.5px;
    animation: gradientShift 3s ease infinite;
    filter: drop-shadow(0 2px 8px rgba(99,102,241,0.3));
  }
  @keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
  }
  .actions { display: flex; align-items: center; gap: 8px; }
  
  .cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
  .card {
    background: var(--panel); 
    border: 1px solid var(--border); 
    padding: 28px; 
    border-radius: 24px; 
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,255,255,0.05) inset;
    backdrop-filter: blur(12px) saturate(180%);
  }
  .card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary), #8b5cf6, transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
    box-shadow: 0 0 20px rgba(99,102,241,0.5);
  }
  .card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(99,102,241,0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
  }
  .card:hover::before { opacity: 1; }
  .card:hover::after { opacity: 1; }
  .card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4), 0 0 0 1px rgba(99,102,241,0.3) inset, 0 0 60px rgba(99,102,241,0.2);
    border-color: rgba(99,102,241,0.5);
  }
  .gradient-card {
    background: linear-gradient(135deg, var(--panel) 0%, rgba(99, 102, 241, 0.08) 50%, rgba(139, 92, 246, 0.05) 100%);
    border: 1px solid rgba(99, 102, 241, 0.3);
    box-shadow: 0 8px 32px rgba(0,0,0,0.3), 0 0 0 1px rgba(99,102,241,0.1) inset, 0 0 40px rgba(99,102,241,0.1);
  }
  .gradient-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), #8b5cf6, var(--primary));
    box-shadow: 0 0 20px rgba(99,102,241,0.6);
  }
  .gradient-card:hover {
    background: linear-gradient(135deg, var(--panel) 0%, rgba(99, 102, 241, 0.12) 50%, rgba(139, 92, 246, 0.08) 100%);
  }
  .card-icon {
    font-size: 36px;
    margin-bottom: 16px;
    opacity: 0.9;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 4px 8px rgba(99,102,241,0.3));
  }
  .card:hover .card-icon { 
    transform: scale(1.15) rotate(8deg);
    filter: drop-shadow(0 6px 12px rgba(99,102,241,0.5));
    opacity: 1;
  }
  .card-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  .card-label { 
    color: var(--muted); 
    font-size: 14px; 
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  .card-value { 
    font-size: 36px; 
    font-weight: 900; 
    color: var(--text);
    line-height: 1;
    background: linear-gradient(135deg, var(--text), rgba(255,255,255,0.8));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 10px rgba(99,102,241,0.2);
  }
  .card-trend {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 12px;
    width: fit-content;
    margin-top: 8px;
  }
  .card-trend.positive {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
  }
  .card-trend.negative {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
  }
  .card-trend.neutral {
    background: rgba(148, 163, 184, 0.2);
    color: #94a3b8;
  }
  
  input, select, button { font: inherit; }
  input, select {
    color: var(--text);
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) inset;
  }
  input:hover, select:hover {
    border-color: rgba(99,102,241,0.5);
    box-shadow: 0 2px 12px rgba(99,102,241,0.15) inset, 0 0 0 1px rgba(99,102,241,0.2);
    transform: translateY(-1px);
  }
  input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: rgba(99,102,241,0.7);
    box-shadow: 0 0 0 4px rgba(99,102,241,0.25), 0 4px 16px rgba(99,102,241,0.2);
    transform: translateY(-1px);
    background: rgba(99,102,241,0.03);
  }
  input[type="date"] { padding: 8px 10px; }
  
  .btn {
    padding: 12px 20px; 
    border-radius: 12px; 
    cursor: pointer;
    border: 1px solid var(--border); 
    background: var(--panel); 
    color: var(--text);
    box-shadow: 0 4px 16px rgba(0,0,0,0.2), 0 0 0 1px rgba(255,255,255,0.05) inset;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    font-weight: 600;
    letter-spacing: 0.3px;
  }
  .btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
  }
  [data-theme="light"] .btn::after {
    background: rgba(0,0,0,0.05);
  }
  .btn:hover::after {
    width: 300px;
    height: 300px;
  }
  .btn.primary { 
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    border-color: var(--primary-700); 
    color: white;
    box-shadow: 0 4px 20px rgba(99,102,241,0.4), 0 0 0 1px rgba(255,255,255,0.1) inset;
  }
  .btn.primary:hover {
    background: linear-gradient(135deg, var(--primary-700), #7c3aed);
    box-shadow: 0 8px 30px rgba(99,102,241,0.5), 0 0 0 1px rgba(255,255,255,0.15) inset;
    transform: translateY(-2px) scale(1.02);
  }
  .btn.secondary { background: var(--panel); }
  .btn.danger { background: var(--danger); border-color: var(--danger); color: white; }
  .btn.full { width: 100%; }
  .btn.small { padding: 6px 10px; font-size: 12px; }
  
  /* Input with inline action button */
  .input-with-action { display: flex; gap: 6px; align-items: stretch; }
  .input-with-action input { flex: 1; }
  .input-with-action .icon-btn.small { padding: 0 10px; display: grid; place-items: center; }
  
  .table-wrap { 
    background: var(--panel); 
    border: 1px solid var(--border); 
    border-radius: 20px; 
    overflow: auto; 
    margin-top: 12px; 
    box-shadow: 0 10px 40px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,255,255,0.05) inset;
    backdrop-filter: blur(12px) saturate(180%);
  }
  .table { width: 100%; border-collapse: collapse; min-width: 720px; }
  .table th, .table td { border-bottom: 1px solid var(--border); padding: 10px 12px; text-align: left; transition: background 0.2s ease; }
  .table thead th { position: sticky; top: 0; background: var(--topbar-bg); backdrop-filter: blur(8px); font-weight: 600; text-transform: uppercase; font-size: 12px; letter-spacing: 0.5px; color: var(--muted); }
  .table tbody tr:nth-child(odd) { background: rgba(148,163,184,0.04); }
  .table tbody tr:hover { 
    background: linear-gradient(90deg, rgba(99,102,241,0.1), rgba(139,92,246,0.08));
    transform: scale(1.002);
    box-shadow: 0 2px 8px rgba(99,102,241,0.15);
  }
  .table tbody tr { 
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 3px solid transparent;
  }
  .table tbody tr:hover {
    border-left-color: var(--primary);
  }
  .col-actions { display: flex; gap: 6px; }
  
  /* Make table scroller friendlier on touch devices */
  .table-wrap { -webkit-overflow-scrolling: touch; }
  
  .overlay {
    position: fixed; inset: 0; display: grid; place-items: center;
    background: rgba(0,0,0,0.4);
    z-index: 1000; /* Ensure overlays sit above main app */
  }
  .overlay#loginOverlay { 
    background: radial-gradient(1200px 400px at 10% -10%, rgba(99,102,241,0.25), transparent 40%),
                radial-gradient(600px 300px at 90% -10%, rgba(139,92,246,0.25), transparent 40%),
                rgba(0,0,0,0.5);
  }
  .modal {
    width: min(720px, 92vw);
    background: var(--panel);
    border: 1px solid var(--border);
    padding: 32px;
    border-radius: 24px;
    box-shadow: 0 25px 80px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.05) inset;
    animation: modalSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(16px) saturate(180%);
    position: relative;
    overflow: hidden;
  }
  .modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(99,102,241,0.5), transparent);
  }
  @keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(-20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
  }
  .login-modal { 
    width: min(440px, 94vw); 
    padding: 20px; 
    border-radius: 16px; 
    background: linear-gradient(180deg, rgba(99,102,241,0.15), rgba(139,92,246,0.08)), var(--panel);
    border: 1px solid rgba(99, 102, 241, 0.35);
    box-shadow: 0 20px 60px var(--shadow-color);
  }
  .login-header { text-align: center; margin-bottom: 12px; }
  .login-logo { width: 72px; height: 72px; border-radius: 50%; display: block; margin: 0 auto 8px; }
  .login-header h2 { margin: 6px 0 4px; }
  .login-form { display: flex; flex-direction: column; gap: 12px; }
  .login-actions { margin-top: 8px; }
  .login-actions .btn { width: 100%; }
  
  @media (max-width: 480px) {
    .login-modal { width: 94vw; padding: 16px; }
    .login-logo { width: 60px; height: 60px; }
  }
  .modal h2 { margin: 0 0 12px; }
  .grid-2 { display: grid; grid-template-columns: 1fr; gap: 10px; }
  .modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 10px; }
  
  .settings-section { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 16px; margin-bottom: 16px; box-shadow: 0 4px 16px rgba(0,0,0,0.15); transition: all 0.2s ease; }
  .settings-section:hover { box-shadow: 0 6px 20px rgba(0,0,0,0.2); border-color: rgba(99,102,241,0.3); }
  .settings-section h3 { margin: 0 0 10px; }
  
  @media (max-width: 900px) {
    .cards { grid-template-columns: 1fr; }
    .sidebar { position: fixed; inset: 0 auto 0 0; transform: translateX(-100%); transition: transform 160ms ease; z-index: 20; }
    .sidebar.open { transform: translateX(0); }
    .topbar { z-index: 10; }
    .main { width: 100%; }
  }
  
  
  /* ----- Enhancements: theme, avatars, badges, toasts, subtle effects ----- */
  :root {
    --card-gradient: radial-gradient(1200px 400px at 10% -10%, rgba(99,102,241,0.15), transparent 40%), radial-gradient(600px 300px at 90% -10%, rgba(139,92,246,0.16), transparent 40%);
  }
  
  [data-theme="light"] {
    --bg: #f7f7fb;
    --panel: #ffffff;
    --muted: #6b7280;
    --text: #0f172a;
    --primary: #6366f1;
    --primary-700: #4f46e5;
    --danger: #dc2626;
    --success: #16a34a;
    --border: #e5e7eb;
    --card-gradient: radial-gradient(1200px 400px at 10% -10%, rgba(99,102,241,0.08), transparent 40%), radial-gradient(600px 300px at 90% -10%, rgba(139,92,246,0.08), transparent 40%);
    --sidebar-bg: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(249,250,251,0.9));
    --topbar-bg: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(249,250,251,0.95));
    --body-glow-1: rgba(99,102,241,0.08);
    --body-glow-2: rgba(139,92,246,0.06);
    --icon-btn-danger-bg: #fef2f2;
    --icon-btn-danger-color: #dc2626;
    --icon-btn-danger-border: #fca5a5;
    --icon-btn-edit-bg: #eff6ff;
    --icon-btn-edit-color: #1e40af;
    --icon-btn-edit-border: #93c5fd;
    --shadow-color: rgba(0,0,0,0.1);
  }
  
  body { background-image: var(--card-gradient); }
  
  .nav-link { transition: transform 120ms ease, background 120ms ease, border-color 120ms ease; display: flex; align-items: center; }
  .nav-link:hover { transform: translateX(4px); }
  .nav-link svg { flex-shrink: 0; }
  .icon-btn { transition: transform 120ms ease, background 120ms ease; }
  .icon-btn:hover { transform: translateY(-1px); }
  .card { box-shadow: 0 6px 20px var(--shadow-color); }
  .table-wrap { box-shadow: 0 6px 20px var(--shadow-color); }
  .btn { transition: transform 120ms ease, background 120ms ease; }
  .btn:hover { transform: translateY(-1px); }
  
  /* Avatars and badges */
  .name-cell { display: flex; align-items: center; gap: 10px; }
  .avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 12px; color: white; }
  .badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; border: 1px solid transparent; font-weight: 600; transition: all 0.2s ease; }
  .badge.success { background: rgba(34,197,94,0.2); color: #22c55e; border-color: rgba(34,197,94,0.35); box-shadow: 0 2px 8px rgba(34,197,94,0.2); }
  .badge.muted { background: rgba(148,163,184,0.2); color: #94a3b8; border-color: rgba(148,163,184,0.35); }
  .badge:hover { transform: scale(1.05); }
  
  /* Toasts */
  .toast-container { position: fixed; bottom: 16px; right: 16px; display: grid; gap: 8px; z-index: 50; }
  .toast { background: var(--panel); border: 1px solid var(--border); padding: 10px 12px; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,0.25); animation: toast-in 200ms ease both; }
  @keyframes toast-in { from { transform: translateY(8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
  
  /* Enhanced Member Form Styles */
  .large-modal { width: min(900px, 95vw); max-height: 90vh; overflow-y: auto; }
  .member-form { display: flex; flex-direction: column; gap: 20px; }
  .form-section { 
    background: var(--panel); 
    border: 1px solid var(--border); 
    border-radius: 16px; 
    padding: 24px; 
    box-shadow: 0 6px 24px rgba(0,0,0,0.2), 0 0 0 1px rgba(255,255,255,0.05) inset;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(12px) saturate(180%);
    position: relative;
    overflow: hidden;
  }
  .form-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(99,102,241,0.4), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
  }
  .form-section:hover::before {
    opacity: 1;
  }
  .form-section:hover { 
    box-shadow: 0 12px 32px rgba(0,0,0,0.3), 0 0 0 1px rgba(99,102,241,0.2) inset;
    border-color: rgba(99,102,241,0.4);
    transform: translateY(-2px);
  }
  .form-section h3 { margin: 0 0 12px; color: var(--text); font-size: 16px; font-weight: 600; }
  .grid-3 { display: grid; grid-template-columns: 1fr; gap: 10px; }
  .form-section label { display: block; margin-bottom: 12px; }
  .form-section label:last-child { margin-bottom: 0; }
  textarea { font: inherit; color: var(--text); background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; resize: vertical; min-height: 60px; }
  
  /* Photo Upload */
  .photo-upload { display: flex; flex-direction: column; align-items: center; gap: 12px; }
  .photo-preview { width: 120px; height: 120px; border: 2px dashed var(--border); border-radius: 8px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: border-color 200ms ease; }
  .photo-preview:hover { border-color: var(--primary); }
  .photo-preview img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }
  .photo-placeholder { text-align: center; color: var(--muted); }
  .photo-placeholder span { font-size: 32px; display: block; margin-bottom: 8px; }
  .photo-placeholder p { margin: 0; font-size: 12px; }
  
  /* Camera actions layout */
  .photo-upload .actions { display: flex; gap: 8px; flex-wrap: wrap; }
  
  /* Member Table Enhancements */
  .table { min-width: 900px; }
  .col-photo { width: 60px; text-align: center; }
  .member-photo { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); image-rendering: -webkit-optimize-contrast; }
  .member-photo-placeholder { width: 40px; height: 40px; border-radius: 50%; background: var(--muted); display: flex; align-items: center; justify-content: center; color: white; font-weight: 600; font-size: 14px; margin: 0 auto; }
  
  /* WhatsApp Button */
  .icon-btn.whatsapp { color: #25d366; border-color: #25d366; background: rgba(37, 211, 102, 0.1); }
  .icon-btn.whatsapp:hover { background: rgba(37, 211, 102, 0.2); transform: translateY(-1px); }
  .icon-btn.whatsapp svg { display: inline-block; vertical-align: middle; }
  .icon-btn svg { display: inline-block; vertical-align: middle; }
  
  /* Print Button */
  .icon-btn.print { color: #6366f1; border-color: #6366f1; background: rgba(99, 102, 241, 0.1); }
  .icon-btn.print:hover { background: rgba(99, 102, 241, 0.2); transform: translateY(-1px); }
  
  /* Fees Plans Management */
  .fees-plans-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
  
  /* Validation Styles */
  input.error { border-color: #ef4444 !important; box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2); }
  input.error:focus { border-color: #ef4444 !important; box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.3); }
  
  /* Today Present Animation */
  .card-value.updating { 
    animation: pulse-green 0.5s ease-in-out; 
    font-weight: 800;
  }
  
  @keyframes pulse-green {
    0% { transform: scale(1); color: var(--text); }
    50% { transform: scale(1.1); color: #22c55e; }
    100% { transform: scale(1); color: var(--text); }
  }
  
  /* Attendance Checkbox Styling */
  .attendance-checkbox { 
    transform: scale(1.2); 
    cursor: pointer;
    accent-color: var(--primary);
  }
  
  .attendance-checkbox:checked { 
    accent-color: #22c55e;
  }
  
  /* Form Field Validation */
  .member-form input:invalid:not(:placeholder-shown) {
    border-color: #ef4444;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
  }
  
  .member-form input:valid:not(:placeholder-shown) {
    border-color: #22c55e;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2);
  }
  
  /* Alerts System */
  .nav-badge {
    background: #ef4444;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
    min-width: 18px;
    text-align: center;
    display: inline-block;
    animation: pulse 2s infinite;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
  }
  @keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
  }
  
  /* Password strength */
  .strength { margin-top: 6px; }
  .strength-bar { height: 6px; background: var(--border); border-radius: 999px; overflow: hidden; }
  .strength-bar span { display: block; height: 100%; width: 0%; background: #ef4444; transition: width 160ms ease, background 160ms ease; }
  
  /* Recovery section */
  .recovery { margin-top: 12px; }
  .recovery h3 { margin: 8px 0; font-size: 14px; color: var(--muted); }
  
  .alerts-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }
  
  .alert-section {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 4px 16px var(--shadow-color);
    transition: all 0.2s ease;
  }
  .alert-section:hover { box-shadow: 0 6px 20px rgba(0,0,0,0.2); }
  
  .alert-section h2 {
    margin: 0 0 12px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
  }
  
  .alerts-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  
  .alert-item {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 200ms ease;
  }
  
  .alert-item:hover {
    background: var(--panel);
    border-color: var(--primary);
  }
  
  .alert-item.read {
    opacity: 0.6;
    background: var(--panel);
  }
  
  .alert-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
  }
  
  .alert-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
  }
  
  .alert-icon.pending {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
  }
  
  .alert-icon.expiring {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
  }
  
  .alert-icon.overdue {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
  }
  
  .alert-details {
    flex: 1;
  }
  
  .alert-title {
    font-weight: 600;
    color: var(--text);
    margin: 0 0 4px;
  }
  
  .alert-description {
    color: var(--muted);
    font-size: 14px;
    margin: 0;
  }
  
  .alert-actions {
    display: flex;
    gap: 8px;
    align-items: center;
  }
  
  .alert-date {
    color: var(--muted);
    font-size: 12px;
    margin-left: 8px;
  }
  
  .alert-priority {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
  }
  
  .alert-priority.high {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
  }
  
  .alert-priority.medium {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
  }
  
  .alert-priority.low {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
  }
  
  .empty-alerts {
    text-align: center;
    color: var(--muted);
    padding: 20px;
    font-style: italic;
  }
  
  /* Form Validation Styles */
  .form-validation-status {
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid #fbbf24;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 16px;
    animation: slideDown 0.3s ease;
  }
  
  .validation-message {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fbbf24;
    font-weight: 500;
  }
  
  .validation-icon {
    font-size: 16px;
  }
  
  .validation-text {
    font-size: 14px;
  }
  
  .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #6b7280 !important;
    border-color: #6b7280 !important;
  }
  
  .btn:disabled:hover {
    transform: none;
    background: #6b7280 !important;
  }
  
  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  /* Responsive adjustments */
  @media (max-width: 1200px) {
    .table { min-width: 1000px; }
    .grid-3 { grid-template-columns: 1fr; }
  }
  
  @media (max-width: 768px) {
    .grid-2 { grid-template-columns: 1fr; }
    .grid-3 { grid-template-columns: 1fr; }
    .large-modal { width: 95vw; }
    .member-form { gap: 16px; }
    .form-section { padding: 12px; }
    .view-header { flex-direction: column; align-items: stretch; gap: 8px; }
    .actions { flex-wrap: wrap; }
    .actions > * { flex: 1 1 140px; }
    .content { padding: 12px; }
    .table-wrap { margin-top: 10px; }
    .table th, .table td { padding: 8px 10px; font-size: 14px; }
    #cameraPreview { width: 100% !important; height: auto !important; }
  }
  
  @media (max-width: 600px) {
    .topbar { padding: 8px 10px; }
    .brand { padding: 12px; }
    .btn { padding: 8px 10px; }
    input, select { padding: 8px 10px; }
    .table { min-width: 720px; }
    .table th, .table td { padding: 6px 8px; font-size: 13px; }
  }
  
  @media (max-width: 480px) {
    .content { padding: 8px; }
    .topbar { gap: 6px; }
    .owner { display: none; }
    .btn { padding: 8px 10px; font-size: 14px; }
    .actions { gap: 6px; }
    .actions > * { flex: 1 1 110px; }
    .modal { width: 96vw; padding: 12px; }
    .large-modal { width: 96vw; }
    .table { min-width: 600px; }
  }
  
  /* Print Styles */
  @media print {
    body * { visibility: hidden; }
    .print-content, .print-content * { visibility: visible; }
    .print-content { position: absolute; left: 0; top: 0; width: 100%; }
    .no-print { display: none !important; }
  }
  
  .print-content {
    background: white;
    color: black;
    padding: 20px;
    font-family: Arial, sans-serif;
    max-width: 100%;
    overflow-x: auto;
  }
  
  @media (max-width: 768px) {
    .print-content {
      padding: 12px;
      font-size: 12px;
    }
    .print-grid {
      grid-template-columns: 1fr !important;
    }
    .print-field {
      flex-direction: column;
      align-items: flex-start;
      gap: 4px;
    }
    .print-field strong {
      min-width: auto;
    }
    .print-logo {
      width: 60px !important;
      height: 60px !important;
    }
    .print-title {
      font-size: 18px !important;
    }
    .print-subtitle {
      font-size: 14px !important;
    }
    .print-section table {
      font-size: 11px;
    }
    .print-section table th,
    .print-section table td {
      padding: 6px 4px !important;
    }
  }
  
  .print-header {
    text-align: center;
    border-bottom: 2px solid #333;
    padding-bottom: 20px;
    margin-bottom: 20px;
  }
  
  .print-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 10px;
    display: block;
  }
  
  .print-title {
    font-size: 24px;
    font-weight: bold;
    margin: 0;
  }
  
  .print-subtitle {
    font-size: 16px;
    color: #666;
    margin: 5px 0 0;
  }
  
  .print-section {
    margin-bottom: 20px;
    page-break-inside: avoid;
  }
  
  .print-section h3 {
    background: #f5f5f5;
    padding: 10px;
    margin: 0 0 10px;
    border-left: 4px solid #6366f1;
  }
  
  .print-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 10px;
  }
  
  .print-field {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px dotted #ccc;
  }
  
  .print-field strong {
    min-width: 120px;
  }
  
  .print-receipt {
    border: 2px solid #333;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
  }
  
  .print-receipt h2 {
    margin: 0 0 20px;
    color: #333;
  }
  
  .print-receipt .amount {
    font-size: 24px;
    font-weight: bold;
    color: #22c55e;
    margin: 10px 0;
  }
  
  /* Role-based UI */
  .role-staff .nav-link[data-view="settings"],
  .role-staff .nav-link[data-view="reports"],
  .role-staff .icon-btn.delete {
    display: none !important;
  }
  
  .role-staff .btn.danger {
    display: none !important;
  }
  
  .role-staff .btn.danger.collect-btn,
  .role-staff .btn.danger#sendCollectBtn {
    display: inline-block !important;
  }
  
  .role-staff .admin-only {
    display: none !important;
  }
  
  /* Disabled form elements for staff */
  .role-staff select:disabled,
  .role-staff input:disabled,
  .role-staff button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #6b7280 !important;
    border-color: #6b7280 !important;
  }
  
  /* WhatsApp Messaging Styles */
  .whatsapp-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }
  
  .whatsapp-section {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
  }
  
  .whatsapp-section h2 {
    margin: 0 0 16px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
  }
  
  .quick-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
  }
  
  .quick-actions .btn {
    min-width: 160px;
  }
  
  .templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
  }
  
  .template-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    transition: all 200ms ease;
    cursor: pointer;
  }
  
  .template-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
  }
  
  .template-card h3 {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
  }
  
  .template-card p {
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 14px;
  }
  
  .template-card .btn {
    width: 100%;
  }
  
  /* Message Form Styles */
  .message-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }
  
  .recipients-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
  
  .recipient-type {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
  }
  
  .recipient-type label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-weight: 500;
  }
  
  .recipient-type input[type="radio"] {
    margin: 0;
  }
  
  .recipient-type select {
    width: 100%;
    margin-top: 8px;
  }
  
  .bulk-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
  }
  
  .bulk-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
    margin: 0;
  }
  
  .bulk-options input[type="checkbox"] {
    margin: 0;
  }
  
  .message-preview {
    margin-top: 16px;
  }
  
  .message-preview h4 {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
  }
  
  .preview-box {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    min-height: 60px;
    white-space: pre-wrap;
    font-family: inherit;
    color: var(--text);
  }
  
  /* Message Input Section */
  .message-input-section {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
    padding: 12px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
  }
  
  .message-input-section label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    cursor: pointer;
  }
  
  .message-input-section input[type="radio"] {
    margin: 0;
  }
  
  .custom-message-section {
    margin-top: 12px;
    padding: 12px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
  }
  
  .custom-message-section textarea {
    width: 100%;
    margin-bottom: 8px;
  }
  
  .message-variables {
    color: var(--muted);
    font-size: 12px;
    font-style: italic;
  }
  
  /* Message History Actions */
  .message-history-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 12px;
    gap: 8px;
  }
  
  /* Message History Styles */
  .message-history-item {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .message-history-item:hover {
    border-color: var(--primary);
  }
  
  .message-info {
    flex: 1;
  }
  
  .message-info .member-name {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
  }
  
  .message-info .message-details {
    color: var(--muted);
    font-size: 14px;
  }
  
  .message-status {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
  }
  
  .message-status.sent {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
  }
  
  .message-status.pending {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
  }
  
  .message-status.failed {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
  }
  
  /* WhatsApp Button Enhancement */
  .icon-btn.whatsapp {
    color: #25d366;
    border-color: #25d366;
    background: rgba(37, 211, 102, 0.1);
  }
  
  .icon-btn.whatsapp:hover {
    background: rgba(37, 211, 102, 0.2);
    transform: translateY(-1px);
  }
  
  .icon-btn.whatsapp:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #6b7280 !important;
    border-color: #6b7280 !important;
    color: #9ca3af !important;
  }
  
  /* Collect Button Styles */
  .collect-btn {
    background: #ef4444 !important;
    border-color: #ef4444 !important;
    color: white !important;
    font-size: 12px;
    padding: 6px 12px;
    min-width: auto;
    font-weight: 500;
    border-radius: 6px;
    border: 1px solid #ef4444;
  }
  
  .collect-btn:hover {
    background: #dc2626 !important;
    border-color: #dc2626 !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
  }
  
  .collect-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.3);
  }
  
  
  /* Enhanced Button Styles */
  .btn {
    padding: 12px 24px;
    border-radius: 12px;
    cursor: pointer;
    border: 1px solid var(--border);
    background: var(--panel);
    color: var(--text);
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.3px;
  }
  
  .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s ease;
  }
  [data-theme="light"] .btn::before {
    background: linear-gradient(90deg, transparent, rgba(0,0,0,0.05), transparent);
  }
  
  .btn:hover::before {
    left: 100%;
  }
  
  .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--shadow-color);
  }
  
  .btn.primary {
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    border-color: var(--primary);
    color: white;
  }
  
  .btn.primary:hover {
    background: linear-gradient(135deg, var(--primary-700), #7c3aed);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
  }
  
  /* Enhanced Animations */
  @keyframes slideInUp {
    from {
      opacity: 0;
      transform: translateY(30px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  @keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }
  
  @keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
  }
  
  .attendance-section {
    animation: slideInUp 0.6s ease;
  }
  
  .stat-card {
    animation: fadeIn 0.8s ease;
  }
  
  /* Loading States */
  .loading {
    position: relative;
    overflow: hidden;
  }
  
  .loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.2), transparent);
    animation: loading 1.5s infinite;
  }
  
  @keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
  }
  
  /* Welcome Message Modal Styles */
  .welcome-modal {
    width: min(500px, 90vw);
    background: linear-gradient(135deg, var(--panel) 0%, rgba(99, 102, 241, 0.1) 100%);
    border: 1px solid rgba(99, 102, 241, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: welcomeSlideIn 0.6s ease-out;
  }
  
  @keyframes welcomeSlideIn {
    from {
      opacity: 0;
      transform: translateY(-50px) scale(0.9);
    }
    to {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }
  
  .welcome-content {
    text-align: center;
    padding: 20px;
  }
  
  .welcome-icon {
    font-size: 64px;
    margin-bottom: 16px;
    animation: bounce 1s ease-in-out;
  }
  
  @keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
      transform: translateY(0);
    }
    40% {
      transform: translateY(-10px);
    }
    60% {
      transform: translateY(-5px);
    }
  }
  
  .welcome-content h2 {
    margin: 0 0 12px;
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }
  
  .welcome-content p {
    margin: 0 0 20px;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.5;
  }
  
  .welcome-role {
    display: inline-block;
    padding: 8px 20px;
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    color: white;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    animation: pulse 2s infinite;
  }
  
  @keyframes pulse {
    0%, 100% {
      transform: scale(1);
    }
    50% {
      transform: scale(1.05);
    }
  }
  
  .welcome-content .btn {
    padding: 12px 32px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 25px;
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    border: none;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
  }
  
  .welcome-content .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
  }
  
  .welcome-content .btn:hover::before {
    left: 100%;
  }
  
  .welcome-content .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
  }
  
  /* Role-specific welcome message colors */
  .welcome-modal.admin .welcome-role {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
  }
  
  .welcome-modal.staff .welcome-role {
    background: linear-gradient(135deg, #22c55e, #16a34a);
  }
  
  .welcome-modal.staff .welcome-content h2 {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }
  
  /* Dashboard Enhancements */
  .dashboard-header {
    margin-bottom: 24px;
  }
  
  .dashboard-subtitle {
    color: var(--muted);
    font-size: 16px;
    margin: 8px 0 0;
    font-weight: 400;
  }
  
  .dashboard-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 24px;
  }
  
  .widget-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 8px 24px var(--shadow-color);
    transition: all 0.3s ease;
  }
  
  .widget-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px var(--shadow-color);
    border-color: var(--primary);
  }
  
  .widget-card h3 {
    margin: 0 0 16px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
  }
  
  .quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  
  .quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
  }
  
  .quick-action-btn:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
  }
  
  .quick-action-icon {
    font-size: 24px;
    margin-bottom: 4px;
  }
  
  .activity-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  
  .activity-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background: rgba(99, 102, 241, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(99, 102, 241, 0.1);
    transition: all 0.2s ease;
  }
  
  .activity-item:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.2);
  }
  
  .activity-icon {
    font-size: 20px;
    flex-shrink: 0;
  }
  
  .activity-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  
  .activity-text {
    margin: 0;
    color: var(--text);
    font-size: 14px;
  }
  
  .activity-time {
    color: var(--muted);
    font-size: 12px;
  }
  
  .chart-container {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    margin-top: 24px;
    box-shadow: 0 8px 24px var(--shadow-color);
  }
  
  .chart-container h3 {
    margin: 0 0 16px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
  }
  
  @media (max-width: 768px) {
    .dashboard-widgets {
      grid-template-columns: 1fr;
    }
    .quick-actions-grid {
      grid-template-columns: 1fr;
    }
  }


