/*
|==========================================================================
| SAKAUM - Modern CSS Design System
|==========================================================================
| Minangkabau Matrilineal Genealogy Application
| Color Palette: Deep Gold, Warm Brown, Natural Greens
|==========================================================================
*/

/* --------------------------------------------------------------------------
   CSS Custom Properties (Design Tokens)
--------------------------------------------------------------------------- */
:root {
    /* Primary Palette - Minangkabau Inspired */
    --primary-50: #fdf8f0;
    --primary-100: #f9edd8;
    --primary-200: #f2d9b0;
    --primary-300: #e8bf7d;
    --primary-400: #dda04a;
    --primary-500: #c78c35;
    --primary-600: #a86d28;
    --primary-700: #8a5623;
    --primary-800: #724623;
    --primary-900: #5f3b1f;

    /* Accent - Rich Maroon (Rumah Gadang) */
    --accent-50: #fdf2f4;
    --accent-100: #fce7ea;
    --accent-200: #f9d0d9;
    --accent-300: #f4a9ba;
    --accent-400: #ec7894;
    --accent-500: #e04d70;
    --accent-600: #cb2d56;
    --accent-700: #ab2047;
    --accent-800: #8f1d3f;
    --accent-900: #7a1c3a;

    /* Secondary - Deep Teal */
    --secondary-50: #f0fdfa;
    --secondary-100: #ccfbf1;
    --secondary-200: #99f6e4;
    --secondary-300: #5eead4;
    --secondary-400: #2dd4bf;
    --secondary-500: #14b8a6;
    --secondary-600: #0d9488;
    --secondary-700: #0f766e;
    --secondary-800: #115e59;
    --secondary-900: #134e4a;

    /* Neutrals */
    --neutral-50: #fafafa;
    --neutral-100: #f4f4f5;
    --neutral-200: #e4e4e7;
    --neutral-300: #d4d4d8;
    --neutral-400: #a1a1aa;
    --neutral-500: #71717a;
    --neutral-600: #52525b;
    --neutral-700: #3f3f46;
    --neutral-800: #27272a;
    --neutral-900: #18181b;

    /* Semantic Colors */
    --success-500: #22c55e;
    --success-100: #dcfce7;
    --warning-500: #f59e0b;
    --warning-100: #fef3c7;
    --error-500: #ef4444;
    --error-100: #fee2e2;
    --info-500: #3b82f6;
    --info-100: #dbeafe;

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Outfit', var(--font-sans);

    /* Spacing Scale */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --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);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-glow: 0 0 20px rgb(199 140 53 / 0.3);

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: var(--neutral-900);
        --bg-secondary: var(--neutral-800);
        --bg-tertiary: var(--neutral-700);
        --text-primary: var(--neutral-50);
        --text-secondary: var(--neutral-300);
        --text-muted: var(--neutral-400);
        --border-color: var(--neutral-700);
    }
}

/* Light Mode (Default) */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: var(--neutral-50);
    --bg-tertiary: var(--neutral-100);
    --text-primary: var(--neutral-900);
    --text-secondary: var(--neutral-600);
    --text-muted: var(--neutral-500);
    --border-color: var(--neutral-200);
}

/* --------------------------------------------------------------------------
   Base Reset & Foundation
--------------------------------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--primary-50) 0%, var(--neutral-50) 50%, var(--secondary-50) 100%);
    min-height: 100vh;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--primary-600);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-700);
}

/* --------------------------------------------------------------------------
   Typography
--------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-primary);
    margin-bottom: var(--space-4);
}

h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    background: linear-gradient(135deg, var(--primary-700) 0%, var(--accent-700) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h2 { font-size: clamp(1.5rem, 4vw, 2.25rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: var(--space-4);
    color: var(--text-secondary);
}

/* --------------------------------------------------------------------------
   Navigation
--------------------------------------------------------------------------- */
.navbar {
    background: linear-gradient(135deg, var(--primary-800) 0%, var(--primary-900) 100%);
    padding: var(--space-4) var(--space-6);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
}

.navbar-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary-200) !important;
    text-decoration: none;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.navbar-brand::before {
    content: '🌳';
    font-size: 1.5rem;
}

.navbar-menu {
    display: flex;
    gap: var(--space-2);
    align-items: center;
}

.navbar-link {
    color: var(--primary-100) !important;
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-lg);
    font-weight: 500;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.navbar-link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary-500) 0%, var(--accent-500) 100%);
    opacity: 0;
    transition: opacity var(--transition-fast);
    border-radius: inherit;
    z-index: -1;
}

.navbar-link:hover {
    color: #fff !important;
}

.navbar-link:hover::before {
    opacity: 1;
}

.navbar-link.logout {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.navbar-link.logout:hover {
    background: var(--error-500);
    border-color: var(--error-500);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-2);
}

.menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--primary-200);
    border-radius: 2px;
    transition: all var(--transition-fast);
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }
    
    .navbar-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--primary-900);
        flex-direction: column;
        padding: var(--space-4);
        gap: var(--space-2);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-base);
    }
    
    .navbar-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .navbar-link {
        width: 100%;
        text-align: center;
    }
}

/* --------------------------------------------------------------------------
   Container & Layout
--------------------------------------------------------------------------- */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--space-6) var(--space-4);
}

.container-narrow {
    max-width: 600px;
}

.grid {
    display: grid;
    gap: var(--space-6);
}

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.flex {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.flex-between {
    justify-content: space-between;
}

.flex-center {
    justify-content: center;
}

.flex-wrap {
    flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   Cards
--------------------------------------------------------------------------- */
.card {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-500) 0%, var(--accent-500) 50%, var(--secondary-500) 100%);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.card:hover::before {
    opacity: 1;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--border-color);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    background: linear-gradient(135deg, var(--primary-700) 0%, var(--accent-700) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.card-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: var(--space-4);
    background: linear-gradient(135deg, var(--primary-100) 0%, var(--primary-200) 100%);
}

.card-feature {
    text-align: center;
    padding: var(--space-8) var(--space-6);
}

.card-feature:hover .card-icon {
    animation: bounce 0.5s ease-in-out;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Glass Card Variant */
.card-glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

/* --------------------------------------------------------------------------
   Buttons
--------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    font-family: var(--font-sans);
    font-size: 0.9375rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-fast);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 50%);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.btn:hover::before {
    opacity: 1;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgb(199 140 53 / 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgb(199 140 53 / 0.5);
    color: #fff;
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary-500) 0%, var(--secondary-600) 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgb(20 184 166 / 0.4);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgb(20 184 166 / 0.5);
    color: #fff;
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent-500) 0%, var(--accent-600) 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgb(224 77 112 / 0.4);
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgb(224 77 112 / 0.5);
    color: #fff;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-500);
    color: var(--primary-600);
}

.btn-outline:hover {
    background: var(--primary-500);
    color: #fff;
}

.btn-ghost {
    background: rgba(199, 140, 53, 0.1);
    color: var(--primary-700);
}

.btn-ghost:hover {
    background: rgba(199, 140, 53, 0.2);
}

.btn-sm {
    padding: var(--space-2) var(--space-4);
    font-size: 0.875rem;
}

.btn-lg {
    padding: var(--space-4) var(--space-8);
    font-size: 1.125rem;
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: var(--radius-full);
}

/* --------------------------------------------------------------------------
   Forms
--------------------------------------------------------------------------- */
.form-group {
    margin-bottom: var(--space-5);
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: var(--space-2);
    color: var(--text-primary);
    font-size: 0.9375rem;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    font-family: var(--font-sans);
    font-size: 1rem;
    color: var(--text-primary);
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: all var(--transition-fast);
    outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 4px rgba(199, 140, 53, 0.15);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.form-hint {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: var(--space-1);
}

.form-error {
    font-size: 0.875rem;
    color: var(--error-500);
    margin-top: var(--space-1);
}

/* Floating Label */
.form-floating {
    position: relative;
}

.form-floating .form-input {
    padding-top: var(--space-5);
}

.form-floating .form-label {
    position: absolute;
    top: 50%;
    left: var(--space-4);
    transform: translateY(-50%);
    pointer-events: none;
    transition: all var(--transition-fast);
    color: var(--text-muted);
    margin: 0;
    font-weight: 400;
}

.form-floating .form-input:focus ~ .form-label,
.form-floating .form-input:not(:placeholder-shown) ~ .form-label {
    top: var(--space-2);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary-600);
}

/* --------------------------------------------------------------------------
   Alerts
--------------------------------------------------------------------------- */
.alert {
    padding: var(--space-4) var(--space-5);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-4);
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    font-weight: 500;
}

.alert-icon {
    flex-shrink: 0;
    font-size: 1.25rem;
}

.alert-error {
    background: var(--error-100);
    color: #991b1b;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-success {
    background: var(--success-100);
    color: #166534;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.alert-warning {
    background: var(--warning-100);
    color: #92400e;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.alert-info {
    background: var(--info-100);
    color: #1e40af;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

/* --------------------------------------------------------------------------
   Tables
--------------------------------------------------------------------------- */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: var(--space-4);
    text-align: left;
}

.data-table th {
    background: linear-gradient(135deg, var(--primary-50) 0%, var(--neutral-50) 100%);
    font-weight: 600;
    color: var(--primary-800);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.data-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background var(--transition-fast);
}

.data-table tbody tr:hover {
    background: var(--primary-50);
}

.data-table tbody tr:last-child {
    border-bottom: none;
}

/* --------------------------------------------------------------------------
   Hero Section
--------------------------------------------------------------------------- */
.hero {
    text-align: center;
    padding: var(--space-16) var(--space-4);
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--primary-200) 0%, transparent 70%);
    opacity: 0.3;
    pointer-events: none;
    z-index: -1;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    margin-bottom: var(--space-4);
    line-height: 1.2;
}

.hero-subtitle {
    font-size: clamp(1.125rem, 2.5vw, 1.5rem);
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto var(--space-8);
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: var(--space-4);
    flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   Tree View Styles
--------------------------------------------------------------------------- */
.tree-container {
    display: flex;
    justify-content: center;
    overflow-x: auto;
    padding: var(--space-8) var(--space-4);
    min-height: 400px;
}

.tree ul {
    padding-top: var(--space-6);
    position: relative;
    display: flex;
    justify-content: center;
    list-style: none;
}

.tree li {
    list-style-type: none;
    position: relative;
    padding: var(--space-5) var(--space-3) 0;
    text-align: center;
}

/* Connecting Lines */
.tree li::before,
.tree li::after {
    content: '';
    position: absolute;
    top: 0;
    right: 50%;
    border-top: 3px solid var(--primary-300);
    width: 50%;
    height: var(--space-5);
}

.tree li::after {
    right: auto;
    left: 50%;
    border-left: 3px solid var(--primary-300);
}

.tree li:only-child::after,
.tree li:only-child::before {
    display: none;
}

.tree li:only-child {
    padding-top: 0;
}

.tree li:first-child::before,
.tree li:last-child::after {
    border: 0 none;
}

.tree li:last-child::before {
    border-right: 3px solid var(--primary-300);
    border-radius: 0 var(--radius-md) 0 0;
}

.tree li:first-child::after {
    border-radius: var(--radius-md) 0 0 0;
}

.tree ul ul::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    border-left: 3px solid var(--primary-300);
    width: 0;
    height: var(--space-5);
}

/* Member Card in Tree */
.member-card {
    background: linear-gradient(145deg, #ffffff 0%, var(--neutral-50) 100%);
    border: 2px solid var(--neutral-200);
    padding: var(--space-4);
    border-radius: var(--radius-xl);
    display: inline-block;
    min-width: 160px;
    max-width: 200px;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    position: relative;
    z-index: 10;
}

.member-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: var(--shadow-xl), var(--shadow-glow);
    border-color: var(--primary-400);
}

.member-photo {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-full);
    object-fit: cover;
    margin: 0 auto var(--space-3);
    border: 4px solid var(--neutral-200);
    background: linear-gradient(135deg, var(--neutral-100) 0%, var(--neutral-200) 100%);
    transition: border-color var(--transition-fast);
}

.gender-P .member-photo {
    border-color: #f472b6;
    box-shadow: 0 0 20px rgba(244, 114, 182, 0.3);
}

.gender-L .member-photo {
    border-color: #60a5fa;
    box-shadow: 0 0 20px rgba(96, 165, 250, 0.3);
}

.member-name {
    font-weight: 700;
    font-size: 0.9375rem;
    display: block;
    margin-bottom: var(--space-1);
    color: var(--text-primary);
}

.member-gelar {
    font-size: 0.8125rem;
    color: var(--primary-600);
    font-style: italic;
    display: block;
    background: var(--primary-100);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
    margin-top: var(--space-2);
}

.member-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    font-size: 0.6875rem;
    font-weight: 600;
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--secondary-500) 0%, var(--secondary-600) 100%);
    color: white;
    box-shadow: var(--shadow-md);
}

.deceased .member-card {
    filter: grayscale(60%);
    opacity: 0.85;
}

.deceased .member-badge {
    background: linear-gradient(135deg, var(--neutral-500) 0%, var(--neutral-600) 100%);
}

/* --------------------------------------------------------------------------
   Dashboard Layout
--------------------------------------------------------------------------- */
.dashboard-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: var(--space-6);
}

@media (max-width: 900px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

.sidebar-card {
    position: sticky;
    top: 100px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary-500) 0%, var(--accent-500) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 2rem;
    font-weight: 700;
    margin: 0 auto var(--space-4);
}

.empty-state {
    text-align: center;
    padding: var(--space-12) var(--space-6);
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-xl);
    background: var(--bg-secondary);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: var(--space-4);
    opacity: 0.5;
}

/* --------------------------------------------------------------------------
   Map Container
--------------------------------------------------------------------------- */
#map {
    height: 70vh;
    min-height: 500px;
    width: 100%;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    border: 2px solid var(--border-color);
}

.leaflet-popup-content-wrapper {
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-lg) !important;
}

.leaflet-popup-content {
    font-family: var(--font-sans) !important;
}

/* --------------------------------------------------------------------------
   Footer
--------------------------------------------------------------------------- */
.footer {
    background: linear-gradient(135deg, var(--primary-800) 0%, var(--primary-900) 100%);
    color: var(--primary-100);
    padding: var(--space-8) var(--space-4);
    margin-top: var(--space-16);
    text-align: center;
}

.footer p {
    color: var(--primary-300);
    margin: 0;
}

.footer a {
    color: var(--primary-200);
}

.footer a:hover {
    color: #fff;
}

/* --------------------------------------------------------------------------
   Utilities
--------------------------------------------------------------------------- */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }

.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary-600); }
.text-success { color: var(--success-500); }
.text-error { color: var(--error-500); }

.mb-0 { margin-bottom: 0 !important; }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }

.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }

.p-0 { padding: 0 !important; }
.p-4 { padding: var(--space-4); }
.p-6 { padding: var(--space-6); }

.hidden { display: none !important; }
.block { display: block; }
.inline-block { display: inline-block; }

.w-full { width: 100%; }

.rounded-full { border-radius: var(--radius-full); }

/* Print Styles */
@media print {
    .no-print,
    .navbar,
    .footer {
        display: none !important;
    }
    
    body {
        background: #fff;
    }
    
    .tree-container {
        overflow: visible;
    }
    
    .member-card {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fadeIn {
    animation: fadeIn 0.5s ease-out forwards;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

.animate-slideIn {
    animation: slideIn 0.4s ease-out forwards;
}

/* Stagger children */
.stagger-children > * {
    animation: fadeIn 0.5s ease-out forwards;
    opacity: 0;
}

.stagger-children > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.4s; }
.stagger-children > *:nth-child(5) { animation-delay: 0.5s; }
