/* ── Client Profile – Modern Layout ─────────────────────────────────── */

.profile-page { max-width: 1100px; }

/* Section cards */
.profile-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,.07);
    margin-bottom: 24px;
    overflow: hidden;
}

.profile-card-header {
    background: #f4f6f9;
    border-bottom: 1px solid #e0e0e0;
    padding: 5px 20px;
    font-size: 12px;
    font-weight: 700;
    color: #1a3a6b;
    text-transform: uppercase;
    letter-spacing: .6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Two-column field grid inside a card */
.profile-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.profile-fields.single-col { grid-template-columns: 1fr; }
.profile-fields.single-col .profile-field,
.profile-fields.single-col .profile-field:nth-child(odd) { border-right: none; }

.profile-field {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 5px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.profile-field:last-child { border-bottom: none; }

/* Odd/even column borders */
.profile-fields .profile-field:nth-child(odd) {
    border-right: 1px solid #f0f0f0;
}

.profile-label {
    font-size: 12px;
    color: #888;
    font-weight: 500;
    min-width: 140px;
    flex-shrink: 0;
    text-align: right;
}

/* Narrower labels variant — use on .profile-fields to shrink label col ~20% */
.profile-fields.narrow-labels .profile-label { min-width: 112px; }

/* Wider labels variant — use on .profile-fields when labels are long */
.profile-fields.wide-labels .profile-label { min-width: 175px; }

.profile-value {
    font-size: 13px;
    color: #212121;
    word-break: break-word;
}

/* Full-width field (spans both columns) */
.profile-field.full-width {
    grid-column: 1 / -1;
    border-right: none;
}

/* Status badges */
.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}
.badge-yes  { background: #ffebee; color: #c62828; }
.badge-no   { background: #e8f5e9; color: #2e7d32; }
.badge-warn { background: #fff8e1; color: #e65100; font-style: italic; }
.badge-ok   { background: #e3f2fd; color: #1565c0; font-style: italic; }
.badge-unknown { background: #f3f3f3; color: #666; font-style: italic; }

/* References table */
.profile-ref-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.profile-ref-table th {
    background: #f8f8f8;
    color: #555;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    padding: 5px 20px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}
.profile-ref-table td {
    padding: 5px 20px;
    border-bottom: 1px solid #f0f0f0;
    color: #212121;
}
.profile-ref-table tr:last-child td { border-bottom: none; }
.profile-ref-table tr:hover td { background: #fafafa; }
.profile-ref-empty {
    padding: 14px 20px;
    color: #aaa;
    font-size: 13px;
    font-style: italic;
}

/* Quick-nav pill bar */
.profile-quicknav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 4px 0 16px;
    margin-bottom: 0;
}
.profile-quicknav a {
    display: inline-flex;
    align-items: center;
    padding: 5px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 400;
    color: #1a3a6b;
    background: #fff;
    border: 1px solid #c8d4e8;
    text-decoration: none;
    transition: background .15s, color .15s, border-color .15s;
}
.profile-quicknav a:hover {
    background: #1a3a6b;
    color: #fff;
    border-color: #1a3a6b;
    text-decoration: none;
}

/* Action bar */
.profile-actions {
    display: flex;
    justify-content: flex-end;
    padding: 14px 20px;
    border-top: 1px solid #e0e0e0;
    background: #fafbfc;
}

.btn-profile {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 20px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, box-shadow .15s;
    text-decoration: none;
    text-transform: none;
    letter-spacing: normal;
    justify-content: center;
}
.btn-profile-primary {
    background: #1a3a6b;
    color: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.btn-profile-primary:hover { background: #4a8ec4; box-shadow: 0 2px 6px rgba(0,0,0,.2); }

/* Divider between employment entries */
.employment-divider {
    border: none;
    border-top: 2px solid #d0d0d0;
    margin: 0;
}

/* ── Edit Form ───────────────────────────────────────────────────────── */

.edit-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.edit-form-field {
    padding: 3px 14px;
    border-bottom: 1px solid #f0f0f0;
}

.edit-form-field:nth-child(odd)  { border-right: 1px solid #f0f0f0; }
.edit-form-field.full-width      { grid-column: 1 / -1; border-right: none; }

.edit-form-field > label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    letter-spacing: .4px;
    margin-bottom: 2px;
}

.edit-form-field > label.required::after { content: ' *'; color: #c62828; }

.edit-form-field input[type="text"],
.edit-form-field input[type="password"],
.edit-form-field select {
    padding: 3px 7px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 13px;
    color: #212121;
    background: #fff;
    transition: border-color .15s;
}

.edit-form-field input[type="text"]:focus,
.edit-form-field input[type="password"]:focus,
.edit-form-field select:focus {
    border-color: #1a3a6b;
    outline: none;
    box-shadow: 0 0 0 2px rgba(26,58,107,.1);
}

.edit-form-field input::placeholder          { color: #ddd; }
.edit-form-field input::-webkit-input-placeholder { color: #ddd; }
.edit-form-field input::-moz-placeholder     { color: #ddd; opacity: 1; }
.edit-form-field input:-ms-input-placeholder { color: #ddd; }

.edit-form-field .xl-box { width: 100%; max-width: 340px; box-sizing: border-box; }
.edit-form-field .lg-box { width: 100%; max-width: 260px; box-sizing: border-box; }
.edit-form-field .md-box { width: 100%; max-width: 200px; box-sizing: border-box; }
.edit-form-field .sm-box { width: 100%; max-width: 140px; box-sizing: border-box; }

/* date picker override */
.edit-form-field .input-group.date { display: flex; align-items: center; gap: 4px; }
.edit-form-field .input-group.date .form-control {
    width: 120px !important; height: 26px !important;
    padding: 3px 7px; border: 1px solid #ddd; border-radius: 5px;
    font-size: 13px;
}
.edit-form-field .input-group-addon {
    padding: 4px 24px !important; border: 1px solid #ddd;
    border-radius: 5px; cursor: pointer; background: #f4f6f9;
}

.edit-form-field .radio-group {
    display: flex; gap: 20px; align-items: center;
    margin-top: 2px; font-size: 13px; color: #212121;
}

/* section divider within a card */
.edit-section-divider {
    grid-column: 1 / -1;
    border: none;
    border-top: 2px dashed #e8eaf0;
    margin: 4px 0;
}

/* References table */
.ref-edit-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ref-edit-table th {
    background: #f8f8f8; color: #555;
    font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .5px;
    padding: 5px 14px; text-align: left;
    border-bottom: 1px solid #e0e0e0;
}
.ref-edit-table td {
    padding: 3px 10px; border-bottom: 1px solid #f0f0f0; vertical-align: middle;
}
.ref-edit-table tr:last-child td { border-bottom: none; }
.ref-edit-table input[type="text"],
.ref-edit-table select {
    width: 100%; padding: 5px 8px;
    border: 1px solid #ddd; border-radius: 4px;
    font-size: 13px; box-sizing: border-box;
}

.btn-profile-secondary {
    background: #f5f5f5; color: #444;
    border: 1px solid #ddd !important;
    font-weight: 400 !important;
}
.btn-profile-secondary:hover { background: #e8e8e8; text-decoration: none; }

.btn-profile-danger {
    background: #ffebee; color: #c62828;
    border: 1px solid #ffcdd2 !important;
    font-weight: 400 !important;
}
.btn-profile-danger:hover { background: #ffcdd2; text-decoration: none; }

.btn-profile-sm { padding: 2px 20px; font-size: 12px; line-height: 20px; }

#action-box .btn-profile { padding-top: 6px; padding-bottom: 6px; }
