.profile-layout {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 30px;
    align-items: start;
}

.profile-side-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0,0,0,0.03);
}

.profile-photo-wrapper {
    position: relative;
    width: 180px;
    height: 230px;
    margin: 0 auto 20px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #f1f3f5;
    background: #f8f9fa;
}

.profile-photo-square {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.4);
    color: #fff;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.2s;
    cursor: pointer;
}
.profile-photo-wrapper:hover .photo-overlay { opacity: 1; }

.main-info-area {
    margin-bottom: 25px;
}

.res-name-big {
    font-size: 1.6rem;
    font-weight: 800;
    color: #212529;
    margin-bottom: 5px;
}

.res-sub-info {
    font-size: 0.95rem;
    color: #868e96;
    font-weight: 500;
}

.progress-section-side {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid #f1f3f5;
    text-align: left;
}

.progress-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.progress-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #495057;
}

.progress-percent-val {
    font-size: 0.85rem;
    font-weight: 800;
    color: #212529;
}

.progress-bar-container-side {
    height: 10px;
    background-color: #f1f3f5;
    border-radius: 5px;
    overflow: hidden;
}

.progress-bar-fill-side {
    height: 100%;
    background: linear-gradient(90deg, #212529, #495057);
    transition: width 0.1s linear;
}

.profile-main-content {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.detail-section {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.03);
}

.detail-section-title {
    font-size: 1rem;
    font-weight: 800;
    color: #212529;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.info-item label {
    font-size: 0.8rem;
    color: #868e96;
    font-weight: 600;
}

.info-item .value {
    font-size: 1rem;
    font-weight: 700;
    color: #212529;
}

.info-item.highlight .value {
    color: #000;
    font-size: 1.1rem;
}

/* 편집 모드 스타일 */
.edit-form-group {
    margin-bottom: 15px;
}
.edit-form-group label {
    display: block;
    font-size: 0.8rem;
    color: #868e96;
    margin-bottom: 5px;
    font-weight: 600;
}

.form-control-custom {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: border-color 0.2s;
}
.form-control-custom:focus {
    outline: none;
    border-color: #212529;
}

.custom-edit-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
}

.profile-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 10px;
}

.btn-action {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.btn-edit { background: #f8f9fa; color: #495057; border-color: #dee2e6; }
.btn-delete { background: #fff; color: #fa5252; border-color: #ffc9c9; }
.btn-save { background: #212529; color: #fff; }
.btn-cancel { background: #fff; color: #868e96; border-color: #dee2e6; }

.preview-grid {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.preview-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}
.preview-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
    border-color: #adb5bd;
}

.preview-name { font-size: 1.1rem; font-weight: 800; margin-bottom: 12px; }
.preview-progress-container {
    height: 6px;
    background: #f1f3f5;
    border-radius: 3px;
    margin-bottom: 8px;
}
.preview-progress-fill {
    height: 100%;
    background: #212529;
    border-radius: 3px;
}

.hidden { display: none !important; }

@media (max-width: 900px) {
    .profile-layout { grid-template-columns: 1fr; }
    .profile-side-card { max-width: 400px; margin: 0 auto; }
}
