/* ─────────────────────────────────────────────────────────────
   c3 "Mindless" theme — SABnzbd login page (audio.c3lelouch.com)
   Served at /sab-mindless.v3.css, injected before </head> by nginx
   sub_filter on NPM proxy host 1. Filename-bump to bust caches
   (Cloudflare ignores query strings).

   Every rule is scoped to body:has(.account-wall) / .account-wall —
   SABnzbd's login page is the only place .account-wall exists, so the
   main application UI is untouched even though the stylesheet is
   injected into every HTML response.
   ───────────────────────────────────────────────────────────── */

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

body:has(.account-wall) {
  background: #0b0c10 !important;
  color: #f1f3f9 !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  overflow-x: hidden;
}

/* ── Login card ── */
.account-wall {
  width: 400px !important;
  max-width: 92vw;
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  background: #141622 !important;
  border: 1px solid rgba(139, 44, 245, 0.18) !important;
  border-radius: 14px !important;
  box-shadow: 0 0 48px rgba(255, 31, 76, 0.12), 0 4px 32px rgba(0, 0, 0, 0.6) !important;
  padding: 26px 32px 18px !important;
}

@media (max-height: 780px) {
  .account-wall {
    position: absolute !important;
    top: 14px !important;
    transform: translateX(-50%) !important;
    margin-bottom: 14px;
  }
}

/* ── Co-branded header: c3lelouch emblem | SABnzbd wordmark ── */
.account-wall .logo-header {
  padding-bottom: 4px !important;
}

.c3-brand-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 2px 0 4px;
}

/* the emblem PNG has a near-black plate — screen blend drops it into
   the card colour instead of showing a dark rectangle */
.c3-brand-logo {
  width: 132px;
  height: auto;
  mix-blend-mode: screen;
  filter: drop-shadow(0 0 14px rgba(255, 31, 76, 0.28));
}

.c3-brand-sep {
  flex: none;
  width: 1px;
  height: 54px;
  background: linear-gradient(180deg, transparent, rgba(139, 44, 245, 0.65), transparent);
}

.c3-app-logo {
  display: inline-flex;
  align-items: center;
}

.c3-app-logo svg,
.account-wall .logo-header svg {
  height: 46px !important;
  width: auto !important;
  max-width: 100%;
  filter: drop-shadow(0 0 10px rgba(139, 44, 245, 0.35));
}

/* SABnzbd's wordmark is black-outlined for light backgrounds —
   recolour it for the obsidian card */
.c3-app-logo svg path[stroke="#000"],
.c3-app-logo svg path[stroke="#000000"] {
  stroke: #8b2cf5 !important;
}

.c3-app-logo svg path[fill="#fff"],
.c3-app-logo svg path[fill="#ffffff"] {
  fill: #f1f3f9 !important;
}

.c3-brand-sub {
  margin: 10px 0 0 !important;
  font-size: 12.5px;
  letter-spacing: 0.02em;
  color: #8b92b0 !important;
}

/* help "?" link that SABnzbd floats in the card corner */
.account-wall .text-center a {
  color: #8b92b0 !important;
  right: 14px !important;
  top: 12px !important;
}

.account-wall .text-center a:hover {
  color: #ff1f4c !important;
}

/* ── Inputs ── */
.form-signin input.form-control {
  background: #0f1118 !important;
  border: 1px solid rgba(139, 44, 245, 0.28) !important;
  border-radius: 10px !important;
  color: #f1f3f9 !important;
  height: auto !important;
  padding: 10px 14px !important;
  font-size: 14px !important;
  box-shadow: none !important;
  margin-top: 10px !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-signin input.form-control::placeholder {
  color: #6b7290 !important;
}

.form-signin input.form-control:focus {
  border-color: #8b2cf5 !important;
  box-shadow: 0 0 0 3px rgba(139, 44, 245, 0.18) !important;
  outline: none !important;
}

/* ── Primary button: the Mindless red→violet gradient ── */
.form-signin .btn,
.form-signin .btn-default,
.form-signin button.btn {
  width: 100% !important;
  margin-top: 16px !important;
  background: linear-gradient(135deg, #ff1f4c, #8b2cf5) !important;
  background-image: linear-gradient(135deg, #ff1f4c, #8b2cf5) !important;
  border: none !important;
  border-radius: 10px !important;
  color: #ffffff !important;
  font-family: inherit !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  padding: 11px 16px !important;
  text-shadow: none !important;
  box-shadow: 0 6px 20px rgba(255, 31, 76, 0.28) !important;
  transition: filter 0.15s ease, box-shadow 0.15s ease;
}

.form-signin .btn:hover,
.form-signin .btn:focus,
.form-signin .btn-default:hover,
.form-signin .btn-default:focus {
  filter: brightness(1.08);
  box-shadow: 0 8px 26px rgba(255, 31, 76, 0.4) !important;
}

.form-signin .btn .glyphicon {
  float: right;
  top: 2px;
  margin-left: 8px;
}

/* ── Remember-me row ── */
.form-signin label {
  color: #8b92b0 !important;
  font-size: 13px !important;
  margin-top: 16px !important;
}

.form-signin input[type="checkbox"] {
  accent-color: #8b2cf5;
  vertical-align: -1px;
  margin-left: 6px;
}

/* ── "Remember me" toggle switch: stock grey/gold → Mindless ── */
body:has(.account-wall) {
  --clr-toggle-inactive: rgba(139, 44, 245, 0.30);
  --clr-toggle-active: #ff1f4c;
}

.account-wall input[type="checkbox"]:checked {
  box-shadow: 0 0 12px rgba(255, 31, 76, 0.45);
}

.account-wall input[type="checkbox"]:focus-visible {
  outline: 2px solid #8b2cf5 !important;
  outline-offset: 2px;
}

.account-wall .alert {
  background: rgba(255, 31, 76, 0.1) !important;
  border: 1px solid rgba(255, 31, 76, 0.35) !important;
  border-radius: 10px !important;
  color: #ff6b8a !important;
}