* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f8f9fb;
  color: #222;
}
.top-bar {
  background: linear-gradient(135deg, #1f70ff 0%, #1a5cd9 100%);
  border-bottom: 3px solid #1450c0;
  padding: 16px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 12px rgba(31, 112, 255, 0.2);
}
.top-bar h1 {
  margin: 0;
  font-size: 1.5rem;
  color: white;
}
.header-nav {
  display: flex;
  gap: 8px;
  align-items: center;
}
.header-form-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-right: 16px;
  position: relative;
}
.header-form-row select {
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.15);
  color: white;
  font-size: 0.9rem;
  min-width: 140px;
  cursor: pointer;
  transition: all 0.2s;
}
.header-form-row select:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.6);
}
.header-form-row select:focus {
  outline: none;
  border-color: white;
  background: rgba(255, 255, 255, 0.3);
}
.header-form-row select option {
  background: white;
  color: #222;
  padding: 8px;
}
.nav-btn {
  padding: 10px 16px;
  border: 2px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  font-weight: 600;
  transition: all 0.2s;
  font-size: 0.95rem;
}
.nav-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}
.nav-btn.active {
  background: white;
  color: #1f70ff;
  border-color: white;
}
.logout-btn {
  background: #dc3545 !important;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-left: 12px;
}
.logout-btn:hover {
  background: #c82333 !important;
}
main {
  max-width: 900px;
  margin: 32px auto;
  padding: 0 16px;
}
h1 {
  text-align: center;
}
.panel {
  background: #fff;
  border: 1px solid #dce1e7;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.form-row {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}
label {
  font-weight: 600;
}
input,
select,
textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #c5cbd6;
  border-radius: 8px;
  font-size: 1rem;
}
button {
  padding: 12px 16px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  margin-right: 8px;
  background: #1f70ff;
  color: white;
  font-weight: 600;
  transition: opacity 0.2s;
}
button:hover {
  opacity: 0.9;
}
button.secondary {
  background: #6c757d;
}
button.danger {
  background: #dc3545;
}
.field-description {
  font-size: 0.9rem;
  color: #6b7280;
  margin-top: 8px;
}
.filter-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: flex-end;
  margin-bottom: 16px;
}
.checkbox-row {
  margin-top: 24px;
}
#report-filter {
  width: 100%;
}
.report-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.report-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.report-item.read {
  background: #eef7ea;
}
.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.8rem;
  margin-left: 8px;
}
.badge.unread {
  background: #fff3cd;
  color: #856404;
}
#message {
  margin-top: 16px;
}
.report-item {
  border: 1px solid #e3e7ee;
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 12px;
  background: #fbfcff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.2s, transform 0.2s;
}
.report-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}
.report-item pre {
  white-space: pre-wrap;
  word-break: break-word;
}
.report-body {
  margin: 16px 0;
}
.report-details {
  display: grid;
  gap: 16px;
}
.report-field {
  display: grid;
  gap: 8px;
  padding: 12px 0;
  border-bottom: 1px solid #e9edf3;
}
.report-field:last-child {
  border-bottom: none;
}
.report-field-label {
  font-weight: 700;
  color: #333;
}
.report-sub-object {
  margin-left: 20px;
  border-left: 2px solid #e9edf3;
  padding-left: 10px;
  margin-top: 8px;
}
.report-file-meta {
  font-size: 0.9rem;
  color: #6b7280;
  margin-top: 4px;
  flex-grow: 1;
}
.file-element {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding: 8px;
  background: #f8f9fa;
  border-radius: 6px;
  border: 1px solid #e9ecef;
}

.file-thumbnail {
  flex-shrink: 0;
}

.file-thumbnail-image {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.2s;
}

.file-thumbnail-image:hover {
  transform: scale(1.05);
}

.file-icon {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e9ecef;
  border-radius: 6px;
  font-size: 2rem;
}

.file-download-btn {
  padding: 6px 12px;
  background: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background-color 0.2s;
}

.file-download-btn:hover {
  background: #0056b3;
}
.report-actions button {
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: background-color 0.2s;
}
.report-actions .secondary {
  background: #6c757d;
  color: white;
}
.report-actions .secondary:hover {
  background: #5a6268;
}
.report-actions .danger {
  background: #dc3545;
  color: white;
}
.report-actions .danger:hover {
  background: #c82333;
}
.report-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.section-active {
  display: block !important;
}
main section {
  display: none;
}
