/* Form Components */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
    background: var(--surface);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-input.error {
    border-color: var(--error);
}

.form-input select {
    background: var(--surface);
    cursor: pointer;
}

.form-input textarea {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

/* Button Components */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    min-height: 48px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: var(--secondary);
    color: white;
}

.btn-danger {
    background: var(--error);
    color: white;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    min-height: auto;
}

/* Card Components */
.card {
    background: var(--surface);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.card-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.card-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.card-header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.card-header p {
    opacity: 0.9;
    font-size: 0.95rem;
    position: relative;
    z-index: 1;
}

.card-body {
    padding: 2rem;
}

/* Alert Components */
.alert {
    position: fixed;
    top: 2rem;
    right: 2rem;
    padding: 1rem;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 1001;
    min-width: 300px;
    animation: slideInRight 0.3s ease-out;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Badge Components */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 500;
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.badge-secondary {
    background: rgba(100, 116, 139, 0.1);
    color: var(--secondary);
}

/* Password Input Container */
.password-input-container {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: var(--transition);
}

.password-toggle:hover {
    color: var(--primary);
    background: rgba(37, 99, 235, 0.1);
}

.password-toggle:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Login Footer */
.login-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.link-secondary {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.link-secondary:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.link-secondary:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
}

/* Form Validation States */
.form-input.valid {
    border-color: var(--success);
}

.form-input.invalid {
    border-color: var(--error);
}

.form-validation-message {
    font-size: 0.8rem;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.form-validation-message.error {
    color: var(--error);
}

.form-validation-message.success {
    color: var(--success);
}

/* Enhanced Alert Styles */
.alert {
    position: relative;
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.alert.hidden {
    display: none !important;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

/* Loading Spinner for Buttons */
.btn .loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
}

.btn.loading .loading-spinner {
    display: inline-block;
}

.btn.loading span {
    opacity: 0.7;
}

/* Focus Improvements */
.form-input:focus,
.btn:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Keyboard Navigation */
.btn:focus-visible,
.form-input:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Enhanced Modal Styles */
.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: 2rem;
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease-out;
}

.modal-overlay.hidden {
    display: none;
}

.modal {
    background: var(--surface);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.2s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0.25rem;
    border-radius: 4px;
    transition: var(--transition);
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--background);
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* Enhanced Form Styles */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-help {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
    display: block;
}

.form-help i {
    margin-right: 0.25rem;
}

/* Form Validation */
.form-validation-message {
    font-size: 0.8rem;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.form-validation-message.error {
    color: var(--error);
}

.form-validation-message.success {
    color: var(--success);
}

.form-input.invalid {
    border-color: var(--error);
    background: rgba(239, 68, 68, 0.05);
}

.form-input.valid {
    border-color: var(--success);
}

/* Member Preview */
.member-preview {
    background: var(--background);
    border-radius: var(--border-radius);
    padding: 1rem;
    min-height: 80px;
    border: 1px solid var(--border);
    max-height: 200px;
    overflow-y: auto;
}

.member-preview .member-list {
    margin: 0;
}

.member-preview .member-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}

.member-preview .member-list li:last-child {
    border-bottom: none;
}

.text-secondary {
    color: var(--text-secondary);
    font-style: italic;
}

/* Responsive Modal */
@media (max-width: 768px) {
    .modal-overlay {
        padding: 1rem;
    }
    
    .modal {
        max-width: calc(100vw - 2rem);
        max-height: calc(100vh - 2rem);
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1rem;
    }
    
    .modal-footer {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .modal-overlay {
        padding: 0.5rem;
    }
    
    .modal {
        max-width: calc(100vw - 1rem);
        max-height: calc(100vh - 1rem);
    }
}


/* Loading States */
.btn.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
}

.btn.loading span {
    opacity: 0;
}

/* Table Loading States */
.table tbody tr.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading-placeholder {
    text-align: center;
    color: var(--text-secondary);
    padding: 2rem;
    font-style: italic;
}

.loading-placeholder i {
    margin-right: 0.5rem;
    animation: spin 1s linear infinite;
}

/* Success States */
.success-message {
    color: var(--success);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.success-message i {
    font-size: 1.1em;
}

/* Error States */
.error-message {
    color: var(--error);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.error-message i {
    font-size: 1.1em;
}

/* Add these styles to your existing CSS files */

/* Announcements List Styles */
.announcements-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
}

.announcement-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.announcement-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-1px);
}

/* Priority-based styling */
.announcement-card.priority-urgent {
    border-left: 4px solid var(--error);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.05) 0%, var(--surface) 100%);
}

.announcement-card.priority-high {
    border-left: 4px solid var(--warning);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.05) 0%, var(--surface) 100%);
}

.announcement-card.priority-normal {
    border-left: 4px solid var(--primary);
}

.announcement-card.priority-low {
    border-left: 4px solid var(--secondary);
    opacity: 0.9;
}

/* New announcement indicator */
.announcement-card[data-new="true"] {
    border: 2px solid var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.announcement-card[data-new="true"]::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-top: 20px solid var(--primary);
    border-left: 20px solid transparent;
}

.new-badge {
    background: var(--primary);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 9999px;
    margin-right: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Announcement header */
.announcement-header {
    margin-bottom: 1rem;
}

.announcement-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.announcement-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    flex: 1;
}

.announcement-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.announcement-meta {
    color: var(--text-secondary);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Announcement content */
.announcement-content {
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.announcement-content:last-child {
    margin-bottom: 0;
}

.announcement-content p {
    margin: 0 0 1rem 0;
}

.announcement-content p:last-child {
    margin-bottom: 0;
}

/* Announcement footer */
.announcement-footer {
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    margin-top: 1rem;
}

/* Form checkbox styles (for announcement management) */
.form-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    user-select: none;
}

.form-checkbox input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    margin: 0;
    cursor: pointer;
}

.form-checkbox-label {
    flex: 1;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.form-checkbox input[type="checkbox"]:checked + .form-checkbox-label {
    font-weight: 500;
}

.form-checkbox-group {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    padding: 1rem;
    background: var(--background);
}

/* Priority indicators */
.priority-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.2rem 0.5rem;
    border-radius: 9999px;
}

.priority-urgent .priority-indicator {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

.priority-high .priority-indicator {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.priority-normal .priority-indicator {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
}

.priority-low .priority-indicator {
    background: rgba(100, 116, 139, 0.1);
    color: var(--secondary);
}

/* Responsive design for announcements */
@media (max-width: 768px) {
    .announcement-card {
        padding: 1rem;
    }
    
    .announcement-title-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .announcement-badges {
        justify-content: flex-start;
    }
    
    .announcements-list {
        padding: 0.5rem;
        gap: 0.75rem;
    }
    
    .form-checkbox-group {
        max-height: 150px;
    }
}

@media (max-width: 480px) {
    .announcement-card {
        padding: 0.75rem;
    }
    
    .announcement-title {
        font-size: 1rem;
    }
    
    .announcement-badges .badge {
        font-size: 0.7rem;
        padding: 0.2rem 0.5rem;
    }
    
    .new-badge {
        font-size: 0.6rem;
        padding: 0.15rem 0.4rem;
    }
}

/* Enhanced badges for announcements */
.badge.badge-urgent {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.badge.badge-event {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    border: 1px solid rgba(37, 99, 235, 0.2);
}

.badge.badge-reminder {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

/* Loading states for announcements */
.announcements-list .loading-placeholder {
    padding: 2rem;
    text-align: center;
    color: var(--text-secondary);
    background: var(--background);
    border-radius: var(--border-radius);
    border: 1px dashed var(--border);
}

/* Empty state styling */
.announcements-list .empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-secondary);
}

.announcements-list .empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

/* Animation for new announcements */
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.announcement-card[data-new="true"] {
    animation: slideInDown 0.3s ease-out;
}

/* Accessibility improvements */
.announcement-card:focus-within {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.form-checkbox input[type="checkbox"]:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .announcement-card {
        border-width: 2px;
    }
    
    .announcement-card.priority-urgent {
        border-left-width: 6px;
    }
    
    .announcement-card.priority-high {
        border-left-width: 6px;
    }
}

/* Dark mode adjustments (if you implement dark mode) */
@media (prefers-color-scheme: dark) {
    .announcement-card[data-new="true"] {
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
    }
    
    .announcement-card.priority-urgent {
        background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, var(--surface) 100%);
    }
    
    .announcement-card.priority-high {
        background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, var(--surface) 100%);
    }
}


/* Add this to your components.css file */

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* Ensure CSS variables are defined */
:root {
    --border-radius: 8px;
    --primary: #2563eb;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --surface: #ffffff;
    --background: #f8fafc;
    --border: #e2e8f0;
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --transition: all 0.2s ease-in-out;
}

/* Spinner animation */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.fa-spinner.fa-spin,
.loading-spinner {
    animation: spin 1s linear infinite;
}

/* Add these styles to your components.css */

/* Logo in login/admin login headers */
.logo-container {
    text-align: center;
    margin-bottom: 1rem;
}

.header-logo {
    max-height: 80px;
    max-width: 200px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: brightness(0) invert(1); /* Makes logo white for dark header */
    opacity: 0.9;
}

/* Logo in dashboard headers */
.dashboard-logo {
    height: 50px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    background: white;
    padding: 8px;
}

/* Responsive logo adjustments */
@media (max-width: 768px) {
    .header-logo {
        max-height: 60px;
        max-width: 150px;
    }
    
    .dashboard-logo {
        height: 40px;
        max-width: 100px;
        padding: 6px;
    }
    
    .dashboard-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .dashboard-header > div:first-child {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .header-logo {
        max-height: 50px;
        max-width: 120px;
    }
    
    .dashboard-logo {
        height: 35px;
        max-width: 80px;
        padding: 4px;
    }
}

/* Logo hover effect */
.dashboard-logo:hover {
    transform: scale(1.05);
    transition: transform 0.2s ease-in-out;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Alternative: Logo as background in card header */
.card-header-with-logo {
    position: relative;
    overflow: hidden;
}

.card-header-with-logo::before {
    content: '';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 60px;
    height: 60px;
    background: url('logo.png') no-repeat center;
    background-size: contain;
    opacity: 0.2;
    z-index: 0;
}

.card-header-with-logo > * {
    position: relative;
    z-index: 1;
}


/* Add this to your components.css file */

/* Bulk Upload Styles */
.upload-step {
    padding: 1rem 0;
}

.step-header {
    margin-bottom: 1.5rem;
    text-align: center;
}

.step-header h4 {
    color: var(--primary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.step-header p {
    color: var(--text-secondary);
    margin: 0;
}

/* File Upload Area */
.file-upload-area {
    border: 2px dashed var(--border);
    border-radius: var(--border-radius);
    padding: 3rem 2rem;
    text-align: center;
    background: var(--background);
    transition: var(--transition);
    cursor: pointer;
}

.file-upload-area:hover {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.05);
}

.file-upload-area.drag-over {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.1);
    transform: scale(1.02);
}

.file-upload-content p {
    margin: 0.5rem 0;
    color: var(--text-secondary);
}

.file-upload-content p:first-of-type {
    color: var(--text-primary);
    font-size: 1.1rem;
}

/* CSV Format Example */
.csv-format-example {
    background: var(--background);
    padding: 1rem;
    border-radius: var(--border-radius);
    margin: 1rem 0;
    font-size: 0.9rem;
}

.csv-format-example ul {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.csv-format-example code {
    background: rgba(37, 99, 235, 0.1);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.85rem;
}

/* Data Summary */
.data-summary .stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

/* Column Mapping */
.column-mapping {
    background: var(--background);
    padding: 1rem;
    border-radius: var(--border-radius);
    margin: 1rem 0;
}

.column-mapping h5 {
    margin: 0 0 0.5rem 0;
    color: var(--primary);
}

.mapping-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.mapping-control {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.mapping-control label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* Error List */
.error-list {
    max-height: 200px;
    overflow-y: auto;
}

.error-item {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 0.75rem;
    border-radius: var(--border-radius);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

/* Import Results */
.import-results .stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

/* Preview Table Enhancements */
.table-container {
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.table-container .table {
    margin: 0;
}

/* Modal Size Override for Bulk Upload */
#bulk-upload-modal .modal {
    max-width: 900px;
    width: 90vw;
}

/* Responsive Design */
@media (max-width: 768px) {
    .file-upload-area {
        padding: 2rem 1rem;
    }
    
    .data-summary .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .import-results .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .mapping-controls {
        grid-template-columns: 1fr;
    }
    
    #bulk-upload-modal .modal {
        width: 95vw;
        margin: 1rem;
    }
    
    .modal-footer {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .modal-footer .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .file-upload-area {
        padding: 1.5rem 0.5rem;
    }
    
    .step-header h4 {
        font-size: 1rem;
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .csv-format-example {
        padding: 0.75rem;
    }
    
    .csv-format-example ul {
        padding-left: 1rem;
    }
}

/* Loading States */
.upload-step.loading {
    opacity: 0.6;
    pointer-events: none;
}

.upload-step.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 32px;
    height: 32px;
    margin: -16px 0 0 -16px;
    border: 3px solid rgba(37, 99, 235, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s linear infinite;
}

/* Success States */
.upload-success {
    text-align: center;
    padding: 2rem;
    color: var(--success);
}

.upload-success i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* File Upload Animation */
@keyframes uploadPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.file-upload-area.uploading {
    animation: uploadPulse 1s ease-in-out infinite;
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.1);
}



/* Enhanced Member List with Payment Info */
.enhanced-member-list {
    list-style: none;
    padding: 0;
    margin: 0;
    background: var(--background);
    border-radius: var(--border-radius);
    border: 1px solid var(--border);
    overflow: hidden;
}

.enhanced-member-list li:last-child {
    border-bottom: none !important;
}

/* Group Financial Summary Cards */
.group-financial-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.financial-metric {
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    padding: 1rem;
    text-align: center;
}

.financial-metric-value {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.financial-metric-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Payment status indicators */
.payment-status-paid {
    color: var(--success);
}

.payment-status-pending {
    color: var(--warning);
}

.payment-status-overdue {
    color: var(--error);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .enhanced-member-list li {
        flex-direction: column;
        align-items: stretch !important;
        gap: 0.5rem;
    }
    
    .enhanced-member-list li > div:last-child {
        text-align: left !important;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .group-financial-summary {
        grid-template-columns: 1fr;
    }
}

/* Email Management Styles */
.email-management-container {
    padding: 1rem;
}

.email-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.email-address {
    font-size: 0.9rem;
    color: var(--text-primary);
}

.no-email {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-style: italic;
}

.email-status {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.action-buttons {
    display: flex;
    gap: 0.25rem;
    align-items: center;
    flex-wrap: wrap;
}

.action-buttons .btn {
    min-width: 32px;
}

@media (max-width: 768px) {
    .action-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .action-buttons .btn {
        width: 100%;
        justify-content: center;
    }
}

.stat-card {
    background: var(--surface);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
    border-left: 4px solid var(--primary);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(102, 126, 234, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.email-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.action-card {
    background: var(--surface);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.action-header h4 {
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
}

.action-header p {
    color: var(--text-secondary);
    margin: 0 0 1rem 0;
    font-size: 0.9rem;
}

.action-body ul {
    margin: 0 0 1rem 0;
    padding-left: 1.2rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.action-body li {
    margin-bottom: 0.25rem;
}

/* Responsive adjustments for email features */
@media (max-width: 768px) {
    .email-actions-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
    }
    
    .stat-icon {
        margin-bottom: 0.5rem;
    }
}