/* ============================================================================
   Telas de autenticação — a etiqueta de lavanderia
   À esquerda, um painel de tinta com a logo como ela foi desenhada (branca) e
   uma etiqueta manila pendurada pelo furo: os campos impressos nela são as três
   perguntas que o sistema responde. À direita, o formulário em papel.
   Os tokens `--ut-*` vêm de shared.css, carregada antes desta folha.
   ========================================================================= */

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

html, body { height: 100%; }

body {
    font-family: var(--ut-fonte);
    color: var(--ut-tinta);
    background: var(--ut-algodao);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* ---- Estrutura ---------------------------------------------------------- */

.auth-split {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
}

.auth-center {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
}

/* ---- O painel da etiqueta ---------------------------------------------- */

.auth-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 32px;
    padding: 44px 52px 52px;
    background: var(--ut-tinta);
    color: #fff;
}

.hero-logo { width: 150px; height: auto; align-self: flex-start; }

.hero-palco {
    flex: 1;
    display: grid;
    place-items: center;
    min-height: 300px;
}

/* A etiqueta balança uma vez, a partir do furo, e para — é a única coisa que se mexe. */
.hero-pendurada {
    position: relative;
    transform: rotate(-6deg);
    transform-origin: 26px 50%;
    animation: hero-balanco 1.6s cubic-bezier(.3, 1.4, .5, 1) both;
}

.hero-cordao {
    position: absolute;
    left: -194px;
    bottom: 50%;
    width: 220px;
    height: 260px;
    overflow: visible;
}

.hero-cordao path { stroke: rgba(239, 227, 194, .55); stroke-width: 1.6; }

.hero-etiqueta {
    width: min(420px, 62vw);
    padding: 26px 30px 26px 64px;
    background: var(--ut-manila);
    color: var(--ut-tinta);
    border-radius: 0 12px 12px 0;
    clip-path: polygon(30px 0, 100% 0, 100% 100%, 30px 100%, 0 calc(100% - 26px), 0 26px);
    -webkit-mask: radial-gradient(circle 8px at 26px 50%, transparent 96%, #000 100%);
    mask: radial-gradient(circle 8px at 26px 50%, transparent 96%, #000 100%);
}

.hero-etiqueta-numero {
    display: inline-flex;
    align-items: stretch;
    font-family: var(--ut-mono);
    font-size: 30px;
    line-height: 1;
}

.hero-etiqueta-numero .pfx { color: var(--ut-manila-tinta); padding: 10px 14px 10px 0; }
.hero-etiqueta-numero .seq { font-weight: 600; letter-spacing: .02em; padding: 10px 16px 10px 0; }
.hero-etiqueta-numero .dv { background: var(--ut-tinta); color: var(--ut-manila); font-weight: 600; padding: 10px 14px; }

.hero-etiqueta-campos {
    display: grid;
    gap: 12px;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1.5px dashed rgba(122, 106, 63, .45);
}

.hero-etiqueta-campos .campo { display: flex; align-items: center; gap: 12px; min-height: 18px; }

.hero-etiqueta-campos .rotulo {
    width: 72px;
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 700;
    font-stretch: 75%;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--ut-manila-tinta);
}

.hero-etiqueta-campos .linha { flex: 1; border-bottom: 1.5px solid rgba(25, 27, 34, .35); height: 12px; }

.hero-etiqueta-campos .riscos { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 4px; gap: 3px; height: 16px; }
.hero-etiqueta-campos .riscos i { background: rgba(25, 27, 34, .18); border-radius: 1px; }
.hero-etiqueta-campos .riscos i.on { background: var(--ut-tinta); }

.hero-etiqueta-campos .conta { font-family: var(--ut-mono); font-size: 12.5px; font-weight: 600; }

.hero-copy { max-width: 34rem; }

.hero-title {
    font-family: var(--ut-fonte);
    font-stretch: 125%;
    font-weight: 800;
    font-size: clamp(30px, 3.2vw, 44px);
    line-height: 1.02;
    letter-spacing: -.02em;
    color: #fff;
}

.hero-sub {
    max-width: 44ch;
    margin-top: 14px;
    font-size: 15.5px;
    line-height: 1.55;
    color: rgba(255, 255, 255, .68);
}

/* ---- O formulário ------------------------------------------------------- */

.auth-form-side {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 32px;
}

.auth-card { width: 100%; max-width: 380px; }

.auth-brand-mobile {
    display: none;
    width: 120px;
    height: 44px;
    margin-bottom: 28px;
    background: var(--ut-tinta);
    -webkit-mask: var(--logo) left center / contain no-repeat;
    mask: var(--logo) left center / contain no-repeat;
}

.auth-heading {
    font-family: var(--ut-fonte);
    font-stretch: 125%;
    font-weight: 800;
    font-size: 34px;
    letter-spacing: -.02em;
    line-height: 1.05;
    color: var(--ut-tinta);
}

.auth-subheading {
    margin: 10px 0 30px;
    font-size: 15px;
    line-height: 1.5;
    color: var(--ut-tinta-2);
}

.auth-field { margin-bottom: 18px; }

.auth-label {
    display: block;
    margin-bottom: 7px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ut-tinta);
}

.auth-input-wrap { position: relative; }

.auth-input {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border: 1px solid var(--ut-costura);
    border-radius: var(--ut-raio);
    background: var(--ut-papel);
    color: var(--ut-tinta);
    font: inherit;
    font-size: 15px;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.auth-input::placeholder { color: var(--ut-tinta-3); }
.auth-input:hover { border-color: var(--ut-tinta-3); }

.auth-input:focus {
    outline: none;
    border-color: var(--ut-carimbo);
    box-shadow: 0 0 0 3px rgba(var(--ut-carimbo-rgb), .18);
}

.auth-input.has-toggle { padding-right: 48px; }

.auth-toggle {
    position: absolute;
    top: 50%;
    right: 6px;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: var(--ut-raio);
    background: transparent;
    color: var(--ut-tinta-3);
    cursor: pointer;
}

.auth-toggle:hover { color: var(--ut-tinta); background: var(--ut-algodao); }
.auth-toggle .material-symbols-outlined { font-size: 20px; }

.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 4px 0 24px;
}

.auth-check {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 14px;
    color: var(--ut-tinta-2);
    cursor: pointer;
    user-select: none;
}

.auth-check input { width: 17px; height: 17px; accent-color: var(--ut-carimbo); cursor: pointer; }

.auth-link { color: var(--ut-carimbo); font-weight: 600; text-decoration: none; }
.auth-link:hover { text-decoration: underline; }

.auth-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 48px;
    border: 0;
    border-radius: var(--ut-raio);
    background: var(--ut-carimbo);
    color: #fff;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .15s ease;
}

.auth-submit:hover { background: var(--ut-carimbo-escuro); }
.auth-submit:active { transform: translateY(1px); }
.auth-submit .material-symbols-outlined { font-size: 20px; }

.auth-alert {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    padding: 12px 14px;
    border: 1px solid rgba(196, 43, 43, .3);
    border-radius: var(--ut-raio);
    background: var(--ut-vencido-claro);
    color: var(--ut-vencido);
    font-size: 14px;
    line-height: 1.45;
}

.auth-alert .material-symbols-outlined { font-size: 18px; margin-top: 1px; flex-shrink: 0; }
.auth-alert ul { margin: 0; padding: 0; list-style: none; }

.field-validation-error {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: var(--ut-vencido);
}

.auth-input.input-validation-error { border-color: var(--ut-vencido); }

.auth-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 36px;
    padding-top: 18px;
    border-top: 1px solid var(--ut-costura);
    font-family: var(--ut-mono);
    font-size: 11px;
    color: var(--ut-tinta-3);
}

.auth-ironbug {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--ut-fonte);
    font-size: 12px;
    color: var(--ut-tinta-3);
    text-decoration: none;
}

.auth-ironbug:hover { color: var(--ut-tinta); }

/* A arte da Ironbug é letreiro branco com o símbolo vermelho, feita para fundo escuro: no papel
   ela vira tinta chapada, como as assinaturas de rodapé. */
.auth-ironbug img { height: 20px; width: auto; filter: brightness(0); opacity: .55; transition: opacity .15s ease; }
.auth-ironbug:hover img { opacity: .9; }

/* ---- Acesso negado ------------------------------------------------------ */

.auth-denied {
    width: 100%;
    max-width: 440px;
    padding: 36px 32px;
    border: 1px solid var(--ut-costura);
    border-radius: var(--ut-raio-folha);
    background: var(--ut-papel);
}

.auth-denied-icon {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    margin-bottom: 22px;
    border-radius: var(--ut-raio);
    background: var(--ut-vencido-claro);
    color: var(--ut-vencido);
}

.auth-denied-icon .material-symbols-outlined { font-size: 32px; }

/* ---- Movimento ---------------------------------------------------------- */

@keyframes hero-balanco {
    0% { transform: rotate(-22deg); }
    100% { transform: rotate(-6deg); }
}

/* ---- Telas estreitas ---------------------------------------------------- */

@media (max-width: 900px) {
    .auth-split { grid-template-columns: 1fr; }
    .auth-hero { display: none; }
    .auth-form-side { padding: 40px 20px; }
    .auth-brand-mobile { display: block; }
    .auth-heading { font-size: 30px; }
}

@media (prefers-reduced-motion: reduce) {
    .hero-pendurada { animation: none; }
    .auth-input, .auth-submit { transition: none; }
}
