:root {
  --tea-primary: #2f6682;
  --tea-primary-dark: #204b63;
  --tea-primary-soft: #eaf3f7;
  --tea-accent: #f28a5b;
  --tea-accent-soft: #fff1e9;
  --tea-success: #6fae4f;
  --tea-success-dark: #4f8934;
  --tea-success-soft: #edf7e8;
  --tea-danger: #c65454;
  --tea-warning: #d79a32;
  --tea-ink: #18303d;
  --tea-muted: #647883;
  --tea-border: #dbe6ea;
  --tea-surface: #ffffff;
  --tea-background: #f4f8f9;
  --tea-shadow-sm: 0 4px 16px rgba(25, 60, 76, 0.07);
  --tea-shadow: 0 18px 46px rgba(25, 60, 76, 0.11);
  --tea-radius-sm: 10px;
  --tea-radius: 16px;
  --tea-radius-lg: 24px;
  --tea-transition: 180ms ease;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--tea-ink);
  background: var(--tea-background);
  font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 0.95rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body.modal-open {
  padding-right: 0 !important;
}

a {
  color: var(--tea-primary);
  text-decoration: none;
}

a:hover {
  color: var(--tea-primary-dark);
}

button,
input,
select,
textarea {
  font: inherit;
}

::selection {
  color: #fff;
  background: var(--tea-primary);
}

.skip-link {
  position: fixed;
  z-index: 1100;
  top: -60px;
  left: 1rem;
  padding: 0.7rem 1rem;
  color: #fff;
  background: var(--tea-primary-dark);
  border-radius: 0 0 var(--tea-radius-sm) var(--tea-radius-sm);
  transition: top var(--tea-transition);
}

.skip-link:focus {
  top: 0;
  color: #fff;
}

.app-header {
  position: sticky;
  z-index: 1020;
  top: 0;
  border-bottom: 1px solid rgba(219, 230, 234, 0.88);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 1px 0 rgba(25, 60, 76, 0.02);
}

.app-header__inner {
  display: flex;
  min-height: 72px;
  align-items: center;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
}

.brand img {
  display: block;
  width: 146px;
  height: 48px;
  object-fit: contain;
}

.app-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.app-nav__link {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.85rem;
  color: #526a76;
  border-radius: 10px;
  font-weight: 650;
  transition: color var(--tea-transition), background var(--tea-transition);
}

.app-nav__link:hover,
.app-nav__link.is-active {
  color: var(--tea-primary-dark);
  background: var(--tea-primary-soft);
}

.app-header__actions {
  display: flex;
  margin-left: auto;
  align-items: center;
  gap: 0.75rem;
}

.user-chip {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.7rem;
}

.user-chip--trigger {
  min-height: 46px;
  padding: 0.35rem 0.6rem;
  margin: 0;
  color: inherit;
  text-align: left;
  appearance: none;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--tea-radius-sm);
  cursor: pointer;
  transition: background var(--tea-transition), border-color var(--tea-transition), box-shadow var(--tea-transition);
}

.user-chip--trigger:hover,
.user-chip--trigger[aria-expanded="true"] {
  background: var(--tea-primary-soft);
  border-color: #cfe0e7;
}

.user-chip--trigger:focus-visible {
  border-color: var(--tea-primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(47, 102, 130, 0.18);
}

.user-chip__avatar {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--tea-primary-dark);
  background: var(--tea-primary-soft);
  border-radius: 50%;
  font-weight: 800;
}

.user-chip__text {
  display: grid;
  line-height: 1.15;
}

.user-chip__name {
  max-width: 160px;
  overflow: hidden;
  color: var(--tea-ink);
  font-size: 0.88rem;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-chip__role {
  margin-top: 0.22rem;
  color: var(--tea-muted);
  font-size: 0.73rem;
}

.user-chip__caret {
  color: var(--tea-muted);
  font-size: 0.75rem;
  transition: transform var(--tea-transition);
}

.user-chip--trigger[aria-expanded="true"] .user-chip__caret {
  transform: rotate(180deg);
}

.user-menu .dropdown-menu {
  min-width: 210px;
  padding: 0.45rem;
  border: 1px solid var(--tea-border);
  border-radius: 12px;
  box-shadow: var(--tea-shadow-sm) !important;
}

.user-menu .dropdown-item {
  padding: 0.65rem 0.75rem;
  color: var(--tea-ink);
  border-radius: 8px;
  font-weight: 700;
}

.user-menu .dropdown-item:hover,
.user-menu .dropdown-item:focus {
  color: var(--tea-primary-dark);
  background: var(--tea-primary-soft);
}

.app-main {
  min-height: calc(100vh - 72px);
}

.page-container {
  width: min(100% - 2rem, 1240px);
  margin-inline: auto;
  padding-block: 2.25rem 3.5rem;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.page-header__content {
  flex: 1 1 20rem;
  min-width: 0;
}

.page-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.35rem;
  color: var(--tea-primary);
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.page-title {
  margin: 0;
  color: var(--tea-ink);
  font-size: clamp(1.65rem, 3vw, 2.2rem);
  font-weight: 780;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.page-subtitle {
  max-width: 680px;
  margin: 0.55rem 0 0;
  color: var(--tea-muted);
  font-size: 0.98rem;
}

.page-actions {
  display: flex;
  flex: 0 1 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
  flex-wrap: wrap;
  max-width: 100%;
}

.detail-nav {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin: -0.25rem 0 1.5rem;
  padding: 0.65rem;
  border: 1px solid var(--tea-border);
  background: var(--tea-surface);
  border-radius: calc(var(--tea-radius) - 4px);
  box-shadow: var(--tea-shadow-sm);
}

.detail-nav .btn {
  min-height: 38px;
  padding: 0.48rem 0.78rem;
  border-color: transparent;
  background: transparent;
}

.detail-nav .btn:hover,
.detail-nav .btn:focus-visible {
  border-color: var(--tea-primary);
  background: var(--tea-primary-soft);
}

.assignment-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.assignment-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 50px;
  padding: 0.8rem 0.95rem;
  border: 1px solid var(--tea-border);
  border-radius: var(--tea-radius-sm);
  background: var(--tea-surface);
  cursor: pointer;
  transition: border-color var(--tea-transition),
              background var(--tea-transition);
}

.assignment-item:hover {
  border-color: var(--tea-primary);
  background: var(--tea-primary-soft);
}

.assignment-item input {
  flex: 0 0 auto;
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--tea-primary);
}

.assignment-item:has(input:checked) {
  border-color: var(--tea-primary);
  background: var(--tea-primary-soft);
  color: var(--tea-primary-dark);
  font-weight: 700;
}

.surface-card {
  overflow: hidden;
  border: 1px solid var(--tea-border);
  background: var(--tea-surface);
  border-radius: var(--tea-radius);
  box-shadow: var(--tea-shadow-sm);
}

.surface-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.4rem;
  border-bottom: 1px solid var(--tea-border);
}

.surface-card__body {
  padding: 1.4rem;
}

.surface-card__footer {
  padding: 1rem 1.4rem;
  border-top: 1px solid var(--tea-border);
  background: #fbfcfd;
}

.section-title {
  margin: 0;
  color: var(--tea-ink);
  font-size: 1rem;
  font-weight: 750;
}

.section-caption {
  margin: 0.25rem 0 0;
  color: var(--tea-muted);
  font-size: 0.84rem;
}

.btn {
  --bs-btn-padding-y: 0.62rem;
  --bs-btn-padding-x: 1rem;
  --bs-btn-font-size: 0.9rem;
  --bs-btn-font-weight: 700;
  --bs-btn-border-radius: 10px;
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: transform var(--tea-transition), box-shadow var(--tea-transition),
    color var(--tea-transition), background var(--tea-transition),
    border-color var(--tea-transition);
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--tea-primary);
  --bs-btn-border-color: var(--tea-primary);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--tea-primary-dark);
  --bs-btn-hover-border-color: var(--tea-primary-dark);
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: var(--tea-primary-dark);
  --bs-btn-active-border-color: var(--tea-primary-dark);
  box-shadow: 0 6px 14px rgba(47, 102, 130, 0.17);
}

.btn-success {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--tea-success-dark);
  --bs-btn-border-color: var(--tea-success-dark);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #3f7329;
  --bs-btn-hover-border-color: #3f7329;
}

.btn-outline-primary {
  --bs-btn-color: var(--tea-primary);
  --bs-btn-border-color: #a9c4d1;
  --bs-btn-hover-color: var(--tea-primary-dark);
  --bs-btn-hover-bg: var(--tea-primary-soft);
  --bs-btn-hover-border-color: var(--tea-primary);
  --bs-btn-active-color: var(--tea-primary-dark);
  --bs-btn-active-bg: var(--tea-primary-soft);
  --bs-btn-active-border-color: var(--tea-primary);
}

.btn-outline-secondary {
  --bs-btn-color: #526a76;
  --bs-btn-border-color: #c7d4d9;
  --bs-btn-hover-color: var(--tea-ink);
  --bs-btn-hover-bg: #eef3f5;
  --bs-btn-hover-border-color: #b7c8cf;
}

.btn-outline-danger {
  --bs-btn-color: var(--tea-danger);
  --bs-btn-border-color: #e2b0b0;
  --bs-btn-hover-color: #a43f3f;
  --bs-btn-hover-bg: #fff0f0;
  --bs-btn-hover-border-color: #d68d8d;
}

.btn-light {
  --bs-btn-bg: #f4f7f8;
  --bs-btn-border-color: #e0e9ec;
  --bs-btn-hover-bg: #eaf0f2;
  --bs-btn-hover-border-color: #cad9df;
}

.btn-icon {
  width: 42px;
  padding-inline: 0;
}

.btn-sm {
  --bs-btn-padding-y: 0.42rem;
  --bs-btn-padding-x: 0.72rem;
  --bs-btn-font-size: 0.8rem;
  min-height: 34px;
  border-radius: 8px;
}

.form-label {
  margin-bottom: 0.42rem;
  color: #334d5a;
  font-size: 0.83rem;
  font-weight: 720;
}

.form-control,
.form-select {
  min-height: 46px;
  padding: 0.66rem 0.82rem;
  color: var(--tea-ink);
  border: 1px solid #cbd9de;
  background-color: #fff;
  border-radius: var(--tea-radius-sm);
  font-size: 0.92rem;
  transition: border-color var(--tea-transition), box-shadow var(--tea-transition),
    background var(--tea-transition);
}

textarea.form-control {
  min-height: 112px;
  resize: vertical;
}

.form-control:hover,
.form-select:hover {
  border-color: #aebfc6;
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus {
  border-color: var(--tea-primary);
  box-shadow: 0 0 0 0.22rem rgba(47, 102, 130, 0.13);
}

.form-control::placeholder {
  color: #94a4ac;
}

.form-control:disabled,
.form-control[readonly],
.form-select:disabled {
  color: #627781;
  border-color: #dfe8eb;
  background-color: #f4f7f8;
  opacity: 1;
}

.input-group .form-control {
  min-width: 0;
}

.input-group-text {
  color: var(--tea-muted);
  border-color: #cbd9de;
  background: #fff;
}

.search-field {
  position: relative;
  min-width: min(100%, 280px);
}

.search-field > i {
  position: absolute;
  z-index: 4;
  top: 50%;
  left: 0.9rem;
  color: #71858f;
  transform: translateY(-50%);
  pointer-events: none;
}

.search-field .form-control {
  padding-left: 2.55rem;
}

.form-text {
  color: var(--tea-muted);
  font-size: 0.78rem;
}

.field-error {
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
  margin-top: 0.35rem;
  color: var(--tea-danger);
  font-size: 0.78rem;
  font-weight: 600;
}

.responsible-status {
  display: flex;
  min-height: 46px;
  padding: 0.7rem 0.85rem;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--tea-border);
  border-radius: var(--tea-radius-sm);
  font-size: 0.8rem;
  font-weight: 650;
}

.responsible-status--muted,
.responsible-status--loading {
  color: #60747d;
  background: #f7fafb;
}

.responsible-status--success {
  color: #3d7826;
  border-color: #cee3c4;
  background: var(--tea-success-soft);
}

.responsible-status--error {
  color: #943f3f;
  border-color: #edcccc;
  background: #fff1f1;
}

.form-check-input {
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.16rem;
  border-color: #afc0c7;
}

.form-check-input:checked {
  border-color: var(--tea-primary);
  background-color: var(--tea-primary);
}

.choice-card {
  display: flex;
  padding: 1rem;
  align-items: flex-start;
  gap: 0.75rem;
  border: 1px solid var(--tea-border);
  background: #fbfcfd;
  border-radius: 12px;
}

.form-section {
  padding: 1.5rem;
  border: 1px solid var(--tea-border);
  background: var(--tea-surface);
  border-radius: var(--tea-radius);
  box-shadow: var(--tea-shadow-sm);
}

.form-section + .form-section {
  margin-top: 1rem;
}

.form-section__header {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  margin-bottom: 1.35rem;
}

.form-section__icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--tea-primary);
  background: var(--tea-primary-soft);
  border-radius: 10px;
  font-size: 1rem;
}

.form-section__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 760;
}

.form-section__description {
  margin: 0.2rem 0 0;
  color: var(--tea-muted);
  font-size: 0.82rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1rem;
}

.field-col-12 {
  grid-column: span 12;
}

.field-col-8 {
  grid-column: span 8;
}

.field-col-6 {
  grid-column: span 6;
}

.field-col-4 {
  grid-column: span 4;
}

.field-col-3 {
  grid-column: span 3;
}

.form-actions {
  position: sticky;
  z-index: 10;
  bottom: 1rem;
  display: flex;
  margin-top: 1rem;
  padding: 0.85rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid rgba(203, 217, 222, 0.92);
  background: rgba(255, 255, 255, 0.95);
  border-radius: 14px;
  box-shadow: 0 12px 36px rgba(25, 60, 76, 0.14);
  backdrop-filter: blur(12px);
}

.form-actions__group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.choice-list {
  display: flex;
  margin: 0;
  padding: 0.75rem;
  gap: 0.55rem 1.25rem;
  flex-wrap: wrap;
  list-style: none;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
  background: var(--tea-surface);
}

.choice-list > div,
.choice-list li {
  margin: 0;
}

.choice-list label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
}

.choice-list input {
  width: 1rem;
  height: 1rem;
}

.filter-bar {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.filter-bar__search {
  flex: 1 1 280px;
}

.filter-bar__sort {
  flex: 0 1 210px;
}

.table-responsive {
  scrollbar-color: #bdcdd3 transparent;
  scrollbar-width: thin;
}

.data-table {
  width: 100%;
  margin: 0;
  vertical-align: middle;
}

.data-table > :not(caption) > * > * {
  padding: 0.95rem 1rem;
  border-bottom-color: #e5edef;
}

.data-table thead th {
  color: #5e737d;
  background: #f7fafb;
  border-bottom-width: 1px;
  font-size: 0.71rem;
  font-weight: 800;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  white-space: nowrap;
}

.data-table tbody tr {
  transition: background var(--tea-transition);
}

.data-table tbody tr:hover {
  background: #f8fbfc;
}

.data-table tbody td {
  color: #3b535f;
}

.entity-cell {
  display: flex;
  min-width: 190px;
  align-items: center;
  gap: 0.75rem;
}

.entity-avatar {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--tea-primary-dark);
  background: var(--tea-primary-soft);
  border-radius: 11px;
  font-size: 0.83rem;
  font-weight: 800;
  text-transform: uppercase;
}

.entity-name {
  display: block;
  color: var(--tea-ink);
  font-weight: 720;
}

.password-change-page {
  width: min(100% - 2rem, 680px);
  padding-block: clamp(2.75rem, 7vh, 5rem);
}

.password-change-page .page-header {
  justify-content: center;
  margin-bottom: 1.75rem;
}

.password-change-page .page-header__content {
  text-align: center;
}

.password-change-page .page-eyebrow {
  justify-content: center;
}

.password-change-page .page-subtitle {
  margin-inline: auto;
}

.password-change-card {
  width: 100%;
  padding: clamp(1.5rem, 4vw, 2.4rem);
  box-shadow: var(--tea-shadow);
}

.password-change-form .form-label {
  margin-bottom: 0.5rem;
  font-weight: 750;
}

.password-change-form .form-text {
  margin-top: 0.7rem;
  padding: 0.75rem 0.9rem;
  color: var(--tea-muted);
  background: #f7fafb;
  border: 1px solid var(--tea-border);
  border-radius: var(--tea-radius-sm);
}

.password-change-form .form-text ul {
  margin: 0;
  padding-left: 1.05rem;
}

.password-change-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  flex-wrap: wrap;
  padding-top: 1.25rem;
  margin-top: 1.5rem;
  border-top: 1px solid var(--tea-border);
}

.entity-name-line {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
}

.student-plan-warning {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  color: var(--tea-warning);
  font-size: 0.95rem;
}

.entity-meta {
  display: block;
  margin-top: 0.12rem;
  color: var(--tea-muted);
  font-size: 0.76rem;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  font-size: 0.73rem;
  font-weight: 750;
  white-space: nowrap;
}

.status-badge--success {
  color: #3d7826;
  background: var(--tea-success-soft);
}

.status-badge--danger {
  color: #963f2e;
  background: #fff0eb;
}

.status-badge--muted {
  color: #60747d;
  background: #edf2f4;
}

.status-badge--warning {
  color: #946415;
  background: #fff4dc;
}

.table-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.4rem;
}

.empty-state {
  display: grid;
  padding: clamp(2.5rem, 7vw, 4.5rem) 1.5rem;
  place-items: center;
  text-align: center;
}

.empty-state__icon {
  display: grid;
  width: 62px;
  height: 62px;
  margin-bottom: 1rem;
  place-items: center;
  color: var(--tea-primary);
  background: var(--tea-primary-soft);
  border-radius: 18px;
  font-size: 1.5rem;
}

.empty-state h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 760;
}

.empty-state p {
  max-width: 410px;
  margin: 0.45rem 0 1.15rem;
  color: var(--tea-muted);
  font-size: 0.88rem;
}

.pagination-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.pagination-summary {
  color: var(--tea-muted);
  font-size: 0.8rem;
}

.pagination {
  margin: 0;
  gap: 0.3rem;
}

.page-link {
  display: grid;
  min-width: 36px;
  min-height: 36px;
  padding: 0.35rem 0.55rem;
  place-items: center;
  color: #4f6874;
  border-color: var(--tea-border);
  border-radius: 8px !important;
  font-size: 0.82rem;
  font-weight: 700;
}

.page-link:hover {
  color: var(--tea-primary-dark);
  border-color: #b6ccd5;
  background: var(--tea-primary-soft);
}

.page-item.active .page-link {
  border-color: var(--tea-primary);
  background: var(--tea-primary);
}

.alert {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  font-size: 0.87rem;
}

.alert-danger {
  color: #873838;
  border-color: #f0caca;
  background: #fff1f1;
}

.alert-success {
  color: #3d6f2b;
  border-color: #cce4c0;
  background: #f1faed;
}

.alert-info {
  color: #315e74;
  border-color: #c6dce6;
  background: #eff8fb;
}

.flash-stack {
  position: fixed;
  z-index: 1080;
  top: 88px;
  right: 1rem;
  width: min(calc(100% - 2rem), 420px);
}

.flash-stack .alert {
  box-shadow: var(--tea-shadow);
}

.modal-content {
  overflow: hidden;
  border: 0;
  border-radius: var(--tea-radius);
  box-shadow: 0 26px 70px rgba(16, 42, 55, 0.24);
}

.modal-header,
.modal-footer {
  padding: 1rem 1.25rem;
  border-color: var(--tea-border);
}

.modal-body {
  padding: 1.35rem 1.25rem;
}

.modal-title {
  color: var(--tea-ink);
  font-size: 1.05rem;
  font-weight: 780;
}

.modal-icon {
  display: grid;
  width: 46px;
  height: 46px;
  margin-bottom: 1rem;
  place-items: center;
  border-radius: 14px;
  font-size: 1.2rem;
}

.modal-icon--danger {
  color: var(--tea-danger);
  background: #fff0f0;
}

.modal-icon--primary {
  color: var(--tea-primary);
  background: var(--tea-primary-soft);
}

.breadcrumb {
  margin-bottom: 1rem;
  font-size: 0.8rem;
}

.breadcrumb-item + .breadcrumb-item::before {
  color: #9aacb4;
}

.breadcrumb-item.active {
  color: var(--tea-muted);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
}

.detail-item {
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid var(--tea-border);
}

.detail-item:nth-child(odd) {
  border-right: 1px solid var(--tea-border);
}

.detail-item--full {
  grid-column: 1 / -1;
  border-right: 0 !important;
}

.detail-label {
  display: block;
  margin-bottom: 0.28rem;
  color: var(--tea-muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.detail-value {
  color: var(--tea-ink);
  font-weight: 650;
  overflow-wrap: anywhere;
}

.delete-card {
  max-width: 540px;
}

.dossier-timeline {
  display: grid;
  gap: 1rem;
}

.therapeutic-record {
  border-left: 4px solid var(--tea-primary);
}

.clinical-copy {
  display: grid;
  gap: 1.35rem;
}

.attention-section {
  border-color: #ead39d;
}

.attention-check {
  padding: 1rem 1rem 1rem 2.75rem;
  border: 1px solid #ead39d;
  background: #fffaf0;
  border-radius: var(--tea-radius-sm);
}

.attention-check .form-check-input {
  margin-top: 0.18rem;
}

.attention-check .form-check-label {
  color: var(--tea-ink);
  font-weight: 750;
}

.attention-list {
  display: grid;
}

.attention-item {
  display: grid;
  padding: 1.25rem 1.4rem;
  gap: 1rem;
  border-bottom: 1px solid var(--tea-border);
  grid-template-columns: 28px minmax(0, 1fr);
}

.attention-item:last-child {
  border-bottom: 0;
}

.attention-item.is-complete {
  background: #fbfcfd;
}

.attention-item.is-complete .attention-item__content {
  opacity: 0.78;
}

.attention-item__check {
  padding-top: 0.15rem;
  font-size: 1.15rem;
}

.attention-item__check .form-check-input {
  width: 1.25rem;
  height: 1.25rem;
  cursor: pointer;
}

.attention-item__description {
  margin: 0.65rem 0;
  color: #405965;
}

.attachment-list {
  display: grid;
  gap: 0.55rem;
}

.attachment-item {
  display: flex;
  min-width: 0;
  padding: 0.75rem 0.85rem;
  align-items: center;
  gap: 0.7rem;
  color: var(--tea-primary-dark);
  border: 1px solid var(--tea-border);
  background: #fbfcfd;
  border-radius: var(--tea-radius-sm);
  transition: border-color var(--tea-transition), background var(--tea-transition);
}

.attachment-item:hover {
  color: var(--tea-primary-dark);
  border-color: #b6ccd5;
  background: var(--tea-primary-soft);
}

.attachment-item > i {
  flex: 0 0 auto;
  font-size: 1.15rem;
}

.attachment-item > span {
  display: grid;
  min-width: 0;
}

.attachment-item strong,
.attachment-item small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-item small {
  margin-top: 0.1rem;
  color: var(--tea-muted);
  font-size: 0.73rem;
}

.landing-page {
  background: #fff;
}

.landing-page .app-main {
  min-height: 100vh;
}

.landing-header {
  position: absolute;
  z-index: 20;
  top: 0;
  right: 0;
  left: 0;
}

.landing-header__inner {
  display: flex;
  width: min(100% - 2rem, 1180px);
  min-height: 86px;
  margin-inline: auto;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.landing-header .brand img {
  width: 170px;
  height: 56px;
}

.landing-hero {
  position: relative;
  display: grid;
  min-height: 100vh;
  overflow: hidden;
  align-items: center;
  background:
    radial-gradient(circle at 88% 18%, rgba(242, 138, 91, 0.12), transparent 24%),
    radial-gradient(circle at 75% 78%, rgba(111, 174, 79, 0.11), transparent 23%),
    #fff;
}

.landing-hero::before {
  position: absolute;
  top: -160px;
  right: -180px;
  width: 620px;
  height: 620px;
  content: "";
  border: 1px solid rgba(47, 102, 130, 0.1);
  border-radius: 50%;
}

.landing-hero__inner {
  position: relative;
  z-index: 2;
  display: grid;
  width: min(100% - 2rem, 1180px);
  margin-inline: auto;
  padding-block: 8rem 4rem;
  align-items: center;
  gap: clamp(2rem, 7vw, 6.5rem);
  grid-template-columns: minmax(0, 1.02fr) minmax(380px, 0.98fr);
}

.landing-kicker {
  display: inline-flex;
  margin-bottom: 1.2rem;
  padding: 0.42rem 0.7rem;
  align-items: center;
  gap: 0.45rem;
  color: var(--tea-primary-dark);
  background: var(--tea-primary-soft);
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 780;
}

.landing-title {
  max-width: 660px;
  margin: 0;
  color: #14313f;
  font-size: clamp(2.65rem, 5.6vw, 5.2rem);
  font-weight: 820;
  letter-spacing: -0.06em;
  line-height: 0.98;
}

.landing-title em {
  color: var(--tea-primary);
  font-style: normal;
}

.landing-copy {
  max-width: 590px;
  margin: 1.4rem 0 0;
  color: #5e737d;
  font-size: clamp(1rem, 1.5vw, 1.13rem);
  line-height: 1.75;
}

.landing-actions {
  display: flex;
  margin-top: 2rem;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.landing-actions .btn {
  min-height: 50px;
  padding-inline: 1.3rem;
}

.trust-line {
  display: flex;
  margin-top: 2rem;
  align-items: center;
  gap: 0.65rem;
  color: var(--tea-muted);
  font-size: 0.8rem;
}

.trust-line i {
  color: var(--tea-success-dark);
}

.hero-visual {
  position: relative;
  min-height: 490px;
}

.hero-visual__halo {
  position: absolute;
  inset: 7% 4% 3% 6%;
  border: 1px solid rgba(47, 102, 130, 0.12);
  background: #f4f9fb;
  border-radius: 48% 52% 46% 54% / 52% 42% 58% 48%;
}

.hero-panel {
  position: absolute;
  z-index: 3;
  top: 12%;
  right: 8%;
  left: 2%;
  overflow: hidden;
  border: 1px solid var(--tea-border);
  background: rgba(255, 255, 255, 0.96);
  border-radius: var(--tea-radius-lg);
  box-shadow: 0 28px 70px rgba(24, 60, 77, 0.16);
}

.hero-panel__bar {
  display: flex;
  padding: 1rem 1.1rem;
  align-items: center;
  gap: 0.55rem;
  border-bottom: 1px solid var(--tea-border);
}

.hero-panel__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.hero-panel__dot:nth-child(1) {
  background: var(--tea-accent);
}

.hero-panel__dot:nth-child(2) {
  background: #e0b648;
}

.hero-panel__dot:nth-child(3) {
  background: var(--tea-success);
}

.hero-panel__title {
  margin-left: 0.4rem;
  color: var(--tea-muted);
  font-size: 0.73rem;
  font-weight: 700;
}

.hero-panel__body {
  padding: 1.2rem;
}

.hero-panel__welcome {
  margin-bottom: 1rem;
}

.hero-panel__welcome span {
  color: var(--tea-muted);
  font-size: 0.76rem;
}

.hero-panel__welcome strong {
  display: block;
  color: var(--tea-ink);
  font-size: 1.1rem;
}

.hero-stats {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hero-stat {
  padding: 0.85rem;
  border: 1px solid var(--tea-border);
  background: #fbfcfd;
  border-radius: 12px;
}

.hero-stat i {
  display: grid;
  width: 30px;
  height: 30px;
  margin-bottom: 0.75rem;
  place-items: center;
  color: var(--tea-primary);
  background: var(--tea-primary-soft);
  border-radius: 8px;
}

.hero-stat strong,
.hero-stat span {
  display: block;
}

.hero-stat strong {
  font-size: 0.83rem;
}

.hero-stat span {
  margin-top: 0.15rem;
  color: var(--tea-muted);
  font-size: 0.64rem;
}

.hero-list {
  margin-top: 0.8rem;
  overflow: hidden;
  border: 1px solid var(--tea-border);
  border-radius: 12px;
}

.hero-list__item {
  display: flex;
  padding: 0.7rem 0.8rem;
  align-items: center;
  gap: 0.65rem;
  border-bottom: 1px solid var(--tea-border);
}

.hero-list__item:last-child {
  border-bottom: 0;
}

.hero-list__avatar {
  width: 27px;
  height: 27px;
  background: var(--tea-primary-soft);
  border-radius: 8px;
}

.hero-list__lines {
  flex: 1;
}

.hero-list__lines::before,
.hero-list__lines::after {
  display: block;
  content: "";
  background: #d7e3e7;
  border-radius: 999px;
}

.hero-list__lines::before {
  width: 44%;
  height: 6px;
}

.hero-list__lines::after {
  width: 70%;
  height: 4px;
  margin-top: 0.35rem;
  background: #e9eff1;
}

.floating-note {
  position: absolute;
  z-index: 5;
  right: -1%;
  bottom: 10%;
  display: flex;
  max-width: 210px;
  padding: 0.9rem;
  align-items: center;
  gap: 0.65rem;
  border: 1px solid #d6e5cf;
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--tea-shadow);
}

.floating-note i {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--tea-success-dark);
  background: var(--tea-success-soft);
  border-radius: 10px;
}

.floating-note strong,
.floating-note span {
  display: block;
}

.floating-note strong {
  font-size: 0.76rem;
}

.floating-note span {
  color: var(--tea-muted);
  font-size: 0.66rem;
}

.login-page {
  background: #f1f6f8;
}

.login-layout {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(360px, 0.88fr) minmax(480px, 1.12fr);
}

.login-story {
  position: relative;
  display: flex;
  overflow: hidden;
  padding: clamp(2rem, 5vw, 5rem);
  flex-direction: column;
  justify-content: space-between;
  color: #fff;
  background: var(--tea-primary-dark);
}

.login-story::before,
.login-story::after {
  position: absolute;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
}

.login-story::before {
  right: -180px;
  bottom: -170px;
  width: 520px;
  height: 520px;
}

.login-story::after {
  right: -35px;
  bottom: -20px;
  width: 280px;
  height: 280px;
}

.login-brand {
  position: relative;
  z-index: 2;
  display: inline-flex;
  width: fit-content;
  padding: 0.4rem 0.7rem;
  background: #fff;
  border-radius: 12px;
}

.login-brand img {
  width: 160px;
  height: 52px;
  object-fit: contain;
}

.login-story__content {
  position: relative;
  z-index: 2;
  max-width: 510px;
  margin-block: 4rem;
}

.login-story__content h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.08;
}

.login-story__content p {
  max-width: 460px;
  margin: 1.2rem 0 0;
  color: rgba(255, 255, 255, 0.75);
  font-size: 1rem;
}

.login-story__features {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.75rem;
}

.login-story__features span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.login-story__features i {
  color: #a7d78f;
}

.login-form-side {
  display: grid;
  padding: 2rem;
  place-items: center;
}

.login-card {
  width: min(100%, 440px);
}

.login-card__back {
  display: inline-flex;
  margin-bottom: 2.2rem;
  align-items: center;
  gap: 0.45rem;
  color: var(--tea-muted);
  font-size: 0.82rem;
  font-weight: 650;
}

.login-card__back:hover {
  color: var(--tea-primary);
}

.login-card h2 {
  margin: 0;
  color: var(--tea-ink);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.login-card__intro {
  margin: 0.55rem 0 1.8rem;
  color: var(--tea-muted);
}

.login-password-recovery {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 0.35rem;
  margin-top: 1.15rem;
  color: var(--tea-muted);
  font-size: 0.85rem;
  white-space: nowrap;
}

.login-password-recovery .btn-link {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  line-height: inherit;
  color: var(--tea-primary);
  font-size: inherit;
  font-weight: 750;
  text-decoration: none;
}

.login-password-recovery .btn-link:hover {
  color: var(--tea-primary-dark);
  text-decoration: underline;
}

.password-recovery-modal .modal-body {
  padding: 1.7rem 1.7rem 1.1rem;
}

.password-recovery-modal .modal-footer {
  padding: 0.9rem 1.7rem 1.5rem;
  border-top: 0;
}

.password-field {
  position: relative;
}

.password-field .form-control {
  padding-right: 3rem;
}

.password-toggle {
  position: absolute;
  z-index: 4;
  top: 50%;
  right: 0.45rem;
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  color: var(--tea-muted);
  border: 0;
  background: transparent;
  border-radius: 8px;
  transform: translateY(-50%);
}

.password-toggle:hover {
  color: var(--tea-primary);
  background: var(--tea-primary-soft);
}

.login-help {
  margin-top: 1.5rem;
  color: var(--tea-muted);
  font-size: 0.8rem;
  text-align: center;
}

.login-help i {
  margin-right: 0.25rem;
  color: var(--tea-primary);
}

.loading-spinner {
  width: 1rem;
  height: 1rem;
  border-width: 2px;
}

.is-hidden {
  display: none !important;
}

@media (max-width: 991.98px) {
  .app-header__inner {
    flex-wrap: wrap;
    gap: 0;
  }

  .navbar-toggler {
    margin-left: auto;
    color: var(--tea-primary-dark);
    border-color: var(--tea-border);
  }

  .navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(47, 102, 130, 0.12);
  }

  .app-header__collapse {
    width: 100%;
    padding: 0.5rem 0 1rem;
  }

  .app-nav {
    align-items: stretch;
    flex-direction: column;
  }

  .app-header__actions {
    margin: 0.7rem 0 0;
    padding-top: 0.8rem;
    justify-content: space-between;
    border-top: 1px solid var(--tea-border);
  }

  .landing-hero__inner {
    grid-template-columns: 1fr;
  }

  .landing-copy {
    max-width: 650px;
  }

  .hero-visual {
    width: min(100%, 580px);
    min-height: 450px;
    margin-inline: auto;
  }

  .login-layout {
    grid-template-columns: minmax(310px, 0.75fr) minmax(420px, 1.25fr);
  }

  .login-story {
    padding: 2.2rem;
  }

  .login-story__content h1 {
    font-size: 2.2rem;
  }
}

@media (max-width: 767.98px) {
  .page-container {
    width: min(100% - 1.25rem, 1240px);
    padding-block: 1.5rem 2.5rem;
  }

  .page-header {
    align-items: stretch;
    flex-direction: column;
  }

  .page-actions,
  .page-actions .btn {
    width: 100%;
  }

  .detail-nav {
    align-items: stretch;
    flex-direction: column;
  }

  .detail-nav .btn {
    width: 100%;
    justify-content: flex-start;
  }

  .assignment-list {
    grid-template-columns: 1fr;
  }

  .surface-card__header {
    align-items: stretch;
    flex-direction: column;
  }

  .field-col-8,
  .field-col-6,
  .field-col-4,
  .field-col-3 {
    grid-column: span 12;
  }

  .form-section {
    padding: 1.15rem;
  }

  .form-actions {
    bottom: 0.5rem;
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .form-actions__group {
    width: 100%;
  }

  .form-actions .btn {
    flex: 1;
  }

  .data-table--responsive thead {
    display: none;
  }

  .data-table--responsive,
  .data-table--responsive tbody,
  .data-table--responsive tr,
  .data-table--responsive td {
    display: block;
    width: 100%;
  }

  .data-table--responsive tbody tr {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--tea-border);
  }

  .data-table--responsive tbody tr:last-child {
    border-bottom: 0;
  }

  .data-table--responsive tbody td {
    display: flex;
    min-height: 42px;
    padding: 0.55rem 0;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border: 0;
    text-align: right;
  }

  .data-table--responsive tbody td::before {
    flex: 0 0 auto;
    color: var(--tea-muted);
    content: attr(data-label);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .data-table--responsive tbody td:first-child {
    display: block;
    padding-top: 0.25rem;
    padding-bottom: 0.8rem;
  }

  .data-table--responsive tbody td:first-child::before {
    display: none;
  }

  .data-table--responsive .entity-cell {
    min-width: 0;
  }

  .data-table--responsive .table-actions {
    width: 100%;
  }

  .data-table--responsive .table-actions .btn {
    flex: 1;
  }

  .pagination-wrap {
    align-items: stretch;
    flex-direction: column;
  }

  .pagination-summary {
    text-align: center;
  }

  .pagination {
    justify-content: center;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .detail-item,
  .detail-item:nth-child(odd) {
    border-right: 0;
  }

  .landing-header__inner {
    min-height: 74px;
  }

  .landing-header .brand img {
    width: 145px;
    height: 48px;
  }

  .landing-hero__inner {
    padding-block: 7rem 3rem;
  }

  .landing-title {
    font-size: clamp(2.45rem, 13vw, 4rem);
  }

  .hero-visual {
    min-height: 410px;
  }

  .hero-panel {
    right: 3%;
    left: 0;
  }

  .floating-note {
    right: 0;
  }

  .login-layout {
    grid-template-columns: 1fr;
  }

  .login-story {
    min-height: auto;
    padding: 1.25rem;
  }

  .login-story__content,
  .login-story__features {
    display: none;
  }

  .login-brand img {
    width: 130px;
    height: 42px;
  }

  .login-form-side {
    min-height: calc(100vh - 91px);
    padding: 2rem 1rem;
    align-items: start;
  }

  .login-card__back {
    margin-bottom: 1.5rem;
  }
}

@media (max-width: 479.98px) {
  .user-chip__text {
    display: none;
  }

  .filter-bar__sort,
  .filter-bar .btn {
    width: 100%;
    flex: 1 1 100%;
  }

  .landing-actions .btn {
    width: 100%;
  }

  .hero-visual {
    min-height: 370px;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .hero-stat {
    display: flex;
    align-items: center;
    gap: 0.65rem;
  }

  .hero-stat i {
    margin: 0;
  }

  .hero-stat:nth-child(n + 3) {
    display: none;
  }

  .floating-note {
    bottom: 2%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
