body { min-height: 100vh; }
.tela { max-width: 480px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; position: relative; background: transparent; }
#view { flex: 1; display: flex; flex-direction: column; padding-bottom: 96px; }
.sem-tab #view { padding-bottom: 0; }

/* abertura */
.splash { position: fixed; inset: 0; z-index: 60; background: var(--red-dark); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; transition: opacity .4s; }
.splash.sai { opacity: 0; pointer-events: none; }
.splash b { font-family: var(--title); font-size: 34px; letter-spacing: .1em; line-height: 1; }
.splash small { font-size: 11px; letter-spacing: .2em; color: #FBE3E5; font-weight: 600; }
.pulso-faixa { position: relative; width: 100%; height: 200px; display: flex; align-items: center; justify-content: center; }
.pulso-faixa svg.ecg { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .35; }
.pulso-faixa svg.ecg path { fill: none; stroke: #fff; stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.logo-brilho { position: relative; display: inline-flex; filter: drop-shadow(0 0 18px rgba(255,255,255,.45)) drop-shadow(0 12px 24px rgba(60,0,8,.45)); }

/* login / cadastro (fundo vermelho) */
.auth { min-height: 100vh; background: var(--red-dark); color: #fff; display: flex; flex-direction: column; }
.auth-hero { height: 340px; flex-shrink: 0; position: relative;
  background: linear-gradient(to bottom, rgba(163,13,32,0) 55%, rgba(163,13,32,.85) 85%, #A30D20 100%), url(/shared/bolsa.jpg) center top / cover; }
.auth-hero.curto { height: 150px; }
.auth-marca { position: absolute; top: calc(18px + env(safe-area-inset-top)); left: 18px; display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .18em; text-shadow: 0 2px 10px rgba(0,0,0,.5); }
.auth-corpo { margin-top: -60px; position: relative; padding: 0 24px 32px; display: flex; flex-direction: column; gap: 14px; }
.auth-corpo h1 { font-size: 56px; letter-spacing: .04em; line-height: .95; text-shadow: 0 4px 18px rgba(0,0,0,.35); }
.auth-corpo h2 { font-size: 30px; }
.auth-corpo .sub { font-size: 11px; letter-spacing: .18em; color: #FBE3E5; font-weight: 600; }
.auth .field label { color: #FBE3E5; }
.auth .inp { height: 50px; background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.35); }
.auth .inp::placeholder { color: rgba(255,255,255,.6); }
.auth .inp:focus { border-color: #fff; box-shadow: 0 0 0 4px rgba(255,255,255,.18); }
.btn-branco { height: 54px; border-radius: 16px; background: #fff; color: var(--red-dark); font: 700 16px Inter, sans-serif; border: 0; cursor: pointer; width: 100%;
  box-shadow: 0 14px 30px -12px rgba(0,0,0,.45); transition: transform .18s; }
.btn-branco:hover { transform: translateY(-2px); } .btn-branco:active { transform: scale(.97); } .btn-branco:disabled { opacity: .6; }
.auth-links { display: flex; justify-content: space-between; gap: 12px; }
.auth-links button { background: none; border: 0; color: #fff; font: 600 14px Inter, sans-serif; cursor: pointer; padding: 6px 0; text-decoration: underline; text-underline-offset: 3px; }
.auth .aviso-box { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25); border-radius: 14px; padding: 14px; font-size: 14px; line-height: 1.5; }

/* cabeçalho vermelho das abas */
.topo { position: relative; overflow: hidden; background: var(--red-dark); color: #fff; padding: calc(24px + env(safe-area-inset-top)) 20px 22px; box-shadow: 0 10px 30px -14px rgba(110,8,22,.7); }
.topo.alto { padding-bottom: 70px; }
.topo .marca-agua { position: absolute; right: -40px; top: -10px; opacity: .13; pointer-events: none; }
.topo small { font-size: 11px; letter-spacing: .16em; color: #FBE3E5; font-weight: 600; }
.topo h1 { font-size: 30px; }
.ola { display: flex; align-items: center; gap: 10px; position: relative; }
.ola .av { width: 44px; height: 44px; border-radius: 999px; background: #fff; color: var(--red-dark); font-weight: 700; display: flex; align-items: center; justify-content: center; }
.ola div { display: flex; flex-direction: column; }
.ola b { font-family: var(--title); font-size: 24px; text-transform: uppercase; letter-spacing: .02em; }
.ola span { font-size: 13px; color: #FBE3E5; }
.topo .linha2 { position: relative; display: block; font-size: 12px; color: #FBE3E5; margin-top: 10px; }
.bloco { margin: 14px 16px 0; background: #fff; border-radius: 20px; padding: 16px; box-shadow: 0 14px 34px -22px rgba(139,10,26,.45); display: flex; flex-direction: column; gap: 12px; }
.bloco.sobe { margin-top: -50px; position: relative; box-shadow: 0 18px 40px -18px rgba(139,10,26,.5); }
.bloco h3 { font-size: 20px; }
.rot { font-size: 11px; font-weight: 700; color: var(--red); letter-spacing: .16em; }
.prox { display: flex; align-items: center; gap: 14px; }
.prox .data { width: 62px; height: 66px; border-radius: 16px; background: var(--wine); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; flex-shrink: 0; }
.prox .data small { font-size: 10px; font-weight: 700; letter-spacing: .08em; color: var(--pink); }
.prox .data b { font-family: var(--title); font-size: 30px; line-height: 1; }
.prox h2 { font-size: 24px; }
.prox p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.lin { display: flex; gap: 8px; }
.lin > * { flex: 1; }

/* calendário */
.mes-nav { display: flex; align-items: center; gap: 6px; }
.mes-nav h3 { margin-right: auto; }
.mes-nav button { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line-strong); background: #fff; cursor: pointer; color: var(--text); }
.mes-nav button:disabled { opacity: .35; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal .wd { text-align: center; font-size: 10px; font-weight: 700; color: var(--muted); padding: 2px 0; }
.cal .d { height: 40px; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; font: 700 13px Inter, sans-serif; background: #F6F0F0; color: var(--muted);
  border: 1px solid #EADDDE; transition: transform .15s, box-shadow .15s; line-height: 1.05; }
.cal .d small { font-size: 8px; font-weight: 700; letter-spacing: .02em; }
.cal .d:hover { transform: scale(1.1); box-shadow: 0 0 0 2px var(--red), 0 8px 16px -6px rgba(200,16,46,.6); }
.cal .d.hoje { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--red); }
.leg { display: flex; flex-wrap: wrap; gap: 10px; font-size: 11px; color: var(--muted); }
.leg span { display: flex; align-items: center; gap: 5px; }
.leg i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.contador { font-size: 12px; font-weight: 700; color: #fff; background: var(--red); border-radius: 999px; padding: 4px 10px; }

/* escala geral */
.dias-rol { display: flex; gap: 8px; overflow-x: auto; padding: 14px 16px 2px; scrollbar-width: none; }
.dias-rol button { flex-shrink: 0; width: 54px; height: 64px; border-radius: 14px; border: 1px solid #E6DADB; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; cursor: pointer; color: var(--text); font-family: Inter, sans-serif; transition: transform .15s; }
.dias-rol button:hover { transform: translateY(-2px); }
.dias-rol button small { font-size: 10px; font-weight: 700; } .dias-rol button b { font-family: var(--title); font-size: 22px; line-height: 1; }
.dias-rol button.fds { color: var(--red); }
.dias-rol button.on { background: var(--red); color: #fff; border-color: var(--red); box-shadow: 0 10px 20px -8px rgba(200,16,46,.8); }
.grupo { display: flex; flex-direction: column; gap: 10px; }
.grupo-cab { display: flex; align-items: center; gap: 10px; }
.grupo-cab h3 { font-size: 18px; margin-right: auto; }
.grupo-cab span.h { font-size: 12px; color: var(--muted); font-weight: 600; }
.nomes { display: flex; flex-wrap: wrap; gap: 6px; }
.nomes span { font: 600 12px Inter, sans-serif; padding: 7px 11px; border-radius: 999px; background: #F6F0F0; border: 1px solid #E6DADB; }
.nomes span.eu { background: var(--red); color: #fff; border-color: var(--red); }

/* listas e itens */
.item { display: flex; align-items: center; gap: 12px; padding: 12px 10px; border-radius: 14px; transition: background .18s; }
.item:hover { background: #FFF5F6; }
.item .tx { margin-right: auto; display: flex; flex-direction: column; } .item .tx b { font-size: 14px; } .item .tx small { font-size: 12px; color: var(--muted); }
.lista { display: flex; flex-direction: column; }
.vazio-app { text-align: center; color: var(--muted); font-size: 14px; padding: 24px 8px; }
.toggle { width: 48px; height: 28px; border-radius: 999px; border: 0; background: #D2C4C6; position: relative; cursor: pointer; flex-shrink: 0; transition: background .2s; }
.toggle::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 999px; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.25); transition: left .2s; }
.toggle.on { background: var(--red); } .toggle.on::after { left: 23px; }
.numeros { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 14px 16px 0; }
.numeros div { background: #fff; border-radius: 18px; padding: 12px; text-align: center; box-shadow: 0 14px 34px -22px rgba(139,10,26,.45); }
.numeros b { display: block; font-family: var(--title); font-size: 30px; color: var(--red); }
.numeros small { font-size: 11px; color: var(--muted); font-weight: 600; }
.sel { height: 46px; border-radius: 12px; border: 1.5px solid #E6DADB; padding: 0 10px; font: 500 14px Inter, sans-serif; background: #fff; color: var(--text); width: 100%; }

/* barra inferior */
.tabbar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; z-index: 30; background: #fff; border-top: 3px solid var(--red);
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 8px 6px calc(10px + env(safe-area-inset-bottom)); box-shadow: 0 -10px 24px -16px rgba(139,10,26,.4); }
.tabbar button { position: relative; background: none; border: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px; color: var(--muted); font: 600 11px Inter, sans-serif; cursor: pointer; transition: color .18s; }
.tabbar button svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.tabbar button:hover, .tabbar button.on { color: var(--red); }
.tabbar button.on { font-weight: 700; }
.tabbar i { position: absolute; top: 2px; right: calc(50% - 20px); width: 9px; height: 9px; border-radius: 999px; background: var(--red); box-shadow: 0 0 0 2px #fff; }

.logo-splash { display: block; height: auto; filter: drop-shadow(0 6px 14px rgba(0,0,0,.25)); }
.pulso-faixa { height: 150px; }
.pulso-faixa .simbolo { position: relative; }
.marca-dupla { position: relative; z-index: 2; margin: -70px 24px 0; display: flex; align-items: center; gap: 16px; }
.marca-dupla .logo-branco { width: 170px; height: auto; display: block; filter: drop-shadow(0 6px 14px rgba(0,0,0,.25)); }
.marca-dupla.curto { margin-top: -40px; } .marca-dupla.curto .logo-branco { width: 130px; }
.divisor { width: 1.5px; height: 70px; background: rgba(255,255,255,.55); display: block; }
.marca-dupla.curto .divisor { height: 54px; }
.simbolo { display: inline-flex; filter: drop-shadow(0 0 14px rgba(255,255,255,.45)); }
.marca-dupla + .auth-corpo { margin-top: 18px; }
.auth-corpo h1 { font-size: 40px; }
.topo .marca-agua img { display: block; }
.ok-icone { width: 64px; height: 64px; border-radius: 999px; background: #fff; color: #1E8E4F; display: flex; align-items: center; justify-content: center; box-shadow: 0 12px 26px -12px rgba(0,0,0,.5); }

.simbolo-faixa { position: relative; height: 80px; margin: 6px -24px 0; display: flex; align-items: center; justify-content: center; }
.simbolo-faixa svg.ecg { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .5; }
.simbolo-faixa svg.ecg path { fill: none; stroke: #fff; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.simbolo-faixa .simbolo { position: relative; }
