/* ===== CSS VARIABLES ===== */
:root {
    --primary-green: #00C792;
    --primary-green-hover: #00b483;
    --primary-green-light: #e6f9f4;
    --primary-green-dark: #008f68;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --text-muted: #999999;
    --background-primary: #ffffff;
    --background-secondary: #f8f9fa;
    --background-tertiary: #f3f4f6;
    --border-light: #e5e7eb;
    --border-medium: #d1d5db;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;
    --error-color: #ef4444;
    --error-bg: #fef2f2;
    --success-color: #10b981;
    --success-bg: #f0fdf4;
    --warning-color: #f59e0b;
    --warning-bg: #fffbeb;
}

/* ===== BASE LAYOUT ===== */
.modern-admin-page,
.modern-volunteer-details,
.modern-volunteers-page,
.modern-create-volunteer,
.modern-organisation-manage {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--background-secondary);
    min-height: 100vh;
    padding: 12px;
    font-size: 14px;
    line-height: 1.5;
}

body{
    margin: 0;
    padding: 0;
}

/* ===== HEADER COMPONENTS ===== */
.page-header,
.volunteer-header,
.volunteers-header,
.create-header,
.organisation-header {
display: flex;
    justify-content: space-between;
    margin-bottom: 32px;
    background: var(--background-primary);
    padding: 14px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.header-left,
.volunteer-title {
    display: flex;
    align-items: center;
    gap: 16px;
}


.back-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--background-tertiary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
}

.back-button:hover {
    background: var(--primary-green-light);
    border-color: var(--primary-green);
    color: var(--primary-green);
}

.page-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.volunteer-header .page-title {
    font-size: 24px;
}

.header-actions {
    display: flex;
    gap: 12px;
}

/* ===== BUTTON COMPONENTS ===== */
.btn {
display: inline-flex
;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    line-height: 1.25;
    position: relative;
    overflow: hidden;
}

.volunteer-header .btn {
    padding: 10px 20px;
    min-height: auto;
}

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

.btn-primary {
    background: var(--primary-green);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-green-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--background-primary);
            color: var(--text-secondary);
            border: 1px solid var(--border-medium);
}


.btn-secondary:hover {
    background: var(--background-tertiary);
    border-color: var(--primary-green);
    color: var(--primary-green);
}


/* Button Loading States */
.btn-text {
    transition: opacity 0.2s ease;
}

.btn.loading .btn-text {
    opacity: 0;
}

.btn-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
}

.btn.loading .btn-loader {
    display: flex;
    gap: 4px;
}

.btn .loader-dot {
    width: 6px;
    height: 6px;
    background: currentColor;
    border-radius: 50%;
    animation: bounce 0.6s ease-in-out infinite;
}

.btn .loader-dot:nth-child(2) {
    animation-delay: 0.1s;
}

.btn .loader-dot:nth-child(3) {
    animation-delay: 0.2s;
}

/* ===== CARD COMPONENTS ===== */
.card,
.volunteer-card,
.filters-card,
.create-form-card,
.organisation-form-card {
    background: var(--background-primary);
    border-radius: var(--radius-xl);
    padding: 15px;
    margin-bottom: 14px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
        color: black;
        text-decoration: none;
}

.noMargin {
    margin: 0 !important;
}



.volunteer-card {
    transition: all 0.2s ease;
}

.volunteer-card:hover {
transform: scale(1.03);
                box-shadow: 0 6px 24px 0 rgba(0,0,0,0.08);
                z-index: 2;}

/* Volunteer Grid Cards */
.volunteers-grid .volunteer-card {
    padding: 24px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.volunteers-grid .volunteer-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-green), var(--primary-green-dark));
}



/* ===== GRID LAYOUTS ===== */
.volunteer-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 24px;
    margin-bottom: 32px;
}

.volunteers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

/* ===== FORM COMPONENTS ===== */
.form-section {
    margin-bottom: 40px;
}

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

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-label,
.filter-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    display: block;
}

.filter-label {
    font-weight: 500;
    color: var(--text-secondary);
}

.form-input,
.form-textarea,
.filter-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 14px;
    transition: all 0.2s ease;
    background: var(--background-primary);
    color: var(--text-primary);
    box-sizing: border-box;
}

.form-input:focus,
.form-textarea:focus,
.filter-input:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px var(--primary-green-light);
}

.form-input::placeholder,
.form-textarea::placeholder,
.filter-input::placeholder {
    color: var(--text-muted);
}

.form-input.error {
    border-color: var(--error-color);
}

.form-input.error:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.form-actions {
    display: flex;
    gap: 16px;
    justify-content: flex-end;
    padding-top: 24px;
    border-top: 1px solid var(--border-light);
}

/* ===== FILTER COMPONENTS ===== */
.filters-card {
    margin-bottom: 24px;
}

.filters-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.filter-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* ===== STATISTICS BAR ===== */
.stats-bar {
    display: flex;
    gap: 20px;
    background: var(--background-primary);
    padding: 20px 24px;
    border-radius: var(--radius-xl);
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.stat-item {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-green);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===== VOLUNTEER CARD COMPONENTS ===== */
.volunteer-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.volunteer-avatar {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary-green), var(--primary-green-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    font-weight: 600;
    flex-shrink: 0;
}

.volunteer-info {
    flex: 1;
    min-width: 0;
}

.volunteer-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.volunteer-details .volunteer-name {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}

.volunteer-status {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.volunteer-status.active {
    background: var(--primary-green-light);
    color: var(--primary-green-dark);
}

.volunteer-status.inactive {
    background: #fee2e2;
    color: #dc2626;
}

.volunteer-status.pending {
    background: #fef3c7;
    color: #d97706;
}

.volunteer-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.detail-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.detail-icon {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.detail-text {
    color: var(--text-secondary);
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ===== PROFILE COMPONENTS ===== */
.profile-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.profile-image-container {
    position: relative;
    margin-bottom: 24px;
}

.profile-image {
    width: 120px;
    height: 120px;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 4px solid var(--primary-green-light);
    box-shadow: var(--shadow-md);
}

.profile-status {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    border-radius: var(--radius-full);
    border: 3px solid var(--background-primary);
    box-shadow: var(--shadow-sm);
}

.status-active {
    background: var(--primary-green);
}

.status-inactive {
    background: #ef4444;
}

.status-pending {
    background: #f59e0b;
}

.volunteer-meta {
    color: var(--text-secondary);
}

/* ===== FILE UPLOAD COMPONENTS ===== */
.logo-section {
    background: var(--background-tertiary);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
    margin-bottom: 20px;
}

.current-logo {
    max-width: 200px;
    max-height: 200px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
    background: white;
    padding: 8px;
}

.file-input-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.file-input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-input-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--background-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.file-input-label:hover {
    border-color: var(--primary-green);
    color: var(--primary-green);
}

/* ===== NOTICE COMPONENTS ===== */
.notice-card {
    background: var(--primary-green-light);
    border: 1px solid var(--primary-green);
    border-radius: var(--radius-md);
    padding: 16px;
    margin: 20px 0;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.notice-icon {
    color: var(--primary-green);
    flex-shrink: 0;
    margin-top: 2px;
}

.notice-text {
    font-size: 14px;
    line-height: 1.5;
    color: var(--primary-green-dark);
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.empty-state-description {
    font-size: 14px;
    color: var(--text-muted);
    max-width: 400px;
    margin: 0 auto 24px;
    line-height: 1.5;
}

/* ===== OVERLAY COMPONENTS ===== */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.overlay-content {
    background: var(--background-primary);
    border-radius: var(--radius-xl);
    padding: 32px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    text-align: center;
}

.overlay-header {
    margin-bottom: 24px;
}

.overlay-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.overlay-icon.success {
    background: var(--success-bg);
    color: var(--success-color);
}

.overlay-icon.error {
    background: var(--error-bg);
    color: var(--error-color);
}

.overlay-icon.warning {
    background: var(--warning-bg);
    color: var(--warning-color);
}

.overlay-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.overlay-message {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 24px;
}

.overlay-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 24px;
}

/* ===== LOADER COMPONENTS ===== */
.loader-section {
    margin: 24px 0;
}

.loader-dots {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 16px;
}

.loader-dot {
    width: 12px;
    height: 12px;
    background: var(--primary-green);
    border-radius: var(--radius-full);
    animation: bounce 0.6s ease-in-out infinite;
}

.loader-dot:nth-child(1) {
    animation-delay: 0s;
}

.loader-dot:nth-child(2) {
    animation-delay: 0.1s;
}

.loader-dot:nth-child(3) {
    animation-delay: 0.2s;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

/* ===== QR CODE SECTION ===== */
.qr-section {
    margin: 24px 0;
    padding: 24px;
    background: var(--background-tertiary);
    border-radius: var(--radius-lg);
}

.qr-section h4 {
    margin-bottom: 16px;
    color: var(--text-primary);
}

#qrcode {
    display: inline-block;
    padding: 16px;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

/* ===== DUPLICATE LIST ===== */
.duplicate-list {
    text-align: left;
    margin: 20px 0;
    padding: 16px;
    background: var(--warning-bg);
    border-radius: var(--radius-md);
    border: 1px solid var(--warning-color);
}

.duplicate-list h4 {
    margin-bottom: 12px;
    color: var(--warning-color);
}

.duplicate-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.duplicate-list li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(245, 158, 11, 0.2);
}

.duplicate-list li:last-child {
    border-bottom: none;
}

/* ===== MODAL OVERLAY (Legacy Support) ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 24px;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: var(--background-primary);
    border-radius: var(--radius-xl);
    padding: 32px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
}

/* ===== HOME PAGE STYLES ===== */
@media (max-width: 768px) {
    .stats-container {
        flex-direction: column;
        padding: 16px;
        overflow-y: auto;
        max-height: 40vh;
        -webkit-overflow-scrolling: touch;
    }
    .stat-box {
        min-width: 0;
        margin: 0;
        padding: 16px;
    }
}
/* Home & Volunteers: Shared Statistics Bar Styles */
.scroll-hint {
    display: none;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
    color: var(--mainText);
    font-size: 13px;
    opacity: 0.7;
    margin-top: 8px;
}

.scroll-hint svg {
    width: 16px;
    height: 16px;
    vertical-align: bottom;
    animation: swipeAnim 2s ease-in-out infinite;
}

.stats-wrapper {
    margin: 24px 0 32px 0;
    width: 100%;
}
.stats-container {
    display: flex;
    gap: 20px;
    background: var(--background-primary);
    padding: 20px 24px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    justify-content: space-between;
    flex-wrap: wrap;
}
.stat-box {
    flex: 1 1 220px;
    min-width: 220px;
    margin: 0 8px;
    background: var(--background-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    transition: box-shadow 0.2s;
}
.stat-box .stat-icon {
    font-size: 28px;
    margin-bottom: 12px;
}
.stat-box h3 {
    margin: 0 0 12px 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}
.stat-content {
    color: var(--text-primary);
    width: 100%;
}
.stat-highlight {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-green);
    margin: 8px 0;
    line-height: 1.2;
}
.stat-subtext {
    font-size: 14px;
    opacity: 0.8;
    margin-top: 4px;
}
.timing-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 12px;
}
.timing-item {
    background: rgba(0, 199, 146, 0.05);
    padding: 12px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.timing-item .label {
    font-size: 12px;
    opacity: 0.7;
}
.timing-item .value {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-green);
}
@media (max-width: 900px) {
    .stats-container {
        flex-direction: column;
        gap: 16px;
        padding: 16px;
    }
    .stat-box {
        min-width: 0;
        margin: 0;
        padding: 16px;
    }
}
/* Home & Volunteers: Shared Actions Section Styles */
.actions-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    margin: 20px 16px 40px;
}

.action-card {
    background: var(--background-primary);
    border-radius: var(--radius-xl);
    padding: 24px;
    display: flex;
    align-items: flex-start;
    text-decoration: none;
    color: var(--text-primary);
    transition: transform 0.2s cubic-bezier(.4,2,.3,1), box-shadow 0.2s cubic-bezier(.4,2,.3,1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}
.action-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-green), var(--primary-green-dark));
    opacity: 0.8;
}
.action-card:hover, .action-card:focus {
    transform: scale(1.03);
    box-shadow: 0 6px 24px 0 rgba(0,0,0,0.08);
    z-index: 2;
}
.action-icon {
    width: 48px;
    height: 48px;
    margin-right: 20px;
    flex-shrink: 0;
    background: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
}
.action-content {
    flex-grow: 1;
}
.action-content h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}
.action-content p {
    margin: 0;
    font-size: 14px;
    opacity: 0.8;
    color: var(--text-secondary);
}
@media (max-width: 768px) {
    .actions-container {
        grid-template-columns: 1fr;
        gap: 12px;
        margin: 20px 8px 24px;
    }
    .action-card {
        padding: 16px;
    }
    .action-icon {
        width: 36px;
        height: 36px;
        margin-right: 16px;
    }
    .action-content h3 {
        font-size: 16px;
    }
    .action-content p {
        font-size: 13px;
    }
}

.twoFactorContainer {
    width: 92%;
    max-width: 600px;
    margin: 32px auto;
    background: var(--mainForeground);
    border-radius: var(--borderRadius);
    padding: var(--spacing-lg);
    position: relative;
    overflow: hidden;
    box-shadow: var(--cardShadow);
}

.twoFactorContainer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--mainButtonAndLogo);
    opacity: 0.8;
}

.warning-text {
    display: flex
;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    padding: 6px 12px;
    border-radius: 20px;
    background: rgba(255, 107, 107, 0.1);
    color: #ff6b6b;
    font-size: 13px;
    width: fit-content;
}
/* Admin Header */
.admin-header {
    background: var(--background-primary);
    border-radius: var(--radius-xl);
    padding: 32px;
    margin-bottom: 32px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    text-align: center;
}

.admin-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 16px 0;
}

.admin-name {
    color: var(--primary-green);
}

.organisation-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 0;
}

/* Statistics Section */
.statistics-section {
    margin-bottom: 32px;
}

.statistics-wrapper {
    position: relative;
}

.statistics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    transition: all 0.3s ease;
}

.featured-card {
    background: linear-gradient(135deg, var(--primary-green-light), var(--background-primary));
    border: 2px solid var(--primary-green);
    position: relative;
    overflow: hidden;
}

.featured-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.featured-card:hover::before {
    transform: translateX(100%);
}


.statistic-card {
    position: relative;
    background: var(--background-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.statistic-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-green);
}

.statistic-icon {
    font-size: 32px;
    margin-bottom: 16px;
    display: block;
}

.statistic-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 16px 0;
}

.stat-highlight {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary-green);
    margin: 12px 0;
    line-height: 1.2;
}

.stat-subtext {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 8px;
}

/* Slider Controls */
.slider-controls {
    margin-top: 20px;
    text-align: center;
}

.slider-dots {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--border-medium);
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    outline: none;
}

.dot.active {
    background: var(--primary-green);
    transform: scale(1.2);
}

.dot:hover {
    background: var(--primary-green-hover);
}

.slider-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 13px;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.slider-hint svg {
    width: 16px;
    height: 16px;
    animation: swipeHint 2s ease-in-out infinite;
}

@keyframes swipeHint {
    0%, 100% { 
        transform: translateX(0); 
        opacity: 0.6;
    }
    50% { 
        transform: translateX(8px); 
        opacity: 1;
    }
}

.growth-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 14px;
    font-weight: 500;
    margin-top: 12px;
}

.growth-indicator.positive {
    background: var(--success-bg);
    color: var(--success-color);
}

.growth-indicator.negative {
    background: var(--error-bg);
    color: var(--error-color);
}

/* Timing Grid */
.timing-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 16px;
}

.timing-item {
    background: var(--background-tertiary);
    padding: 16px;
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.timing-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.timing-value {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-green);
}

/* Actions Section */
.actions-section {
    margin-bottom: 32px;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.action-card {
      background: var(--mainForeground);
                border-radius: 16px;
                padding: 24px;
                display: flex;
                align-items: flex-start;
                text-decoration: none;
                color: var(--mainText);
                transition: transform 0.2s cubic-bezier(.4,2,.3,1), box-shadow 0.2s cubic-bezier(.4,2,.3,1);
                position: relative;
                overflow: hidden;
                cursor: pointer;
                border-radius: var(--radius-xl);
                box-shadow: var(--shadow-sm);
                border: 1px solid var(--border-light);
}

.action-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-green);
    opacity: 0.8;
}


.action-content {
    flex-grow: 1;
    min-width: 0;
}

.action-content h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}

.action-content p {
    margin: 0;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.action-arrow {
    width: 24px;
    height: 24px;
    color: var(--text-muted);
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-left: 16px;
}


.warning-card {
    border-color: var(--warning-color) !important;
    background: var(--warning-bg) !important;
}

.warning-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 8px 12px;
    border-radius: var(--radius-full);
    background: var(--error-bg);
    color: var(--error-color);
    font-size: 13px;
    font-weight: 500;
}

.warning-badge svg {
    width: 16px;
    height: 16px;
}

/* Logout Section */
.logout-section {
    text-align: center;
    margin-top: 48px;
}

.logout-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    background: var(--background-primary);
    color: var(--text-secondary);
    border-radius: var(--radius-full);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 2px solid var(--border-light);
}

.logout-button:hover {
    background: var(--error-bg);
    color: var(--error-color);
    border-color: var(--error-color);
    transform: translateY(-2px);
}

/* Responsive Design for Home Page */
@media (max-width: 1024px) {
    .statistics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .featured-card {
        grid-column: span 2;
    }
    
    .actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
       
}

@media (max-width: 768px) {
     .header-actions {
        flex-wrap: wrap;
        justify-content: center;
    }
    .modern-admin-page {
        padding: 16px;
    }

        .volunteers-header {
                flex-direction: column;
                gap: 16px;
                text-align: center;
            }

    .admin-header {
        padding: 20px 16px;
        margin-bottom: 24px;
        text-align: left;
    }

    .admin-title {
        font-size: 24px;
        margin-bottom: 8px;
    }

    .organisation-title {
        font-size: 18px;
    }

    /* Mobile Slider Styles */
    .statistics-grid.mobile-slider {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        gap: 16px;
        padding: 0 4px;
        margin: 0 -4px;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .statistics-grid.mobile-slider::-webkit-scrollbar {
        display: none;
    }

    .statistics-grid.mobile-slider .statistic-card {
        flex: 0 0 calc(85vw - 32px);
        scroll-snap-align: start;
        scroll-snap-stop: always;
    }

    .statistics-grid.mobile-slider .featured-card {
        grid-column: span 1;
    }

    .statistics-grid:not(.mobile-slider) {
        display: grid;
        grid-template-columns: 1fr;
        gap: 16px;
        margin-bottom: 24px;
    }

    .statistics-grid:not(.mobile-slider) .featured-card {
        grid-column: span 1;
        padding: 20px;
    }

    .statistic-card {
        padding: 16px;
    }

    .statistic-icon {
        font-size: 24px;
        margin-bottom: 12px;
    }

    .statistic-title {
        font-size: 16px;
        margin-bottom: 12px;
    }

    .stat-highlight {
        font-size: 28px;
    }


    .timing-item {
        padding: 12px;
    }

    .timing-value {
        font-size: 16px;
    }

    .actions-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .action-card {
        padding: 16px;
        flex-direction: row;
        align-items: center;
    }

    .action-icon {
        width: 40px;
        height: 40px;
        margin-right: 16px;
    }

    .action-content h3 {
        font-size: 16px;
        margin-bottom: 4px;
    }

    .action-content p {
        font-size: 13px;
        line-height: 1.4;
    }

    .logout-section {
        margin-top: 32px;
    }

    .logout-button {
        padding: 14px 28px;
        font-size: 14px;
    }

    /* Show slider controls only on mobile */
    .slider-controls {
        display: block;
    }
}

/* Hide slider controls on desktop */
@media (min-width: 769px) {
    .slider-controls {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .modern-admin-page {
        padding: 12px;
    }

    .admin-header {
        padding: 16px 12px;
        margin-bottom: 20px;
    }

    .admin-title {
        font-size: 20px;
        line-height: 1.3;
    }

    .organisation-title {
        font-size: 16px;
    }

    .statistics-grid {
        gap: 12px;
        margin-bottom: 20px;
    }

    .statistic-card {
        padding: 14px;
    }

    .statistic-icon {
        font-size: 20px;
        margin-bottom: 10px;
    }

    .statistic-title {
        font-size: 14px;
        margin-bottom: 10px;
    }

    .stat-highlight {
        font-size: 24px;
    }

    .timing-grid {
        gap: 8px;
    }

    .timing-item {
        padding: 10px;
    }

    .timing-label {
        font-size: 11px;
    }

    .timing-value {
        font-size: 14px;
    }

    .actions-grid {
        gap: 12px;
    }

    .action-card {
        padding: 14px;
        min-height: 70px;
    }

    .action-icon {
        width: 32px;
        height: 32px;
        margin-right: 12px;
    }

    .action-content h3 {
        font-size: 14px;
        margin-bottom: 2px;
    }

    .action-content p {
        font-size: 12px;
        line-height: 1.3;
    }

    .warning-badge {
        padding: 6px 10px;
        font-size: 11px;
        margin-top: 8px;
    }

    .warning-badge svg {
        width: 12px;
        height: 12px;
    }

    .logout-section {
        margin-top: 24px;
    }

    .logout-button {
        padding: 12px 24px;
        font-size: 13px;
    }

    .logout-button svg {
        width: 14px;
        height: 14px;
    }
}

/* Special mobile optimizations */
@media (max-width: 375px) {
    .modern-admin-page {
        padding: 10px;
    }

    .admin-header {
        padding: 14px 10px;
    }

    .admin-title {
        font-size: 18px;
    }

    .organisation-title {
        font-size: 14px;
    }

    .action-card {
        padding: 12px;
        min-height: 60px;
    }

    .action-content h3 {
        font-size: 13px;
    }

    .action-content p {
        font-size: 11px;
    }
}

/* Mobile Touch Improvements */
@media (max-width: 768px) {
    .action-card {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
        user-select: none;
    }

    .action-card:active {
        transform: scale(0.98);
    }

    .statistic-card {
        -webkit-tap-highlight-color: transparent;
    }

    .logout-button {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
        user-select: none;
        min-height: 44px;
        min-width: 44px;
    }

    .logout-button:active {
        transform: scale(0.98);
    }
}

/* Better skeleton loader for mobile */
.skeleton-loader {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: var(--radius-sm);
    height: 20px;
    width: 100%;
    max-width: 200px;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

@media (max-width: 480px) {
    .skeleton-loader {
        height: 16px;
        max-width: 150px;
    }
}

/* ===== ACCESSIBILITY ===== */
.btn:focus,
.form-input:focus,
.form-textarea:focus,
.filter-input:focus,
.volunteer-card:focus {
    outline: 2px solid var(--primary-green);
    outline-offset: 2px;
}

.volunteer-card:focus {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ===== HIGH CONTRAST SUPPORT ===== */
@media (prefers-contrast: high) {
    .volunteer-card,
    .filters-card,
    .stats-bar,
    .create-form-card,
    .organisation-form-card,
    .overlay-content {
        border: 2px solid var(--text-primary);
    }
}

/* ===== REDUCED MOTION SUPPORT ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .modern-admin-page,
    .modern-volunteer-details,
    .modern-volunteers-page,
    .modern-create-volunteer,
    .modern-organisation-manage {
        background: white;
    }

    .header-actions,
    .filter-actions,
    .form-actions {
        display: none;
    }

    .volunteer-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

/* ===== WORK ENTRY COMPONENTS (Volunteer Details Specific) ===== */
.work-entries-section {
    margin-top: 32px;
}

    .work-entries, .certificates-list {
        display: grid;
        grid-template-columns: repeat(1, 1fr);
    }

.work-entry {
    background: var(--background-tertiary);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 16px;
    border: 1px solid var(--border-light);
    transition: all 0.2s ease;
}

.work-entry:hover {
    box-shadow: var(--shadow-sm);
}

.work-entry-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.work-entry-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.work-entry-meta {
    display: flex;
    gap: 16px;
    color: var(--text-secondary);
    font-size: 14px;
}

.work-entry-details {
    color: var(--text-secondary);
    font-size: 14px;
}

/* ===== STATISTICS COMPONENTS (Volunteer Details Specific) ===== */
.statistics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.statistic-card {
    background: var(--background-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.statistic-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-green);
    display: block;
    margin-bottom: 8px;
}

.statistic-label {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

/* ===== LOADING STATES ===== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.loading-content {
    text-align: center;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-light);
    border-top: 3px solid var(--primary-green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

.loading-text {
    color: var(--text-secondary);
    font-weight: 500;
    font-family:sans-serif;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Desktop Enhancements */
@media (min-width: 769px) {
    .statistics-grid {
        animation: fadeInUp 0.6s ease-out;
    }

    .statistic-card {
        animation: fadeInUp 0.6s ease-out;
        animation-fill-mode: both;
    }

    .statistic-card:nth-child(1) { animation-delay: 0.1s; }
    .statistic-card:nth-child(2) { animation-delay: 0.2s; }
    .statistic-card:nth-child(3) { animation-delay: 0.3s; }
    .statistic-card:nth-child(4) { animation-delay: 0.4s; }

    .statistic-card:hover .statistic-icon {
        animation: bounce 0.6s ease;
    }

    .statistic-card:hover .stat-highlight {
        color: var(--primary-green-hover);
        transform: scale(1.05);
        transition: all 0.3s ease;
    }

    .featured-card:hover {
        transform: translateY(-6px);
        box-shadow: var(--shadow-xl);
    }

    .timing-grid {
        animation: slideInLeft 0.8s ease-out;
    }

    .timing-item:hover {
        background: var(--primary-green-light);
        transform: translateY(-2px);
        transition: all 0.3s ease;
    }

    .timing-item:hover .timing-value {
        color: var(--primary-green-dark);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Improved desktop grid layout */
@media (min-width: 1200px) {
    .statistics-grid {
        grid-template-columns: 2fr 1fr 1fr 1fr;
        gap: 32px;
    }

    .featured-card {
        grid-column: span 1;
        padding: 32px;
    }

    .statistic-card {
        padding: 28px;
    }

    .statistic-icon {
        font-size: 40px;
    }

    .statistic-title {
        font-size: 20px;
    }

    .stat-highlight {
        font-size: 42px;
    }
}

/* Ultra-wide desktop */
@media (min-width: 1600px) {
    .statistics-grid {
        max-width: 1400px;
        margin: 0 auto;
    }

    .actions-grid {
        max-width: 1400px;
        margin: 0 auto;
    }
}

@media (min-width: 769px) {
    .featured-card {
        grid-column: span 2;
    }
    
    .statistics-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .statistics-grid .statistic-card:first-child {
        grid-column: span 2;
    }

    .work-entry{
    }

    .work-entries, .certificates-list{
        
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        columns: 2;
        gap: 10px
    }
}

/* ===== LEGAL PAGES STYLES ===== */
.modern-legal-page {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--background-secondary);
    min-height: 100vh;
    padding: 12px;
}

.legal-content {
    max-width: 900px;
    margin: 0 auto;
}

.legal-header {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
    background: var(--background-primary);
    padding: 14px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.legal-card {
    background: var(--background-primary);
    border-radius: var(--radius-xl);
    padding: 32px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    margin-bottom: 32px;
}

.legal-section {
    margin-bottom: 32px;
}

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

.legal-section h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
}

.legal-section h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    margin-top: 16px;
}

.legal-section p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 12px;
}

.legal-section a {
    color: var(--primary-green);
    text-decoration: none;
    transition: all 0.2s ease;
}

.legal-section a:hover {
    color: var(--primary-green-hover);
    text-decoration: underline;
}

.info-block {
    background: var(--background-tertiary);
    border-left: 4px solid var(--primary-green);
    padding: 16px;
    border-radius: var(--radius-md);
}

.info-block p {
    margin: 0;
    line-height: 1.7;
}

#jmdcontent {
    color: var(--text-primary) !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
}

#jmdcontent h1, #jmdcontent h2, #jmdcontent h3, #jmdcontent h4 {
    color: var(--text-primary) !important;
    margin-top: 24px !important;
    margin-bottom: 12px !important;
}

#jmdcontent a {
    color: var(--primary-green) !important;
    text-decoration: none !important;
}

#jmdcontent a:hover {
    text-decoration: underline !important;
}

#jmdcontent ul, #jmdcontent ol {
    color: var(--text-secondary) !important;
}

#jmdcontent li {
    margin-bottom: 8px;
}

/* ===== FOOTER STYLING ===== */
.footer {
    background: var(--background-primary);
    border-top: 1px solid var(--border-light);
    padding: 16px;
    text-align: center;
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: auto;
}

.footer a {
    color: var(--primary-green);
    text-decoration: none;
    transition: all 0.2s ease;
}

.footer a:hover {
    color: var(--primary-green-hover);
    text-decoration: underline;
}

.footerText {
    margin: 4px 0;
}

