:root {
  --g-green:     #3dab24;
  --g-black:     #0a0a0a;
  --g-white:     #ffffff;
  --green-soft:  rgba(61, 171, 36, .08);
  --green-glow:  rgba(61, 171, 36, .22);
  --text-primary:   #0a0a0a;
  --text-secondary: #6b7280;
  --border:      #e5e7eb;
  --radius:      14px;
}

.logo-image {
    height: 36px;
    width: auto;
    transition: all 0.3s ease;
}

.logo-image:hover { transform: scale(1.05); }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: #f4f6f1;
  color: var(--text-primary);
  min-height: 100vh;
}

.header {
  background: var(--g-black);
  padding: 16px 20px;
  display: flex;
  align-items: center;
}

.header-brand { display: flex; align-items: center; gap: 10px; }

.brand-galleria {
  color: var(--g-white);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .3px;
}

.brand-sep {
  width: 1px;
  margin-left: 6px;
  height: 16px;
  background: rgba(255, 255, 255, .2);
}

.brand-doczord {
  color: var(--g-green);
  font-size: 13px;
  margin-left: 6px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.admin-bar {
  background: #1a2e14;
  border-bottom: 1px solid rgba(61, 171, 36, .25);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-bar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.admin-bar-badge {
  background: var(--g-green);
  color: var(--g-white);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
  flex-shrink: 0;
}

.admin-bar-info {
  font-size: 13px;
  color: rgba(255, 255, 255, .65);
}

.admin-bar-info strong {
  color: var(--g-white);
  font-weight: 600;
}

.admin-bar-btn {
  flex-shrink: 0;
  background: transparent;
  color: var(--g-green);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid rgba(61, 171, 36, .4);
  border-radius: 8px;
  padding: 6px 14px;
  text-decoration: none;
  transition: background .2s, border-color .2s;
  white-space: nowrap;
}

.admin-bar-btn:hover {
  background: rgba(61, 171, 36, .12);
  border-color: var(--g-green);
}

.hero {
  background: var(--g-black);
  padding: 28px 20px 40px;
  color: var(--g-white);
}

.hero-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--g-green);
  margin-bottom: 8px;
}

.hero-title {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 8px;
}

.hero-subtitle {
  font-size: 14px;
  color: rgba(255, 255, 255, .55);
  font-weight: 400;
  line-height: 1.5;
}

.main {
  max-width: 520px;
  margin: 0 auto;
  padding: 24px 16px 56px;
}

.progress-bar-wrap {
  background: var(--g-white);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 16px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .06);
}

.progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.progress-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.progress-count {
  font-size: 13px;
  font-weight: 700;
  color: var(--g-green);
}

.progress-track {
  height: 6px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--g-green);
  border-radius: 99px;
  transition: width .4s ease;
}

.doc-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.doc-item {
  background: var(--g-white);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .06);
  border: 1.5px solid transparent;
  transition: border-color .25s, background .25s;
}

.doc-item.done {
  border-color: var(--g-green);
  background: #f7fff5;
}

.doc-item.error {
  border-color: #ef4444;
  background: #fff5f5;
}

.doc-item.error .doc-status { background: rgba(239, 68, 68, .1); }
.doc-item.error .doc-status .icon-upload { color: #ef4444; }

.doc-filename.error-msg-inline {
  color: #ef4444;
  font-weight: 500;
  white-space: normal;
  max-width: 200px;
}

.doc-item-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.doc-status {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--green-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .25s;
}

.doc-item.done .doc-status { background: var(--g-green); }

.doc-status .icon-upload { width: 18px; height: 18px; color: var(--g-green); }
.doc-status .icon-check  { width: 18px; height: 18px; color: var(--g-white); display: none; }

.doc-item.done .doc-status .icon-upload { display: none; }
.doc-item.done .doc-status .icon-check  { display: block; }

.doc-info { min-width: 0; }

.doc-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.doc-optional {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-secondary);
  margin-left: 4px;
}

.doc-filename {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 170px;
}

.btn-upload {
  flex-shrink: 0;
  background: var(--green-soft);
  color: var(--g-green);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
  transition: background .2s;
  white-space: nowrap;
  user-select: none;
}

.btn-upload:hover { background: var(--green-glow); }
.doc-item.done .btn-upload { background: rgba(61, 171, 36, .14); }
.btn-upload--sent { opacity: .55; cursor: default; pointer-events: none; }

.doc-preview {
  display: none;
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 8px;
  border: 1.5px solid rgba(61, 171, 36, .35);
  flex-shrink: 0;
  cursor: zoom-in;
}
.doc-preview.has-preview { display: block; }

.preview-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.82);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}
.preview-lightbox.open { opacity: 1; pointer-events: all; }
.preview-lightbox img {
  max-width: 100%;
  max-height: 90dvh;
  border-radius: 10px;
  box-shadow: 0 8px 40px rgba(0,0,0,.6);
  object-fit: contain;
}

.submit-area {
  margin-top: 28px;
  text-align: center;
}

.btn-submit {
  width: 100%;
  background: var(--g-green);
  color: var(--g-white);
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  border: none;
  border-radius: var(--radius);
  padding: 16px 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: opacity .2s, transform .15s;
}

.btn-submit:disabled { opacity: .38; cursor: not-allowed; }
.btn-submit:not(:disabled):hover  { transform: translateY(-1px); }
.btn-submit:not(:disabled):active { transform: translateY(0); }
.btn-submit .arrow { font-size: 18px; }

.submit-hint {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-secondary);
}

.error-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 56px);
  padding: 40px 24px;
  text-align: center;
}

.error-icon { color: #ef4444; margin-bottom: 20px; }
.error-icon svg { width: 56px; height: 56px; }

.error-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 10px;
}

.error-msg {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 300px;
  line-height: 1.5;
}

.sucesso-overlay {
  position: fixed;
  inset: 0;
  background: var(--g-black);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9100;
  opacity: 0;
  pointer-events: none;
  transition: opacity .5s ease;
}

.sucesso-overlay.show {
  opacity: 1;
  pointer-events: all;
}

.sucesso-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
  padding: 24px;
  animation: sucesso-entrada .6s cubic-bezier(.34,1.56,.64,1) both;
  animation-delay: .2s;
}

@keyframes sucesso-entrada {
  from { opacity: 0; transform: scale(.85) translateY(16px); }
  to   { opacity: 1; transform: scale(1)  translateY(0); }
}

.sucesso-icone {
  color: var(--g-green);
  width: 80px;
  height: 80px;
}

.sucesso-icone svg {
  width: 100%;
  height: 100%;
}

.sucesso-circulo {
  stroke-dasharray: 160;
  stroke-dashoffset: 160;
  animation: desenhar-circulo .6s ease forwards;
  animation-delay: .4s;
}

.sucesso-check {
  stroke-dasharray: 50;
  stroke-dashoffset: 50;
  animation: desenhar-check .4s ease forwards;
  animation-delay: .9s;
}

@keyframes desenhar-circulo {
  to { stroke-dashoffset: 0; }
}

@keyframes desenhar-check {
  to { stroke-dashoffset: 0; }
}

.sucesso-titulo {
  font-size: 26px;
  font-weight: 700;
  color: var(--g-white);
}

.sucesso-msg {
  font-size: 15px;
  color: rgba(255,255,255,.55);
  line-height: 1.6;
}

.validando-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, .72);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9000;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}

.validando-overlay.show {
  opacity: 1;
  pointer-events: all;
}

.validando-card {
  background: var(--g-white);
  border-radius: 20px;
  padding: 36px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  box-shadow: 0 24px 60px rgba(0,0,0,.25);
  min-width: 260px;
  text-align: center;
}

.validando-spinner {
  width: 48px;
  height: 48px;
  border: 3.5px solid var(--border);
  border-top-color: var(--g-green);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.validando-titulo {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
}

.validando-progresso {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--g-black);
  color: var(--g-white);
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  transition: transform .35s, opacity .35s;
  pointer-events: none;
  white-space: nowrap;
  z-index: 9999;
}

.toast.err  { background: #ef4444; }
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

.expiry-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 8000;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  transform: translateY(-100%);
  transition: transform .35s ease, background .3s;
  pointer-events: none;
}

.expiry-banner.show      { transform: translateY(0); pointer-events: all; }
.expiry-banner.aviso     { background: #f59e0b; color: #fff; }
.expiry-banner.urgente   { background: #ef4444; color: #fff; animation: piscar 1s ease infinite; }

@keyframes piscar {
  0%, 100% { opacity: 1; }
  50%       { opacity: .75; }
}

.lgpd-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.lgpd-modal {
  background: #fff;
  border-radius: 14px;
  padding: 2rem 2rem 1.5rem;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 24px 64px rgba(0,0,0,.18);
  display: flex;
  flex-direction: column;
  gap: .1rem;
}

.lgpd-eyebrow {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #3dab24;
  margin-bottom: .3rem;
}

.lgpd-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #111;
  margin-bottom: 1rem;
}

.lgpd-texto {
  font-size: .84rem;
  color: #555;
  line-height: 1.65;
  margin-bottom: 1.25rem;
}

.lgpd-check-row {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  margin-bottom: 1.5rem;
}

.lgpd-check-row input[type="checkbox"] {
  margin-top: 3px;
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  accent-color: #3dab24;
  cursor: pointer;
}

.lgpd-check-row label {
  font-size: .83rem;
  color: #333;
  line-height: 1.5;
  cursor: pointer;
}

.btn-lgpd {
  width: 100%;
  padding: .75rem 1rem;
  background: #3dab24;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: inherit;
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
}

.btn-lgpd:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.btn-lgpd:not(:disabled):hover { background: #2a7a19; }
