body {
  font-family: Arial, sans-serif;
  margin: 2em;
  background-color: #f9f9f9;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1em;
}

header img {
  height: 45px;
}

/* Unified button styles */
.header-actions button,
.submit-button,
.full-button,
.action-button {
  font-size: 0.8rem;
  padding: 6px 12px;
  background-color: #253C80;
  color: #ADCDFD;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.header-actions button:hover,
.submit-button:hover,
.full-button:hover,
.action-button:hover {
  background-color: #1c2f66;
}

h1, h3 {
  color: #253C80;
}

form {
  background-color: white;
  padding: 2em;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2em;
}

.column {
  display: flex;
  flex-direction: column;
}

.column h3 {
  color: #253C80;
  margin-bottom: 0.5em;
  border-bottom: 1px solid #ADCDFD;
  padding-bottom: 0.2em;
}

label {
  margin-top: 1em;
  font-weight: bold;
  font-size: 0.875rem;
  color: #253C80;
}

input, select, textarea {
  margin-top: 0.3em;
  padding: 0.6em;
  font-size: 0.875rem;
  border: 1px solid #ccc;
  border-radius: 6px;
}

button[type="submit"] {
  margin-top: 2em;
}

.disclaimer {
  background-color: #f4f8ff;
  border-left: 4px solid #253C80;
  padding: 10px;
  margin-top: 1em;
  font-size: 0.85em;
  font-style: italic;
  color: #253C80;
}

.disclaimer h5 {
  font-size: 1rem;
  margin: 0 0 0.5em 0;
  font-style: normal;
}

.disclaimer ul {
  margin: 0;
  padding-left: 1.2em;
  font-size: 0.85em;
}

@media screen and (max-width: 768px) {
  .form-grid {
    grid-template-columns: 1fr;
  }

  header {
    flex-direction: column;
    align-items: center;
  }

  .header-actions {
    margin-top: 0.5em;
  }
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(37, 60, 128, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.modal-content {
  background-color: white;
  padding: 2em;
  border-radius: 10px;
  width: 85%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  position: relative;
  color: #253C80;
  font-size: 0.85rem;
}

@media screen and (max-width: 600px) {
  .modal-content {
    width: 95%;
    height: 95%;
    max-width: none;
    max-height: none;
    border-radius: 0;
    padding: 1em;
  }
}

.modal-content h3 {
  margin-top: 0;
  color: #253C80;
  font-size: 1.2em;
}

.modal-content p {
  font-size: 0.85rem;
  border-bottom: 1px solid #eee;
  padding-bottom: 0.4em;
  margin-bottom: 0.6em;
}

.detail-field {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  margin-bottom: 1em;
}

.detail-field strong {
  width: 160px;
  flex-shrink: 0;
  color: #253C80;
}

.detail-field span {
  flex: 1;
  word-break: break-word;
  white-space: pre-wrap;
}

.close-button {
  position: absolute;
  top: 12px;
  right: 18px;
  font-size: 1.5em;
  color: #253C80;
  cursor: pointer;
}

.close-button:hover {
  color: #1c2f66;
}

/* --- Case Results Table --- */
.scroll-wrapper {
  overflow-x: auto;
  overflow-y: hidden;
  position: relative;
}

.scrollable-table {
  overflow: auto;
  max-height: 400px;
  margin-bottom: 1em;
  position: relative;
}

.cases-table {
  display: grid;
  grid-template-columns: repeat(5, 1fr);  
  background-color: white;
  font-size: 0.9rem;
  border: 1px solid #ADCDFD;
  border-radius: 6px;
  min-width: 1000px;                      
  border-collapse: collapse;
}

.case-row {
  display: contents;
}

.case-cell {
  padding: 0.75em;
  font-size: 0.75rem;
  border: 1px solid #ADCDFD;
  color: #253C80;
  word-break: break-word;
  overflow-wrap: break-word;
  box-sizing: border-box;
  background-color: white;
}

.case-cell a {
  color: #253C80;
  text-decoration: underline;
}

.case-cell a:hover {
  color: #1c2f66;
}

.header-cell {
  position: sticky;
  top: 0;
  background-color: #e6efff;
  font-weight: bold;
  z-index: 2;
}

.header-cell:hover {
  background-color: #d3e0fa;
}

.header-cell input,
.header-cell select {
  width: 100%;
  font-size: 0.75rem;
  padding: 0.3em;
  border-radius: 4px;
  border: 1px solid #ccc;
  margin-top: 0.3em;
  color: #253C80;
  box-sizing: border-box;
}

/* --- Case Results Form Responsive --- */
.form-section-title {
  font-size: 0.75rem;
  color: #253C80;
  margin-top: 2em;
  margin-bottom: 0.5em;
}

.results-form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1em;
}

.results-header-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
}

@media screen and (min-width: 768px) {
  .results-form-grid {
    grid-template-columns: 1fr;
  }

  .results-header-actions {
    justify-content: flex-start;
  }
}

/* ===============================
   Searchable <select> enhancement
   (keeps same visual footprint)
==================================*/
.ss-wrap {
  position: relative;
}
.ss-input {
  /* Mimic select styling to keep layout identical */
  margin-top: 0.3em;
  padding: 0.6em;
  font-size: 0.875rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  width: 100%;
  background: #fff;
  color: inherit;
}
.ss-input:focus {
  outline: none;
  border-color: #253C80;
  box-shadow: 0 0 0 3px rgba(37, 60, 128, 0.2);
}
.ss-list {
  position: absolute;
  z-index: 20;
  left: 0; right: 0;
  margin-top: 2px;
  max-height: 260px;
  overflow: auto;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-shadow: 0 8px 20px rgba(0,0,0,.08);
  display: none;
}
.ss-wrap[aria-expanded="true"] .ss-list { display: block; }
.ss-option {
  padding: 0.55em 0.75em;
  cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ss-option[aria-selected="true"], .ss-option:hover {
  background: #e6efff;
}
.ss-no-results {
  padding: 0.55em 0.75em;
  color: #666;
  font-style: italic;
  border-top: 1px dashed #eee;
}

select.ss-hidden {
  display: none !important;
}

.attachments-inline {
  margin-top: 0.75rem;
}

.attachments-inline h4 {
  margin: 0 0 0.35rem 0;
  color: #253C80;
  font-size: 1rem;
  border-bottom: 1px solid #ADCDFD;
  padding-bottom: 0.2rem;
}

#attachmentHint {
  font-size: 0.8rem;
  color: #253C80;
  opacity: 0.8;
}

#attachmentErrors {
  color: #b00020;
  margin-top: 0.35rem;
}

#attachmentList {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

/* Progress bar look (kept subtle) */
.att-bar-wrap {
  height: 8px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
}
.att-bar {
  height: 100%;
  width: 0%;
  background: #253C80;
  transition: width .15s linear;
}

.header-cell .header-filter-input {
  width: 100%;
  font-size: 0.7rem;
  padding: 0.25em 0.4em;
  margin-bottom: 0.3em;
  box-sizing: border-box;
}

.header-cell .header-filter-select {
  width: 100%;
  font-size: 0.7rem;
  padding: 0.25em 0.4em;
  box-sizing: border-box;
  margin-bottom: 0.2em;
}

.header-cell .header-sort-select {
  width: 100%;
  font-size: 0.7rem;
  padding: 0.25em 0.4em;
  box-sizing: border-box;
  margin-bottom: 0.3em;
}
.case-note {
  margin-top: 0.25rem;
  font-size: 0.85rem;
  color: #444;
  font-style: italic;
}

.label-with-note {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.label-with-note .case-note {
  font-size: 0.8rem; 
  color: #555;
  margin-left: 0.5rem;
  white-space: nowrap; 
}


