/* Therapist app audit round (1405/07/30).  Light by default; colours come from the shared roles so «شب» follows. */

/* UX-T13: a focused row never hides under the sticky header or the bottom bar */
html{scroll-padding-top:72px;scroll-padding-bottom:88px}

/* UX-T6: 44 px targets for attendance and the length picker */
.f6-todo .ag-btn,.f6-p-f .ag-btn{height:44px;min-width:56px;padding:0 14px}
.f6-seg span{min-width:40px;height:40px;border-radius:20px}
.f6-seg{border-radius:22px}
.tp-unit{font-size:var(--fs-caption,13px);color:#8A5300;margin-inline-start:-2px}
.f6-todo-f{flex-wrap:wrap;row-gap:6px}
.tp-wait .ag-btn,.tp-wait .u-btn,.tp-wait .sp-btn{opacity:.55;pointer-events:none}

/* UX-T6: the undo bar */
.tp-snack{position:fixed;inset-inline:12px;bottom:calc(76px + env(safe-area-inset-bottom,0px));z-index:9990;display:flex;align-items:center;gap:12px;
  max-width:560px;margin:0 auto;padding:10px 10px 10px 16px;padding-inline-start:16px;border-radius:14px;background:var(--sp-ink,#1C1D22);color:var(--sp-surface,#fff);
  box-shadow:0 8px 24px rgba(0,0,0,.22);font-size:var(--fs-body-sm,14px);line-height:1.6}
.tp-snack[hidden]{display:none}
.tp-snack-t{flex:1;min-width:0}
.tp-snack button{flex:none;min-height:44px;padding:0 14px;border:0;border-radius:10px;background:transparent;color:inherit;font:inherit;font-weight:700;
  text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.tp-snack button:focus-visible{outline:2px solid currentColor;outline-offset:2px}
.tp-snack i{display:block;height:3px;border-radius:2px;background:currentColor;opacity:.35;transform-origin:right;animation:tp-left 6s linear forwards}
.tp-snack .tp-snack-b{display:flex;flex-direction:column;gap:6px;flex:1;min-width:0}
@keyframes tp-left{from{transform:scaleX(1)}to{transform:scaleX(0)}}
@media (prefers-reduced-motion:reduce){.tp-snack i{animation:none}}
@media (min-width:821px){.tp-snack{bottom:24px}}

/* UX-T12: income bars below the amount, full month names */
.f6-inc-main{flex-wrap:wrap}
.f6-bars{width:100%;justify-content:space-between;gap:4px}
.f6-bars>span{flex:1;width:auto;min-width:0}
.f6-bars .f6-bw{width:22px}
.f6-bars em{font-size:var(--fs-caption,12px);white-space:nowrap}

/* UX-T14: legend of the month sheet; the hour pickers of «عدم حضور» only for «ساعت مشخص» */
.tp-legend{display:flex;gap:16px;justify-content:center;margin:6px 0 0;font-size:var(--fs-caption,12.5px);color:var(--sp-ink-2)}
.tp-legend span{display:inline-flex;align-items:center;gap:6px}
.tp-legend .f6-m{position:static;display:inline-block;transform:none}
.u-mode:has(input[value=all]:checked) .u-iv{display:none}

/* UX-T15: a fieldset that looks like the old day card */
fieldset.tp-dayc{min-width:0;margin:0 0 8px}
fieldset.tp-dayc legend{float:right;width:100%;padding:0}
fieldset.tp-dayc legend+*{clear:both}

/* UX-T10: month under the first day and the 1st of a month */
.days .day .tp-mon{display:block;font-size:var(--fs-label,12px);line-height:1.2;opacity:.8}
.tp-pay{margin-top:8px}

/* UX-T22: «برگزار شد» at 4.5:1 or better */
.u-pill.ok{color:var(--sp-ok,#17703F)}

/* UX-T15: a switch per day, «same hours for the other days», the save button always in reach */
.tp-dayc{position:relative}
.tp-sw{position:absolute;inset-inline-end:12px;top:10px;display:inline-flex;align-items:center;gap:8px;min-height:44px;font-size:var(--fs-caption,13px);color:var(--sp-ink-2);cursor:pointer}
.tp-sw input{appearance:none;-webkit-appearance:none;width:44px;height:26px;margin:0;border-radius:13px;background:#8A8FA0;position:relative;transition:background .15s;cursor:pointer}
.tp-sw input::after{content:"";position:absolute;top:3px;inset-inline-start:3px;width:20px;height:20px;border-radius:50%;background:#fff;box-shadow:0 1px 2px rgba(0,0,0,.25);transition:inset-inline-start .15s}
.tp-sw input:checked{background:var(--sp-primary,#3A4FC4)}
.tp-sw input:checked::after{inset-inline-start:21px}
.tp-sw input:focus-visible{outline:2px solid var(--sp-primary,#3A4FC4);outline-offset:2px}
.tp-dayc.tp-off .tp-dayb{display:none}
.tp-dayc.tp-off legend{opacity:.6}
.tp-copy{display:inline-flex;align-items:center;min-height:44px;margin-top:2px;padding:0;border:0;background:none;color:var(--sp-primary,#3A4FC4);font:inherit;font-size:var(--fs-caption,13px);cursor:pointer;text-decoration:underline;text-underline-offset:3px}
.tp-save{position:sticky;bottom:calc(68px + env(safe-area-inset-bottom,0px));z-index:3;box-shadow:0 6px 18px rgba(0,0,0,.12)}
@media (min-width:821px){.tp-save{bottom:16px}}
@media (prefers-reduced-motion:reduce){.tp-sw input,.tp-sw input::after{transition:none}}

/* UX-T10: booking for a client: length, way of holding, summary sheet */
.tp-svc{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 10px}
.tp-svc .chip{display:inline-flex;align-items:center;min-height:44px;padding:0 14px;border:1px solid var(--sp-line);border-radius:22px;color:inherit;text-decoration:none}
.tp-svc .chip.on{border-color:var(--sp-primary,#3A4FC4);color:var(--sp-primary,#3A4FC4);font-weight:700}
.tp-mode{border:0;margin:0 0 10px;padding:0;min-width:0}
.tp-mode legend,.tp-lbl{margin:0 0 6px;padding:0;font-size:var(--fs-label,13px);font-weight:700;color:var(--sp-ink-2)}
.tp-sum{margin:10px 0;display:grid;gap:8px}
.tp-sum div{display:flex;justify-content:space-between;gap:12px;border-bottom:1px solid var(--sp-line);padding-bottom:8px}
.tp-sum dt{color:var(--sp-ink-2)}
.tp-sum dd{margin:0;font-weight:700;text-align:end}

/* UX-T17: moving instead of cancelling; the quiet cancel link on the home card */
.tp-move{margin:8px 0;padding:10px 12px;border-radius:12px;background:var(--sp-primary-soft,#E8EAF6);font-size:var(--fs-body-sm,14px)}
.tp-cxl{display:inline-flex;align-items:center;min-height:44px;padding:0 6px;color:inherit;opacity:.85;font-size:var(--fs-caption,13px);text-decoration:underline;text-underline-offset:3px}

/* UX-T18: client file */
.tp-kpi-s{display:block;font-size:var(--fs-caption,12px);font-weight:400;color:var(--sp-ink-2);margin-top:2px}
.tp-fu-more{margin-top:8px}

/* UX-T24: the saved copy shown without internet */
.tp-stale{margin:0 0 10px;padding:10px 12px;border-radius:12px;background:#FFF4E0;color:#6B4200;font-size:var(--fs-body-sm,14px)}
html[data-theme="dark"] .tp-stale{background:#3A2C10;color:#FFD9A0}

/* UX-T21: on a computer the therapist's home uses the width (two columns, reading order unchanged); no install card */
@media (min-width:1024px){
  .sp-main:has(#home-t){max-width:1040px}
  #home-t{columns:2;column-gap:24px}
  #home-t>*{break-inside:avoid}
  #home-t>.u-div,#home-t>#room-banner{column-span:all}
}
@media (min-width:1024px) and (hover:hover) and (pointer:fine){.a2hs-card{display:none!important}}

/* UX-T25: the next / current session card on home.  Name first, one main action, the rest quieter. */
.tp-nx{display:flex;flex-direction:column;gap:4px;padding:16px;border-radius:var(--shape-l,16px);color:#fff;
  background:linear-gradient(150deg,var(--sp-primary,#212E85) 0%,var(--sp-primary-dark,#17205E) 100%);box-shadow:0 10px 26px -14px var(--sp-primary,#212E85)}
.tp-nx.live{background:linear-gradient(150deg,#1E7F4F 0%,#14573A 100%);box-shadow:0 10px 26px -14px #14573A}
.tp-nx-top{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;margin-bottom:6px}
.tp-nx-st{display:inline-flex;align-items:center;gap:7px;min-height:28px;padding:0 11px;border-radius:999px;background:rgba(255,255,255,.18);
  font-size:var(--fs-label,12px);font-weight:700}
.tp-nx-dot{width:8px;height:8px;border-radius:50%;background:#7CF0B0;box-shadow:0 0 0 0 rgba(124,240,176,.7);animation:tp-pulse 1.8s ease-out infinite}
@keyframes tp-pulse{to{box-shadow:0 0 0 8px rgba(124,240,176,0)}}
@media (prefers-reduced-motion:reduce){.tp-nx-dot{animation:none}}
.tp-nx-tags{display:inline-flex;gap:6px}
.tp-nx-tag{font-size:var(--fs-label,12px);padding:3px 9px;border-radius:999px;border:1px solid rgba(255,255,255,.35)}
.tp-nx-who{font-size:var(--fs-headline,24px);line-height:1.35;font-weight:800}
.tp-nx-when{font-size:var(--fs-body,16px);opacity:.92}
.tp-nx-act{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:14px}
.tp-nx-act form{display:contents}
.tp-nx-main,.tp-nx-2{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:0 12px;border-radius:var(--shape-m,12px);
  font:inherit;font-size:var(--fs-body-sm,14px);font-weight:700;text-decoration:none;cursor:pointer;white-space:nowrap}
.tp-nx-main{grid-column:1/-1;min-height:52px;border:0;background:#fff;color:var(--sp-primary-dark,#17205E);font-size:var(--fs-body,16px)}
.tp-nx.live .tp-nx-main{color:#14573A}
.tp-nx-2{background:rgba(255,255,255,.14);color:#fff;border:1px solid rgba(255,255,255,.32)}
.tp-nx-act.one .tp-nx-2{grid-column:1/-1}
.tp-nx svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex:none}
.tp-nx-main:active,.tp-nx-2:active{filter:brightness(.94)}
.tp-nx-main:focus-visible,.tp-nx-2:focus-visible,.tp-nx-lnk:focus-visible,.tp-nx .tp-cxl:focus-visible{outline:2px solid #fff;outline-offset:2px}
.tp-nx-foot{display:flex;justify-content:space-between;align-items:center;margin-top:2px}
.tp-nx-foot:empty{display:none}
.tp-nx .tp-cxl{color:#fff}
.tp-nx-lnk{display:inline-flex;align-items:center;min-height:44px;padding:0 4px;color:#fff;font-size:var(--fs-body-sm,14px);font-weight:600;text-decoration:none}
.tp-nx-lnk .f6-chev{width:18px;height:18px;stroke:currentColor;margin-inline-start:4px}
