/* The profile page (an employee's page for admins and HR, and My profile): a card on the left with the cover, photo and basic information;
   on the right the tabs, with each tab as cards that have a round icon, a title and, only where the person may edit, a pencil. */
.profile-layout { display: grid; grid-template-columns: minmax(0, 20rem) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
@media (max-width: 991.98px) { .profile-layout { grid-template-columns: 1fr; } }

.profile-side { overflow: hidden; background: var(--lb-surface); border: 1px solid var(--lb-border-soft); border-radius: 22px; box-shadow: var(--lb-shadow); }
.profile-cover {
  height: 7.5rem;
  background:
    radial-gradient(14rem 8rem at 85% 0%, rgba(var(--lb-accent-rgb), 0.35), transparent 70%),
    radial-gradient(12rem 8rem at 0% 100%, rgba(21, 57, 122, 0.55), transparent 70%),
    linear-gradient(120deg, var(--lb-primary-active), var(--lb-primary) 55%, var(--lb-navy-lift));
}
.profile-side-body { position: relative; padding: 0 1.4rem 1.4rem; }
.profile-photo { display: inline-block; margin-top: -3.2rem; padding: 4px; background: var(--lb-surface); border-radius: 50%; box-shadow: 0 6px 16px rgba(var(--lb-primary-rgb), 0.18); }
.profile-name { margin: 0.8rem 0 0.5rem; font-size: 1.35rem; font-weight: 700; letter-spacing: -0.01em; }
.profile-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem; margin-bottom: 0.5rem; }
.profile-code { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.15rem 0.35rem 0.15rem 0.65rem; font-size: 0.78rem; font-variant-numeric: tabular-nums; color: var(--lb-muted); background: var(--lb-hover); border-radius: 8px; }
.profile-copy { display: grid; place-items: center; width: 1.5rem; height: 1.5rem; padding: 0; color: var(--lb-muted); background: transparent; border: 0; border-radius: 6px; }
.profile-copy:hover { color: var(--lb-primary); background: var(--lb-surface); }
.profile-side-title { margin: 1.1rem 0 0.8rem; font-size: 1.05rem; font-weight: 700; }
.profile-basics { display: grid; gap: 0.95rem; margin: 0 0 1.2rem; padding: 0; list-style: none; }
.profile-basics li { display: flex; align-items: center; gap: 0.85rem; min-width: 0; }
.profile-basic-icon { display: grid; flex: none; place-items: center; width: 2.4rem; height: 2.4rem; color: var(--lb-muted); background: var(--lb-hover); border-radius: 50%; }
.profile-basics small { display: block; font-size: 0.75rem; color: var(--lb-muted); }
.profile-basics li > div { min-width: 0; }
.profile-basics li span:not(.profile-basic-icon) { display: block; overflow: hidden; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.profile-side .profile-actions { margin: 0; }

/* The pencil: a round outline button, only where the person may edit. */
.profile-edit { display: grid; flex: none; place-items: center; width: 2.4rem; height: 2.4rem; margin-left: auto; color: var(--lb-ink); text-decoration: none; background: var(--lb-surface); border: 1px solid var(--lb-border); border-radius: 50%; transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease; }
.profile-edit:hover { color: var(--lb-primary); background: var(--lb-hover); border-color: var(--lb-primary); }
.profile-photo-edit { position: absolute; top: 1rem; right: 1.4rem; margin: 0; }

/* The cards of the open tab. */
.profile-section { margin-bottom: 1.1rem; background: var(--lb-surface); border: 1px solid var(--lb-border-soft); border-radius: 22px; box-shadow: var(--lb-shadow); transition: box-shadow 0.2s var(--lb-ease), border-color 0.2s var(--lb-ease); }
.profile-section:hover { border-color: rgba(var(--lb-accent-rgb), 0.45); box-shadow: var(--lb-shadow-lg); }
.profile-section-head { display: flex; align-items: center; gap: 0.85rem; padding: 1rem 1.25rem; }
.profile-section-head h2 { margin: 0; font-size: 1.1rem; font-weight: 600; }
.profile-section-icon { display: grid; flex: none; place-items: center; width: 2.5rem; height: 2.5rem; font-size: 1.1rem; border-radius: 50%; }
.profile-section-icon.is-blue { color: #1D6FA5; background: #DDF1FB; }
.profile-section-icon.is-orange { color: #B45309; background: #FDEBD3; }
.profile-section-icon.is-green { color: var(--lb-accent-ink); background: var(--lb-accent-soft); }
.profile-section-icon.is-violet { color: var(--lb-primary); background: var(--lb-primary-soft); }
.profile-section-icon.is-teal { color: #0E7490; background: #D5F3F8; }
.profile-section-body { padding: 0 1.25rem 0.5rem; }
.profile-section .profile-fields { margin: 0; }
.profile-section .profile-fields dt, .profile-section .profile-fields dd { padding: 0.75rem 0; margin: 0; border-top: 1px solid var(--lb-border-soft); }
.profile-section .profile-fields dt:first-of-type, .profile-section .profile-fields dd:first-of-type { border-top: 0; }

/* A card in edit mode: the same card, fields in the middle, Save and Cancel at the end. */
.profile-section.is-editing { border-color: rgba(var(--lb-primary-rgb), 0.25); }
.profile-section-foot { display: flex; gap: 0.6rem; padding: 0.9rem 1.25rem 1.1rem; border-top: 1px solid var(--lb-border-soft); }
.profile-section.is-editing .profile-section-body { padding-bottom: 0.5rem; }

/* The right column stops at a comfortable width, so the cards don't run to the edge of the page. */
.profile-main { max-width: 780px; }

.profile-progress { margin: 0.4rem 0 0.2rem; padding: 0.8rem 0.9rem; background: var(--lb-hover); border-radius: var(--lb-radius); }
