/* ============ PROFILE PAGE ============ */
.profile-page {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 16px;
}

/* САЙДБАР */
.profile-sidebar {
    background: #fff;
    border-radius: 16px;
    padding: 20px 0;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    height: fit-content;
    position: sticky;
    top: 90px;
}

.profile-sidebar-head {
    text-align: center;
    padding: 0 20px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.profile-sidebar-avatar {
    width: 80px; height: 80px;
    border-radius: 50%;
    margin: 0 auto 12px;
    overflow: hidden;
    background: #FFC107;
    display: flex; align-items: center; justify-content: center;
    font-size: 32px; font-weight: 700; color: #1a1a1a;
}
.profile-sidebar-avatar img { width: 100%; height: 100%; object-fit: cover; }

.profile-sidebar-name { font-size: 15px; }
.profile-sidebar-rating { font-size: 13px; color: #FFC107; margin-top: 4px; }
.profile-sidebar-rating .text-muted { color: #999 !important; }

.profile-sidebar-nav { display: flex; flex-direction: column; padding: 8px 0; }
.profile-sidebar-nav a {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 20px;
    font-size: 14px; color: #1a1a1a;
    text-decoration: none;
    transition: background 0.15s;
}
.profile-sidebar-nav a:hover { background: #f8f8f8; color: #00AAFF; text-decoration: none; }
.profile-sidebar-nav a.active { background: #f0f8ff; color: #00AAFF; font-weight: 600; border-left: 3px solid #00AAFF; }
.profile-sidebar-nav a i { width: 20px; text-align: center; color: #666; }
.profile-sidebar-nav a.active i { color: #00AAFF; }
.profile-sidebar-nav hr { border: none; border-top: 1px solid #f0f0f0; margin: 8px 0; }
.profile-sidebar-logout { color: #FF4053 !important; }
.profile-sidebar-logout i { color: #FF4053 !important; }

/* КОНТЕНТ */
.profile-content { display: flex; flex-direction: column; gap: 16px; }

.profile-card {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.profile-card-title {
    font-size: 18px; font-weight: 700;
    margin: 0 0 20px;
    color: #1a1a1a;
}

/* ШАПКА ПРОФИЛЯ */
.profile-header-row { display: flex; align-items: center; gap: 20px; }
.profile-header-avatar {
    width: 90px; height: 90px; border-radius: 50%;
    overflow: hidden; flex-shrink: 0;
    background: #FFC107;
    display: flex; align-items: center; justify-content: center;
    font-size: 36px; font-weight: 700; color: #1a1a1a;
}
.profile-header-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-header-name { font-size: 22px; font-weight: 700; margin: 0 0 6px; }
.profile-header-meta { font-size: 13px; color: #999; line-height: 1.6; }

/* ЗНАЧКИ */
.badges-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.badge-item {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 14px;
    background: #f5f9ff;
    border: 1px solid #e0efff;
    border-radius: 10px;
    font-size: 13px; font-weight: 600; color: #0066aa;
}
.badge-item i { font-size: 16px; color: #00AAFF; }
.badge-empty { color: #999; font-size: 13px; }

/* ФОТО */
.profile-photo-row { display: flex; align-items: center; gap: 20px; }
.profile-photo-preview {
    width: 100px; height: 100px; border-radius: 50%;
    overflow: hidden; flex-shrink: 0;
    background: #FFC107;
    display: flex; align-items: center; justify-content: center;
    font-size: 40px; font-weight: 700; color: #1a1a1a;
}
.profile-photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.profile-photo-actions { display: flex; flex-direction: column; gap: 8px; }

/* ЗАГЛУШКИ */
.profile-card-stub { background: #fafafa; border: 1px dashed #e0e0e0; }
.btn-add-stub {
    background: #fff; border: 1px solid #00AAFF;
    color: #00AAFF; font-weight: 600;
    border-radius: 10px;
    padding: 9px 18px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.15s;
}
.btn-add-stub:hover { background: #f0f8ff; }

/* ФОРМА */
.form-row { margin-bottom: 18px; }
.form-row label {
    display: block; font-size: 13px; font-weight: 600;
    color: #1a1a1a; margin-bottom: 6px;
}
.form-row label .req { color: #FF4053; }
.form-row input[type="text"],
.form-row input[type="email"],
.form-row input[type="password"],
.form-row textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid #d9d9d9;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.15s;
    box-sizing: border-box;
}
.form-row input:focus,
.form-row textarea:focus {
    outline: none;
    border-color: #00AAFF;
}
.form-row textarea { resize: vertical; min-height: 100px; }

.form-counter { text-align: right; font-size: 12px; color: #999; margin-top: 4px; }

/* ПАРОЛЬ */
.password-wrap { position: relative; }
.password-wrap input { padding-right: 42px !important; }
.password-toggle {
    position: absolute; top: 50%; right: 8px;
    transform: translateY(-50%);
    background: none; border: none; cursor: pointer;
    color: #666; padding: 6px; font-size: 16px;
}
.password-toggle:hover { color: #00AAFF; }

.password-strength { display: flex; gap: 4px; margin-top: 6px; }
.password-strength .bar {
    flex: 1; height: 4px; border-radius: 2px; background: #eee;
    transition: background 0.2s;
}
.password-strength .bar.weak { background: #FF4053; }
.password-strength .bar.medium { background: #FFC107; }
.password-strength .bar.strong { background: #00A046; }

.password-match { color: #FF4053; font-size: 12px; margin-top: 4px; }

/* КОНТАКТЫ */
.contact-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}
.contact-row:last-child { border-bottom: none; }
.contact-label { font-size: 12px; color: #999; }
.contact-value { font-size: 14px; font-weight: 600; color: #1a1a1a; }
.badge-success {
    background: #e8f9ed; color: #00A046;
    font-size: 12px; font-weight: 600;
    padding: 4px 10px; border-radius: 8px;
}
.badge-warn {
    background: #fff8e6; color: #cc8800;
    font-size: 12px; font-weight: 600;
    padding: 4px 10px; border-radius: 8px;
}

/* КНОПКИ */
.btn-primary {
    background: #00AAFF; color: #fff;
    border: none; border-radius: 10px;
    padding: 11px 22px;
    font-size: 14px; font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    display: inline-block;
    text-decoration: none;
}
.btn-primary:hover { background: #0088cc; color: #fff; }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-ghost {
    background: #f0f0f0; color: #1a1a1a;
    border: none; border-radius: 10px;
    padding: 11px 22px;
    font-size: 14px; font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}
.btn-ghost:hover { background: #e0e0e0; }

.form-actions {
    display: flex; justify-content: flex-end; gap: 12px;
    margin-top: 20px; padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

.profile-hint { font-size: 12px; color: #999; margin: 6px 0 0; }

/* АДАПТИВ */
@media (max-width: 900px) {
    .profile-page { grid-template-columns: 1fr; }
    .profile-sidebar { position: static; }
    .profile-sidebar-nav { flex-direction: row; flex-wrap: wrap; }
    .profile-sidebar-nav a { flex: 1 0 auto; }
    .profile-sidebar-nav hr { display: none; }
}