/**
 * Flux Bug Report Desk - Clean Professional Light Theme
 * Designed to match Flux Pay's official landing page and design system
 * @version 3.1.0
 */

:root {
  --fx-paper: #F5F4EE;
  --fx-white: #FFFFFF;
  --fx-ink: #171717;
  --fx-body: #6E7668;
  --fx-line: #DCDED3;
  --fx-line-light: #ECEEE5;
  --fx-orange: #F36B35;
  --fx-orange-hover: #E04E1A;
  --fx-orange-light: #FFF4ED;
  --fx-orange-border: rgba(243, 107, 53, 0.3);
  --fx-green: #1F7A4D;
  --fx-green-pill: #DFF5E9;
  --fx-font: 'Manrope', 'DM Sans', 'Archivo', system-ui, -apple-system, sans-serif;
  --fx-font-mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
}

/* Page Wrap & Box Model Protection */
.br-page-wrap,
.br-page-wrap *,
.br-page-wrap *::before,
.br-page-wrap *::after {
  box-sizing: border-box;
}

.br-page-wrap {
  min-height: 85vh;
  padding: 40px 16px 100px;
  background-color: var(--fx-paper);
  color: var(--fx-ink);
  font-family: var(--fx-font);
  -webkit-font-smoothing: antialiased;
}

.br-container {
  max-width: 820px;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

/* Top Header */
.br-header {
  text-align: center;
  margin-bottom: 28px;
  padding-top: 10px;
}
.br-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 9999px;
  background: var(--fx-white);
  border: 1px solid var(--fx-line);
  color: var(--fx-ink);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}
.br-badge-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--fx-green);
  box-shadow: 0 0 0 3px rgba(31, 122, 77, 0.2);
}

.br-header h1 {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 10px;
  color: var(--fx-ink);
  letter-spacing: -0.03em;
}
.br-header h1 span {
  color: var(--fx-orange);
}
.br-header p {
  font-size: 15px;
  color: var(--fx-body);
  max-width: 580px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Common Issue Presets (No horizontal scrollbar bug!) */
.br-presets-bar {
  margin-bottom: 24px;
  text-align: center;
}
.br-presets-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fx-body);
  margin-bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.br-presets-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.br-preset-btn {
  background: var(--fx-white);
  border: 1px solid var(--fx-line);
  border-radius: 9999px;
  padding: 7px 14px;
  color: var(--fx-ink);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.18s ease;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}
.br-preset-btn:hover {
  background: var(--fx-orange-light);
  border-color: var(--fx-orange);
  color: var(--fx-orange);
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(243, 107, 53, 0.12);
}

/* Diagnostic Telemetry Strip */
.br-telemetry-hud {
  background: var(--fx-white);
  border: 1px solid var(--fx-line);
  border-radius: 14px;
  padding: 12px 18px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}
.br-telemetry-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.br-telemetry-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--fx-orange-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fx-orange);
  flex-shrink: 0;
}
.br-telemetry-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--fx-ink);
  display: flex;
  align-items: center;
  gap: 8px;
}
.br-badge-synced {
  font-size: 10px;
  font-weight: 800;
  background: var(--fx-green-pill);
  color: var(--fx-green);
  padding: 2px 6px;
  border-radius: 4px;
}
.br-telemetry-sub {
  font-size: 11.5px;
  color: var(--fx-body);
}
.br-telemetry-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.br-chip-spec {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--fx-paper);
  border: 1px solid var(--fx-line);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--fx-ink);
}
.br-chip-spec.merchant {
  background: var(--fx-green-pill);
  border-color: rgba(31, 122, 77, 0.25);
  color: var(--fx-green);
  font-weight: 700;
}

/* Main Form Card */
.br-card {
  background: var(--fx-white);
  border: 1px solid var(--fx-line);
  border-radius: 22px;
  padding: clamp(22px, 3.5vw, 36px);
  box-shadow: 0 10px 40px -15px rgba(23, 23, 23, 0.06);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

/* Sections */
.br-section {
  margin-bottom: 30px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--fx-line-light);
}
.br-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}
.br-section-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--fx-ink);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.br-section-num {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: var(--fx-orange);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.br-section-desc {
  font-size: 13px;
  color: var(--fx-body);
  margin-bottom: 18px;
  margin-left: 34px;
}

/* Category Grid (Balanced 2-Column Desktop / Tablet, 1-Column Mobile - NO OVERFLOW!) */
.br-category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 22px;
  width: 100%;
  box-sizing: border-box;
}
@media (max-width: 620px) {
  .br-category-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

.br-cat-card {
  background: var(--fx-white);
  border: 1.5px solid var(--fx-line);
  border-radius: 14px;
  padding: 13px 16px;
  cursor: pointer;
  transition: all 0.18s ease;
  display: flex;
  align-items: center;
  gap: 12px;
  user-select: none;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}
.br-cat-card:hover {
  border-color: #B5B9A8;
  transform: translateY(-1.5px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.04);
}
.br-cat-card.active {
  background: var(--fx-orange-light);
  border-color: var(--fx-orange);
  box-shadow: 0 6px 18px rgba(243, 107, 53, 0.14);
}
.br-cat-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.18s ease;
}
.br-cat-meta {
  flex: 1;
  min-width: 0;
}
.br-cat-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--fx-ink);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.br-cat-card.active .br-cat-name {
  color: var(--fx-orange-hover);
}
.br-cat-hint {
  font-size: 11.5px;
  color: var(--fx-body);
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Severity Segmented Cards */
.br-severity-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 20px;
  width: 100%;
  box-sizing: border-box;
}
@media (max-width: 580px) {
  .br-severity-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
}
.br-sev-card {
  background: var(--fx-white);
  border: 1.5px solid var(--fx-line);
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.18s ease;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}
@media (max-width: 580px) {
  .br-severity-grid { grid-template-columns: repeat(2, 1fr); }
}
.br-sev-card {
  background: var(--fx-white);
  border: 1.5px solid var(--fx-line);
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.18s ease;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.br-sev-card:hover {
  transform: translateY(-1px);
}
.br-sev-card.active {
  border-width: 2px;
}
.br-sev-card.sev-low.active { background: #F8FAFC; border-color: #64748B; }
.br-sev-card.sev-med.active { background: #F0F9FF; border-color: #0284C7; }
.br-sev-card.sev-high.active { background: #FFFBEB; border-color: #D97706; }
.br-sev-card.sev-crit.active { background: #FEF2F2; border-color: #DC2626; }

.br-sev-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.br-sev-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--fx-ink);
}
.br-sev-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.br-sev-card.sev-low .br-sev-dot { background: #64748B; }
.br-sev-card.sev-med .br-sev-dot { background: #0284C7; }
.br-sev-card.sev-high .br-sev-dot { background: #D97706; }
.br-sev-card.sev-crit .br-sev-dot { background: #DC2626; }
.br-sev-desc {
  font-size: 11px;
  color: var(--fx-body);
  line-height: 1.3;
}

/* Form Groups & Inputs */
.br-group {
  margin-bottom: 18px;
}
.br-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  color: var(--fx-ink);
  margin-bottom: 6px;
}
.br-label span.req {
  color: #DC2626;
  margin-left: 3px;
}
.br-label-btn {
  background: none;
  border: none;
  color: var(--fx-orange);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}
.br-input, .br-textarea {
  width: 100%;
  padding: 11px 14px;
  background: #FFFFFF;
  border: 1.5px solid var(--fx-line);
  border-radius: 11px;
  color: var(--fx-ink);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: all 0.18s ease;
  box-sizing: border-box;
}
.br-input:focus, .br-textarea:focus {
  border-color: var(--fx-orange);
  box-shadow: 0 0 0 3px rgba(243, 107, 53, 0.14);
}
.br-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 16px;
}
@media (max-width: 600px) {
  .br-grid-2 { grid-template-columns: 1fr; }
}

/* Media Proof Studio */
.br-media-studio {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 680px) {
  .br-media-studio { grid-template-columns: 1fr; }
}
.br-media-card {
  background: var(--fx-paper);
  border: 1.5px solid var(--fx-line);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
}
.br-media-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.br-media-head-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--fx-ink);
  display: flex;
  align-items: center;
  gap: 6px;
}
.br-media-badge {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 5px;
  background: #fff;
  border: 1px solid var(--fx-line);
  color: var(--fx-body);
  font-weight: 600;
}

/* Drop Box */
.br-drop-box {
  border: 2px dashed #C8CDC0;
  border-radius: 11px;
  padding: 20px 14px;
  text-align: center;
  background: #FFFFFF;
  cursor: pointer;
  transition: all 0.18s ease;
  position: relative;
  min-height: 155px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.br-drop-box:hover, .br-drop-box.dragover {
  border-color: var(--fx-orange);
  background: var(--fx-orange-light);
}
.br-drop-box input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 5;
}
.br-drop-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--fx-orange-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fx-orange);
  margin-bottom: 8px;
}
.br-drop-text {
  font-size: 13px;
  font-weight: 700;
  color: var(--fx-ink);
  margin-bottom: 3px;
}
.br-drop-sub {
  font-size: 11.5px;
  color: var(--fx-body);
}
.br-drop-paste-hint {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 5px;
  background: #FFF2EA;
  border: 1px solid #FCD4C2;
  color: #C2410C;
  font-size: 11px;
  font-weight: 700;
}

/* Recorder Box */
.br-rec-box {
  border: 1.5px solid var(--fx-line);
  border-radius: 11px;
  padding: 18px 14px;
  text-align: center;
  background: #FFFFFF;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 155px;
  gap: 8px;
}
.br-rec-btn-start {
  padding: 10px 20px;
  border-radius: 9999px;
  background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
  color: #FFFFFF;
  font-weight: 700;
  font-size: 13px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
  transition: all 0.18s ease;
}
.br-rec-btn-start:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(220, 38, 38, 0.4);
}
.br-rec-live-bar {
  display: none;
  align-items: center;
  gap: 10px;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  padding: 8px 16px;
  border-radius: 9999px;
  color: #DC2626;
  font-size: 12.5px;
  font-weight: 700;
}
.br-rec-live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #DC2626;
  animation: brRecBlink 1s infinite;
}
@keyframes brRecBlink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.3; transform: scale(0.85); }
}
.br-rec-btn-stop {
  padding: 5px 12px;
  border-radius: 9999px;
  background: #DC2626;
  color: #FFFFFF;
  border: none;
  font-weight: 700;
  font-size: 11.5px;
  cursor: pointer;
}

/* Previews */
.br-preview-container {
  display: none;
  position: relative;
  width: 100%;
  border-radius: 11px;
  overflow: hidden;
  background: #000;
  border: 1px solid var(--fx-line);
  margin-top: 8px;
}
.br-preview-container img, .br-preview-container video {
  width: 100%;
  max-height: 200px;
  display: block;
  object-fit: contain;
  background: #000;
}
.br-preview-toolbar {
  padding: 7px 12px;
  background: #171717;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: #FFFFFF;
}
.br-preview-discard {
  background: none;
  border: none;
  color: #F87171;
  font-weight: 700;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
}
.br-preview-discard:hover {
  background: rgba(248, 113, 113, 0.2);
}

/* Submit Action Bar */
.br-action-bar {
  margin-top: 30px;
  text-align: center;
}
.br-submit-btn {
  width: 100%;
  padding: 16px 32px;
  border: none;
  border-radius: 9999px;
  background: var(--fx-orange);
  color: #FFFFFF;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 24px -6px rgba(243, 107, 53, 0.45);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.br-submit-btn:hover {
  background: var(--fx-orange-hover);
  transform: translateY(-2px);
  box-shadow: 0 14px 28px -6px rgba(243, 107, 53, 0.55);
}
.br-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Progress HUD */
.br-progress-hud {
  display: none;
  margin-top: 16px;
  background: var(--fx-paper);
  border: 1px solid var(--fx-line);
  border-radius: 11px;
  padding: 12px 16px;
}
.br-progress-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--fx-ink);
  margin-bottom: 6px;
  font-weight: 700;
}
.br-progress-bar-track {
  height: 6px;
  width: 100%;
  background: var(--fx-line);
  border-radius: 3px;
  overflow: hidden;
}
.br-progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--fx-orange), var(--fx-green));
  transition: width 0.2s;
}

/* Success Card */
.br-success-card {
  text-align: center;
  padding: 36px 16px;
}
.br-success-halo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--fx-green-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--fx-green);
  margin-bottom: 18px;
}
.br-ticket-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  background: var(--fx-paper);
  border: 1.5px solid var(--fx-orange);
  border-radius: 11px;
  font-family: var(--fx-font-mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--fx-orange);
  margin: 16px 0;
}
