/* ===================================================================
   🎨 AUTH PAGES - Estilo idêntico ao protótipo
   =================================================================== */

:root {
    --primary: #0099D6;
    --secondary: #00D1FF;
    --accent: #FBBF24;
    --text: #0f172a;
    --muted: #64748b;
    --bg-start: #f0f9ff;
    --bg-mid: #ffffff;
    --bg-end: #f8fafc;
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    font-family: "Plus Jakarta Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    min-height: max(884px, 100dvh);
    background: radial-gradient(circle at top right, var(--bg-start) 0%, var(--bg-mid) 50%, var(--bg-end) 100%);
}

.page {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

.status-bar {
    height: 48px;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text);
    font-weight: 700;
    font-size: 0.875rem;
}

.status-icons {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-bar {
    padding: 8px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
    color: #64748b;
    cursor: pointer;
    text-decoration: none;
}

.icon-btn:active {
    transform: scale(0.95);
}

.container {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 48px 32px;
    max-width: 420px;
    width: 100%;
    margin: 0 auto;
    justify-content: center;
}

.brand {
    display: flex;
    justify-content: center;
    margin-bottom: 64px;
}

.brand-logo {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 153, 214, 0.35);
}

.brand-logo-large {
    width: 100px;
    height: 100px;
    object-fit: contain;
}

/* UauFabric no MODO ESCURO (esqueci / redefinir a senha): o nome do logo é #0B1020 e some no fundo escuro. Só ESTE
   logo troca pela variante com o nome claro e o cobre da entrada — o seletor casa pela URL, os outros produtos não
   mudam; o segundo seletor casa o src com a versão pelo conteúdo (?v=<hash>). A mesma regra, para entrar e
   cadastrar, está em login.css. */
@media (prefers-color-scheme: dark) {
    img.brand-logo-large[src$="/images/uaufabric_logo.png"],
    img.brand-logo-large[src*="/images/uaufabric_logo.png?"] { content: url("/images/uaufabric_logo_escuro.png"); }
}

.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-top: -48px;
}

.title {
    font-size: 1.875rem;
    font-weight: 800;
    text-align: center;
    margin: 0 0 16px 0;
    color: #0f172a;
}

.subtitle {
    text-align: center;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--muted);
    margin: 0 0 32px 0;
    padding: 0 8px;
}

.message {
    padding: 16px;
    border-radius: 16px;
    margin-bottom: 24px;
    background: rgba(255, 255, 255, 0.7);
    border-left: 6px solid var(--primary);
    box-shadow: 0 10px 25px -5px rgba(148, 163, 184, 0.25);
    font-size: 0.875rem;
    color: #334155;
}

.message.success {
    border-left-color: #22c55e;
}

.message.error {
    border-left-color: #ef4444;
}

.form-group {
    position: relative;
    margin-bottom: 20px;
}

.form-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

.form-input {
    width: 100%;
    border: none;
    outline: none;
    padding: 24px 16px 8px 48px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.06);
    font-size: 1rem;
    color: #0f172a;
}

.form-input:focus {
    box-shadow: 0 0 0 3px rgba(0, 153, 214, 0.2);
}

.form-label {
    position: absolute;
    left: 48px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    color: #94a3b8;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.form-input:focus + .form-label,
.form-input:not(:placeholder-shown) + .form-label {
    top: 10px;
    transform: translateY(0) scale(0.75);
    transform-origin: left top;
    color: var(--primary);
    font-weight: 700;
}

.primary-btn {
    width: 100%;
    border: none;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    min-height: 52px;
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 600;
    background: linear-gradient(90deg, #20A1F1 0%, #1A8CD8 100%);
    box-shadow: 0 8px 20px rgba(32, 161, 241, 0.3);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s ease;
}

.primary-btn:hover:not(:disabled) {
    background: linear-gradient(90deg, #1A8CD8 0%, #1976D2 100%);
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(32, 161, 241, 0.4);
}

.primary-btn:active:not(:disabled) {
    transform: translateY(0);
}

.tip-card {
    margin-top: 32px;
    padding: 20px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.75);
    box-shadow: 0 12px 26px rgba(148, 163, 184, 0.25);
    display: flex;
    gap: 16px;
}

.tip-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(0, 153, 214, 0.1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    flex-shrink: 0;
}

.tip-title {
    margin: 0 0 6px 0;
    font-size: 0.875rem;
    font-weight: 700;
    color: #1e293b;
}

.tip-text {
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.6;
    color: #64748b;
}

.tip-text strong {
    color: var(--primary);
}

.back-link {
    padding-top: 32px;
    text-align: center;
}

.back-link a {
    color: #64748b;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.home-indicator {
    width: 128px;
    height: 6px;
    border-radius: 999px;
    background: #e2e8f0;
    margin: 8px auto 12px;
}

/* ===================================================================
   🌙 DARK MODE — segue prefers-color-scheme (paridade com o app)
   =================================================================== */
@media (prefers-color-scheme: dark) {
    :root {
        --text: #E2E8F0;
        --muted: #94A3B8;
        --bg-start: #16323B;
        --bg-mid: #0F172A;
        --bg-end: #0F172A;
    }

    .icon-btn {
        background: rgba(30, 41, 59, 0.7);
        color: #94A3B8;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    }

    .title { color: #F1F5F9; }

    .message {
        background: rgba(30, 41, 59, 0.85);
        box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
        color: #CBD5E1;
    }

    .form-input {
        background: #28344A;
        box-shadow: 0 6px 14px rgba(0, 0, 0, 0.4);
        color: #F1F5F9;
    }

    .tip-card {
        background: rgba(30, 41, 59, 0.85);
        box-shadow: 0 12px 26px rgba(0, 0, 0, 0.4);
    }
    .tip-title { color: #E2E8F0; }
    .tip-text { color: #94A3B8; }

    .back-link a { color: #94A3B8; }

    .home-indicator { background: #334155; }
}
