:root {
  --ann-bg: #f1f7fd;
  --ann-text: #12395f;
  --ann-muted: #64748b;
  --ann-border: #cbd5e1;
  --ann-navy: #003c64;
  --ann-navy-strong: #11468f;
  --ann-danger: #b63b3b;
  /* Legacy color tokens used by ported modal styles */
  --blue-deep: #0b409c;
  --blue-mid: #1950a1;
  --blue-light: #dae5ff;
  --blue-accent: #0061a9;
}

body.staff-table-page {
  background: var(--ann-bg);
  color: #334155;
  font-family: "Montserrat", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.staff-table-page .main-content,
.main-content {
  flex-grow: 1;
  padding: 30px;
  transition: all 0.3s ease;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--ann-bg);
  font-family: "Montserrat", sans-serif;
}

.ann-container {
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1 1 auto;
  min-height: 0;
}

.ann-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.staff-table-summary {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}

.staff-table-count {
  font-family: "Montserrat", sans-serif;
  color: var(--ann-text);
  font-weight: 800;
  font-size: 0.94rem;
  line-height: 1;
  letter-spacing: 0;
}

.staff-table-label {
  font-family: "Montserrat", sans-serif;
  color: var(--ann-muted);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.page-title,
.ann-title {
  margin: 0;
  color: var(--ann-text);
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.2;
  font-family: "Montserrat", sans-serif;
}

.ann-subtitle {
  margin: 0 0 4px;
  color: var(--ann-muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.section-header-bar.ann-topbar {
  background: #fff;
  border: 1px solid var(--ann-border);
  border-radius: 10px;
  padding: 9px 14px;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 0;
}

.ann-topbar-right {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-left: auto;
}

.ann-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  color: #0f4c81;
  background: #e7eff7;
  border: 1px solid #c8d7e7;
  white-space: nowrap;
}

.ann-pill-muted {
  color: #516980;
  background: #f4f7fb;
  border-color: #d9e2ee;
}

.ann-card {
  background: #fff;
  border: 1px solid var(--ann-border);
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
  padding: 18px;
}

#list.ann-card {
  flex: 1 1 auto;
  min-height: clamp(420px, calc(100vh - 290px), 700px);
  display: flex;
  flex-direction: column;

  /* contain children visually and allow inner scrolling */
  overflow: hidden;
}

#list.ann-card > h3 {
  flex: 0 0 auto;
}

.ann-card h3 {
  margin: 0 0 14px;
  color: var(--ann-text);
  font-size: 1.12rem;
  font-weight: 800;
}

.ann-form {
  display: block;
  padding: 20px;
}

.ann-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 18px;
}

.ann-span-2 {
  grid-column: span 2;
}

.ann-form label {
  display: block;
  color: #29425d;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0;
}

.ann-form input[type="text"],
.ann-form input[type="date"],
.ann-form textarea {
  margin-top: 6px;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #c5d2e3;
  border-radius: 10px;
  padding: 11px 12px;
  font-size: 0.98rem;
  color: #1e293b;
  background: #fcfdff;
  font-family: "Montserrat", sans-serif;
}

.ann-form input[type="file"] {
  margin-top: 7px;
  width: 100%;
  font-family: "Montserrat", sans-serif;
  color: #334155;
}

.ann-form textarea {
  min-height: 120px;
  resize: vertical;
}

.ann-form input[type="text"]:focus,
.ann-form input[type="date"]:focus,
.ann-form textarea:focus {
  outline: none;
  border-color: var(--ann-navy);
  box-shadow: 0 0 0 3px rgba(0, 60, 100, 0.15);
}

.ann-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px 20px;
  background: #0f4c81;
  border-top: 1px solid #062d4a;
  flex-shrink: 0;
  z-index: 100;
}

.ann-form-actions .ann-checkbox {
  color: #fff;
}

.ann-form-actions .ann-toggle-chip {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.ann-form-actions .ann-toggle-chip .ann-toggle-copy strong {
  color: #fff;
}

.ann-form-actions .ann-toggle-chip .ann-toggle-copy small {
  color: rgba(255, 255, 255, 0.8);
}

.ann-checkbox {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: #314960;
}

.ann-toggle-chip {
  border: 1px solid #cbd9e8;
  border-radius: 12px;
  background: linear-gradient(180deg, #fbfdff 0%, #f1f7ff 100%);
  padding: 8px 10px;
  gap: 10px;
  min-width: 270px;
}

.ann-toggle-chip input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.ann-toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: #c2d3e6;
  border: 1px solid #aec2d8;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.ann-toggle-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.25);
  transition: transform 0.2s ease;
}

.ann-toggle-chip input[type="checkbox"]:checked + .ann-toggle-switch {
  background: #0f4c81;
  border-color: #0d436f;
}

.ann-toggle-chip input[type="checkbox"]:checked + .ann-toggle-switch::after {
  transform: translateX(20px);
}

.ann-toggle-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.ann-toggle-copy strong {
  color: #153a5e;
  font-size: 0.88rem;
  line-height: 1.2;
}

.ann-toggle-copy small {
  color: #5a728b;
  font-size: 0.75rem;
  line-height: 1.3;
  font-weight: 600;
}

.ann-primary-btn,
.ann-secondary-btn,
.ann-danger-btn,
.sa-btn {
  border: 0;
  border-radius: 8px;
  padding: 10px 18px;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: "Montserrat", sans-serif;
}

.ann-primary-btn {
  background: var(--ann-navy);
}

.ann-primary-btn:hover {
  background: var(--ann-navy-strong);
}

.ann-primary-btn:disabled {
  background: #8ca3ba;
  cursor: not-allowed;
  opacity: 0.92;
}

.ann-secondary-btn,
.sa-btn-ghost {
  background: #3f6389;
}

.ann-secondary-btn:hover,
.sa-btn-ghost:hover {
  background: #2f4f71;
}

.ann-danger-btn,
.sa-btn-danger {
  background: var(--ann-danger);
}

.ann-danger-btn:hover,
.sa-btn-danger:hover {
  background: #982f2f;
}

/* Delete Modal Specific Button Styles */
.sa-delete-actions .ann-secondary-btn {
  background: #f5f5f5;
  color: #333;
  border: 1px solid #ddd;
  min-width: 120px;
}

.sa-delete-actions .ann-secondary-btn:hover {
  background: #e8e8e8;
  border-color: #ccc;
}

.sa-delete-actions .ann-danger-btn {
  background: #dc3545;
  min-width: 120px;
}

.sa-delete-actions .ann-danger-btn:hover {
  background: #bb2d3b;
}

#annList {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-content: stretch;
  min-height: 0;
  overflow: auto;
  max-height: calc(100% - 56px);
  padding-right: 8px;
}

#annList.ann-list-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 0;
}

.ann-empty-state {
  width: min(640px, 100%);
  min-height: 220px;
  height: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 36px 20px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #6f839a;
  box-shadow: none;
}

.ann-empty-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  background: #edf3fa;
  color: #8d9bb0;
  box-shadow: inset 0 0 0 1px #d7e0ea;
}

.ann-empty-icon i {
  font-size: 26px;
}

.ann-empty-state h4 {
  margin: 0 0 8px;
  color: #12395f;
  font-size: 1.05rem;
  font-weight: 800;
}

.ann-empty-state p {
  margin: 0;
  max-width: 420px;
  font-size: 0.95rem;
  line-height: 1.55;
}

.sa-item {
  position: relative;
  border: 1px solid #d3ddea;
  border-radius: 12px;
  padding: 0;
  background: #fff;
  box-shadow: 0 1px 5px rgba(15, 76, 129, 0.08);
  display: flex;
  flex-direction: row;
  align-items: stretch;
  min-height: 120px;
  max-height: 140px;
  transition:
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.sa-item:hover {
  box-shadow: 0 2px 8px rgba(15, 76, 129, 0.12);
  border-color: #c2d0e0;
}

.sa-item-banner {
  width: 180px;
  min-width: 180px;
  height: 100%;
  border-radius: 0;
  background-color: #f6fbff;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  margin-bottom: 0;
  flex: 0 0 auto;
}

.sa-item-banner-placeholder {
  background: linear-gradient(180deg, #e7eef7 0%, #dce7f2 100%);
  border: 1px solid #c6d5e6;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sa-item-banner-placeholder-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #21496f;
  text-align: center;
  padding: 12px;
}

.sa-item-banner-placeholder-inner i {
  font-size: 1.7rem;
  color: #0f4c81;
}

.sa-item-banner-placeholder-inner span {
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.sa-item-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1 1 auto;
  padding: 12px 16px;
  min-width: 0;
  overflow-y: auto;
}

.sa-item::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  height: 100%;
  border-radius: 0;
  background: linear-gradient(180deg, #0f4c81 0%, #11468f 100%);
}

.sa-item-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
  width: 100%;
  margin-bottom: 0;
  flex-shrink: 0;
}

.sa-item-head strong {
  display: block;
  color: #0f3a57;
  font-size: 1.0rem;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.ann-badge {
  border-radius: 6px;
  padding: 5px 11px;
  font-size: 0.73rem;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: 0.3px;
}

.ann-badge.published {
  color: #0f5132;
  background: #d1fae5;
}

.ann-badge.draft {
  color: #7c2d12;
  background: #ffedd5;
}

.sa-item-dates {
  color: #7a8da3;
  font-weight: 600;
  margin-top: 1px;
  font-size: 0.8rem;
  letter-spacing: 0.2px;
}

.sa-item-summary {
  color: #5d7a8f;
  font-size: 0.85rem;
  line-height: 1.35;
  min-height: auto;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  word-wrap: break-word;
  overflow-wrap: break-word;
  margin-top: 2px;
  flex-shrink: 0;
}

.sa-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: auto;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .sa-item {
    flex-direction: column;
    height: auto;
    max-height: none;
  }

  .sa-item-banner {
    width: 100%;
    min-width: 100%;
    height: 140px;
  }

  .sa-item-content {
    padding: 12px 16px;
    gap: 5px;
  }

  .sa-item-summary {
    font-size: 0.8rem;
    max-height: 40px;
    -webkit-line-clamp: 2;
  }

  .sa-item-actions {
    gap: 5px;
  }
}

.ann-loading,
.ann-empty,
.ann-error {
  border: 1px dashed #c9d6e5;
  border-radius: 10px;
  background: #f8fbff;
  padding: 14px;
  color: #4f647c;
  font-weight: 600;
}

.ann-error {
  border-color: #f3c3c3;
  background: #fff5f5;
  color: #9f2f2f;
}

.ann-toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 100001;
  min-width: 220px;
  max-width: 360px;
  border-radius: 10px;
  padding: 10px 12px;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.2);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: all 0.25s ease;
}

.ann-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.ann-toast.success {
  background: #0f4c81;
}

.ann-toast.error {
  background: #b63b3b;
}

.sa-edit-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  z-index: 100000;
  padding: 16px;
}

.sa-edit-panel {
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  border: 1px solid #cfddee;
  box-shadow: 0 24px 55px rgba(15, 23, 42, 0.34);
  border-radius: 20px;
  width: min(1080px, 97vw);
  max-height: 92vh;
  overflow: auto;
  padding: 24px;
  position: relative;
}

.sa-edit-panel h3 {
  margin: 6px 0 12px;
  color: #12395f;
  font-size: 1.28rem;
  font-weight: 800;
  letter-spacing: 0.2px;
}

.ann-modal-subtitle {
  margin: -2px 0 18px;
  color: #5a7087;
  font-size: 0.94rem;
  line-height: 1.45;
  font-weight: 600;
}

.ann-grid {
  gap: 16px 20px;
}

.ann-upload-field {
  border: 1px solid #d7e2ef;
  border-radius: 12px;
  padding: 13px 15px 15px;
  background: linear-gradient(180deg, #f8fbff 0%, #f3f8ff 100%);
}

.ann-field-help {
  display: block;
  margin-top: 5px;
  color: #4b627b;
  font-size: 0.83rem;
  line-height: 1.45;
  font-weight: 600;
}

.ann-ratio-badge {
  display: inline-flex;
  align-items: center;
  margin-top: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid #bed0e5;
  background: #edf4fc;
  color: #22496d;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.2px;
}

.ann-upload-count {
  display: block;
  margin-top: 8px;
  color: #385775;
  font-size: 0.78rem;
  font-weight: 700;
}

.ann-field-meta {
  display: block;
  margin-top: 7px;
  color: #6c839a;
  font-size: 0.78rem;
  line-height: 1.4;
  font-weight: 600;
}

.ann-field-hint {
  display: block;
  margin-top: 6px;
  color: #7a92ac;
  font-size: 0.77rem;
  font-weight: 500;
  font-style: italic;
}

.ann-upload-field input[type="file"] {
  margin-top: 9px;
}

.ann-upload-field input[type="file"]::file-selector-button {
  margin-right: 10px;
  border: 1px solid #aac0d8;
  border-radius: 8px;
  padding: 6px 10px;
  background: #e8f0fa;
  color: #12395f;
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.18s ease;
}

.ann-upload-field input[type="file"]::file-selector-button:hover {
  background: #dae7f6;
}

.ann-upload-preview {
  margin-top: 10px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.ann-upload-empty {
  width: 100%;
  border: 1px dashed #c5d4e4;
  border-radius: 8px;
  padding: 7px 9px;
  color: #6a7f95;
  font-size: 0.77rem;
  font-weight: 600;
  background: #f6faff;
}

.ann-preview-item {
  position: relative;
  width: 148px;
  border: 1px solid #ccd9e8;
  border-radius: 10px;
  background: #ffffff;
  padding: 6px;
}

.ann-preview-image {
  width: 100%;
  height: 88px;
  object-fit: cover;
  display: block;
  border-radius: 7px;
}

.ann-preview-remove {
  position: absolute;
  top: -7px;
  right: -7px;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 999px;
  background: #b63b3b;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.22);
}

.ann-preview-remove:hover {
  background: #982f2f;
}

.ann-preview-meta {
  margin-top: 5px;
  font-size: 0.7rem;
  line-height: 1.25;
  color: #4f647c;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ann-preview-more {
  width: 148px;
  height: 129px;
  border: 1px dashed #b9cce1;
  border-radius: 10px;
  background: linear-gradient(180deg, #eff5fd 0%, #e7eff9 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #274b6d;
}

.ann-preview-more strong {
  font-size: 1.35rem;
  line-height: 1;
  font-weight: 800;
}

.ann-preview-more span {
  margin-top: 5px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.sa-edit-close {
  position: absolute;
  right: 14px;
  top: 12px;
  border: 1px solid #c4d3e3;
  background: #f3f7fc;
  color: #2e4b68;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  font-size: 24px;
  line-height: 0.9;
  cursor: pointer;
  transition: all 0.18s ease;
}

.sa-edit-close:hover {
  background: #e5eef8;
  color: #173a5c;
}

.sa-existing-images {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 16px 0 0;
}

.sa-existing-image-card {
  position: relative;
  width: 120px;
  height: 120px;
  border-radius: 10px;
  overflow: visible;
  background: #f6f8fb;
  border: 1px solid #d4dfe9;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.sa-existing-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sa-existing-image-delete {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: #b63b3b;
  color: #fff;
  font-size: 22px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.15);
}

.sa-existing-image-delete:hover {
  background: #982f2f;
  transform: scale(1.1);
}

.sa-delete-panel {
  width: min(680px, 96vw);
}

/* Override modal positioning to ensure proper display */
#sa-preview-modal {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 10000 !important;
}

#sa-preview-modal .ann-detail-overlay {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  z-index: 1 !important;
}

#sa-preview-modal .ann-detail-panel {
  position: relative !important;
  z-index: 2 !important;
}
}

.sa-delete-modal-panel {
  width: min(90vw, 500px) !important;
  max-height: min(50vh, 450px);
}

.sa-delete-top-bar {
  height: 50px;
  background: #dc3545;
  border-bottom: 1px solid #a02834;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  flex-shrink: 0;
  gap: 16px;
  z-index: 100;
}

.sa-delete-top-bar .ann-detail-top-bar-text {
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  flex: 1;
  min-width: 0;
}

.sa-delete-top-bar .ann-detail-close {
  background: transparent;
  border: none;
  font-size: 1.2rem;
  color: #fff;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.sa-delete-top-bar .ann-detail-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.sa-delete-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 40px 24px;
  text-align: center;
}

.sa-delete-icon {
  width: 60px;
  height: 60px;
  background: #fde8e8;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: #dc3545;
  flex-shrink: 0;
}

.sa-delete-message {
  color: #333;
  font-size: 1rem;
  line-height: 1.6;
  font-weight: 500;
  max-width: 350px;
}

.sa-delete-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 20px;
  background: #f9f9f9;
  border-top: 1px solid #e0e0e0;
  flex-shrink: 0;
}

@media (max-width: 900px) {
  .staff-table-page .main-content,
  .main-content {
    padding: 18px;
  }

  .ann-page-header {
    align-items: flex-start;
  }

  #list.ann-card {
    min-height: clamp(360px, calc(100vh - 260px), 560px);
  }

  .section-header-bar.ann-topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .ann-topbar-right {
    justify-content: flex-start;
  }

  .ann-grid {
    grid-template-columns: 1fr;
  }

  .ann-span-2 {
    grid-column: auto;
  }

  .page-title,
  .ann-title {
    font-size: 1.45rem;
  }
}

@media (max-width: 620px) {
  .ann-page-header {
    flex-direction: column;
    align-items: stretch;
  }

  .ann-page-header .ann-primary-btn {
    width: 100%;
  }

  .ann-card {
    padding: 15px;
  }

  #list.ann-card {
    min-height: 320px;
  }

  #annList {
    min-height: 240px;
  }

  #annList.ann-list-empty {
    min-height: 240px;
  }

  .ann-empty-state {
    width: 100%;
    min-height: 200px;
    padding: 28px 16px;
  }

  .ann-empty-icon {
    width: 54px;
    height: 54px;
  }

  .ann-empty-icon i {
    font-size: 24px;
  }

  .sa-edit-panel {
    padding: 18px;
    border-radius: 14px;
  }

  .ann-form-actions {
    bottom: -18px;
  }

  .ann-toggle-chip {
    min-width: 0;
    width: 100%;
  }

  .ann-upload-field {
    padding: 10px;
  }

  .sa-item-actions {
    flex-direction: column;
  }

  .sa-item-actions .ann-secondary-btn,
  .sa-item-actions .ann-danger-btn {
    width: 100%;
  }
}


/* === Ported from Home.css: announcement modal base styles === */
/* ============================================================
   ANNOUNCEMENT DETAIL MODAL — ENHANCED
   ============================================================ */

.ann-detail-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease-out;
}

.ann-detail-modal.active {
  display: flex;
}

.ann-detail-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.55);
  cursor: pointer;
  backdrop-filter: blur(4px);
}

.ann-detail-panel {
  position: relative;
  background: #fff;
  border-radius: 20px;
  width: min(90vw, 900px);
  max-height: min(85vh, 900px);
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 75px rgba(0, 0, 0, 0.35);
  animation: slideUp 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.ann-detail-top-bar {
  height: 50px;
  background: #0f4c81;
  border-bottom: 1px solid #062d4a;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  flex-shrink: 0;
  gap: 16px;
  z-index: 100;
}

.ann-detail-top-bar-text {
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.ann-detail-close {
  background: transparent;
  border: none;
  font-size: 1.2rem;
  color: #fff;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10000;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 400;
  opacity: 0.8;
}

.ann-detail-close:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.08);
  opacity: 1;
}

.ann-detail-close:active {
  transform: scale(0.95);
}

/* Scrollable Content Container */
.ann-detail-scroll-wrapper {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

/* Main Display Area */
.ann-detail-display {
  width: 100%;
  height: 320px;
  background-color: #e8f0f8;
  overflow: hidden;
  flex-shrink: 0;
}

.ann-detail-display img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ann-detail-display-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #e8f0f8 0%, #dce8f4 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #7fa3c7;
  font-size: 4rem;
  opacity: 0.4;
}

/* Thumbnails Strip */
.ann-detail-thumbnails {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  background: #f8fafb;
  border-bottom: none;
  overflow-x: auto;
  flex-shrink: 0;
  border-top: 1px solid #e8ecf2;
  max-height: 110px;
}

.ann-thumb-item {
  width: 85px;
  height: 85px;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  border: 2px solid #e0e8f0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  flex-shrink: 0;
}

.ann-thumb-item:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
  border-color: var(--blue-accent);
}

.ann-thumb-item.active {
  border-color: var(--blue-deep);
  box-shadow: 0 0 0 3px rgba(11, 64, 156, 0.2);
  transform: scale(1.05);
}

.ann-thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ann-thumb-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #e8f0f8 0%, #dce8f4 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #7fa3c7;
  font-size: 1.8rem;
  opacity: 0.4;
}

.ann-detail-header {
  padding: 16px 28px 6px;
  border-bottom: none;
  background: transparent;
  flex-shrink: 0;
}

.ann-detail-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--blue-deep);
  margin: 0;
  line-height: 1.3;
  letter-spacing: -0.3px;
}

.ann-detail-body {
  padding: 0 28px 20px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.ann-detail-content {
  font-size: 0.93rem;
  color: #444;
  line-height: 1.6;
  font-weight: 400;
}

.ann-detail-content p {
  margin: 0 0 12px 0;
  word-break: break-word;
}

.ann-detail-content p:last-child {
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .ann-detail-panel {
    width: 95vw;
    width: 95vw;
    max-height: min(85vh, 800px);
    border-radius: 16px;
  }

  .ann-detail-top-bar {
    height: 44px;
    padding: 0 14px;
  }

  .ann-detail-display {
    height: 240px;
  }

  .ann-detail-thumbnails {
    gap: 6px;
    padding: 10px 12px;
    max-height: 100px;
  }

  .ann-thumb-item {
    width: 72px;
    height: 72px;
  }

  .ann-detail-header {
    padding: 14px 20px 4px;
  }

  .ann-detail-title {
    font-size: 1.1rem;
  }

  .ann-detail-body {
    padding: 0 20px 16px;
  }

  .ann-detail-close {
    width: 34px;
    height: 34px;
    font-size: 1.2rem;
  }

  .ann-detail-body {
    padding: 0 24px 24px;
  }

  .ann-detail-content {
    font-size: 0.9rem;
    line-height: 1.6;
  }
}

/* Carousel Navigation Buttons */
.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(15, 76, 129, 0.9);
  border: 1px solid rgba(15, 76, 129, 0.5);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: all 0.3s ease;
  z-index: 10;
}

.carousel-nav:hover {
  background: rgba(15, 76, 129, 1);
  border-color: rgba(15, 76, 129, 1);
  transform: translateY(-50%) scale(1.1);
}

.carousel-nav-prev {
  left: 16px;
}

.carousel-nav-next {
  right: 16px;
}

/* Hide carousel arrows for feedback - only show for announcements */
.peek-carousel:not(.announcements-carousel) .carousel-nav {
  display: none;
}

/* Announcement Carousel specific styling */
.announcements-carousel {
  margin: 2rem 0;
}

.announcements-carousel .carousel-track {
  padding-left: 0;
  padding-right: 0;
  justify-content: center;
  position: relative;
}

.announcements-carousel .ann-card-home {
  flex: 0 0 800px;
  opacity: 0;
  transform: scale(0.5);
  transition:
    opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: absolute;
  left: 50%;
  translate: -50% 0;
  pointer-events: none;
}

.announcements-carousel .ann-card-home.active {
  opacity: 1;
  transform: scale(1);
  position: relative;
  left: auto;
  translate: none;
  pointer-events: auto;
}

.announcements-carousel .ann-card-home:not(.active):hover {
  opacity: 0;
  transform: scale(0.5);
}

@media (max-width: 768px) {
  .carousel-nav {
    width: 38px;
    height: 38px;
    font-size: 0.85rem;
  }

  .carousel-nav-prev {
    left: 8px;
  }

  .carousel-nav-next {
    right: 8px;
  }

  .announcements-carousel .carousel-track {
    padding-left: 0;
    padding-right: 0;
    justify-content: center;
  }

  .announcements-carousel .ann-card-home {
    flex: 0 0 85vw;
    max-width: 85vw;
  }
}
