.slot-card-shell {
  container-type: inline-size;
  overflow: hidden;
}

.slot-card-shell[open] {
  box-shadow: 0 22px 38px rgba(15, 23, 42, 0.08);
}

.slot-card-summary {
  position: relative;
  display: block;
  cursor: pointer;
  list-style: none;
  padding: 0;
}

.slot-card-summary::-webkit-details-marker {
  display: none;
}

.slot-card-summary-inner {
  padding: 0;
}

.slot-card-trash-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(157, 27, 36, 0.16);
  border-radius: 50%;
  background: rgba(255, 248, 247, 0.96);
  color: #9d1b24;
  box-shadow: 0 10px 20px rgba(157, 27, 36, 0.08);
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.slot-card-trash-btn:hover {
  transform: translateY(-1px);
  background: #fff4f3;
  box-shadow: 0 14px 24px rgba(157, 27, 36, 0.12);
}

.slot-card-trash-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(157, 27, 36, 0.16);
}

.slot-card-trash-icon {
  display: inline-flex;
  width: 24px;
  height: 24px;
}

.slot-card-trash-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.slot-card-top {
  align-items: stretch;
  gap: 12px;
  padding-left: 0;
  padding-right: 28px;
}

.slot-card-heading {
  min-width: 0;
  flex: 1 1 auto;
  padding-left: 5px;
}

.slot-card-badges {
  justify-content: flex-end;
  max-width: 100%;
}

.slot-card-meta {
  margin-top: 10px;
  margin-left: 0;
  max-width: 100%;
}

.slot-card-toggle-row {
  display: flex;
  margin-top: 10px;
  margin-left: 0;
  padding-bottom: 12px;
}

.slot-card-toggle-pill {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 38px;
  max-width: 100%;
  padding: 0 12px 0px 14px;
  border-radius: 999px;
  background: #f6f4ef;
  color: #5b5248;
  border: 1px solid rgba(120, 90, 60, 0.14);
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.04);
}

.slot-card-toggle-copy {
  color: #433d36;
  font-size: 0.82rem;
  font-weight: 800;
}

.slot-card-toggle-sign {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  color: #433d36;
  font-size: 1rem;
  font-weight: 900;
}

.slot-card-toggle-copy-expanded,
.slot-card-toggle-sign-expanded {
  display: none;
}

.slot-card-shell[open] .slot-card-toggle-copy-collapsed,
.slot-card-shell[open] .slot-card-toggle-sign-collapsed {
  display: none;
}

.slot-card-shell[open] .slot-card-toggle-copy-expanded,
.slot-card-shell[open] .slot-card-toggle-sign-expanded {
  display: inline-flex;
}

.slot-card-body {
  padding: 0 10px 10px 14px;
  border-top: 1px solid rgba(120, 90, 60, 0.12);
}

.slot-panel {
  margin-top: 14px;
}

.slot-panel:first-child {
  margin-top: 12px;
}

.slot-panel + .slot-panel {
  padding-top: 14px;
  border-top: 1px solid rgba(120, 90, 60, 0.12);
}

.slot-panel-header {
  margin-bottom: 12px;
}

.slot-action-title {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: #3f332b;
}

.slot-action-description {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: #7b6d62;
}

.slot-action-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.slot-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.slot-form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.slot-form-field.full {
  grid-column: 1 / -1;
}

.slot-form-field label {
  font-size: 13px;
  font-weight: 800;
  color: #4e4037;
}

.slot-control {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(120, 90, 60, 0.22);
  border-radius: 14px;
  background: #fffdf9;
  padding: 0 13px;
  font-size: 14px;
  color: #2f2925;
}

.slot-control:focus {
  outline: none;
  border-color: rgba(130, 80, 45, 0.45);
  box-shadow: 0 0 0 3px rgba(130, 80, 45, 0.12);
}

.slot-inline-note,
.slot-field-note {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: #7b6d62;
}

.slot-action-buttons {
  display: flex;
  justify-content: flex-start;
  gap: 10px;
}

.slot-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  border: 0;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
}

.slot-btn-primary {
  background: #1f2937;
  color: #fff;
}

.slot-btn-neutral {
  background: #f7f3ec;
  color: #51463c;
  border: 1px solid rgba(120, 90, 60, 0.14);
}

.slot-btn-warning {
  background: #fff5df;
  color: #7a4b00;
  border: 1px solid rgba(122, 75, 0, 0.2);
}

.slot-btn-danger {
  background: #c81f2b;
  color: #fff;
}

.slot-btn-danger-outline {
  background: #fff8f7;
  color: #9d1b24;
  border: 1px solid rgba(157, 27, 36, 0.25);
}

.slot-students-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.slot-student-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.55);
  padding: 12px;
}

.slot-student-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 13px;
  color: #5f5047;
}

.slot-student-info strong {
  color: #2f2925;
}

.slot-mini-badge {
  width: fit-content;
  margin-top: 4px;
  border-radius: 999px;
  background: rgba(120, 90, 60, 0.1);
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 800;
  color: #6f5e52;
}

.slot-inline-form {
  flex: 0 0 auto;
}

.slot-action-modal-dialog {
  width: min(560px, calc(100vw - 40px));
  max-height: calc(100vh - 40px);
}

.slot-action-modal-body {
  padding: 22px 24px 24px;
  background: linear-gradient(180deg, #fcfbf8, #f8f5ef);
}

.slot-action-modal-lead {
  margin: 0 0 16px;
  color: #665c50;
  line-height: 1.55;
}

.slot-action-modal-context {
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(120, 90, 60, 0.12);
}

.slot-action-modal-context strong {
  display: block;
  color: #2f2925;
  font-size: 1.05rem;
}

.slot-action-modal-context span {
  display: block;
  margin-top: 4px;
  color: #6d6459;
  font-size: 0.92rem;
}

.slot-action-modal-actions {
  justify-content: flex-end;
}

@container (max-width: 460px) {
  .slot-card-meta {
    margin-left: 0;
    max-width: none;
  }

  .slot-card-toggle-row {
    margin-left: 0;
  }

  .slot-form-grid {
    grid-template-columns: 1fr;
  }

  .slot-student-row {
    flex-direction: column;
  }

  .slot-inline-form {
    width: 100%;
  }

  .slot-inline-form .slot-btn {
    width: 100%;
  }
}

@container (max-width: 340px) {
  .slot-card-toggle-pill {
    width: 100%;
  }

  .slot-card-toggle-copy {
    min-width: 0;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 900px) {
  .slot-card-summary-inner {
    padding-left: 16px;
  }

  .slot-card-body {
    padding-left: 16px;
  }

  .slot-action-modal-body {
    padding: 18px;
  }

  .slot-action-modal-actions {
    flex-direction: column-reverse;
  }

  .slot-action-modal-actions .slot-btn {
    width: 100%;
  }
}
