/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Landing Page Styles */
.landing-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.landing-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem 0;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.logo {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.tagline {
    font-size: 1.2rem;
    opacity: 0.9;
}

.landing-main {
    flex: 1;
}

.hero-section {
    background: white;
    padding: 4rem 0;
    text-align: center;
}

.hero-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #667eea;
}

.hero-description {
    font-size: 1.2rem;
    color: #666;
    max-width: 800px;
    margin: 0 auto 2rem;
    line-height: 1.8;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background-color: #667eea;
    color: white;
}

.btn-primary:hover {
    background-color: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
    transform: translateY(-2px);
}

.about-section,
.mission-section {
    background: #f8f9fa;
    padding: 3rem 0;
    margin-top: 2rem;
}

.about-section h2,
.mission-section h2 {
    text-align: center;
    color: #667eea;
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

.about-section p,
.mission-section p {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.1rem;
    color: #555;
    line-height: 1.8;
}

.landing-footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 1.5rem 0;
    margin-top: auto;
}

.landing-footer p {
    margin: 0;
}

/* Login Page Styles */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

/* Login Footer */
.login-footer {
    background-color: rgba(0, 0, 0, 0.3);
    color: white;
    text-align: center;
    padding: 1rem 0;
}

.login-footer p {
    margin: 0;
    font-size: 0.9rem;
}

.login-box {
    background: white;
    padding: 2.5rem;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
}

.login-box h2 {
    text-align: center;
    color: #667eea;
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

.login-box .logo {
    text-align: center;
    color: #667eea;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.btn-full {
    width: 100%;
    padding: 12px;
    margin-top: 1rem;
}

.alert {
    padding: 12px;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Dashboard Styles */
.dashboard-container {
    min-height: 100vh;
    background-color: #f5f5f5;
    display: flex;
    flex-direction: column;
}

.dashboard-header {
    /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); */
    background: linear-gradient(135deg, #ff87b3 0%, #764ba2 100%);
    color: white;
    /* padding: 1rem 0; */
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Dashboard Header Navigation Styles */
.topnav {
    padding: 6px 0;
}

.brand-and-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.brand-and-toggle h1 {
    font-size: 1.5rem;
    margin: 0;
}

.nav-toggle {
    display: none;
    background: none;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 0.95rem;
    cursor: pointer;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.nav-menu .welcome {
    margin-right: 6px;
    color: #333;
    font-size: 0.85rem;
}

.nav-menu .btn {
    padding: 3px 6px;
    font-size: 0.8rem;
}

@media (max-width: 768px) {
    .nav-toggle {
        display: inline-block;
    }
    
    .nav-menu {
        display: none;
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        padding-top: 8px;
    }
    
    .nav-menu.open {
        display: flex;
    }
}

.dashboard-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dashboard-nav h1 {
    font-size: 1.5rem;
}

.dashboard-nav .user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.dashboard-nav .btn {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.dashboard-content {
    padding: 0.5rem 0;
    flex: 1;
}

/* Dashboard Footer */
.dashboard-footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 0.25rem 0;
    margin-top: auto;
}

.dashboard-footer p {
    margin: 0;
    font-size: 0.9rem;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.profile-container ~ .page-header {
    margin-bottom: 1rem;
}

.page-header h2 {
    color: #333;
    font-size: 2rem;
}

/* Table Styles */
.table-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow-x: auto;
}

/* Apply no-wrap to all tables across the codebase */
table th,
table td {
    white-space: nowrap;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table thead {
    background-color: #667eea;
    color: white;
}

.table th,
.table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.875rem;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
}

.btn-edit {
    background-color: #28a745;
    color: white;
}

.btn-edit:hover {
    background-color: #218838;
}

.btn-warning {
    background-color: #ffc107;
    color: #000;
}

.btn-warning:hover {
    background-color: #e0a800;
}

.btn-success {
    background-color: #28a745;
    color: white;
}

.btn-success:hover {
    background-color: #218838;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-active {
    background-color: #d4edda;
    color: #155724;
}

.status-inactive {
    background-color: #f8d7da;
    color: #721c24;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    overflow-y: auto;
}

.modal-content {
    background-color: white;
    margin: 2% auto;
    padding: 2rem;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

/* Compact Password Modal */
.password-modal {
    padding: 1.25rem;
    max-width: 500px;
}

.password-modal .modal-header {
    margin-bottom: 1rem;
}

.password-modal .modal-header h3 {
    font-size: 1.25rem;
}

.password-modal .form-group {
    margin-bottom: 0.75rem;
}

.password-modal .form-group label {
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
}

.password-modal .form-group input {
    padding: 8px 12px;
    font-size: 0.95rem;
}

.password-modal .form-row {
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

/* Compact Member Modal */
.member-modal {
    padding: 1.25rem;
    max-width: 650px;
}

.member-modal .modal-header {
    margin-bottom: 1rem;
}

.member-modal .modal-header h3 {
    font-size: 1.25rem;
}

.member-modal .form-group {
    margin-bottom: 0.75rem;
}

.member-modal .form-group label {
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
}

.member-modal .form-group input,
.member-modal .form-group select,
.member-modal .form-group textarea {
    padding: 8px 12px;
    font-size: 0.95rem;
}

.member-modal .form-group textarea {
    padding: 8px 12px;
}

.member-modal .form-row {
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.member-modal .photo-preview {
    max-width: 120px;
    max-height: 120px;
    margin-top: 8px;
}

/* Compact Donation Modal */
.donation-modal {
    padding: 1.25rem;
    max-width: 550px;
}

.donation-modal .modal-header {
    margin-bottom: 1rem;
}

.donation-modal .modal-header h3 {
    font-size: 1.25rem;
}

.donation-modal .form-group {
    margin-bottom: 0.75rem;
}

.donation-modal .form-group label {
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
}

.donation-modal .form-group input,
.donation-modal .form-group select {
    padding: 8px 12px;
    font-size: 0.95rem;
}

.donation-modal .form-row {
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.donation-modal #sms_message {
    font-family: 'Segoe UI', 'Nirmala UI', 'Kalpurush', Arial, sans-serif;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.donation-modal .btn-sm {
    min-width: 40px;
}

#smsCharCount {
    font-weight: 500;
    white-space: nowrap;
}

/* View Member Modal Styles */
#memberDetails {
    max-height: 70vh;
    overflow-y: auto;
}

#memberDetails strong {
    font-weight: 600;
    color: #667eea;
}

#memberDetails span:not(.status-badge) {
    color: #333;
    word-break: break-word;
}

#memberDetails img {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Member Details Responsive Layout */
.member-details-wrapper {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.member-photo-container {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.member-info-container {
    flex: 1;
}

@media (max-width: 768px) {
    .member-details-wrapper {
        flex-direction: column;
    }
    
    .member-photo-container {
        align-self: center;
        margin-bottom: 1rem;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-header h3 {
    color: #667eea;
    font-size: 1.5rem;
}

.close {
    font-size: 2rem;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    border: none;
    background: none;
}

.close:hover {
    color: #000;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
}

.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    background-color: white;
}

.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.photo-preview {
    max-width: 150px;
    max-height: 150px;
    border-radius: 8px;
    margin-top: 10px;
    object-fit: cover;
}

/* Profile Styles */
.profile-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.profile-section {
    padding-bottom: 0;
    margin-bottom: 0;
    border-bottom: none;
}

.profile-section h3 {
    color: #667eea;
    margin-bottom: 1rem;
    font-size: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #667eea;
}

.profile-section .form-group {
    margin-bottom: 0.75rem;
}

.profile-section .form-group label {
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
}

.profile-section .form-group input {
    padding: 8px 12px;
    font-size: 0.95rem;
}

.profile-section small {
    font-size: 0.75rem;
}

.profile-section .form-row {
    gap: 1rem;
    margin-bottom: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .table {
        font-size: 0.875rem;
    }
    
    .modal-content {
        width: 95%;
        padding: 1.5rem;
    }
    
    .dashboard-nav .user-info {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .profile-container {
        padding: 1.5rem;
    }
}

