/* ============================================
   EOTG — Report Stylesheet
   Applied on report.html
   ============================================ */

.report-container {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

/* ─── FORM ─── */
.report-form {
  background: var(--bg-card);
  border: 1px solid rgba(79, 184, 200, 0.15);
  border-radius: 10px;
  padding: 2.5rem;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

label {
  display: block;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--col-white);
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
}

input[type="text"],
input[type="date"],
input[type="number"],
select,
textarea {
  width: 100%;
  background: rgba(11, 23, 42, 0.8);
  border: 1px solid rgba(79, 184, 200, 0.25);
  border-radius: 6px;
  padding: 0.8rem 1rem;
  color: var(--col-white);
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input[type="text"]:focus,
input[type="date"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
  border-color: var(--col-teal);
  box-shadow: 0 0 10px rgba(79, 184, 200, 0.2);
}

input::placeholder,
textarea::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%234fb8c8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 16px;
  cursor: pointer;
}

select option {
  background: var(--bg-deep);
  color: var(--col-white);
  padding: 0.5rem;
}

textarea {
  resize: vertical;
  min-height: 80px;
}

/* File Upload customization */
.file-upload-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.file-upload-wrapper input[type="file"] {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.file-upload-indicator {
  display: inline-block;
  background: rgba(79, 184, 200, 0.1);
  border: 1px dashed rgba(79, 184, 200, 0.4);
  color: var(--col-teal);
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  font-family: var(--font-display);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.file-upload-wrapper:hover .file-upload-indicator {
  background: rgba(79, 184, 200, 0.2);
  border-color: var(--col-teal);
}

.file-name {
  font-size: 0.85rem;
  color: var(--col-mist);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 250px;
}

.photo-preview {
  margin-top: 1rem;
  max-width: 200px;
  max-height: 200px;
  border: 1px solid rgba(79, 184, 200, 0.3);
  border-radius: 6px;
  object-fit: cover;
}

.submit-btn {
  margin-top: 1rem;
  width: 100%;
  justify-content: center;
  padding: 1rem;
  font-size: 0.9rem;
}

/* ─── REPORT OUTPUT CARD ─── */
.report-output {
  animation: fadeSlideUp 0.6s ease both;
}

.report-card {
  background: linear-gradient(135deg, rgba(16, 30, 55, 0.9), rgba(11, 23, 42, 0.95));
  border: 1px solid rgba(79, 184, 200, 0.3);
  border-radius: 8px;
  padding: 0;
  overflow: hidden;
  position: relative;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

/* ─── REPORTS LIST (COMPACT GRID) ─── */
.reports-list, .patrols-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
  width: 100%;
}

.report-card.compact {
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  margin-top: 0 !important;
}

.report-card.compact:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(79, 184, 200, 0.2);
}

.report-card.compact .report-body {
  padding: 1.5rem;
  flex-direction: column;
  gap: 1rem;
}

.report-card.compact .rb-left {
  display: none;
}

/* ─── REPORT MODAL ─── */
.report-modal {
  position: fixed;
  inset: 0;
  background: rgba(11, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.report-modal.show {
  display: flex;
  opacity: 1;
}

.report-modal .report-card {
  width: 100%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  margin-top: 0 !important;
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--col-dim);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  z-index: 20;
  transition: color 0.3s ease;
}

.modal-close-btn:hover {
  color: var(--col-white);
}

.report-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--col-teal);
  box-shadow: var(--glow-teal);
}

.report-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(79, 184, 200, 0.1);
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(79, 184, 200, 0.2);
  position: relative;
}

.report-actions {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  gap: 16px;
  z-index: 10;
}

.report-actions button {
  background: transparent;
  border: none;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  padding: 4px;
  transition: all 0.3s ease;
  opacity: 0.4;
  letter-spacing: 0.15em;
}

.report-actions .btn-edit {
  color: var(--col-teal);
}

.report-actions .btn-edit:hover {
  opacity: 1;
  text-shadow: var(--glow-teal);
}

.report-actions .btn-delete {
  color: #ff5555;
}

.report-actions .btn-delete:hover {
  opacity: 1;
  text-shadow: 0 0 8px rgba(255, 85, 85, 0.6);
}

.rh-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--col-white);
  letter-spacing: 0.1em;
}

.rh-status {
  background: rgba(180, 60, 60, 0.15);
  color: #e08080;
  border: 1px solid rgba(200, 80, 80, 0.3);
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.15em;
}

.report-body {
  display: flex;
  padding: 2rem;
  gap: 2rem;
}

.rb-left {
  flex-shrink: 0;
}

.report-img-wrapper {
  width: 140px;
  height: 180px;
  background: #000;
  border: 1px solid rgba(79, 184, 200, 0.5);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
}

.report-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.2) sepia(0.2) hue-rotate(180deg) saturate(0.8);
}

.scan-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(79, 184, 200, 0) 50%, rgba(79, 184, 200, 0.1) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
  background-size: 100% 4px, 3px 100%;
  pointer-events: none;
}

.rb-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

.info-row {
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.info-label {
  font-family: var(--font-display);
  font-size: 0.65rem;
  color: var(--col-dim);
  letter-spacing: 0.1em;
}

.info-val {
  font-size: 1rem;
  color: var(--col-mist);
  font-weight: 500;
}

.info-val.highlight {
  color: var(--col-white);
  font-weight: 600;
  font-size: 1.1rem;
}

.report-stamp {
  position: absolute;
  right: 1.5rem;
  bottom: 1.5rem;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 800;
  color: rgba(79, 184, 200, 0.2);
  transform: rotate(-12deg);
  letter-spacing: 0.2em;
  border: 3px solid rgba(79, 184, 200, 0.2);
  padding: 0.6rem 1rem;
  border-radius: 4px;
  text-transform: uppercase;
  pointer-events: none;
  transition: all 0.3s ease;
  z-index: 5;
}

/* Status Variations */
.report-stamp.stamp-accepted {
  color: #4fb8c8;
  border-color: #4fb8c8;
  box-shadow: inset 0 0 10px rgba(79, 184, 200, 0.2);
  opacity: 0.9;
}

.report-stamp.stamp-review {
  color: #ffaa00;
  border-color: #ffaa00;
  box-shadow: inset 0 0 10px rgba(255, 170, 0, 0.2);
  opacity: 0.9;
}

.report-stamp.stamp-cancelled {
  color: #ff4444;
  border-color: #ff4444;
  box-shadow: inset 0 0 10px rgba(255, 68, 68, 0.2);
  opacity: 0.9;
}

/* ─── STATUS CONTROL PANEL ─── */
.status-control-panel {
  display: flex;
  justify-content: center;
  gap: 1rem;
  padding: 0.8rem;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid rgba(79, 184, 200, 0.1);
}

.status-btn {
  padding: 0.4rem 0.8rem;
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  background: transparent;
  border: 1px solid currentColor;
}

.status-btn.btn-accept { color: #4fb8c8; }
.status-btn.btn-accept:hover { background: rgba(79, 184, 200, 0.15); box-shadow: 0 0 10px rgba(79, 184, 200, 0.3); }

.status-btn.btn-review { color: #ffaa00; }
.status-btn.btn-review:hover { background: rgba(255, 170, 0, 0.15); box-shadow: 0 0 10px rgba(255, 170, 0, 0.3); }

.status-btn.btn-cancel { color: #ff4444; }
.status-btn.btn-cancel:hover { background: rgba(255, 68, 68, 0.15); box-shadow: 0 0 10px rgba(255, 68, 68, 0.3); }

@media (max-width: 650px) {
  .report-body {
    flex-direction: column;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
}
