/* Hangar · Person profile redesign
   Scoped to .person-profile-page so the rest of Hangar keeps its current UI. */
.app-authenticated .person-profile-page{
  --person-line:#e7dddb;
  --person-soft:#f8f4f3;
  --person-softer:#fcfaf9;
  --person-ink:#302426;
  --person-muted:#7f7173;
  --person-wine:#9e2a2d;
  --person-wine-dark:#7f2024;
  max-width:1320px;
  margin:0 auto;
  counter-reset:person-section;
}

.app-authenticated .person-profile-hero{
  position:relative;
  overflow:hidden;
  display:grid;
  grid-template-columns:auto minmax(0,1fr) minmax(260px,auto);
  gap:22px;
  align-items:center;
  padding:28px 30px!important;
  border-radius:20px!important;
  background:
    radial-gradient(circle at 92% 8%,rgba(158,42,45,.08),transparent 18rem),
    linear-gradient(145deg,#fff 0%,#fff 66%,#fbf4f3 100%)!important;
}
.app-authenticated .person-profile-hero:before{
  content:"";
  position:absolute;
  left:0;top:0;bottom:0;
  width:5px;
  background:linear-gradient(180deg,#b94449,var(--person-wine-dark));
}
.app-authenticated .person-profile-hero .avatar.large{
  width:72px;height:72px;
  border-radius:20px!important;
  font-size:24px;
  background:linear-gradient(145deg,#3a292c,#6f4347)!important;
}
.app-authenticated .person-profile-hero .profile-title h1{
  margin:3px 0 7px;
  font-size:clamp(29px,2.8vw,40px);
}
.app-authenticated .person-profile-hero .profile-title>p{
  margin:0 0 12px;
  font-size:14px;
  color:var(--person-muted);
}
.app-authenticated .person-profile-hero .profile-meta{
  gap:8px 14px;
  font-size:12px;
}
.app-authenticated .person-profile-hero .hero-actions{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:9px;
  min-width:300px;
}
.app-authenticated .person-profile-hero .hero-actions .button{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:40px;
  text-align:center;
}

.app-authenticated .person-profile-nav{
  position:sticky;
  top:76px;
  z-index:20;
  display:flex;
  gap:7px;
  margin:14px 0 18px;
  padding:10px;
  border:1px solid rgba(225,214,211,.92);
  border-radius:15px;
  background:rgba(248,245,244,.94)!important;
  box-shadow:0 8px 24px rgba(42,25,28,.055);
  backdrop-filter:blur(14px);
}
.app-authenticated .person-profile-nav a{
  padding:8px 11px!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
  font-size:11px;
  font-weight:760;
  color:#655759!important;
}
.app-authenticated .person-profile-nav a:hover,
.app-authenticated .person-profile-nav a:focus{
  background:#fff!important;
  color:var(--person-wine-dark)!important;
}

.app-authenticated .person-profile-form{
  display:grid;
  gap:18px;
}
.app-authenticated .person-profile-form>.panel{margin:0!important}

.app-authenticated .person-profile-section{
  position:relative;
  overflow:hidden;
  margin:18px 0!important;
  padding:26px 28px 28px!important;
  border-radius:18px!important;
  box-shadow:0 8px 30px rgba(48,28,31,.045)!important;
}
.app-authenticated .person-profile-section:before{
  content:"";
  position:absolute;
  inset:0 auto 0 0;
  width:3px;
  background:linear-gradient(180deg,rgba(158,42,45,.88),rgba(158,42,45,.22));
}
.app-authenticated .person-profile-form>.person-profile-section{
  counter-increment:person-section;
}
.app-authenticated .person-profile-form>.person-profile-section .section-head>div:first-child{
  position:relative;
  padding-left:43px;
}
.app-authenticated .person-profile-form>.person-profile-section .section-head>div:first-child:before{
  content:counter(person-section,decimal-leading-zero);
  position:absolute;
  left:0;
  top:-3px;
  display:grid;
  place-items:center;
  width:32px;
  height:32px;
  border-radius:10px;
  background:#f6e8e7;
  border:1px solid #ead4d2;
  color:var(--person-wine-dark);
  font-size:10px;
  font-weight:900;
  letter-spacing:.04em;
}
.app-authenticated .person-profile-section .section-head{
  align-items:center;
  margin-bottom:22px;
  padding-bottom:17px;
  border-bottom:1px solid #f0e8e6;
}
.app-authenticated .person-profile-section .section-head h2{
  margin:0 0 4px;
  font-size:21px;
}
.app-authenticated .person-profile-section .section-head .muted{
  max-width:760px;
  font-size:11.5px;
}
.app-authenticated .person-profile-section .section-head>button,
.app-authenticated .person-profile-section .section-head .button{
  min-width:132px;
}

/* Dense but readable desktop forms */
@media(min-width:1180px){
  .app-authenticated .person-profile-section-general .form-grid,
  .app-authenticated .person-profile-section-laboral .form-grid{
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:15px 17px;
  }
  .app-authenticated .person-profile-section-general .form-grid>.span-2,
  .app-authenticated .person-profile-section-laboral .form-grid>.span-2{
    grid-column:span 2;
  }
  .app-authenticated .person-profile-section-evaluadores .form-grid,
  .app-authenticated .person-profile-section-perfil .form-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}
.app-authenticated .person-profile-section .form-grid label{
  gap:7px;
  min-width:0;
  font-size:11px;
  letter-spacing:.01em;
}
.app-authenticated .person-profile-section .form-grid input:not([type=checkbox]):not([type=radio]),
.app-authenticated .person-profile-section .form-grid select,
.app-authenticated .person-profile-section .form-grid textarea{
  min-height:44px;
  padding:10px 12px;
  border-radius:10px!important;
  background:#fff!important;
}
.app-authenticated .person-profile-section .form-grid textarea{
  min-height:84px;
}
.app-authenticated .person-profile-section .form-grid input[readonly]{
  background:#f6f3f2!important;
  color:#776a6b!important;
  font-weight:700;
}
.app-authenticated .person-profile-section .org-summary{
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:11px;
  margin-top:20px;
}
.app-authenticated .person-profile-section .org-summary>div{
  min-height:72px;
  padding:13px 14px;
  border-color:#eadfdd;
  background:linear-gradient(145deg,#fbf9f8,#f7f3f2);
}
.app-authenticated .person-profile-section .org-summary small{
  color:#8b7b7d;
  font-size:9.5px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.045em;
}
.app-authenticated .person-profile-section .org-summary strong{
  display:block;
  margin-top:5px;
  color:#3b2d2f;
  line-height:1.35;
}

/* Secondary record sections */
.app-authenticated .person-profile-related-section{
  background:linear-gradient(180deg,#fff,#fdfbfa)!important;
}
.app-authenticated .person-related-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:18px;
  margin-bottom:18px;
  padding-bottom:15px;
  border-bottom:1px solid #f0e8e6;
}
.app-authenticated .person-related-head>div{
  display:flex;
  align-items:center;
  gap:10px;
}
.app-authenticated .person-related-head h3{
  margin:0;
  font-size:20px;
}
.app-authenticated .person-related-head p{
  margin:2px 0 0;
  font-size:11.5px;
}
.app-authenticated .person-section-index{
  display:grid;
  place-items:center;
  width:32px;height:32px;
  border-radius:10px;
  border:1px solid #e7d4d3;
  background:#f6e8e7;
  color:var(--person-wine-dark);
  font-size:10px;
  font-weight:900;
}
.app-authenticated .person-profile-related-section table{
  overflow:hidden;
  border:1px solid #eee5e3;
  border-radius:12px;
}
.app-authenticated .person-profile-related-section details{
  margin-top:16px;
  padding:13px 15px;
  border:1px solid #ece2e0;
  border-radius:12px;
  background:#fbf8f7;
}
.app-authenticated .person-profile-related-section details>summary{
  color:var(--person-wine-dark);
  font-size:12px;
}

/* Long functional modules remain untouched functionally but become easier to scan */
.app-authenticated .person-profile-module-section{
  border-left-color:#dfd2cf!important;
}
.app-authenticated .person-profile-module-section>.section-head{
  margin-bottom:18px;
}
.app-authenticated .person-profile-module-section h2{
  font-size:20px!important;
}
.app-authenticated .person-profile-module-section h3{
  font-size:16px;
  margin:20px 0 10px;
}

.app-authenticated .person-profile-danger{
  margin-top:24px;
  border-radius:16px;
  box-shadow:none;
}

@media(max-width:1179px){
  .app-authenticated .person-profile-page{max-width:1040px}
  .app-authenticated .person-profile-hero{
    grid-template-columns:auto minmax(0,1fr);
  }
  .app-authenticated .person-profile-hero .hero-actions{
    grid-column:1/-1;
    grid-template-columns:repeat(4,minmax(0,1fr));
    width:100%;
  }
}
@media(max-width:900px){
  .app-authenticated .person-profile-hero{
    grid-template-columns:auto minmax(0,1fr);
    padding:22px!important;
  }
  .app-authenticated .person-profile-hero .hero-actions{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .app-authenticated .person-profile-section{padding:22px!important}
}
@media(max-width:760px){
  .app-authenticated .person-profile-page{max-width:none}
  .app-authenticated .person-profile-hero{
    grid-template-columns:1fr;
    gap:15px;
  }
  .app-authenticated .person-profile-hero .avatar.large{width:58px;height:58px;border-radius:16px!important}
  .app-authenticated .person-profile-hero .hero-actions{
    grid-column:auto;
    grid-template-columns:1fr;
    min-width:0;
  }
  .app-authenticated .person-profile-nav{
    top:64px;
    margin:10px 0 14px;
    padding:8px;
  }
  .app-authenticated .person-profile-section{padding:19px!important;margin:14px 0!important}
  .app-authenticated .person-profile-section .section-head{
    display:grid;
    gap:12px;
    align-items:start;
  }
  .app-authenticated .person-profile-section .section-head>button,
  .app-authenticated .person-profile-section .section-head .button{width:100%}
  .app-authenticated .person-related-head{display:grid}
  .app-authenticated .person-profile-section .org-summary{grid-template-columns:1fr}
}
