/*
 * Garzi: login e redefinição de senha (resources/views/layouts/auth-garzi.blade.php).
 * Usa as variáveis de public/css/garzi.css (tema claro por padrão, escuro opcional) e estiliza as mesmas
 * classes do formulário do MiniOS (bw-*, ab-*), para as views auth/* servirem a todas as marcas.
 * O painel da marca é sempre escuro (laranja sobre #0D0F12); o lado do formulário segue o tema, claro por padrão.
 * Celular abaixo de 1000px (mesmo corte do login do MiniOS): o painel vira uma barra no topo.
 */

[data-theme="dark"] {
    --gza-err-bg: #2E151B;
    --gza-err-ink: #FF7088;
    --gza-err: #FF7088;
    --gza-ok-bg: #12261B;
    --gza-ok-ink: #4ADE80;
    --gza-input-bg: #171A1F;
}

[data-theme="light"] {
    --gza-err-bg: #FCE8EC;
    --gza-err-ink: #A61E3C;
    --gza-err: #A61E3C;
    --gza-ok-bg: #E3F4EA;
    --gza-ok-ink: #17663A;
    --gza-input-bg: #FFFFFF;
}

.gz-auth [hidden] { display: none !important; }

.gza {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    min-height: 100vh;
    min-height: 100dvh;
}

/* ---------- Painel da marca (sempre escuro) ---------- */
.gza-brand {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 40px;
    padding: 40px 56px;
    background-color: #121519;
    background-image:
        radial-gradient(520px 360px at 50% 46%, rgba(255, 122, 69, 0.12), transparent 70%),
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: auto, 48px 48px, 48px 48px;
    color: #F2F4F7;
    border-right: 1px solid #2A2F37;
}
.gza-brand .gz-logo-sq { fill: #FF7A45; }
.gza-brand .gz-logo-zz { fill: #0D0F12; }
.gza-brand .gz-logo-txt { fill: #F2F4F7; }
.gza-brand .gz-logo-z { fill: #FF7A45; }
.gza-brand .gz-icon-btn { color: #F2F4F7; border-color: rgba(255, 255, 255, 0.18); }
.gza-brand .gz-icon-btn:hover { border-color: #F2F4F7; }
.gza-brand a:focus-visible,
.gza-brand button:focus-visible { outline-color: #FF7A45; }

.gza-top { display: flex; align-items: center; gap: 12px; max-width: 440px; width: 100%; margin: 0 auto; }
.gza-top .gz-icon-btn { margin-left: auto; }
.gz .gza-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    color: #F2F4F7;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
}
.gz .gza-back:hover { color: #FF7A45; }
.gza-logo-sm { display: none; }

.gza-center {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 28px;
    max-width: 440px;
    margin: 0 auto;
    width: 100%;
}
.gza-center .gz-logo { height: 56px; }
.gza-center p {
    font-family: "Space Grotesk", Inter, system-ui, sans-serif;
    font-size: 30px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: #F2F4F7;
    text-wrap: balance;
}
.gza-foot {
    max-width: 440px;
    margin: 0 auto;
    width: 100%;
    font-size: 14px;
    color: #A9B0BB;
}

/* ---------- Formulário ---------- */
.gza-form {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 64px 48px;
    background: var(--bg);
}
.gz-auth .ab-form-in { width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 28px; }
.gz-auth .ab-panel[hidden] { display: none; }
.gz-auth h1,
.gz-auth .bw-disp {
    margin: 0;
    font-family: "Space Grotesk", Inter, system-ui, sans-serif;
    font-size: 34px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.08;
    color: var(--text);
}
.gz-auth .lead { margin: 8px 0 0; color: var(--muted); font-size: 16px; }
.gz-auth form { display: flex; flex-direction: column; gap: 18px; }

.gz-auth .bw-field { display: flex; flex-direction: column; gap: 8px; }
.gz-auth .bw-field > label { font-weight: 600; font-size: 14.5px; color: var(--muted); }
.gz-auth .bw-input { position: relative; }
.gz-auth .bw-input > svg.ico { position: absolute; left: 16px; top: 16px; color: var(--muted); pointer-events: none; }
.gz-auth .bw-input input {
    width: 100%;
    height: 52px;
    border-radius: 0;
    border: 1.5px solid var(--border-strong);
    background: var(--gza-input-bg);
    color: var(--text);
    padding: 0 18px 0 48px;
    font: 500 16px Inter, "Segoe UI", system-ui, sans-serif;
    outline: 0;
    transition: border-color .15s;
}
.gz-auth .bw-input input::placeholder { color: var(--muted); opacity: .75; }
.gz-auth .bw-input input:focus { border: 2px solid var(--focus); padding-left: 47.5px; }
.gz-auth .bw-input input.is-invalid { border-color: var(--gza-err); }
.gz-auth .bw-input .eye {
    position: absolute;
    right: 4px;
    top: 4px;
    width: 44px;
    height: 44px;
    border: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    display: grid;
    place-items: center;
}
.gz-auth .bw-input .eye:hover { background: var(--surface-2); color: var(--text); }

.gz-auth .bw-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 52px;
    padding: 0 24px;
    border: 0;
    border-radius: 0;
    font: 700 16px/1 "Space Grotesk", Inter, system-ui, sans-serif;
    cursor: pointer;
    text-decoration: none;
    transition: background-color .15s ease;
}
.gz-auth .bw-btn--primary { background: var(--accent); color: var(--accent-ink); }
.gz-auth .bw-btn--primary:hover { background: var(--accent-hover); }
.gz-auth .bw-btn--block { width: 100%; }
.gz-auth .bw-btn[disabled] { opacity: .7; cursor: default; }

.gz-auth .bw-link {
    background: none;
    border: 0;
    padding: 0;
    min-height: 44px;
    color: var(--accent-text);
    font: 600 15px Inter, "Segoe UI", system-ui, sans-serif;
    cursor: pointer;
}
.gz-auth .bw-link:hover { text-decoration: underline; }

.gz-auth .bw-alert { display: flex; gap: 10px; align-items: center; padding: 14px 16px; font-weight: 600; font-size: 15px; border-left: 3px solid currentColor; }
.gz-auth .bw-alert--err { background: var(--gza-err-bg); color: var(--gza-err-ink); }
.gz-auth .bw-alert--ok { background: var(--gza-ok-bg); color: var(--gza-ok-ink); }

.gz-auth .ab-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.gz-auth .ab-check { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--muted); cursor: pointer; min-height: 44px; }
.gz-auth .ab-check input { width: 20px; height: 20px; accent-color: var(--accent); }
.gz-auth .ab-alt { display: flex; flex-direction: column; gap: 12px; padding-top: 20px; border-top: 1px solid var(--border); font-size: 15px; color: var(--muted); }
.gz-auth .ab-alt a { font-weight: 700; color: var(--accent-text); }
.gz-auth .ab-or { display: flex; align-items: center; gap: 12px; margin: -8px 0; color: var(--muted); font-size: 14px; }
.gz-auth .ab-or::before,
.gz-auth .ab-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.gz-auth .ab-google { display: flex; justify-content: center; min-height: 44px; }
.gz-auth .ab-field-err { color: var(--gza-err-ink); font-size: 13.5px; font-weight: 600; }
.gz-auth :focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.gz-auth .bw-input input:focus-visible { outline: 0; }

@keyframes gza-spin { to { transform: rotate(360deg); } }
.gz-auth .bw-spin { animation: gza-spin .9s linear infinite; }
@media (prefers-reduced-motion: reduce) {
    .gz-auth .bw-spin { animation: none; }
}

/* ---------- Celular e tablet em pé ---------- */
@media (max-width: 1000px) {
    .gza { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
    .gza-brand {
        padding: 10px max(12px, env(safe-area-inset-right)) 10px max(8px, env(safe-area-inset-left));
        gap: 0;
        border-right: 0;
        border-bottom: 1px solid #2A2F37;
        background-image: none;
    }
    .gza-center,
    .gza-foot { display: none; }
    .gza-top { max-width: none; }
    .gz .gza-back { width: 44px; justify-content: center; }
    .gza-back span { display: none; }
    .gza-logo-sm { display: inline-flex; align-items: center; min-height: 44px; }
    .gza-logo-sm .gz-logo { height: 26px; }
    .gza-form { padding: 32px 24px 48px; align-items: flex-start; }
    .gz-auth h1,
    .gz-auth .bw-disp { font-size: 28px; }
}
