/* =====================================================================
   Telas de login (aluno e admin): painel da marca + formulário
   ===================================================================== */

.g-auth {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    background: var(--g-bg);
    color: var(--g-text);
}

/* Painel da marca */
.g-auth-brand {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px 56px;
    background:
        radial-gradient(90% 70% at 0% 0%, rgba(var(--g-accent-rgb), .28) 0%, transparent 60%),
        radial-gradient(70% 60% at 100% 100%, rgba(var(--g-accent-rgb), .16) 0%, transparent 60%),
        #0b0b0b;
    color: #f5f5f5;
    border-right: 1px solid var(--g-border);
}

:root[data-theme="light"] .g-auth-brand {
    background:
        radial-gradient(90% 70% at 0% 0%, rgba(var(--g-accent-rgb), .35) 0%, transparent 60%),
        radial-gradient(70% 60% at 100% 100%, rgba(var(--g-accent-rgb), .2) 0%, transparent 60%),
        #18181b;
}

.g-auth-brand::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
    background-size: 48px 48px;
    -webkit-mask-image: radial-gradient(ellipse at 30% 40%, #000 0%, transparent 75%);
    mask-image: radial-gradient(ellipse at 30% 40%, #000 0%, transparent 75%);
    pointer-events: none;
}

.g-auth-brand > * { position: relative; z-index: 1; }

.g-auth-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
}

.g-auth-logo img {
    max-height: 56px;
    max-width: 220px;
    object-fit: contain;
}

.g-auth-logo .marca {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: var(--g-accent);
    color: #0a0a0a;
    font-weight: 800;
    font-size: 1.2rem;
}

.g-auth-logo .nome { font-weight: 700; font-size: 1.05rem; letter-spacing: .2px; }

.g-auth-pitch { max-width: 520px; margin: 48px 0; }

.g-auth-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(var(--g-accent-rgb), .16);
    border: 1px solid rgba(var(--g-accent-rgb), .35);
    color: #fdba74;
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .6px;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.g-auth-headline {
    font-size: clamp(2rem, 3.6vw, 3.1rem);
    line-height: 1.06;
    font-weight: 800;
    letter-spacing: -.035em;
    margin: 0 0 16px;
}

.g-auth-headline em {
    font-style: normal;
    background: linear-gradient(90deg, #fb923c, #f97316 60%, #fdba74);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.g-auth-lead { color: #a3a3a3; font-size: 1.02rem; line-height: 1.6; margin: 0 0 28px; }

.g-auth-features { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }

.g-auth-features li {
    display: flex;
    align-items: center;
    gap: 14px;
    color: #e5e5e5;
    font-weight: 500;
}

.g-auth-features .ic {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .08);
    color: #fb923c;
}

.g-auth-features small { display: block; color: #8a8a8a; font-weight: 400; font-size: .82rem; }

.g-auth-foot { color: #737373; font-size: .8rem; }

/* Formulário */
.g-auth-form {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    position: relative;
}

.g-auth-form-top {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 6px;
    align-items: center;
}

.g-auth-card {
    width: 100%;
    max-width: 400px;
    animation: gPageIn .4s cubic-bezier(.2, .8, .2, 1) both;
}

.g-auth-card h1 {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -.025em;
    margin: 0 0 6px;
}

.g-auth-card .sub { color: var(--g-text-2); margin: 0 0 28px; font-size: .95rem; }

.g-auth-field { margin-bottom: 16px; }

.g-auth-field label {
    display: block;
    font-size: .82rem;
    font-weight: 600;
    color: var(--g-text-2);
    margin-bottom: 6px;
}

.g-auth-field .mud-input-control { margin: 0 !important; }
.g-auth-field .mud-input.mud-input-outlined { background: var(--g-surface); }
.g-auth-field .mud-input-slot { padding-top: 14px !important; padding-bottom: 14px !important; }

.g-auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 4px 0 20px;
    font-size: .88rem;
}

.g-auth-submit.mud-button-root {
    height: 50px;
    font-size: 1rem !important;
    font-weight: 700 !important;
    border-radius: 12px !important;
    background: var(--g-accent-gradient) !important;
    color: var(--g-on-accent) !important;
    box-shadow: 0 10px 30px rgba(var(--g-accent-rgb), .28) !important;
}

:root[data-theme="light"] .g-auth-submit.mud-button-root {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%) !important;
    color: #fff !important;
}

.g-auth-submit.mud-button-root:hover { filter: brightness(1.07); }

.g-auth-note {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    margin-top: 18px;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--g-surface);
    border: 1px solid var(--g-border);
    color: var(--g-text-2);
    font-size: .8rem;
    line-height: 1.45;
}

.g-auth-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 18px;
    margin-top: 26px;
    font-size: .85rem;
}

.g-auth-links a { color: var(--g-accent); text-decoration: none; font-weight: 600; }
.g-auth-links a:hover { text-decoration: underline; }

.g-auth-copy { text-align: center; color: var(--g-text-3); font-size: .75rem; margin-top: 18px; }

/* Logo da unidade no topo do formulário (só no celular) */
.g-auth-mobile-logo { display: none; margin-bottom: 24px; }
.g-auth-mobile-logo img { max-height: 52px; max-width: 200px; object-fit: contain; }

@media (max-width: 959.98px) {
    .g-auth { grid-template-columns: 1fr; }
    .g-auth-brand { display: none; }
    .g-auth-mobile-logo { display: block; }
    .g-auth-form {
        align-items: flex-start;
        padding-top: 72px;
        background: radial-gradient(120% 50% at 50% 0%, rgba(var(--g-accent-rgb), .16) 0%, transparent 70%), var(--g-bg);
    }
}
