/* SNSYS skin for the Tactical RMM console LOGIN VIEW only.
   Injected via nginx sub_filter (snippet: /etc/nginx/snippets/snsys-rmm-brand.conf);
   the vendor dist is untouched. Scoping is pure CSS: the skin applies only while
   a username field is on screen AND no console drawer exists, so the moment the
   app logs in and mounts its drawer every rule here goes inert. Brand tokens
   mirror snsys-site/shared/tokens.css: Outfit / #0a0b0f / #00d4aa. */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&display=swap');

body.body--dark:has(input[autocomplete=username]):not(:has(.q-drawer)) {
  --q-primary: #00d4aa;
  background:
    radial-gradient(900px 480px at 50% 18%, rgba(0, 212, 170, 0.10), transparent 62%),
    radial-gradient(1200px 700px at 82% 96%, rgba(0, 212, 170, 0.05), transparent 60%),
    #0a0b0f !important;
  font-family: 'Outfit', system-ui, sans-serif;
}

body.body--dark:not(:has(.q-drawer)) .q-card:has(input[autocomplete=username]) {
  background: rgba(255, 255, 255, 0.035) !important;
  border: 1px solid rgba(0, 212, 170, 0.22);
  border-radius: 16px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55);
  width: 400px !important;
  max-width: 92vw;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 10px 10px 14px 10px;
  font-family: 'Outfit', system-ui, sans-serif;
}

/* vendor wordmark -> SNSYS lockup */
body.body--dark:not(:has(.q-drawer)) .q-card:has(input[autocomplete=username]) .text-h4 {
  font-size: 0 !important;
  line-height: 0;
  height: 54px;
  background: url('/snsys-brand/snsys-lockup.png') center / contain no-repeat;
  filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.6));
}

/* inputs */
body.body--dark:not(:has(.q-drawer)) .q-card:has(input[autocomplete=username]) .q-field--filled .q-field__control {
  background: #12141a !important;
  border: 1px solid #262b36;
  border-radius: 10px !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

body.body--dark:not(:has(.q-drawer)) .q-card:has(input[autocomplete=username]) .q-field--filled .q-field__control:focus-within {
  border-color: rgba(0, 212, 170, 0.65);
  box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.14);
}

/* Quasar paints an inner highlight bar on filled fields; keep it off */
body.body--dark:not(:has(.q-drawer)) .q-card:has(input[autocomplete=username]) .q-field--filled .q-field__control:before,
body.body--dark:not(:has(.q-drawer)) .q-card:has(input[autocomplete=username]) .q-field--filled .q-field__control:after {
  display: none;
}

body.body--dark:not(:has(.q-drawer)) .q-card:has(input[autocomplete=username]) .q-field__native {
  color: #f2f4f1 !important;
  font-family: 'Outfit', system-ui, sans-serif;
}

body.body--dark:not(:has(.q-drawer)) .q-card:has(input[autocomplete=username]) .q-field__label {
  color: #6b7280;
  font-family: 'Outfit', system-ui, sans-serif;
}

body.body--dark:not(:has(.q-drawer)) .q-card:has(input[autocomplete=username]) input:-webkit-autofill,
body.body--dark:not(:has(.q-drawer)) .q-card:has(input[autocomplete=username]) input:-webkit-autofill:hover,
body.body--dark:not(:has(.q-drawer)) .q-card:has(input[autocomplete=username]) input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #12141a inset !important;
  -webkit-text-fill-color: #f2f4f1 !important;
  caret-color: #f2f4f1;
}

/* primary action */
body.body--dark:not(:has(.q-drawer)) .q-card:has(input[autocomplete=username]) .q-btn.bg-primary {
  background: #00d4aa !important;
  color: #06231c !important;
  border-radius: 10px;
  font-family: 'Outfit', system-ui, sans-serif;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.02em;
  text-transform: none;
  padding: 10px 0;
  transition: filter 0.15s ease, transform 0.05s ease;
}

body.body--dark:not(:has(.q-drawer)) .q-card:has(input[autocomplete=username]) .q-btn.bg-primary:hover { filter: brightness(1.1); }
body.body--dark:not(:has(.q-drawer)) .q-card:has(input[autocomplete=username]) .q-btn.bg-primary:active { transform: translateY(1px); }

/* "Log in with SSO" divider heading */
body.body--dark:not(:has(.q-drawer)) .q-card:has(input[autocomplete=username]) .text-h6 {
  font-size: 12px !important;
  font-weight: 500;
  color: #7c8294;
  font-family: 'Outfit', system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

/* SSO provider button: quiet secondary */
body.body--dark:not(:has(.q-drawer)) .q-card:has(input[autocomplete=username]) .q-btn:not(.bg-primary) {
  background: #12141a !important;
  border: 1px solid #262b36;
  border-radius: 10px;
  color: #f2f4f1 !important;
  font-family: 'Outfit', system-ui, sans-serif;
  font-weight: 500;
  text-transform: none;
  transition: border-color 0.15s ease, filter 0.15s ease;
}

body.body--dark:not(:has(.q-drawer)) .q-card:has(input[autocomplete=username]) .q-btn:not(.bg-primary):hover {
  border-color: rgba(0, 212, 170, 0.45);
  filter: brightness(1.15);
}
