/* Assistente TSG: identidade própria (pôr do sol: tangerina, rosa e lilás sobre creme) */
:root {
  --fundo: #f4f1ea; --card: #ffffff; --texto: #1d1b19; --texto2: #6b6458; --borda: #e2dccf;
  --amarelo: #ffd84d; --vermelho: #ff5c5c; --rosa: #ff5c5c; --lilas: #1d1b19; --tinta: #1d1b19; --grad: #1d1b19;
  --pessego: #ffd84d; --lavanda: #ff9ec4; --menta: #b9eda0; --sol: #9fd8f5; --chiclete: #cdb8ff;
  --erro: #d92d2d; --raio: 20px; --sombra: 0 1px 1px rgba(0,0,0,.06), 0 10px 20px -10px rgba(60,40,10,.25);
  --titulo: "Archivo Black", system-ui, sans-serif; --mao: "Caveat", cursive;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --fundo: #1b1916; --card: #26231f; --texto: #f4f1ea; --texto2: #b5ad9f; --borda: #38332c; }
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--fundo); color: var(--texto); font: 16px/1.5 "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-tap-highlight-color: transparent; }
a { color: var(--rosa); }
button { font: inherit; cursor: pointer; }
h1, h2, h3 { font-family: var(--titulo); }

/* ---------- app ---------- */
.tela-app { display: flex; flex-direction: column; height: 100dvh; overflow: hidden; }
.topo { display: flex; align-items: center; gap: 10px; padding: calc(env(safe-area-inset-top) + 10px) 14px 8px; }
.topo img { border-radius: 14px; box-shadow: 0 6px 16px rgba(255,79,139,.3); }
.topo-nome { flex: 1; display: flex; flex-direction: column; line-height: 1.15; }
.topo-nome b { font-family: var(--titulo); font-size: 19px; letter-spacing: -.3px; }
.topo-nome small { color: var(--texto2); font-size: 12.5px; }
.topo-nome small::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #2fbf71; margin-right: 5px; vertical-align: 1px; }
.selo { font-size: 11.5px; font-weight: 800; padding: 5px 10px; border-radius: 99px; background: var(--lavanda); color: var(--lilas); text-decoration: none; }
.selo.pro { background: var(--grad); color: #fff; }
.icone-btn { background: var(--card); border: 0; color: var(--texto); font-size: 20px; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; box-shadow: var(--sombra); }
.menu { position: absolute; right: 12px; top: calc(env(safe-area-inset-top) + 58px); z-index: 20; background: var(--card); border-radius: 20px; box-shadow: 0 20px 50px rgba(35,26,46,.2); padding: 8px; min-width: 240px; display: flex; flex-direction: column; }
.menu[hidden] { display: none; }
.menu button, .menu a, .menu-linha { text-align: left; background: none; border: 0; padding: 12px 12px; border-radius: 14px; color: var(--texto); text-decoration: none; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.menu button:hover, .menu a:hover { background: var(--fundo); }
.menu select { margin-left: auto; font: inherit; padding: 3px 6px; border-radius: 10px; border: 1px solid var(--borda); background: var(--card); color: var(--texto); }
.faixa { margin: 4px 12px 0; background: var(--sol); color: #5c4400; font-size: 14px; padding: 10px 12px 10px 14px; border-radius: 18px; display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.faixa[hidden] { display: none; }
.faixa button { background: var(--tinta); color: #fff; border: 0; border-radius: 99px; padding: 7px 14px; font-weight: 700; white-space: nowrap; }

.aba { display: none; flex: 1; min-height: 0; }
.aba.ativa { display: flex; flex-direction: column; }
.chat { flex: 1; overflow-y: auto; padding: 14px 14px 8px; display: flex; flex-direction: column; gap: 8px; }
.msg { max-width: 84%; padding: 10px 14px 6px; border-radius: 22px; word-wrap: break-word; animation: entra .22s cubic-bezier(.2,.9,.3,1.2); }
.msg small { display: block; text-align: right; font-size: 11px; opacity: .65; margin-top: 2px; }
.msg.ele { background: var(--card); align-self: flex-start; border-bottom-left-radius: 6px; box-shadow: var(--sombra); }
.msg.eu { background: var(--grad); color: #fff; align-self: flex-end; border-bottom-right-radius: 6px; box-shadow: 0 8px 20px rgba(255,79,139,.25); }
.msg.eu a { color: #fff; }
.tag-audio { font-size: 12px; opacity: .8; }
.foto-msg { max-width: 220px; width: 100%; border-radius: 14px; display: block; margin-bottom: 4px; }
.btn-msg { display: inline-block; margin-top: 8px; background: var(--grad); color: #fff; text-decoration: none; padding: 8px 16px; border-radius: 99px; font-weight: 700; font-size: 14px; }
.digitando { display: flex; gap: 5px; padding: 14px 16px; }
.digitando span { width: 8px; height: 8px; border-radius: 50%; background: var(--rosa); animation: pula 1s infinite; }
.digitando span:nth-child(2) { animation-delay: .15s; background: #ff7a5c; } .digitando span:nth-child(3) { animation-delay: .3s; background: var(--lilas); }
@keyframes pula { 0%, 60%, 100% { opacity: .35; transform: none; } 30% { opacity: 1; transform: translateY(-4px); } }
@keyframes entra { from { opacity: 0; transform: translateY(8px) scale(.97); } }

.atalhos { display: flex; gap: 8px; overflow-x: auto; padding: 4px 14px 2px; scrollbar-width: none; }
.atalhos::-webkit-scrollbar { display: none; }
.atalhos button { flex: none; border: 0; border-radius: 99px; padding: 8px 14px; font-size: 14px; font-weight: 600; color: var(--texto); }
.atalhos button:nth-child(5n+1) { background: var(--pessego); } .atalhos button:nth-child(5n+2) { background: var(--lavanda); }
.atalhos button:nth-child(5n+3) { background: var(--menta); } .atalhos button:nth-child(5n+4) { background: var(--sol); } .atalhos button:nth-child(5n+5) { background: var(--chiclete); }

.barra { display: flex; align-items: flex-end; gap: 8px; margin: 8px 12px 10px; padding: 6px; background: var(--card); border-radius: 30px; box-shadow: var(--sombra); }
.barra textarea { flex: 1; resize: none; border: 0; padding: 11px 6px; font: inherit; background: none; color: var(--texto); max-height: 120px; min-height: 44px; outline: none; }
.barra .foto { width: 44px; height: 44px; font-size: 20px; flex: none; box-shadow: none; background: var(--fundo); }
.redondo { width: 46px; height: 46px; flex: none; border-radius: 50%; border: 0; background: var(--grad); color: #fff; font-size: 19px; display: grid; place-items: center; box-shadow: 0 8px 18px rgba(255,79,139,.35); }
.redondo[hidden] { display: none; }
.redondo.gravando { background: var(--erro); animation: pulsa 1.2s infinite; }
@keyframes pulsa { 0% { box-shadow: 0 0 0 0 rgba(217,45,74,.5); } 100% { box-shadow: 0 0 0 16px rgba(217,45,74,0); } }

.lista-aba { overflow-y: auto; padding: 8px 14px 24px; }
.lista-aba h2 { margin: 6px 0 14px; font-size: 26px; letter-spacing: -.5px; }
.lista-aba h3 { margin: 22px 0 8px; font-size: 16px; }
.item { display: flex; align-items: center; gap: 10px; background: var(--card); border-radius: 18px; padding: 12px 12px 12px 14px; margin-bottom: 8px; box-shadow: var(--sombra); }
.item > div { flex: 1; min-width: 0; }
.item small { display: block; color: var(--texto2); font-size: 13px; }
.x { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--fundo); color: var(--texto2); }
.x.ok { background: var(--menta); color: #1b7a47; font-weight: 800; }
.cartoes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.cartoes div { border-radius: 20px; padding: 14px; }
.cartoes div:first-child { background: var(--pessego); } .cartoes div:last-child { background: var(--menta); }
.cartoes small { display: block; font-size: 13px; opacity: .75; }
.cartoes b { font-family: var(--titulo); font-size: 23px; }
.barra-cat { display: grid; grid-template-columns: 110px 1fr auto; align-items: center; gap: 10px; font-size: 14px; margin: 8px 0; }
.barra-cat span { text-transform: capitalize; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.barra-cat i { height: 12px; border-radius: 99px; background: var(--grad); display: block; }
.vazio { text-align: center; padding: 34px 16px; color: var(--texto2); background: var(--card); border-radius: 24px; box-shadow: var(--sombra); }
.vazio span { font-size: 44px; display: block; }
.vazio b { color: var(--texto); display: block; margin: 8px 0 4px; font-size: 18px; font-family: var(--titulo); }
.vazio p { margin: 0 0 16px; }
.dica { color: var(--texto2); font-size: 14px; }
.btn-sec { background: var(--tinta); color: #fff; border: 0; border-radius: 99px; padding: 10px 18px; font-weight: 700; }

.abas { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0 12px calc(env(safe-area-inset-bottom) + 10px); background: var(--tinta); border-radius: 26px; padding: 6px; }
.abas button { background: none; border: 0; padding: 7px 0 6px; font-size: 11.5px; font-weight: 600; color: #b9aec4; display: flex; flex-direction: column; align-items: center; gap: 1px; border-radius: 20px; }
.abas button span { font-size: 20px; filter: grayscale(1) brightness(1.6); opacity: .7; }
.abas button.ativa { color: #fff; background: rgba(255,255,255,.12); }
.abas button.ativa span { filter: none; opacity: 1; }

@media (min-width: 760px) { .tela-app { max-width: 520px; margin: 0 auto; } }

/* ---------- entrar ---------- */
.tela-auth { display: grid; place-items: center; min-height: 100dvh; padding: 20px 16px; background: radial-gradient(60% 50% at 10% 0%, var(--pessego), transparent), radial-gradient(60% 50% at 100% 100%, var(--lavanda), transparent), var(--fundo); }
.auth { width: 100%; max-width: 390px; background: var(--card); border-radius: 30px; padding: 28px 24px; box-shadow: 0 30px 70px rgba(35,26,46,.12); }
.auth-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--texto); margin-bottom: 18px; font-family: var(--titulo); font-size: 18px; }
.auth-logo img { border-radius: 16px; }
.auth h1 { margin: 0 0 4px; font-size: 28px; letter-spacing: -.6px; line-height: 1.1; }
.sub { color: var(--texto2); margin: 0 0 18px; }
.auth label { display: block; font-size: 14px; font-weight: 700; margin-bottom: 12px; }
.auth input { display: block; width: 100%; margin-top: 6px; padding: 13px 16px; font: inherit; border: 2px solid transparent; border-radius: 16px; background: var(--fundo); color: var(--texto); }
.auth input:focus { outline: none; border-color: var(--rosa); }
.btn-grande { width: 100%; background: var(--grad); color: #fff; border: 0; border-radius: 18px; padding: 15px; font-size: 17px; font-weight: 800; margin-top: 6px; box-shadow: 0 12px 26px rgba(255,79,139,.35); }
.erro { background: var(--chiclete); color: var(--erro); padding: 11px 14px; border-radius: 14px; margin-bottom: 12px; font-size: 14px; }
.troca { text-align: center; margin: 16px 0 0; font-size: 14px; color: var(--texto2); }
.codigo { font-family: ui-monospace, monospace; font-size: 13px; word-break: break-all; }
.copiar { display: inline-block; margin-top: 6px; background: var(--tinta); color: #fff; border: 0; border-radius: 99px; padding: 6px 13px; font-size: 13px; font-weight: 700; }

/* ---------- conceito geladeira (aprovado 29/10) ---------- */
h1, h2, h3, .topo-nome b, .vazio b, .cartoes b { font-weight: 400; }
.topo img { border-radius: 12px; box-shadow: none; }
.selo { background: var(--card); color: var(--texto); border: 2px solid var(--tinta); }
.selo.pro { background: var(--amarelo); color: var(--tinta); border-color: var(--tinta); }
.msg.eu { background: var(--amarelo); color: var(--tinta); box-shadow: 0 10px 18px -10px rgba(60,40,10,.45); border-radius: 4px 4px 4px 4px; transform: rotate(-.6deg); font-family: var(--mao); font-size: 22px; line-height: 1.15; padding: 10px 14px 4px; }
.msg.eu small { font-family: Figtree, system-ui, sans-serif; }
.msg.eu:nth-child(3n+1) { transform: rotate(.7deg); }
.msg.eu .tag-audio { font-family: Figtree, system-ui, sans-serif; font-size: 12px; }
.msg.ele { border-radius: 18px 18px 18px 6px; }
.redondo, .btn-msg, .btn-grande, .copiar, .faixa button { background: var(--tinta); color: #fff; box-shadow: 3px 3px 0 var(--vermelho); }
.btn-grande { border-radius: 16px; }
.redondo.gravando { background: var(--vermelho); box-shadow: none; }
.digitando span, .digitando span:nth-child(2), .digitando span:nth-child(3) { background: var(--tinta); }
.barra-cat i { background: var(--tinta); }
.cartoes div:first-child { background: var(--amarelo); } .cartoes div:last-child { background: #b9eda0; }
.cartoes div, .cartoes b { color: #1d1b19; }
.atalhos button { color: #1d1b19; border-radius: 4px; box-shadow: 0 6px 10px -6px rgba(60,40,10,.4); font-family: var(--mao); font-size: 19px; font-weight: 700; padding: 6px 14px; }
.atalhos button:nth-child(odd) { transform: rotate(-1.5deg); } .atalhos button:nth-child(even) { transform: rotate(1.5deg); }
.atalhos { padding-top: 8px; padding-bottom: 6px; }
.faixa { background: var(--amarelo); color: var(--tinta); border-radius: 6px; transform: rotate(-.4deg); }
.abas { background: var(--tinta); }
.abas button.ativa { background: var(--amarelo); color: var(--tinta); }
.abas button.ativa span { filter: none; }
.x.ok { background: #b9eda0; color: #1d1b19; }
.tela-auth { background: linear-gradient(100deg, #fbfaf6 0%, #f1ede4 45%, #fbfaf6 55%, #ece7dc 100%); }
.auth { border-radius: 24px; box-shadow: 0 1px 0 #dcd5c7, 0 30px 60px rgba(60,45,20,.12); }
.auth input:focus { border-color: var(--tinta); }
.lista-aba h2 { letter-spacing: -.5px; }
.hoje-cab { display: flex; justify-content: space-between; align-items: baseline; margin-top: 4px; }
.hoje-cab h3 { margin: 0 0 6px; } .hoje-cab span { font-size: 14px; color: var(--texto2); font-weight: 600; }
.progresso { height: 8px; border-radius: 99px; background: var(--borda); overflow: hidden; margin-bottom: 12px; }
.progresso i { display: block; height: 100%; background: #2fbf71; transition: width .4s; }
.chk { flex: none; width: 32px; height: 32px; border-radius: 9px; border: 2.5px solid var(--tinta); background: var(--card); color: #fff; font-weight: 800; font-size: 17px; }
.chk.on { background: #2fbf71; border-color: #2fbf71; }
.item.feito b { text-decoration: line-through; opacity: .55; }
.adiar { flex: none; border: 0; background: var(--amarelo); color: #1d1b19; font-weight: 800; border-radius: 99px; padding: 7px 12px; font-size: 13px; }
.cartao-dica { color: #1d1b19; padding: 16px 16px 14px; margin: 18px 4px 6px; transform: rotate(-1deg); box-shadow: 0 14px 20px -12px rgba(60,40,10,.45); position: relative; max-width: 420px; align-self: center; }
.cartao-dica::before { content: ""; position: absolute; top: -9px; left: 50%; width: 20px; height: 20px; margin-left: -10px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff8, transparent 40%), #ff5c5c; box-shadow: 0 3px 5px rgba(0,0,0,.25); }
.cartao-dica small { display: block; font-size: 11px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; opacity: .55; }
.cartao-dica b { display: block; font-family: var(--mao); font-size: 26px; line-height: 1.1; margin: 2px 0 4px; }
.cartao-dica p { margin: 0 0 10px; font-size: 15px; }
.cartao-dica a { display: inline-block; background: #1d1b19; color: #fff; text-decoration: none; font-weight: 800; font-size: 14px; padding: 8px 14px; border-radius: 12px; box-shadow: 3px 3px 0 #ff5c5c; }
.marcas { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.marcas button { border: 2px solid var(--tinta); background: var(--card); color: var(--texto); border-radius: 99px; padding: 6px 12px; font-weight: 700; font-size: 14px; }
