/* Define Color Palette Variables */
:root {
    --primary-color: #003366;
    --secondary-color: #FFC107;
    --background-overlay: rgba(255, 255, 255, 0.9);
    --card-front: #e0e0e0;
    --card-back: #cccccc;
    --table-header-bg: #003366;
    --table-header-text: #ffffff;
    --text-color: #000000;
    --focus-outline: 2px dashed var(--secondary-color);
    --success-color: #4caf50;
    --error-color: #f44336;
    --warning-color: #ff9800;
    --info-color: #2196f3;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-success { color: var(--success-color); }
.text-error { color: var(--error-color); }
.text-warning { color: var(--warning-color); }
.text-info { color: var(--info-color); }

.bg-success { background-color: #e8f5e9; }
.bg-error { background-color: #ffebee; }
.bg-warning { background-color: #fff3cd; }
.bg-info { background-color: #d1ecf1; }

.font-bold { font-weight: bold; }
.font-large { font-size: 18px; }
.font-xlarge { font-size: 20px; }

.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.p-1 { padding: 10px; }
.p-2 { padding: 15px; }
.p-3 { padding: 20px; }

.rounded { border-radius: 5px; }
.border { border: 1px solid #ddd; }

/* Admin/Debug Page Styles */
.admin-table {
    border: 1px solid #ddd;
    border-collapse: collapse;
    width: 100%;
    margin-bottom: 20px;
}

.admin-table th,
.admin-table td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: left;
}

.admin-table th {
    background-color: var(--table-header-bg);
    color: var(--table-header-text);
}

.status-box {
    padding: 20px;
    border-radius: 5px;
    margin-top: 20px;
}

.btn-primary {
    display: inline-block;
    background: #007bff;
    color: white;
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 18px;
    margin-top: 20px;
}

.btn-primary:hover {
    background: #0056b3;
}

/* ============================================
   MODERN CONTAINER & LAYOUT SYSTEM
   ============================================ */

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--primary-color);
}

.page-header h2 {
    margin: 0;
    color: var(--primary-color);
}

/* Grid Layouts */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.two-column-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.three-column-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* Responsive grid */
@media (max-width: 768px) {
    .dashboard-grid,
    .stats-grid,
    .two-column-grid,
    .three-column-grid {
        grid-template-columns: 1fr;
    }
}

/* Card Components */
.card {
    background: rgba(255, 255, 255, 0.28);
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.card h3 {
    margin-top: 0;
    color: var(--primary-color);
    font-size: 1.3rem;
}

.card p {
    color: #666;
    margin: 10px 0;
}

/* Stat Cards */
.stat-card {
    background: rgba(255, 255, 255, 0.24);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.stat-card:hover {
    transform: scale(1.05);
}

.stat-card h3 {
    font-size: 2.5rem;
    margin: 10px 0;
    font-weight: bold;
    color: var(--primary-color);
}

.stat-card p {
    margin: 5px 0 0 0;
    font-size: 0.9rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Alert Components */
.alert {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 15px;
    border-left: 4px solid;
}

.alert-success {
    background-color: #e8f5e9;
    border-color: var(--success-color);
    color: #2e7d32;
}

.alert-error {
    background-color: #ffebee;
    border-color: var(--error-color);
    color: #c62828;
}

.alert-warning {
    background-color: #fff3cd;
    border-color: var(--warning-color);
    color: #f57c00;
}

.alert-info {
    background-color: #e3f2fd;
    border-color: var(--info-color);
    color: #1565c0;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    text-transform: uppercase;
}

.badge-success {
    background: var(--success-color);
    color: white;
}

.badge-error {
    background: var(--error-color);
    color: white;
}

.badge-warning {
    background: var(--warning-color);
    color: white;
}

.badge-info {
    background: var(--info-color);
    color: white;
}

.badge-primary {
    background: var(--primary-color);
    color: white;
}

.badge-secondary {
    background: #9e9e9e;
    color: white;
}

/* Modal/Dialog - Comprehensive Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    overflow-y: auto;
    padding: 20px;
}

.modal.show,
.modal[style*="display: block"] {
    display: block;
}

.modal-content {
    background: #fff;
    max-width: 700px;
    margin: 50px auto;
    padding: 0;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
    animation: modalSlideIn 0.3s ease;
    position: relative;
}

/* Alternative modal content with backdrop blur (for glass effect) */
.modal-content.glass {
    background: rgba(255, 255, 255, 0.30);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.35);
    padding: 30px;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid #eee;
    margin-bottom: 0;
}

.modal-header h3 {
    margin: 0;
    color: var(--primary-color);
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 30px;
    height: 30px;
    line-height: 1;
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: var(--error-color);
}

.modal-body,
.modal-content > div:not(.modal-header):not(.form-actions) {
    padding: 16px;
}

.modal-footer,
.form-actions {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid #eee;
    justify-content: flex-end;
}

/* Modal overlay variant (for dynamically created modals) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay .modal {
    display: block;
    position: relative;
    background: transparent;
    padding: 0;
}

/* Form Containers */
.form-container {
    background: rgba(255, 255, 255, 0.28);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    margin: 0 auto;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--primary-color);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    font-family: inherit;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.1);
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 25px;
}

/* Table Container */
.table-container {
    background: rgba(255, 255, 255, 0.24);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow-x: auto;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.35);
}

/* Content Sections */
.content-section {
    background: rgba(255, 255, 255, 0.26);
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.content-section h3 {
    margin-top: 0;
    color: var(--primary-color);
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 10px;
}

/* Flex Containers */
.flex-container {
    display: flex;
    gap: 20px;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.flex-column {
    display: flex;
    flex-direction: column;
}

/* Button Groups */
.button-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.875rem;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    background: var(--primary-color);
    color: white;
    transition: background 0.3s ease;
}

.btn-sm:hover {
    background: #002244;
}

.btn-danger {
    background: var(--error-color);
}

.btn-danger:hover {
    background: #d32f2f;
}

.btn-success {
    background: var(--success-color);
}

.btn-success:hover {
    background: #388e3c;
}

/* Tabs */
.tab-container {
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 20px;
}

/* Breadcrumb (Library pages) */
.breadcrumb {
    color: rgba(45, 55, 72, 0.95); /* darker text for readability */
    font-size: 0.95rem;
}
.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
}
body.dark-mode .breadcrumb {
    color: rgba(255, 255, 255, 0.85) !important;
}
body.dark-mode .breadcrumb a {
    color: rgba(255, 255, 255, 0.95) !important;
}

.tab-btn {
    padding: 12px 24px;
    margin-right: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: #666;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

/* Ensure tab titles are readable in light and dark mode */
.tab-container .tab-btn {
    color: #2d3748 !important;
}
.tab-container .tab-btn.active {
    color: var(--primary-color) !important;
}
body.dark-mode .tab-container .tab-btn {
    color: rgba(255, 255, 255, 0.85) !important;
}
body.dark-mode .tab-container .tab-btn.active {
    color: var(--secondary-color) !important;
}

.tab-btn:hover {
    color: var(--primary-color);
    background: rgba(0, 51, 102, 0.05);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background: rgba(0, 51, 102, 0.05);
}

/* Lists */
.list-container {
    background: rgba(255, 255, 255, 0.22);
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.list-item {
    padding: 15px;
    border-bottom: 1px solid #e0e0e0;
    transition: background 0.2s ease;
}

.list-item:last-child {
    border-bottom: none;
}

.list-item:hover {
    background: #f5f5f5;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state-message {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

/* Loading State */
.loading-container {
    text-align: center;
    padding: 40px 20px;
}

.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Header with Actions */
.header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.header-actions h2 {
    margin: 0;
}

/* Info Box */
.info-box {
    background: #e3f2fd;
    border-left: 4px solid var(--info-color);
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.success-box {
    background: #e8f5e9;
    border-left: 4px solid var(--success-color);
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.warning-box {
    background: #fff3cd;
    border-left: 4px solid var(--warning-color);
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.error-box {
    background: #ffebee;
    border-left: 4px solid var(--error-color);
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

/* Sidebar Layout */
.sidebar-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 25px;
}

.sidebar {
    background: rgba(255, 255, 255, 0.24);
    border-radius: 10px;
    padding: 20px;
    height: fit-content;
    position: sticky;
    top: 20px;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.main-content {
    background: rgba(255, 255, 255, 0.26);
    border-radius: 10px;
    padding: 25px;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.35);
}

@media (max-width: 968px) {
    .sidebar-layout {
        grid-template-columns: 1fr;
    }
    .sidebar {
        position: relative;
        top: 0;
    }
}

/* Progress Bar */
.progress-container {
    width: 100%;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    height: 25px;
    margin: 10px 0;
}

.progress-bar {
    height: 100%;
    background: var(--success-color);
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 0.85rem;
}

.progress-bar.warning {
    background: var(--warning-color);
}

.progress-bar.danger {
    background: var(--error-color);
}

/* Action Bar */
.action-bar {
    background: rgba(255, 255, 255, 0.22);
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.35);
}

/* Metric Cards */
.metric-card {
    background: linear-gradient(135deg, var(--primary-color), #0055aa);
    color: white;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
}

.metric-value {
    font-size: 2.5rem;
    font-weight: bold;
    margin: 10px 0;
}

.metric-label {
    font-size: 0.9rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--primary-color);
}

.timeline-item {
    position: relative;
    padding-bottom: 30px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -24px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 3px solid white;
    box-shadow: 0 0 0 2px var(--primary-color);
}

.timeline-content {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Panel */
.panel {
    background: rgba(255, 255, 255, 0.26);
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 20px;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.panel-header {
    padding: 15px 20px;
    background: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
    border-radius: 8px 8px 0 0;
    font-weight: bold;
    color: var(--primary-color);
}

.panel-body {
    padding: 20px;
}

.panel-footer {
    padding: 15px 20px;
    background: #fafafa;
    border-top: 1px solid #e0e0e0;
    border-radius: 0 0 8px 8px;
}

/* Status Indicators */
.status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 8px;
}

.status-dot.active {
    background: var(--success-color);
}

.status-dot.inactive {
    background: #9e9e9e;
}

.status-dot.pending {
    background: var(--warning-color);
}

.status-dot.error {
    background: var(--error-color);
}

/* Divider */
.divider {
    height: 1px;
    background: #e0e0e0;
    margin: 25px 0;
}

.divider-thick {
    height: 2px;
    background: var(--primary-color);
    margin: 30px 0;
}

/* Spacing Helpers (Extended) */
.m-0 { margin: 0; }
.m-1 { margin: 10px; }
.m-2 { margin: 20px; }
.m-3 { margin: 30px; }

.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.ml-0 { margin-left: 0; }
.mr-0 { margin-right: 0; }

.p-0 { padding: 0; }

/* Display Helpers */
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }
.d-grid { display: grid !important; }

/* Width Helpers */
.w-25 { width: 25%; }
.w-50 { width: 50%; }
.w-75 { width: 75%; }
.w-100 { width: 100%; }

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.4s ease-out;
}

/* Hover Effects */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* ============================================
   END OF MODERN CONTAINER SYSTEM
   ============================================ */

/* Base Styles */
body {
    font-family: 'Roboto', Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: url('../images/background.jpg') no-repeat center center fixed;
    background-size: cover;
    color: var(--text-color);
    line-height: 1.6;
    font-size: 16px;
}

/* Page container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 30px 20px;
    box-sizing: border-box;
}

/* Loading Screen */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--background-overlay);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.25s ease;
}

/* Landing page override: nicer, less intrusive overlay */
body.landing-page #loading-screen {
    background: rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}
body.landing-page #loading-screen svg {
    width: 46px;
    height: 46px;
}
body.landing-page #loading-screen circle {
    stroke: var(--secondary-color);
    stroke-width: 5;
}
.loading-screen svg {
    width: 100px;
    height: 100px;
}
.loading-screen circle {
    stroke: var(--primary-color);
    stroke-width: 8;
    fill: none;
    animation: loadingAnimation 2s linear infinite;
}
@keyframes loadingAnimation {
    0% { stroke-dashoffset: 0; stroke-dasharray: 150.6 100.4; }
    50% { stroke-dasharray: 1 250; }
    100% { stroke-dashoffset: 502; stroke-dasharray: 150.6 100.4; }
}

/* Navbar */
header {
    background-color: transparent;
    color: var(--text-color);
    padding: 2rem 0;
    text-align: center;
}
header h1 {
    font-size: 2.5rem;
    margin: 0;
    color: var(--text-color);
}
.navbar {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    gap: 2rem;
    padding: 1rem 0;
    background-color: rgba(255, 255, 255, 0.1);
}
.navbar a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: bold;
    padding: 0.5rem 1rem;
    transition: color 0.3s ease, background 0.3s ease;
}
.navbar a:hover,
.navbar a:focus {
    color: var(--secondary-color);
    background-color: rgba(0, 0, 0, 0.05);
    outline: var(--focus-outline);
    border-radius: 5px;
}

/* Report Frequency Selector */
.report-selector {
    margin: 1rem 0;
    text-align: center;
}
.report-selector select {
    padding: 0.5rem;
    font-size: 1rem;
    border-radius: 5px;
    border: 1px solid #ddd;
    color: var(--text-color);
}
.report-selector select:focus {
    outline: var(--focus-outline);
}

/* Financial Breakdown Table */
.financial-table {
    width: 100%;
    margin-top: 2rem;
    background-color: #fff;
    border-radius: 8px;
    border-collapse: collapse;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.financial-table th, .financial-table td {
    padding: 12px 15px;
    text-align: left;
    border: 1px solid #ddd;
    color: var(--text-color);
}
.financial-table th {
    background-color: var(--table-header-bg);
    color: var(--table-header-text);
}
.financial-table tr:nth-child(even) {
    background-color: #f9f9f9;
}
.financial-table tr:hover {
    background-color: #f1f1f1;
}

/* Chart Container */
.chart-container {
    width: 100%;
    height: 400px;
    margin-top: 2rem;
}
.chart-container canvas {
    width: 100%;
    height: 100%;
}

/* Cards Layout */
.cards {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-top: 2rem;
    padding: 20px;
}

/* Flip Card (Hover) */
.card-flip, .flip-card {
    perspective: 800px;
    width: 180px;
    height: 120px;
    background-color: transparent;
    margin: 10px;
}
.card-flip-inner, .flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    border-radius: 8px;
}
.card-flip:hover .card-flip-inner,
.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

/* Front and Back of the Card */
.card-flip-front, .card-flip-back,
.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 10px;
    border-radius: 8px;
    color: var(--text-color);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    background-color: rgba(255, 255, 255, 0.8);
}
.card-flip-front {
    background-color: rgba(255, 255, 255, 0.8);
}
.card-flip-back {
    background-color: rgba(204, 204, 204, 0.8);
    transform: rotateY(180deg);
}
.flip-card-front {
    background-color: rgba(255, 255, 255, 0.8);
}
.flip-card-back {
    background-color: rgba(221, 221, 221, 0.8);
    transform: rotateY(180deg);
}

/* Spinner Animation */
.spinner {
    animation: rotate 2s linear infinite;
    width: 50px;
    height: 50px;
}
.spinner .path {
    stroke: var(--text-color);
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
}
@keyframes rotate {
    100% {
        transform: rotate(360deg);
    }
}
@keyframes dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

/* Footer */
footer {
    background-color: transparent;
    color: var(--text-color);
    text-align: center;
    padding: 0.5rem 0;
    font-size: 0.9rem;
}

/* Countdown Section Styling */
.countdown {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 10vh;
    text-align: center;
    padding: 0.5rem;
    border-radius: 10px;
    margin: 0 auto;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    flex-direction: column;
    background-color: transparent;
    width: 40%;
}
#timer {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-top: 0.5rem;
}
#timer span {
    margin: 0 0.2rem;
}

/* Testimonial Section Adjustment */
.testimonial-grid {
    margin-top: 2rem !important;
    padding-top: 0.5rem;
}
.testimonial-card {
    margin-bottom: 1rem;
}

/* Ledger Section Styling */
.ledger-section {
    background-color: #f9f9f9;
    padding: 20px;
    margin: 2rem auto;
    border-radius: 10px;
    max-width: 1000px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border-left: 5px solid var(--primary-color); /* Consistent with color scheme */
}
.ledger-section h3 {
    text-align: center;
    margin-bottom: 20px;
    color: var(--primary-color); /* Consistent with color scheme */
}

/* Ledger Form Styling */
#ledger-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    justify-content: space-between;
}
#ledger-form input,
#ledger-form select,
#ledger-form button {
    padding: 10px;
    font-size: 1rem;
    border-radius: 6px;
    border: 1px solid #ccc;
    flex: 1 1 18%;
    min-width: 120px;
}
#ledger-form input:focus,
#ledger-form select:focus {
    border-color: var(--primary-color);
    outline: none;

#ledger-form button {
    background-color: var(--primary-color); /* Primary color for buttons */
    color: #fff;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}
}
#ledger-form button:hover {
    background-color:var(--primary-color); /* Hover effect */
}

/* Ledger Table Styling */
#ledger-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}
#ledger-table th,
#ledger-table td {
    border: 1px solid #ccc;
    padding: 12px;
    text-align: left;
}
#ledger-table th {
    background-color: var(--primary-color); /* Primary color for headers */
    color: black;
}
#ledger-table tr:nth-child(even) {
    background-color: #f1f1f1;
}

/* Ledger Actions Styling */
.ledger-actions {
    margin-top: 20px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-start;
}
.ledger-actions button {
    background-color: var(--primary-color); /* Use primary color for actions */
    color: black;
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.ledger-actions button:hover {
    background-color: var(--primary-color);
}

/* Accordion Styling */
.accordion {
    background-color: var(--primary-color);
    color: #fff;
    cursor: pointer;
    padding: 14px;
    width: 100%;
    border: none;
    text-align: left;
    font-size: 1.1rem;
    transition: 0.4s;
    margin-top: 10px;
    border-radius: 5px;
}
.accordion:hover {
    background-color: var(--primary-color);
}
.accordion.active,
.accordion:focus {
    background-color: var(--primary-color);
}
.panel {
    padding: 0 18px;
    display: none;
    background-color: #f7f7f7;
    overflow: hidden;
    border-left: 4px solid var(--primary-color);
    border-radius: 0 0 5px 5px;
}

/* Member Cards */
.member-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.member-card {
    background: rgba(255, 255, 255, 0.26);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 10px;
    padding: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.member-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.member-card h3 {
    margin-top: 0;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.member-card p {
    margin: 8px 0;
    color: #333;
}

/* Ministry Cards */
.ministry-card {
    background: rgba(255, 255, 255, 0.26);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.ministry-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.ministry-card h3 {
    margin-top: 0;
    color: var(--primary-color);
    font-size: 1.3rem;
}

.ministry-card p {
    color: #333;
    margin: 10px 0;
}

/* Event Grid */
.event-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

/* Donation Grid */
.donation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

/* Search Bar */
.search-bar {
    background: rgba(255, 255, 255, 0.24);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-bar input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.search-bar input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.1);
}

.search-bar button {
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s ease;
}

.search-bar button:hover {
    background: #002244;
}

/* CTA Button (Call to Action) */
.cta-btn {
    display: inline-block;
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s ease, transform 0.2s ease;
    text-align: center;
}

.cta-btn:hover {
    background: #002244;
    transform: translateY(-2px);
}

/* Responsive Design Enhancements */
@media (max-width: 768px) {
    .financial-table,
    .chart-container {
        overflow-x: auto;
    }
    .cards {
        flex-direction: column;
        align-items: center;
    }
    .card-flip, .flip-card {
        width: 90%;
        height: auto;
    }
    .countdown {
        width: 80%;
        min-height: 12vh;
    }
    .member-grid,
    .event-grid,
    .donation-grid {
        grid-template-columns: 1fr;
    }
    .search-bar {
        flex-direction: column;
    }
}

/* Glass utility class - apply to any element for blur/transparent background */
.glass {
    background: rgba(255, 255, 255, 0.26);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.35);
}

/* Hidden utility class */
.hidden {
    display: none;
}

/* Fallback for browsers that do not support backdrop-filter */
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    .card,
    .stat-card,
    .modal-content,
    .form-container,
    .table-container,
    .content-section,
    .sidebar,
    .main-content,
    .action-bar,
    .panel,
    .list-container,
    .glass,
    .member-card,
    .ministry-card,
    .search-bar {
        background: rgba(255, 255, 255, 0.9);
    }
}

/* ============================================================================
   LANDING PAGE STYLES
   These styles are specifically for the main landing page (index.html)
   ============================================================================ */

/* Landing Page Specific Variables */
body.landing-page {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    background-image: url('../images/background.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    padding-top: 282px; /* ensure content clears navbar + banner */
}

/* Dark Mode Toggle Button */
.dark-mode-toggle {
    position: fixed;
    top: 160px; /* avoid overlapping the banner */
    right: 30px;
    z-index: 1000;
    background: var(--primary-color);
    color: var(--text-light);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    font-size: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.dark-mode-toggle:hover {
    transform: scale(1.1) rotate(20deg);
}

/* Dark Mode Styles */
body.dark-mode {
    background-image: url('../images/background.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    color: #ffffff;
    position: relative;
}

body.dark-mode::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 26, 46, 0.85);
    z-index: -1;
    pointer-events: none;
}

body.dark-mode .navbar {
    background: rgba(26, 26, 46, 0.5);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

/* Landing buttons: make "Home/Library" style button text darker in dark mode */
body.dark-mode .btn-secondary {
    border-color: var(--primary-color) !important;
    color: var(--primary-color) !important;
}

body.dark-mode .feature-card,
body.dark-mode .stat-box,
body.dark-mode .event-card,
body.dark-mode .verse-card,
body.dark-mode .testimonial-item,
body.dark-mode .feature-icon-card,
body.dark-mode .prayer-request-card,
body.dark-mode .hierarchy-node {
    background: rgba(22, 33, 62, 0.4);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

body.dark-mode .section-header h2,
body.dark-mode .feature-card h3,
body.dark-mode .about-text h3 {
    color: var(--secondary-color);
}

/* Landing Page Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    z-index: 999;
    transition: all 0.3s ease;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
}

.logo i {
    font-size: 30px;
}

.logo-image {
    width: 36px;
    height: 36px;
    object-fit: contain;
    border-radius: 5px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 20px;
}

.nav-links a {
    text-decoration: none;
    color: #2d3748;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.nav-buttons {
    display: flex;
    gap: 15px;
}

.btn-login, .btn-register {
    padding: 10px 25px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-login {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-register {
    background: var(--primary-color);
    color: #ffffff;
}

.btn-login:hover, .btn-register:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--primary-color);
}

/* Hero Section - content starts near nav, no big gap; Sabbath countdown visible */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    background: linear-gradient(135deg, #2C5F2D 0%, #97BC62 100%);
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,112C672,96,768,96,864,112C960,128,1056,160,1152,160C1248,160,1344,128,1392,112L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>');
    background-position: bottom;
    background-repeat: no-repeat;
    background-size: cover;
    padding: 16px 20px 50px;
    color: #ffffff;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
}

.hero-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 100%;
}

.hero-text {
    text-align: center;
    margin-bottom: 24px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-tagline {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 30px;
}

.hero-verse {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 10px;
    max-width: 600px;
    margin: 0 auto 30px;
}

.hero-verse i {
    margin-right: 10px;
}

.hero-verse em {
    transition: opacity 0.5s ease;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary, .btn-secondary {
    padding: 15px 40px;
    border: none;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-primary {
    background: #ffffff;
    color: #2C5F2D;
}

.btn-secondary {
    background: transparent;
    border: 2px solid #ffffff;
    color: #ffffff;
}

.btn-primary:hover, .btn-secondary:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Upcoming Events in hero – kept visible, not covered by other sections */
.hero-events {
    width: 100%;
    max-width: 900px;
    margin: 0 auto 28px;
    text-align: center;
    position: relative;
    z-index: 2;
}

.hero-events h3 {
    color: #fff;
    font-size: 1.35rem;
    margin-bottom: 16px;
    font-weight: 600;
}

.hero-events h3 i {
    margin-right: 8px;
}

.hero-events .events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    justify-content: center;
}

.hero-events .event-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 14px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    text-align: left;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-events .event-date {
    flex-shrink: 0;
    text-align: center;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
}

.hero-events .event-date .month {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.hero-events .event-date .day {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.2;
}

.hero-events .event-content h3 {
    color: #fff;
    font-size: 0.95rem;
    margin: 0 0 6px 0;
    text-align: left;
}

.hero-events .event-content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.8rem;
    margin: 0;
}

.hero-events .event-content p i {
    margin-right: 4px;
}

/* Sabbath Countdown */
.sabbath-countdown {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 24px;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

/* Countdown in the gap (below nav) */
.hero-countdown-in-gap {
    margin-bottom: 20px;
    padding: 16px 20px;
    max-width: 100%;
}

.hero-countdown-in-gap h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.hero-countdown-in-gap .countdown-timer {
    gap: 10px;
}

.hero-countdown-in-gap .time-unit {
    padding: 8px 12px;
}

.hero-countdown-in-gap .time-value {
    font-size: 1.5rem;
}

.hero-events-empty {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    margin: 0;
    grid-column: 1 / -1;
}

.sabbath-countdown h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.countdown-timer {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 15px;
}

.time-unit {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 20px;
    min-width: 100px;
}

.time-value {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
}

.time-label {
    display: block;
    font-size: 0.9rem;
    opacity: 0.8;
}

.sabbath-info {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Daily Bible Verse Section */
.daily-verse {
    padding: 60px 20px;
    background: linear-gradient(135deg, rgba(44, 95, 45, 0.05), rgba(151, 188, 98, 0.05));
}

.verse-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    margin: 0 auto;
}

.verse-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.verse-card h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.verse-text {
    font-size: 1.3rem;
    font-style: italic;
    margin-bottom: 15px;
    line-height: 1.8;
    color: #2d3748;
}

.verse-reference {
    font-weight: 600;
    color: #718096;
}

/* Section Header (used across landing page) */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.section-header p {
    font-size: 1.2rem;
    color: #718096;
}

/* About Section */
.about-section {
    padding: 80px 20px;
    background: transparent;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text h3 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.about-text p {
    margin-bottom: 20px;
    line-height: 1.8;
}

.about-stats {
    display: flex;
    gap: 30px;
    margin-top: 30px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.stat-item i {
    font-size: 2.5rem;
    color: var(--primary-color);
}

.stat-item strong {
    display: block;
    font-size: 1.5rem;
    color: var(--primary-color);
}

.about-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.feature-icon-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.feature-icon-card:hover {
    transform: translateY(-10px);
}

.feature-icon-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.feature-icon-card h4 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

/* Features Section */
.features-section {
    padding: 80px 20px;
    background: linear-gradient(135deg, rgba(44, 95, 45, 0.03), rgba(151, 188, 98, 0.03));
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #2C5F2D, #97BC62);
    transform: scaleX(0);
    transition: all 0.3s ease;
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    font-size: 3.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.feature-card p {
    color: #718096;
    margin-bottom: 20px;
}

.feature-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.feature-link:hover {
    gap: 10px;
}

/* Hierarchy Section */
.hierarchy-section {
    padding: 80px 20px;
    background: transparent;
}

.hierarchy-visual {
    max-width: 1000px;
    margin: 0 auto;
}

.hierarchy-level {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.hierarchy-node {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    flex: 1;
    min-width: 200px;
}

.hierarchy-node:hover {
    transform: scale(1.05);
}

.hierarchy-node.main-church {
    background: linear-gradient(135deg, #2C5F2D, #97BC62);
    color: #ffffff;
    min-width: 300px;
}

.hierarchy-node i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.main-church i {
    color: #ffffff;
}

.hierarchy-connector {
    height: 50px;
    width: 2px;
    background: var(--primary-color);
    margin: 0 auto;
}

.member-count, .location {
    margin-top: 10px;
    font-size: 0.9rem;
}

/* Live Stats Section */
.stats-section {
    padding: 80px 20px;
    background: linear-gradient(135deg, rgba(44, 95, 45, 0.05), rgba(151, 188, 98, 0.05));
}

.live-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.stat-box {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.stat-box:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
    animation: pulse 2s infinite;
}

.stat-label {
    font-size: 1.1rem;
    color: #718096;
    margin-bottom: 10px;
}

.stat-trend {
    font-size: 0.9rem;
    color: #97BC62;
}

.stat-trend i {
    margin-right: 5px;
}

/* Events Section */
.events-section {
    padding: 80px 20px;
    background: transparent;
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.event-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    gap: 20px;
    transition: all 0.3s ease;
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.event-date {
    background: var(--primary-color);
    color: #ffffff;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    min-width: 80px;
}

.event-date .month {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
}

.event-date .day {
    display: block;
    font-size: 2rem;
    font-weight: 700;
}

.event-content h3 {
    margin-bottom: 10px;
    color: var(--primary-color);
}

.event-content p {
    color: #718096;
    margin-bottom: 5px;
}

.event-content i {
    margin-right: 8px;
}

/* Testimonials Section */
.testimonials-section {
    padding: 80px 20px;
    background: linear-gradient(135deg, rgba(44, 95, 45, 0.03), rgba(151, 188, 98, 0.03));
}

.testimonials-slider {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.testimonial-item {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.testimonial-content i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.testimonial-content p {
    font-style: italic;
    margin-bottom: 20px;
    line-height: 1.8;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 15px;
}

.author-info h4 {
    color: var(--primary-color);
    margin-bottom: 5px;
}

.author-info span {
    font-size: 0.9rem;
    color: #718096;
}

/* Mission Section */
.mission-section {
    padding: 80px 20px;
    background: linear-gradient(135deg, #2C5F2D, #97BC62);
    color: #ffffff;
    text-align: center;
}

.mission-content i {
    font-size: 4rem;
    margin-bottom: 20px;
}

.mission-content h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.mission-verse {
    font-size: 1.5rem;
    font-style: italic;
    margin-bottom: 10px;
    line-height: 1.8;
}

.mission-reference {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Prayer Request Section */
.prayer-request-section {
    padding: 80px 20px;
    background: linear-gradient(135deg, rgba(44, 95, 45, 0.03), rgba(151, 188, 98, 0.03));
}

.prayer-request-card {
    max-width: 600px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.prayer-request-card h2 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.prayer-request-card form {
    margin-top: 30px;
}

.prayer-request-card input,
.prayer-request-card textarea {
    width: 100%;
    padding: 15px;
    margin-bottom: 20px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
}

.prayer-request-card textarea {
    resize: vertical;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    justify-content: center;
}

/* Access Section - REMOVED */

/* ============================================================================
   AUTHENTICATION PAGES STYLES
   Styles for login.php and register.php
   ============================================================================ */

/* Auth Page Background */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Poppins', sans-serif;
    position: relative;
    overflow: hidden;
}

.auth-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/background.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    z-index: -2;
}

.auth-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 26, 46, 0.65);
    z-index: -1;
}

/* Auth Container */
.auth-container {
    width: 100%;
    max-width: 450px;
    padding: 20px;
    z-index: 1;
}

.auth-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.auth-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

/* Auth Header */
.auth-header {
    text-align: center;
    margin-bottom: 40px;
}

.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.auth-logo i {
    font-size: 2rem;
}

.auth-header h1 {
    color: #ffffff;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.auth-header p {
    color: #b0b0b0;
    font-size: 1rem;
}

/* Auth Form */
.auth-form {
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    color: #ffffff;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #b0b0b0;
    z-index: 2;
    pointer-events: none;
    font-size: 1rem;
}

.input-group input {
    width: 100%;
    padding: 15px 50px 15px 45px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 1rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-sizing: border-box;
}

.input-group input::placeholder {
    color: #b0b0b0;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 3px rgba(44, 95, 45, 0.2);
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #b0b0b0;
    cursor: pointer;
    padding: 8px;
    z-index: 2;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 4px;
}

.password-toggle:hover {
    color: var(--primary-color);
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 10px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #b0b0b0;
    font-size: 0.9rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

.terms-link {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.terms-link:hover {
    color: #97BC62;
}

.forgot-password {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: #97BC62;
}

.error-message {
    background: rgba(244, 67, 54, 0.15);
    border: 1px solid rgba(244, 67, 54, 0.4);
    color: #ffcdd2;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.success-message {
    background: rgba(76, 175, 80, 0.15);
    border: 1px solid rgba(76, 175, 80, 0.4);
    color: #c8e6c9;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

/* Auth Button */
.auth-btn {
    width: 100%;
    padding: 15px;
    background: var(--primary-color);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.auth-btn:hover {
    background: #97BC62;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(44, 95, 45, 0.3);
}

.auth-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Auth Footer */
.auth-footer {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
}

.auth-footer p {
    color: #b0b0b0;
    margin-bottom: 15px;
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.auth-footer a:hover {
    color: #97BC62;
}

.auth-links {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.auth-links a {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .auth-container {
        padding: 15px;
    }
    
    .auth-card {
        padding: 30px 25px;
    }
    
    .auth-header h1 {
        font-size: 1.8rem;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .auth-links {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .auth-card {
        padding: 25px 20px;
    }
    
    .input-group input {
        padding: 12px 50px 12px 40px;
    }
    
    .auth-btn {
        padding: 12px;
        font-size: 1rem;
    }
}

/* Dark Mode for Auth Pages */
body.dark-mode .auth-card {
    background: rgba(22, 33, 62, 0.4);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .input-group input {
    background: rgba(22, 33, 62, 0.3);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .input-group input:focus {
    background: rgba(22, 33, 62, 0.5);
    border-color: var(--primary-color);
}

/* Footer */
.footer {
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    padding: 60px 20px 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3, .footer-section h4 {
    margin-bottom: 20px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section a {
    color: #ffffff;
    text-decoration: none;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.footer-section a:hover {
    opacity: 1;
    color: #97BC62;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: #2C5F2D;
    transform: translateY(-5px);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    margin-bottom: 10px;
    opacity: 0.7;
}

.footer-bottom i {
    color: #e74c3c;
}

/* Scroll to Top Button */
.scroll-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.scroll-top-btn.show {
    opacity: 1;
    visibility: visible;
}

.scroll-top-btn:hover {
    transform: translateY(-5px);
}

/* Landing Page Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Landing Page Responsive Design */
@media (max-width: 768px) {
    .nav-links, .nav-buttons {
        display: none;
    }
    
    .nav-links.show {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        padding: 20px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-tagline {
        font-size: 1.2rem;
    }
    
    .countdown-timer {
        flex-wrap: wrap;
    }
    
    .time-unit {
        min-width: 80px;
        padding: 15px;
    }
    
    .time-value {
        font-size: 2rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .about-features {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .hierarchy-level {
        flex-direction: column;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .dark-mode-toggle {
        top: 80px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

/* ============================================================================
   END OF LANDING PAGE STYLES
   ============================================================================ */

/* ============================================================================
   CHIEF ELDER DASHBOARD STYLES
   Specific styles for the Chief Elder dashboard
   ============================================================================ */

/* Header Content */
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.header-left h1 {
    margin: 0;
    color: var(--primary-color);
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-left p {
    margin: 5px 0 0 0;
    color: #666;
    font-size: 0.9rem;
}

/* Welcome Section */
.welcome-section {
    background: linear-gradient(135deg, var(--primary-color), #97BC62);
    color: white;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    text-align: center;
}

.welcome-section h2 {
    margin: 0 0 10px 0;
    font-size: 2.2rem;
    font-weight: 700;
}

.role-description {
    margin: 0;
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Enhanced Stats Cards */
.stat-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
    z-index: 1;
}

.stat-icon {
    font-size: 2.5rem;
    opacity: 0.8;
    z-index: 2;
    position: relative;
}

.stat-content {
    z-index: 2;
    position: relative;
}

.stat-content h3 {
    margin: 0 0 5px 0;
    font-size: 2rem;
    font-weight: 700;
}

.stat-content p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Card Actions */
.card-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.card-actions .cta-btn {
    flex: 1;
    min-width: 120px;
    text-align: center;
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* Quick Actions Section */
.quick-actions-section {
    margin-top: 40px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.quick-action-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.quick-action-btn i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.quick-action-btn span {
    font-weight: 600;
    text-align: center;
}

/* Responsive Design for Chief Elder Dashboard */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .welcome-section h2 {
        font-size: 1.8rem;
    }
    
    .role-description {
        font-size: 1rem;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
    }
    
    .card-actions {
        flex-direction: column;
    }
    
    .quick-actions-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================================
   MODAL STYLES FOR CHIEF ELDER DASHBOARD
   ============================================================================ */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.modal {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 15px;
    max-width: 90%;
    max-height: 90%;
    width: 600px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    background: var(--primary-color);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-content {
    padding: 30px;
    max-height: 70vh;
    overflow-y: auto;
}

.modal-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.tab-btn {
    background: none;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.tab-btn.active {
    border-bottom-color: var(--primary-color);
    color: var(--primary-color);
    font-weight: 600;
}

.tab-btn:hover {
    background: rgba(44, 95, 45, 0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.btn-primary, .btn-secondary, .btn-success, .btn-danger {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #97BC62;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

/* Modal Content Items */
.baptism-item,
.discipline-item,
.report-item {
    background: #f8f9fa;
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
}

.baptism-item h4,
.discipline-item h4,
.report-item h4 {
    margin: 0 0 10px 0;
    color: var(--primary-color);
}

.baptism-actions {
    margin-top: 15px;
    display: flex;
    gap: 10px;
}

.church-report {
    max-height: 60vh;
    overflow-y: auto;
}

.report-section {
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.report-section h4 {
    margin: 0 0 15px 0;
    color: var(--primary-color);
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
}

.error {
    text-align: center;
    padding: 40px;
    color: #dc3545;
    background: #f8d7da;
    border-radius: 10px;
}

/* Responsive Modal */
@media (max-width: 768px) {
    .modal {
        width: 95%;
        margin: 20px;
    }
    
    .modal-content {
        padding: 20px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .baptism-actions {
        flex-direction: column;
    }
}

/* ============================================
   COMMUNICATIONS DASHBOARD STYLES
   ============================================ */

/* Main Layout */
.wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* Sidebar Styles */
#sidebar {
    min-width: 250px;
    max-width: 250px;
    background: var(--primary-color);
    color: #fff;
    transition: all 0.3s;
    position: relative;
    z-index: 1000;
}

#sidebar.active {
    margin-left: -250px;
}

#sidebar .sidebar-header {
    padding: 20px;
    background: #002244;
    border-bottom: 3px solid var(--secondary-color);
}

#sidebar ul.components {
    padding: 20px 0;
}

#sidebar ul li a {
    padding: 10px 20px;
    font-size: 1.1em;
    display: block;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s;
}

#sidebar ul li a:hover {
    background: #002244;
    border-left: 3px solid var(--secondary-color);
}

#sidebar ul li.active > a {
    background: #002244;
    border-left: 3px solid var(--secondary-color);
}

/* Content Area */
#content {
    width: 100%;
    min-height: 100vh;
    transition: all 0.3s;
    background-color: #f8f9fa;
}

#content.active {
    width: 100%;
}

/* Dashboard Cards */
.dashboard-card {
    transition: transform 0.3s, box-shadow 0.3s;
    margin-bottom: 20px;
    border: none;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

/* Card Color Variations */
.announcement-card {
    background: linear-gradient(135deg, #e6f2ff 0%, #cce5ff 100%);
    border-left: 4px solid var(--primary-color);
}

.media-card {
    background: linear-gradient(135deg, #fff9e6 0%, #fff3cc 100%);
    border-left: 4px solid var(--secondary-color);
}

.events-card {
    background: linear-gradient(135deg, #e6f7ff 0%, #ccefff 100%);
    border-left: 4px solid var(--info-color);
}

.reports-card {
    background: linear-gradient(135deg, #e6ffe6 0%, #ccffcc 100%);
    border-left: 4px solid var(--success-color);
}

.sermons-card {
    background: linear-gradient(135deg, #f0e6ff 0%, #e0ccff 100%);
    border-left: 4px solid #9c27b0;
}

.materials-card {
    background: linear-gradient(135deg, #ffe6f0 0%, #ffcce0 100%);
    border-left: 4px solid #e91e63;
}

/* Navigation */
.navbar {
    padding: 15px 10px;
    background: rgba(255, 255, 255, 0.15);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: 0;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

/* Improve navbar link visibility */
.navbar a {
    color: #ffffff;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.navbar a:hover,
.navbar a:focus {
    color: #f0f4ff;
    background-color: rgba(255, 255, 255, 0.08);
}

/* Form Styles */
.form-container {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

/* Under Construction Banner */
.under-construction {
    position: fixed; /* pin below navbar */
    top: 136px; /* clear full navbar height incl. shadow */
    left: 0;
    right: 0;
    width: 100%;
    z-index: 998; /* below navbar (999) */
    margin: 0;
}

.uc-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 0;
    padding: 14px 20px;
    border-radius: 12px;
    background: rgba(26, 26, 46, 0.6);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    color: var(--text-color);
    min-height: 44px;
}

@media (max-width: 768px) {
    body.landing-page { padding-top: 150px; }
    .under-construction { top: 80px; }
    .dark-mode-toggle { top: 120px; }
}

.uc-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.35);
}

.uc-item span {
    display: inline-block;
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.4px;
}

.uc-item i {
    color: #ffc107;
    font-size: 1.25rem;
}

.uc-icons {
    display: flex;
    align-items: center;
    gap: 14px;
    color: #fff;
}

.uc-icons i {
    opacity: 0.9;
}

.uc-sep {
    flex: 1;
    height: 1px;
    background: rgba(255,255,255,0.35);
}

@media (max-width: 768px) {
    .uc-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .uc-sep { display: none; }
}

/* Table Styles */
.data-table {
    width: 100%;
    margin-bottom: 1rem;
    color: #212529;
    background-color: #fff;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 0.75rem;
    vertical-align: top;
    border-top: 1px solid #dee2e6;
}

.data-table thead th {
    vertical-align: bottom;
    border-bottom: 2px solid #dee2e6;
    background-color: #f8f9fa;
}

/* Button Styles */
.btn-action {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
    border-radius: 0.2rem;
}

/* Alert Messages */
.alert {
    padding: 0.75rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 0.25rem;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    border: 0.25em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border 0.75s linear infinite;
}

@keyframes spinner-border {
    to { transform: rotate(360deg); }
}

/* Enhanced Dashboard Styles */
.stat-card {
    background: #fff;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-overlay.active {
    display: flex;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
}

.toast {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 1rem 1.5rem;
    margin-bottom: 10px;
    min-width: 300px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.success {
    border-left: 4px solid #28a745;
}

.toast.error {
    border-left: 4px solid #dc3545;
}

.toast.info {
    border-left: 4px solid #17a2b8;
}

.toast.warning {
    border-left: 4px solid #ffc107;
}

/* Badge Styles */
.badge {
    padding: 0.35em 0.65em;
    font-weight: 600;
    border-radius: 6px;
}

/* Table Enhancements */
.table-hover tbody tr:hover {
    background-color: #f8f9fa;
    cursor: pointer;
}

/* Pagination */
.pagination {
    margin-top: 1.5rem;
}

.page-link {
    color: var(--primary-color);
    border: 1px solid #dee2e6;
    padding: 0.5rem 0.75rem;
    text-decoration: none;
    display: inline-block;
    margin: 0 2px;
}

.page-link:hover {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

/* Search and Filter Bar */
.search-filter-bar {
    background: #fff;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
}

/* Quick Actions */
.quick-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.quick-action-btn {
    flex: 1;
    min-width: 200px;
    padding: 1rem;
    border-radius: 8px;
    border: 2px dashed #dee2e6;
    background: #fff;
    transition: all 0.3s ease;
    cursor: pointer;
}

.quick-action-btn:hover {
    border-color: var(--primary-color);
    background: #f8f9fa;
    transform: translateY(-2px);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Activity Feed */
.activity-feed {
    max-height: 400px;
    overflow-y: auto;
}

.activity-item {
    padding: 1rem;
    border-left: 3px solid var(--primary-color);
    margin-bottom: 1rem;
    background: #f8f9fa;
    border-radius: 0 8px 8px 0;
}

.activity-item:hover {
    background: #e9ecef;
}

/* Collapse functionality */
.collapse {
    display: none;
}

.collapse.show {
    display: block;
}

/* Dropdown functionality */
.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    min-width: 200px;
    z-index: 1000;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-menu a,
.dropdown-menu button {
    display: block;
    padding: 0.5rem 1rem;
    color: #333;
    text-decoration: none;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s;
}

.dropdown-menu a:hover,
.dropdown-menu button:hover {
    background: #f8f9fa;
}

.dropdown-toggle::after {
    content: '▼';
    font-size: 0.7em;
    margin-left: 0.5em;
}

/* Communications Responsive */
@media (max-width: 768px) {
    #sidebar {
        margin-left: -250px;
    }
    #sidebar.active {
        margin-left: 0;
    }
    #content {
        width: 100%;
    }
    #content.active {
        width: calc(100% - 250px);
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-action-btn {
        min-width: 100%;
    }
    
    .toast {
        min-width: 250px;
    }
    
    .dropdown-menu {
        position: fixed;
        right: 1rem;
        left: auto;
    }
}