/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #f4f7fc;
    color: #1f2a3e;
    line-height: 1.4;
}

.wrap {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 30px;
    font-weight: 600;
    font-size: 14px;
    padding: 8px 20px;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    text-decoration: none;
    gap: 6px;
}
.btn-light {
    background: #fff;
    border: 1px solid #cddfe7;
    color: #2c6e9e;
}
.btn-light:hover {
    background: #eef3f8;
    border-color: #b6cfdf;
}
.btn-primary {
    background: #2d7a4b;
    color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.btn-primary:hover {
    background: #23683e;
}
.btn-outline-secondary {
    background: transparent;
    border: 1px solid #bcd0dd;
    color: #2c6e9e;
}
.btn-outline-secondary:hover {
    background: #e9f0f5;
}
.btn-sm {
    padding: 6px 16px;
    font-size: 13px;
}
.btn-big {
    padding: 10px 24px;
    font-size: 16px;
}

/* ===== HEADER ===== */
.head {
    background: white;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 10;
}
.flex {
    display: flex;
}
.ai-center {
    align-items: center;
}
.jc-between {
    justify-content: space-between;
}
.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    font-size: 26px;
    color: #1f2a3e;
}
.logo-heart {
    font-size: 32px;
    color: #e94e77;
}
.logo-accent {
    color: #2d7a4b;
}
.head_menu {
    display: flex;
    list-style: none;
    gap: 28px;
    margin: 0 20px;
}
.head_menu a {
    text-decoration: none;
    color: #2c3e50;
    font-weight: 500;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.head_menu a i {
    font-size: 18px;
    color: #7f8c8d;
}

/* ===== USER DROPDOWN ===== */
.p_rel {
    position: relative;
}
.head_user {
    margin-left: 15px;
}
.dm_hover {
    position: relative;
    cursor: pointer;
}
.dm_hover::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 0;
    width: 100%;
    height: 12px;
    background: transparent;
    z-index: 99;
}
.head_user_photo img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}
.head_user_prof {
    font-weight: 500;
    text-decoration: none;
    color: #2c3e50;
    font-size: 14px;
}
.icon-stack {
    font-size: 18px;
    color: #7f8c8d;
    margin-left: 6px;
}
.dm_pad {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    z-index: 1000;
    width: 220px;
}
.dm_hover:hover .dm_pad {
    display: block;
}
.dm_box {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    border: 1px solid #e6edf2;
    padding: 8px 0;
}
.dm_box_link {
    list-style: none;
    margin: 0;
    padding: 0;
}
.dm_box_link li a {
    display: block;
    padding: 10px 16px;
    color: #2c3e50;
    text-decoration: none;
    font-size: 14px;
    transition: 0.1s;
}
.dm_box_link li a:hover {
    background: #f4f7fc;
    color: #2d7a4b;
}
.bm_line {
    height: 1px;
    background: #e2ebf2;
    margin: 6px 0;
}

/* ===== PROFILE CARD ===== */
.profile-container {
    max-width: 1000px;
    margin: 30px auto;
}
.profile-card {
    background: white;
    border-radius: 28px;
    border: 1px solid #e6edf2;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,0.04);
}
.profile-cover {
    height: 160px;
    background: linear-gradient(135deg, #2d7a4b 0%, #1e5a38 100%);
    position: relative;
}
.avatar-wrapper {
    position: absolute;
    bottom: -50px;
    left: 40px;
}
.avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    object-fit: cover;
}
.edit-avatar {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: #2d7a4b;
    color: white;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 14px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    transition: 0.2s;
}
.edit-avatar:hover {
    background: #1e5a38;
}
.profile-content {
    padding: 70px 40px 40px 40px;
}
.profile-header {
    margin-bottom: 24px;
    border-bottom: 1px solid #e2ebf2;
    padding-bottom: 20px;
}
.profile-name h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}
.profile-badge {
    display: inline-block;
    background: #e9f7ef;
    color: #2d7a4b;
    font-size: 13px;
    padding: 4px 12px;
    border-radius: 40px;
    margin-top: 8px;
}
.edit-icon {
    color: #9aaebf;
    font-size: 16px;
    margin-left: 10px;
    text-decoration: none;
    transition: color 0.2s;
    vertical-align: middle;
    cursor: pointer;
}
.edit-icon:hover {
    color: #2d7a4b;
}
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}
.info-item {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #f8fafc;
    padding: 14px 18px;
    border-radius: 20px;
    border: 1px solid #eef2f5;
}
.info-icon {
    width: 44px;
    height: 44px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #2d7a4b;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}
.info-text {
    flex: 1;
}
.info-label {
    font-size: 13px;
    color: #5d6f83;
    margin-bottom: 2px;
}
.info-value {
    font-weight: 600;
    font-size: 16px;
    color: #1f2a3e;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.about-section {
    background: #f8fafc;
    border-radius: 20px;
    padding: 20px;
    margin-top: 8px;
    margin-bottom: 24px;
}
.about-section h3 {
    font-size: 18px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.about-text {
    color: #2c3e50;
    line-height: 1.5;
    white-space: pre-wrap;
}
.back-link {
    text-align: right;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e2ebf2;
}
.back-link a {
    background: none;
    border: none;
    color: #ff6b6b;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.back-link a i {
    margin-right: 0;
}
.back-link a:hover {
    color: #e55a5a;
    text-decoration: none;
}
.back-link-top {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
}
.back-link-top a {
    background: none;
    border: none;
    color: #ff6b6b;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: color 0.2s;
}
.back-link-top a i {
    margin-right: 0;
}
.back-link-top a:hover {
    color: #e55a5a;
    text-decoration: none;
}
/* ===== TABS ===== */
.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 1px solid #e2ebf2;
    padding-bottom: 8px;
}
.tab-btn {
    background: none;
    border: none;
    padding: 8px 20px;
    font-size: 16px;
    font-weight: 500;
    color: #5d6f83;
    cursor: pointer;
    border-radius: 40px;
    transition: all 0.2s;
}
.tab-btn.active {
    background: #2d7a4b;
    color: white;
}
.tab-pane {
    display: none;
}
.tab-pane.active {
    display: block;
}

/* ===== EDITABLE BLOCKS ===== */
.block-edit {
    margin-bottom: 24px;
    border: 1px solid #eef2f5;
    border-radius: 20px;
    background: #f8fafc;
    overflow: hidden;
}
.block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: #fff;
    border-bottom: 1px solid #e2ebf2;
    cursor: pointer;
}
.block-title {
    font-weight: 600;
    font-size: 16px;
    color: #2c3e50;
}
.block-toggle {
    color: #2c6e9e;
    font-size: 13px;
}
.block-content {
    padding: 16px 20px;
}
.block-edit-form {
    display: none;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e2ebf2;
}
.block-edit-form.active {
    display: block;
}
.btn-edit-save {
    background: #2d7a4b;
    color: white;
    border: none;
    padding: 6px 16px;
    border-radius: 30px;
    cursor: pointer;
}
.btn-edit-cancel {
    background: #eef2f5;
    color: #2c6e9e;
    border: none;
    padding: 6px 16px;
    border-radius: 30px;
    cursor: pointer;
    margin-left: 8px;
}

/* ===== PHOTOS TAB ===== */
.dropzone {
    border: 2px dashed #cbdae3;
    border-radius: 20px;
    padding: 40px 20px;
    text-align: center;
    background: #f8fafc;
    cursor: pointer;
    transition: 0.2s;
    margin-bottom: 24px;
}
.dropzone.dragover {
    background: #eef2f5;
    border-color: #2d7a4b;
}
.photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 16px;
}
.photo-item {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 1;
    background: #eef2f5;
}
.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.photo-delete {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0,0,0,0.6);
    color: white;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
}
.photo-delete:hover {
    background: #e53e3e;
}

/* ===== EXTRA INFO FIELDS ===== */
.info-field {
    background: #f8fafc;
    border-radius: 20px;
    padding: 16px 40px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.field-label {
    font-weight: 500;
    color: #2c3e50;
}
.field-value {
    color: #1f2a3e;
    display: flex;
    align-items: center;
    gap: 12px;
}
.field-value .value-text {
    font-weight: 600;
}
.edit-inline {
    cursor: pointer;
    color: #9aaebf;
    transition: 0.2s;
}
.edit-inline:hover {
    color: #2d7a4b;
}
.inline-editor {
    display: flex;
    gap: 8px;
    align-items: center;
}
.inline-editor input,
.inline-editor select {
    padding: 8px 12px;
    border: 1px solid #cbdae3;
    border-radius: 40px;
    font-size: 14px;
}

.inline-editor .btn-edit-save {
    background: #2d7a4b;
    color: white;
    border: none;
    border-radius: 30px;
    padding: 6px 16px;
    cursor: pointer;
}

.inline-editor .btn-edit-cancel {
    background: #eef2f5;
    color: #2c6e9e;
    border: none;
    border-radius: 30px;
    padding: 6px 16px;
    cursor: pointer;
    margin-left: 8px;
}

.checkbox-group {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}
.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: normal;
}

/* ===== ALERTS ===== */
.alert-success {
    background: #e9f7ef;
    border-left: 4px solid #2d7a4b;
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 20px;
    color: #1e5a38;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.alert-danger {
    background: #fee2e2;
    border-left: 4px solid #e53e3e;
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 20px;
    color: #c53030;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ===== MODAL ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
}
.modal-content {
    background: white;
    border-radius: 28px;
    padding: 28px;
    max-width: 500px;
    width: 90%;
    position: relative;
}
.modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: #7f8c8d;
}
.modal-close:hover {
    color: #c53030;
}
.modal h3 {
    margin-bottom: 20px;
}
.modal input,
.modal select,
.modal textarea {
    width: 100%;
    padding: 14px;
    border-radius: 20px;
    border: 1px solid #cbdae3;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    line-height: 1.5;
    resize: vertical;
    transition: 0.2s;
}
.modal textarea:focus,
.modal input:focus,
.modal select:focus {
    outline: none;
    border-color: #2d7a4b;
    box-shadow: 0 0 0 2px rgba(45,122,75,0.1);
}
.modal input[type="file"] {
    width: 100%;
    padding: 10px;
    border: 1px dashed #cbdae3;
    border-radius: 20px;
    background: #f8fafc;
    margin-bottom: 20px;
    cursor: pointer;
}
.modal input[type="file"]:hover {
    background: #eef2f5;
}
.modal button {
    background: #f7b32b;
    color: #2c3e2f;
    font-weight: 600;
    padding: 12px;
    border: none;
    border-radius: 40px;
    width: 100%;
    cursor: pointer;
}
.modal button:hover {
    background: #e5a021;
}


/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .head_menu {
        gap: 14px;
        margin: 10px 0;
    }
}
@media (max-width: 700px) {
    .profile-content {
        padding: 60px 24px 24px;
    }
    .avatar-wrapper {
        left: 20px;
    }
    .avatar {
        width: 90px;
        height: 90px;
    }
    .profile-name h1 {
        font-size: 24px;
    }
    .profile-header {
        flex-direction: column;
        gap: 16px;
    }
}

.new-back-link {
    text-align: right;
    margin: 30px;
    padding-top: 20px;
    border-top: 1px solid #e2ebf2;
}
.new-back-link a {
    color: #2c6e9e;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.new-back-link a:hover {
    color: #1e5a38;
    text-decoration: underline;
}
.profile-name {
    position: relative;
}
.profile-name-display,
#nameForm {
    transition: all 0.2s;
}
#nameForm.active {
    display: block !important;
}
.profile-name-display.hide {
    display: none;
}
.profile-name-display {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap; /* если на мобилке нужно переносить */
}
.profile-name-display h1 {
    margin: 0;
    display: inline-block;
}
