.notice-header-actions {
  display: grid;
  min-width: 180px;
  gap: 8px;
}

.notice-header-actions .compact-button {
  width: 100%;
  margin: 0;
}

#noticeTenantPicker {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 10px;
}

#noticeTenantPicker[hidden] {
  display: none;
}

#noticeTenantPicker label {
  display: grid;
  gap: 7px;
  font-weight: 900;
}

#noticeTenantPicker select,
.notice-editor-grid input,
.notice-editor-grid select,
.notice-editor-grid textarea,
.notice-template-form input,
.notice-template-form textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(23, 50, 77, 0.22);
  border-radius: 10px;
  padding: 10px 12px;
  color: #17324d;
  background: #fff;
}

.notice-editor-grid textarea,
.notice-template-form textarea {
  resize: vertical;
  line-height: 1.6;
}

.notice-editor-grid,
.notice-template-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.notice-editor-grid > label,
.notice-template-form > label {
  display: grid;
  gap: 7px;
  color: #27496b;
  font-weight: 900;
}

.notice-wide {
  grid-column: 1 / -1;
}

.notice-options {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin: 0;
  padding: 16px;
  border: 1px solid #dbe7ee;
  border-radius: 12px;
}

.notice-options legend {
  padding: 0 6px;
  color: #27496b;
  font-weight: 900;
}

.notice-options label,
.notice-inline-check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 800;
}

.notice-student-targets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
  padding: 14px;
  border-radius: 12px;
  background: #f0fdfa;
}

.notice-student-targets[hidden] {
  display: none;
}

.notice-student-targets label {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 8px 10px;
  border-radius: 9px;
  background: #fff;
}

.notice-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.notice-form-actions .student-login-submit,
.notice-form-actions .compact-button {
  min-width: 180px;
  margin: 0;
  padding: 0 20px;
}

.notice-attachment-editor {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid #cfe6e2;
  border-radius: 14px;
  background: #f0fdfa;
}

.notice-attachment-editor h3,
.notice-attachment-editor p {
  margin: 0;
}

.notice-attachment-editor > label {
  color: #27496b;
  font-weight: 900;
}

.notice-attachment-list,
.student-notice-attachments > div {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.notice-attachment-card {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid #dbe7ee;
  border-radius: 12px;
  background: #fff;
}

.notice-attachment-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 9px;
  background: #eef4f7;
  object-fit: contain;
}

.notice-attachment-card strong,
.notice-attachment-card span {
  overflow-wrap: anywhere;
}

.notice-attachment-card span {
  color: #52677c;
  font-size: 13px;
}

.notice-attachment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.notice-attachment-actions .compact-button {
  min-height: 38px;
  margin: 0;
  padding: 0 11px;
}

.notice-table td:nth-child(2) {
  min-width: 230px;
}

.notice-row-title {
  display: block;
  margin-bottom: 4px;
}

.notice-row-meta,
.student-notice-meta {
  color: #52677c;
  font-size: 13px;
}

.notice-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.notice-row-actions .compact-button {
  min-height: 38px;
  margin: 0;
  padding: 0 11px;
}

.notice-template-list {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.notice-template-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  padding: 15px;
  border: 1px solid #dbe7ee;
  border-radius: 12px;
  background: #fff;
}

.notice-template-item p {
  margin: 5px 0 0;
  color: #52677c;
  white-space: pre-wrap;
}

.student-notice-shell {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 64px;
}

.student-notice-header,
.student-notice-guide,
.student-notice-list-card,
.student-notice-detail {
  border: 1px solid rgba(23, 50, 77, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 48px rgba(23, 50, 77, 0.12);
}

.student-notice-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 22px;
  padding: clamp(24px, 5vw, 40px);
}

.student-notice-header p:last-child {
  max-width: 720px;
  margin-bottom: 0;
}

.student-notice-header .compact-button {
  flex: 0 0 auto;
  margin: 0;
}

.student-notice-guide {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  padding: 0;
  overflow: hidden;
  list-style: none;
}

.student-notice-guide li {
  display: grid;
  gap: 6px;
  padding: 18px;
  background: #f8fcfd;
}

.student-notice-guide strong {
  color: #0f766e;
}

.student-notice-guide span {
  color: #52677c;
  font-size: 14px;
  line-height: 1.5;
}

.student-notice-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.4fr);
  gap: 18px;
}

.student-notice-list-card,
.student-notice-detail {
  padding: 22px;
}

.student-notice-list-card h2,
.student-notice-detail h2 {
  margin-top: 0;
}

.student-notice-list-button {
  width: 100%;
  display: grid;
  gap: 5px;
  margin-bottom: 9px;
  padding: 14px;
  border: 1px solid #dbe7ee;
  border-radius: 12px;
  color: #17324d;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.student-notice-list-button[data-selected="true"] {
  border-color: #0f766e;
  background: #f0fdfa;
}

.student-notice-list-button span {
  color: #52677c;
  font-size: 13px;
}

.student-notice-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.student-notice-badges span {
  padding: 5px 9px;
  border-radius: 999px;
  color: #115e59;
  background: #ccfbf1;
  font-size: 13px;
  font-weight: 900;
}

.student-notice-content {
  min-height: 180px;
  margin: 24px 0;
  padding: 18px;
  border-radius: 14px;
  background: #f8fcfd;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.student-notice-confirm-state {
  font-weight: 900;
}

.student-notice-attachments {
  display: grid;
  gap: 12px;
  margin: 0 0 24px;
}

.student-notice-attachments[hidden] {
  display: none;
}

.student-notice-attachments h3 {
  margin: 0;
}

@media (max-width: 820px) {
  .notice-editor-grid,
  .notice-template-form,
  .student-notice-layout,
  .student-notice-guide {
    grid-template-columns: 1fr;
  }

  .student-notice-shell {
    width: min(100% - 20px, 680px);
    padding: 10px 0 32px;
  }

  .student-notice-header {
    display: grid;
  }

  .student-notice-header .compact-button {
    width: 100%;
  }
}
