/* Remoto — a tela da outra máquina manda; a interface some em volta dela.
   Mesma tinta do Live. Laranja-sinal = ação. */
:root {
  --tinta: #1A1F2E;
  --tinta-2: #222839;
  --tinta-3: #333C55;
  --papel: #EEF0F6;
  --nevoa: #9AA2B8;
  --sinal: #FF7A1A;
  --sinal-forte: #FF9244;
  --tally: #FF3B4E;
  --fonte: system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--tinta);
  color: var(--papel);
  font: 400 1rem/1.5 var(--fonte);
  -webkit-font-smoothing: antialiased;
}
:focus-visible { outline: 2px solid var(--sinal); outline-offset: 2px; }

#entrar { display: grid; place-content: center; gap: 24px; min-height: 100%; padding: 24px; }
.marca { margin: 0; font-size: 1.75rem; font-weight: 800; letter-spacing: -0.02em; }
form { display: flex; flex-direction: column; gap: 8px; width: min(340px, 86vw); }
label { font-size: 0.9375rem; font-weight: 600; }
input:not([type="file"]) {
  height: 44px;
  padding: 0 12px;
  margin-bottom: 8px;
  color: var(--papel);
  background: var(--tinta-2);
  border: 1px solid var(--tinta-3);
  border-radius: 6px;
  font: inherit;
}
#id { font-variant-numeric: tabular-nums; letter-spacing: 0.04em; }
button, .botao, select {
  min-height: 36px;
  padding: 0 12px;
  color: var(--papel);
  background: var(--tinta-2);
  border: 1px solid var(--tinta-3);
  border-radius: 6px;
  font: 600 0.875rem/1 var(--fonte);
  cursor: pointer;
}
button:hover, .botao:hover, select:hover { background: var(--tinta-3); }
.botao { display: inline-flex; align-items: center; }
#conectar { min-height: 44px; margin-top: 4px; color: var(--tinta); background: var(--sinal); border: 0; font-size: 1rem; }
#conectar:hover { background: var(--sinal-forte); }
#conectar:disabled { opacity: 0.6; cursor: wait; }
#aviso { min-height: 1.5em; margin: 4px 0 0; color: var(--sinal-forte); font-size: 0.9375rem; }

#sessao { position: fixed; inset: 0; background: #000; }
#tela {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  outline: 0;
  cursor: crosshair;
  touch-action: none;
}
#estado {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  margin: 0;
  background: rgba(26, 31, 46, 0.72);
  font-weight: 600;
  pointer-events: none;
}

/* A barra fica no topo, encolhida, e abre com o mouse perto */
#barra {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, calc(-100% + 6px));
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100vw - 16px);
  padding: 8px 10px;
  background: var(--tinta);
  border: 1px solid var(--tinta-3);
  border-top: 0;
  border-radius: 0 0 10px 10px;
  transition: transform 0.15s ease;
}
#barra:hover, #barra:focus-within, #barra.aberta { transform: translate(-50%, 0); }
#medidas { color: var(--nevoa); font-size: 0.8125rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sair { color: var(--tinta); background: var(--sinal); border: 0; }
.sair:hover { background: var(--sinal-forte); }

#arquivos {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  width: min(380px, 100vw);
  background: var(--tinta);
  border-left: 1px solid var(--tinta-3);
}
#arquivos header, #arquivos footer { display: flex; align-items: center; gap: 8px; padding: 10px; }
#arquivos header button { flex: none; width: 36px; padding: 0; }
#arq-caminho { flex: 1; overflow: hidden; font-size: 0.8125rem; color: var(--nevoa); white-space: nowrap; text-overflow: ellipsis; direction: rtl; text-align: left; }
#arq-lista { flex: 1; margin: 0; padding: 0; overflow-y: auto; list-style: none; border-block: 1px solid var(--tinta-3); }
#arq-lista button {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 34px;
  align-items: center;
  background: none;
  border: 0;
  border-radius: 0;
  font-weight: 400;
  text-align: left;
}
#arq-lista button:hover { background: var(--tinta-2); }
#arq-lista .pasta { font-weight: 600; }
#arq-lista small { flex: none; color: var(--nevoa); }
#arq-enviar { position: absolute; width: 1px; height: 1px; opacity: 0; }
#arq-progresso { min-width: 0; color: var(--nevoa); font-size: 0.8125rem; }
body.soltando #tela { filter: brightness(0.6); }
