/* Authentication Styles */

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

.modal-content {
    background-color: #ffffff;
    margin: 5% auto;
    padding: 0;
    border: none;
    border-radius: 16px;
    width: 90%;
    max-width: 440px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s ease-out;
    position: relative;
    z-index: 1001;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 32px 32px 0 32px;
}

.modal-header h2 {
    margin: 0;
    color: var(--dark-blue);
    font-size: 1.75rem;
    font-weight: 600;
}

.close {
    color: var(--text-light);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.close:hover,
.close:focus {
    color: var(--dark-blue);
    background-color: var(--light-gray);
}

.modal-body {
    padding: 32px;
}

/* Social Login Buttons */
.social-login {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: #ffffff;
    color: #333333;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.social-btn:hover {
    border-color: var(--primary-color);
    background-color: var(--light-gray);
    transform: translateY(-1px);
}

.google-btn:hover {
    border-color: #4285F4;
}

.facebook-btn:hover {
    border-color: #1877F2;
}

.apple-btn:hover {
    border-color: #000;
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
    color: var(--text-light);
    font-size: 0.9rem;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--light-gray);
}

.divider span {
    padding: 0 16px;
}

/* Auth Form */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 6px;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input {
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: #ffffff;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.form-group input:invalid {
    border-color: #f44336;
}

.name-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.name-field {
    display: flex;
    flex-direction: column;
}

.password-requirements {
    margin-top: 4px;
}

.password-requirements small {
    color: var(--text-light);
    font-size: 0.8rem;
}

.auth-submit-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    border: none;
    padding: 16px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 8px;
}

.auth-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.3);
}

.auth-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Auth Switch */
.auth-switch {
    text-align: center;
    margin-top: 24px;
}

.auth-switch p {
    color: var(--text-light);
    font-size: 0.9rem;
}

.auth-switch a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.auth-switch a:hover {
    text-decoration: underline;
}

.forgot-password {
    text-align: center;
    margin-top: 16px;
}

.forgot-password a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.85rem;
}

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

/* Loading State */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    color: var(--text-light);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--light-gray);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

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

/* Auth Required State */
.auth-required {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-required .hero-section {
    text-align: center;
    padding: 80px 0;
}

.auth-required .hero-content h1 {
    font-size: 2.5rem;
    margin-bottom: 16px;
    color: var(--dark-blue);
}

.auth-required .hero-content p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 32px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* Member Content */
.member-content {
    padding-top: 80px;
}

.welcome-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    padding: 60px 0;
}

.welcome-section .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
}

.welcome-content h1 {
    font-size: 2.2rem;
    margin-bottom: 8px;
}

.welcome-content p {
    font-size: 1.1rem;
    opacity: 0.9;
}

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

.profile-btn,
.logout-btn {
    padding: 12px 24px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: transparent;
    color: var(--white);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.profile-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Dashboard */
.dashboard-section {
    padding: 60px 0;
    background: var(--light-gray);
}

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

.dashboard-card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dashboard-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.card-header {
    padding: 24px 24px 0 24px;
}

.card-header h3 {
    margin: 0;
    color: var(--dark-blue);
    font-size: 1.2rem;
    font-weight: 600;
}

.card-content {
    padding: 16px 24px 24px 24px;
}

/* Status Items */
.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--light-gray);
}

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

.status-label {
    color: var(--text-dark);
    font-weight: 500;
}

.status-value {
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
}

.status-value.open {
    background: rgba(76, 175, 80, 0.1);
    color: var(--primary-color);
}

.status-value.pending {
    background: rgba(255, 193, 7, 0.1);
    color: #f57c00;
}

/* Action Buttons */
.action-btn {
    display: block;
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 8px;
    border: 2px solid var(--light-gray);
    border-radius: 8px;
    background: var(--white);
    color: var(--text-dark);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.action-btn:hover {
    border-color: var(--primary-color);
    background: rgba(76, 175, 80, 0.05);
    transform: translateX(4px);
}

.action-btn.primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    border-color: transparent;
}

.action-btn.primary:hover {
    transform: translateX(4px) translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.3);
    background: linear-gradient(135deg, #66bb6a, #81c784);
}

/* Update Items */
.update-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--light-gray);
}

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

.update-date {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 4px;
}

.update-text {
    color: var(--text-dark);
    line-height: 1.4;
}

/* Responsive Design */
@media (max-width: 768px) {
    .modal-content {
        margin: 10% auto;
        width: 95%;
    }
    
    .modal-header,
    .modal-body {
        padding: 24px;
    }
    
    .modal-header h2 {
        font-size: 1.5rem;
    }
    
    .name-row {
        grid-template-columns: 1fr;
    }
    
    .welcome-section .container {
        flex-direction: column;
        text-align: center;
    }
    
    .welcome-content h1 {
        font-size: 1.8rem;
    }
    
    .member-actions {
        justify-content: center;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .auth-required .hero-content h1 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .social-btn {
        font-size: 0.9rem;
        padding: 12px 14px;
    }
    
    .social-btn svg {
        width: 18px;
        height: 18px;
    }
}
