/* =====================================================================
   Relox Virtual Lab — Sign-in / account pages
   Used by Login, Forgot password, OTP and Reset pages (Layout = null).
   ===================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --ra-navy-950: #070c18;
    --ra-navy-900: #0d1528;
    --ra-navy-800: #141d32;
    --ra-mint: #0ae88a;
    --ra-primary: #059669;
    --ra-primary-2: #10b981;
    --ra-magenta: #d000d8;
    --ra-text: #0f172a;
    --ra-muted: #64748b;
    --ra-border: #e2e8f0;
}

html, body.rx-auth { height: 100%; }

body.rx-auth {
    margin: 0;
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif !important;
    background: #f4f6fa;
    color: var(--ra-text);
    -webkit-font-smoothing: antialiased;
}
body.rx-auth .dx-widget, body.rx-auth .dx-widget input { font-family: 'Inter', 'Segoe UI', system-ui, sans-serif !important; }

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

/* ---------- Brand panel ---------- */
.rx-auth-brand {
    position: relative;
    overflow: hidden;
    color: #fff;
    padding: 48px 56px;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(1200px 600px at -10% 110%, rgba(10, 232, 138, .22), transparent 60%),
        radial-gradient(800px 500px at 110% -10%, rgba(208, 0, 216, .25), transparent 55%),
        linear-gradient(160deg, var(--ra-navy-800) 0%, var(--ra-navy-950) 100%);
}
/* floating "cells" echoing the logo */
.rx-auth-brand .rx-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(.5px);
    animation: rx-float 14s ease-in-out infinite;
    pointer-events: none;
}
.rx-auth-brand .rx-blob.b1 { width: 320px; height: 320px; right: -80px; top: 18%; background: radial-gradient(circle at 30% 30%, rgba(10, 232, 138, .55), rgba(10, 232, 138, 0) 70%); }
.rx-auth-brand .rx-blob.b2 { width: 120px; height: 120px; right: 22%; top: 9%; background: radial-gradient(circle at 30% 30%, rgba(208, 0, 216, .85), rgba(208, 0, 216, 0) 70%); animation-delay: -4s; }
.rx-auth-brand .rx-blob.b3 { width: 70px; height: 70px; right: 12%; bottom: 22%; background: rgba(226, 232, 240, .16); animation-delay: -8s; }
.rx-auth-brand .rx-blob.b4 { width: 40px; height: 40px; left: 46%; bottom: 12%; background: rgba(226, 232, 240, .22); animation-delay: -2s; }
.rx-auth-brand .rx-grid {
    position: absolute; inset: 0;
    background-image: linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(ellipse at 30% 40%, #000 20%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at 30% 40%, #000 20%, transparent 75%);
    pointer-events: none;
}
@keyframes rx-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-18px, 22px) scale(1.06); }
}

.rx-auth-logo { display: flex; align-items: center; gap: 14px; position: relative; z-index: 1; }
.rx-auth-logo img { width: 52px; height: 52px; border-radius: 50%; box-shadow: 0 0 0 4px rgba(255, 255, 255, .06), 0 10px 30px rgba(10, 232, 138, .25); }
.rx-auth-logo .name { font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.rx-auth-logo .name small { display: block; font-size: .78rem; font-weight: 500; color: #94a3b8; letter-spacing: .02em; }

.rx-auth-hero { margin: auto 0; position: relative; z-index: 1; max-width: 520px; padding: 40px 0; }
.rx-auth-hero .eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: .78rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
    color: var(--ra-mint);
    background: rgba(10, 232, 138, .1);
    border: 1px solid rgba(10, 232, 138, .25);
    padding: 6px 12px; border-radius: 999px;
}
.rx-auth-hero h1 {
    font-size: clamp(2rem, 3.4vw, 3rem);
    font-weight: 800;
    letter-spacing: -.035em;
    line-height: 1.08;
    margin: 20px 0 16px;
    color: #fff;
}
.rx-auth-hero h1 .grad {
    background: linear-gradient(90deg, var(--ra-mint), #6ee7b7 40%, #f0abfc);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.rx-auth-hero p { color: #a8b3c7; font-size: 1.02rem; line-height: 1.6; margin: 0 0 28px; }

.rx-auth-features { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.rx-auth-features li { display: flex; align-items: center; gap: 14px; color: #dbe3ef; font-size: .95rem; font-weight: 500; }
.rx-auth-features li i {
    width: 38px; height: 38px; border-radius: 11px;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .08);
    color: var(--ra-mint); font-size: .95rem; flex-shrink: 0;
}

.rx-auth-help {
    position: relative; z-index: 1;
    display: flex; flex-wrap: wrap; gap: 12px;
}
.rx-auth-help .chip {
    display: flex; align-items: center; gap: 12px;
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 255, 255, .08);
    backdrop-filter: blur(6px);
    padding: 10px 14px; border-radius: 12px;
    font-size: .8rem; color: #a8b3c7;
}
.rx-auth-help .chip i { color: #f0abfc; }
.rx-auth-help .chip b { display: block; color: #fff; font-size: .9rem; font-weight: 600; }

/* ---------- Form panel ---------- */
.rx-auth-main {
    display: flex; align-items: center; justify-content: center;
    padding: 40px 24px;
    background:
        radial-gradient(600px 300px at 100% 0%, rgba(16, 185, 129, .08), transparent 70%),
        radial-gradient(500px 300px at 0% 100%, rgba(192, 38, 211, .06), transparent 70%),
        #f6f8fb;
}
.rx-auth-card {
    width: 100%; max-width: 430px;
    background: #fff;
    border: 1px solid var(--ra-border);
    border-radius: 22px;
    padding: 40px 36px 32px;
    box-shadow: 0 30px 60px -20px rgba(15, 23, 42, .18), 0 2px 6px rgba(15, 23, 42, .04);
    animation: rx-rise .5s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes rx-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.rx-portal-badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 12px 6px 6px; border-radius: 999px;
    background: #ecfdf5; color: #047857;
    font-size: .78rem; font-weight: 700; letter-spacing: .02em;
}
.rx-portal-badge i {
    width: 24px; height: 24px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--ra-primary), var(--ra-primary-2));
    color: #fff; font-size: .7rem;
}
.rx-auth-card h2 { font-size: 1.75rem; font-weight: 800; letter-spacing: -.03em; margin: 18px 0 6px; color: var(--ra-text); }
.rx-auth-card .sub { color: var(--ra-muted); font-size: .95rem; margin: 0 0 28px; }

.rx-field { margin-bottom: 18px; }
.rx-field label { display: block; font-size: .82rem; font-weight: 600; color: #334155; margin-bottom: 7px; }
.rx-input { position: relative; }
.rx-input > i {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    color: #94a3b8; font-size: .9rem; z-index: 2; pointer-events: none;
    transition: color .15s;
}
.rx-input:focus-within > i { color: var(--ra-primary); }
.rx-input .dx-texteditor {
    width: 100% !important;
    border: 1.5px solid var(--ra-border) !important;
    border-radius: 12px !important;
    background: #f8fafc !important;
    transition: border-color .15s, box-shadow .15s, background-color .15s;
}
.rx-input .dx-texteditor.dx-state-hover { border-color: #cbd5e1 !important; }
.rx-input .dx-texteditor.dx-state-focused {
    border-color: var(--ra-primary-2) !important;
    background: #fff !important;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, .15) !important;
}
.rx-input .dx-texteditor::before, .rx-input .dx-texteditor::after { display: none !important; }
.rx-input .dx-texteditor-input { padding: 13px 14px 13px 42px !important; font-size: .95rem !important; min-height: 48px; color: var(--ra-text) !important; }
.rx-input .dx-placeholder::before { padding: 13px 14px 13px 42px !important; color: #94a3b8 !important; font-size: .95rem; }
.rx-input .rx-plain {
    width: 100%; box-sizing: border-box;
    border: 1.5px solid var(--ra-border); border-radius: 12px; background: #f8fafc;
    padding: 13px 14px 13px 42px; font-size: .95rem; min-height: 48px; outline: none;
    transition: border-color .15s, box-shadow .15s, background-color .15s;
}
.rx-input .rx-plain:focus { border-color: var(--ra-primary-2); background: #fff; box-shadow: 0 0 0 4px rgba(16, 185, 129, .15); }

.rx-row { display: flex; align-items: center; justify-content: space-between; margin: -4px 0 22px; font-size: .85rem; }
.rx-row a { color: var(--ra-primary); font-weight: 600; text-decoration: none; }
.rx-row a:hover { color: #047857; text-decoration: underline; }
.rx-row .secure { color: var(--ra-muted); display: inline-flex; align-items: center; gap: 6px; }
.rx-row .secure i { color: var(--ra-primary-2); }

.rx-btn,
body.rx-auth input#loginbutton,
body.rx-auth .rx-btn.btn {
    display: block; width: 100% !important;
    height: 50px !important;
    border: 0 !important; border-radius: 12px !important;
    background: linear-gradient(135deg, #047857 0%, #059669 45%, #10b981 100%) !important;
    background-size: 200% 100% !important;
    color: #fff !important; font-weight: 700 !important; font-size: 1rem !important;
    letter-spacing: .01em; cursor: pointer;
    box-shadow: 0 12px 24px -10px rgba(5, 150, 105, .7) !important;
    transition: background-position .4s ease, transform .15s ease, box-shadow .15s ease;
    padding: 0 !important;
}
.rx-btn:hover, body.rx-auth input#loginbutton:hover { background-position: 100% 0 !important; transform: translateY(-1px); box-shadow: 0 16px 28px -10px rgba(5, 150, 105, .8) !important; }
.rx-btn:active, body.rx-auth input#loginbutton:active { transform: translateY(0); }
.rx-btn:focus, body.rx-auth input#loginbutton:focus { outline: none; box-shadow: 0 0 0 4px rgba(16, 185, 129, .25) !important; }
.rx-btn:disabled, body.rx-auth input#loginbutton:disabled { opacity: .65; cursor: wait; transform: none; box-shadow: none !important; }

.rx-error { min-height: 22px; margin-top: 14px; text-align: center; color: #dc2626; font-size: .87rem; font-weight: 600; }
.rx-error:empty { min-height: 0; margin: 0; }

.rx-auth-foot { margin-top: 26px; padding-top: 18px; border-top: 1px solid #eef2f6; display: flex; justify-content: center; gap: 18px; color: #94a3b8; font-size: .78rem; }
.rx-auth-foot span { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
    .rx-auth-shell { grid-template-columns: 1fr; }
    .rx-auth-brand { padding: 28px 24px 32px; }
    .rx-auth-hero { padding: 24px 0 8px; }
    .rx-auth-hero h1 { font-size: 1.9rem; }
    .rx-auth-hero p, .rx-auth-features { display: none; }
    .rx-auth-help { display: none; }
    .rx-auth-main { padding: 0 16px 40px; background: #f6f8fb; }
    .rx-auth-card { margin-top: -20px; padding: 30px 22px 24px; position: relative; z-index: 2; }
}

@media (prefers-reduced-motion: reduce) {
    .rx-auth-brand .rx-blob, .rx-auth-card { animation: none; }
}

/* =====================================================================
   Secondary account pages (Forgot password, OTP, Reset) — AdminLTE
   .login-page / .login-box markup, restyled without markup changes.
   ===================================================================== */
body.login-page {
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif !important;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    background:
        radial-gradient(900px 500px at -10% 110%, rgba(10, 232, 138, .22), transparent 60%),
        radial-gradient(700px 450px at 110% -10%, rgba(208, 0, 216, .25), transparent 55%),
        linear-gradient(160deg, #141d32 0%, #070c18 100%) !important;
}
body.login-page .dx-widget, body.login-page .dx-widget input { font-family: 'Inter', 'Segoe UI', system-ui, sans-serif !important; }
body.login-page::before {
    content: ""; position: fixed; inset: 0; pointer-events: none;
    background-image: linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
    background-size: 44px 44px;
    -webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000 20%, transparent 70%);
    mask-image: radial-gradient(ellipse at 50% 40%, #000 20%, transparent 70%);
}
body.login-page::after {
    content: ""; position: fixed; width: 340px; height: 340px; right: -90px; top: 12%;
    border-radius: 50%; pointer-events: none;
    background: radial-gradient(circle at 30% 30%, rgba(10, 232, 138, .45), rgba(10, 232, 138, 0) 70%);
    animation: rx-float 14s ease-in-out infinite;
}
body.login-page .login-box { width: 100%; max-width: 440px; position: relative; z-index: 1; padding: 0 16px; }
body.login-page .login-logo { margin-bottom: 22px; }
body.login-page .login-logo img {
    max-height: 64px; padding: 10px 18px; border-radius: 16px;
    background: #fff; box-shadow: 0 16px 40px -12px rgba(0, 0, 0, .5);
}
body.login-page .card {
    border: 0 !important; border-radius: 22px !important; overflow: hidden;
    box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .55) !important;
    animation: rx-rise .5s cubic-bezier(.2, .8, .2, 1) both;
}
body.login-page .login-card-body { padding: 34px 32px 30px !important; border-radius: 22px; }
body.login-page .login-box-msg { font-size: 1rem; font-weight: 600; color: #0f172a; padding: 0 0 22px; line-height: 1.5; }
body.login-page .input-group { flex-wrap: nowrap; }
body.login-page .dx-texteditor {
    width: 100% !important;
    border: 1.5px solid #e2e8f0 !important; border-radius: 12px !important; background: #f8fafc !important;
}
body.login-page .dx-texteditor.dx-state-focused { border-color: #10b981 !important; background: #fff !important; box-shadow: 0 0 0 4px rgba(16, 185, 129, .15) !important; }
body.login-page .dx-texteditor-input { padding: 13px 14px !important; min-height: 48px; font-size: .95rem !important; }
body.login-page .dx-placeholder::before { padding: 13px 14px !important; }
body.login-page .form-control { border-radius: 12px; min-height: 48px; border: 1.5px solid #e2e8f0; background: #f8fafc; }
body.login-page .form-control:focus { border-color: #10b981; box-shadow: 0 0 0 4px rgba(16, 185, 129, .15); background: #fff; }
body.login-page .input-group-text { border-radius: 0 12px 12px 0; background: #f1f5f9; border: 1.5px solid #e2e8f0; color: #64748b; }
body.login-page .btn-success,
body.login-page .btn-primary,
body.login-page input[type=button].btn {
    height: 50px; border: 0 !important; border-radius: 12px !important;
    background: linear-gradient(135deg, #047857 0%, #059669 45%, #10b981 100%) !important;
    color: #fff !important; font-weight: 700; font-size: 1rem;
    box-shadow: 0 12px 24px -10px rgba(5, 150, 105, .7) !important;
    transition: transform .15s ease, box-shadow .15s ease;
}
body.login-page .btn-success:hover, body.login-page input[type=button].btn:hover { transform: translateY(-1px); }
body.login-page #spnErrorMsg { color: #dc2626; font-size: .88rem; }
body.login-page .card a { color: #059669; font-weight: 600; }


/* =====================================================================
   Admin login — "Database update" panel
   ===================================================================== */
.rx-dbu { margin-top: 22px; border: 1px solid var(--ra-border); border-radius: 14px; background: #f8fafc; overflow: hidden; }
.rx-dbu.has-pending { border-color: #fcd34d; background: #fffbeb; }
.rx-dbu-toggle {
    width: 100%; display: flex; align-items: center; gap: 12px;
    background: none; border: 0; padding: 12px 14px; cursor: pointer; text-align: left; font-family: inherit;
}
.rx-dbu-toggle:focus-visible { outline: 3px solid rgba(16, 185, 129, .35); outline-offset: -3px; border-radius: 14px; }
.rx-dbu-ico {
    width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #141d32, #2f4b7c); color: #6ee7b7; font-size: .9rem;
}
.rx-dbu-title { flex: 1; font-size: .9rem; font-weight: 700; color: var(--ra-text); line-height: 1.25; }
.rx-dbu-title small { display: block; font-size: .76rem; font-weight: 500; color: var(--ra-muted); }
.rx-dbu.has-pending .rx-dbu-title small { color: #b45309; font-weight: 600; }
.rx-dbu-chev { color: #94a3b8; font-size: .8rem; transition: transform .2s ease; }
.rx-dbu.is-open .rx-dbu-chev { transform: rotate(180deg); }
.rx-dbu-body { padding: 4px 14px 14px; border-top: 1px solid var(--ra-border); background: #fff; }
.rx-dbu-status { display: flex; align-items: center; gap: 8px; font-size: .85rem; font-weight: 600; color: var(--ra-muted); padding: 10px 0 8px; }
.rx-dbu-status.is-good { color: #047857; }
.rx-dbu-status.is-warn { color: #b45309; }
.rx-dbu-status.is-bad { color: #dc2626; }
.rx-dbu-status.is-run { color: #2563eb; }
.rx-dbu-list { list-style: none; margin: 0 0 10px; padding: 0; max-height: 150px; overflow: auto; }
.rx-dbu-list li { display: flex; align-items: center; gap: 8px; font-size: .8rem; padding: 5px 2px; color: #334155; border-bottom: 1px dashed #eef2f6; word-break: break-all; }
.rx-dbu-list li:last-child { border-bottom: 0; }
.rx-dbu-list li.ok i { color: #10b981; }
.rx-dbu-list li.wait i { color: #94a3b8; }
.rx-dbu-list li.run i { color: #2563eb; }
.rx-dbu-list li.bad i, .rx-dbu-list li.bad { color: #dc2626; }
.rx-dbu-list li.warn i { color: #f59e0b; }
.rx-dbu-error { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; border-radius: 10px; padding: 8px 10px; font-size: .78rem; margin-bottom: 10px; word-break: break-word; }
.rx-dbu-run {
    width: 100%; height: 42px; border: 0; border-radius: 10px; cursor: pointer; font-family: inherit;
    background: linear-gradient(135deg, #141d32, #2f4b7c); color: #fff; font-weight: 700; font-size: .9rem;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    transition: transform .15s ease, opacity .15s ease;
}
.rx-dbu-run:hover:not(:disabled) { transform: translateY(-1px); }
.rx-dbu-run:disabled { opacity: .45; cursor: not-allowed; }
.rx-dbu-note { margin: 8px 0 0; font-size: .72rem; color: #94a3b8; text-align: center; }
