.br-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 210;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.br-overlay.open { opacity: 1; pointer-events: all; }

.br-modal {
  background: #fff;
  border-radius: 12px;
  width: 520px;
  max-width: 92vw;
  max-height: 90vh;
  overflow: auto;
  border: 0.5px solid #e2ddd6;
}

.br-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1.25rem;
  border-bottom: 0.5px solid #e2ddd6;
}
.br-modal-title { font-size: 14px; font-weight: 600; }
.br-close { background: none; border: none; font-size: 20px; cursor: pointer; color: #9ca3af; }

.br-modal-body { padding: 1.25rem; }
.br-field { margin-bottom: 14px; }
.br-field label { display: block; font-size: 12px; font-weight: 500; margin-bottom: 5px; }
.br-field select,
.br-field textarea {
  width: 100%;
  border: 1px solid #e2ddd6;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 13px;
  font-family: inherit;
}
.br-required { color: #b91c1c; }
.br-optional { color: #9ca3af; font-weight: 400; font-size: 11px; }

.br-severity-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.br-severity-opt input { position: absolute; opacity: 0; }
.br-severity-label {
  display: block;
  text-align: center;
  padding: 8px 6px;
  border: 1px solid #e2ddd6;
  border-radius: 8px;
  font-size: 11px;
  cursor: pointer;
}
.br-severity-opt input:checked + .br-severity-label { border-color: #0f6e56; background: #e1f5ee; }

.br-modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 0.875rem 1.25rem;
  border-top: 0.5px solid #e2ddd6;
}

.br-success { text-align: center; padding: 24px 12px; color: #085041; font-size: 14px; }

.btn-report-issue {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: #9ca3af;
  text-decoration: none;
  margin-top: 12px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.btn-report-issue:hover { color: #0f6e56; }

.ticket-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.ticket-filter {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #e2ddd6;
  background: #fff;
  font-size: 12px;
  cursor: pointer;
}
.ticket-filter.active { background: #0f6e56; color: #fff; border-color: #0f6e56; }

.ticket-item {
  border: 1px solid #e2ddd6;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 10px;
  cursor: pointer;
}
.ticket-header { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 12px; }
.ticket-desc { font-size: 13px; color: #555; margin-top: 6px; }
.ticket-detail { margin-top: 10px; font-size: 12px; line-height: 1.6; }
.ticket-status { margin-left: auto; padding: 2px 8px; border-radius: 999px; font-size: 11px; }
.status-pending { background: #fef3c7; color: #92400e; }
.status-analysed { background: #e6f1fb; color: #0c447c; }
.status-done { background: #d1fae5; color: #065f46; }
.status-rejected { background: #fee2e2; color: #991b1b; }

.status-received { background: #f3f4f6; color: #4b5563; }
.status-analyzing { background: #dbeafe; color: #1d4ed8; }
.status-treated { background: #d1fae5; color: #065f46; }
.status-archived { background: #f9fafb; color: #9ca3af; }

.incidents-table-wrap { overflow-x: auto; margin-top: 16px; }
.incidents-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.incidents-table th,
.incidents-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e2ddd6;
  text-align: left;
  vertical-align: top;
}
.incidents-table th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7280;
  font-weight: 600;
}
.incidents-table .ticket-status { margin-left: 0; white-space: nowrap; }
.incidents-table .incidents-note { font-size: 12px; color: #374151; max-width: 220px; }

.referral-link-card,
.balance-card,
.tokens-card {
  border: 1px solid #e2ddd6;
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 16px;
  background: #fafaf8;
}
.referral-url {
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: 13px;
  word-break: break-all;
  margin: 10px 0;
}
.tokens-total { font-size: 28px; font-weight: 700; color: #0f6e56; }
.recharge-intro {
  margin: 4px 0 14px;
  font-size: 13px;
  color: #6b7280;
  line-height: 1.5;
}

.recharge-foot {
  margin: 14px 0 0;
  text-align: center;
  font-size: 11px;
  color: #6b7280;
  line-height: 1.5;
}

.packs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 4px;
  align-items: stretch;
}

.pack-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  border: 1px solid #e2ddd6;
  border-radius: 12px;
  padding: 20px 14px 14px;
  text-align: center;
  background: #fff;
}

.pack-card--starter,
.pack-card--expert {
  border-color: #e2ddd6;
}

.pack-card--pro {
  border: 2px solid #0f6e56;
  padding-top: 24px;
}

.pack-badge {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 12px;
  border-radius: 20px;
  background: #0f6e56;
  color: #fff;
  font-family: "Inter", sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.pack-label {
  font-family: "Inter", sans-serif;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6b7280;
  margin-bottom: 8px;
}

.pack-price {
  font-family: "Inter", sans-serif;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 6px;
}

.pack-price--green {
  color: #0f6e56;
}

.pack-price--dark {
  color: #2a2a2a;
}

.pack-volume {
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 14px;
}

.pack-btn {
  display: block;
  width: 100%;
  margin-top: auto;
  padding: 10px 14px;
  border-radius: 8px;
  font-family: "Inter", sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.pack-btn--primary {
  border: none;
  background: #0f6e56;
  color: #fff;
}

.pack-btn--primary:hover {
  background: #0c5a47;
}

.pack-btn--outline {
  border: 1px solid #d1d5db;
  background: transparent;
  color: #2a2a2a;
}

.pack-btn--outline:hover {
  border-color: #9ca3af;
  background: #f9fafb;
}

.pack-btn:disabled {
  opacity: 0.65;
  cursor: wait;
}

.ia-usage-table-wrap {
  overflow-x: auto;
  margin-top: 8px;
  border: 1px solid #e2ddd6;
  border-radius: 10px;
  background: #fff;
}
.ia-usage-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.ia-usage-table th,
.ia-usage-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #eeece8;
  vertical-align: top;
}
.ia-usage-table th {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7280;
  background: #fafaf8;
}
.ia-usage-table tbody tr:last-child td {
  border-bottom: none;
}
.ia-usage-date {
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: 11px;
  white-space: nowrap;
  color: #374151;
}
.ia-usage-tokens {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: #0f6e56;
  white-space: nowrap;
}
.ia-usage-loading {
  color: #9ca3af;
}

@media (max-width: 720px) {
  .packs-grid { grid-template-columns: 1fr; }
  .br-severity-grid { grid-template-columns: 1fr; }
}
