/* SLPT R27 - Client Profile Folder Option 4
   Presentation only. Existing profile data, forms, permissions and settings remain authoritative. */
:root{
  --r250-folder-surface:rgba(255,255,255,.94);
  --r250-folder-surface-2:rgba(248,250,253,.96);
  --r250-folder-line:rgba(31,41,55,.10);
  --r250-folder-shadow:0 20px 48px rgba(23,34,52,.10),0 6px 16px rgba(23,34,52,.055);
  --r250-folder-shadow-raised:0 25px 58px rgba(23,34,52,.14),0 10px 22px rgba(23,34,52,.075);
  --r250-folder-paper:rgba(255,255,255,.76);
}
html[data-theme="mist-graphite"]{
  --r250-folder-surface:rgba(17,29,45,.96);
  --r250-folder-surface-2:rgba(14,25,40,.98);
  --r250-folder-line:rgba(166,187,214,.14);
  --r250-folder-shadow:0 22px 54px rgba(0,0,0,.28),0 8px 18px rgba(0,0,0,.18);
  --r250-folder-shadow-raised:0 28px 64px rgba(0,0,0,.34),0 12px 24px rgba(0,0,0,.22);
  --r250-folder-paper:rgba(37,55,78,.74);
}

/* Staff client profile: Option 4 folder shell. */
#content.r27-profile-folder-page{overflow:visible}
.r27-profile-folder-shell{
  --r250-folder-accent:var(--accent,#3978e8);
  position:relative;
  display:grid;
  gap:0;
  margin-top:20px;
  isolation:isolate;
  overflow:visible;
}
.r27-profile-folder-shell::before{
  content:"";
  position:absolute;
  z-index:-1;
  left:24px;
  top:-17px;
  width:170px;
  height:31px;
  border:1px solid color-mix(in srgb,var(--r250-folder-accent) 36%,transparent);
  border-bottom:0;
  border-radius:14px 22px 0 0;
  background:linear-gradient(145deg,color-mix(in srgb,var(--r250-folder-accent) 84%,white),color-mix(in srgb,var(--r250-folder-accent) 68%,black));
  box-shadow:0 -4px 12px color-mix(in srgb,var(--r250-folder-accent) 15%,transparent);
  clip-path:polygon(0 100%,0 28%,8% 0,73% 0,84% 30%,100% 30%,100% 100%);
}
.r27-profile-folder-shell::after{
  content:"";
  position:absolute;
  z-index:-2;
  left:36px;
  right:18px;
  top:-8px;
  height:31px;
  border:1px solid var(--r250-folder-line);
  border-radius:16px 16px 5px 5px;
  background:var(--r250-folder-paper);
  transform:translateY(-3px) scale(.986);
  transform-origin:center bottom;
}
.r27-profile-folder-head.page-head{
  position:relative;
  z-index:2;
  margin:0!important;
  min-height:108px;
  padding:22px 24px!important;
  border:1px solid color-mix(in srgb,var(--r250-folder-accent) 27%,var(--r250-folder-line));
  border-radius:18px 18px 0 0!important;
  color:#fff!important;
  background:
    radial-gradient(circle at 88% 18%,rgba(255,255,255,.18),transparent 24%),
    linear-gradient(135deg,color-mix(in srgb,var(--r250-folder-accent) 86%,#0f172a 14%),color-mix(in srgb,var(--r250-folder-accent) 62%,#0b1220 38%))!important;
  box-shadow:var(--r250-folder-shadow-raised);
  overflow:hidden;
}
.r27-profile-folder-head.page-head::after{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:linear-gradient(115deg,rgba(255,255,255,.08),transparent 34%,rgba(255,255,255,.035) 58%,transparent 76%);
}
.r27-profile-folder-head.page-head>div:first-child{
  position:relative;
  z-index:1;
  display:grid;
  grid-template-columns:50px minmax(0,1fr);
  grid-template-areas:"avatar title" "avatar subtitle";
  align-items:center;
  column-gap:14px;
}
.r27-profile-folder-avatar{
  grid-area:avatar;
  display:grid;
  place-items:center;
  width:50px;
  height:50px;
  border-radius:50%;
  border:2px solid rgba(255,255,255,.78);
  background:rgba(255,255,255,.16);
  color:#fff;
  font-size:15px;
  font-weight:900;
  letter-spacing:.035em;
  box-shadow:0 7px 18px rgba(0,0,0,.15),inset 0 1px 0 rgba(255,255,255,.22);
}
.r27-profile-folder-head.page-head h1{grid-area:title;margin:0!important;color:#fff!important;text-shadow:0 1px 2px rgba(0,0,0,.16)}
.r27-profile-folder-head.page-head p{grid-area:subtitle;margin:4px 0 0!important;color:rgba(255,255,255,.82)!important}
.r27-profile-folder-head.page-head>.btn,
.r27-profile-folder-head.page-head>div:last-child .btn{
  position:relative;z-index:2;
  border-color:rgba(255,255,255,.24)!important;
  background:rgba(255,255,255,.11)!important;
  color:#fff!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.16)!important;
}
.r27-profile-folder-head.page-head>.btn:hover,
.r27-profile-folder-head.page-head>div:last-child .btn:hover{background:rgba(255,255,255,.18)!important;transform:translateY(-1px)}

.r27-profile-folder-shell>.r35-client-scope{
  position:relative;
  z-index:3;
  margin:0!important;
  border-radius:0!important;
  border-left:1px solid var(--r250-folder-line)!important;
  border-right:1px solid var(--r250-folder-line)!important;
  border-top:0!important;
  border-bottom:1px solid var(--r250-folder-line)!important;
  box-shadow:none!important;
}
.r27-profile-folder-tabs.profile-tabs,
.r27-profile-folder-tabs.r25-profile-tabs{
  position:relative;
  z-index:3;
  display:flex!important;
  gap:4px!important;
  width:100%!important;
  max-width:none!important;
  margin:0!important;
  padding:8px 10px!important;
  border:1px solid var(--r250-folder-line)!important;
  border-top:0!important;
  border-radius:0!important;
  background:var(--r250-folder-surface)!important;
  overflow-x:auto;
  scrollbar-width:thin;
}
.r27-profile-folder-tabs button{
  flex:0 0 auto!important;
  min-height:35px!important;
  padding:8px 13px!important;
  border:1px solid transparent!important;
  border-radius:10px!important;
  background:transparent!important;
  color:var(--muted,#6b7280)!important;
  box-shadow:none!important;
}
.r27-profile-folder-tabs button:hover{background:color-mix(in srgb,var(--r250-folder-accent) 8%,transparent)!important;color:var(--text,#1f2937)!important}
.r27-profile-folder-tabs button.active{
  border-color:color-mix(in srgb,var(--r250-folder-accent) 24%,transparent)!important;
  background:color-mix(in srgb,var(--r250-folder-accent) 12%,var(--r250-folder-surface))!important;
  color:var(--r250-folder-accent)!important;
  box-shadow:inset 0 -2px 0 color-mix(in srgb,var(--r250-folder-accent) 82%,transparent)!important;
}
.r27-profile-folder-panel.panel{
  position:relative;
  z-index:2;
  margin:0!important;
  padding:18px!important;
  border:1px solid var(--r250-folder-line)!important;
  border-top:0!important;
  border-radius:0 0 18px 18px!important;
  background:linear-gradient(180deg,var(--r250-folder-surface),var(--r250-folder-surface-2))!important;
  box-shadow:var(--r250-folder-shadow)!important;
  min-height:220px;
}
.r27-profile-folder-panel .r36-profile-section,
.r27-profile-folder-panel .r25-profile-disclosure,
.r27-profile-folder-panel .tool-card,
.r27-profile-folder-panel .list-row{
  box-shadow:0 8px 20px rgba(19,30,46,.055),inset 0 1px 0 rgba(255,255,255,.34);
}
html[data-theme="mist-graphite"] .r27-profile-folder-panel .r36-profile-section,
html[data-theme="mist-graphite"] .r27-profile-folder-panel .r25-profile-disclosure,
html[data-theme="mist-graphite"] .r27-profile-folder-panel .tool-card,
html[data-theme="mist-graphite"] .r27-profile-folder-panel .list-row{
  box-shadow:0 9px 22px rgba(0,0,0,.17),inset 0 1px 0 rgba(255,255,255,.025);
}

/* Clinician assigned-client cards use the same folder language without exposing new data/actions. */
.r26c-client.r27-clinician-profile-folder{
  position:relative;
  overflow:visible!important;
  margin-top:14px;
  border-color:color-mix(in srgb,var(--r26c-role-accent,#0f766e) 24%,var(--r250-folder-line))!important;
  box-shadow:var(--r250-folder-shadow)!important;
  background:linear-gradient(180deg,var(--r250-folder-surface),var(--r250-folder-surface-2))!important;
}
.r26c-client.r27-clinician-profile-folder::before{
  content:"";
  position:absolute;
  left:15px;
  top:-13px;
  width:88px;
  height:18px;
  border-radius:9px 13px 0 0;
  background:linear-gradient(145deg,color-mix(in srgb,var(--r26c-role-accent,#0f766e) 82%,white),var(--r26c-role-accent,#0f766e));
  clip-path:polygon(0 100%,0 25%,10% 0,70% 0,82% 32%,100% 32%,100% 100%);
  pointer-events:none;
}

/* Client/App-only self account: visual folder treatment in place; Settings order is untouched. */
#content.r27-self-account-folder-page>.page-head{margin-bottom:14px}
.r27-self-account-folder{
  position:relative;
  overflow:visible!important;
  margin-top:22px!important;
  border-color:color-mix(in srgb,var(--accent,#3978e8) 22%,var(--r250-folder-line))!important;
  background:linear-gradient(180deg,var(--r250-folder-surface),var(--r250-folder-surface-2))!important;
  box-shadow:var(--r250-folder-shadow)!important;
}
.r27-self-account-folder::before{
  content:"Account";
  position:absolute;
  left:17px;
  top:-22px;
  min-width:92px;
  height:26px;
  display:flex;
  align-items:center;
  padding:0 13px;
  border-radius:11px 15px 0 0;
  background:linear-gradient(145deg,color-mix(in srgb,var(--accent,#3978e8) 82%,white),color-mix(in srgb,var(--accent,#3978e8) 78%,black));
  color:#fff;
  font-size:10px;
  font-weight:850;
  letter-spacing:.06em;
  text-transform:uppercase;
  pointer-events:none;
  box-shadow:0 -3px 10px color-mix(in srgb,var(--accent,#3978e8) 15%,transparent);
}
.r27-self-account-folder[data-r27-self-folder="security"]::before{content:"Security"}

@media(max-width:900px){
  .r27-profile-folder-shell{margin-top:16px}
  .r27-profile-folder-shell::before{left:15px;width:125px;top:-14px;height:25px}
  .r27-profile-folder-shell::after{left:24px;right:10px;height:25px}
  .r27-profile-folder-head.page-head{min-height:auto;padding:18px!important;border-radius:16px 16px 0 0!important}
  .r27-profile-folder-head.page-head>div:first-child{grid-template-columns:42px minmax(0,1fr);column-gap:11px}
  .r27-profile-folder-avatar{width:42px;height:42px;font-size:13px}
  .r27-profile-folder-tabs.profile-tabs,.r27-profile-folder-tabs.r25-profile-tabs{padding:7px 8px!important}
  .r27-profile-folder-tabs button{padding:7px 10px!important;font-size:11px!important}
  .r27-profile-folder-panel.panel{padding:12px!important;border-radius:0 0 15px 15px!important}
}
@media(max-width:560px){
  .r27-profile-folder-head.page-head{display:grid!important;gap:12px!important}
  .r27-profile-folder-head.page-head>div:first-child{grid-template-columns:38px minmax(0,1fr)}
  .r27-profile-folder-avatar{width:38px;height:38px}
  .r27-profile-folder-tabs button{min-height:33px!important;padding:7px 9px!important}
}
@media(prefers-reduced-motion:reduce){
  .r27-profile-folder-head.page-head>.btn,
  .r27-profile-folder-head.page-head>div:last-child .btn,
  .r27-profile-folder-tabs button{transition:none!important}
}
