body{margin:0;font-family:Segoe UI,Arial;background:linear-gradient(135deg,#081225,#1d4ed8);min-height:100vh;display:grid;place-items:center}.box{width:min(440px,92vw);background:white;border-radius:26px;padding:34px;box-shadow:0 30px 80px rgba(0,0,0,.25)}img{height:70px;max-width:100%;object-fit:contain}.login-label{display:block;margin:12px 0 4px;color:#0f172a;font-weight:700}input,select,button{box-sizing:border-box;width:100%;padding:14px;margin:8px 0;border-radius:14px;border:1px solid #cbd5e1;background:#fff;color:#0f172a;font:inherit}select.login-select{appearance:auto;cursor:pointer;border:2px solid #111827;font-weight:600}button{background:#2563eb;color:#fff;border:0;font-weight:700;cursor:pointer}a{color:#2563eb}.qr-2fa{width:280px;height:auto;max-width:100%;background:#fff;padding:14px;border-radius:16px;image-rendering:pixelated;border:1px solid #e2e8f0}small{display:block;color:#475569}

.login-label{display:block;width:100%;font-weight:700;color:#12213a;margin:10px 0 6px}
.login-label select{width:100%;min-height:46px;border:1px solid #cbd5e1;border-radius:16px;padding:0 14px;background:#fff;color:#0f172a;font-size:15px;outline:none}
.login-label select:focus{border-color:#2563eb;box-shadow:0 0 0 3px rgba(37,99,235,.14)}


/* Patch login seguro: select-box sem credenciais no HTML */
.login-label{display:block;margin:14px 0 8px;font-weight:700;color:#13213a}
#tipo_acesso{width:100%;border:1px solid #cbd5e1;border-radius:14px;padding:14px 16px;font:inherit;background:#fff;color:#0f172a;outline:none}
#tipo_acesso:focus{border-color:#2563eb;box-shadow:0 0 0 4px rgba(37,99,235,.12)}
.qr-2fa{width:320px;max-width:100%;background:#fff;padding:18px;border-radius:18px;image-rendering:pixelated;box-shadow:0 18px 40px rgba(15,23,42,.14)}

.qr-2fa-large{width:min(440px,100%);min-width:320px;height:auto;padding:22px;border:2px solid #cbd5e1;box-sizing:border-box;image-rendering:pixelated}.twofa-setup{display:grid;justify-items:center;gap:12px}.twofa-secret{word-break:break-all;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;background:#f8fafc;padding:10px;border-radius:10px}

/* RCB2_GLOBAL_THEME_START */

/* =========================================================
   RCB2 Flow — logo responsiva e modo claro/escuro
   ========================================================= */

:root {
    color-scheme: light;

    --rcb2-bg: #f4f7fb;
    --rcb2-surface: #ffffff;
    --rcb2-surface-secondary: #f8fafc;
    --rcb2-text: #0f172a;
    --rcb2-text-muted: #64748b;
    --rcb2-border: #dbe3ef;
    --rcb2-input: #ffffff;
    --rcb2-shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
    --rcb2-sidebar: #08142d;
    --rcb2-primary: #2563eb;
}

html[data-theme="dark"] {
    color-scheme: dark;

    --rcb2-bg: #070d1b;
    --rcb2-surface: #101a2e;
    --rcb2-surface-secondary: #17233a;
    --rcb2-text: #f1f5f9;
    --rcb2-text-muted: #a8b3c7;
    --rcb2-border: #2b3a55;
    --rcb2-input: #111c31;
    --rcb2-shadow: 0 18px 50px rgba(0, 0, 0, 0.38);
    --rcb2-sidebar: #050a16;
    --rcb2-primary: #4f7cff;
}

/* Logo sem fundo e proporcional */
img[src*="logo-rcb2flow"],
.logo img,
.logo-header img,
.logo-footer img,
.brand img,
.sidebar .brand img,
header img[alt*="RCB2"],
header img[alt*="rcb2"] {
    display: block !important;
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

/* Barra lateral */
.brand,
.sidebar .brand {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    min-height: 72px;
}

.brand img,
.sidebar .brand img {
    width: clamp(105px, 10vw, 155px) !important;
    max-height: 68px !important;
    flex: 0 0 auto;
}

/* Cabeçalho e landing page */
.logo-header img,
header .logo img {
    width: clamp(170px, 22vw, 310px) !important;
    max-height: 105px !important;
}

/* Rodapé */
.logo-footer img,
footer .logo img {
    width: clamp(155px, 18vw, 250px) !important;
    max-height: 90px !important;
}

/* Login */
.login-card > img,
.login-container > img,
.auth-card > img,
body.login-page img[src*="logo-rcb2flow"] {
    width: clamp(155px, 28vw, 255px) !important;
    max-height: 105px !important;
    margin-inline: auto !important;
}

/* Transição visual do tema */
html,
body,
.app,
.main,
.sidebar,
.card,
.modal,
section,
header,
footer,
nav,
table,
thead,
tbody,
tr,
td,
th,
input,
select,
textarea,
button {
    transition:
        background-color 0.22s ease,
        color 0.22s ease,
        border-color 0.22s ease,
        box-shadow 0.22s ease;
}

/* Aplicação global do modo escuro */
html[data-theme="dark"] body {
    background: var(--rcb2-bg) !important;
    color: var(--rcb2-text) !important;
}

html[data-theme="dark"] .main,
html[data-theme="dark"] main,
html[data-theme="dark"] .content,
html[data-theme="dark"] .page-content,
html[data-theme="dark"] .dashboard-content {
    background-color: var(--rcb2-bg) !important;
    color: var(--rcb2-text) !important;
}

html[data-theme="dark"] .card,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .box,
html[data-theme="dark"] .modal-content,
html[data-theme="dark"] .support-card,
html[data-theme="dark"] .hero-panel,
html[data-theme="dark"] .table-wrap,
html[data-theme="dark"] form {
    background-color: var(--rcb2-surface) !important;
    color: var(--rcb2-text) !important;
    border-color: var(--rcb2-border) !important;
    box-shadow: var(--rcb2-shadow);
}

html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4,
html[data-theme="dark"] h5,
html[data-theme="dark"] h6,
html[data-theme="dark"] label,
html[data-theme="dark"] strong,
html[data-theme="dark"] span,
html[data-theme="dark"] p {
    color: inherit;
}

html[data-theme="dark"] small,
html[data-theme="dark"] .muted,
html[data-theme="dark"] .subtitle,
html[data-theme="dark"] .description {
    color: var(--rcb2-text-muted) !important;
}

html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
    background-color: var(--rcb2-input) !important;
    color: var(--rcb2-text) !important;
    border-color: var(--rcb2-border) !important;
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
    color: #8592a8 !important;
}

html[data-theme="dark"] table,
html[data-theme="dark"] thead,
html[data-theme="dark"] tbody,
html[data-theme="dark"] tr,
html[data-theme="dark"] td,
html[data-theme="dark"] th {
    color: var(--rcb2-text) !important;
    border-color: var(--rcb2-border) !important;
}

html[data-theme="dark"] thead,
html[data-theme="dark"] th {
    background-color: var(--rcb2-surface-secondary) !important;
}

html[data-theme="dark"] tr:hover td {
    background-color: rgba(79, 124, 255, 0.08) !important;
}

html[data-theme="dark"] .sidebar,
html[data-theme="dark"] aside {
    background-color: var(--rcb2-sidebar) !important;
}

html[data-theme="dark"] a {
    color: #79a2ff;
}

/* Botão flutuante de tema */
.rcb2-theme-toggle {
    position: fixed;
    top: 16px;
    right: 18px;
    z-index: 99999;

    width: 44px;
    height: 44px;
    padding: 0;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border: 1px solid var(--rcb2-border);
    border-radius: 999px;
    background: var(--rcb2-surface);
    color: var(--rcb2-text);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.18);

    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.rcb2-theme-toggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.24);
}

.rcb2-theme-toggle:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.35);
    outline-offset: 3px;
}

@media (max-width: 768px) {
    .brand img,
    .sidebar .brand img {
        width: clamp(92px, 30vw, 125px) !important;
        max-height: 58px !important;
    }

    .logo-header img,
    header .logo img {
        width: clamp(155px, 48vw, 220px) !important;
        max-height: 82px !important;
    }

    .logo-footer img,
    footer .logo img {
        width: clamp(145px, 42vw, 200px) !important;
        max-height: 74px !important;
    }

    .rcb2-theme-toggle {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
    }
}

/* RCB2_GLOBAL_THEME_END */

/* RCB2_MOBILE_LOGIN_PRO */
@media(max-width:900px){
  body{position:relative;overflow-x:hidden;isolation:isolate;background:radial-gradient(circle at 82% 13%,#1588a86a,transparent 38%),linear-gradient(150deg,#071b32,#0b3358 68%,#082039)!important;padding:calc(20px + env(safe-area-inset-top)) 14px calc(20px + env(safe-area-inset-bottom));}
  body:before{content:"";position:fixed;z-index:-1;inset:0;background:linear-gradient(90deg,#c8f8ff0a 1px,transparent 1px),linear-gradient(#c8f8ff0a 1px,transparent 1px);background-size:32px 32px;mask-image:linear-gradient(transparent,#000 28%,transparent);}
  .login{width:100%;display:grid;place-items:center;}
  .box{width:min(100%,460px);padding:clamp(24px,6vw,38px)!important;border:1px solid #ffffff80;border-radius:24px!important;background:#fffffffa!important;box-shadow:0 28px 80px #03121d80!important;}
  .box>img{display:block;max-width:210px!important;max-height:84px!important;height:auto!important;margin:0 auto 18px;}
  .box h1{font-size:clamp(23px,6vw,29px);letter-spacing:-.045em;line-height:1.15;margin:0 0 9px;color:#0d2841;}
  .box>p{font-size:14px;line-height:1.5;color:#597184;margin-bottom:22px;}
  .box :is(input,select){min-height:50px;border-radius:13px;font-size:16px;}
  .box button{min-height:52px;border-radius:13px;background:linear-gradient(105deg,#1262b0,#0998af);box-shadow:0 13px 23px #1877a333;}
  .box a{display:inline-block;margin-top:12px;font-weight:700;color:#12649c;}
}
