* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    min-height: 100%;
}

body.entrar-page {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(160deg, #2c2d2c 0%, #4a4b4a 100%);
    color: #f4f4f4;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
    -webkit-user-select: none;
    user-select: none;
    touch-action: manipulation;
}

.entrar-back {
    position: fixed;
    top: calc(12px + env(safe-area-inset-top));
    left: 14px;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    font-size: 0.9rem;
    z-index: 2;
}

.entrar-wrap {
    width: 100%;
    max-width: 360px;
    text-align: center;
}

.entrar-logo img {
    height: 52px;
    margin-bottom: 12px;
}

.entrar-wrap h1 {
    font-size: 1.45rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.entrar-help {
    font-size: 0.98rem;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.88);
    margin-bottom: 18px;
}

.entrar-display {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    font-weight: 650;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.06em;
    font-size: 2.6rem;
    color: #fff;
}

.entrar-display.is-empty::before {
    content: attr(data-placeholder);
    color: rgba(255, 255, 255, 0.28);
    letter-spacing: 0.12em;
    font-weight: 500;
}

.entrar-code-input {
    display: none;
    border: 0;
    background: transparent;
    outline: none;
    text-align: center;
    caret-color: #fff;
    -webkit-user-select: text;
    user-select: text;
}

body.entrar-code .entrar-display:not(.entrar-code-input) {
    display: none;
}

body.entrar-code .entrar-code-input {
    display: block;
}

.entrar-code-input::placeholder {
    color: rgba(255, 255, 255, 0.28);
    letter-spacing: 0.12em;
    font-weight: 500;
}

body.entrar-code {
    align-items: flex-start;
    padding-top: calc(48px + env(safe-area-inset-top));
}

.entrar-pad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    max-width: 280px;
    margin: 0 auto 18px;
}

.entrar-pad button {
    height: 64px;
    border: 0;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 1.55rem;
    font-weight: 600;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.entrar-pad button:active {
    background: rgba(255, 255, 255, 0.28);
    transform: scale(0.96);
}

.entrar-key-muted {
    font-size: 1.8rem !important;
    font-weight: 400 !important;
    color: rgba(255, 255, 255, 0.8) !important;
}

.entrar-key-ok {
    background: #2c7a7b !important;
}

.entrar-key-ok:active {
    background: #246566 !important;
}

.entrar-submit {
    width: 100%;
    max-width: 280px;
    height: 48px;
    border: 0;
    border-radius: 12px;
    background: #2c7a7b;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}

.entrar-submit:disabled {
    opacity: 0.45;
    cursor: default;
}

.entrar-change {
    display: block;
    margin: 12px auto 0;
    background: none;
    border: 0;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.9rem;
}

.entrar-change[hidden] {
    display: none;
}

.entrar-status {
    min-height: 1.3em;
    margin-top: 12px;
    font-size: 0.9rem;
    color: #f6d186;
}

.entrar-admin {
    display: inline-block;
    margin-top: 18px;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.82rem;
}

@media (max-height: 700px) {
    .entrar-logo img { height: 40px; }
    .entrar-display { min-height: 56px; font-size: 2.1rem; margin-bottom: 12px; }
    .entrar-pad button { height: 54px; }
    .entrar-help { font-size: 0.92rem; }
}
