/* ── Reset & base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary:        #d32f2f;
  --primary-dark:   #9a0007;
  --primary-light:  #ff6659;
  --amber:          #fbc02d;
  --amber-dark:     #c49000;
  --text-primary:   rgba(0,0,0,.87);
  --text-secondary: rgba(0,0,0,.60);
  --text-disabled:  rgba(0,0,0,.38);
  --divider:        rgba(0,0,0,.12);
  --bg:             #fbfbfb;
  --surface:        #ffffff;
  --surface-alt:    #f5f5f5;
  --blue:           #1976d2;
  --green:          #388e3c;
  --shadow-1: 0 2px 4px rgba(0,0,0,.14), 0 1px 5px rgba(0,0,0,.12);
  --shadow-2: 0 4px 8px rgba(0,0,0,.18), 0 2px 8px rgba(0,0,0,.14);
  --shadow-3: 0 8px 16px rgba(0,0,0,.20), 0 4px 12px rgba(0,0,0,.15);
  --radius: 4px;
}

html, body {
  font-family: 'Roboto', sans-serif;
  font-size: 16px;
  background: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
}

/* ── Layout ──────────────────────────────────────────────────────────────── */
#layout {
  display: flex;
  min-height: 100vh;
}

/* ── Desktop left panel ──────────────────────────────────────────────────── */
#desktop-panel {
  width: 300px;
  flex-shrink: 0;
  background: linear-gradient(180deg, #152e15 0%, #1b5e20 30%, #2e7d32 65%, #1a4f6e 100%);
  color: #fff;
  display: none;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.dp-brand {
  padding: 28px 22px 18px;
  border-bottom: 1px solid rgba(255,255,255,.12);
  cursor: pointer;
  transition: background .15s;
}
.dp-brand:hover { background: rgba(255,255,255,.06); }
.dp-brand .dp-home-hint {
  display: flex; align-items: center; gap: 5px;
  margin-top: 10px;
  font-size: 11px; color: rgba(255,255,255,.35);
  transition: color .15s;
}
.dp-brand:hover .dp-home-hint { color: rgba(255,255,255,.7); }
.dp-logo {
  width: 56px; height: 56px;
  background: rgba(255,255,255,.15);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  margin-bottom: 12px;
}
.dp-brand h2 { font-size: 16px; font-weight: 700; line-height: 1.35; margin-bottom: 4px; }
.dp-brand .dp-sub {
  font-size: 11px; color: rgba(255,255,255,.6);
  text-transform: uppercase; letter-spacing: .07em;
}
.dp-nav { flex: 1; padding: 10px 0; overflow-y: auto; }
.dp-step {
  display: flex; align-items: center; gap: 11px;
  padding: 8px 22px;
  cursor: pointer;
  transition: background .15s;
}
.dp-step:hover  { background: rgba(255,255,255,.07); }
.dp-step.active { background: rgba(255,255,255,.14); }
.dp-step-num {
  width: 23px; height: 23px;
  border-radius: 50%;
  border: 1.5px solid rgba(211,47,47,.5);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 600;
  flex-shrink: 0;
  color: rgba(255,120,120,.65);
  transition: all .2s;
}
/* Active — white filled */
.dp-step.active .dp-step-num  { background: #fff; color: var(--primary); border-color: #fff; font-size: 10px; }
.dp-step.active .dp-step-label { color: #fff; font-weight: 500; }
/* Done — green checkmark (filled & passed) */
.dp-step.done .dp-step-num { background: rgba(56,142,60,.35); border-color: #81c784; font-size: 0; }
.dp-step.done .dp-step-num::after { content: '✓'; font-size: 12px; color: #a5d6a7; }
.dp-step.done .dp-step-label { color: rgba(255,255,255,.85); }
/* Skipped — amber (passed but nothing filled) */
.dp-step.skipped .dp-step-num { background: rgba(251,192,45,.15); border-color: #fbc02d; color: #fbc02d; }
.dp-step.skipped .dp-step-label { color: rgba(255,255,255,.72); }
/* Default / pending — muted red (not yet reached) */
.dp-step-label { font-size: 12.5px; color: rgba(255,255,255,.38); line-height: 1.3; }
.dp-footer {
  padding: 13px 22px;
  border-top: 1px solid rgba(255,255,255,.1);
  font-size: 11px; color: rgba(255,255,255,.4);
  display: flex; align-items: center; gap: 6px;
}

#content-area { flex: 1; min-width: 0; }
#app { min-height: 100%; }

/* ── Screen layout ───────────────────────────────────────────────────────── */
.screen {
  display: none;
  flex-direction: column;
  min-height: 100vh;
  background: var(--surface);
  max-width: 680px;
  margin: 0 auto;
  width: 100%;
  box-shadow: 0 0 32px rgba(0,0,0,.12);
}
.screen.active { display: flex; }

/* Header banner (hidden on desktop — panel provides branding) */
.screen-header {
  width: 100%;
  height: 108px;
  background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 40%, #388e3c 70%, #1565c0 100%);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.screen-header::before {
  content: '';
  position: absolute; inset: 0;
  background: url('/images/00-denuncia-iniciar.png') top center / cover no-repeat;
  opacity: .35;
}
.screen-header-content {
  position: relative; z-index: 1;
  height: 100%;
  display: flex; align-items: center;
  padding: 0 20px; gap: 12px;
}
.header-mma-logo {
  width: 56px; height: 56px;
  background: rgba(255,255,255,.2);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; flex-shrink: 0;
}
.header-text h3 { font-size: 16px; font-weight: 700; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.4); }
.header-text p  { font-size: 12px; color: rgba(255,255,255,.85); }

/* Section heading */
.section-heading { padding: 16px 16px 0; flex-shrink: 0; }
.section-heading h2 { font-size: 22px; font-weight: 400; color: var(--text-primary); line-height: 1.3; }
.section-heading .subtitle { font-size: 15px; color: var(--text-secondary); margin-top: 4px; line-height: 1.4; }
.section-divider { height: 1px; background: var(--divider); margin: 12px 16px 0; }

/* Progress bar */
.progress-bar-track { height: 4px; background: var(--divider); flex-shrink: 0; }
.progress-bar-fill  { height: 100%; background: var(--primary); transition: width .4s ease; }

/* Body content */
.screen-body { flex: 1; padding: 8px; overflow-y: auto; }

/* Cards */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px; margin-bottom: 8px;
  box-shadow: var(--shadow-1);
}
.card-body { font-size: 16px; color: var(--text-primary); line-height: 1.6; }
.card-body.secondary { color: var(--text-secondary); }

/* Alert card */
.alert-card {
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-left: 4px solid var(--amber);
  border-radius: var(--radius);
  padding: 12px 16px; margin-bottom: 8px;
}
.alert-card .alert-title { font-size: 14px; font-weight: 500; color: #6d4c00; margin-bottom: 4px; }
.alert-card .alert-body  { font-size: 13px; color: #795548; line-height: 1.5; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; border: none; border-radius: var(--radius);
  font-family: 'Roboto', sans-serif; font-size: 14px; font-weight: 500;
  letter-spacing: .04em; cursor: pointer; padding: 10px 22px;
  text-transform: uppercase;
  transition: box-shadow .2s, background .15s;
  text-decoration: none;
}
.btn-primary { background: var(--primary); color: #fff; box-shadow: var(--shadow-1); }
.btn-primary:hover { background: var(--primary-dark); box-shadow: var(--shadow-2); }
.btn-amber   { background: var(--amber); color: var(--text-primary); box-shadow: var(--shadow-1); }
.btn-amber:hover { background: var(--amber-dark); box-shadow: var(--shadow-2); }
.btn-text    { background: transparent; color: var(--text-secondary); box-shadow: none; padding: 10px 12px; }
.btn-text:hover { background: var(--surface-alt); }
.btn-block { width: 100%; }
.btn-icon  { font-size: 18px; }

/* Bottom bar */
.bottom-bar {
  background: var(--surface);
  border-top: 1px solid var(--divider);
  padding: 12px 16px;
  display: flex; gap: 8px; align-items: center;
  flex-shrink: 0;
  position: sticky; bottom: 0;
}
.bottom-bar .btn-text   { color: var(--text-secondary); }
.bottom-bar .btn-text:hover { background: var(--surface-alt); color: var(--text-primary); }
.bottom-bar .btn-primary { flex: 1; }

/* ── Form elements ───────────────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-label { font-size: 12px; font-weight: 500; color: var(--text-secondary); margin-bottom: 4px; }

.text-field { position: relative; width: 100%; }
.text-field input,
.text-field textarea,
.text-field select {
  width: 100%; padding: 14px 12px;
  border: 1px solid rgba(0,0,0,.23); border-radius: var(--radius);
  font-family: 'Roboto', sans-serif; font-size: 16px;
  color: var(--text-primary); background: var(--surface);
  outline: none; transition: border-color .2s, box-shadow .2s;
  -webkit-appearance: none;
}
.text-field input:focus,
.text-field textarea:focus,
.text-field select:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(211,47,47,.2); }
.text-field textarea  { resize: vertical; min-height: 120px; }
.text-field .field-label {
  position: absolute; top: -8px; left: 10px;
  background: var(--surface); padding: 0 4px;
  font-size: 12px; color: var(--text-secondary);
}
.text-field .field-helper { font-size: 11px; color: var(--text-secondary); margin-top: 4px; padding-left: 12px; }

/* Option lists */
.option-list { display: flex; flex-direction: column; gap: 2px; }
.option-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--divider);
  cursor: pointer;
}
.option-item:last-child { border-bottom: none; }
.option-item:hover { background: var(--surface-alt); margin: 0 -16px; padding: 12px 16px; border-radius: var(--radius); }
.option-item input[type="checkbox"],
.option-item input[type="radio"] {
  width: 20px; height: 20px;
  accent-color: var(--primary);
  cursor: pointer; flex-shrink: 0;
}
.option-label    { font-size: 16px; color: var(--text-primary); line-height: 1.3; }
.option-sublabel { font-size: 12px; color: var(--text-secondary); }

/* Map / upload placeholders */
.map-placeholder {
  width: 100%; height: 180px;
  background: #e8f5e9; border: 2px dashed #a5d6a7;
  border-radius: var(--radius);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 8px; cursor: pointer;
  color: var(--green); font-size: 14px; text-align: center;
}
.map-placeholder .material-icons { font-size: 40px; }

.upload-zone {
  width: 100%; padding: 24px;
  background: var(--surface-alt);
  border: 2px dashed var(--divider); border-radius: var(--radius);
  text-align: center; cursor: pointer; transition: border-color .2s;
}
.upload-zone:hover { border-color: var(--primary); }
.upload-zone .material-icons { font-size: 36px; color: var(--text-secondary); }
.upload-zone p         { font-size: 13px; color: var(--text-secondary); margin-top: 8px; }
.upload-zone .supported { font-size: 11px; color: var(--text-disabled); margin-top: 4px; }

/* Summary */
.summary-block { background: var(--surface); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; box-shadow: var(--shadow-1); }
.summary-block h4 { font-size: 13px; font-weight: 500; color: var(--text-secondary); margin-bottom: 8px; text-transform: uppercase; letter-spacing: .05em; }
.summary-row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--divider); font-size: 14px; }
.summary-row:last-child { border-bottom: none; }
.summary-row .label { color: var(--text-secondary); }
.summary-row .value { color: var(--text-primary); font-weight: 500; text-align: right; max-width: 60%; }

/* Agency card */
.agency-card {
  background: var(--surface); border-radius: var(--radius);
  padding: 16px; margin-bottom: 12px;
  box-shadow: var(--shadow-1); border-left: 4px solid var(--primary);
}
.agency-card h4 { font-size: 16px; font-weight: 500; color: var(--text-primary); margin-bottom: 8px; }
.agency-card p  { font-size: 14px; color: var(--text-secondary); line-height: 1.5; margin-bottom: 12px; }
.agency-card .doc-row { display: flex; align-items: center; gap: 8px; background: var(--surface-alt); border-radius: var(--radius); padding: 10px 12px; cursor: pointer; }
.agency-card .doc-row .material-icons { color: var(--primary); }
.agency-card .doc-row-text { font-size: 14px; font-weight: 500; color: var(--blue); }
.agency-card .doc-row-sub  { font-size: 11px; color: var(--text-secondary); }

/* How it works */
.how-steps { display: flex; flex-direction: column; gap: 0; }
.how-step { display: flex; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--divider); align-items: flex-start; }
.how-step:last-child { border-bottom: none; }
.step-circle {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px; flex-shrink: 0;
}
.step-text h5 { font-size: 15px; font-weight: 500; margin-bottom: 4px; }
.step-text p  { font-size: 13px; color: var(--text-secondary); line-height: 1.4; }

/* ── Landing page (full-width) ───────────────────────────────────────────── */
#screen-0 { background: #0d2b0d; }

.landing-topbar {
  background: rgba(0,0,0,.3);
  padding: 14px 32px;
  display: flex; align-items: center;
  border-bottom: 1px solid rgba(255,255,255,.08);
  flex-shrink: 0;
}
.ltb-brand { display: flex; align-items: center; gap: 12px; }
.ltb-logo {
  width: 36px; height: 36px;
  background: rgba(255,255,255,.15); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.ltb-name { color: rgba(255,255,255,.8); font-size: 13px; font-weight: 500; letter-spacing: .03em; }

.landing-hero-band {
  background: linear-gradient(135deg, #152e15 0%, #1b5e20 35%, #2e7d32 65%, #1565c0 100%);
  padding: 72px 24px 60px;
  display: flex; flex-direction: column; align-items: center; flex: 1;
  color: #fff; text-align: center;
  position: relative; overflow: hidden;
}
.landing-hero-band::before {
  content: '';
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 80% 60% at 50% 40%, rgba(255,255,255,.05) 0%, transparent 70%);
}
.hero-content { max-width: 620px; position: relative; z-index: 1; }
.hero-content h1 {
  font-size: 42px; font-weight: 700; line-height: 1.15;
  margin-bottom: 20px; letter-spacing: -.02em;
}
.hero-accent { color: #a5d6a7; }
.hero-content > p {
  font-size: 18px; opacity: .85; line-height: 1.7;
  margin-bottom: 40px; max-width: 520px; margin-left: auto; margin-right: auto;
}
.hero-actions {
  display: flex; flex-direction: column; gap: 12px;
  max-width: 380px; margin: 0 auto;
}
.btn-lg { font-size: 15px !important; padding: 15px 28px !important; }
.btn-outline {
  background: transparent; color: #fff;
  border: 1.5px solid rgba(255,255,255,.45); box-shadow: none;
  font-size: 14px; padding: 12px 22px;
}
.btn-outline:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.8); }

.hero-visual { display: none; }
.hero-badge-group {
  display: flex; flex-direction: row; flex-wrap: wrap;
  justify-content: center; gap: 10px;
  max-width: 680px; margin: 32px auto 0; position: relative; z-index: 1;
}
.hb {
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2);
  border-radius: 10px; padding: 11px 16px;
  font-size: 13px; font-weight: 500; color: rgba(255,255,255,.9); line-height: 1.35;
}

.landing-cards {
  display: grid; grid-template-columns: repeat(3, 1fr);
  background: #fff; border-top: 3px solid #2e7d32;
  flex-shrink: 0;
}
.lcard {
  padding: 24px 22px;
  border-right: 1px solid var(--divider);
  display: flex; align-items: flex-start; gap: 14px;
}
.lcard:last-child { border-right: none; }
.lcard-icon { font-size: 32px; color: var(--green); flex-shrink: 0; margin-top: 2px; }
.lcard h4 { font-size: 14px; font-weight: 600; margin-bottom: 4px; color: var(--text-primary); }
.lcard p { font-size: 12px; color: var(--text-secondary); line-height: 1.4; }

.landing-lgpd {
  background: #0a1a0a; padding: 11px 32px;
  font-size: 11.5px; color: rgba(255,255,255,.38);
  display: flex; align-items: center; gap: 6px;
  flex-shrink: 0;
}

@media (max-width: 900px) {
  .landing-topbar { padding: 12px 16px; }
  .landing-hero-band { padding: 48px 20px 44px; }
  .hero-content h1 { font-size: 28px; }
  .hero-content > p { font-size: 15px; margin-bottom: 28px; }
  .hero-badge-group { gap: 8px; }
  .hb { font-size: 12px; padding: 9px 12px; }
  .landing-cards { grid-template-columns: 1fr; }
  .lcard { border-right: none; border-bottom: 1px solid var(--divider); }
  .lcard:last-child { border-bottom: none; }
  .landing-lgpd { padding: 10px 16px; }
}

/* ── Success / protocol ──────────────────────────────────────────────────── */
.success-screen {
  background: var(--bg); flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 40px 24px; text-align: center;
}
.success-icon {
  width: 88px; height: 88px;
  background: #e8f5e9; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 24px;
}
.success-icon .material-icons { color: var(--green); font-size: 48px; }
.success-screen h2 { font-size: 24px; font-weight: 400; margin-bottom: 12px; }
.success-screen p  { font-size: 16px; color: var(--text-secondary); line-height: 1.6; max-width: 320px; margin: 0 auto; }

.protocolo-badge {
  display: inline-block;
  background: var(--surface-alt); border: 1px solid var(--divider);
  border-radius: var(--radius);
  padding: 8px 20px; margin-top: 16px;
  font-family: 'Roboto Mono', monospace; font-size: 13px;
  color: var(--text-primary); letter-spacing: .04em;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (min-width: 901px) {
  html, body    { height: 100%; overflow: hidden; }
  #layout       { height: 100%; overflow: hidden; }
  #content-area { height: 100vh; overflow-y: auto; background: #eef1f4; }

  /* Panel only shown in form mode (not on landing) */
  #layout:not(.landing) #desktop-panel { display: flex; }

  /* Form screens fill full width */
  #layout:not(.landing) .screen { max-width: none; margin: 0; box-shadow: none; min-height: 100%; }

  /* Landing: full viewport, no card constraint */
  #layout.landing .screen { max-width: none; margin: 0; box-shadow: none; }
  #layout.landing #content-area { background: #0d2b0d; }

  .screen-header    { display: none; }
  .section-heading  { padding-top: 28px; }
}

@media (min-width: 681px) and (max-width: 900px) {
  body    { background: #dde1e4; }
  .screen { max-width: 680px; margin: 0 auto; box-shadow: 0 2px 40px rgba(0,0,0,.18); }
}

@media (max-width: 680px) {
  .screen { max-width: none; box-shadow: none; }
  body    { background: var(--bg); }
}

/* ── Scrollbar ───────────────────────────────────────────────────────────── */
::-webkit-scrollbar       { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--divider); border-radius: 3px; }
