/* Cooperative Management Public Styles */
.coop-dashboard,
.coop-loan-application,
.coop-contribution-history,
.coop-registration-form,
.coop-login-form {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Welcome Section */
.coop-welcome {
    background: linear-gradient(135deg, #4B9C56 0%, #3a7a44 100%);
    color: white;
    padding: 40px;
    border-radius: 15px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.coop-welcome-text {
    flex-grow: 1;
    order: 1;
    text-align: left;
}

.coop-welcome h1 {
    margin: 0 0 10px 0;
    font-size: 2.5em;
    font-weight: 700;
}

.coop-welcome p {
    margin: 0 0 20px 0;
    font-size: 1.2em;
    opacity: 0.9;
}

.coop-member-contact-card {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.coop-membership-info {
    background: rgba(255,255,255,0.2);
    padding: 15px;
    border-radius: 8px;
    display: block;
    font-weight: 400;
    margin-top: 20px;
}

.coop-avatar {
    width: 150px;
    height: 150px;
    min-width: 150px;
    border-radius: 50%;
    overflow: hidden;
    margin-left: 40px;
    order: 2;
    aspect-ratio: 1 / 1;
}

.coop-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    background-color: #ccc;
    border-radius: 50%;
}

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

.coop-stat-box {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-top: 4px solid #4B9C56;
}

.coop-stat-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.coop-stat-value {
    font-size: 2.2em;
    font-weight: bold;
    color: #4B9C56;
    line-height: 1;
    margin-bottom: 8px;
}

.coop-stat-value.small-text {
    font-size: 1.2rem;
}

.coop-stat-label {
    color: #666;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* Dashboard Actions */
.coop-dashboard-actions {
    display: flex;
    gap: 15px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.coop-btn {
    background: #4B9C56;
    color: white;
    padding: 8px 15px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    text-decoration: none;
    display: inline-block;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
}

.coop-btn:hover {
    background: #3a7a44;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(75, 156, 86, 0.3);
}

.coop-btn-large {
    padding: 9px 20px;
    font-size: 18px;
}

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

.coop-btn-secondary:hover {
    background: #545b62;
}

/* Sections */
.coop-dashboard-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.coop-section {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.coop-section h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #1d2327;
    font-size: 1.4em;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

/* Center the main registration/login title */
.coop-registration-form h2,
.coop-login-form h2 {
    text-align: center !important;
}

/* Forms */
.coop-form {
    background: transparent;
    padding: 0;
    box-shadow: none;
    margin: 30px 0;
}

.coop-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.coop-form-group {
    margin-bottom: 20px;
}

.coop-form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 0.9em;
}

.coop-form-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #dcdcdc;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #fff;
}

.coop-form-input:focus {
    outline: none;
    border-color: #2271b1;
    background: white;
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.1);
}

.coop-form-input.coop-input-error {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

/* Password Visibility Icon */
.coop-password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.coop-password-wrapper .coop-form-input {
    padding-right: 40px; /* Make space for the icon */
}

.coop-password-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    width: 20px;
    height: 20px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"></path><circle cx="12" cy="12" r="3"></circle></svg>');
    background-repeat: no-repeat;
    background-size: contain;
    opacity: 0.6;
transition: opacity 0.3s;
}

.coop-password-icon:hover {
    opacity: 1;
}

.coop-password-icon.toggled {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07l-5 5M1 1l22 22"></path></svg>');
}

.coop-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-weight: normal;
    cursor: pointer;
    word-break: break-word;
}

.coop-checkbox-label input[type="checkbox"] {
    margin-top: 3px;
}

.coop-form-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
    text-align: center;
    color: #666;
}

/* Tables */
.coop-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

.coop-table .coop-status {
    white-space: nowrap;
}

.coop-table.loan-applications-table td {
    font-size: 0.9em;
}

.coop-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #1d2327;
}

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

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

/* Status Labels */
.coop-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-pending { 
    background-color: #fff3cd; 
    color: #856404; 
}
.status-approved { 
    background-color: #d1edff; 
    color: #004085; 
}
.status-active { 
    background-color: #d4edda; 
    color: #155724;
}
.status-completed { 
    background-color: #d1e7dd; 
    color: #0f5132; 
}
.status-rejected { 
    background-color: #f8d7da; 
    color: #721c24; 
}

/* Alerts */
.coop-alert {
    padding: 25px;
    border-radius: 12px;
    margin: 25px 0;
    border-left: 5px solid;
}

.coop-alert-success {
    background: #d4edda;
    color: #155724;
    border-left-color: #28a745;
}

.coop-alert-error {
    background: #f8d7da;
    color: #721c24;
    border-left-color: #dc3545;
}

.coop-alert h3 {
    margin-top: 0;
    margin-bottom: 10px;
}

/* Loan Preview */
.coop-loan-preview {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    margin: 25px 0;
    border: 2px dashed #dee2e6;
}

.coop-loan-preview h4 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #1d2327;
}

.coop-preview-details {
    display: grid;
    gap: 12px;
}

.coop-preview-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.coop-preview-item:last-child {
    border-bottom: none;
}

.coop-preview-total {
    font-weight: bold;
    font-size: 1.1em;
    color: #1d2327;
    border-top: 2px solid #dee2e6;
    margin-top: 10px;
    padding-top: 15px;
}

/* Contribution Summary */
.coop-contribution-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.coop-summary-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    text-align: center;
}

.coop-summary-card h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #666;
    font-size: 1em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.coop-summary-amount {
    font-size: 1.8em;
    font-weight: bold;
    color: #2271b1;
}

/* Registration Intro */
.coop-registration-intro,
.coop-login-intro {
    text-align: center;
    font-size: 1em;
    color: #666;
    margin-bottom: 30px;
    line-height: 1.6;
}

.coop-form-card {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.coop-form-card h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.2em;
    color: #4B9C56;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.coop-form-section-description {
    font-size: 0.95em;
    color: #666;
    margin-bottom: 20px;
}

/* No Data State */
.coop-no-data {
    text-align: center;
    padding: 60px 40px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    color: #666;
}

.coop-no-data h3 {
    margin-top: 0;
    color: #999;
}

/* View All Link */
.coop-view-all {
    display: inline-block;
    margin-top: 15px;
    color: #2271b1;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.coop-view-all:hover {
    color: #135e96;
    text-decoration: underline;
}

/* Login Required */
.coop-login-required,
.coop-membership-pending {
    text-align: center;
    padding: 60px 40px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    margin: 40px 0;
}

.coop-login-required h3,
.coop-membership-pending h3 {
    margin-top: 0;
    color: #1d2327;
}

/* Responsive Design */
@media (max-width: 768px) {
    .coop-dashboard,
    .coop-loan-application,
    .coop-contribution-history,
    .coop-registration-form,
    .coop-login-form {
        padding: 15px;
    }
    
    .coop-welcome {
        padding: 30px 20px;
        flex-direction: column;
        text-align: center;
    }

    .coop-welcome-text {
        order: 2;
    }

    .coop-avatar {
        width: 75px;
        height: 75px;
        margin: 0 auto 20px;
        order: 1;
        aspect-ratio: 1 / 1;
    }
    
    .coop-welcome h1 {
        font-size: 2em;
    }
    
    .coop-stats-grid {
        grid-template-columns: 1fr;
    }

    .coop-stat-value {
        font-size: 1.8em;
    }
    
    .coop-dashboard-sections {
        grid-template-columns: 1fr;
    }
    
    .coop-dashboard-actions {
        flex-direction: column;
    }
    
    .coop-form-row {
        grid-template-columns: 1fr;
    }
    
    .coop-form-card {
        padding: 25px;
    }
    
    .coop-contribution-summary {
        grid-template-columns: 1fr;
    }
    
    .coop-table {
        font-size: 0.9em;
    }
    
    .coop-table th,
    .coop-table td {
        padding: 10px 8px;
        word-break: break-word;
    }
}

/* Print Styles */
@media print {
    .coop-dashboard-actions,
    .coop-btn {
        display: none !important;
    }
    
    .coop-section {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
    
    .coop-table {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}