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

:root {
    --ga-primary: #2d5a27; /* Dark Green - Pistachio Leaf */
    --ga-primary-light: #4c8c45;
    --ga-secondary: #93c47d; /* Pistachio Green */
    --ga-accent: #d4af37; /* Warm Gold - Baklava Gold */
    --ga-bg: #fdfbf7; /* Creamy White */
    --ga-card-bg: #ffffff;
    --ga-text: #1a1a1a;
    --ga-text-muted: #666666;
    --ga-border: #e8e2d6;
    --ga-sidebar-w: 280px;
    --ga-header-h: 80px;
    --ga-radius: 16px;
    --ga-shadow: 0 10px 30px rgba(45, 90, 39, 0.05);
    --ga-shadow-hover: 0 20px 40px rgba(45, 90, 39, 0.1);
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--ga-bg);
    color: var(--ga-text);
    overflow-x: hidden;
    margin: 0;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .ga-brand-text {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
}

.text-primary {
    color: var(--ga-primary) !important;
}

.text-accent {
    color: var(--ga-accent) !important;
}

.bg-primary {
    background-color: var(--ga-primary) !important;
}

/* --- Layout --- */
.ga-layout {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* --- Custom Sidebar --- */
.ga-sidebar {
    width: var(--ga-sidebar-w);
    background: var(--ga-card-bg);
    border-right: 1px solid var(--ga-border);
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 1050;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.ga-sidebar-header {
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-bottom: 1px solid var(--ga-border);
    background: #fff;
}

.ga-brand {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.ga-logo {
    max-width: 220px;
    width: 100%;
    height: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
    filter: drop-shadow(2px 4px 8px rgba(45, 90, 39, 0.2));
}

.ga-nav {
    flex: 1;
    padding: 1.5rem 1rem;
    overflow-y: auto;
    background: var(--ga-primary);
}

.ga-nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1.25rem;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    border-radius: var(--ga-radius);
    margin-bottom: 0.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.ga-nav-link i {
    font-size: 1.25rem;
}

.ga-nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.ga-nav-link.active {
    background: var(--ga-accent);
    color: var(--ga-primary);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    font-weight: 700;
}

.ga-nav-link.active i {
    color: var(--ga-primary);
}

/* --- Main Content --- */
.ga-main {
    flex: 1;
    margin-left: var(--ga-sidebar-w);
    padding: 2rem;
    transition: all 0.4s ease;
    min-width: 0; /* Important for flex child to allow shrinking and containing overflow */
    display: flex;
    flex-direction: column;
}

.ga-content {
    flex: 1;
    width: 100%;
}

/* --- User Menu --- */
.ga-topbar {
    height: var(--ga-header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    background: transparent;
}

.ga-page-title {
    font-size: 1.75rem;
    color: var(--ga-primary);
    margin: 0;
    position: relative;
    font-weight: 700;
}

.ga-user-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    border-radius: 30px;
    border: 1px solid var(--ga-border);
    background: #fff;
    transition: all 0.3s ease;
    color: var(--ga-primary);
    font-weight: 600;
}

.ga-user-btn:hover {
    background: #f8f9fa;
    border-color: var(--ga-primary);
}

.ga-user-avatar {
    width: 32px;
    height: 32px;
    background: var(--ga-primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
}

.ga-dropdown-menu {
    border-radius: 12px;
    padding: 0.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1) !important;
}

.ga-dropdown-menu .dropdown-item {
    border-radius: 8px;
    padding: 0.6rem 1rem;
    font-weight: 500;
    color: var(--ga-text);
}

.ga-dropdown-menu .dropdown-item:hover {
    background-color: var(--ga-bg);
    color: var(--ga-primary);
}

/* --- Custom Cards --- */
.ga-card {
    background: var(--ga-card-bg);
    border: 1px solid var(--ga-border);
    border-radius: var(--ga-radius);
    box-shadow: var(--ga-shadow);
    transition: all 0.3s ease;
    overflow: hidden;
}

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

.ga-stat-card {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 140px;
    position: relative;
    overflow: hidden;
    background: #fff;
    border-left: 4px solid var(--ga-primary);
}

.ga-stat-icon {
    width: 48px;
    height: 48px;
    background: rgba(147, 196, 125, 0.15);
    color: var(--ga-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.ga-stat-card.hero-stat {
    background: linear-gradient(135deg, var(--ga-primary), var(--ga-primary-light));
    border: none;
    color: #fff;
}

.ga-stat-card.hero-stat .ga-stat-icon {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.ga-stat-card.hero-stat .ga-stat-info h3 {
    color: rgba(255, 255, 255, 0.8);
}

.ga-stat-card.hero-stat .ga-stat-value {
    color: #fff;
}

.ga-stat-card::after {
    content: '';
    position: absolute;
    bottom: -20px;
    right: -20px;
    width: 100px;
    height: 100px;
    background: var(--ga-primary);
    opacity: 0.03;
    border-radius: 50%;
}

.ga-stat-info h3 {
    font-size: 0.75rem;
    color: var(--ga-text-muted);
    margin: 0 0 0.5rem 0;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.ga-stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--ga-primary);
    margin: 0;
    line-height: 1;
}

/* Dashboard List Items */
.ga-list-item {
    padding: 0.75rem 0;
    border-radius: 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: all 0.2s ease;
}

.ga-list-item:last-child {
    border-bottom: none;
}

.ga-list-item:hover {
    background: rgba(45, 90, 39, 0.02);
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    border-radius: 8px;
}

/* --- Custom Buttons --- */
.ga-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--ga-primary);
    color: #fff;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(45, 90, 39, 0.2);
    text-decoration: none;
    cursor: pointer;
}

.ga-btn:hover {
    background: var(--ga-primary-light);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(45, 90, 39, 0.3);
}

.ga-btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--ga-primary);
    border: 2px solid var(--ga-primary);
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    cursor: pointer;
}

.ga-btn-outline:hover {
    background: var(--ga-primary);
    color: #fff;
}

/* Table Specific Buttons (Small) */
.ga-table .ga-btn-outline, 
.ga-table .ga-btn-outline-danger {
    height: 34px;
    padding: 0 0.75rem;
    font-size: 0.8rem;
    border-radius: 8px;
}

.ga-btn-outline-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: #dc3545;
    border: 2px solid #dc3545;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    cursor: pointer;
}

.ga-btn-outline-danger:hover {
    background: #dc3545;
    color: #fff;
}

/* Sidebar Logout Button Special Style */
.ga-logout-sidebar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffffff !important;
    color: var(--ga-primary) !important;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    cursor: pointer;
}

.ga-logout-sidebar-btn i {
    color: var(--ga-primary) !important;
}

.ga-logout-sidebar-btn:hover {
    background: #f8f9fa !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

/* --- Member Cards --- */
.member-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.member-card:hover {
    transform: translateY(-5px);
}
.member-photo-container {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto;
}

.member-photo {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border: 4px solid #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.member-photo-placeholder {
    width: 120px;
    height: 120px;
    background: var(--ga-secondary);
    color: var(--ga-primary);
    border: 4px solid #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.status-badge {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 3px solid #fff;
}

.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- Tables --- */
.ga-table thead th {
    background: #fdfbf7;
    border-bottom: 2px solid var(--ga-border);
    color: var(--ga-primary);
    font-weight: 700;
    padding: 1rem 1.5rem;
}

.ga-table tbody td {
    padding: 1rem 1.5rem;
    vertical-align: middle;
}

.ga-badge {
    padding: 0.5em 0.8em;
    border-radius: 8px;
    font-weight: 600;
}

.ga-badge-soft {
    background: rgba(45, 90, 39, 0.08);
    color: var(--ga-primary);
    padding: 0.5em 0.8em;
    border-radius: 8px;
    font-weight: 600;
}

/* Status Badges - Smooth Version */
.status-pending {
    background: rgba(102, 102, 102, 0.08);
    color: #666;
    border: none;
}

.status-in-progress {
    background: rgba(212, 175, 55, 0.08);
    color: var(--ga-accent);
    border: none;
}

.status-completed {
    background: rgba(45, 90, 39, 0.08);
    color: var(--ga-primary);
    border: none;
}

.status-planned {
    background: rgba(147, 196, 125, 0.1);
    color: var(--ga-primary);
    border: none;
}

.status-realized {
    background: rgba(45, 90, 39, 0.1);
    color: var(--ga-primary);
    border: none;
}

.status-cancelled {
    background: rgba(220, 53, 69, 0.08);
    color: #dc3545;
    border: none;
}

/* Meeting Link Button */
.ga-meeting-link-card {
    background: linear-gradient(135deg, rgba(45, 90, 39, 0.05), rgba(212, 175, 55, 0.05));
    border: 1px solid var(--ga-border);
    border-radius: 16px;
}

/* --- Quick Access --- */
.ga-quick-access-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background: #fff;
    border: 1px solid var(--ga-border);
    border-radius: var(--ga-radius);
    text-decoration: none;
    transition: all 0.3s ease;
    color: var(--ga-primary);
    text-align: center;
}

.ga-quick-access-btn i {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--ga-accent);
}

.ga-quick-access-btn span {
    font-weight: 700;
    font-size: 0.85rem;
}

.ga-quick-access-btn:hover {
    border-color: var(--ga-accent);
    background: var(--ga-bg);
    transform: translateY(-3px);
    box-shadow: var(--ga-shadow);
    color: var(--ga-primary);
}

/* --- Forms --- */
.ga-input {
    border-radius: 12px;
    padding: 0.75rem 1rem;
    border: 1px solid var(--ga-border);
    background: #fff;
}

.ga-input:focus {
    border-color: var(--ga-primary);
    box-shadow: 0 0 0 4px rgba(45, 90, 39, 0.1);
}

.ga-label {
    font-weight: 600;
    color: var(--ga-primary);
    margin-bottom: 0.5rem;
}

.ga-switch:checked {
    background-color: var(--ga-primary);
    border-color: var(--ga-primary);
}

/* --- Pagination --- */
.ga-pagination nav {
    display: flex;
    justify-content: center;
    width: 100%;
}

.ga-pagination .pagination {
    margin: 0;
    gap: 5px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.ga-pagination .page-link {
    border-radius: 8px !important;
    border: 1px solid var(--ga-border);
    color: var(--ga-primary);
    padding: 0.5rem 0.85rem;
    font-weight: 600;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
}

.ga-pagination .page-link:hover {
    background: var(--ga-bg);
    border-color: var(--ga-primary);
}

.ga-pagination .page-item.active .page-link {
    background: var(--ga-primary);
    border-color: var(--ga-primary);
    color: #fff;
}

/* Fix for large Next/Previous buttons and Tailwind/Bootstrap conflicts */
.ga-pagination svg {
    width: 16px;
    height: 16px;
}

.ga-pagination nav > div:first-child {
    display: none !important;
}

.ga-pagination nav > div:last-child {
    width: auto !important;
}

.ga-pagination span[aria-current="page"] .page-link {
    background: var(--ga-primary) !important;
    color: white !important;
}

.ga-pagination .page-item.disabled .page-link {
    opacity: 0.5;
    background: #f8f9fa;
}

/* --- Empty States --- */
.ga-empty-state {
    padding: 3rem;
    text-align: center;
    background: #fff;
    border-radius: var(--ga-radius);
    border: 2px dashed var(--ga-border);
}

.ga-empty-state i {
    color: var(--ga-secondary);
    opacity: 0.5;
}

/* --- Responsive Table Fixes --- */
@media (max-width: 767.98px) {
    .ga-stat-card {
        min-height: auto;
    }
    
    .ga-stat-value {
        font-size: 1.5rem;
    }
    
    .ga-table {
        min-width: 800px;
    }
}

/* --- Auth --- */
.ga-auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ga-bg);
}

.ga-auth-card {
    width: 100%;
    max-width: 450px;
    padding: 3rem;
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(45, 90, 39, 0.08);
}

.ga-auth-logo-container {
    margin-bottom: 2rem;
    width: 100%;
    display: flex;
    justify-content: center;
}

.ga-auth-logo {
    max-width: 280px;
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(3px 6px 12px rgba(45, 90, 39, 0.25));
}

/* --- Responsive --- */
@media (max-width: 991.98px) {
    .ga-sidebar {
        transform: translateX(-100%);
    }

    body.ga-sidebar-open .ga-sidebar {
        transform: translateX(0);
    }

    .ga-main {
        margin-left: 0;
        padding: 1rem;
    }

    .ga-topbar {
        margin-bottom: 1.5rem;
    }

    .ga-page-title {
        font-size: 1.4rem;
    }
}

.ga-sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    z-index: 1040;
    display: none;
}

body.ga-sidebar-open .ga-sidebar-overlay {
    display: block;
}
