/* =====================================================================
   GoProIT sign-in skin for Tactical RMM (trmm.goproit.us), 25 Nov 2026.
   Added to the page by the small "trmm-brand" proxy in front of the dashboard address.
   Touches ONLY the sign-in screens: /login (with its two-step prompt) and /totp_setup.
   The dashboard itself is left exactly as Tactical RMM ships it.
   Same look as rmm.goproit.us: navy #0B1F3A / #0B1220, blue #1A73E8, sky #4AB3F4, royal #2F5AA6.
   Works together with brand.js, and still looks right if that script does not run.
   ===================================================================== */

/* ---------- /login: page background ---------- */
html:has(.q-page.bg-image) { overflow-x: hidden; }
body:has(.q-page.bg-image) {
    --q-primary: #1A73E8;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto !important;            /* the app switches page scrolling off; small screens need it here */
    background:
        radial-gradient(900px 520px at 12% -5%, rgba(74, 179, 244, .28) 0%, rgba(74, 179, 244, 0) 60%),
        radial-gradient(820px 560px at 95% 105%, rgba(47, 90, 166, .42) 0%, rgba(47, 90, 166, 0) 62%),
        linear-gradient(160deg, #0d2548 0%, #0B1F3A 45%, #0B1220 100%) fixed !important;
}
/* slow drifting glow behind the card */
body:has(.q-page.bg-image)::before,
body:has(.q-page.bg-image)::after {
    content: "";
    position: fixed;
    z-index: 0;
    width: 46vmax;
    height: 46vmax;
    border-radius: 50%;
    filter: blur(70px);
    opacity: .35;
    pointer-events: none;
}
body:has(.q-page.bg-image)::before {
    left: -14vmax; top: -16vmax;
    background: radial-gradient(circle, #4AB3F4 0%, rgba(74, 179, 244, 0) 68%);
    animation: gpDriftA 22s ease-in-out infinite alternate;
}
body:has(.q-page.bg-image)::after {
    right: -16vmax; bottom: -18vmax;
    background: radial-gradient(circle, #1A73E8 0%, rgba(26, 115, 232, 0) 68%);
    animation: gpDriftB 26s ease-in-out infinite alternate;
}
@keyframes gpDriftA { to { transform: translate(9vmax, 6vmax) scale(1.12); } }
@keyframes gpDriftB { to { transform: translate(-8vmax, -7vmax) scale(1.08); } }
body:has(.q-page.bg-image) #q-app { position: relative; z-index: 1; }

.q-page.bg-image {
    flex-direction: column;
    flex-wrap: nowrap;
    box-sizing: border-box;
    padding: 28px 16px 36px;
    background: transparent !important;
    background-image: none !important;
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, Helvetica, sans-serif;
}

/* ---------- logo and product tag (above the card) ---------- */
.q-page.bg-image::before {
    content: "";
    order: -2;
    flex: none;
    width: 230px;
    height: 94px;
    margin-bottom: 6px;
    background: url("/gp-brand/gp-logo.png") center / contain no-repeat;
    filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .45));
}
.q-page.bg-image::after {
    content: "Remote Monitoring";
    order: -1;
    flex: none;
    margin: 0 0 22px;
    padding: 6px 14px 6px 31px;
    border: 1px solid rgba(159, 197, 255, .28);
    border-radius: 999px;
    background:
        radial-gradient(circle at 17px 50%, #10B981 0, #10B981 4px, rgba(16, 185, 129, .22) 4.5px, rgba(16, 185, 129, .22) 8px, rgba(16, 185, 129, 0) 8.5px),
        rgba(255, 255, 255, .06);
    color: #cfe3ff;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.5;
    letter-spacing: .08em;
    text-transform: uppercase;
}

/* ---------- the card ---------- */
.q-page.bg-image > .q-card {
    flex: none;
    width: 400px !important;
    max-width: calc(100vw - 32px);
    padding: 8px 6px 4px;
    border-radius: 20px !important;
    background: #ffffff !important;
    color: #0f172a !important;
    position: relative;
    overflow: hidden;
    box-shadow: 0 30px 70px -28px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .5) inset !important;
    animation: gpCardIn .45s cubic-bezier(.2, .8, .2, 1) both;
}
.q-page.bg-image > .q-card::before {
    content: "";
    position: absolute;
    left: 0; right: 0; top: 0;
    height: 5px;
    background: linear-gradient(90deg, #4AB3F4, #1A73E8 55%, #2F5AA6);
}
@keyframes gpCardIn {
    from { transform: translateY(14px) scale(.985); }
    to   { transform: none; }
}

/* heading: the product name stays in the page for screen readers; what you see is ours */
.q-page.bg-image > .q-card .q-pt-lg { padding-top: 10px; text-align: left; }
.q-page.bg-image > .q-card .text-h4 {
    font-size: 0 !important;
    line-height: 0 !important;
    letter-spacing: 0 !important;
    white-space: normal;
    overflow: visible;
    text-align: left;
}
.q-page.bg-image > .q-card .text-h4::before {
    content: "Welcome back";
    display: block;
    font-size: 24px;
    line-height: 1.25;
    font-weight: 800;
    letter-spacing: -.01em;
    color: #0f172a;
}
.q-page.bg-image > .q-card .text-h4::after {
    content: "Sign in to GoProIT Remote Monitoring";
    display: block;
    margin-top: 4px;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 400;
    color: #64748b;
}
.q-page.bg-image > .q-card > .q-card__section:first-child { padding-bottom: 6px; }

/* ---------- fields (the app draws them for a dark card; ours is white) ---------- */
.q-page.bg-image .q-form > label.q-field { position: relative; }
/* the app leaves room for an error line under each field and then adds a gap on top: tighten it a little */
.q-page.bg-image .q-form > label.q-field + label.q-field { margin-top: 8px; }
.q-page.bg-image .q-form > div:last-child { margin-top: 6px; }
.q-page.bg-image .q-field--filled .q-field__control {
    border: 1.5px solid #dbe3ee;
    border-radius: 12px !important;
    background: #f6f8fc !important;
    transition: border-color .15s, box-shadow .15s, background-color .15s;
}
.q-page.bg-image .q-field--filled .q-field__control::before,
.q-page.bg-image .q-field--filled .q-field__control::after { display: none !important; }
.q-page.bg-image .q-field--filled .q-field__control:hover { border-color: #b9c7dc; }
.q-page.bg-image .q-field--filled.q-field--focused .q-field__control {
    border-color: #1A73E8;
    background: #ffffff !important;
    box-shadow: 0 0 0 4px rgba(26, 115, 232, .16);
}
.q-page.bg-image .q-field--filled.q-field--error .q-field__control { border-color: #C10015; }
.q-page.bg-image .q-field__native,
.q-page.bg-image .q-field__input {
    color: #0f172a !important;
    font-size: 15px;
    font-family: inherit;
    caret-color: #1A73E8;
}
.q-page.bg-image .q-field__label { color: #64748b !important; font-family: inherit; }
.q-page.bg-image .q-field--focused .q-field__label { color: #1558B8 !important; }
.q-page.bg-image .q-field--error .q-field__label { color: #C10015 !important; }
.q-page.bg-image .q-field__marginal { color: #64748b !important; }
.q-page.bg-image .q-field__marginal .q-icon { border-radius: 8px; padding: 6px; margin-right: -6px; }
.q-page.bg-image .q-field__marginal .q-icon:hover { background: #e8eef8; color: #1558B8; }
.q-page.bg-image .q-field__bottom { color: #64748b; padding-left: 4px; }
.q-page.bg-image .q-field--error .q-field__bottom { color: #C10015; font-weight: 600; }
.q-page.bg-image input:-webkit-autofill,
.q-page.bg-image input:-webkit-autofill:focus {
    -webkit-text-fill-color: #0f172a !important;
    -webkit-box-shadow: 0 0 0 1000px #f6f8fc inset !important;
    box-shadow: 0 0 0 1000px #f6f8fc inset !important;
    border-radius: 10px;
}

/* Caps Lock hint (brand.js switches the class on while Caps Lock is active in the password box) */
body.gp-caps-on .q-page.bg-image .q-form > label.q-field:nth-of-type(2)::after {
    content: "Caps Lock is on";
    position: absolute;
    right: 4px;
    bottom: 1px;
    font-size: 12px;
    font-weight: 600;
    color: #b45309;
}

/* ---------- button ---------- */
.q-page.bg-image .q-form .q-btn.bg-primary {
    min-height: 48px;
    border-radius: 12px !important;
    background: linear-gradient(135deg, #4AB3F4 0%, #1A73E8 55%, #2F5AA6 100%) !important;
    font-family: inherit;
    font-size: 15.5px;
    font-weight: 700;
    letter-spacing: .01em;
    text-transform: none;
    box-shadow: 0 14px 26px -14px rgba(26, 115, 232, .95) !important;
    transition: transform .12s, filter .12s, box-shadow .12s;
}
.q-page.bg-image .q-form .q-btn.bg-primary::before { box-shadow: none !important; border-radius: 12px; }
.q-page.bg-image .q-form .q-btn.bg-primary:hover {
    filter: brightness(1.07);
    transform: translateY(-1px);
    box-shadow: 0 18px 30px -14px rgba(26, 115, 232, 1) !important;
}
.q-page.bg-image .q-form .q-btn.bg-primary:active { transform: translateY(0); }

/* security note under the button (the form is shifted 16px left by the app's spacing, hence left: 8px) */
.q-page.bg-image > .q-card .q-form > div:last-child { padding-bottom: 18px; border-bottom: 1px solid #e8edf5; }
.q-page.bg-image > .q-card .q-form::after {
    content: "Encrypted connection. Two-step login required.";
    display: block;
    position: relative;
    left: 8px;
    width: -moz-fit-content;
    width: fit-content;
    max-width: 100%;
    margin: 14px auto 0;
    padding-left: 23px;
    font-size: 12.5px;
    line-height: 1.5;
    color: #64748b;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2310B981' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='11' width='16' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E") left center / 15px 15px no-repeat;
}

/* single sign-on block, if it is ever switched on */
.q-page.bg-image > .q-card .text-h6 { color: #0f172a; font-size: 15px; font-weight: 700; }
.q-page.bg-image > .q-card .q-separator { background: #e8edf5; }
.q-page.bg-image > .q-card .q-list { border-color: #dbe3ee; border-radius: 12px; }
.q-page.bg-image > .q-card .q-item { color: #0f172a; border-radius: 8px; }

/* ---------- lines under the card (added by brand.js) ---------- */
.gp-auth-foot {
    flex: none;
    max-width: 400px;
    margin: 18px 0 0;
    text-align: center;
    font-size: 13px;
    line-height: 1.6;
    color: #9fb6d9;
}
.gp-auth-foot p { margin: 0; }
.gp-auth-foot a { color: #cfe3ff !important; font-weight: 600; text-decoration: none; }
.gp-auth-foot a:hover, .gp-auth-foot a:focus-visible { text-decoration: underline; }
.gp-auth-foot .gp-auth-small { margin-top: 6px; font-size: 12px; color: #7f97bd; }
.gp-auth-foot .gp-auth-small span { opacity: .9; }

/* ---------- two-step prompt (a pop-up on top of /login) ---------- */
body:has(.q-page.bg-image) .q-dialog__backdrop { background: rgba(6, 14, 28, .62); backdrop-filter: blur(3px); }
body:has(.q-page.bg-image) .q-dialog .q-card {
    min-width: min(400px, calc(100vw - 32px)) !important;
    max-width: calc(100vw - 32px);
    border-radius: 18px !important;
    background: #ffffff !important;
    color: #0f172a !important;
    position: relative;
    overflow: hidden;
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, Helvetica, sans-serif;
    box-shadow: 0 30px 70px -28px rgba(0, 0, 0, .8) !important;
}
body:has(.q-page.bg-image) .q-dialog .q-card::before {
    content: "";
    position: absolute;
    left: 0; right: 0; top: 0;
    height: 5px;
    background: linear-gradient(90deg, #4AB3F4, #1A73E8 55%, #2F5AA6);
}
body:has(.q-page.bg-image) .q-dialog .q-card .text-h6 {
    padding-top: 26px;
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -.01em;
    color: #0f172a;
}
body:has(.q-page.bg-image) .q-dialog .q-card .text-h6::after {
    content: "Enter the 6-digit code from your authenticator app";
    display: block;
    margin-top: 4px;
    font-size: 13.5px;
    line-height: 1.45;
    font-weight: 400;
    letter-spacing: 0;
    color: #64748b;
}
body:has(.q-page.bg-image) .q-dialog .q-field--outlined .q-field__control {
    border-radius: 12px !important;
    background: #f6f8fc;
}
body:has(.q-page.bg-image) .q-dialog .q-field--outlined .q-field__control::before { border: 1.5px solid #dbe3ee !important; border-radius: 12px; }
body:has(.q-page.bg-image) .q-dialog .q-field--outlined .q-field__control:hover::before { border-color: #b9c7dc !important; }
body:has(.q-page.bg-image) .q-dialog .q-field--outlined .q-field__control::after { border-radius: 12px; }
body:has(.q-page.bg-image) .q-dialog .q-field--outlined.q-field--focused .q-field__control { background: #ffffff; box-shadow: 0 0 0 4px rgba(26, 115, 232, .16); }
body:has(.q-page.bg-image) .q-dialog .q-field__native {
    color: #0f172a !important;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: .32em;
    padding-left: .32em;                    /* keeps the spaced digits truly centred */
    text-align: center;
    font-family: inherit;
}
body:has(.q-page.bg-image) .q-dialog .q-field__bottom { color: #64748b; }
body:has(.q-page.bg-image) .q-dialog .q-field--error .q-field__bottom { color: #C10015; font-weight: 600; }
body:has(.q-page.bg-image) .q-dialog .q-card__actions { padding: 4px 16px 18px; gap: 6px; }
body:has(.q-page.bg-image) .q-dialog .q-card__actions .q-btn {
    min-height: 40px;
    padding: 4px 18px;
    border-radius: 10px;
    font-family: inherit;
    font-weight: 700;
    text-transform: none;
    color: #475569 !important;
}
body:has(.q-page.bg-image) .q-dialog .q-card__actions .q-btn[type="submit"] {
    background: linear-gradient(135deg, #4AB3F4 0%, #1A73E8 55%, #2F5AA6 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 12px 22px -14px rgba(26, 115, 232, .95);
}

/* ---------- /totp_setup: first-time two-step setup (the app shows this one in light colours) ---------- */
body.gp-auth-setup {
    overflow-y: auto !important;
    background: linear-gradient(160deg, #0d2548 0%, #0B1F3A 45%, #0B1220 100%) fixed !important;
}
body.gp-auth-setup #q-app > .q-pa-md {
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
    min-height: 100vh;
    padding: 28px 16px 36px;
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, Helvetica, sans-serif;
}
body.gp-auth-setup #q-app > .q-pa-md::before {
    content: "";
    flex: none;
    width: 210px;
    height: 86px;
    margin-bottom: 18px;
    background: url("/gp-brand/gp-logo.png") center / contain no-repeat;
    filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .45));
}
body.gp-auth-setup #q-app > .q-pa-md > .row { width: 100%; justify-content: center; }
body.gp-auth-setup #q-app > .q-pa-md > .row > .col:empty { display: none; }
body.gp-auth-setup #q-app > .q-pa-md > .row > .col { flex: 0 1 460px; max-width: 460px; }
body.gp-auth-setup #q-app > .q-pa-md .q-card {
    border-radius: 20px;
    padding: 10px 8px 12px;
    background: #ffffff;
    color: #0f172a;
    position: relative;
    overflow: hidden;
    box-shadow: 0 30px 70px -28px rgba(0, 0, 0, .8);
}
body.gp-auth-setup #q-app > .q-pa-md .q-card::before {
    content: "";
    position: absolute;
    left: 0; right: 0; top: 0;
    height: 5px;
    background: linear-gradient(90deg, #4AB3F4, #1A73E8 55%, #2F5AA6);
}
body.gp-auth-setup #q-app > .q-pa-md .q-card .text-h6 { font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
body.gp-auth-setup #q-app > .q-pa-md .q-card p { font-size: 14px; line-height: 1.55; color: #334155; overflow-wrap: anywhere; }
body.gp-auth-setup #q-app > .q-pa-md .q-card img { display: block; margin: 6px auto 0; max-width: 100%; height: auto; border: 1px solid #e8edf5; border-radius: 12px; padding: 8px; background: #fff; }
body.gp-auth-setup #q-app > .q-pa-md .q-card .q-btn.bg-primary {
    min-height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #4AB3F4 0%, #1A73E8 55%, #2F5AA6 100%) !important;
    font-weight: 700;
    font-size: 15.5px;
    text-transform: none;
}

/* ---------- small screens, short screens, reduced motion ---------- */
@media (max-width: 480px) {
    .q-page.bg-image { padding: 22px 16px 28px; }
    .q-page.bg-image::before { width: 190px; height: 78px; }
    .q-page.bg-image > .q-card { padding: 4px 0 2px; }
    .q-page.bg-image .q-field__native { font-size: 16px; }
}
@media (max-height: 780px) {
    .q-page.bg-image { padding-top: 18px; padding-bottom: 22px; }
    .q-page.bg-image::before { width: 180px; height: 74px; margin-bottom: 4px; }
    .q-page.bg-image::after { margin-bottom: 14px; }
    .gp-auth-foot { margin-top: 12px; }
}
@media (prefers-reduced-motion: reduce) {
    body:has(.q-page.bg-image)::before, body:has(.q-page.bg-image)::after { animation: none; }
    .q-page.bg-image > .q-card { animation: none; }
}
