.bugs-page {
  max-width: 920px;
}

.bugs-intro {
  color: #9ca3af;
  margin-bottom: 2rem;
}

.bugs-grid {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 900px) {
  .bugs-grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.bugs-panel {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(65, 225, 216, 0.2);
  border-radius: 12px;
  padding: 1.5rem;
}

.bugs-panel h2 {
  margin-top: 0;
  font-size: 1.25rem;
}

.bug-form label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: #e5e7eb;
}

.bug-form .required::after {
  content: " *";
  color: #41e1d8;
}

.bug-form .field {
  margin-bottom: 1rem;
}

.bug-form input[type="text"],
.bug-form input[type="email"],
.bug-form input[type="file"],
.bug-form select,
.bug-form textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(65, 225, 216, 0.35);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.25);
  color: #f3f4f6;
  font-family: inherit;
  font-size: 1rem;
}

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

.bug-form input:focus,
.bug-form select:focus,
.bug-form textarea:focus {
  outline: 2px solid #41e1d8;
  outline-offset: 1px;
}

.bug-form .hint {
  font-size: 0.8rem;
  color: #9ca3af;
  margin-top: 0.25rem;
}

.btn-submit {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: #41e1d8;
  color: #111827;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
}

.btn-submit:hover:not(:disabled) {
  filter: brightness(1.08);
}

.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.bug-form__internal-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.75rem;
}

.bug-form .bug-internal-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0;
  font-weight: 400;
  cursor: pointer;
  user-select: none;
  font-size: 0.85rem;
  color: #9ca3af;
}

.bug-internal-toggle__label {
  line-height: 1.2;
  white-space: nowrap;
}

.bug-internal-toggle__switch {
  position: relative;
  flex-shrink: 0;
  width: 2.25rem;
  height: 1.2rem;
}

.bug-internal-toggle__switch input {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.bug-internal-toggle__track {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(65, 225, 216, 0.25);
  box-sizing: border-box;
  overflow: hidden;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.bug-internal-toggle__track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: calc(1.2rem - 6px);
  height: calc(1.2rem - 6px);
  border-radius: 50%;
  background: #9ca3af;
  transition: transform 0.15s ease, background 0.15s ease;
}

.bug-internal-toggle__switch input:checked + .bug-internal-toggle__track {
  background: rgba(251, 191, 36, 0.25);
  border-color: rgba(251, 191, 36, 0.55);
}

.bug-internal-toggle__switch input:checked + .bug-internal-toggle__track::after {
  left: auto;
  right: 2px;
  transform: none;
  background: #fbbf24;
}

.bug-internal-toggle__switch input:focus-visible + .bug-internal-toggle__track {
  outline: 2px solid #41e1d8;
  outline-offset: 2px;
}

.form-message {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.95rem;
}

.form-message--error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #fca5a5;
}

.form-message--success {
  background: rgba(65, 225, 216, 0.12);
  border: 1px solid rgba(65, 225, 216, 0.5);
  color: #a7f3d0;
}

.bugs-table-wrap {
  overflow-x: auto;
  margin-top: 0.5rem;
}

.bugs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.bugs-table th,
.bugs-table td {
  padding: 0.65rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid rgba(65, 225, 216, 0.2);
}

.bugs-table th {
  color: #41e1d8;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.bugs-table tbody tr:hover {
  background: rgba(65, 225, 216, 0.06);
}

.bugs-table__id {
  font-family: ui-monospace, "Cascadia Code", monospace;
  color: #41e1d8;
  white-space: nowrap;
  width: 5.5rem;
}

.bugs-table__title {
  color: #f3f4f6;
}

.bugs-table__status {
  white-space: nowrap;
  width: 7rem;
}

.bug-status {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.bug-status--open {
  background: rgba(65, 225, 216, 0.2);
  color: #41e1d8;
}

.bug-status--in_progress {
  background: rgba(251, 191, 36, 0.2);
  color: #fbbf24;
}

.bug-status--resolved {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
}

.bug-error-row .bug-error {
  border-bottom: none;
}

.bugs-empty,
.bugs-loading {
  color: #9ca3af;
  font-style: italic;
}

.bug-error {
  color: #fca5a5;
  padding: 1rem;
  background: rgba(239, 68, 68, 0.1);
  border-radius: 8px;
}

.bug-error small {
  color: #9ca3af;
}
