/* =====================================================================
   Sistema ERP Córtex Tecnologia — Design System "Vidro Turquesa"
   Base: vídeo de referência 73924 (fundo turquesa, vidro claro, botões pretos em pílula)
   Regras para todas as telas: ver docs/DESIGN.md
   ===================================================================== */
:root {
  /* Fundo */
  --fundo-1: #0b3346; --fundo-2: #12697a; --fundo-3: #2aa6a8; --fundo-4: #8ad7cb;
  /* Vidro */
  --vidro: rgba(255, 255, 255, 0.26);
  --vidro-forte: rgba(255, 255, 255, 0.58);
  --vidro-card: rgba(255, 255, 255, 0.62);
  --vidro-escuro: rgba(8, 38, 52, 0.42);
  --borda: rgba(255, 255, 255, 0.45);
  --borda-forte: rgba(255, 255, 255, 0.7);
  --sombra: 0 18px 50px rgba(6, 40, 56, 0.22);
  --sombra-p: 0 6px 18px rgba(6, 40, 56, 0.14);
  /* Texto (escuro sobre vidro claro) */
  --texto: #0c2533;
  --texto-2: #3c5a68;
  --texto-3: #6b8693;
  --texto-claro: #f2fbfc;
  /* Cores de destaque (vivas) */
  --preto: #0b1720;
  --azul: #0ea5e9; --azul-2: #22d3ee; --turquesa: #14b8a6;
  --verde: #10b981; --amarelo: #f59e0b; --laranja: #f97316; --vermelho: #f43f5e; --roxo: #8b5cf6; --rosa: #ec4899;
  --raio: 22px; --raio-m: 16px; --raio-p: 12px;
  --menu: 250px;
  --fonte: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --anim: cubic-bezier(.2, .8, .2, 1);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--fonte); color: var(--texto); font-size: 15px; line-height: 1.45;
  -webkit-font-smoothing: antialiased; overflow-x: hidden; background: var(--fundo-1);
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -2;
  background:
    radial-gradient(60% 50% at 10% 0%, rgba(120, 220, 230, .55), transparent 70%),
    radial-gradient(50% 45% at 100% 30%, rgba(40, 170, 200, .55), transparent 70%),
    radial-gradient(60% 60% at 70% 100%, rgba(150, 230, 210, .55), transparent 70%),
    linear-gradient(140deg, var(--fundo-1) 0%, var(--fundo-2) 40%, var(--fundo-3) 75%, var(--fundo-4) 100%);
}
body::after { /* luzes que se movem devagar */
  content: ""; position: fixed; inset: -30%; z-index: -1; pointer-events: none; opacity: .5;
  background: radial-gradient(25% 25% at 30% 40%, rgba(255,255,255,.35), transparent 70%),
              radial-gradient(20% 20% at 70% 60%, rgba(180,255,245,.35), transparent 70%);
  animation: luzes 26s ease-in-out infinite alternate;
}
@keyframes luzes { to { transform: translate(6%, -4%) rotate(8deg); } }
a { color: #0a7f91; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.02em; }
h1 { font-size: 26px; }
h2 { font-size: 17px; }
h3 { font-size: 15px; }
.muted { color: var(--texto-2); }
.fraco { color: var(--texto-3); font-size: 13px; }
.oculto { display: none !important; }

/* ---------- Vidro ---------- */
.vidro {
  background: var(--vidro); border: 1px solid var(--borda); border-radius: var(--raio);
  backdrop-filter: blur(24px) saturate(160%); -webkit-backdrop-filter: blur(24px) saturate(160%);
  box-shadow: var(--sombra), inset 0 1px 0 rgba(255, 255, 255, .6);
}
.vidro.claro { background: var(--vidro-forte); }
.painel { padding: 20px; }
.painel > h2, .painel-topo { margin-bottom: 14px; }
.painel-topo { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

/* ---------- Estrutura ---------- */
.app { display: flex; min-height: 100vh; }
.menu {
  position: fixed; inset: 14px auto 14px 14px; width: var(--menu); padding: 18px 12px; z-index: 30;
  display: flex; flex-direction: column; gap: 2px; overflow-y: auto; color: var(--texto-claro);
  background: var(--vidro-escuro); border-color: rgba(255,255,255,.22);
}
.menu .logo { padding: 2px 10px 16px; }
.menu .logo img { width: 150px; }
.menu .secao { font-size: 10.5px; text-transform: uppercase; letter-spacing: .14em; color: rgba(230,250,252,.6); margin: 14px 12px 6px; }
.menu a.item {
  display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 12px; color: rgba(240,252,253,.85);
  font-weight: 550; font-size: 14.5px; transition: background .2s, color .2s, transform .2s var(--anim);
}
.menu a.item:hover { background: rgba(255,255,255,.12); color: #fff; transform: translateX(2px); }
.menu a.item.ativo { background: rgba(255,255,255,.92); color: var(--texto); box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.menu a.item.ativo .ic { color: var(--turquesa); }
.menu a.item .ic { width: 19px; height: 19px; flex: none; }
.menu a.item .cont {
  margin-left: auto; font-size: 11.5px; min-width: 21px; height: 20px; padding: 0 6px; border-radius: 10px;
  display: grid; place-items: center; background: rgba(255,255,255,.2); font-weight: 700;
}
.menu a.item .cont.alerta { background: var(--vermelho); color: #fff; }
.menu .rodape { margin-top: auto; padding: 12px 8px 0; border-top: 1px solid rgba(255,255,255,.18); display: flex; align-items: center; gap: 10px; }
.menu .rodape a { color: rgba(240,252,253,.8); }
.menu .rodape .fraco { color: rgba(230,250,252,.6); }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none; overflow: hidden;
  background: linear-gradient(135deg, var(--turquesa), var(--azul)); color: #fff; font-weight: 700; font-size: 13px;
  box-shadow: 0 0 0 2px rgba(255,255,255,.7);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.p { width: 28px; height: 28px; font-size: 11px; }
.avatar.g { width: 84px; height: 84px; font-size: 28px; box-shadow: 0 0 0 4px rgba(255,255,255,.8), var(--sombra-p); }
.conteudo { flex: 1; margin-left: calc(var(--menu) + 30px); padding: 18px 24px 40px 0; min-width: 0; }

/* Barra superior: busca global, Nova OS, sino, usuário */
.barra-topo { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; padding: 8px 10px; border-radius: 18px; }
.barra-topo .busca { max-width: 420px; }
.barra-topo .espaco { flex: 1; }
.sino { position: relative; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: rgba(255,255,255,.7); border: 1px solid var(--borda-forte); transition: transform .2s var(--anim); }
.sino:hover { transform: translateY(-1px) scale(1.04); }
.sino .ic { width: 20px; height: 20px; }
.sino .bolinha { position: absolute; top: -3px; right: -3px; min-width: 19px; height: 19px; border-radius: 10px; padding: 0 5px;
  background: var(--vermelho); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center;
  box-shadow: 0 0 0 2px #fff; animation: pulsa 2s infinite; }
@keyframes pulsa { 0%,100% { transform: scale(1); } 50% { transform: scale(1.12); } }
.notificacoes { position: absolute; right: 0; top: 50px; width: 380px; max-width: calc(100vw - 24px); max-height: 70vh; overflow: auto;
  z-index: 80; padding: 10px; background: rgba(255,255,255,.88); animation: surge .22s var(--anim); }
.notificacoes .item-n { display: flex; gap: 10px; padding: 10px; border-radius: 12px; cursor: pointer; align-items: flex-start; }
.notificacoes .item-n:hover { background: rgba(20,184,166,.1); }
.notificacoes .item-n b { font-size: 13.5px; font-weight: 600; display: block; }
.topo { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.topo .titulo { flex: 1; min-width: 200px; }
.topo .titulo h1 { color: #fff; text-shadow: 0 2px 14px rgba(0,40,60,.25); }
.topo .titulo p { margin: 3px 0 0; color: rgba(240,252,253,.85); font-size: 13.5px; }
.barra-baixo { display: none; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid rgba(255,255,255,.8);
  background: rgba(255,255,255,.85); color: var(--texto); padding: 9px 17px; border-radius: 999px; cursor: pointer; font-weight: 650;
  font-size: 14px; transition: transform .15s var(--anim), box-shadow .2s, background .2s; white-space: nowrap; box-shadow: var(--sombra-p);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(6,40,56,.2); background: #fff; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn.primario { background: var(--preto); border-color: var(--preto); color: #fff; }
.btn.primario:hover { background: #16303d; }
.btn.verde { background: var(--verde); border-color: var(--verde); color: #fff; }
.btn.vermelho { background: #fff0f3; border-color: #fecdd6; color: #e11d48; }
.btn.amarelo { background: #fff7e6; border-color: #fde3a7; color: #b45309; }
.btn.azul { background: var(--azul); border-color: var(--azul); color: #fff; }
.btn.roxo { background: var(--roxo); border-color: var(--roxo); color: #fff; }
.btn.fantasma { background: transparent; border-color: rgba(255,255,255,.6); color: #fff; box-shadow: none; }
.btn.escuro { background: var(--preto); color: #fff; border-color: var(--preto); }
.btn.p { padding: 6px 12px; font-size: 13px; }
.btn.g { padding: 13px 18px; font-size: 15px; width: 100%; }
.btn .ic { width: 16px; height: 16px; }
.btn-ic { width: 36px; height: 36px; padding: 0; border-radius: 50%; }

/* ---------- Campos ---------- */
.campo { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.campo label { font-size: 13px; color: var(--texto-2); font-weight: 600; }
input[type=text], input[type=password], input[type=date], input[type=search], input[type=tel], input[type=email], input[type=number], input[type=month], input[type=time], select, textarea {
  width: 100%; background: rgba(255,255,255,.78); border: 1px solid rgba(255,255,255,.9); border-radius: 14px;
  padding: 11px 14px; outline: none; transition: border .15s, box-shadow .15s, background .15s; color: var(--texto);
}
input:focus, select:focus, textarea:focus { background: #fff; border-color: var(--turquesa); box-shadow: 0 0 0 4px rgba(20,184,166,.2); }
textarea { resize: vertical; min-height: 90px; }
.linha { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.linha-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; margin-bottom: 14px; }
.check input { width: 18px; height: 18px; accent-color: var(--turquesa); }
.busca { position: relative; flex: 1; min-width: 180px; max-width: 380px; }
.busca input { padding-left: 40px; border-radius: 999px; }
.busca .ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--texto-3); }

/* ---------- Abas e chips ---------- */
.abas { display: flex; gap: 4px; overflow-x: auto; padding: 5px; margin-bottom: 16px; scrollbar-width: none; border-radius: 999px; width: fit-content; max-width: 100%; }
.abas::-webkit-scrollbar { display: none; }
.aba {
  padding: 8px 15px; border-radius: 999px; color: var(--texto-2); cursor: pointer; white-space: nowrap; font-weight: 650;
  font-size: 13.5px; display: flex; align-items: center; gap: 7px; border: 0; background: none; transition: background .2s, color .2s;
}
.aba:hover { color: var(--texto); background: rgba(255,255,255,.4); }
.aba.ativa { background: var(--preto); color: #fff; }
.aba .n { font-size: 11.5px; min-width: 20px; height: 19px; padding: 0 6px; border-radius: 10px; background: rgba(12,37,51,.1); display: grid; place-items: center; }
.aba.ativa .n { background: rgba(255,255,255,.22); }
.chip { padding: 7px 13px; border-radius: 999px; border: 1px solid rgba(255,255,255,.85); background: rgba(255,255,255,.55); cursor: pointer;
  font-size: 13px; font-weight: 650; color: var(--texto-2); transition: all .15s; display: inline-flex; align-items: center; gap: 6px; }
.chip:hover { background: #fff; }
.chip.ativo { background: var(--preto); border-color: var(--preto); color: #fff; }
.chip.ativo.material { background: var(--amarelo); border-color: var(--amarelo); color: #fff; }

/* ---------- KPIs ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; background: var(--vidro-forte); position: relative; overflow: hidden;
  transition: transform .2s var(--anim), box-shadow .2s; }
.kpi[data-ir] { cursor: pointer; }
.kpi[data-ir]:hover { transform: translateY(-3px); box-shadow: 0 20px 40px rgba(6,40,56,.25); }
.kpi::after { content: ""; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%; background: var(--cor-kpi, var(--azul)); opacity: .12; }
.kpi .rot { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--texto-2); font-weight: 600; }
.kpi .rot .ic { width: 32px; height: 32px; padding: 7px; border-radius: 11px; background: var(--cor-kpi, var(--azul)); color: #fff; box-shadow: 0 6px 14px rgba(0,0,0,.12); }
.kpi .val { font-size: 30px; font-weight: 800; letter-spacing: -.03em; }
.kpi .sub { font-size: 12px; color: var(--texto-3); }
.kpi.verde { --cor-kpi: var(--verde); } .kpi.amarelo { --cor-kpi: var(--amarelo); } .kpi.vermelho { --cor-kpi: var(--vermelho); }
.kpi.roxo { --cor-kpi: var(--roxo); } .kpi.turquesa { --cor-kpi: var(--turquesa); } .kpi.rosa { --cor-kpi: var(--rosa); } .kpi.laranja { --cor-kpi: var(--laranja); }

/* ---------- Cards de OS (estilo "Moderation" do vídeo) ---------- */
.grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.card-os { overflow: hidden; display: flex; flex-direction: column; cursor: pointer; background: var(--vidro-card); padding: 8px;
  border-radius: var(--raio); transition: transform .25s var(--anim), box-shadow .25s; }
.card-os:hover { transform: translateY(-4px); box-shadow: 0 24px 50px rgba(6,40,56,.28); }
.card-os .capa { position: relative; height: 150px; border-radius: 16px; overflow: hidden; background: linear-gradient(135deg, #7dd3c8, #3aa0b8); }
.card-os .capa img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--anim); }
.card-os:hover .capa img { transform: scale(1.05); }
.card-os .capa .sem-foto { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255,255,255,.85); }
.card-os .capa .sem-foto .ic { width: 42px; height: 42px; }
.card-os .capa .selos { position: absolute; left: 8px; top: 8px; right: 8px; display: flex; justify-content: space-between; gap: 6px; }
.card-os .corpo { padding: 12px 8px 8px; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.card-os .num { font-size: 12px; color: var(--texto-3); font-weight: 650; }
.card-os .tit { font-weight: 750; font-size: 15.5px; line-height: 1.3; }
.card-os .cli { color: var(--texto-2); font-size: 13px; }
.card-os .meta { display: flex; flex-wrap: wrap; gap: 10px; font-size: 12px; color: var(--texto-2); margin-top: 2px; }
.card-os .meta span { display: inline-flex; align-items: center; gap: 4px; }
.card-os .meta .ic { width: 14px; height: 14px; }
.card-os .pe { display: flex; gap: 8px; padding: 4px 4px 4px; }
.card-os .pe .btn { flex: 1; }
.selo {
  display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 750; padding: 4px 10px;
  border-radius: 999px; background: rgba(255,255,255,.9); color: var(--texto-2); white-space: nowrap; box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.selo::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.selo.urgente { color: #e11d48; } .selo.normal { color: #0284c7; } .selo.baixa { color: #64748b; } .selo.tempo_vago { color: #7c3aed; }
.selo.aberta { color: #0284c7; } .selo.assumida { color: #d97706; } .selo.em_andamento { color: #ea580c; }
.selo.aguardando_aprovacao { color: #7c3aed; } .selo.ajuste { color: #e11d48; } .selo.aprovada { color: #059669; }
.selo.lixeira { color: #64748b; } .selo.validar { color: #d97706; }
.tag-ok { font-size: 11.5px; padding: 3px 9px; border-radius: 999px; background: #d1fae5; color: #047857; font-weight: 700; }
.tag-alerta { font-size: 11.5px; padding: 3px 9px; border-radius: 999px; background: #fef3c7; color: #b45309; font-weight: 700; }
.tag-erro { font-size: 11.5px; padding: 3px 9px; border-radius: 999px; background: #ffe4e6; color: #be123c; font-weight: 700; }
.tag-info { font-size: 11.5px; padding: 3px 9px; border-radius: 999px; background: #e0f2fe; color: #0369a1; font-weight: 700; }

/* ---------- Detalhe da OS ---------- */
.detalhe { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.cab-os { padding: 22px; margin-bottom: 18px; background: var(--vidro-forte); }
.cab-os .selos { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.cab-os h1 { font-size: 24px; margin-bottom: 4px; }
.cab-os .desc { white-space: pre-wrap; margin-top: 14px; }
.acoes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.info-lista { display: flex; flex-direction: column; gap: 12px; }
.info-lista .i { display: flex; gap: 10px; align-items: flex-start; }
.info-lista .i .ic { width: 18px; height: 18px; color: var(--turquesa); margin-top: 2px; flex: none; }
.info-lista .i small { display: block; color: var(--texto-3); font-size: 12px; }
.linha-tempo { position: relative; padding-left: 24px; }
.linha-tempo::before { content: ""; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(var(--turquesa), rgba(20,184,166,.1)); }
.ev { position: relative; margin-bottom: 16px; animation: sobeSuave .4s var(--anim) both; }
.ev::before { content: ""; position: absolute; left: -21px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 3px solid var(--turquesa); }
.ev.sistema::before { border-color: #94a3b8; width: 10px; height: 10px; left: -20px; }
.ev.alerta::before { border-color: var(--vermelho); }
.ev.ok::before { border-color: var(--verde); }
.ev .cab { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; font-size: 13px; }
.ev .cab b { font-weight: 700; }
.ev .cab .quando { color: var(--texto-3); font-size: 12px; }
.ev .acao { color: var(--texto-2); }
.ev .bolha { margin-top: 6px; padding: 10px 14px; border-radius: 16px; background: rgba(255,255,255,.75); border: 1px solid #fff; white-space: pre-wrap; word-wrap: break-word; }
.ev .bolha.admin { background: #e0f7f5; border-color: #b5ece6; }
.ev .bolha.material { background: #fff7e6; border-color: #fde3a7; }
.ev .bolha.alerta { background: #fff0f3; border-color: #fecdd6; }
.ev .geo { font-size: 12px; margin-top: 4px; display: inline-flex; gap: 4px; align-items: center; }
.ev .geo .ic { width: 13px; height: 13px; }
.galeria { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-top: 8px; }
.galeria a, .galeria .vid { position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: #cfe9ec; display: block; box-shadow: var(--sombra-p); }
.galeria img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.galeria a:hover img { transform: scale(1.06); }
.galeria .vid .ic { position: absolute; inset: 0; margin: auto; width: 34px; height: 34px; color: #fff; }
.galeria .pdf { display: grid; place-items: center; font-size: 12px; color: var(--texto-2); text-align: center; padding: 6px; }
.compositor { padding: 14px; position: sticky; bottom: 12px; margin-top: 10px; background: rgba(255,255,255,.7); }
.compositor textarea { min-height: 70px; margin-bottom: 10px; }
.compositor .barra { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.compositor .tipos { display: flex; gap: 6px; flex: 1; flex-wrap: wrap; }
.previas { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.previas .pv { width: 64px; height: 64px; border-radius: 12px; overflow: hidden; position: relative; background: #cfe9ec; display: grid; place-items: center; font-size: 11px; color: var(--texto-2); }
.previas .pv img { width: 100%; height: 100%; object-fit: cover; }
.previas .pv button { position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: rgba(0,0,0,.7); color: #fff; cursor: pointer; font-size: 12px; line-height: 1; }

/* ---------- Tabelas e listas ---------- */
.tabela { width: 100%; border-collapse: collapse; font-size: 14px; }
.tabela th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--texto-3); font-weight: 700; padding: 8px 10px; border-bottom: 1px solid rgba(255,255,255,.7); }
.tabela td { padding: 11px 10px; border-bottom: 1px solid rgba(255,255,255,.5); vertical-align: middle; }
.tabela tr.clicavel { cursor: pointer; }
.tabela tbody tr { transition: background .15s; }
.tabela tbody tr:hover td { background: rgba(255,255,255,.35); }
.lista-simples { display: flex; flex-direction: column; }
.lista-simples .li { display: flex; align-items: center; gap: 12px; padding: 11px 6px; border-bottom: 1px solid rgba(255,255,255,.5); cursor: pointer; border-radius: 12px; transition: background .15s; color: inherit; }
.lista-simples .li:hover { background: rgba(255,255,255,.35); }
.lista-simples .li:last-child { border-bottom: 0; }
.lista-simples .li .txt { flex: 1; min-width: 0; }
.lista-simples .li .txt b { display: block; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vazio { padding: 34px 16px; text-align: center; color: var(--texto-3); }
.vazio .ic { width: 42px; height: 42px; margin: 0 auto 10px; opacity: .6; }
.alerta-ic { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; flex: none; background: #e0f7f5; color: var(--turquesa); }
.alerta-ic .ic { width: 18px; height: 18px; }
.alerta-ic.alto { background: #ffe4e6; color: var(--vermelho); }
.alerta-ic.medio { background: #fef3c7; color: var(--amarelo); }

/* ---------- Gráficos ---------- */
.grid-2 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 18px; margin-bottom: 18px; }
.grid-meia { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-bottom: 18px; }
.barras { display: flex; align-items: flex-end; gap: 10px; height: 200px; padding-top: 18px; }
.barras .b { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.barras .b .col { width: 100%; max-width: 46px; border-radius: 12px 12px 6px 6px; min-height: 4px; background: linear-gradient(180deg, var(--azul-2), var(--turquesa));
  box-shadow: 0 8px 18px rgba(20,184,166,.35); transform-origin: bottom; animation: cresce .7s var(--anim) both; }
.barras .b:last-child .col { background: linear-gradient(180deg, #0b1720, #1f4b5c); }
.barras .b .v { font-size: 12px; color: var(--texto-2); font-weight: 700; }
.barras .b .r { font-size: 11px; color: var(--texto-3); }
@keyframes cresce { from { transform: scaleY(0); } }
.medidor { display: grid; place-items: center; padding: 10px 0; }
.medidor svg { width: 170px; height: 170px; }
.medidor .legenda { text-align: center; margin-top: 6px; color: var(--texto-2); font-size: 13px; }
.barra-h { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 13px; }
.barra-h .nome { width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.barra-h .trilho { flex: 1; height: 9px; border-radius: 6px; background: rgba(255,255,255,.6); overflow: hidden; }
.barra-h .trilho i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--turquesa), var(--azul)); animation: enche .8s var(--anim) both; transform-origin: left; }
.barra-h .v { width: 34px; text-align: right; color: var(--texto-2); font-weight: 700; }
@keyframes enche { from { transform: scaleX(0); } }
.dica { position: fixed; z-index: 300; pointer-events: none; background: var(--preto); color: #fff; padding: 7px 10px; border-radius: 10px; font-size: 12.5px; font-weight: 600; box-shadow: var(--sombra-p); }

/* ---------- Modal, avisos e carregamento ---------- */
.fundo-modal { position: fixed; inset: 0; z-index: 100; background: rgba(6,35,48,.35); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 16px; animation: aparece .2s; }
.modal { width: 100%; max-width: 480px; max-height: 92vh; overflow: auto; padding: 24px; background: rgba(255,255,255,.9); animation: surge .25s var(--anim); }
.modal.largo { max-width: 760px; }
.modal h2 { margin-bottom: 8px; font-size: 19px; }
.modal p { color: var(--texto-2); margin: 0 0 14px; }
.modal .botoes { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
.aviso { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); z-index: 200; padding: 12px 20px; border-radius: 999px;
  background: var(--preto); color: #fff; box-shadow: 0 14px 34px rgba(0,0,0,.3); font-weight: 650; max-width: calc(100% - 32px); animation: sobe .25s var(--anim); }
.aviso.erro { background: #be123c; }
.aviso.ok { background: var(--preto); }
@keyframes sobe { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes surge { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes aparece { from { opacity: 0; } }
@keyframes sobeSuave { from { opacity: 0; transform: translateY(8px); } }
.conteudo > * { animation: sobeSuave .45s var(--anim) both; }
.conteudo > *:nth-child(2) { animation-delay: .04s; } .conteudo > *:nth-child(3) { animation-delay: .08s; } .conteudo > *:nth-child(4) { animation-delay: .12s; } .conteudo > *:nth-child(5) { animation-delay: .16s; }
.grade > * { animation: sobeSuave .45s var(--anim) both; }
.grade > *:nth-child(2) { animation-delay: .05s; } .grade > *:nth-child(3) { animation-delay: .1s; } .grade > *:nth-child(4) { animation-delay: .15s; } .grade > *:nth-child(n+5) { animation-delay: .2s; }
.carregando { display: grid; place-items: center; padding: 60px; }
.spin { width: 30px; height: 30px; border-radius: 50%; border: 3px solid rgba(255,255,255,.5); border-top-color: #fff; animation: gira .8s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }
.esqueleto { background: linear-gradient(90deg, rgba(255,255,255,.35) 25%, rgba(255,255,255,.7) 50%, rgba(255,255,255,.35) 75%); background-size: 200% 100%; animation: brilho 1.2s infinite; border-radius: 14px; }
@keyframes brilho { to { background-position: -200% 0; } }

/* ---------- Login ---------- */
.tela-login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.caixa-login { width: 100%; max-width: 410px; padding: 32px 28px; background: rgba(255,255,255,.55); }
.caixa-login .logo { width: 220px; margin: 0 auto 8px; filter: drop-shadow(0 2px 6px rgba(0,0,0,.2)); }
.caixa-login .logo.escura { filter: none; }
.caixa-login .sub { text-align: center; color: var(--texto-2); margin-bottom: 24px; font-size: 14px; font-weight: 600; }

/* ---------- Visualizador ---------- */
.visualizador { position: fixed; inset: 0; z-index: 150; background: rgba(0,0,0,.9); display: grid; place-items: center; animation: aparece .2s; }
.visualizador img, .visualizador video { max-width: 96vw; max-height: 86vh; border-radius: 12px; }
.visualizador .fechar { position: absolute; top: 14px; right: 14px; }

/* ---------- Ponto (cartão) ---------- */
.ponto-cartao h2 { display: flex; align-items: center; gap: 8px; }
.ponto-cartao h2 .ic { width: 20px; height: 20px; color: var(--turquesa); }
.ponto-linha { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.ponto-marca { padding: 10px; border-radius: 14px; background: rgba(255,255,255,.55); border: 1px solid #fff; text-align: center; }
.ponto-marca small { display: block; color: var(--texto-3); font-size: 11.5px; font-weight: 600; }
.ponto-marca b { font-size: 19px; color: var(--texto-3); }
.ponto-marca.feito { background: #d1fae5; border-color: #a7f3d0; }
.ponto-marca.feito b { color: #047857; }
.ponto-marca.proximo { border-color: var(--turquesa); box-shadow: 0 0 0 3px rgba(20,184,166,.25); }
input[type=file] { font-size: 13px; color: var(--texto-2); }

/* ---------- Celular ---------- */
@media (max-width: 1100px) { .detalhe, .grid-2, .grid-meia, .grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 820px) {
  .menu { display: none; }
  .conteudo { margin-left: 0; padding: 12px 12px 100px; }
  .barra-topo { margin-bottom: 12px; }
  .barra-topo .busca { display: none; }
  h1 { font-size: 22px; }
  .grade { grid-template-columns: 1fr; gap: 12px; }
  .card-os { flex-direction: row; padding: 6px; }
  .card-os .capa { width: 108px; height: auto; min-height: 118px; flex: none; }
  .card-os .capa .selos { flex-direction: column; left: 6px; top: 6px; right: auto; }
  .card-os .capa .selos .selo:last-child { display: none; }
  .card-os .corpo { padding: 6px 10px; }
  .card-os .pe { display: none; }
  .card-os .status-movel { display: inline-flex; align-self: flex-start; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 12px; }
  .kpi .val { font-size: 24px; }
  .linha, .linha-3 { grid-template-columns: 1fr; gap: 0; }
  .busca { max-width: none; }
  .barra-baixo { display: flex; position: fixed; left: 10px; right: 10px; bottom: 10px; z-index: 40; padding: 6px; justify-content: space-around; border-radius: 24px; background: rgba(8,38,52,.72); }
  .barra-baixo a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 2px; border-radius: 16px; font-size: 11px; color: rgba(240,252,253,.8); font-weight: 650; position: relative; }
  .barra-baixo a .ic { width: 22px; height: 22px; }
  .barra-baixo a.ativo { color: var(--texto); background: rgba(255,255,255,.92); }
  .barra-baixo a .cont { position: absolute; top: 2px; right: calc(50% - 22px); min-width: 17px; height: 17px; border-radius: 9px; font-size: 10px; background: var(--vermelho); color: #fff; display: grid; place-items: center; padding: 0 4px; }
  .compositor { position: static; }
  .aviso { bottom: 96px; }
  .esconde-movel { display: none !important; }
  .ponto-linha { grid-template-columns: repeat(2, 1fr); }
  .abas { width: 100%; }
}
@media (min-width: 821px) { .so-movel, .card-os .status-movel { display: none !important; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
.barra-svg { transform-origin: bottom; transform-box: fill-box; animation: cresce .7s var(--anim) both; }
.graf-linha .traco { stroke-dasharray: 2000; stroke-dashoffset: 2000; animation: desenha 1.2s var(--anim) forwards; }
@keyframes desenha { to { stroke-dashoffset: 0; } }
.fatia:hover { stroke-width: 28; }
