<style>
/* Profile Container */
.profile-container {
    padding: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.profile-header-bar {
    margin-bottom: 24px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #64748b;
    margin-bottom: 8px;
}

.breadcrumb a {
    color: #0ea5e9;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.page-title {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Profile Layout */
.profile-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 24px;
}

/* Profile Sidebar */
.profile-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    text-align: center;
}

.profile-avatar-wrap {
    position: relative;
    margin-bottom: 16px;
    display: inline-block;
}

.profile-avatar-xl {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    font-weight: bold;
    margin: 0 auto;
}

.status-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    position: absolute;
    bottom: 5px;
    right: calc(50% - 55px);
    border: 3px solid white;
}

.status-dot.online {
    background: #10b981;
}

.profile-name {
    font-size: 22px;
    font-weight: 700;
    color: #1e293b;
    margin: 16px 0 8px;
}

.profile-role-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    background: #f1f5f9;
    border-radius: 20px;
    font-size: 14px;
    color: #64748b;
    margin-bottom: 12px;
}

.profile-class, .profile-nis {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 14px;
    color: #64748b;
    margin-bottom: 8px;
}

.profile-divider {
    margin: 20px 0;
    border: none;
    border-top: 1px solid #e2e8f0;
}

.profile-stats-mini {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.stat-mini {
    text-align: center;
    padding: 16px 8px;
    background: #f8fafc;
    border-radius: 12px;
}

.stat-mini-value {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: #0ea5e9;
    margin-bottom: 4px;
}

.stat-mini-label {
    font-size: 12px;
    color: #64748b;
}

.btn-settings-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    background: #0ea5e9;
    color: white;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-settings-link:hover {
    background: #0284c7;
    transform: translateY(-2px);
}

/* Profile Main Content */
.profile-main {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.profile-section-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.section-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f1f5f9;
}

.section-card-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.btn-edit-inline {
    padding: 8px 16px;
    background: #0ea5e9;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
}

.btn-edit-inline:hover {
    background: #0284c7;
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.info-item.full-width {
    grid-column: 1 / -1;
}

.info-item label {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.info-item span {
    font-size: 15px;
    color: #1e293b;
    font-weight: 500;
}

/* Stats Grid */
.stats-grid-profile {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.stat-box {
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.stat-box i {
    font-size: 32px;
    opacity: 0.9;
}

.stat-box-val {
    font-size: 32px;
    font-weight: 700;
}

.stat-box-label {
    font-size: 13px;
    font-weight: 500;
}

.stat-box.tugas {
    background: #fef3c7;
    color: #d97706;
}

.stat-box.dinilai {
    background: #d1fae5;
    color: #059669;
}

.stat-box.rata {
    background: #dbeafe;
    color: #2563eb;
}

.stat-box.terlambat {
    background: #fce7f3;
    color: #db2777;
}

/* Subject Grid */
.subject-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.subject-card {
    background: #f8fafc;
    border-radius: 12px;
    padding: 16px;
}

.subject-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.subject-header h4 {
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.subject-score {
    background: #0ea5e9;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: white;
    border-radius: 16px;
    padding: 24px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.btn-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #64748b;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.3s;
}

.btn-close:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

.form-group input,
.form-group textarea {
    padding: 10px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 2px solid #f1f5f9;
}

.btn-cancel,
.btn-save {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    font-size: 14px;
}

.btn-cancel {
    background: #f1f5f9;
    color: #374151;
}

.btn-cancel:hover {
    background: #e2e8f0;
}

.btn-save {
    background: #0ea5e9;
    color: white;
}

.btn-save:hover {
    background: #0284c7;
    transform: translateY(-2px);
}

/* Upload Avatar Button */
.btn-upload-avatar {
    position: absolute;
    bottom: 5px;
    right: calc(50% - 55px);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #0ea5e9;
    color: white;
    border: 3px solid white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 2;
}

.btn-upload-avatar:hover {
    background: #0284c7;
    transform: scale(1.1);
}

.avatar-upload-area {
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: #f8fafc;
}

.avatar-upload-area:hover {
    border-color: #0ea5e9;
    background: #f0f9ff;
}

.avatar-upload-area.dragover {
    border-color: #0ea5e9;
    background: #e0f2fe;
}

.avatar-preview-img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto;
    display: block;
    border: 4px solid #0ea5e9;
}

/* Responsive */
@media (max-width: 768px) {
    .profile-layout {
        grid-template-columns: 1fr;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid-profile {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .profile-container {
        padding: 16px;
    }
}
</style>
