/* Icon rail and clinic configuration. Never transform the clinical footer's ancestors. */
:root {
  --rail: 76px;
  --expanded-rail: 280px;
}
.xp-settings-body {
  display: grid;
  gap: 18px;
  padding: 28px;
}
.xp-settings-body h2 {
  font-size: 23px;
  margin: 0;
}
.xp-settings-body p {
  margin: 0;
  line-height: 1.6;
}
.xp-choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}
.xp-choice {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 12px 16px;
  background: #f5faf7;
  border: 1px solid #dce9e2;
  border-radius: 14px;
  cursor: pointer;
}
.xp-choice:has(:checked) {
  border-color: #80baa6;
  background: #eaf5ef;
}
.xp-choice input,
.xp-field-row > input {
  width: 20px;
  height: 20px;
  accent-color: #177c72;
  flex-shrink: 0;
}
.xp-field-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.xp-field-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #f7faf8;
  border: 1px solid #e4ece7;
  padding: 14px;
  border-radius: 14px;
}
.xp-field-row label {
  flex: 1;
  min-width: 0;
}
.xp-field-row label span {
  display: block;
  font-size: 12px;
  color: #5e7c70;
  margin-bottom: 7px;
}
.xp-field-row input[type='text'] {
  width: 100%;
  font-size: 15px;
  padding: 10px 12px;
  min-height: 44px;
}
.xp-savebar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 22px;
  margin-bottom: 24px;
  background: #eaf4ef;
  border-radius: 18px;
}
.xp-savebar span {
  margin-right: auto;
  flex-basis: 100%;
  font-size: 14px;
  color: #4d6c5f;
}
.xp-custom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #e5eee8;
  padding: 18px 0;
}
.xp-custom-row small {
  display: block;
  color: #6c8479;
  margin-top: 7px;
}
.xp-history-note {
  display: block;
  border-radius: 10px;
  padding: 10px 14px;
  background: #f1f4f2;
  color: #63746b;
  font-size: 13px;
  margin: 8px 0;
}
.xp-priority {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 28px;
  margin: 0 0 28px;
  border-radius: 24px;
  border: 1px solid #cddfd5;
  background: linear-gradient(115deg, #e8f4ed, #f8fbf9);
  box-shadow: 0 12px 32px #214b3210;
}
.xp-priority-icon {
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  background: #177c72;
  color: white;
  border-radius: 20px;
  flex-shrink: 0;
}
.xp-priority-icon .icon {
  width: 30px;
  height: 30px;
}
.xp-priority h2 {
  font-size: 26px;
  letter-spacing: -0.7px;
  margin: 7px 0;
}
.xp-priority p {
  color: #577468;
  margin: 0;
  line-height: 1.5;
}
.xp-priority-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-left: auto;
  max-width: 360px;
}
[hidden] {
  display: none !important;
}
@media (min-width: 768px) {
  body.menu-open {
    overflow: auto;
  }
  body .sidebar {
    width: var(--rail);
    padding: 14px 10px;
    transform: none !important;
    visibility: visible !important;
    border-radius: 0;
    box-shadow: none;
    overflow-x: hidden;
    overflow-y: auto;
    transition:
      width 240ms cubic-bezier(0.22, 1, 0.36, 1),
      padding 240ms;
    background: #fbfdfc;
  }
  .main-shell {
    margin-left: var(--rail);
    transition: margin-left 240ms cubic-bezier(0.22, 1, 0.36, 1);
  }
  .topbar {
    margin-left: calc(-1 * var(--rail));
    transition: margin-left 240ms cubic-bezier(0.22, 1, 0.36, 1);
  }
  .cl-work-footer {
    left: var(--rail);
    transition: left 240ms cubic-bezier(0.22, 1, 0.36, 1);
  }
  .sidebar .nav-item {
    padding: 12px;
    min-height: 48px;
    gap: 14px;
    white-space: nowrap;
  }
  .sidebar .nav-icon {
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: 24px;
  }
  .sidebar .nav-icon .icon {
    width: 23px;
    height: 23px;
    transition:
      transform 170ms,
      color 170ms;
  }
  .sidebar .nav-item:hover .nav-icon .icon {
    transform: translateY(-2px);
  }
  body:not(.menu-open) .sidebar .nav-item > span:not(.nav-icon),
  body:not(.menu-open) .sidebar .nav-expand,
  body:not(.menu-open) .sidebar .nav-submenu,
  body:not(.menu-open) .sidebar > .workspace-card,
  body:not(.menu-open) .sidebar .drawer-heading,
  body:not(.menu-open) .sidebar .nav-label,
  body:not(.menu-open) .sidebar .sidebar-bottom {
    display: none;
  }
  body:not(.menu-open) .nav-group.has-children .nav-item {
    padding-right: 12px;
    justify-content: center;
  }
  .nav-overlay,
  body.menu-open .nav-overlay {
    display: none;
  }
  body.menu-open .sidebar {
    width: var(--expanded-rail);
    padding: 18px 15px 20px;
  }
  body.menu-open .main-shell {
    margin-left: var(--expanded-rail);
  }
  body.menu-open .topbar {
    margin-left: calc(-1 * var(--expanded-rail));
  }
  body.menu-open .cl-work-footer {
    left: var(--expanded-rail);
  }
}
@media (max-width: 1050px) {
  .xp-priority {
    flex-wrap: wrap;
  }
  .xp-priority-actions {
    max-width: none;
    margin-left: 0;
    justify-content: flex-start;
  }
  .xp-field-list {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 767px) {
  .main-shell,
  .topbar {
    margin-left: 0;
  }
  .cl-work-footer {
    left: 0;
  }
  .sidebar {
    width: 300px;
  }
  .xp-settings-body {
    padding: 20px;
  }
  .xp-priority {
    padding: 22px;
    gap: 16px;
  }
  .xp-priority h2 {
    font-size: 23px;
  }
  .xp-priority-icon {
    width: 52px;
    height: 52px;
  }
  .xp-choices {
    grid-template-columns: 1fr;
  }
  .xp-savebar .btn {
    width: 100%;
  }
}
@media (prefers-reduced-motion: reduce) {
  .sidebar,
  .main-shell,
  .topbar,
  .cl-work-footer,
  .nav-icon .icon {
    transition: none !important;
  }
}
