/* ================================================
   AUTH — VitrineSites
   ================================================ */

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

:root {
    --brand:        #6366f1;
    --brand-dark:   #4f46e5;
    --text-primary: #18181b;
    --text-muted:   #71717a;
    --border:       #e4e4e7;
    --bg:           #fafafa;
}

html, body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ================================================
   SPLIT LAYOUT
   ================================================ */

.auth-split {
    display: flex;
    min-height: 100vh;
}

/* ===== LEFT BRAND PANEL ===== */
.auth-brand {
    width: 420px;
    flex-shrink: 0;
    background: linear-gradient(160deg, #1e1b4b 0%, #312e81 50%, #4f46e5 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 40px;
    position: relative;
    overflow: hidden;
}

.auth-brand::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -80px;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: rgba(255,255,255,.04);
    pointer-events: none;
}

.auth-brand::after {
    content: '';
    position: absolute;
    bottom: -60px;
    left: -60px;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: rgba(255,255,255,.03);
    pointer-events: none;
}

.auth-brand-inner {
    position: relative;
    z-index: 1;
    max-width: 340px;
}

.auth-brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 48px;
}

.auth-brand-mark {
    width: 42px;
    height: 42px;
    background: rgba(255,255,255,.15);
    border: 1.5px solid rgba(255,255,255,.25);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 16px;
    color: #fff;
    flex-shrink: 0;
}

.auth-brand-mark.small {
    width: 34px;
    height: 34px;
    font-size: 13px;
    background: var(--brand);
    border: none;
}

.auth-brand-name {
    font-size: 20px;
    font-weight: 800;
    color: #fff;
}

.auth-brand-headline {
    font-size: 28px;
    font-weight: 800;
    color: #fff;
    line-height: 1.25;
    margin-bottom: 16px;
    letter-spacing: -.5px;
}

.auth-brand-sub {
    font-size: 14.5px;
    color: rgba(255,255,255,.65);
    line-height: 1.6;
    margin-bottom: 40px;
}

.auth-brand-features {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.auth-feat {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: rgba(255,255,255,.75);
    line-height: 1.3;
}

.auth-feat-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #a5b4fc;
    flex-shrink: 0;
}

/* ===== RIGHT FORM PANEL ===== */
.auth-form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    padding: 40px 24px;
    overflow-y: auto;
}

.auth-form-wrap {
    width: 100%;
    max-width: 400px;
}

/* Mobile logo (hidden on desktop) */
.auth-mobile-logo {
    display: none;
    align-items: center;
    gap: 10px;
    margin-bottom: 28px;
}

.auth-mobile-logo .auth-brand-name { font-size: 18px; color: var(--text-primary); }

/* ================================================
   FORM CONTENT
   ================================================ */

.auth-form-wrap h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.auth-form-wrap > p,
.auth-form-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 28px;
}

/* Form groups */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    color: var(--text-primary);
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(99,102,241,.12);
}

.form-group input::placeholder { color: #a1a1aa; }
.form-group small { font-size: 12px; color: var(--text-muted); margin-top: 4px; display: block; }

/* ================================================
   BUTTONS
   ================================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all .2s;
    text-decoration: none;
    font-family: inherit;
}

.btn-primary {
    background: var(--brand);
    color: #fff;
    box-shadow: 0 2px 8px rgba(99,102,241,.25);
}

.btn-primary:hover {
    background: var(--brand-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(99,102,241,.3);
    text-decoration: none;
}

.btn-block { width: 100%; }

/* ================================================
   ALERTS
   ================================================ */

.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 13.5px;
    margin-bottom: 20px;
    line-height: 1.4;
}

.auth-alert svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }

.auth-alert-error   { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.auth-alert-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }

/* Legacy alert classes (kept for backwards compatibility) */
.alert { padding: 12px 14px; border-radius: 8px; font-size: 13.5px; margin-bottom: 20px; }
.alert-error   { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.alert-warning { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.alert-info    { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }

/* ================================================
   AUTH FOOTER / LINKS
   ================================================ */

.auth-footer {
    margin-top: 20px;
    text-align: center;
    font-size: 13.5px;
    color: var(--text-muted);
}

.auth-footer a { font-weight: 600; }

/* ================================================
   DEMO CREDENTIALS
   ================================================ */

.demo-credentials {
    margin-top: 24px;
    padding: 14px;
    background: #f4f4f5;
    border-radius: 8px;
    font-size: 13px;
}

.demo-credentials p { color: var(--text-primary); font-weight: 600; margin-bottom: 8px; }
.demo-credentials ul { list-style: none; }
.demo-credentials li { color: var(--text-muted); padding: 2px 0; }

/* ================================================
   ESCOLHER (template selection)
   ================================================ */

.auth-form {
    margin-bottom: 0;
}

hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 20px 0;
}

/* ================================================
   RESPONSIVE
   ================================================ */

@media (max-width: 820px) {
    .auth-brand { display: none; }
    .auth-form-panel {
        background: #fff;
        align-items: flex-start;
        padding-top: 48px;
    }
    .auth-mobile-logo { display: flex; }
}

@media (max-width: 480px) {
    .auth-form-panel { padding: 28px 16px; }
    .auth-form-wrap h2 { font-size: 20px; }
}
