/* ==========================================================
   MEMBER PROFILE EDIT
========================================================== */

.cp-member-edit {
    max-width: 820px;
    margin: 0 auto;
    padding: 32px 20px 60px;
    font-family: inherit;
}

/* Header */
.cp-edit-header {
    margin-bottom: 32px;
}

.cp-edit-title {
    font-size: 26px;
    font-weight: 700;
    color: #002751;
    margin: 0 0 6px;
}

.cp-edit-subtitle {
    font-size: 14px;
    color: #888;
    margin: 0;
}

/* Notice bar */
.cp-edit-notice {
    padding: 14px 18px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 24px;
}

.cp-edit-notice--success {
    background: #eafaf1;
    border: 1px solid #27ae60;
    color: #1e8449;
}

.cp-edit-notice--error {
    background: #fdf2f2;
    border: 1px solid #e74c3c;
    color: #c0392b;
}

/* ==========================================================
   SECTIONS
========================================================== */

.cp-edit-section {
    background: #fff;
    border-radius: 6px;
    padding: 28px;
    margin-bottom: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.07);
}

.cp-edit-section-title {
    font-size: 16px;
    font-weight: 700;
    color: #002751;
    margin: 0 0 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #edf0f4;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cp-edit-section-count {
    font-size: 13px;
    font-weight: 500;
    color: #888;
}

.cp-edit-section-hint {
    font-size: 13px;
    color: #888;
    margin: -12px 0 16px;
}

/* ==========================================================
   FIELDS
========================================================== */

.cp-edit-row {
    margin-bottom: 18px;
}

.cp-edit-row:last-child {
    margin-bottom: 0;
}

.cp-edit-row--2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.cp-edit-row--half {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.cp-edit-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cp-edit-field label {
    font-size: 13px;
    font-weight: 600;
    color: #444;
}

.cp-edit-field input[type="text"],
.cp-edit-field input[type="email"],
.cp-edit-field input[type="url"],
.cp-edit-field input[type="number"],
.cp-edit-field select,
.cp-edit-field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #dde2ea;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    color: #222;
    background: #fff;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    appearance: auto;
}

.cp-edit-field input:focus,
.cp-edit-field select:focus,
.cp-edit-field textarea:focus {
    outline: none;
    border-color: #1462b5;
    box-shadow: 0 0 0 3px rgba(20,98,181,0.12);
}

.cp-edit-field input.cp-field-error,
.cp-edit-field select.cp-field-error,
.cp-edit-field textarea.cp-field-error {
    border-color: #e74c3c;
}

.cp-edit-field textarea {
    resize: vertical;
    min-height: 110px;
}

.cp-required {
    color: #e74c3c;
}

/* ==========================================================
   CHECKBOXES
========================================================== */

.cp-edit-row--checkboxes {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cp-edit-label-group {
    font-size: 13px;
    font-weight: 600;
    color: #444;
}

.cp-edit-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.cp-check-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
}

.cp-check-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #002751;
    cursor: pointer;
}

/* ==========================================================
   CATEGORIES
========================================================== */

.cp-edit-categories {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.cp-cat-group {
    background: #f8f9fb;
    border: 1px solid #e8edf3;
    border-radius: 5px;
    padding: 14px;
}

.cp-cat-master {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    color: #002751;
    cursor: pointer;
    margin-bottom: 10px;
}

.cp-cat-master input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: #002751;
    cursor: pointer;
    flex-shrink: 0;
}

.cp-cat-children {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-left: 24px;
}

.cp-cat-child {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #444;
    cursor: pointer;
}

.cp-cat-child input[type="checkbox"] {
    width: 14px;
    height: 14px;
    accent-color: #1462b5;
    cursor: pointer;
    flex-shrink: 0;
}

.cp-cat-limit-msg {
    margin-top: 12px;
    font-size: 13px;
    color: #c0392b;
    font-weight: 600;
}

/* ==========================================================
   LOGO UPLOAD
========================================================== */

.cp-edit-logo-wrap {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    flex-wrap: wrap;
}

.cp-current-logo {
    flex-shrink: 0;
}

.cp-logo-preview {
    max-width: 140px;
    max-height: 80px;
    object-fit: contain;
    border: 1px solid #e0e5ec;
    border-radius: 4px;
    padding: 8px;
    background: #f8f9fb;
    display: block;
    margin-bottom: 8px;
}

.cp-no-file {
    font-size: 13px;
    color: #aaa;
    margin: 0;
}

/* ==========================================================
   UPLOAD ZONE
========================================================== */

.cp-upload-zone {
    flex: 1;
    min-width: 200px;
}

.cp-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
    clip: rect(0,0,0,0);
}

.cp-upload-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border: 2px dashed #c0cad8;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    color: #1462b5;
    cursor: pointer;
    background: #f4f7fb;
    transition: border-color 0.2s ease, background 0.2s ease;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
}

.cp-upload-label:hover {
    border-color: #1462b5;
    background: #eaf0fa;
}

.cp-upload-label--disabled {
    color: #aaa;
    border-color: #e0e5ec;
    background: #f8f9fb;
    cursor: not-allowed;
}

.cp-upload-hint {
    font-size: 12px;
    color: #aaa;
    margin: 6px 0 0;
}

/* ==========================================================
   SAMPLE WORK GRID
========================================================== */

.cp-sample-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 8px;
}

.cp-sample-item {
    position: relative;
    border-radius: 5px;
    overflow: hidden;
    aspect-ratio: 4/3;
    background: #e8edf3;
}

.cp-sample-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cp-sample-delete {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(0,0,0,0.6);
    border: none;
    color: #fff;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    padding: 0;
    font-family: inherit;
}

.cp-sample-delete:hover {
    background: #e74c3c;
}

.cp-sample-add {
    aspect-ratio: 4/3;
    border: 2px dashed #c0cad8;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f4f7fb;
    transition: border-color 0.2s ease, background 0.2s ease;
    cursor: pointer;
}

.cp-sample-add:hover {
    border-color: #1462b5;
    background: #eaf0fa;
}

.cp-sample-add-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    color: #1462b5;
    font-weight: 600;
}

.cp-sample-add-label span {
    font-size: 28px;
    line-height: 1;
}

.cp-sample-add-label small {
    font-size: 12px;
}

/* ==========================================================
   DELETE BUTTON
========================================================== */

.btn-cp-danger {
    display: inline-block;
    padding: 5px 12px;
    background: #fff;
    border: 1px solid #e74c3c;
    border-radius: 3px;
    color: #e74c3c;
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.btn-cp-danger:hover {
    background: #e74c3c;
    color: #fff;
}

/* ==========================================================
   SAVE BUTTON
========================================================== */

.cp-edit-actions {
    display: flex;
    justify-content: flex-end;
    padding-top: 8px;
}

.cp-btn-save {
    padding: 13px 36px;
    background: #002751;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s ease;
}

.cp-btn-save:hover {
    background: #1462b5;
}

.cp-btn-save:disabled {
    background: #aaa;
    cursor: not-allowed;
}

/* ==========================================================
   RESPONSIVE
========================================================== */

@media (max-width: 767px) {
    .cp-member-edit {
        padding: 20px 16px 48px;
    }

    .cp-edit-row--2col,
    .cp-edit-row--half {
        grid-template-columns: 1fr;
    }

    .cp-edit-categories {
        grid-template-columns: 1fr;
    }

    .cp-edit-logo-wrap {
        flex-direction: column;
    }

    .cp-edit-section {
        padding: 20px;
    }

    .cp-edit-actions {
        justify-content: stretch;
    }

    .cp-btn-save {
        width: 100%;
        text-align: center;
    }
}