/* ============================================================
   PsicoSys - auth.css
   Design system para telas de autenticação
   ============================================================ */

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

:root {
    --blue:       #1B4F72;
    --blue-mid:   #2E86C1;
    --blue-light: #EBF5FB;
    --teal:       #17A589;
    --teal-light: #48C9B0;
    --slate:      #2C3E50;
    --muted:      #7F8C8D;
    --border:     #E8ECF0;
    --surface:    #F7F9FC;
    --white:      #FFFFFF;
    --danger:     #C0392B;
    --danger-bg:  #FDEDEC;
    --success:    #1E8449;
    --success-bg: #EAFAF1;
    --text:       #1A252F;
    --text-soft:  #5D6D7E;
    --radius:     10px;
    --radius-lg:  16px;
    --shadow:     0 1px 3px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.04);
}

body.auth-body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--surface);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    color: var(--text);
    font-size: 14px;
    line-height: 1.6;
}

/* Shell dois painéis */
.auth-shell {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    max-width: 960px;
    min-height: 580px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

/* Painel esquerdo */
.auth-brand {
    background: var(--blue);
    padding: 40px 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.auth-brand::before {
    content: '';
    position: absolute;
    bottom: -60px;
    right: -60px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: rgba(255,255,255,0.03);
    pointer-events: none;
}

.brand-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-logo {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 26px;
    font-weight: 400;
    color: #fff;
    letter-spacing: -0.3px;
}

.brand-logo em {
    color: var(--teal-light);
    font-style: normal;
}

.brand-version {
    font-size: 10px;
    font-weight: 500;
    color: rgba(255,255,255,0.35);
    background: rgba(255,255,255,0.08);
    padding: 2px 8px;
    border-radius: 20px;
    letter-spacing: 0.5px;
}

.brand-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 0 24px;
}

.brand-headline {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 26px;
    font-weight: 400;
    color: #fff;
    line-height: 1.3;
    margin-bottom: 14px;
    letter-spacing: -0.3px;
}

.brand-sub {
    font-size: 13px;
    color: rgba(255,255,255,0.55);
    line-height: 1.6;
    margin-bottom: 32px;
    max-width: 280px;
}

.brand-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.brand-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,0.8);
    font-size: 13px;
}

.brand-features svg { flex-shrink: 0; }

.brand-footer {
    font-size: 11px;
    color: rgba(255,255,255,0.25);
}

/* Painel direito */
.auth-form-panel {
    background: var(--white);
    padding: 48px 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0;
    overflow-y: auto;
}

/* Alertas */
.alert {
    border-radius: var(--radius);
    padding: 12px 16px;
    font-size: 13px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.alert-ok {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid #A9DFBF;
}

.alert-erro {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid #F5B7B1;
}

/* Cabeçalho do form */
.form-header { margin-bottom: 28px; }

.form-title {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 22px;
    font-weight: 400;
    color: var(--slate);
    letter-spacing: -0.2px;
    margin-bottom: 4px;
}

.form-subtitle {
    font-size: 13px;
    color: var(--muted);
}

/* Campos */
.field { margin-bottom: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.field label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-soft);
    margin-bottom: 6px;
    letter-spacing: 0.2px;
    text-transform: uppercase;
}

.field input,
.field select {
    width: 100%;
    height: 42px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    font-family: inherit;
    color: var(--text);
    background: var(--white);
    transition: border-color 0.15s, box-shadow 0.15s;
    outline: none;
}

.field input:focus,
.field select:focus {
    border-color: var(--blue-mid);
    box-shadow: 0 0 0 3px rgba(46,134,193,0.12);
}

.field input.erro { border-color: var(--danger); }

/* Input com ícone de olho */
.input-wrapper { position: relative; }
.input-wrapper input { padding-right: 44px; }
.btn-eye {
    position: absolute;
    right: 0;
    top: 0;
    height: 42px;
    width: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--muted);
    border-radius: 0 var(--radius) var(--radius) 0;
}
.btn-eye:hover { color: var(--slate); }

/* Requisitos de senha */
.senha-reqs {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.req-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--muted);
    transition: color 0.2s;
}
.req-item.ok { color: var(--teal); }
.req-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--border);
    flex-shrink: 0;
    transition: background 0.2s;
}
.req-item.ok .req-dot { background: var(--teal); }

/* Botão principal */
.btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 44px;
    background: var(--blue);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    margin-top: 8px;
    letter-spacing: 0.1px;
}

.btn-primary:hover  { background: #154360; }
.btn-primary:active { transform: scale(0.99); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

/* Links de navegação */
.form-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    font-size: 13px;
}

.form-links a {
    color: var(--blue-mid);
    text-decoration: none;
    font-weight: 400;
}
.form-links a:hover { text-decoration: underline; }

.form-divider {
    text-align: center;
    font-size: 12px;
    color: var(--muted);
    margin: 20px 0;
    position: relative;
}

.form-divider::before {
    content: '';
    position: absolute;
    left: 0; right: 0; top: 50%;
    height: 1px;
    background: var(--border);
}

.form-divider span {
    background: var(--white);
    padding: 0 12px;
    position: relative;
}

/* Termos */
.field-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
}
.field-check input[type="checkbox"] { margin-top: 2px; flex-shrink: 0; }
.field-check label { font-size: 12px; color: var(--muted); text-transform: none; font-weight: 400; }
.field-check label a { color: var(--blue-mid); }

/* Responsivo */
@media (max-width: 680px) {
    .auth-shell { grid-template-columns: 1fr; }
    .auth-brand { display: none; }
    .auth-form-panel { padding: 32px 24px; }
    .field-row { grid-template-columns: 1fr; }
}
