/* ============================================
   BORDER Issue Reports — Shared Stylesheet
   Branding: IPWise (ipwise.com.br)
   ============================================ */

:root {
  --bg: #fafbfc;
  --surface: #ffffff;
  --border: #e1e4e8;
  --border-light: #f0f1f3;
  --text: #1f2937;
  --text-muted: #6b7280;
  --text-light: #9ca3af;
  --accent: #1FBFDC;
  --accent-light: #e6f9fc;
  --accent-hover: #17a8c2;
  --accent-secondary: #605BE5;
  --dark: #222333;
  --green: #059669;
  --green-light: #ecfdf5;
  --green-border: #a7f3d0;
  --red: #dc2626;
  --red-light: #fef2f2;
  --red-border: #fecaca;
  --yellow: #d97706;
  --yellow-light: #fffbeb;
  --yellow-border: #fde68a;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.05), 0 2px 4px rgba(0,0,0,0.03);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ========================
   Navbar
   ======================== */

.nav-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-bar-inner {
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
}

.nav-brand img {
  height: 26px;
  width: auto;
}

.nav-brand span {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--text-light);
  text-transform: uppercase;
}

.nav-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s;
}

.nav-back:hover {
  color: var(--accent-hover);
}

.nav-back svg {
  width: 16px;
  height: 16px;
}

/* ========================
   Portal — Hero
   ======================== */

.portal-hero {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 3rem 2rem 2.5rem;
  text-align: center;
}

.portal-hero-inner {
  max-width: 600px;
  margin: 0 auto;
}

.portal-hero h1 {
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.portal-hero p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ========================
   Portal — Report Cards
   ======================== */

.portal-content {
  max-width: 780px;
  margin: 0 auto;
  padding: 2rem;
}

.portal-section-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-light);
  margin-bottom: 1rem;
}

.report-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.35rem 1.5rem;
  margin-bottom: 0.85rem;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}

.report-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
  border-left-color: var(--accent-hover);
}

.report-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  gap: 0.75rem;
}

.report-card-id {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.03em;
}

.report-card-date {
  font-size: 0.75rem;
  color: var(--text-light);
}

.report-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.4rem;
  line-height: 1.4;
}

.report-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.report-card-footer {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.85rem;
}

/* ========================
   Badges
   ======================== */

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
}

.status-badge::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-badge.resolved {
  background: var(--green-light);
  border: 1px solid var(--green-border);
  color: var(--green);
}

.status-badge.resolved::before {
  background: var(--green);
}

.status-badge.open {
  background: var(--yellow-light);
  border: 1px solid var(--yellow-border);
  color: var(--yellow);
}

.status-badge.open::before {
  background: var(--yellow);
}

.type-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.55rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.type-badge.fix {
  background: var(--green-light);
  color: var(--green);
}

.type-badge.feature {
  background: var(--accent-light);
  color: var(--accent-hover);
}

/* ========================
   Report — Header
   ======================== */

.header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 2rem 2rem 1.75rem;
}

.header-inner {
  max-width: 780px;
  margin: 0 auto;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

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

.logo img {
  height: 28px;
  width: auto;
}

.logo-text {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.header-date {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ========================
   Report — Content
   ======================== */

.content {
  max-width: 780px;
  margin: 0 auto;
  padding: 2rem;
}

.section {
  margin-bottom: 2.25rem;
}

.section-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1rem;
}

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
}

.card p {
  font-size: 0.92rem;
  color: var(--text);
  line-height: 1.7;
}

.card p + p {
  margin-top: 0.75rem;
}

/* Highlight boxes */
.highlight-box {
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  line-height: 1.7;
}

.highlight-box.problem {
  background: var(--red-light);
  border: 1px solid var(--red-border);
}

.highlight-box.problem strong {
  color: var(--red);
}

.highlight-box.solution {
  background: var(--green-light);
  border: 1px solid var(--green-border);
}

.highlight-box.solution strong {
  color: var(--green);
}

.highlight-box.info {
  background: var(--yellow-light);
  border: 1px solid var(--yellow-border);
}

.highlight-box.info strong {
  color: var(--yellow);
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--border);
  border-radius: 1px;
}

.timeline-item {
  position: relative;
  margin-bottom: 1.25rem;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -2rem;
  top: 5px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--surface);
}

.timeline-dot.customer {
  background: var(--accent-light);
  border-color: var(--accent);
}

.timeline-dot.bot {
  background: var(--surface);
  border-color: var(--text-light);
}

.timeline-dot.error {
  background: var(--red-light);
  border-color: var(--red);
}

.timeline-sender {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.2rem;
}

.timeline-sender.customer { color: var(--accent); }
.timeline-sender.bot { color: var(--text-muted); }

.timeline-bubble {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-size: 0.88rem;
  box-shadow: var(--shadow);
}

.timeline-bubble.error-bubble {
  background: var(--red-light);
  border-color: var(--red-border);
}

.timeline-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  font-style: italic;
}

/* Before / After comparison */
.comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.comparison-col {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.comparison-header {
  padding: 0.65rem 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--border);
}

.comparison-col.before .comparison-header {
  background: var(--red-light);
  color: var(--red);
}

.comparison-col.after .comparison-header {
  background: var(--green-light);
  color: var(--green);
}

.comparison-body {
  padding: 1rem 1.15rem;
}

.comparison-body .step {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
  line-height: 1.5;
}

.comparison-body .step:last-child {
  margin-bottom: 0;
}

.comparison-body .step-num {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 700;
}

.comparison-col.before .step-num {
  background: var(--red-light);
  color: var(--red);
}

.comparison-col.after .step-num {
  background: var(--green-light);
  color: var(--green);
}

.result-tag {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 600;
}

.result-tag.fail {
  background: var(--red-light);
  color: var(--red);
}

.result-tag.pass {
  background: var(--green-light);
  color: var(--green);
}

/* Examples table */
.examples-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.85rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.examples-table thead {
  background: var(--bg);
}

.examples-table th {
  text-align: left;
  padding: 0.7rem 1rem;
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border);
}

.examples-table td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border-light);
  background: var(--surface);
}

.examples-table tr:last-child td {
  border-bottom: none;
}

/* Divider */
.divider {
  height: 1px;
  background: var(--border);
  margin: 2.5rem 0;
}

/* ========================
   Footer
   ======================== */

.footer {
  max-width: 780px;
  margin: 0 auto;
  padding: 1.5rem 2rem 2.5rem;
  text-align: center;
}

.footer-logo {
  margin-bottom: 0.5rem;
}

.footer-logo img {
  height: 22px;
  width: auto;
  opacity: 0.35;
}

.footer-text {
  font-size: 0.75rem;
  color: var(--text-light);
}

.portal-footer {
  border-top: 1px solid var(--border);
  margin-top: 3rem;
  padding-top: 2rem;
}

/* ========================
   Empty state
   ======================== */

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ========================
   Auth Gate
   ======================== */

.hidden { display: none !important; }

.auth-gate {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 2rem;
}

.auth-gate-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 380px;
  text-align: center;
}

.auth-gate-card img {
  height: 32px;
  width: auto;
  margin-bottom: 1.5rem;
}

.auth-gate-card h1 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.3rem;
}

.auth-gate-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.auth-gate-card input {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.88rem;
  color: var(--text);
  background: var(--bg);
  outline: none;
  transition: border-color 0.15s;
}

.auth-gate-card input:focus {
  border-color: var(--accent);
}

.auth-gate-card button {
  width: 100%;
  margin-top: 0.85rem;
  padding: 0.7rem 1rem;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  font-family: var(--font);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.auth-gate-card button:hover {
  background: var(--accent-hover);
}

.auth-error {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: var(--red);
}

/* ========================
   Report Form
   ======================== */

.report-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.form-group {
  margin-bottom: 1rem;
}

.form-group:last-of-type {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.88rem;
  color: var(--text);
  background: var(--bg);
  outline: none;
  transition: border-color 0.15s;
}

.form-input:focus,
.form-textarea:focus {
  border-color: var(--accent);
}

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

.form-button {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 1.5rem;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  font-family: var(--font);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.form-button:hover {
  background: var(--accent-hover);
}

.form-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.form-success {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--green-light);
  border: 1px solid var(--green-border);
  color: var(--green);
  font-size: 0.85rem;
  font-weight: 500;
}

.form-error {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--red-light);
  border: 1px solid var(--red-border);
  color: var(--red);
  font-size: 0.85rem;
  font-weight: 500;
}

/* ========================
   Responsive
   ======================== */

@media (max-width: 640px) {
  .nav-bar { padding: 0 1.25rem; }
  .portal-hero { padding: 2rem 1.25rem 1.75rem; }
  .portal-hero h1 { font-size: 1.3rem; }
  .portal-content { padding: 1.5rem 1.25rem; }
  .header { padding: 1.5rem 1.25rem; }
  .content { padding: 1.5rem 1.25rem; }
  .header h1 { font-size: 1.25rem; }
  .comparison { grid-template-columns: 1fr; }
  .header-top { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
  .report-card-top { flex-direction: column; align-items: flex-start; gap: 0.25rem; }
}
