/* Telas de acesso (login e recuperação de senha).
   As cores saem das variáveis do tema da platform, injetadas em layouts/auth.blade.php. */

:root {
    --auth-primary: var(--mdc-theme-primary, #0e4ead);
    --auth-secondary: var(--mdc-theme-secondary, #018786);
    --auth-primary-rgb: 14, 78, 173;
    --auth-secondary-rgb: 1, 135, 134;
    --auth-text: #1f2937;
    --auth-text-muted: #6b7280;
    --auth-bg: #f4f5f7;
    --auth-border: #e5e7eb;
    --auth-border-strong: #d9dde3;
    --auth-radius: 12px;
    --auth-radius-sm: 8px;
}

* { box-sizing: border-box; }

html, body { height: 100%; margin: 0; }

body {
    font-family: Inter, Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    color: var(--auth-text);
    background: var(--auth-bg);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--auth-text); }

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

/* ---------------------------------------------------------------- Painel da marca */

.auth-brand {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px 56px;
    color: #fff;
    background-color: var(--auth-primary);
    background-image:
        radial-gradient(circle at 85% 12%, rgba(var(--auth-secondary-rgb), .45), transparent 55%),
        linear-gradient(145deg, rgba(255, 255, 255, .18) 0%, rgba(255, 255, 255, 0) 48%, rgba(0, 0, 0, .3) 100%);
}

.auth-brand::after {
    content: "";
    position: absolute;
    right: -140px;
    bottom: -140px;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .1);
}

.auth-brand__logo {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    position: relative;
    z-index: 1;
}

.auth-brand__logo img {
    width: auto;
    max-width: 84px;
    max-height: 60px;
    object-fit: contain;
    background: #fff;
    border-radius: 16px;
    padding: 8px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .12);
}

.auth-brand__name { display: block; font-size: 17px; font-weight: 600; color: #fff; }
.auth-brand__tagline { display: block; font-size: 13px; color: rgba(255, 255, 255, .78); }

.auth-brand__content { position: relative; z-index: 1; max-width: 440px; }

.auth-brand__title {
    margin: 0 0 14px;
    font-size: 34px;
    line-height: 1.2;
    font-weight: 600;
    letter-spacing: -.02em;
}

.auth-brand__text { margin: 0 0 28px; font-size: 15px; line-height: 1.6; color: rgba(255, 255, 255, .85); }

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

.auth-brand__list li { display: flex; align-items: center; gap: 12px; font-size: 14.5px; }

.auth-brand__list .material-icons {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .18);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    color: #fff;
    flex: none;
}

.auth-brand__footer { position: relative; z-index: 1; font-size: 12.5px; color: rgba(255, 255, 255, .7); }

/* ---------------------------------------------------------------- Formulário */

.auth-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
}

.auth-mobile-logo { display: none; }

.auth-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border: 1px solid var(--auth-border);
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(16, 24, 40, .08);
    padding: 36px 32px;
}

.auth-card__icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(var(--auth-primary-rgb), .1);
    color: var(--auth-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
}

.auth-card__icon .material-icons { font-size: 22px; }

.auth-card__title { margin: 0 0 6px; font-size: 22px; font-weight: 600; letter-spacing: -.01em; }
.auth-card__subtitle { margin: 0 0 26px; color: var(--auth-text-muted); line-height: 1.55; }

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

.auth-field label { display: block; font-size: 13px; font-weight: 500; color: #374151; margin-bottom: 6px; }

.auth-input { position: relative; }

.auth-input .auth-input__icon {
    position: absolute;
    top: 50%;
    left: 13px;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 20px;
    pointer-events: none;
}

.auth-input input,
.auth-input select {
    width: 100%;
    height: 44px;
    padding: 0 44px;
    border: 1px solid var(--auth-border-strong);
    border-radius: var(--auth-radius-sm);
    font: inherit;
    font-size: 14.5px;
    color: var(--auth-text);
    background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.auth-input input::placeholder { color: #9ca3af; }

.auth-input input[readonly] { background: #f3f4f6; color: #4b5563; }

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

.auth-input__toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: #9ca3af;
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.auth-input__toggle .material-icons { font-size: 20px; }

.auth-input__toggle:hover { color: var(--auth-text); background: #f3f4f6; }

.auth-field.has-error .auth-input input,
.auth-field.has-error .auth-input select { border-color: #f1a9a3; }
.auth-field.has-error .auth-input input:focus { box-shadow: 0 0 0 3px rgba(213, 0, 0, .18); }

.auth-field__error { margin-top: 6px; font-size: 13px; color: #b42318; }
.auth-field__hint { margin-top: 6px; font-size: 12.5px; color: var(--auth-text-muted); }

.auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 4px 0 22px;
}

.auth-check { display: inline-flex; align-items: center; gap: 8px; color: #374151; cursor: pointer; }
.auth-check input { width: 16px; height: 16px; accent-color: var(--auth-primary); margin: 0; }

.auth-link { color: var(--auth-primary); font-weight: 500; text-decoration: none; }
.auth-link:hover { text-decoration: underline; }

.auth-button {
    width: 100%;
    height: 46px;
    border: 0;
    border-radius: var(--auth-radius-sm);
    background-color: var(--auth-primary);
    color: #fff;
    font: inherit;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: .02em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: box-shadow .15s ease, background-image .15s ease;
}

.auth-button .material-icons { font-size: 19px; }

.auth-button:hover { background-image: linear-gradient(rgba(0, 0, 0, .14), rgba(0, 0, 0, .14)); }
.auth-button:focus { outline: none; box-shadow: 0 0 0 3px rgba(var(--auth-primary-rgb), .35); }

.auth-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 22px;
    color: var(--auth-text-muted);
    text-decoration: none;
}

.auth-back .material-icons { font-size: 18px; }

.auth-back:hover { color: var(--auth-text); }

.auth-card__footer {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--auth-border);
    text-align: center;
    font-size: 13px;
}

.auth-card__footer a { color: var(--auth-text-muted); text-decoration: none; }
.auth-card__footer a:hover { color: var(--auth-text); text-decoration: underline; }

.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    margin-bottom: 20px;
    border-radius: var(--auth-radius-sm);
    border: 1px solid transparent;
    font-size: 13.5px;
    line-height: 1.5;
}

.auth-alert .material-icons { font-size: 19px; flex: none; }
.auth-alert--success { background: #e8f7ee; border-color: #bbe7cc; color: #14532d; }
.auth-alert--danger { background: #fdecec; border-color: #f8c9c5; color: #7a1d14; }

.auth-copyright { margin-top: 28px; font-size: 12.5px; color: var(--auth-text-muted); text-align: center; }

/* ---------------------------------------------------------------- Responsivo */

@media (max-width: 991px) {
    .auth { grid-template-columns: minmax(0, 1fr); }
    .auth-brand { display: none; }
    .auth-main { justify-content: flex-start; padding-top: 32px; }

    .auth-mobile-logo {
        display: flex;
        align-items: center;
        gap: 12px;
        margin-bottom: 24px;
        text-decoration: none;
    }

    .auth-mobile-logo img { width: auto; max-width: 64px; max-height: 48px; object-fit: contain; }
    .auth-mobile-logo .auth-brand__name { color: var(--auth-text); }
    .auth-mobile-logo .auth-brand__tagline { color: var(--auth-text-muted); }
}

@media (max-width: 480px) {
    .auth-card { padding: 28px 22px; border-radius: 14px; }
    .auth-options { flex-direction: column; align-items: flex-start; }
}
