/* ========================================
   PROFILE PAGE - LIGHT MODE THEME
   Tema Terang & Responsif Mobile
   ======================================== */

/* ========================================
   CONTAINER & LAYOUT
   ======================================== */
.profile-container {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 100vh;
    padding: 2rem 0;
}

.profile-card {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-bottom: 2rem;
    border: 1px solid #e9ecef;
}

/* ========================================
   PROFILE HEADER
   ======================================== */
.profile-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    padding: 2rem 1.5rem;
    text-align: center;
    position: relative;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid #ffffff;
    object-fit: cover;
    margin: 0 auto 1rem;
    display: block;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.profile-avatar-placeholder {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid #ffffff;
    background: rgba(255, 255, 255, 0.2);
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.profile-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.profile-email {
    font-size: 1rem;
    opacity: 0.95;
    margin-bottom: 1rem;
    color: #ffffff;
}

.profile-id-info {
    margin-bottom: 1rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    display: inline-block;
}

.profile-id-info code {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
    padding: 0.25rem 0.5rem;
    border-radius: 5px;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
}

.role-badges {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.role-badge {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

/* ========================================
   PROFILE CONTENT
   ======================================== */
.profile-content {
    padding: 1.5rem;
}

.section-title {
    color: #212529;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid #667eea;
    display: flex;
    align-items: center;
}

.section-title i {
    margin-right: 0.5rem;
    color: #667eea;
    font-size: 1.1rem;
}

/* ========================================
   INFO GRID & CARDS
   ======================================== */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.info-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.info-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0;
    border-bottom: 1px solid #f1f3f5;
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 600;
    color: #495057;
    font-size: 0.9rem;
}

.info-value {
    color: #212529;
    font-weight: 500;
    text-align: right;
    flex: 1;
    margin-left: 1rem;
    font-size: 0.9rem;
}

/* ========================================
   STATS GRID
   ======================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    padding: 1rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25);
}

.stat-number {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    color: #ffffff;
}

.stat-label {
    font-size: 0.8rem;
    opacity: 0.95;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #ffffff;
}

/* ========================================
   FORM SECTION
   ======================================== */
.form-section {
    background: #ffffff;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.4rem;
    display: block;
    font-size: 0.9rem;
}

.form-control {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 0.6rem 0.8rem;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    background: #ffffff;
    color: #212529;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.15);
    outline: none;
    background: #ffffff;
}

/* ========================================
   BUTTONS
   ======================================== */
.btn-custom {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: #ffffff;
    padding: 0.6rem 1.5rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.btn-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.35);
    color: #ffffff;
    text-decoration: none;
}

.btn-secondary-custom {
    background: #6c757d;
    border: none;
    color: #ffffff;
    padding: 0.6rem 1.5rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    cursor: pointer;
    margin-left: 0.5rem;
}

.btn-secondary-custom:hover {
    background: #5a6268;
    transform: translateY(-2px);
    color: #ffffff;
}

/* ========================================
   PHOTO UPLOAD
   ======================================== */
.photo-upload-section {
    border: 2px dashed #dee2e6;
    border-radius: 10px;
    padding: 1rem;
    background-color: #f8f9fa;
}

.current-photo-display {
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.photo-preview {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 0.5rem;
    display: block;
    border: 3px solid #667eea;
}

.photo-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px dashed #dee2e6;
    margin: 0 auto 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
}

#photo-preview-container {
    border: 2px dashed #dee2e6;
    border-radius: 10px;
    padding: 1rem;
    background-color: #ffffff;
}

/* ========================================
   LOGIN HISTORY
   ======================================== */
.login-history-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: #ffffff;
    border-radius: 10px;
    margin-bottom: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
    border: 1px solid #e9ecef;
}

.login-history-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.login-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    font-size: 1.1rem;
    color: #ffffff;
    flex-shrink: 0;
}

.login-content {
    flex: 1;
}

.login-title {
    font-weight: 600;
    color: #212529;
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
}

.login-details {
    color: #6c757d;
    font-size: 0.85rem;
}

.browser-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-top: 0.25rem;
}

.browser-chrome { background: #e3f2fd; color: #1976d2; }
.browser-firefox { background: #fff3e0; color: #f57c00; }
.browser-safari { background: #e8f5e9; color: #388e3c; }
.browser-edge { background: #e3f2fd; color: #1976d2; }
.browser-other { background: #f5f5f5; color: #757575; }

/* ========================================
   EDIT MODE
   ======================================== */
.edit-mode {
    background: #ffffff;
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1rem;
    border: 2px solid #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
}

/* ========================================
   BADGES
   ======================================== */
.badge-custom {
    padding: 0.4rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.badge-success { background: #d4edda; color: #155724; }
.badge-danger { background: #f8d7da; color: #721c24; }
.badge-primary { background: #cce5ff; color: #004085; }
.badge-secondary { background: #e2e3e5; color: #383d41; }

/* ========================================
   NOTIFICATIONS
   ======================================== */
.custom-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
    max-width: 400px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideInRight 0.3s ease-out;
}

.custom-notification-info {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: #ffffff;
}

.custom-notification-success {
    background: linear-gradient(135deg, #4CAF50, #388E3C);
    color: #ffffff;
}

.custom-notification-error {
    background: linear-gradient(135deg, #F44336, #D32F2F);
    color: #ffffff;
}

.custom-notification-warning {
    background: linear-gradient(135deg, #FF9800, #F57C00);
    color: #ffffff;
}

.notification-content {
    display: flex;
    align-items: center;
    padding: 16px;
}

.notification-content i:first-child {
    margin-right: 12px;
    font-size: 18px;
}

.notification-content span {
    flex: 1;
    font-weight: 500;
}

.notification-close {
    background: none;
    border: none;
    color: #ffffff;
    cursor: pointer;
    padding: 4px;
    margin-left: 12px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.notification-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ========================================
   MOBILE RESPONSIVE (< 768px)
   ======================================== */
@media (max-width: 768px) {
    .profile-container {
        padding: 1rem 0;
    }

    .profile-header {
        padding: 1.5rem 1rem;
    }

    .profile-avatar, 
    .profile-avatar-placeholder {
        width: 80px;
        height: 80px;
        border-width: 3px;
    }

    .profile-name {
        font-size: 1.25rem;
    }

    .profile-email {
        font-size: 0.9rem;
    }

    .profile-id-info {
        padding: 0.4rem 0.8rem;
    }

    .profile-id-info code {
        font-size: 0.7rem;
    }

    .role-badge {
        padding: 0.3rem 0.8rem;
        font-size: 0.75rem;
    }

    .profile-content {
        padding: 1rem;
    }

    .section-title {
        font-size: 1.1rem;
    }

    .section-title i {
        font-size: 1rem;
    }

    /* Grid 2 kolom untuk mobile */
    .info-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    /* Grid 2 kolom untuk stats */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .stat-card {
        padding: 0.75rem;
    }

    .stat-number {
        font-size: 1.1rem;
    }

    .stat-label {
        font-size: 0.7rem;
    }

    .info-card {
        padding: 0.75rem;
    }

    .info-item {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        padding: 0.5rem 0;
    }

    .info-label {
        font-size: 0.8rem;
    }

    .info-value {
        text-align: left;
        margin-left: 0;
        margin-top: 0.25rem;
        font-size: 0.85rem;
    }

    .form-section {
        padding: 1rem;
    }

    .form-group label {
        font-size: 0.85rem;
    }

    .form-control {
        padding: 0.5rem 0.7rem;
        font-size: 0.85rem;
    }

    .btn-custom, 
    .btn-secondary-custom {
        width: 100%;
        margin: 0.25rem 0;
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    .photo-preview,
    .photo-placeholder {
        width: 100px;
        height: 100px;
    }

    .login-history-item {
        padding: 0.75rem;
    }

    .login-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .login-title {
        font-size: 0.9rem;
    }

    .login-details {
        font-size: 0.75rem;
    }

    .browser-badge {
        font-size: 0.7rem;
        padding: 0.15rem 0.5rem;
    }

    .custom-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        min-width: auto;
        max-width: none;
    }
}

/* ========================================
   VERY SMALL MOBILE (< 480px)
   ======================================== */
@media (max-width: 480px) {
    .profile-header {
        padding: 1rem 0.75rem;
    }

    .profile-avatar,
    .profile-avatar-placeholder {
        width: 70px;
        height: 70px;
    }

    .profile-name {
        font-size: 1.1rem;
    }

    .profile-email {
        font-size: 0.85rem;
    }

    .profile-content {
        padding: 0.75rem;
    }

    .section-title {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }

    /* Grid 1 kolom untuk layar sangat kecil */
    .info-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .form-section {
        padding: 0.75rem;
    }

    .edit-mode {
        padding: 1rem;
    }
}

/* ========================================
   TABLET & DESKTOP (> 768px)
   ======================================== */
@media (min-width: 769px) {
    .info-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ========================================
   LARGE DESKTOP (> 1200px)
   ======================================== */
@media (min-width: 1200px) {
    .profile-container {
        padding: 3rem 0;
    }

    .profile-content {
        padding: 2.5rem;
    }

    .profile-header {
        padding: 2.5rem 2rem;
    }

    .profile-avatar,
    .profile-avatar-placeholder {
        width: 120px;
        height: 120px;
    }

    .profile-name {
        font-size: 1.75rem;
    }
}

/* ========================================
   FORCE LIGHT MODE - NO DARK MODE
   ======================================== */
@media (prefers-color-scheme: dark) {
    .profile-container {
        background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
    }

    .profile-card,
    .info-card,
    .form-section,
    .login-history-item,
    .edit-mode {
        background: #ffffff !important;
        color: #212529 !important;
    }

    .form-control {
        background: #ffffff !important;
        color: #212529 !important;
        border-color: #e9ecef !important;
    }

    .section-title,
    .login-title,
    .info-label,
    .info-value {
        color: #212529 !important;
    }

    .login-details {
        color: #6c757d !important;
    }
}

