/* Hinweisgebersystem - DigitalMaster Hub CI */
:root {
  --primary: #4ecdc4;
  --primary-dark: #3dbdb5;
  --dark: #1a1a2e;
  --white: #ffffff;
  --gray-light: #f8fafc;
  --gray: #64748b;
  --gray-dark: #334155;
  --border: #e2e8f0;
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--gray-light);
  color: var(--dark);
  line-height: 1.6;
  min-height: 100vh;
}

.app-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  max-width: 900px;
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: var(--primary);
  color: var(--white);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.25rem;
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--dark);
}

/* Main Content */
.main-content {
  flex: 1;
  padding: 2rem;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

/* Views */
.view {
  display: none;
}

.view.active {
  display: block;
}

/* Cards */
.card {
  background: var(--white);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: var(--shadow);
}

.card-header {
  margin-bottom: 1.5rem;
}

.card-header h2 {
  color: var(--dark);
  font-size: 1.5rem;
  margin-top: 0.5rem;
}

.btn-back {
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0;
}

.btn-back:hover {
  color: var(--primary-dark);
}

/* Welcome Card */
.welcome-card h1 {
  color: var(--dark);
  font-size: 2rem;
  margin-bottom: 1rem;
}

.welcome-text {
  color: var(--gray);
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

/* Info Box */
.info-box {
  background: #f0fdfa;
  border: 1px solid #99f6e4;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.info-box h3 {
  color: var(--primary-dark);
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.info-box ul {
  list-style: none;
  padding: 0;
}

.info-box li {
  padding: 0.25rem 0;
  padding-left: 1.5rem;
  position: relative;
  color: var(--gray-dark);
}

.info-box li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: bold;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.btn-outline {
  background: transparent;
  color: var(--dark);
  border-color: var(--border);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-large {
  padding: 1rem 2rem;
  font-size: 1.1rem;
}

.btn-small {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.button-group {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

/* Form Fields */
.field {
  margin-bottom: 1.5rem;
}

.field label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--dark);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.field textarea {
  resize: vertical;
  min-height: 120px;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

/* Radio Options */
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  border: 2px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.radio-option:hover {
  border-color: var(--primary);
}

.radio-option input:checked + span {
  color: var(--primary);
}

.radio-option input {
  width: 20px;
  height: 20px;
  accent-color: var(--primary);
}

/* Checkbox */
.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
}

.checkbox-label input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--primary);
}

.checkbox-label a {
  color: var(--primary);
}

/* File Upload */
.file-upload {
  border: 2px dashed var(--border);
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.file-upload:hover {
  border-color: var(--primary);
  background: #f0fdfa;
}

.file-upload input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.file-upload-text {
  color: var(--gray);
}

.file-upload-text small {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.8rem;
}

.file-list {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1rem;
  background: var(--gray-light);
  border-radius: 6px;
  font-size: 0.9rem;
}

/* Contact Fields */
.contact-fields {
  background: var(--gray-light);
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.contact-fields.hidden {
  display: none;
}

/* Error Message */
.error-message {
  color: var(--error);
  padding: 0.75rem;
  background: #fef2f2;
  border-radius: 6px;
  margin-bottom: 1rem;
  display: none;
}

.error-message:not(:empty) {
  display: block;
}

/* Success Card */
.success-card {
  text-align: center;
}

.success-icon {
  width: 80px;
  height: 80px;
  background: var(--success);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  margin: 0 auto 1.5rem;
}

.success-card h2 {
  color: var(--dark);
  margin-bottom: 0.5rem;
}

.success-card > p {
  color: var(--gray);
  margin-bottom: 2rem;
}

.access-code-box {
  background: var(--gray-light);
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.access-code-box h3 {
  font-size: 0.9rem;
  color: var(--gray);
  margin-bottom: 0.5rem;
}

.access-code {
  font-family: monospace;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: 2px;
  margin-bottom: 1rem;
}

.warning-box {
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: 8px;
  padding: 1rem;
  color: #92400e;
  font-size: 0.9rem;
  text-align: left;
  margin-bottom: 1.5rem;
}

/* Report Details */
.report-meta {
  display: flex;
  gap: 2rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.meta-label {
  font-size: 0.8rem;
  color: var(--gray);
  text-transform: uppercase;
}

.status-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
}

.status-badge.new {
  background: #dbeafe;
  color: #1d4ed8;
}

.status-badge.in_progress {
  background: #fef3c7;
  color: #d97706;
}

.status-badge.resolved,
.status-badge.closed {
  background: #d1fae5;
  color: #059669;
}

.report-content {
  margin-bottom: 2rem;
}

.report-content h3 {
  color: var(--dark);
  margin-bottom: 0.75rem;
}

.report-content p {
  color: var(--gray-dark);
  white-space: pre-wrap;
}

/* Messages */
.messages-section {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
}

.messages-section h3 {
  margin-bottom: 1rem;
  color: var(--dark);
}

.messages-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
  max-height: 400px;
  overflow-y: auto;
}

.message {
  padding: 1rem;
  border-radius: 8px;
  max-width: 80%;
}

.message.reporter {
  background: var(--gray-light);
  align-self: flex-start;
}

.message.admin {
  background: #f0fdfa;
  border: 1px solid #99f6e4;
  align-self: flex-end;
}

.message-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
  color: var(--gray);
}

.message-content {
  color: var(--dark);
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: var(--white);
  border-radius: 12px;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 {
  font-size: 1.25rem;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--gray);
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
}

/* Footer */
.footer {
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 1rem 2rem;
  text-align: center;
  color: var(--gray);
  font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 640px) {
  .main-content {
    padding: 1rem;
  }

  .card {
    padding: 1.5rem;
  }

  .button-group {
    flex-direction: column;
  }

  .btn-large {
    width: 100%;
  }

  .report-meta {
    flex-direction: column;
    gap: 1rem;
  }
}
