/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #2E7D32 0%, #66BB6A 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

/* Header */
.site-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    padding-top: 10px;
    border-bottom: 3px solid #2E7D32;
    position: relative;
    min-height: 80px; /* Ensure space for user info */
}

.site-header h1 {
    color: #2E7D32;
    font-size: 2.2em; /* Reduced from 2.5em */
    margin-bottom: 8px;
    margin-top: 10px;
    padding-right: 200px; /* Space for user info on right */
}

.site-header h2 {
    color: #555;
    font-size: 1.2em; /* Reduced from 1.3em */
    font-weight: normal;
    padding-right: 200px; /* Space for user info on right */
}

.user-info {
    position: absolute;
    top: 10px;
    right: 0;
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.9em;
}

.user-info span {
    color: #555;
    white-space: nowrap;
}

/* Navigation */
.admin-nav, .member-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    background: #f8f9fa;
    padding: 10px;
    border-radius: 8px;
}

.admin-nav a, .member-nav a {
    padding: 10px 20px;
    text-decoration: none;
    color: #555;
    border-radius: 6px;
    transition: all 0.3s;
}

.admin-nav a:hover, .member-nav a:hover {
    background: #e0e0e0;
}

.admin-nav a.active, .member-nav a.active {
    background: #2E7D32;
    color: white;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

.input-field {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s;
    font-family: inherit;
}

.input-field:focus {
    outline: none;
    border-color: #2E7D32;
}

textarea.input-field {
    resize: vertical;
}

.radio-group {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
}

.checkbox-group label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    margin-top: 4px;
    width: 18px;
    height: 18px;
}

.error-text {
    color: #dc3545;
    font-size: 0.9em;
    margin-top: 5px;
    display: block;
}

.signature-field {
    font-family: 'Brush Script MT', cursive, serif;
    font-size: 1.2em;
}

.signature-display {
    font-family: 'Brush Script MT', cursive, serif;
    font-size: 1.2em;
    font-style: italic;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
}

.btn-small {
    padding: 6px 12px;
    font-size: 14px;
}

.btn-block {
    width: 100%;
    display: block;
}

.btn-primary {
    background: #2E7D32;
    color: white;
}

.btn-primary:hover {
    background: #1B5E20;
    transform: translateY(-2px);
}

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

.btn-secondary:hover {
    background: #5a6268;
}

.btn-info {
    background: #17a2b8;
    color: white;
}

.btn-info:hover {
    background: #138496;
}

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

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

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

.btn-delete:hover {
    background: #c82333;
}

.button-group {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

/* Alerts */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 6px;
    font-weight: 500;
}

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

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

/* Cards */
.action-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.card {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

.card h4 {
    color: #2E7D32;
    margin-bottom: 10px;
    font-size: 1.2em;
}

.card p {
    color: #666;
    margin-bottom: 15px;
}

/* Dashboard Stats */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.stat-card {
    background: linear-gradient(135deg, #2E7D32 0%, #43A047 100%);
    color: white;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
}

.stat-card.stat-success {
    background: linear-gradient(135deg, #28a745 0%, #34ce57 100%);
}

.stat-card.stat-warning {
    background: linear-gradient(135deg, #ffc107 0%, #ffb300 100%);
}

.stat-card h3 {
    font-size: 3em;
    margin-bottom: 10px;
}

.stat-card p {
    font-size: 1.1em;
    opacity: 0.9;
}

/* Tables */
.members-table {
    overflow-x: auto;
    margin-top: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

thead {
    background: #2E7D32;
    color: white;
}

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

th {
    font-weight: 600;
}

tbody tr:hover {
    background: #f8f9fa;
}

.action-buttons {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.details-table {
    width: 100%;
}

.details-table th {
    background: #f8f9fa;
    color: #333;
    font-weight: 600;
    width: 40%;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 600;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.badge-error {
    background: #f8d7da;
    color: #721c24;
}

/* Login Page */
.login-container {
    max-width: 400px;
    margin: 40px auto;
}

.login-form {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
}

.login-help {
    margin-top: 20px;
    text-align: center;
}

.login-help a {
    color: #2E7D32;
    text-decoration: none;
}

.login-help a:hover {
    text-decoration: underline;
}

/* OTP Page Styles */
.otp-info {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.otp-info h3 {
    color: #2E7D32;
    margin-bottom: 10px;
}

.otp-input {
    text-align: center;
    font-size: 24px;
    letter-spacing: 8px;
    font-weight: bold;
}

.otp-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.security-note {
    margin-top: 30px;
    padding: 15px;
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    border-radius: 4px;
}

.info-box {
    background: #e7f3ff;
    border-left: 4px solid #2196F3;
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
}

.info-box p {
    margin: 5px 0;
}

/* Registration Page */
.registration-container {
    max-width: 700px;
    margin: 0 auto;
}

.registration-form {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
}

.registration-form h3 {
    color: #2E7D32;
    margin-top: 30px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
}

.registration-form h3:first-of-type {
    margin-top: 0;
}

/* Constitution Page */
.constitution-page {
    max-width: 900px;
    margin: 0 auto;
}

.constitution-actions {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
}

.constitution-content {
    background: #f8f9fa;
    padding: 40px;
    border-radius: 8px;
    line-height: 1.8;
}

.constitution-content section {
    margin-bottom: 30px;
}

.constitution-content h3 {
    color: #2E7D32;
    margin-bottom: 15px;
}

.constitution-content ul {
    margin-left: 30px;
    margin-top: 10px;
}

.constitution-content li {
    margin-bottom: 10px;
}

/* Member Details */
.member-details-container {
    margin-top: 20px;
}

.details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.detail-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
}

.detail-section h3 {
    color: #2E7D32;
    margin-bottom: 15px;
}

.status-form {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.status-form label {
    font-weight: 600;
}

.status-form select {
    flex: 1;
    min-width: 200px;
}

/* Utility Classes */
.text-muted {
    color: #6c757d;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 1.1em;
}

.info-section {
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.info-section h3 {
    color: #2E7D32;
    margin-bottom: 15px;
}

.info-section ul {
    list-style-position: inside;
    line-height: 1.8;
}

.welcome-section {
    text-align: center;
    margin-bottom: 30px;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 8px;
}

.welcome-section h3 {
    color: #2E7D32;
    margin-bottom: 15px;
}

/* Footer */
.site-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px solid #e0e0e0;
    text-align: center;
    color: #666;
}

/* Print Styles for Constitution */
@media print {
    body {
        background: white;
        padding: 0;
    }
    
    .container {
        box-shadow: none;
    }
    
    .constitution-actions, .site-footer, .user-info {
        display: none;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    .site-header h1 {
        font-size: 2em;
    }

    .user-info {
        position: static;
        justify-content: center;
        margin-top: 15px;
    }

    .details-grid {
        grid-template-columns: 1fr;
    }

    .action-cards {
        grid-template-columns: 1fr;
    }

    .dashboard-stats {
        grid-template-columns: 1fr;
    }

    .details-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .members-table {
        font-size: 14px;
    }

    th, td {
        padding: 8px 4px;
    }

    .action-buttons {
        flex-direction: column;
    }

    .admin-nav, .member-nav {
        flex-wrap: wrap;
    }

    .constitution-actions {
        flex-direction: column;
        gap: 10px;
    }
}

/* Password Change Page */
.password-change-container {
    max-width: 600px;
    margin: 40px auto;
}

.password-form {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
}

.password-requirements {
    background: #e7f3ff;
    border-left: 4px solid #2196F3;
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
}

.password-requirements h4 {
    margin-top: 0;
    color: #2196F3;
}

.password-requirements ul {
    margin: 10px 0;
    padding-left: 20px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.security-tips {
    margin-top: 30px;
    padding: 20px;
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    border-radius: 4px;
}

.security-tips h3 {
    margin-top: 0;
    color: #856404;
}

.security-tips ul {
    padding-left: 20px;
}

/* Members Directory */
.directory-container {
    margin: 40px 0;
}

.directory-header {
    text-align: center;
    margin-bottom: 30px;
}

.privacy-notice {
    background: #e7f3ff;
    border-left: 4px solid #2196F3;
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
}

.members-directory-table {
    margin: 30px 0;
    overflow-x: auto;
}

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

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

.members-directory-table th {
    background-color: #2E7D32;
    color: white;
    font-weight: bold;
}

.members-directory-table tr:hover {
    background-color: #f5f5f5;
}

.directory-footer {
    text-align: center;
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

/* Member Navigation */
.member-nav {
    background: #2E7D32;
    padding: 10px 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.member-nav a {
    color: white;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 4px;
    transition: background 0.3s;
}

.member-nav a:hover,
.member-nav a.active {
    background: rgba(255, 255, 255, 0.2);
}

/* Responsive header for smaller screens */
@media (max-width: 768px) {
    .site-header {
        padding-top: 50px; /* More space on mobile */
    }
    
    .site-header h1 {
        font-size: 1.8em;
        padding-right: 0;
    }
    
    .site-header h2 {
        font-size: 1em;
        padding-right: 0;
    }
    
    .user-info {
        top: 5px;
        right: 5px;
        font-size: 0.85em;
        flex-direction: column;
        align-items: flex-end;
        gap: 5px;
    }
}

@media (max-width: 480px) {
    .site-header h1 {
        font-size: 1.5em;
    }
    
    .user-info {
        position: static;
        justify-content: center;
        margin-bottom: 10px;
        padding: 10px;
        background: #f8f9fa;
        border-radius: 8px;
    }
}

/* Account Actions */
.account-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.account-actions .btn {
    flex: 0 0 auto;
}

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

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

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

.btn-error:hover {
    background: #c82333;
}

/* Admin username styling */
.admin-username {
    color: #dc3545 !important;
}

/* Badge for admin role */
.badge-admin {
    background-color: #dc3545;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: bold;
}

/* Pinned Notices Section on Homepage */
.pinned-notices-section {
    margin-bottom: 40px;
}

.pinned-section-header {
    text-align: center;
    margin-bottom: 30px;
}

.pinned-section-header h2 {
    color: #2c5f2d;
    font-size: 2rem;
    margin-bottom: 8px;
}

.pinned-section-header p {
    color: #6b7280;
    font-size: 1.1rem;
}

.pinned-notice-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.pinned-notice-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.notice-banner-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.notice-badge {
    background: rgba(255, 255, 255, 0.3);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.notice-date {
    font-size: 0.9rem;
    opacity: 0.9;
}

.notice-banner-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 15px 0;
    color: white;
}

.notice-banner-content {
    font-size: 1.1rem;
    line-height: 1.7;
    margin: 0 0 15px 0;
    opacity: 0.95;
    white-space: pre-wrap;
}

.notice-banner-footer {
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.notice-author {
    font-size: 0.95rem;
    opacity: 0.9;
}

.login-prompt {
    background: #f0f9ff;
    border: 2px solid #0ea5e9;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    margin-top: 30px;
}

.login-prompt p {
    margin: 0 0 15px 0;
    font-size: 1.1rem;
    color: #334155;
}

.login-prompt .btn {
    font-size: 1rem;
}

/* Beta Banner Styles */
.beta-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.beta-content {
    display: flex;
    align-items: center;
    gap: 15px;
    max-width: 1200px;
    margin: 0 auto;
}

.beta-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.beta-text {
    flex-grow: 1;
    line-height: 1.5;
}

.beta-close {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    flex-shrink: 0;
}

.beta-close:hover {
    background: rgba(255,255,255,0.3);
}