/* «Τακτοποίηση ημερολογίου», μήνυμα αναίρεσης ημερολογίου, παράθυρο νέου φακέλου, μικρό παράθυρο σημειώσεων.
   (Μέχρι την 0.35.0: μέρος του home29.css.) */
/* μήνυμα «Αναίρεση» */
#cal-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 3000;
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: min(680px, calc(100vw - 32px));
  padding: 10px 12px 10px 16px;
  border-radius: 12px;
  background: #22333b;
  color: #f7f9fa;
  font-size: 15px;
  box-shadow: 0 10px 30px #0003;
}
#cal-toast button {
  background: transparent;
  color: #f7f9fa;
  border: 1px solid #7c8d99;
  border-radius: 8px;
  min-height: 36px;
  padding: 0 12px;
  font-weight: 600;
}
/* Τακτοποίηση ημερολογίου */
#therapy-flow .tidy {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
#therapy-flow .tidy-back {
  align-self: flex-start;
  font-size: 15px;
}
#therapy-flow .tidy-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}
#therapy-flow .tidy-head h1 {
  margin: 0;
  font-size: 26px;
  font-weight: 600;
}
#therapy-flow .tidy-head p {
  margin: 6px 0 0;
}
#therapy-flow .tidy-count {
  font-size: 17px;
}
#therapy-flow .cal-meta,
.cal-dialog .cal-meta {
  color: var(--muted);
  font-size: 13px;
}
#therapy-flow .tidy-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
#therapy-flow .tidy-tabs button {
  border-radius: 999px;
  padding: 0 14px;
  min-height: 38px;
  border: 0;
  background: var(--blue-tint);
  color: var(--blue-dark);
  font-weight: 600;
  font-size: 14px;
}
#therapy-flow .tidy-tabs button[aria-selected='true'] {
  background: var(--navy, #16283a);
  color: #f7f9fa;
}
#therapy-flow .tidy-list {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--white);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  overflow: hidden;
}
#therapy-flow .tidy-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) 22px minmax(0, 1.25fr) 250px;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border-top: 1px solid var(--line-2);
}
#therapy-flow .tidy-row:first-child {
  border-top: 0;
}
#therapy-flow .tidy-row.uncertain {
  background: #fcf8f1;
}
#therapy-flow .tidy-when {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.35;
}
#therapy-flow .tidy-src {
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: flex-start;
  min-width: 0;
}
#therapy-flow .tidy-title {
  font-size: 16px;
  overflow-wrap: anywhere;
}
#therapy-flow .tidy-arrow {
  color: var(--muted);
  font-size: 18px;
}
#therapy-flow .tidy-file {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
#therapy-flow .tidy-file b {
  font-size: 16px;
}
#therapy-flow .tidy-pick {
  border: 0;
  margin: 0;
  padding: 0;
  gap: 8px;
}
#therapy-flow .tidy-pick label {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  cursor: pointer;
}
#therapy-flow .tidy-pick label > span {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
#therapy-flow .tidy-pick input {
  margin-top: 4px;
}
#therapy-flow .tidy-act {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: stretch;
  text-align: center;
}
#therapy-flow .tidy-act .primary {
  min-height: 42px;
  border-radius: 10px;
}
#therapy-flow .tidy-act .primary[disabled] {
  background: var(--surface-2);
  color: var(--muted);
  border-color: transparent;
}
#therapy-flow .tidy-choices {
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: flex-end;
}
#therapy-flow .tidy-choices button {
  min-height: 38px;
  padding: 0 12px;
  border-radius: 8px;
}
#therapy-flow .tidy-small {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  justify-content: center;
}
#therapy-flow .tidy-small .text-link {
  font-size: 13px;
  min-height: 26px;
  padding: 0;
}
#therapy-flow .tidy-other {
  grid-column: 2/-1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--surface);
}
#therapy-flow .tidy-other .field {
  margin: 0;
  min-width: 260px;
}
#therapy-flow .cal-note-box {
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--surface);
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
/* παράθυρο νέου φακέλου / διόρθωσης σύνδεσης */
.cal-file {
  max-width: 580px;
}
.cal-file .cal-box {
  gap: 14px;
}
.cal-file-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.cal-file-head h2 {
  margin: 0;
  font-size: 21px;
}
.cal-x {
  border: 0;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  min-width: 40px;
  min-height: 40px;
  color: var(--muted);
}
.cal-ctx {
  margin: 0;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--surface);
  font-size: 15px;
}
.cal-dup {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--warning-tint);
  border: 1px solid var(--warning-line);
  font-size: 14px;
}
.cal-dup-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.cal-dup-row > span {
  display: flex;
  flex-direction: column;
}
.cal-kind {
  border: 0;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.cal-kind legend {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  padding: 0;
}
.cal-kind label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border-radius: 10px;
  border: 1px solid var(--line);
  cursor: pointer;
}
.cal-kind label.on {
  border: 2px solid var(--blue);
  background: var(--blue-tint);
  font-weight: 600;
  color: var(--blue-dark);
}
.cal-check {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 15px;
}
.cal-check input {
  width: 18px;
  height: 18px;
  margin: 0;
}
.cal-indent {
  margin: -8px 0 0 28px;
}
.cal-box .grow,
#therapy-flow .grow {
  flex: 1;
}
/* μικρό παράθυρο σημειώσεων */
#therapy-flow .qn-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
#therapy-flow .qn-head h2 .cal-meta {
  font-size: 14px;
  font-weight: 400;
}
#therapy-flow .qn-tools {
  display: flex;
  gap: 8px;
  align-items: center;
}
#therapy-flow .qn-tools button {
  min-height: 38px;
  padding: 0 12px;
  border-radius: 8px;
}
#therapy-flow .qn-cover {
  display: none;
}
#therapy-flow .qn.qn-hidden textarea {
  filter: blur(8px);
  pointer-events: none;
  user-select: none;
}
#therapy-flow .qn.qn-hidden .qn-cover {
  display: flex;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--muted);
}
