/* Profile Page Professional Styles */

/* Profile Page Variables */
:root {
    --profile-primary: #16a34a;
    --profile-primary-dark: #15803d;
    --profile-primary-light: #22c55e;
    --profile-light-green: #dcfce7;
    --profile-bg: #f8faf9;
    --profile-white: #ffffff;
    --profile-text: #1f2937;
    --profile-text-secondary: #6b7280;
    --profile-text-muted: #9ca3af;
    --profile-border: #e5e7eb;
    --profile-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --profile-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --profile-radius: 0.75rem;
    --profile-radius-lg: 1rem;
}

/* Profile Page Base */
.profile-page {
    min-height: 100vh;
    background: var(--profile-bg);
    padding-bottom: 80px;
}

/* Cover Image */
.profile-cover {
    height: 180px;
    background: linear-gradient(135deg, var(--profile-primary) 0%, var(--profile-primary-dark) 100%);
    position: relative;
}

.cover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* Profile Header */
.profile-header {
    margin-top: 40px;
    position: relative;
    z-index: 10;
    padding-bottom: 2rem;
}

.profile-header-content {
    display: flex;
    align-items: flex-end;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.profile-avatar-section {
    flex-shrink: 0;
}

.profile-avatar {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid var(--profile-white);
    box-shadow: var(--profile-shadow-lg);
    background: var(--profile-white);
    overflow: hidden;
}

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

.avatar-edit-btn {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--profile-primary);
    color: white;
    border: 2px solid var(--profile-white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 1s ease;
}

.avatar-edit-btn:hover {
    background: var(--profile-primary-dark);
    transform: scale(1.1);
}

.profile-info {
    flex: 1;
    min-width: 200px;
    padding-bottom: 8px;
}

.profile-name-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.profile-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--profile-text);
    margin: 0;
}

.profile-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: var(--profile-light-green);
    color: var(--profile-primary-dark);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.profile-badge i {
    font-size: 0.65rem;
}

.profile-email,
.profile-phone {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--profile-text-secondary);
    font-size: 0.875rem;
    margin: 0.25rem 0;
}

.profile-email i,
.profile-phone i {
    color: var(--profile-primary);
    width: 16px;
}

.profile-actions {
    margin-left: auto;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: var(--profile-radius);
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-outline-primary {
    background: var(--profile-white);
    color: var(--profile-primary);
    border: 2px solid var(--profile-primary);
}

.btn-outline-primary:hover {
    background: var(--profile-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--profile-shadow);
}

/* Profile Completeness */
.profile-completeness-card {
    background: var(--profile-white);
    border-radius: var(--profile-radius-lg);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--profile-shadow);
}

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

.completeness-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--profile-text);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.completeness-header h3 i {
    color: var(--profile-primary);
}

.completeness-percentage {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--profile-primary);
}

.completeness-bar {
    height: 8px;
    background: var(--profile-border);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.completeness-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--profile-primary) 0%, var(--profile-primary-light) 100%);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.completeness-hint {
    font-size: 0.75rem;
    color: var(--profile-text-muted);
    margin: 0;
}

/* Content Grid - Desktop/Tablet View (bukan Mobile) */
/* Force desktop view by default */
.profile-content-grid {
    display: grid !important;
    grid-template-columns: 380px 1fr !important;
    gap: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* Tablet view */
@media (max-width: 1023px) {
    .profile-content-grid {
        grid-template-columns: 1fr 1fr !important;
    }
}

/* Mobile view - only for very small screens */
@media (max-width: 480px) {
    .profile-content-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Profile Left Column */
.profile-left-column {
    display: flex;
    flex-direction: column;
}

.profile-left-column .profile-completeness-card {
    width: 100%;
}

/* Profile Right Column - Force desktop view */
.profile-right-column {
    width: 100% !important;
    display: flex !important;
    flex-direction: column;
    grid-column: span 1 !important;
}

.profile-right-column .profile-card {
    margin-bottom: 0 !important;
    width: 100% !important;
}

@media (max-width: 1023px) {
    .profile-right-column {
        grid-column: span 1 !important;
    }
}

@media (max-width: 480px) {
    .profile-right-column {
        grid-column: span 1 !important;
        width: 100% !important;
    }
}

/* Profile Page Container - Force desktop/web view */
.profile-page {
    min-height: 100vh;
    background: var(--profile-bg);
    padding-bottom: 80px;
    max-width: 1400px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

@media (max-width: 768px) {
    .profile-page {
        padding-bottom: 100px;
    }
}

/* Profile Card Base */
.profile-card {
    background: var(--profile-white);
    border-radius: var(--profile-radius-lg);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--profile-shadow);
    transition: all 0.3s ease;
}

.profile-card:hover {
    box-shadow: var(--profile-shadow-lg);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--profile-border);
}

.card-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--profile-text);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-header h3 i {
    color: var(--profile-primary);
}

.view-all-link {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--profile-primary);
    text-decoration: none;
    transition: color 0.2s;
}

.view-all-link:hover {
    color: var(--profile-primary-dark);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.stat-box {
    text-align: center;
    padding: 1rem 0.5rem;
    border-radius: var(--profile-radius);
    background: var(--profile-bg);
    transition: all 0.3s ease;
}

.stat-box:hover {
    background: var(--profile-light-green);
    transform: translateY(-2px);
}

.stat-icon {
    width: 40px;
    height: 40px;
    background: var(--profile-light-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
    color: var(--profile-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.stat-box:hover .stat-icon {
    background: var(--profile-primary);
    color: white;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 1rem;
    font-weight: 700;
    color: var(--profile-text);
    display: block;
}

.stat-label {
    font-size: 0.6875rem;
    color: var(--profile-text-muted);
    display: block;
    margin-top: 0.25rem;
}

/* Quick Actions */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    padding: 1rem 0.5rem;
    border-radius: var(--profile-radius);
    background: var(--profile-bg);
    transition: all 0.3s ease;
}

.quick-action-btn:hover {
    background: var(--profile-light-green);
    transform: translateY(-2px);
}

.quick-action-icon {
    width: 40px;
    height: 40px;
    background: var(--profile-light-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
    color: var(--profile-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.quick-action-btn:hover .quick-action-icon {
    background: var(--profile-primary);
    color: white;
}

.quick-action-btn span {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--profile-text);
    text-align: center;
}

/* Recent Donations */
.recent-donations-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.donation-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem;
    background: var(--profile-bg);
    border-radius: var(--profile-radius);
    transition: all 0.3s ease;
}

.donation-item:hover {
    background: var(--profile-light-green);
    transform: translateX(4px);
}

.donation-icon {
    width: 40px;
    height: 40px;
    background: var(--profile-light-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--profile-primary);
    font-size: 0.875rem;
    flex-shrink: 0;
}

.donation-info {
    flex: 1;
    min-width: 0;
}

.donation-program {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--profile-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.donation-date {
    font-size: 0.75rem;
    color: var(--profile-text-muted);
}

.donation-amount {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--profile-primary);
    white-space: nowrap;
}

/* Menu Card */
.menu-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Menu Section Title */
.menu-section-title {
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    margin-bottom: 0.25rem;
}

.menu-section-title:first-child {
    margin-top: 0;
}

.menu-section-title h3 {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--profile-text-muted);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.menu-section-title h3 i {
    color: var(--profile-primary);
    font-size: 0.875rem;
}

/* Logout Item */
.logout-item {
    margin-top: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--profile-border);
}

.logout-item .menu-item-icon {
    background: #fee2e2;
    color: #dc2626;
}

.logout-item:hover .menu-item-icon {
    background: #dc2626;
    color: white;
}

.logout-item .menu-item-title {
    color: #dc2626;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem;
    text-decoration: none;
    border-radius: var(--profile-radius);
    transition: all 0.3s ease;
}

.menu-item:hover {
    background: var(--profile-bg);
    transform: translateX(4px);
}

.menu-item-icon {
    width: 40px;
    height: 40px;
    background: var(--profile-light-green);
    border-radius: var(--profile-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--profile-primary);
    font-size: 1rem;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.menu-item:hover .menu-item-icon {
    background: var(--profile-primary);
    color: white;
}

.menu-item-content {
    flex: 1;
    min-width: 0;
}

.menu-item-title {
    display: block;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--profile-text);
}

.menu-item-desc {
    font-size: 0.75rem;
    color: var(--profile-text-muted);
}

.menu-item-arrow {
    color: var(--profile-text-muted);
    font-size: 0.75rem;
    transition: all 0.3s ease;
}

.menu-item:hover .menu-item-arrow {
    color: var(--profile-primary);
    transform: translateX(4px);
}

/* Logout Card */
.logout-card {
    background: transparent;
    box-shadow: none;
    padding: 0;
    margin-bottom: 0;
}

.logout-card:hover {
    box-shadow: none;
}

.logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 1rem;
    background: var(--profile-white);
    border: 2px solid #fee2e2;
    border-radius: var(--profile-radius-lg);
    color: #dc2626;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9375rem;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: #fee2e2;
    transform: translateY(-2px);
}

.logout-icon {
    width: 40px;
    height: 40px;
    background: #fee2e2;
    border-radius: var(--profile-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.logout-btn:hover .logout-icon {
    background: #dc2626;
    color: white;
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--profile-white);
    border-top: 1px solid var(--profile-border);
    padding: 0.5rem 0;
    z-index: 100;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.08);
}

@media (min-width: 768px) {
    .mobile-bottom-nav {
        display: none;
    }
    
    .profile-page {
        padding-bottom: 2rem;
    }
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--profile-text-secondary);
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    min-width: 50px;
}

.mobile-nav-item:hover,
.mobile-nav-item.active {
    color: var(--profile-primary);
    background: var(--profile-light-green);
}

.mobile-nav-item i {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.mobile-nav-item span {
    font-size: 0.625rem;
    font-weight: 600;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.profile-card {
    animation: fadeInUp 0.5s ease-out;
    animation-fill-mode: both;
}

.profile-card:nth-child(1) { animation-delay: 0.1s; }
.profile-card:nth-child(2) { animation-delay: 0.2s; }
.profile-card:nth-child(3) { animation-delay: 0.3s; }
.profile-card:nth-child(4) { animation-delay: 0.4s; }
.profile-card:nth-child(5) { animation-delay: 0.5s; }

.profile-avatar {
    animation: fadeInUp 0.5s ease-out 0.2s;
    animation-fill-mode: both;
}

/* Responsive Adjustments */
@media (max-width: 480px) {
    .profile-header-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .profile-avatar-section {
        margin-bottom: 0.5rem;
    }
    
    .profile-info {
        text-align: center;
    }
    
    .profile-name-section {
        justify-content: center;
    }
    
    .profile-email,
    .profile-phone {
        justify-content: center;
    }
    
    .profile-actions {
        margin-left: 0;
        width: 100%;
    }
    
    .profile-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .stat-box {
        display: flex;
        align-items: center;
        gap: 1rem;
        text-align: left;
        padding: 0.875rem;
    }
    
    .stat-icon {
        margin: 0;
    }
    
    .stat-info {
        align-items: flex-start;
    }
    
    .quick-actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
