/* 0.13.0 · Σελίδα «Φάκελοι πελατών», αρχική «Συνεχίζουμε από εδώ» και πλαϊνά πάνελ με hover.
   Φορτώνεται τελευταίο, μετά το theme.css. */

/* ---------- Σελίδα επιλογής πελάτη & αναζήτηση ---------- */
#therapy-flow .client-picker{padding:22px 24px}
#therapy-flow .picker-row{display:flex;gap:12px;align-items:center;flex-wrap:wrap}
#therapy-flow .picker-row input[type=search]{flex:1 1 320px;min-height:50px;font-size:17px;padding:0 16px}
#therapy-flow .picker-row .primary{min-height:50px;padding:0 20px;border-radius:11px;white-space:nowrap}
#therapy-flow .picker-hint{margin:14px 2px 0}
#therapy-flow .picker-list{list-style:none;margin:14px 0 0;padding:0;display:grid;gap:8px}
#therapy-flow .picker-item{display:flex;width:100%;align-items:center;gap:12px;text-align:left;background:var(--white);border:1px solid var(--line-2);border-radius:12px;padding:12px 16px;min-height:58px}
#therapy-flow .picker-item:hover,#therapy-flow .picker-item:focus-visible{background:var(--blue-tint);border-color:var(--blue-soft)}
#therapy-flow .picker-item>span:first-child{flex:1;min-width:0}
#therapy-flow .picker-name{display:block;font-weight:600;color:var(--ink);overflow-wrap:anywhere}
#therapy-flow .picker-meta{display:block;font-size:14px;color:var(--muted)}
#therapy-flow .picker-go{color:var(--blue);font-size:20px;line-height:1}
#therapy-flow .picker-item .chip{margin:0;white-space:nowrap}
#therapy-flow .people-hint{margin:6px 4px}

/* ---------- Αρχική: «Συνεχίζουμε από εδώ» ---------- */
#therapy-flow .home-recent-actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
#therapy-flow .home-recent-toggle,#therapy-flow .home-recent-session{border-radius:11px;padding:10px 16px;font-weight:600;min-height:44px}
#therapy-flow .home-recent-toggle{background:var(--white);color:var(--blue-dark);border:1px solid var(--line)}
#therapy-flow .home-recent-toggle[aria-expanded=true]{background:var(--blue-tint);border-color:var(--blue-soft)}
#therapy-flow .home-recent-session{background:var(--white);color:var(--blue);border:1px solid var(--blue)}
#therapy-flow .home-recent-session[aria-expanded=true],#therapy-flow .home-recent-session:hover{background:var(--blue-tint)}
#therapy-flow .home-session-pick{margin:4px 0 6px;padding:16px;background:var(--white);border:1px solid var(--line-2);border-radius:14px}
#therapy-flow .home-session-pick h3{margin:0 0 10px;font-size:17px}
#therapy-flow .home-session-pick input[type=search]{width:100%;min-height:46px;font-size:16px;padding:0 14px}
#therapy-flow .home-recent [hidden]{display:none!important}

/* ---------- Πλαϊνά πάνελ ---------- */
#therapy-flow .panel-rail,#therapy-flow .panel-pin{display:none}

@media (min-width:851px){
  #therapy-flow{--rail:42px;--clients-w:288px;--sections-w:252px}
  #therapy-flow:not(.global-screen) .shell{display:block!important;position:relative;overflow:hidden}
  #therapy-flow:not(.global-screen) .shell>main{height:100%;overflow-y:auto;padding:0 var(--rail)!important;box-sizing:border-box}
  #therapy-flow.pin-clients:not(.global-screen) .shell>main{padding-right:var(--clients-w)!important}
  #therapy-flow.pin-sections:not(.global-screen) .shell>main:has(#view>nav){padding-left:var(--sections-w)!important}
  #therapy-flow:not(.global-screen) .shell>main:not(:has(#view>nav)){padding-left:0!important}
  #therapy-flow:not(.global-screen) #view:has(>nav){display:block!important;max-width:1360px;margin:0 auto;padding:22px 28px 28px!important;min-height:0}
  #therapy-flow:not(.global-screen) #view:not(:has(>nav)){max-width:1100px;margin:0 auto;padding:26px 28px}
  #therapy-flow:not(.global-screen) #view>.heading{margin-bottom:20px}

  /* κοινά για τα δύο πάνελ */
  #therapy-flow:not(.global-screen) .shell>aside,
  #therapy-flow:not(.global-screen) #view>nav{position:absolute!important;top:0;bottom:0;z-index:40;margin:0!important;align-self:stretch!important;justify-self:auto!important;min-height:0!important;height:auto!important;box-sizing:border-box;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;
    transition:transform .22s cubic-bezier(.2,.7,.2,1),box-shadow .22s ease;will-change:transform}
  #therapy-flow:not(.global-screen) .panel-rail{display:flex;position:absolute;top:0;bottom:0;width:var(--rail);flex-direction:column;align-items:center;gap:12px;padding-top:20px;box-sizing:border-box;color:var(--blue-dark);cursor:pointer;transition:opacity .15s ease;z-index:1}
  #therapy-flow:not(.global-screen) .panel-rail-icon{font-size:18px;line-height:1;color:var(--blue)}
  #therapy-flow:not(.global-screen) .panel-rail-label{writing-mode:vertical-rl;font-size:13px;font-weight:600;letter-spacing:.6px;text-transform:uppercase;color:var(--muted)}
  #therapy-flow:not(.global-screen) .panel-rail:hover .panel-rail-label{color:var(--blue-dark)}
  #therapy-flow:not(.global-screen) .panel-pin{display:flex;align-items:center;gap:8px;margin:auto 0 0;padding:12px 6px 4px;font-size:13px;font-weight:500;color:var(--muted);cursor:pointer;line-height:1.35}
  #therapy-flow:not(.global-screen) .panel-pin input{width:17px;height:17px;margin:0;flex:0 0 auto;accent-color:var(--blue)}

  /* δεξί πάνελ: πελάτες */
  #therapy-flow:not(.global-screen) .shell>aside{right:0;left:auto;width:var(--clients-w)!important;display:flex!important;flex-direction:column;gap:6px;padding:18px 16px 14px!important;background:var(--surface);border-left:1px solid var(--line);border-right:0;
    transform:translateX(calc(100% - var(--rail)))}
  #therapy-flow:not(.global-screen) .shell>aside>.panel-rail{left:0;border-right:1px solid var(--line-2);background:var(--surface)}
  #therapy-flow:not(.global-screen) .shell>aside>h3{order:1}
  #therapy-flow:not(.global-screen) .shell>aside>#search{order:2}
  #therapy-flow:not(.global-screen) .shell>aside>.field{order:3;margin:2px 0 0!important}
  #therapy-flow:not(.global-screen) .shell>aside>#people{order:4}
  #therapy-flow:not(.global-screen) .shell>aside>#add{order:5;margin:6px 0 0!important}
  #therapy-flow:not(.global-screen) .shell>aside>#finance-all{order:6;margin-top:auto!important}
  #therapy-flow:not(.global-screen) .shell>aside>#defaults{order:7;margin:0!important}
  #therapy-flow:not(.global-screen) .shell>aside>.panel-pin{order:8;margin:0!important;border-top:1px solid var(--line-2)}
  #therapy-flow:not(.global-screen) #view>nav>.panel-pin{margin-top:auto!important;border-top:1px solid var(--line-2)}
  #therapy-flow:not(.global-screen) .shell>aside #people{flex:0 1 auto;min-height:0;max-height:none;overflow:visible;margin:0 0 6px}

  /* αριστερό πάνελ: ενότητες φακέλου */
  #therapy-flow:not(.global-screen) #view>nav{left:0;right:auto;width:var(--sections-w)!important;display:flex!important;flex-direction:column;gap:4px;padding:20px 0 14px 10px!important;background:var(--white);border-right:1px solid var(--line);border-left:0;border-radius:0;box-shadow:none;
    transform:translateX(calc(-100% + var(--rail)))}
  #therapy-flow:not(.global-screen) #view>nav>.panel-rail{right:0;border-left:1px solid var(--line-2);background:var(--white)}
  #therapy-flow:not(.global-screen) #view>nav>.nav-profile{display:flex;padding:0 14px 18px 12px}
  #therapy-flow:not(.global-screen) #view>nav>button{margin-right:10px}
  #therapy-flow:not(.global-screen) #view>nav>.panel-pin{padding-left:12px;padding-right:12px}

  /* κλειστά: φαίνεται μόνο η λωρίδα */
  #therapy-flow:not(.global-screen):not(.clients-open):not(.pin-clients) .shell>aside>:not(.panel-rail),
  #therapy-flow:not(.global-screen):not(.sections-open):not(.pin-sections) #view>nav>:not(.panel-rail){opacity:0;pointer-events:none}
  #therapy-flow:not(.global-screen):not(.clients-open):not(.pin-clients) .shell>aside,
  #therapy-flow:not(.global-screen):not(.sections-open):not(.pin-sections) #view>nav{overflow:hidden}

  /* ανοιχτά (hover / εστίαση) ή μόνιμα */
  #therapy-flow.clients-open:not(.global-screen) .shell>aside,
  #therapy-flow.pin-clients:not(.global-screen) .shell>aside,
  #therapy-flow.sections-open:not(.global-screen) #view>nav,
  #therapy-flow.pin-sections:not(.global-screen) #view>nav{transform:none}
  #therapy-flow.clients-open:not(.pin-clients):not(.global-screen) .shell>aside{box-shadow:-14px 0 34px #22333b24}
  #therapy-flow.sections-open:not(.pin-sections):not(.global-screen) #view>nav{box-shadow:14px 0 34px #22333b24}
  #therapy-flow.clients-open:not(.global-screen) .shell>aside>.panel-rail,
  #therapy-flow.pin-clients:not(.global-screen) .shell>aside>.panel-rail,
  #therapy-flow.sections-open:not(.global-screen) #view>nav>.panel-rail,
  #therapy-flow.pin-sections:not(.global-screen) #view>nav>.panel-rail{opacity:0;pointer-events:none}
  #therapy-flow .shell>aside>:not(.panel-rail),#therapy-flow #view>nav>:not(.panel-rail){transition:opacity .16s ease}
}

@media (prefers-reduced-motion:reduce){
  #therapy-flow .shell>aside,#therapy-flow #view>nav,#therapy-flow .panel-rail{transition:none!important}
}
@media print{
  #therapy-flow .panel-rail,#therapy-flow .panel-pin{display:none!important}
}
#therapy-flow .home-recent-head{margin-bottom:0}
#therapy-flow .home-recent-head~*{margin-top:14px}
