/* Painel de login ornamentado (estilo clássico escuro/dourado). Arte própria em CSS. */
body.login #ui, body.login #ui[role] {
  top: 0; bottom: 0; align-items: center; justify-content: center;
  padding: 16px; flex-direction: column;
}
body.login .pw-card {
  --g1: #f3d78a; --g2: #c99a3e; --g3: #7a5a22;
  position: relative; overflow: visible;
  width: min(360px, calc(100vw - 32px)); max-width: none;
  max-height: none; margin: 0;
  padding: 26px 22px 18px !important;
  border: 1px solid var(--g3) !important; border-radius: 4px !important;
  background:
    radial-gradient(120% 60% at 50% 0%, rgba(201,154,62,.10), transparent 60%),
    linear-gradient(180deg, rgba(22,20,24,.94), rgba(10,10,13,.96));
  box-shadow: 0 0 0 1px #000, 0 0 0 4px rgba(20,16,10,.9), 0 0 0 5px rgba(201,154,62,.55),
    0 24px 60px rgba(0,0,0,.7), inset 0 0 40px rgba(0,0,0,.6);
  backdrop-filter: none; -webkit-backdrop-filter: none;
  font-family: Palatino, "Palatino Linotype", "Book Antiqua", Georgia, serif;
}
body.login .pw-c { position: absolute; width: 18px; height: 18px; pointer-events: none;
  border: 2px solid var(--g1); filter: drop-shadow(0 0 3px rgba(243,215,138,.6)); }
body.login .pw-c::after { content: ""; position: absolute; width: 6px; height: 6px; background: var(--g1); transform: rotate(45deg); }
body.login .pw-c.tl { top: -7px; left: -7px; border-right: 0; border-bottom: 0; }
body.login .pw-c.tr { top: -7px; right: -7px; border-left: 0; border-bottom: 0; }
body.login .pw-c.bl { bottom: -7px; left: -7px; border-right: 0; border-top: 0; }
body.login .pw-c.br { bottom: -7px; right: -7px; border-left: 0; border-top: 0; }
body.login .pw-c.tl::after, body.login .pw-c.bl::after { left: -5px; }
body.login .pw-c.tr::after, body.login .pw-c.br::after { right: -5px; }
body.login .pw-c.tl::after, body.login .pw-c.tr::after { top: -5px; }
body.login .pw-c.bl::after, body.login .pw-c.br::after { bottom: -5px; }

body.login .pw-card h1 {
  margin: 4px 0 2px; font-size: 26px; font-weight: 700; letter-spacing: .22em;
  background: linear-gradient(180deg, #fff3c8, var(--g1) 45%, var(--g2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 2px 0 rgba(0,0,0,.35);
}
body.login .pw-orn { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 0 14px; color: var(--g1); font-size: 9px; }
body.login .pw-orn i { display: block; width: 46px; height: 1px; background: linear-gradient(90deg, transparent, var(--g2)); }
body.login .pw-orn i:last-child { transform: scaleX(-1); }

body.login .pw-recent { text-align: left; margin: 0 0 10px; }
body.login .pw-recent h2, body.login .pw-lbl {
  margin: 0 0 6px; font-size: 10.5px !important; font-weight: 600; letter-spacing: .2em !important;
  text-transform: uppercase; color: #9c8a66 !important;
}
body.login .pw-recent ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
body.login .pw-recent li { position: relative; display: flex; }
body.login .pw-acc {
  flex: 1; display: flex; align-items: center; gap: 10px; text-align: left; cursor: pointer;
  padding: 7px 34px 7px 8px; min-height: 46px;
  background: linear-gradient(180deg, rgba(48,40,26,.75), rgba(26,22,16,.85));
  border: 1px solid rgba(201,154,62,.45); border-radius: 3px; color: #f4ead2; font: inherit;
}
body.login .pw-acc:hover { border-color: var(--g1); }
body.login .pw-av {
  flex: 0 0 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #ffe9a8, var(--g2) 60%, var(--g3));
  color: #2a1d08; font-weight: 700; font-size: 14px; position: relative;
}
body.login .pw-av::after { content: ""; position: absolute; right: -1px; bottom: -1px; width: 8px; height: 8px; border-radius: 50%; background: #5bd36b; border: 2px solid #1a160f; }
body.login .pw-acc-t { display: grid; line-height: 1.2; }
body.login .pw-acc-t strong { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--g1); }
body.login .pw-acc-t small { font-size: 10.5px; color: #a89a7c; }
body.login .pw-x {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 26px; height: 26px; border: 0; background: none; color: #8d7d5c; font-size: 18px; cursor: pointer;
}
body.login .pw-x:hover { color: #ffb4a8; }

body.login .pw-card form { gap: 10px; }
body.login .pw-card form label.pw-lbl { gap: 6px; }
body.login .pw-card .field {
  height: 40px !important; min-height: 40px !important; border-radius: 2px !important;
  background: #0b0b0e !important; border: 1px solid #3a3226 !important; color: #f4ead2 !important;
  font-family: inherit; font-size: 15px !important; letter-spacing: .03em; box-shadow: inset 0 2px 6px rgba(0,0,0,.7);
}
body.login .pw-card .field:focus { outline: none; border-color: var(--g2) !important; box-shadow: inset 0 2px 6px rgba(0,0,0,.7), 0 0 0 1px rgba(201,154,62,.4); }
body.login .pw-card .field::placeholder { color: #5e5444; }
body.login .pw-checks { display: flex; justify-content: space-between; gap: 8px; }
body.login .pw-card form label.lg-check { min-height: 30px; font-size: 12.5px; color: #c8b994; gap: 7px; }
body.login .pw-card .lg-check input { width: 14px; height: 14px; accent-color: var(--g2); }
body.login .pw-card .pw-entrar {
  height: 48px !important; min-height: 48px; margin-top: 6px; border-radius: 2px !important; cursor: pointer;
  border: 1px solid #fff0b8 !important; color: #2a1c06 !important;
  font-family: inherit; font-size: 17px !important; font-weight: 700; letter-spacing: .3em; text-transform: uppercase;
  background: linear-gradient(180deg, #fbe7a6 0%, #e6bf62 45%, #b98a32 55%, #d9ae55 100%) !important;
  box-shadow: 0 0 0 1px #5a3f12, 0 6px 18px rgba(201,154,62,.25), inset 0 1px 0 rgba(255,255,255,.6);
  text-shadow: 0 1px 0 rgba(255,240,200,.6);
}
body.login .pw-card .pw-entrar:hover { filter: brightness(1.08); }
body.login .pw-card .pw-entrar:active { transform: translateY(1px); }
body.login .pw-links { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 8px; margin: 10px 0 0; }
body.login .pw-links button {
  min-height: 30px; padding: 4px; text-decoration: none; cursor: pointer;
  font-family: inherit; font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; color: #c8b994;
}
body.login .pw-links button:hover { color: var(--g1); }
body.login .pw-lang {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(201,154,62,.22);
}
body.login .pw-dot { width: 7px; height: 7px; border-radius: 50%; background: #5ab8ff; box-shadow: 0 0 6px #5ab8ff; }
body.login .pw-lang label { font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: #9c8a66; }
body.login .pw-lang select {
  min-width: 130px; height: 30px; padding: 0 8px; border-radius: 2px; font-family: inherit; font-size: 13px;
  background: #0b0b0e; color: #f4ead2; border: 1px solid #3a3226;
}
body.login .pw-foot {
  position: relative; z-index: 4; margin: 14px 0 0; pointer-events: none;
  font: 11px Palatino, Georgia, serif; letter-spacing: .1em; color: rgba(244,239,228,.6); text-shadow: 0 1px 2px #000;
}
body.login .pw-foot kbd { border: 1px solid rgba(244,239,228,.4); border-radius: 2px; padding: 0 4px; font: inherit; }
body.login #erro, body.login #ok, body.login #continuar { font-size: 12.5px; min-height: 0; }
body.login .lx-nice { top: calc(18px + env(safe-area-inset-top)); }
@media (max-height: 700px) { body.login .lx-nice { display: none; } }
/* vinheta: escurece as bordas, deixa os heróis e o painel em destaque */
body.login::after { content: ""; position: fixed; inset: 0; z-index: 2; pointer-events: none;
  background: radial-gradient(ellipse at 50% 55%, transparent 55%, rgba(0,0,0,.55) 100%); }
body.login .pw-links button + button::before { content: none; }
/* vista de servidores (após login), como no fluxo do pweb: Login -> Servidores -> Seleção */
body.login .pw-srv { text-align: left; }
body.login .pw-srv-sub { margin: 0 0 10px; text-align: center; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: #9c8a66; }
body.login .pw-srv ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
body.login .pw-srv-row { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; text-align: left;
  background: linear-gradient(180deg, rgba(48,40,26,.75), rgba(26,22,16,.85)); border: 1px solid rgba(201,154,62,.45); border-radius: 3px; color: #f4ead2; font: inherit; }
body.login .pw-srv-row:hover, body.login .pw-srv-row:focus-visible { border-color: #f3d78a; outline: none; box-shadow: 0 0 12px rgba(243,215,138,.25); }
body.login .pw-srv-row.off { opacity: .55; cursor: default; }
body.login .pw-srv-t { flex: 1; display: grid; line-height: 1.25; }
body.login .pw-srv-t strong { font-size: 15px; letter-spacing: .14em; text-transform: uppercase; color: #f3d78a; }
body.login .pw-srv-t small { font-size: 11.5px; color: #a89a7c; }
body.login .pw-srv-go { font-size: 22px; color: #c99a3e; }
body.login .pw-srv-dot { width: 10px; height: 10px; border-radius: 50%; background: #777; }
body.login .pw-srv-dot.bom { background: #5bd36b; box-shadow: 0 0 6px #5bd36b; }
body.login .pw-srv-dot.medio { background: #e6c14f; box-shadow: 0 0 6px #e6c14f; }
body.login .pw-srv-dot.ruim { background: #e2763f; box-shadow: 0 0 6px #e2763f; }
body.login .pw-srv-dot.off { background: #a33; }
body.login .pw-srv-links { grid-template-columns: 1fr; margin-top: 12px; }
body.login .pw-card .lg-check input:disabled + * , body.login .pw-card label.lg-check:has(input:disabled) { opacity: .5; }
body.login .pw-card [hidden] { display: none !important; }
body.login .pw-srv-links button { background: none; border: 0; min-height: 30px; cursor: pointer; font: 11.5px Palatino, Georgia, serif; letter-spacing: .16em; text-transform: uppercase; color: #c8b994; }
body.login .pw-srv-links button:hover { color: #f3d78a; }
/* telas baixas (celular deitado): painel compacto, rolável, sem cortar */
@media (max-height: 560px) {
  body.login #ui { justify-content: flex-start; overflow-y: auto; padding: 10px 16px; pointer-events: auto; }
  body.login .pw-card { padding: 14px 18px 10px !important; margin: auto 0; }
  body.login .pw-card h1 { font-size: 19px; margin: 0; }
  body.login .pw-orn { margin-bottom: 6px; }
  body.login .pw-card form { gap: 5px; }
  body.login .pw-card .field { height: 34px !important; min-height: 34px !important; }
  body.login .pw-card .pw-entrar { height: 40px !important; min-height: 40px; margin-top: 2px; }
  body.login .pw-links { margin-top: 4px; }
  body.login .pw-links button { min-height: 26px; }
  body.login .pw-lang { margin-top: 6px; padding-top: 6px; }
  body.login .pw-foot { display: none; }
}
