/* Estilos da tela: os (use as variáveis de style.css) — Agente OS */

/* ---------- Card (cardOS2) ---------- */
.card-os .capa .sem-foto { z-index: 0; }
.card-os .capa img { position: relative; z-index: 1; display: block; }
.card-os .capa .selos { z-index: 2; }
.card-os .capa .tag-multipla { position: absolute; z-index: 2; left: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 999px; background: rgba(11,23,32,.72); color: #fff; font-size: 11.5px; font-weight: 700; backdrop-filter: blur(6px); }
.card-os .capa .tag-multipla .ic { width: 13px; height: 13px; }
.card-os.multipla { box-shadow: 0 0 0 2px rgba(139,92,246,.35), var(--sombra-p); }

/* ---------- Barra de progresso dos chamados ---------- */
.progresso { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--texto-2); margin: 2px 0; }
.progresso .trilho { flex: 1; height: 8px; border-radius: 999px; background: rgba(12,37,51,.1); overflow: hidden; min-width: 60px; }
.progresso .trilho i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--turquesa), var(--azul-2));
  animation: enche-os .9s var(--anim) both; transform-origin: left; }
.progresso.completo .trilho i { background: linear-gradient(90deg, var(--verde), #34d399); }
.progresso span { white-space: nowrap; }
.progresso b { color: var(--texto); font-weight: 800; }
.progresso.g { font-size: 14px; margin: 4px 0 14px; }
.progresso.g .trilho { height: 12px; }
@keyframes enche-os { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ---------- Lista ---------- */
.contador b { font-size: 1.05em; color: var(--texto); }
.busca-ativa { display: flex; align-items: center; gap: 10px; padding: 10px 14px; margin-bottom: 14px; border-radius: var(--raio-m); }
.busca-ativa > .ic { width: 18px; height: 18px; color: var(--texto-2); }
.busca-ativa span { flex: 1; }
.filtros-os { padding: 12px 14px; margin-bottom: 16px; border-radius: var(--raio-m); display: flex; flex-direction: column; gap: 8px; }
.filtro-linha { display: flex; align-items: center; gap: 10px; min-width: 0; }
.filtro-rot { font-size: 11.5px; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; color: var(--texto-2); width: 82px; flex: none; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; min-width: 0; }
.chip .n { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 3px; border-radius: 999px; background: rgba(12,37,51,.1); font-size: 11px; font-weight: 750; text-align: center; }
.chip.ativo .n { background: rgba(255,255,255,.22); }
.chip .ic { width: 14px; height: 14px; vertical-align: -2px; }

/* ---------- Formulário ---------- */
.form-os { max-width: 780px; }
.tipo-os { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.opcao-tipo { display: flex; flex-direction: column; gap: 3px; padding: 14px 16px; border-radius: var(--raio-m); cursor: pointer;
  background: rgba(255,255,255,.55); border: 2px solid rgba(255,255,255,.85); transition: all .2s var(--anim); }
.opcao-tipo .ic { width: 24px; height: 24px; color: var(--turquesa); margin-bottom: 4px; }
.opcao-tipo span { font-size: 12.5px; color: var(--texto-2); }
.opcao-tipo.ativo { border-color: var(--preto); background: #fff; box-shadow: var(--sombra-p); }
.opcao-tipo:hover { transform: translateY(-2px); }
.capa-form { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.capa-previa { position: relative; width: 220px; height: 124px; border-radius: var(--raio-m); overflow: hidden; background: linear-gradient(135deg, #7dd3c8, #3aa0b8); flex: none; box-shadow: var(--sombra-p); }
.capa-previa .sem-foto { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255,255,255,.85); }
.capa-previa .sem-foto .ic { width: 36px; height: 36px; }
.capa-previa img { position: relative; width: 100%; height: 100%; object-fit: cover; transition: opacity .3s; }
.capa-botoes { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }

/* ---------- Detalhe: cabeçalho com capa grande ---------- */
.os-hero { overflow: hidden; margin-bottom: 18px; background: var(--vidro-forte); padding: 0; }
.hero-capa { position: relative; height: 250px; background: linear-gradient(135deg, #2aa6a8, #0b3346); overflow: hidden; }
.hero-capa .sem-foto { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255,255,255,.35); }
.hero-capa .sem-foto .ic { width: 70px; height: 70px; }
.hero-capa > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: zoom-capa 1.2s var(--anim) both; }
@keyframes zoom-capa { from { transform: scale(1.08); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.hero-sombra { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5,20,30,.35) 0%, rgba(5,20,30,0) 35%, rgba(5,20,30,.78) 100%); }
.hero-capa .selos { position: absolute; left: 18px; top: 16px; right: 160px; display: flex; gap: 8px; flex-wrap: wrap; }
.selo.multipla { background: rgba(139,92,246,.92); color: #fff; }
.selo.multipla::before { display: none; }
.selo .ic { width: 13px; height: 13px; }
.trocar-capa { position: absolute; right: 14px; top: 14px; background: rgba(255,255,255,.85); }
.hero-texto { position: absolute; left: 22px; right: 22px; bottom: 18px; color: #fff; text-shadow: 0 2px 12px rgba(0,0,0,.35); }
.hero-texto .num { font-size: 12.5px; font-weight: 700; opacity: .85; letter-spacing: .03em; }
.hero-texto h1 { color: #fff; font-size: 27px; margin: 2px 0 4px; line-height: 1.2; }
.hero-texto .cli { display: flex; align-items: center; gap: 6px; opacity: .92; font-size: 14px; }
.hero-texto .cli .ic { width: 16px; height: 16px; }
.hero-corpo { padding: 16px 22px 20px; }
.hero-corpo .desc { white-space: pre-wrap; margin-bottom: 14px; color: var(--texto-2); }
.hero-corpo .acoes { margin-top: 0; }
.btn.bloqueado { opacity: .55; }

/* ---------- Chamados ---------- */
.filtro-ch { margin-bottom: 12px; }
.chamados { display: flex; flex-direction: column; gap: 8px; }
.ch { border-radius: var(--raio-m); background: rgba(255,255,255,.7); border: 1px solid #fff; box-shadow: 0 2px 8px rgba(6,40,56,.06);
  animation: sobeSuave .35s var(--anim) both; transition: background .2s; }
.ch-linha { display: flex; align-items: center; gap: 12px; padding: 10px 12px; min-height: 58px; }
.ch-check { width: 38px; height: 38px; flex: none; border-radius: 50%; display: grid; place-items: center; border: 2.5px solid rgba(12,37,51,.25);
  background: #fff; color: transparent; cursor: pointer; transition: all .2s var(--anim); padding: 0; }
.ch-check .ic { width: 20px; height: 20px; }
button.ch-check:hover { border-color: var(--verde); color: var(--verde); transform: scale(1.06); }
button.ch-check:active { transform: scale(.92); background: var(--verde); color: #fff; }
.ch-check.feito { cursor: default; }
.st-concluido .ch-check { background: var(--verde); border-color: var(--verde); color: #fff; }
.st-cancelado .ch-check { background: #cbd5e1; border-color: #cbd5e1; color: #fff; }
.st-em_andamento .ch-check.feito, .st-em_andamento button.ch-check { border-color: var(--azul); }
.st-concluido { background: rgba(236,253,245,.75); }
.st-cancelado { opacity: .62; }
.st-cancelado .ch-txt b { text-decoration: line-through; }
.ch-txt { flex: 1; min-width: 0; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.ch-txt b { font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.ch-txt .seq { display: inline-block; min-width: 26px; padding: 1px 6px; margin-right: 4px; border-radius: 8px; background: var(--preto); color: #fff; font-size: 11.5px; text-align: center; }
.ch-txt .fraco .ic { width: 12px; height: 12px; vertical-align: -1px; }
.ch-fotos { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; color: var(--texto-2); cursor: pointer; }
.ch-fotos .ic { width: 15px; height: 15px; }
.selo.ch-pendente { background: #eef2f6; color: #475569; }
.selo.ch-em_andamento { background: #e0f2fe; color: #0369a1; }
.selo.ch-concluido { background: #d1fae5; color: #047857; }
.selo.ch-cancelado { background: #f1f5f9; color: #64748b; }
.ch-foto { flex: none; }
.ch-foto.enviando { animation: pulsa 1s infinite; pointer-events: none; }
.ch-det { padding: 0 14px 14px 62px; }
.ch-det .bolha { padding: 10px 14px; border-radius: 14px; background: #fff; border: 1px solid #e2e8f0; white-space: pre-wrap; margin-bottom: 6px; }
.ch-det .bolha.ok { background: #ecfdf5; border-color: #a7f3d0; }
.ch-det .bolha.alerta { background: #fff0f3; border-color: #fecdd6; }
.ch-meta .ic { width: 12px; height: 12px; vertical-align: -1px; }
.ch-acoes { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.dica-ch { margin: 10px 0 0; text-align: center; color: var(--texto-2); }
.ch-foto .ic { width: 18px; height: 18px; }
.linha-tempo.nova .ev .cab .quando, .linha-tempo.nova .ev .acao { color: var(--texto-2); }
.ch-txt .fraco { color: var(--texto-2); }
.relatos-rapidos { margin-bottom: 12px; }
.relatos-rapidos .chip { font-size: 12.5px; text-align: left; }

/* ---------- Linha do tempo ---------- */
.linha-tempo.nova .lt-dia { position: relative; margin: 6px 0 14px -24px; }
.linha-tempo.nova .lt-dia span { display: inline-block; padding: 3px 12px; border-radius: 999px; background: var(--preto); color: #fff; font-size: 11.5px; font-weight: 700; }
.linha-tempo.nova .ev .cab { align-items: center; }
.linha-tempo.nova .ev .cab .avatar.p { width: 24px; height: 24px; font-size: 10px; }
.linha-tempo.nova .ev.menor { opacity: .78; font-size: 13px; }
.linha-tempo.nova .ev.menor .avatar { display: none; }
.linha-tempo.nova.so-importante .ev.menor { display: none; }
.linha-tempo.nova .ev .bolha.ok { background: #ecfdf5; border-color: #a7f3d0; }
.tag-chamado { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; padding: 3px 10px; border-radius: 999px; background: rgba(139,92,246,.12); color: #6d28d9; font-size: 12px; font-weight: 700; }
.tag-chamado .ic { width: 13px; height: 13px; }
.col-lateral { display: flex; flex-direction: column; gap: 18px; }

/* ---------- Celular ---------- */
@media (max-width: 820px) {
  .filtros-os { padding: 10px; }
  .filtro-linha { flex-direction: column; align-items: flex-start; gap: 4px; }
  .filtro-linha .chips { flex-wrap: nowrap; overflow-x: auto; width: 100%; padding-bottom: 2px; scrollbar-width: none; }
  .filtro-linha .chips::-webkit-scrollbar { display: none; }
  .filtro-linha .chip { white-space: nowrap; flex: none; }
  .card-os .progresso { font-size: 11.5px; gap: 6px; }
  .card-os .capa .tag-multipla { left: 6px; bottom: 6px; padding: 3px 7px; font-size: 10.5px; }
  .tipo-os { grid-template-columns: 1fr; }
  .hero-capa { height: 210px; }
  .hero-capa .selos { left: 12px; top: 12px; right: 12px; }
  .trocar-capa { top: auto; bottom: auto; right: 10px; top: 52px; }
  .hero-texto { left: 14px; right: 14px; bottom: 12px; }
  .hero-texto h1 { font-size: 21px; }
  .hero-corpo { padding: 14px; }
  .hero-corpo .acoes .btn { flex: 1 1 auto; justify-content: center; }
  .ch-linha { gap: 10px; padding: 9px 10px; min-height: 62px; }
  .ch-check { width: 44px; height: 44px; }
  .ch-linha .selo { display: none; }
  .ch-det { padding: 0 12px 12px 12px; }
  .capa-previa { width: 100%; height: 150px; }
}
