@font-face { font-family: "Instrument Serif"; src: url(fontes/InstrumentSerif-Regular.ttf); }
@font-face { font-family: "Geist"; src: url(fontes/Geist-Regular.woff2); font-weight: 400; }
@font-face { font-family: "Geist"; src: url(fontes/Geist-Medium.woff2); font-weight: 500 600; }

/* Marca Carpes Prado: creme, preto, vinho, verde. Interface inspirada no vidro da Apple. */
:root {
  --creme: #f1ecdf; --preto: #121212; --vinho: #4a1f1f; --vinho-claro: #6a2c2c; --verde: #26301f; --cinza: #8f8a80;
  --texto: rgba(241, 236, 223, 0.96); --texto-2: rgba(241, 236, 223, 0.62); --texto-3: rgba(241, 236, 223, 0.4);
  --linha: rgba(241, 236, 223, 0.12); --campo: rgba(241, 236, 223, 0.07);
  --ui: "Inter Tight", "Geist", -apple-system, system-ui, sans-serif;
  --titulo: "Instrument Serif", Georgia, serif;
  --raio: 18px; --raio-p: 10px;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--preto); color: var(--texto); font-family: var(--ui); -webkit-font-smoothing: antialiased; }
#cena { display: block; width: 100vw; height: 100vh; touch-action: none; cursor: grab; }
#cena:active { cursor: grabbing; }
button, input, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.vidro {
  background: rgba(18, 18, 18, 0.58);
  -webkit-backdrop-filter: blur(28px) saturate(170%); backdrop-filter: blur(28px) saturate(170%);
  border: 0.5px solid var(--linha); border-radius: var(--raio);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35), inset 0 0.5px 0 rgba(255, 255, 255, 0.06);
}

/* Topo: logo e relógio */
.topo { position: fixed; top: 16px; left: 16px; padding: 14px 18px; display: grid; gap: 10px; }
.topo-logo { height: 26px; display: block; }
.topo-hora { display: flex; align-items: center; gap: 12px; }
.relogio { font-family: var(--titulo); font-size: 34px; line-height: 1; letter-spacing: -0.5px; font-variant-numeric: tabular-nums; }
.topo-data { display: grid; font-size: 12px; color: var(--texto-2); }
.topo-data #data::first-letter { text-transform: uppercase; }
#data { display: inline-block; }
.topo-periodo { color: var(--texto-3); font-size: 11px; }

/* Painel da equipe */
.painel { position: fixed; top: 16px; right: 16px; width: 316px; max-height: calc(100vh - 100px); overflow-y: auto; padding: 16px; display: grid; gap: 12px; align-content: start; scrollbar-width: none; }
.painel::-webkit-scrollbar { display: none; }
.painel-cabeca { display: flex; align-items: center; justify-content: space-between; }
.painel h1 { margin: 0; font-family: var(--titulo); font-weight: 400; font-size: 28px; letter-spacing: -0.3px; }
.ao-vivo { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 500; letter-spacing: 0.4px; text-transform: uppercase; color: var(--texto-2); }
.ao-vivo-ponto { width: 7px; height: 7px; border-radius: 50%; background: #7fa36b; box-shadow: 0 0 0 0 rgba(127, 163, 107, 0.6); animation: pulso 2s infinite; }
@keyframes pulso { 70% { box-shadow: 0 0 0 7px rgba(127, 163, 107, 0); } 100% { box-shadow: 0 0 0 0 rgba(127, 163, 107, 0); } }
.contagem { font-size: 12px; color: var(--texto-3); margin-top: -8px; }
.grupo { display: grid; gap: 10px; padding: 12px; border-radius: 14px; background: var(--campo); border: 0.5px solid var(--linha); }
.grupo-titulo { font-size: 11px; font-weight: 500; letter-spacing: 0.6px; text-transform: uppercase; color: var(--texto-3); }
.meu-funcao { font-size: 12px; color: var(--texto-2); margin-top: -4px; }

.lista { display: grid; gap: 2px; }
.pessoa { display: flex; gap: 12px; align-items: center; width: 100%; padding: 8px; border: 0; border-radius: 12px; background: transparent; text-align: left; cursor: pointer; transition: background 0.2s var(--ease); }
.pessoa:hover { background: rgba(241, 236, 223, 0.06); }
.meu-topo .pessoa { padding: 0; }
.meu-topo .pessoa:hover { background: none; }
.avatar { position: relative; flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; font-weight: 600; color: var(--creme); box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.2); }
.ponto { position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid #1b1b1b; }
.pessoa-txt { display: grid; min-width: 0; }
.pessoa-nome { font-size: 15px; font-weight: 600; letter-spacing: -0.2px; }
.pessoa-sub { font-size: 12.5px; color: var(--texto-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pessoa-onde { font-size: 11.5px; color: var(--texto-3); }

.campo { display: grid; gap: 5px; font-size: 11px; font-weight: 500; letter-spacing: 0.4px; text-transform: uppercase; color: var(--texto-3); }
.campo input, .campo select, .grupo > input {
  width: 100%; padding: 10px 12px; border-radius: var(--raio-p); border: 0.5px solid var(--linha);
  background: rgba(0, 0, 0, 0.28); color: var(--texto); font-size: 14px; text-transform: none; letter-spacing: 0; appearance: none;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.campo select { background-image: linear-gradient(45deg, transparent 50%, var(--texto-2) 50%), linear-gradient(135deg, var(--texto-2) 50%, transparent 50%); background-position: calc(100% - 17px) 55%, calc(100% - 12px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 30px; }
.campo select option { background: #1b1b1b; }
.campo input:focus, .campo select:focus, .grupo > input:focus { outline: none; border-color: rgba(241, 236, 223, 0.4); background: rgba(0, 0, 0, 0.4); }
.acoes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.botao { padding: 10px 12px; border-radius: var(--raio-p); border: 0.5px solid var(--linha); background: rgba(241, 236, 223, 0.08); color: var(--texto); font-size: 13px; font-weight: 500; cursor: pointer; transition: background 0.2s var(--ease), transform 0.15s var(--ease); }
.botao:hover { background: rgba(241, 236, 223, 0.14); }
.botao:active { transform: scale(0.97); }
.botao.primario { background: var(--creme); color: var(--preto); border-color: transparent; }
.botao.primario:hover { background: #fff; }
.botao.discreto { background: transparent; border: 0; color: var(--texto-3); font-size: 12px; }
.botao.grande { padding: 14px; font-size: 15px; border-radius: 14px; }
.botao[aria-pressed="true"] { background: var(--vinho); }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--creme); outline-offset: 2px; }
.nota { margin: 0; font-size: 11.5px; line-height: 1.4; color: var(--texto-3); }
.aviso { padding: 10px 12px; border-radius: var(--raio-p); background: rgba(192, 80, 77, 0.2); border: 0.5px solid rgba(192, 80, 77, 0.5); font-size: 13px; }

/* Andares: controle segmentado */
.segmentos { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); display: flex; padding: 4px; gap: 2px; border-radius: 14px; }
.segmentos button, .seg button { padding: 8px 16px; border: 0; border-radius: 10px; background: transparent; color: var(--texto-2); font-size: 13px; font-weight: 500; cursor: pointer; transition: background 0.25s var(--ease), color 0.25s var(--ease); }
.segmentos button:hover, .seg button:hover { color: var(--texto); }
.segmentos button[aria-pressed="true"], .seg button[aria-pressed="true"] { background: rgba(241, 236, 223, 0.92); color: var(--preto); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25); }

.chamada { position: fixed; left: 50%; bottom: 82px; transform: translateX(-50%); padding: 14px 24px; border-radius: 999px; border: 0; background: #2f7d4a; color: #fff; font-size: 15px; font-weight: 600; cursor: pointer; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); animation: subir 0.5s var(--ease); }
@keyframes subir { from { opacity: 0; transform: translate(-50%, 12px); } }

/* Criador de boneco */
.criador { position: fixed; inset: 0; display: grid; place-items: center; padding: 16px; background: rgba(8, 8, 8, 0.55); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); z-index: 20; animation: aparecer 0.5s var(--ease); }
@keyframes aparecer { from { opacity: 0; } }
.criador-form { width: min(860px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; padding: 24px; display: grid; gap: 18px; background: rgba(18, 18, 18, 0.82); animation: subirForm 0.6s var(--ease); }
@keyframes subirForm { from { opacity: 0; transform: translateY(24px) scale(0.98); } }
.criador-cabeca { display: grid; gap: 6px; }
.criador-logo { height: 22px; }
.criador h2 { margin: 6px 0 0; font-family: var(--titulo); font-weight: 400; font-size: 34px; letter-spacing: -0.4px; }
.criador p { margin: 0; color: var(--texto-2); font-size: 14px; }
.criador-corpo { display: grid; grid-template-columns: 260px 1fr; gap: 20px; }
.criador-previa { width: 100%; height: 360px; border-radius: 16px; background: radial-gradient(circle at 50% 35%, #2a1a1a, #121212 70%); }
.criador-campos { display: grid; gap: 10px; align-content: start; }
.seg { display: flex; flex-wrap: wrap; gap: 4px; padding: 3px; border-radius: 12px; background: rgba(0, 0, 0, 0.28); border: 0.5px solid var(--linha); }
.seg button { padding: 7px 12px; font-size: 12.5px; }
.seg-roupa { padding: 6px; gap: 8px; }
.seg .amostra { width: 30px; height: 30px; padding: 0; border-radius: 50%; box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.3); }
.seg .amostra[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--preto), 0 0 0 4px var(--creme); }

.carregando { position: fixed; inset: 0; display: grid; place-content: center; gap: 22px; background: var(--preto); z-index: 30; transition: opacity 0.7s var(--ease); }
.carregando img { height: 34px; }
.carregando-barra { height: 2px; border-radius: 2px; background: linear-gradient(90deg, transparent, var(--creme), transparent); background-size: 200% 100%; animation: brilhar 1.4s linear infinite; }
@keyframes brilhar { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.carregando.sumir { opacity: 0; pointer-events: none; }

@media (max-width: 760px) {
  .painel { top: auto; bottom: 76px; left: 12px; right: 12px; width: auto; max-height: 42vh; }
  .topo { top: 12px; left: 12px; }
  .criador-corpo { grid-template-columns: 1fr; }
  .criador-previa { height: 240px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
