:root {
  --tw-blue: #1783E6;
  --tw-blue-dark: #0B5EAE;
  --tw-blue-soft: #EAF4FF;
  --tw-page: #F5F8FC;
  --tw-text: #0A2540;
  --tw-muted: #60748B;
  --tw-border: #D8E5F1;
  --tw-green: #169B52;
  --tw-orange: #E77817;
  --tw-red: #D9303E;
  --tw-violet: #7B4CE2;
  --tw-teal: #0F9E9A;
}

.teacher-workspace {
  color: var(--tw-text);
  display: grid;
  gap: 16px;
  margin: 0 auto;
  max-width: 1640px;
  min-width: 0;
  padding: 20px;
  width: 100%;
}

.teacher-workspace *,
.teacher-workspace *::before,
.teacher-workspace *::after {
  box-sizing: border-box;
}

.teacher-workspace > *,
.tw-page-header > *,
.tc-page-header > *,
.tw-kpi-grid > *,
.tw-chart-grid > *,
.tw-assignment-chart-grid > *,
.tw-basic-filters > *,
.tw-advanced-filters > *,
.tc-layout > * {
  min-width: 0;
  max-width: 100%;
}

.teacher-workspace button,
.teacher-workspace input,
.teacher-workspace select,
.teacher-workspace textarea {
  font: inherit;
}

.teacher-workspace button:focus-visible,
.teacher-workspace input:focus-visible,
.teacher-workspace select:focus-visible,
.teacher-workspace textarea:focus-visible,
.tc-media-modal button:focus-visible,
.tc-media-modal input:focus-visible {
  outline: 3px solid rgb(23 131 230 / 24%);
  outline-offset: 2px;
}

.tw-icon {
  fill: none;
  height: 20px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 20px;
}

.tw-breadcrumb {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  font-size: 13px;
  gap: 8px;
}

.tw-breadcrumb button {
  background: none;
  border: 0;
  color: var(--tw-blue);
  cursor: pointer;
  padding: 0;
}

.tw-breadcrumb span {
  color: #9AAABC;
}

.tw-breadcrumb strong {
  font-weight: 600;
}

.tw-page-header,
.tc-page-header {
  align-items: flex-start;
  display: flex;
  gap: 20px;
  justify-content: space-between;
}

.tw-page-header h1,
.tc-page-header h1 {
  font-size: clamp(26px, 2.4vw, 38px);
  line-height: 1.12;
  margin: 0 0 6px;
}

.tw-page-header p,
.tc-page-header p {
  color: var(--tw-muted);
  font-size: 14px;
  margin: 0;
}

.tw-header-actions,
.tc-page-header > div:last-child {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.tw-button,
.tw-mini-button,
.tw-icon-button {
  align-items: center;
  background: #fff;
  border: 1px solid #BED7ED;
  border-radius: 7px;
  color: var(--tw-blue-dark);
  cursor: pointer;
  display: inline-flex;
  font-weight: 700;
  gap: 8px;
  justify-content: center;
  min-height: 42px;
  padding: 9px 15px;
}

.tw-button:hover,
.tw-mini-button:hover,
.tw-icon-button:hover {
  background: var(--tw-blue-soft);
  border-color: #8BBDE8;
}

.tw-button.primary {
  background: var(--tw-blue);
  border-color: var(--tw-blue);
  color: #fff;
  box-shadow: 0 7px 16px rgb(23 131 230 / 16%);
}

.tw-button.primary:hover {
  background: #0D72CD;
}

.tw-button.danger {
  border-color: #F3B7BD;
  color: var(--tw-red);
}

.tw-button:disabled,
.tw-mini-button:disabled,
.tw-icon-button:disabled {
  cursor: not-allowed;
  opacity: .48;
}

.tw-icon-button {
  font-size: 24px;
  min-width: 42px;
  padding: 5px;
}

.tw-kpi-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.tw-kpi,
.tw-chart-card,
.tw-filter-card,
.tw-results-card,
.tc-form-card,
.tc-preview-card,
.tc-post-actions {
  background: #fff;
  border: 1px solid var(--tw-border);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgb(15 42 72 / 5%);
}

.tw-kpi {
  align-items: center;
  display: flex;
  gap: 12px;
  min-height: 100px;
  padding: 14px;
}

.tw-kpi-icon {
  align-items: center;
  background: var(--tw-blue-soft);
  border-radius: 8px;
  color: var(--tw-blue);
  display: inline-flex;
  flex: 0 0 48px;
  height: 48px;
  justify-content: center;
}

.tw-kpi-icon .tw-icon {
  height: 25px;
  width: 25px;
}

.tw-tone-green .tw-kpi-icon { background: #E7F7EE; color: var(--tw-green); }
.tw-tone-orange .tw-kpi-icon { background: #FFF2E5; color: var(--tw-orange); }
.tw-tone-violet .tw-kpi-icon { background: #F1EBFF; color: var(--tw-violet); }
.tw-tone-teal .tw-kpi-icon { background: #E4F8F7; color: var(--tw-teal); }

.tw-kpi div {
  min-width: 0;
}

.tw-kpi small,
.tw-kpi p {
  color: var(--tw-muted);
  display: block;
  font-size: 12px;
  line-height: 1.25;
  margin: 0;
}

.tw-kpi strong {
  display: block;
  font-size: 22px;
  line-height: 1.2;
  margin: 3px 0;
  white-space: nowrap;
}

.tw-chart-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 2.1fr) minmax(290px, .9fr);
}

.tw-chart-card {
  min-width: 0;
  padding: 16px;
}

.tw-chart-card > header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.tw-chart-card h3,
.tw-chart-card h4 {
  margin: 0;
}

.tw-chart-card h3 {
  font-size: 16px;
}

.tw-chart-card h4 {
  color: #294C70;
  font-size: 13px;
  margin-bottom: 8px;
}

.tw-chart-card header span {
  color: var(--tw-muted);
  font-size: 12px;
}

.tw-assignment-chart-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(310px, .9fr) minmax(340px, 1.1fr);
}

.tw-assignment-chart-grid > div + div {
  border-left: 1px solid var(--tw-border);
  padding-left: 18px;
}

.tw-donut-layout {
  align-items: center;
  display: grid;
  gap: 16px;
  grid-template-columns: 150px minmax(0, 1fr);
  min-height: 170px;
}

.tw-donut {
  display: block;
  height: 150px;
  margin: auto;
  overflow: visible;
  width: 150px;
}

.tw-donut-track,
.tw-donut-segment {
  fill: none;
  stroke-width: 16;
  transform: rotate(-90deg);
  transform-origin: 55px 55px;
}

.tw-donut-track {
  stroke: #E8EEF5;
}

.tw-donut-segment {
  transition: stroke-width .2s ease;
}

.tw-donut-segment:hover,
.tw-donut-segment:focus {
  stroke-width: 19;
  outline: 0;
}

.tw-donut text:first-of-type {
  fill: var(--tw-text);
  font-size: 20px;
  font-weight: 800;
}

.tw-donut text:last-of-type {
  fill: var(--tw-muted);
  font-size: 9px;
}

.tw-donut-layout ul {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 0;
  min-width: 0;
  padding: 0;
}

.tw-donut-layout li {
  align-items: center;
  display: grid;
  font-size: 12px;
  gap: 7px;
  grid-template-columns: 9px minmax(0, 1fr) auto;
}

.tw-donut-layout li i {
  background: var(--legend);
  border-radius: 50%;
  height: 8px;
  width: 8px;
}

.tw-donut-layout li strong {
  font-size: 11px;
  white-space: nowrap;
}

.tw-bars {
  display: grid;
  gap: 13px;
  min-height: 170px;
  padding: 15px 0;
}

.tw-bar-row {
  align-items: center;
  display: grid;
  font-size: 12px;
  gap: 8px;
  grid-template-columns: 150px minmax(70px, 1fr) 28px;
}

.tw-bar-row > div {
  background: #E8EEF5;
  border-radius: 3px;
  height: 9px;
  overflow: hidden;
}

.tw-bar-row i {
  background: var(--tw-blue);
  display: block;
  height: 100%;
}

.tw-filter-card {
  padding: 16px;
}

.tw-filter-card > header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.tw-filter-card h3 {
  font-size: 16px;
  margin: 0;
}

.tw-text-button {
  align-items: center;
  background: none;
  border: 0;
  color: var(--tw-blue);
  cursor: pointer;
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  gap: 7px;
}

.tw-basic-filters {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(240px, 1.7fr) minmax(130px, .7fr) minmax(160px, .8fr) minmax(170px, .8fr) auto;
}

.tw-advanced-filters {
  border-top: 1px solid var(--tw-border);
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  margin-top: 16px;
  padding-top: 16px;
}

.tw-filter-field,
.tw-form-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.tw-filter-field > span,
.tw-form-field > span,
.tw-form-label {
  color: #294C70;
  font-size: 12px;
  font-weight: 700;
}

.tw-filter-field input,
.tw-filter-field select,
.tw-form-field input,
.tw-form-field select,
.tw-form-field textarea,
.tc-subject-picker input,
.tc-document-uploader select {
  background: #fff;
  border: 1px solid #C7DCEB;
  border-radius: 7px;
  color: var(--tw-text);
  min-height: 42px;
  min-width: 0;
  padding: 9px 11px;
  width: 100%;
}

.tw-filter-field select:disabled,
.tw-form-field select:disabled {
  background: #F0F3F7;
  color: #8A99AA;
}

.tw-search-field > div,
.tc-subject-picker > label > div {
  align-items: center;
  border: 1px solid #C7DCEB;
  border-radius: 7px;
  display: flex;
  gap: 8px;
  min-height: 42px;
  padding: 0 11px;
}

.tw-search-field > div input,
.tc-subject-picker > label > div input {
  border: 0;
  min-height: 38px;
  outline: 0;
  padding: 0;
}

.tw-filter-actions {
  display: flex;
  gap: 8px;
}

.tw-results-card {
  min-width: 0;
  overflow: hidden;
}

.tw-results-card > header,
.tw-results-card > footer {
  align-items: center;
  display: flex;
  justify-content: space-between;
  padding: 14px 16px;
}

.tw-results-card > header h3 {
  font-size: 17px;
  margin: 0;
}

.tw-results-card > header h3 span {
  background: var(--tw-blue-soft);
  border-radius: 5px;
  color: var(--tw-blue);
  font-size: 11px;
  margin-left: 8px;
  padding: 4px 7px;
}

.tw-results-card > header label,
.tw-results-card > footer {
  color: var(--tw-muted);
  font-size: 12px;
}

.tw-results-card select {
  border: 1px solid var(--tw-border);
  border-radius: 6px;
  margin: 0 4px;
  padding: 6px;
}

.tw-table-scroll {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

.tw-table {
  border-collapse: collapse;
  font-size: 12px;
  min-width: 1180px;
  width: 100%;
}

.tw-table th {
  background: #EAF4FF;
  border-bottom: 1px solid #C6DCEC;
  color: #183B61;
  font-size: 11px;
  padding: 10px 11px;
  text-align: left;
  white-space: nowrap;
}

.tw-table th button {
  align-items: center;
  background: none;
  border: 0;
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  font-weight: 700;
  gap: 5px;
  padding: 0;
}

.tw-table td {
  border-bottom: 1px solid #E4EBF2;
  max-width: 210px;
  padding: 9px 11px;
  vertical-align: middle;
}

.tw-table tbody tr:nth-child(even) {
  background: #F7FBFF;
}

.tw-table tbody tr:hover {
  background: #EDF7FF;
}

.tw-profile-link {
  background: none;
  border: 0;
  color: inherit;
  cursor: pointer;
  padding: 0;
  text-align: left;
}

.tw-table-link:hover,
.tw-table-link:focus {
  color: var(--tw-blue);
  text-decoration: underline;
}

.tw-table-link.strong {
  font-weight: 700;
}

.tw-avatar {
  align-items: center;
  background: #EAF0F6;
  border: 1px solid #D3E0EC;
  border-radius: 50%;
  display: inline-flex;
  height: 34px;
  justify-content: center;
  overflow: hidden;
  width: 34px;
}

.tw-avatar img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.tw-avatar-placeholder {
  color: #8B9CAF;
}

.tw-avatar-placeholder .tw-icon {
  height: 18px;
  width: 18px;
}

.tw-subject-list {
  align-items: center;
  display: inline-flex;
  gap: 5px;
}

.tw-subject-list b {
  background: var(--tw-blue-soft);
  border-radius: 4px;
  color: var(--tw-blue);
  font-size: 10px;
  padding: 2px 5px;
}

.tw-number {
  font-weight: 700;
  white-space: nowrap;
}

.tw-status {
  align-items: center;
  border-radius: 5px;
  display: inline-flex;
  font-size: 11px;
  font-weight: 700;
  gap: 5px;
  padding: 5px 8px;
  white-space: nowrap;
}

.tw-status i {
  border-radius: 50%;
  height: 6px;
  width: 6px;
}

.tw-status.active {
  background: #E7F7EE;
  color: #08783B;
}

.tw-status.active i { background: var(--tw-green); }
.tw-status.inactive { background: #FDEBED; color: #B3202E; }
.tw-status.inactive i { background: var(--tw-red); }

.tw-row-menu {
  position: relative;
}

.tw-row-menu summary {
  border: 1px solid #C7DCEB;
  border-radius: 5px;
  color: var(--tw-blue);
  cursor: pointer;
  list-style: none;
  padding: 4px 8px;
}

.tw-row-menu summary::-webkit-details-marker {
  display: none;
}

.tw-row-menu > div {
  background: #fff;
  border: 1px solid var(--tw-border);
  border-radius: 7px;
  box-shadow: 0 12px 28px rgb(15 42 72 / 18%);
  display: grid;
  min-width: 210px;
  padding: 6px;
  position: absolute;
  right: 0;
  top: calc(100% + 5px);
  z-index: 30;
}

.tw-row-menu button {
  background: none;
  border: 0;
  border-radius: 4px;
  color: var(--tw-text);
  cursor: pointer;
  padding: 8px 9px;
  text-align: left;
}

.tw-row-menu button:hover {
  background: var(--tw-blue-soft);
  color: var(--tw-blue);
}

.tw-row-menu button.danger {
  color: var(--tw-red);
}

.tw-results-card > footer nav {
  align-items: center;
  display: flex;
  gap: 5px;
}

.tw-results-card > footer nav button {
  background: #fff;
  border: 1px solid var(--tw-border);
  border-radius: 5px;
  color: var(--tw-blue-dark);
  cursor: pointer;
  min-height: 30px;
  min-width: 30px;
}

.tw-results-card > footer nav button.active {
  background: var(--tw-blue);
  border-color: var(--tw-blue);
  color: #fff;
}

.tw-results-card > footer nav button:disabled {
  opacity: .4;
}

.tw-empty {
  align-items: center;
  color: var(--tw-muted);
  display: flex;
  flex-direction: column;
  gap: 5px;
  justify-content: center;
  min-height: 110px;
  text-align: center;
}

.tw-empty .tw-icon {
  color: #8CBCE6;
  height: 28px;
  width: 28px;
}

.tw-empty strong {
  color: var(--tw-text);
}

.tw-print-heading {
  display: none;
}

/* Teacher creation */
.teacher-create-workspace {
  max-width: 1720px;
}

.tc-layout {
  align-items: start;
  display: grid;
  gap: 16px;
  grid-template-columns: 220px minmax(0, 1fr) 310px;
}

.tc-stepper {
  background: #fff;
  border: 1px solid var(--tw-border);
  border-radius: 8px;
  display: grid;
  overflow: hidden;
  position: sticky;
  top: 86px;
}

.tc-stepper button {
  align-items: flex-start;
  background: #fff;
  border: 0;
  border-left: 3px solid transparent;
  color: #314B66;
  cursor: pointer;
  display: grid;
  gap: 11px;
  grid-template-columns: 30px minmax(0, 1fr);
  min-height: 74px;
  padding: 14px 12px;
  text-align: left;
}

.tc-stepper button + button {
  border-top: 1px solid #ECF1F6;
}

.tc-stepper button i {
  align-items: center;
  background: #C5CFDA;
  border-radius: 50%;
  color: #fff;
  display: inline-flex;
  font-style: normal;
  font-weight: 800;
  height: 25px;
  justify-content: center;
  width: 25px;
}

.tc-stepper button span {
  display: grid;
  gap: 3px;
}

.tc-stepper button strong {
  font-size: 13px;
}

.tc-stepper button small {
  color: var(--tw-muted);
  font-size: 11px;
}

.tc-stepper button.active {
  background: var(--tw-blue-soft);
  border-left-color: var(--tw-blue);
  color: var(--tw-blue-dark);
}

.tc-stepper button.active i,
.tc-stepper button.completed i {
  background: var(--tw-blue);
}

.tc-stepper button:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.tc-form-card {
  min-width: 0;
  padding: 22px;
}

.tc-section-header {
  align-items: center;
  border-bottom: 1px solid var(--tw-border);
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  padding-bottom: 12px;
}

.tc-section-header > span {
  align-items: center;
  background: var(--tw-blue-soft);
  border-radius: 50%;
  color: var(--tw-blue);
  display: inline-flex;
  flex: 0 0 34px;
  font-size: 15px;
  font-weight: 800;
  height: 34px;
  justify-content: center;
}

.tc-section-header h2 {
  font-size: 18px;
  margin: 0;
}

.tc-section-header p {
  color: var(--tw-muted);
  font-size: 12px;
  margin: 3px 0 0;
}

.tc-form-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tw-form-field .span-two,
.tw-form-field.span-two {
  grid-column: 1 / -1;
}

.tw-form-field b {
  color: var(--tw-red);
}

.tw-form-field small {
  color: var(--tw-muted);
  font-size: 11px;
}

.tw-form-field textarea {
  min-height: 86px;
  resize: vertical;
}

.tc-date-control {
  min-width: 0;
  position: relative;
}

.tc-date-control > input:first-child {
  padding-right: 46px;
}

.tc-date-control > button {
  align-items: center;
  background: #F4F9FE;
  border: 0;
  border-left: 1px solid #C7DCEB;
  border-radius: 0 6px 6px 0;
  color: var(--tw-blue);
  cursor: pointer;
  display: flex;
  height: 40px;
  justify-content: center;
  position: absolute;
  right: 1px;
  top: 1px;
  width: 41px;
}

.tc-date-control > button:hover {
  background: #E4F2FF;
}

.tc-native-date {
  height: 1px !important;
  min-height: 0 !important;
  opacity: 0;
  padding: 0 !important;
  pointer-events: none;
  position: absolute;
  right: 20px;
  top: 20px;
  width: 1px !important;
}

.tw-field-error {
  color: var(--tw-red) !important;
}

.tc-photo-field {
  border-top: 1px solid var(--tw-border);
  display: grid;
  gap: 10px;
  margin-top: 20px;
  padding-top: 18px;
}

.tc-photo-preview {
  align-items: center;
  background: #F3F7FB;
  border: 1px dashed #AFCADE;
  border-radius: 8px;
  display: flex;
  height: 175px;
  justify-content: center;
  overflow: hidden;
  width: 150px;
}

.tc-photo-preview img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.tc-photo-preview span {
  align-items: center;
  color: #8B9CAF;
  display: flex;
  flex-direction: column;
  font-size: 11px;
  gap: 7px;
}

.tc-photo-preview .tw-icon {
  height: 45px;
  width: 45px;
}

.tc-photo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tw-mini-button {
  font-size: 12px;
  min-height: 34px;
  padding: 6px 10px;
}

.tw-mini-button.danger {
  color: var(--tw-red);
}

.tc-photo-field > small {
  color: var(--tw-muted);
  font-size: 11px;
}

.tc-subsection {
  border-top: 1px solid var(--tw-border);
  margin-top: 24px;
  padding-top: 18px;
}

.tc-subsection .tc-section-header {
  border: 0;
  margin-bottom: 13px;
  padding: 0;
}

.tc-subject-picker {
  display: grid;
  gap: 14px;
}

.tc-subject-picker > label {
  display: grid;
  gap: 6px;
}

.tc-selected-subjects {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-height: 34px;
}

.tc-selected-subjects button {
  background: var(--tw-blue-soft);
  border: 1px solid #BFDDF8;
  border-radius: 5px;
  color: var(--tw-blue-dark);
  cursor: pointer;
  font-size: 12px;
  padding: 6px 8px;
}

.tc-selected-subjects > span {
  color: var(--tw-muted);
  font-size: 12px;
}

.tc-subject-options {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-height: 280px;
  overflow-y: auto;
}

.tc-subject-options > label {
  align-items: center;
  border: 1px solid var(--tw-border);
  border-radius: 7px;
  cursor: pointer;
  display: flex;
  gap: 10px;
  padding: 10px;
}

.tc-subject-options > label:hover {
  background: var(--tw-blue-soft);
}

.tc-subject-options > label span {
  display: grid;
}

.tc-subject-options > label strong {
  font-size: 12px;
}

.tc-subject-options > label small {
  color: var(--tw-muted);
  font-size: 10px;
}

.tc-toggle-row {
  align-items: center;
  background: var(--tw-blue-soft);
  border: 1px solid #BFDDF8;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
  padding: 13px;
}

.tc-toggle-row > span {
  align-items: center;
  display: grid;
  gap: 2px 9px;
  grid-template-columns: 24px 1fr;
}

.tc-toggle-row .tw-icon {
  color: var(--tw-blue);
  grid-row: 1 / 3;
}

.tc-toggle-row strong {
  font-size: 13px;
}

.tc-toggle-row small {
  color: var(--tw-muted);
  font-size: 11px;
}

.tc-info-box,
.tc-warning-box,
.tc-completeness,
.tc-message {
  align-items: flex-start;
  border: 1px solid #BFDDF8;
  border-radius: 7px;
  color: #24547F;
  display: flex;
  font-size: 12px;
  gap: 9px;
  padding: 11px;
}

.tc-info-box {
  background: #F0F8FF;
}

.tc-warning-box,
.tc-completeness.warning,
.tc-message.error {
  background: #FFF7ED;
  border-color: #F4D1A6;
  color: #9A4E00;
}

.tc-warning-box button {
  background: none;
  border: 0;
  color: var(--tw-blue);
  cursor: pointer;
  font-weight: 700;
  padding: 0;
  text-decoration: underline;
}

.tc-completeness.success,
.tc-message.success {
  background: #ECF9F1;
  border-color: #BAE5CB;
  color: #08783B;
}

.tc-completeness div,
.tc-message div {
  display: grid;
  gap: 3px;
}

.tc-document-uploader {
  align-items: start;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tc-dropzone {
  align-items: center;
  border: 1px dashed #9EC5E7;
  border-radius: 8px;
  color: var(--tw-blue);
  cursor: pointer;
  display: flex;
  gap: 10px;
  min-height: 75px;
  padding: 12px;
}

.tc-dropzone strong,
.tc-dropzone span {
  display: block;
}

.tc-dropzone span {
  color: var(--tw-muted);
  font-size: 11px;
}

.tc-document-list {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.tc-document-list article {
  align-items: center;
  border: 1px solid var(--tw-border);
  border-radius: 7px;
  display: grid;
  gap: 8px;
  grid-template-columns: 34px minmax(0, 1fr) repeat(5, 34px);
  padding: 10px;
}

.tc-document-list article > span {
  align-items: center;
  background: var(--tw-blue-soft);
  border-radius: 6px;
  color: var(--tw-blue);
  display: flex;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.tc-document-list article div {
  display: grid;
  min-width: 0;
}

.tc-document-list article strong,
.tc-document-list article small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tc-document-list article strong {
  font-size: 12px;
}

.tc-document-list article small {
  color: var(--tw-muted);
  font-size: 10px;
}

.tc-summary-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 15px;
}

.tc-summary-section {
  border: 1px solid var(--tw-border);
  border-radius: 7px;
  padding: 13px;
}

.tc-summary-section header {
  align-items: center;
  border-bottom: 1px solid #E9EFF5;
  display: flex;
  justify-content: space-between;
  margin-bottom: 9px;
  padding-bottom: 8px;
}

.tc-summary-section h3 {
  font-size: 14px;
  margin: 0;
}

.tc-summary-section header button {
  align-items: center;
  background: none;
  border: 0;
  color: var(--tw-blue);
  cursor: pointer;
  display: flex;
  font-size: 11px;
  gap: 4px;
}

.tc-summary-section dl,
.tc-preview-card dl {
  display: grid;
  gap: 7px 10px;
  grid-template-columns: minmax(80px, .8fr) minmax(0, 1.2fr);
  margin: 0;
}

.tc-summary-section dt,
.tc-preview-card dt {
  color: var(--tw-muted);
  font-size: 11px;
}

.tc-summary-section dd,
.tc-preview-card dd {
  font-size: 12px;
  margin: 0;
  overflow-wrap: anywhere;
}

.tc-summary-section p {
  font-size: 12px;
  margin: 0;
}

.tc-step-footer {
  align-items: center;
  border-top: 1px solid var(--tw-border);
  display: flex;
  justify-content: space-between;
  margin: 24px -22px -22px;
  padding: 14px 22px;
}

.tc-step-footer > span {
  color: var(--tw-muted);
  font-size: 12px;
}

.tc-side {
  display: grid;
  gap: 14px;
  position: sticky;
  top: 86px;
}

.tc-preview-card,
.tc-post-actions {
  padding: 16px;
}

.tc-preview-card > header {
  align-items: center;
  color: var(--tw-blue-dark);
  display: flex;
  gap: 8px;
  margin-bottom: 15px;
}

.tc-preview-card h2,
.tc-post-actions h2 {
  font-size: 15px;
  margin: 0;
}

.tc-preview-person {
  align-items: center;
  border-bottom: 1px solid var(--tw-border);
  display: flex;
  flex-direction: column;
  margin-bottom: 14px;
  padding-bottom: 14px;
  text-align: center;
}

.tc-preview-person > img,
.tc-preview-person > span {
  align-items: center;
  background: #EDF3F8;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--tw-border);
  display: flex;
  height: 74px;
  justify-content: center;
  margin-bottom: 9px;
  object-fit: cover;
  overflow: hidden;
  width: 74px;
}

.tc-preview-person > span {
  color: #8B9CAF;
}

.tc-preview-person strong {
  font-size: 15px;
}

.tc-preview-person small {
  color: var(--tw-muted);
  font-size: 11px;
}

.tc-preview-card .tc-info-box {
  margin-top: 14px;
}

.tc-post-actions {
  display: grid;
  gap: 2px;
}

.tc-post-actions h2 {
  margin-bottom: 8px;
}

.tc-post-actions button {
  align-items: center;
  background: none;
  border: 0;
  border-bottom: 1px solid #E9EFF5;
  color: var(--tw-blue-dark);
  cursor: pointer;
  display: flex;
  font-size: 12px;
  gap: 9px;
  padding: 10px 4px;
  text-align: left;
}

.tc-post-actions button:hover {
  color: var(--tw-blue);
}

.tc-post-actions button:disabled {
  color: #9BABBA;
  cursor: not-allowed;
}

.tc-dialog,
.tc-media-modal {
  align-items: center;
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 18px;
  position: fixed;
  z-index: 1000;
}

.tc-dialog-backdrop,
.tc-media-backdrop {
  background: rgb(5 24 43 / 55%);
  border: 0;
  inset: 0;
  position: absolute;
}

.tc-dialog > section,
.tc-media-modal > section {
  background: #fff;
  border: 1px solid var(--tw-border);
  border-radius: 8px;
  box-shadow: 0 22px 60px rgb(6 30 54 / 28%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  position: relative;
  width: min(520px, 100%);
}

.tc-utility-modal-body,
.tc-document-preview-body {
  padding: 0 18px 18px;
}

.tc-document-preview-modal {
  width: min(860px, 100%) !important;
}

.tc-document-preview-frame,
.tc-document-preview-image {
  background: #F3F7FB;
  border: 1px solid var(--tw-border);
  display: block;
  height: min(68vh, 680px);
  object-fit: contain;
  width: 100%;
}

.tc-dialog header,
.tc-media-modal header {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 18px;
}

.tc-dialog header {
  justify-content: flex-start;
}

.tc-dialog h2,
.tc-media-modal h2 {
  font-size: 18px;
  margin: 0;
}

.tc-dialog p,
.tc-media-modal p {
  color: var(--tw-muted);
  font-size: 12px;
  margin: 4px 0 0;
}

.tc-media-modal header > button {
  background: none;
  border: 0;
  cursor: pointer;
  font-size: 25px;
}

.tc-dialog footer,
.tc-media-modal footer {
  border-top: 1px solid var(--tw-border);
  display: flex;
  gap: 9px;
  justify-content: flex-end;
  padding: 14px 18px;
}

.tc-crop-stage,
.tc-camera-stage {
  align-items: center;
  background: #E9EEF4;
  display: flex;
  height: auto;
  justify-content: center;
  margin: 0 auto;
  overflow: hidden;
  position: relative;
  touch-action: none;
  width: min(52vw, 360px);
}

.tc-crop-stage {
  aspect-ratio: 1;
  border: 2px solid var(--tw-blue);
  cursor: grab;
}

.tc-camera-stage {
  aspect-ratio: 6 / 7;
}

.tc-crop-stage.is-dragging {
  cursor: grabbing;
}

.tc-crop-stage::after {
  border: 1px solid color-mix(in srgb, var(--tw-blue) 55%, #fff);
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
}

.tc-crop-stage img {
  height: auto;
  left: 50%;
  max-height: none;
  max-width: none;
  pointer-events: none;
  position: absolute;
  top: 50%;
  transform-origin: center;
  user-select: none;
  width: auto;
  -webkit-user-drag: none;
}

.tc-camera-stage video {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.tc-crop-tools {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: center;
  padding: 14px 18px;
}

.tc-crop-tools label {
  align-items: center;
  display: flex;
  font-size: 12px;
  gap: 8px;
}

.tc-crop-tools button {
  align-items: center;
  background: #fff;
  border: 1px solid var(--tw-border);
  border-radius: 6px;
  color: var(--tw-blue);
  cursor: pointer;
  display: flex;
  height: 36px;
  justify-content: center;
  width: 36px;
}

@media (max-width: 1366px) {
  .teacher-workspace { padding: 16px; }
  .tw-page-header,
  .tc-page-header { align-items: stretch; flex-direction: column; }
  .tw-header-actions,
  .tc-page-header > div:last-child { justify-content: flex-start; }
  .tw-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tc-layout { grid-template-columns: 190px minmax(0, 1fr) 280px; }
  .tc-stepper button { padding-inline: 9px; }
}

@media (max-width: 1100px) {
  .tw-basic-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tw-search-field { grid-column: 1 / -1; }
  .tw-filter-actions { justify-content: end; }
  .tw-advanced-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tw-chart-grid { grid-template-columns: 1fr; }
  .tc-layout { grid-template-columns: 180px minmax(0, 1fr); }
  .tc-side { grid-column: 2; position: static; }
  .tc-subject-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .teacher-workspace { padding: 14px; }
  .tw-page-header,
  .tc-page-header { align-items: stretch; flex-direction: column; }
  .tw-header-actions,
  .tc-page-header > div:last-child { justify-content: flex-start; }
  .tw-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tw-assignment-chart-grid { grid-template-columns: 1fr; }
  .tw-assignment-chart-grid > div + div { border-left: 0; border-top: 1px solid var(--tw-border); padding-left: 0; padding-top: 14px; }
  .tc-layout { grid-template-columns: minmax(0, 1fr); }
  .tc-stepper {
    display: flex;
    overflow-x: auto;
    position: static;
    scroll-snap-type: x proximity;
  }
  .tc-stepper button {
    border-left: 0;
    border-top: 3px solid transparent;
    flex: 0 0 170px;
    min-height: 70px;
    scroll-snap-align: start;
  }
  .tc-stepper button + button { border-left: 1px solid #ECF1F6; }
  .tc-stepper button.active { border-left-color: transparent; border-top-color: var(--tw-blue); }
  .tc-side { grid-column: 1; }
  .tc-preview-card,
  .tc-post-actions { position: static; }
}

.tc-inline-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.tc-record-list {
  display: grid;
  gap: 10px;
}

.tc-record-card {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--tw-border);
  border-radius: 7px;
  background: #F8FBFE;
}

.tc-record-card .tw-mini-button {
  position: absolute;
  top: 10px;
  right: 10px;
}

.tc-account-options {
  display: grid;
  gap: 12px;
}

.tc-permission-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  padding: 13px;
  border: 1px solid var(--tw-border);
  border-radius: 7px;
}

.tc-permission-grid legend {
  padding: 0 7px;
  color: var(--tw-navy);
  font-size: 13px;
  font-weight: 800;
}

.tc-permission-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #D8E7F2;
  border-radius: 6px;
  background: #fff;
  color: #294760;
  font-size: 12px;
}

@media (max-width: 620px) {
  .teacher-workspace { gap: 12px; padding: 12px; }
  .tw-page-header h1,
  .tc-page-header h1 { font-size: 26px; }
  .tw-button { flex: 1 1 auto; min-width: 0; }
  .tw-kpi-grid { gap: 8px; }
  .tw-kpi { min-height: 92px; padding: 11px; }
  .tw-kpi-icon { flex-basis: 40px; height: 40px; }
  .tw-kpi strong { font-size: 19px; }
  .tw-chart-card,
  .tw-filter-card { padding: 12px; }
  .tw-donut-layout { grid-template-columns: 125px minmax(0, 1fr); }
  .tw-donut { height: 125px; width: 125px; }
  .tw-bar-row { grid-template-columns: 112px minmax(60px, 1fr) 24px; }
  .tw-basic-filters,
  .tw-advanced-filters { grid-template-columns: 1fr; }
  .tw-search-field { grid-column: auto; }
  .tw-filter-actions { justify-content: stretch; }
  .tw-results-card > header,
  .tw-results-card > footer { align-items: flex-start; gap: 10px; }
  .tw-results-card > header { flex-direction: column; }
  .tw-results-card > footer { flex-direction: column; }
  .tw-results-card > footer nav { align-self: stretch; overflow-x: auto; }
  .tc-form-card { padding: 16px; }
  .tc-form-grid,
  .tc-subject-options,
  .tc-summary-grid,
  .tc-document-uploader,
  .tc-record-card,
  .tc-permission-grid { grid-template-columns: 1fr; }
  .tc-step-footer { margin: 20px -16px -16px; padding: 12px 16px; position: static; }
  .tc-step-footer > span { display: none; }
  .tc-document-list article { grid-template-columns: 32px repeat(5, 32px) minmax(0, 1fr); }
  .tc-document-list article > span { grid-column: 1; grid-row: 1; }
  .tc-document-list article > div { grid-column: 2 / -1; grid-row: 1; }
  .tc-document-list article > :nth-child(3) { grid-column: 2; grid-row: 2; }
  .tc-document-list article > :nth-child(4) { grid-column: 3; grid-row: 2; }
  .tc-document-list article > :nth-child(5) { grid-column: 4; grid-row: 2; }
  .tc-document-list article > :nth-child(6) { grid-column: 5; grid-row: 2; }
  .tc-document-list article > :nth-child(7) { grid-column: 6; grid-row: 2; }
  .tc-crop-stage,
  .tc-camera-stage { height: auto; width: min(82vw, 360px); }
}

@media (max-width: 420px) {
  .tw-kpi-grid { grid-template-columns: 1fr; }
  .tw-kpi { min-height: 80px; }
  .tw-donut-layout { grid-template-columns: 1fr; }
  .tw-donut-layout ul { width: 100%; }
  .tw-bar-row { grid-template-columns: 100px minmax(50px, 1fr) 22px; }
  .tw-filter-card > header { align-items: flex-start; gap: 8px; }
  .tc-stepper button { flex-basis: 150px; }
  .tc-page-header > div:last-child .tw-button { flex-basis: 100%; }
  .tc-photo-preview { height: 152px; width: 130px; }
}

@media print {
  @page {
    margin: 10mm;
    size: A4 landscape;
  }

  body:has(.tw-list-page) .sidebar,
  body:has(.tw-list-page) .top-header,
  body:has(.tw-list-page) .mobile-nav-backdrop,
  body:has(.tw-list-page) .tw-breadcrumb,
  body:has(.tw-list-page) .tw-page-header,
  body:has(.tw-list-page) .tw-kpi-grid,
  body:has(.tw-list-page) .tw-chart-grid,
  body:has(.tw-list-page) .tw-filter-card,
  body:has(.tw-list-page) .tw-results-card > header,
  body:has(.tw-list-page) .tw-results-card > footer,
  body:has(.tw-list-page) .tw-row-menu,
  body:has(.tw-list-page) .toast {
    display: none !important;
  }

  body:has(.tw-list-page) .app-main,
  body:has(.tw-list-page) .page-content {
    margin: 0 !important;
    padding: 0 !important;
  }

  .tw-list-page {
    display: block;
    max-width: none;
    padding: 0;
  }

  .tw-print-heading {
    align-items: center;
    border-bottom: 2px solid var(--tw-blue);
    display: flex;
    gap: 14px;
    margin-bottom: 10mm;
    padding-bottom: 5mm;
  }

  .tw-print-logo {
    height: 18mm;
    object-fit: contain;
    width: 18mm;
  }

  .tw-print-heading div {
    display: grid;
  }

  .tw-print-heading strong {
    font-size: 18px;
  }

  .tw-print-heading span,
  .tw-print-heading small {
    color: #415D78;
    font-size: 11px;
  }

  .tw-results-card {
    border: 0;
    box-shadow: none;
    overflow: visible;
  }

  .tw-table-scroll {
    overflow: visible;
  }

  .tw-table {
    font-size: 8px;
    min-width: 0;
  }

  .tw-table th,
  .tw-table td {
    padding: 4px;
  }

  .tw-table th:last-child,
  .tw-table td:last-child,
  .tw-table th:first-child,
  .tw-table td:first-child {
    display: none;
  }
}
