/* -------------------------------------------------------
   Opal Imaging Portal — style.css
   Clean, clinical UI matching the PS1 launcher aesthetic
------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: Arial, sans-serif;
  font-size: 14px;
  background: #ebeae6;
  color: #2e2e30;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* -------------------------------------------------------
   Header
------------------------------------------------------- */
header {
  background: #2e2e30;
  color: #fff;
  padding: 10px 24px;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1100px;
  margin: 0 auto;
}
.header-title {
  font-size: 15px;
  font-weight: bold;
  letter-spacing: 0.3px;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}
.header-user {
  font-size: 13px;
  color: #ccc;
}
.btn-logout {
  font-size: 12px;
  color: #fff;
  background: #555;
  padding: 4px 12px;
  text-decoration: none;
  border: none;
  cursor: pointer;
}
.btn-logout:hover { background: #777; }

/* -------------------------------------------------------
   Main / Footer
------------------------------------------------------- */
main {
  flex: 1;
  padding: 32px 24px;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}
footer {
  background: #d2cfca;
  text-align: center;
  padding: 10px;
  font-size: 11px;
  color: #666;
}

/* -------------------------------------------------------
   Flash
------------------------------------------------------- */
.flash {
  background: #fff3cd;
  border: 1px solid #ffc107;
  padding: 10px 16px;
  margin-bottom: 20px;
  font-size: 13px;
}

/* -------------------------------------------------------
   Auth (login)
------------------------------------------------------- */
.auth-wrap {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 60px;
}
.auth-box {
  background: #f8f7f3;
  border: 1px solid #d2cfca;
  padding: 36px 40px;
  width: 100%;
  max-width: 420px;
}
.auth-logo h1 {
  font-size: 20px;
  margin-bottom: 4px;
}
.auth-logo p {
  font-size: 12px;
  color: #888;
  margin-bottom: 28px;
}
.form-group {
  margin-bottom: 18px;
}
.form-group label {
  display: block;
  font-size: 12px;
  font-weight: bold;
  margin-bottom: 5px;
}
.form-group input {
  width: 100%;
  padding: 8px 10px;
  font-size: 13px;
  border: 1px solid #d2cfca;
  background: #fff;
  outline: none;
}
.form-group input:focus {
  border-color: #2e2e30;
}
.auth-note {
  font-size: 11px;
  color: #888;
  margin-top: 16px;
  text-align: center;
}

/* -------------------------------------------------------
   Buttons
------------------------------------------------------- */
.btn-primary {
  display: inline-block;
  background: #2e2e30;
  color: #fff;
  padding: 8px 20px;
  font-size: 13px;
  border: none;
  cursor: pointer;
  text-decoration: none;
}
.btn-primary:hover { background: #555; }
.btn-full { width: 100%; text-align: center; padding: 10px; }
.btn-cancel {
  display: inline-block;
  background: #888;
  color: #fff;
  padding: 8px 20px;
  font-size: 13px;
  border: none;
  cursor: pointer;
}
.btn-cancel:hover { background: #666; }
.btn-download {
  display: inline-block;
  background: #2a6e2a;
  color: #fff;
  padding: 5px 12px;
  font-size: 12px;
  text-decoration: none;
  white-space: nowrap;
}
.btn-download:hover { background: #3a8e3a; }

/* -------------------------------------------------------
   Alerts
------------------------------------------------------- */
.alert {
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 13px;
}
.alert-error {
  background: #fff0f0;
  border: 1px solid #cc0000;
  color: #cc0000;
}

/* -------------------------------------------------------
   Search
------------------------------------------------------- */
.search-wrap {
  width: 100%;
}
.search-box {
  background: #f8f7f3;
  border: 1px solid #d2cfca;
  padding: 28px 32px;
}
.search-box h2 {
  font-size: 16px;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #d2cfca;
}
.search-row { margin-bottom: 8px; }
.search-type-toggle {
  display: flex;
  gap: 24px;
  margin-bottom: 12px;
}
.radio-label {
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}
.search-input-row {
  display: flex;
  gap: 10px;
}
.search-input-row input {
  flex: 1;
  padding: 8px 10px;
  font-size: 13px;
  border: 1px solid #d2cfca;
  background: #fff;
  outline: none;
  max-width: 420px;
}
.search-input-row input:focus { border-color: #2e2e30; }
.search-hint {
  font-size: 11px;
  color: #888;
  margin-top: 6px;
}

/* -------------------------------------------------------
   Results table
------------------------------------------------------- */
.results-wrap { margin-top: 24px; }
.results-count {
  font-size: 12px;
  color: #666;
  margin-bottom: 10px;
}
.results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.results-table th {
  background: #d2cfca;
  padding: 8px 10px;
  text-align: left;
  font-size: 12px;
  font-weight: bold;
}
.results-table td {
  padding: 7px 10px;
  border-bottom: 1px solid #d2cfca;
  background: #f8f7f3;
  vertical-align: middle;
}
.results-table tr:nth-child(even) td { background: #ebeae6; }
.results-table tr:hover td { background: #e0deda; }
.row-fixme td { background: #fff8f0 !important; }

/* Source badges */
.source-badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: bold;
  border-radius: 2px;
}
.source-opal    { background: #d0e8ff; color: #1a4a7a; }
.source-catella { background: #d4edda; color: #155724; }

.fixme-badge {
  color: #cc6600;
  margin-left: 4px;
  font-size: 12px;
}
.fixme-note {
  font-size: 11px;
  color: #cc6600;
  margin-top: 10px;
}

/* -------------------------------------------------------
   Confirmation modal
------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.modal-box {
  background: #f8f7f3;
  border: 1px solid #d2cfca;
  padding: 32px 36px;
  max-width: 420px;
  width: 90%;
}
.modal-box h3 {
  font-size: 15px;
  margin-bottom: 12px;
}
.modal-box p {
  font-size: 13px;
  margin-bottom: 16px;
}
.confirm-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
  font-size: 13px;
}
.confirm-table td {
  padding: 5px 8px;
  border-bottom: 1px solid #d2cfca;
}
.confirm-table td:first-child {
  font-weight: bold;
  width: 60px;
  color: #666;
}
.confirm-warning {
  font-size: 11px;
  color: #888;
  margin-bottom: 20px !important;
}
.modal-buttons {
  display: flex;
  gap: 12px;
}
