:root {
    --of-ink: #0b1220;
    --of-navy: #111d35;
    --of-blue: #2563eb;
    --of-blue-dark: #1d4ed8;
    --of-teal: #0f9f8f;
    --of-orange: #f97316;
    --of-surface: #ffffff;
    --of-soft: #f5f7fb;
    --of-line: #dce3ef;
    --of-muted: #667085;
    --of-radius: 18px;
    --of-shadow: 0 22px 70px rgba(15, 23, 42, .13);
}

* { box-sizing: border-box; }

.of-auth-page {
    min-height: 100vh;
    margin: 0;
    color: var(--of-ink);
    background:
        radial-gradient(circle at 8% 5%, rgba(37, 99, 235, .18), transparent 32%),
        radial-gradient(circle at 88% 88%, rgba(15, 159, 143, .14), transparent 30%),
        #eef3fa;
}

.of-auth-shell {
    width: min(1180px, calc(100% - 40px));
    min-height: calc(100vh - 56px);
    margin: 28px auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(430px, .88fr);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .8);
    border-radius: 28px;
    box-shadow: var(--of-shadow);
    background: rgba(255, 255, 255, .8);
}

.of-auth-value {
    position: relative;
    padding: clamp(42px, 6vw, 82px);
    color: #fff;
    background:
        linear-gradient(150deg, rgba(10, 22, 47, .96), rgba(18, 45, 89, .94)),
        var(--of-navy);
    isolation: isolate;
}

.of-auth-value::after {
    content: '';
    position: absolute;
    width: 340px;
    height: 340px;
    right: -140px;
    bottom: -150px;
    border: 70px solid rgba(56, 189, 248, .08);
    border-radius: 50%;
    z-index: -1;
}

.of-auth-brand {
    width: 86px;
    height: 86px;
    display: inline-flex;
    margin-bottom: clamp(50px, 8vh, 88px);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 23px;
    background: #111827;
    box-shadow: 0 16px 36px rgba(0, 0, 0, .28);
}
.of-auth-brand img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: cover;
    filter: none;
}
.of-eyebrow { display: inline-flex; padding: 7px 11px; border: 1px solid rgba(191,219,254,.32); border-radius: 999px; color: #dbeafe; background: rgba(37,99,235,.10); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.of-auth-value h1 {
    max-width: 620px;
    margin: 18px 0 16px;
    color: #ffffff !important;
    text-shadow: 0 2px 14px rgba(0, 0, 0, .18);
    font-size: clamp(34px, 4vw, 57px);
    line-height: 1.03;
    letter-spacing: -.045em;
}
.of-auth-value > p { max-width: 610px; margin: 0; color: #d9e4f2 !important; font-size: 17px; line-height: 1.65; }
.of-auth-benefits { display: grid; gap: 17px; margin-top: 42px; }
.of-auth-benefits > div { display: flex; align-items: center; gap: 14px; color: #e5edf8 !important; }
.of-auth-benefits svg { width: 19px; color: #5eead4; }
.of-auth-benefits span { display: grid; gap: 2px; font-size: 13px; color: #c7d3e4 !important; }
.of-auth-benefits strong { color: #ffffff !important; font-size: 15px; }
.of-auth-value .of-auth-proof { margin-top: 42px; color: #b7c6da !important; font-size: 13px; }

.of-auth-form-side { display: grid; place-items: center; padding: clamp(24px, 5vw, 62px); background: rgba(255,255,255,.94); }
.of-auth-card { width: min(100%, 500px); }
.of-auth-heading > span { color: var(--of-blue); font-size: 12px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.of-auth-heading h2 { margin: 7px 0 5px; color: #0b1220 !important; font-size: clamp(28px, 4vw, 40px); letter-spacing: -.035em; }
.of-auth-heading p { margin: 0 0 28px; color: #59677d !important; font-size: 14px; line-height: 1.55; }
.of-auth-alert { margin: -10px 0 18px; padding: 12px 14px; border: 1px solid #fecaca; border-radius: 12px; color: #991b1b; background: #fff1f2; font-size: 13px; font-weight: 700; }
.of-field { display: grid; gap: 7px; margin-bottom: 15px; color: #17243a !important; font-size: 12px; font-weight: 800; }
.of-field > span { color: #17243a !important; }
.of-field input, .of-field select { width: 100%; height: 47px; padding: 0 13px; border: 1px solid #ccd6e5 !important; border-radius: 11px; outline: none; color: #0b1220 !important; background: #fff !important; font: inherit; font-size: 14px; font-weight: 500; transition: .16s ease; }
.of-field input::placeholder { color: #6b778b !important; opacity: 1; }
.of-field select option { color: #0b1220; background: #fff; }
.of-field input:focus, .of-field select:focus { border-color: var(--of-blue); box-shadow: 0 0 0 4px rgba(37, 99, 235, .10); }
.of-two-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.of-password-tip { display: block; margin: -8px 0 17px; color: var(--of-muted); font-size: 11px; }
.of-check { display: flex; align-items: flex-start; gap: 9px; margin: 4px 0 18px; color: #526078; font-size: 12px; line-height: 1.45; cursor: pointer; }
.of-check input { width: 17px; height: 17px; margin-top: 1px; accent-color: var(--of-blue); flex: 0 0 auto; }
.of-check a, .of-auth-login-link a, .of-auth-row a { color: var(--of-blue-dark); font-weight: 800; text-decoration: none; }
.of-primary-button, .of-secondary-button { min-height: 49px; width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 10px; border-radius: 11px; font-size: 14px; font-weight: 850; text-decoration: none; cursor: pointer; transition: .16s ease; }
.of-primary-button { border: 0; color: #fff; background: linear-gradient(135deg, var(--of-blue), #3b82f6); box-shadow: 0 12px 24px rgba(37, 99, 235, .22); }
.of-primary-button:hover { transform: translateY(-1px); background: linear-gradient(135deg, var(--of-blue-dark), var(--of-blue)); }
.of-secondary-button { border: 1px solid var(--of-line); color: #24324a; background: #fff; }
.of-secondary-button:hover { border-color: #a9b5c8; background: var(--of-soft); }
.of-auth-login-link, .of-security-copy { text-align: center; }
.of-auth-login-link { margin: 17px 0 0; color: var(--of-muted); font-size: 13px; }
.of-security-copy { margin: 15px 0 0; color: #8490a3; font-size: 11px; }
.of-security-copy svg { margin-right: 4px; color: var(--of-teal); }
.of-auth-row { display: flex; justify-content: space-between; margin: -4px 0 19px; font-size: 12px; }
.of-auth-divider { display: flex; align-items: center; gap: 12px; margin: 21px 0; color: #98a2b3; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.of-auth-divider::before, .of-auth-divider::after { content: ''; height: 1px; flex: 1; background: var(--of-line); }
.of-auth-metric { display: flex; flex-wrap: wrap; gap: 25px; margin-top: 42px; color: #c7d3e4 !important; font-size: 12px; }
.of-auth-metric span { display: grid; }
.of-auth-metric strong { color: #fff; font-size: 25px; }
.of-auth-shell-login .of-auth-value { display: flex; flex-direction: column; justify-content: center; }
.of-auth-shell-login .of-auth-brand { margin-bottom: 90px; }
.of-login-card { max-width: 430px; }

@media (max-width: 900px) {
    .of-auth-shell { width: min(100% - 24px, 680px); grid-template-columns: 1fr; margin: 12px auto; }
    .of-auth-value { padding: 36px 28px; }
    .of-auth-brand, .of-auth-shell-login .of-auth-brand { width: 74px; height: 74px; margin-bottom: 32px; border-radius: 20px; }
    .of-auth-value h1 { font-size: 36px; }
    .of-auth-benefits, .of-auth-proof, .of-auth-metric { display: none; }
    .of-auth-form-side { padding: 34px 24px; }
}

@media (max-width: 520px) {
    .of-auth-shell { width: 100%; min-height: 100vh; margin: 0; border-radius: 0; }
    .of-auth-value { padding: 28px 20px; }
    .of-auth-value h1 { font-size: 30px; }
    .of-auth-value > p { font-size: 14px; }
    .of-auth-form-side { padding: 30px 20px 38px; }
    .of-two-fields { grid-template-columns: 1fr; gap: 0; }
}

/* Aplicação autenticada: camada visual v3 sobre os componentes existentes. */
body:not(.of-auth-page):not(.of-onboarding-page) {
    background: #f4f7fb;
}

.app-sidebar {
    background: linear-gradient(180deg, #0d172b 0%, #111d35 100%) !important;
    border-right: 0 !important;
    box-shadow: 12px 0 40px rgba(15, 23, 42, .08);
}

.sidebar-logo { min-height: 86px; padding: 15px 20px !important; }
.sidebar-logo-image { max-width: 168px !important; max-height: 54px !important; filter: brightness(0) invert(1); }
.sidebar-nav { padding: 10px 13px 28px !important; }
.sidebar-primary-action {
    min-height: 44px;
    margin: 2px 2px 17px;
    padding: 0 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border-radius: 11px;
    color: #fff !important;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    box-shadow: 0 10px 24px rgba(37, 99, 235, .3);
    text-decoration: none !important;
    font-size: 13px;
    font-weight: 800;
}
.sidebar-nav-item { min-height: 42px; margin: 2px 0; border-radius: 9px !important; color: #aebbd0 !important; font-size: 13px !important; }
.sidebar-nav-item i, .sidebar-nav-item svg { width: 17px; color: #8192ad; }
.sidebar-nav-item:hover { color: #fff !important; background: rgba(255,255,255,.07) !important; }
.sidebar-nav-item.active { color: #fff !important; background: rgba(59,130,246,.18) !important; box-shadow: inset 3px 0 #60a5fa; }
.sidebar-nav-item.active i, .sidebar-nav-item.active svg { color: #93c5fd; }
.app-header { background: rgba(255,255,255,.9) !important; border-bottom: 1px solid #e5eaf2 !important; backdrop-filter: blur(16px); }
.header-user-avatar { background: linear-gradient(135deg,#111d35,#2563eb) !important; }
.app-main, .main-content { background: transparent !important; }
.of-card { border: 1px solid #e1e7f0 !important; border-radius: 15px !important; box-shadow: 0 9px 28px rgba(15,23,42,.045) !important; }
.of-card-header { border-bottom-color: #edf1f6 !important; }
.btn, button, input, select, textarea { font-family: inherit; }

@media (max-width: 768px) {
    .sidebar-logo-image { max-width: 145px !important; }
}
