.notes-main {
  min-width: 0;
}

.notes-page-header {
  align-items: center;
}

.notes-status {
  display: none;
  margin-bottom: 16px;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  background: #eff6ff;
  color: #1e40af;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 700;
}

.notes-status.visible {
  display: block;
}

.notes-status.error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b42318;
}

.notes-card {
  overflow: hidden;
}

.notes-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.notes-card-head h2 {
  margin: 0;
  color: #111827;
  font-size: 18px;
}

.notes-card-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.notes-table-scroll {
  overflow-x: auto;
}

.notes-table {
  width: 100%;
  min-width: 840px;
  border-collapse: collapse;
}

.notes-table th,
.notes-table td {
  padding: 15px 18px;
  border-bottom: 1px solid var(--soft-line);
  text-align: left;
  vertical-align: top;
}

.notes-table th {
  background: #fafafa;
  color: #667085;
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.notes-table tbody tr:last-child td {
  border-bottom: 0;
}

.notes-table tbody tr:hover {
  background: #fcfcfd;
}

.notes-index-column {
  width: 72px;
}

.notes-title {
  min-width: 190px;
  color: #101828;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.notes-content {
  min-width: 310px;
  max-width: 680px;
  color: #344054;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.notes-updated {
  min-width: 165px;
  color: #667085;
  font-size: 13px;
  line-height: 1.5;
}

.notes-updated strong {
  display: block;
  color: #344054;
  font-weight: 700;
}

.notes-action-column {
  width: 220px;
}

.notes-row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.notes-empty {
  padding: 44px 20px !important;
  color: #667085;
  text-align: center !important;
}

.notes-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(16, 24, 40, .55);
}

.notes-modal.hidden {
  display: none;
}

.notes-modal-panel {
  width: min(680px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(16, 24, 40, .24);
}

.notes-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 20px;
  border-bottom: 1px solid var(--line);
}

.notes-modal-head h2 {
  margin: 0;
  color: #101828;
  font-size: 22px;
}

.notes-modal-body {
  display: grid;
  gap: 16px;
  padding: 20px;
}

.notes-modal-body label {
  display: grid;
  gap: 8px;
  color: #344054;
  font-size: 14px;
  font-weight: 700;
}

.notes-modal-body input,
.notes-modal-body textarea {
  width: 100%;
  border: 1px solid #d0d5dd;
  border-radius: 10px;
  background: #fff;
  color: #101828;
  padding: 11px 12px;
  font: inherit;
  line-height: 1.5;
  resize: vertical;
}

.notes-modal-body input:focus,
.notes-modal-body textarea:focus {
  border-color: #667085;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(102, 112, 133, .14);
}

.notes-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid var(--line);
}

.notes-form-message {
  border: 1px solid #fecaca;
  border-radius: 10px;
  background: #fef2f2;
  color: #b42318;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 700;
}

body[data-auth-role]:not([data-auth-role="admin"]) .notes-action-column {
  display: none;
}

@media (max-width: 820px) {
  .notes-page-header {
    align-items: stretch;
  }

  #addNoteBtn {
    justify-content: center;
  }

  .notes-modal {
    padding: 12px;
  }
}
