
/* ================================================= */
/* 🌙 1. ORIGINAL PROFILE FORM STYLES (DARK THEME)  */
/* ================================================= */

/* Base Styles for the Profile Forms */
.profile-form {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: Arial, sans-serif;
    color: #f0f0f0;
    box-sizing: border-box;
}

.profile-section {
    background-color: #0d0d0d;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid #333;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    box-sizing: border-box;
}

.profile-section h3 {
    color: #fff;
    font-size: 1.5em;
    margin-bottom: 20px;
    border-bottom: 2px solid #666;
    padding-bottom: 10px;
}

/* PERSONAL INFORMATION WITH PROFILE PICTURE */
.personal-info-container {
    display: flex;
    gap: 50px;
    align-items: flex-start;
}

/* Profile Picture Column */
.profile-picture-column {
    flex: 0 0 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.profile-picture-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    width: 100%;
}

.profile-img-container {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #666;
    background: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

.profile-img-container:hover {
    border-color: #888;
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.15);
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.profile-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #333;
    color: #fff;
    font-size: 60px;
    font-weight: bold;
    border-radius: 50%;
}

/* Profile Picture Overlay Controls - UPDATED WITH COLOR CODED ICONS */
.profile-action-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 50%;
}

.profile-img-container:hover .profile-action-overlay {
    opacity: 1;
}

.edit-picture-btn,
.remove-picture-btn {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid white;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.edit-picture-btn:hover {
    background: rgba(76, 175, 80, 0.9);
    border-color: #4CAF50;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
}

.remove-picture-btn:hover {
    background: rgba(244, 67, 54, 0.9);
    border-color: #F44336;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.4);
}

/* Color Coded Icons - Green for Edit, Red for Remove */
.edit-picture-btn svg {
    color: #4CAF50;
    stroke-width: 2;
}

.remove-picture-btn svg {
    color: #F44336;
    stroke-width: 2;
}

.edit-picture-btn:hover svg {
    color: white;
    stroke-width: 2.5;
}

.remove-picture-btn:hover svg {
    color: white;
    stroke-width: 2.5;
}

.picture-status-message {
    margin-top: 5px;
    font-weight: bold;
    min-height: 20px;
    font-size: 0.85em;
    text-align: center;
    width: 100%;
    color: #ccc;
}

/* Personal Info Fields Column */
.personal-info-fields {
    flex: 1;
}

/* Form Layout */
.info-grid {
    display: flex;
    flex-direction: column;
    gap: 25px;
    width: 100%;
}

.form-row {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    width: 100%;
}

.form-group {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.form-group label {
    font-weight: bold;
    color: #ccc;
    margin-bottom: 8px;
    font-size: 0.95em;
    white-space: nowrap;
}

/* Main Info Row */
.main-info-row .form-group {
    flex: 1;
    min-width: 200px;
}

.main-info-row input {
    width: 100%;
}

/* Optional Info Row */
.optional-info-row {
    justify-content: flex-start;
    gap: 25px;
}

.compact-group {
    flex: 0 1 auto;
    min-width: 120px;
    max-width: 150px;
}

.compact-input {
    width: 100%;
    min-width: 100px;
    max-width: 140px;
    padding: 12px 15px;
    border: 1px solid #333;
    border-radius: 6px;
    background-color: #1a1a1a;
    color: #fff;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

.compact-input:focus {
    border-color: #666;
    outline: none;
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.1);
}

/* Input and Textarea Styling */
.profile-section input[type="text"],
.profile-section input[type="email"],
.profile-section input[type="tel"],
.profile-section textarea {
    background-color: #1a1a1a;
    border: 1px solid #333;
    color: #fff;
    padding: 12px 15px;
    border-radius: 6px;
    transition: border-color 0.3s;
    font-size: 16px;
    box-sizing: border-box;
    width: 100%;
}

.profile-section input:focus,
.profile-section textarea:focus {
    border-color: #666;
    outline: none;
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.1);
}

.profile-section textarea {
    height: 150px;
    resize: vertical;
    margin-top: 5px;
}

/* Professional Details & Fitness Vitals Layout */
.details-flex {
    display: flex;
    gap: 50px;
}

.details-left, .vitals-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.details-right, .vitals-right {
    flex: 1;
}

.detail-row, .vital-row {
    display: flex;
    align-items: center;
    gap: 15px;
}

.detail-row label, .vital-row label {
    font-weight: bold;
    color: #ccc;
    min-width: 160px;
}

.details-right > label, .vitals-right > label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
    color: #ccc;
}

/* Save Button Styling */
.save-button-container {
    text-align: center;
    padding-top: 20px;
}

.save-profile-btn {
    background-color: #333;
    color: #fff;
    border: 1px solid #666;
    padding: 15px 40px;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 1px;
    width: 100%;
    max-width: 300px;
}

.save-profile-btn:hover {
    background-color: #444;
    border-color: #888;
    transform: translateY(-1px);
}

/* Status Message */
.profile-status-message {
    text-align: center;
    font-weight: bold;
    margin-top: 15px;
    font-size: 1.1em;
    color: #ccc;
}

/* Success and Error Messages */
.profile-status-message[style*="color: #00ffc8"] {
    color: #fff !important;
}

.profile-status-message[style*="color: #ff3333"] {
    color: #ff6b6b !important;
}

.picture-status-message[style*="color: #00ffc8"] {
    color: #fff !important;
}

.picture-status-message[style*="color: #ff3333"] {
    color: #ff6b6b !important;
}

/* ================================================= */
/* 🌙 2. CLIENT MANAGEMENT STYLES (DARK THEME) */
/* ================================================= */

.cfm-context {
    font-family: Arial, sans-serif;
    color: #f0f0f0;
    background-color: transparent;
    padding: 0 20px;
    max-width: 1200px;
    margin: 40px auto;
    box-sizing: border-box;
}

.cfm-context h2 {
    color: #fff;
    font-size: 2em;
    margin-bottom: 30px;
    text-align: center;
    border-bottom: 2px solid #666;
    padding-bottom: 15px;
}

/* Client Registration Form */
.cfm-context .cfm-registration-form {
    max-width: 100%;
    margin: 20px 0;
    padding: 30px;
}

.cfm-context .cfm-registration-form h3 {
    color: #fff;
    font-size: 1.5em;
    margin-bottom: 20px;
    border-bottom: 2px solid #666;
    padding-bottom: 10px;
}

.cfm-context .cfm-registration-form .form-group {
    margin-bottom: 20px;
}

.cfm-context .cfm-registration-form input[type='email'] {
    width: 100%;
    padding: 12px 15px;
    margin: 10px 0;
    border: 1px solid #333;
    border-radius: 6px;
    background: #1a1a1a;
    color: #f0f0f0;
    font-size: 16px;
    box-sizing: border-box;
}

.cfm-context .cfm-registration-form input[type='email']:focus {
    border-color: #666;
    outline: none;
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.1);
}

.cfm-context .cfm-registration-form .save-profile-btn {
    background: #333;
    color: #fff;
    border: 1px solid #666;
    padding: 15px 40px;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 1px;
    width: 100%;
    max-width: 300px;
    margin-top: 10px;
}

.cfm-context .cfm-registration-form .save-profile-btn:hover {
    background: #444;
    border-color: #888;
    transform: translateY(-1px);
}

/* Client List */
.cfm-context .cfm-client-list {
    margin: 20px 0;
    padding: 30px;
}

.cfm-context .cfm-client-list h3 {
    color: #fff;
    font-size: 1.5em;
    margin-bottom: 20px;
    border-bottom: 2px solid #666;
    padding-bottom: 10px;
}

.cfm-context .cfm-client-item {
    padding: 15px;
    border-bottom: 1px solid #333;
    background: #1a1a1a;
    color: #f0f0f0;
    margin-bottom: 10px;
    border-radius: 6px;
}

.cfm-context .cfm-client-item:nth-child(odd) {
    background: #0d0d0d;
}

.cfm-context .cfm-client-item strong {
    color: #fff;
    font-size: 1.1em;
}

.cfm-context .cfm-client-item small {
    color: #ccc;
    font-size: 0.9em;
}

/* Client Profiles Grid */
.cfm-context .client-profiles-section {
    padding: 30px;
}

.cfm-context .client-profiles-section h3 {
    color: #fff;
    font-size: 1.5em;
    margin-bottom: 20px;
    border-bottom: 2px solid #666;
    padding-bottom: 10px;
}

.cfm-context .client-profiles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.cfm-context .client-profile-card {
    border: 1px solid #333;
    border-radius: 12px;
    padding: 25px;
    background: #0d0d0d;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cfm-context .client-profile-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 255, 255, 0.1);
}

.cfm-context .client-profile-header {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #333;
}

.cfm-context .client-profile-picture {
    margin-right: 20px;
    flex-shrink: 0;
}

.cfm-context .client-profile-picture .profile-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #666;
}

.cfm-context .client-profile-picture .profile-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #333;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: bold;
    border: 3px solid #666;
}

.cfm-context .client-profile-info {
    flex: 1;
}

.cfm-context .client-profile-info h4 {
    margin: 0 0 8px 0;
    color: #fff;
    font-size: 1.3em;
}

.cfm-context .client-email, .cfm-context .client-phone {
    margin: 4px 0;
    color: #ccc;
    font-size: 0.95em;
}

/* Remove Client Button */
.cfm-context .remove-client-btn {
    background: #444;
    color: #fff;
    border: 1px solid #666;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.cfm-context .remove-client-btn:hover {
    background: #555;
    border-color: #ff4444;
    transform: translateY(-1px);
}

.cfm-context .remove-client-btn:disabled {
    background: #333;
    color: #888;
    cursor: not-allowed;
    transform: none;
}

/* Fitness Vitals */
.cfm-context .client-fitness-vitals h5 {
    margin: 0 0 20px 0;
    color: #fff;
    font-size: 1.2em;
    border-bottom: 1px solid #333;
    padding-bottom: 8px;
}

.cfm-context .vitals-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.cfm-context .vital-item {
    display: flex;
    flex-direction: column;
    padding: 12px;
    background: #1a1a1a;
    border-radius: 6px;
    border-left: 3px solid #666;
}

.cfm-context .vital-item label {
    font-weight: bold;
    color: #ccc;
    font-size: 0.9em;
    margin-bottom: 5px;
}

.cfm-context .vital-item span {
    color: #fff;
    font-size: 1em;
    font-weight: 500;
}

.cfm-context .health-notes {
    margin-top: 15px;
    padding: 15px;
    background: #1a1a1a;
    border-radius: 6px;
    border-left: 3px solid #666;
}

.cfm-context .health-notes label {
    font-weight: bold;
    color: #ccc;
    font-size: 0.9em;
    display: block;
    margin-bottom: 8px;
}

.cfm-context .health-notes p {
    margin: 0;
    color: #f0f0f0;
    font-size: 0.95em;
    line-height: 1.5;
}

/* ================================================= */
/* 📱 3. MOBILE RESPONSIVENESS (APPLIES TO BOTH)     */
/* ================================================= */

/* Large Tablets (1025px to 1200px) */
@media (min-width: 1025px) and (max-width: 1200px) {
    .profile-form, .cfm-context { max-width: 1100px; }
    .personal-info-container { gap: 40px; }
    .profile-picture-column { flex: 0 0 200px; }
    .profile-img-container { width: 160px; height: 160px; }
    .profile-placeholder { font-size: 54px; }
    .profile-action-overlay { gap: 12px; }
    .edit-picture-btn, .remove-picture-btn { width: 40px; height: 40px; }
    .form-row { gap: 25px; }
    .compact-group { min-width: 110px; max-width: 130px; }
    .compact-input { min-width: 90px; max-width: 120px; }
    .details-flex { gap: 40px; }
    .cfm-context .client-profiles-grid { grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); }
}

/* Tablets (769px to 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .profile-form, .cfm-context { max-width: 95%; padding: 0 20px; }
    .personal-info-container { gap: 35px; }
    .profile-picture-column { flex: 0 0 180px; }
    .profile-img-container { width: 150px; height: 150px; }
    .profile-placeholder { font-size: 48px; }
    .profile-action-overlay { gap: 10px; }
    .edit-picture-btn, .remove-picture-btn { width: 38px; height: 38px; }
    .form-row { gap: 20px; flex-wrap: wrap; }
    .main-info-row .form-group { min-width: 180px; flex: 1; }
    .optional-info-row { gap: 20px; }
    .compact-group { min-width: 100px; max-width: 120px; flex: 0 1 auto; }
    .compact-input { min-width: 80px; max-width: 110px; }
    .details-flex { gap: 35px; }
    .detail-row label, .vital-row label { min-width: 140px; }
    .cfm-context .client-profiles-grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
    .cfm-context .vitals-grid { grid-template-columns: 1fr; }
}

/* Small Tablets and Mobile (768px and below) */
@media (max-width: 768px) {
    .profile-form, .cfm-context { padding: 0 15px; margin: 20px auto; }
    .profile-section { padding: 20px; margin-bottom: 20px; border-radius: 10px; }
    .profile-section h3 { font-size: 1.3em; margin-bottom: 15px; }
    .personal-info-container { flex-direction: row; gap: 25px; align-items: flex-start; }
    .profile-picture-column { flex: 0 0 140px; }
    .profile-img-container { width: 120px; height: 120px; }
    .profile-placeholder { font-size: 42px; }
    .profile-action-overlay { gap: 8px; }
    .edit-picture-btn, .remove-picture-btn { width: 36px; height: 36px; }
    .edit-picture-btn svg, .remove-picture-btn svg { width: 18px; height: 18px; }
    .form-row { flex-direction: column; gap: 15px; }
    .main-info-row .form-group, .compact-group { min-width: auto; max-width: none; width: 100%; }
    .compact-input { min-width: auto; max-width: none; width: 100%; }
    .optional-info-row { gap: 15px; }
    .details-flex { flex-direction: column; gap: 25px; }
    .detail-row, .vital-row { flex-direction: column; align-items: flex-start; gap: 8px; }
    .detail-row label, .vital-row label { min-width: auto; width: 100%; }
    .profile-section textarea { height: 120px; }
    .save-profile-btn { padding: 16px 30px; font-size: 1.2em; }
    
    /* CFM Context mobile adjustments */
    .cfm-context .client-profiles-grid { grid-template-columns: 1fr; }
    .cfm-context .client-profile-header { flex-direction: column; text-align: center; }
    .cfm-context .client-profile-picture { margin-right: 0; margin-bottom: 15px; }
    .cfm-context .vitals-grid { grid-template-columns: 1fr; }
}

/* Mobile Devices (480px and below) */
@media (max-width: 480px) {
    .profile-form, .cfm-context { padding: 0 10px; margin: 15px auto; }
    .profile-section { padding: 15px; border-radius: 8px; }
    .profile-section h3 { font-size: 1.2em; padding-bottom: 8px; }
    .personal-info-container { flex-direction: row; gap: 20px; align-items: flex-start; }
    .profile-picture-column { flex: 0 0 110px; }
    .profile-img-container { width: 100px; height: 100px; }
    .profile-placeholder { font-size: 36px; }
    .profile-action-overlay { gap: 6px; }
    .edit-picture-btn, .remove-picture-btn { width: 32px; height: 32px; }
    .edit-picture-btn svg, .remove-picture-btn svg { width: 16px; height: 16px; }
    .info-grid { gap: 20px; }
    .form-row { gap: 12px; }
    .details-flex { gap: 20px; }
    .detail-row, .vital-row { gap: 6px; }
    .save-profile-btn { padding: 14px 25px; font-size: 1.1em; max-width: 250px; }
    
    /* CFM Context small mobile */
    .cfm-context h2 { font-size: 1.6em; }
    .cfm-context .client-profile-picture .profile-img,
    .cfm-context .client-profile-picture .profile-placeholder {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
}

/* Very Small Mobile Devices (320px and below) */
@media (max-width: 320px) {
    .profile-form, .cfm-context { padding: 0 8px; }
    .profile-section { padding: 12px; }
    .personal-info-container { flex-direction: column; gap: 20px; align-items: center; }
    .profile-picture-column { flex: 0 0 auto; }
    .profile-img-container { width: 90px; height: 90px; }
    .profile-placeholder { font-size: 32px; }
    .profile-action-overlay { gap: 5px; }
    .edit-picture-btn, .remove-picture-btn { width: 30px; height: 30px; }
    .edit-picture-btn svg, .remove-picture-btn svg { width: 14px; height: 14px; }
    .personal-info-fields { width: 100%; }
    .save-profile-btn { padding: 12px 20px; font-size: 1em; max-width: 200px; }
}

/* Compact Input Improvements */
.compact-input {
    background-color: #1a1a1a !important;
    border: 1px solid #333 !important;
    color: #fff !important;
    padding: 10px 12px !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    transition: border-color 0.3s ease !important;
}

.compact-input:focus {
    border-color: #666 !important;
    outline: none !important;
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.1) !important;
}
