/* ==========================================================================
   Fxprocapital — User app skin (Phase 1)
   Additive overlay. Loaded AFTER css/style.css. Never replaces it.

   Scope of this file: the user login page (user/login.php).
   This app is Bootstrap 5 + the DexignZone/FinLab theme. The theme is already
   token-driven (css/style.css :root --primary etc.), so this file works *with*
   those tokens rather than fighting them. Delete this file to revert.

   Brand: indigo #3C39AB (the value the app already selects via
   data-primary="color_2" on every page's <body>).
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Brand tokens
   Mirrors chairman/dist/css/fxpro-admin.css so both apps read as one product.
   -------------------------------------------------------------------------- */
:root {
  --fxp-primary: #3c39ab;
  --fxp-primary-hover: #2f2c85;
  --fxp-primary-dark: #141338;
  --fxp-primary-soft: rgba(60, 57, 171, 0.08);
  --fxp-accent: #2696fd;

  --fxp-ink: #131629;
  --fxp-ink-2: #424562;
  --fxp-muted: #7a7995;

  --fxp-surface: #ffffff;
  --fxp-canvas: #f3f5fb;
  --fxp-border: #e6e8f0;

  --fxp-danger: #fd5353;
  --fxp-success: #28be9d;

  --fxp-radius: 14px;
  --fxp-radius-sm: 10px;
  --fxp-shadow-sm: 0 1px 2px rgba(19, 22, 41, 0.06);
  --fxp-shadow: 0 8px 24px -6px rgba(19, 22, 41, 0.12), 0 2px 6px rgba(19, 22, 41, 0.05);
  --fxp-shadow-lg: 0 24px 48px -12px rgba(19, 22, 41, 0.22);

  --fxp-font: "Inter", "Outfit", "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* --------------------------------------------------------------------------
   2. Page canvas
   The markup is <body class="body bg-primary h-100"> with nested
   .container-fluid -> .row -> .col-xl-6 -> .card.main-width -> .card.
   The theme paints it with --primary; we keep that idea but deepen it into a
   gradient so the auth screens match the admin login.
   -------------------------------------------------------------------------- */
body.body.bg-primary {
  background:
    radial-gradient(1200px 600px at 15% -10%, rgba(38, 150, 253, 0.16), transparent 60%),
    radial-gradient(900px 500px at 100% 110%, rgba(60, 57, 171, 0.28), transparent 55%),
    linear-gradient(150deg, #141338 0%, #1c1b4d 45%, #3c39ab 100%) !important;
  background-attachment: fixed !important;
  font-family: var(--fxp-font);
  -webkit-font-smoothing: antialiased;
}

body.body.bg-primary .container-fluid {
  padding: 1.5rem;
  box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   3. Card shell
   Markup nests .card > .card-body > .row > .col-xl-12 > .card > .card-body,
   so the inner card is the visible surface. We flatten the outer wrapper and
   style only the inner one.
   -------------------------------------------------------------------------- */
body.body.bg-primary .card.main-width {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  max-width: 460px;
  margin: 0 auto;
  animation: fxp-rise 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes fxp-rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

body.body.bg-primary .card.main-width .card {
  background: var(--fxp-surface) !important;
  border: 0 !important;
  border-radius: var(--fxp-radius) !important;
  box-shadow: var(--fxp-shadow-lg) !important;
  overflow: hidden;
}

body.body.bg-primary .card.main-width .card .card-body {
  background: var(--fxp-surface);
  padding: 2.25rem 2rem 2rem !important;
}

/* --------------------------------------------------------------------------
   4. Brand + headings
   -------------------------------------------------------------------------- */
body.body.bg-primary .card .card-body > .d-flex img {
  max-height: 46px;
  width: auto;
}

body.body.bg-primary h2 {
  color: var(--fxp-ink);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
}

body.body.bg-primary h2 + span {
  display: block;
  color: var(--fxp-muted);
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

/* --------------------------------------------------------------------------
   5. Fields
   -------------------------------------------------------------------------- */
body.body.bg-primary .form-group label {
  color: var(--fxp-ink-2);
  font-size: 0.8125rem;
  font-weight: 500;
  margin-bottom: 0.375rem;
}

body.body.bg-primary .form-control {
  border: 1px solid var(--fxp-border);
  border-radius: var(--fxp-radius-sm);
  background: var(--fxp-canvas);
  color: var(--fxp-ink);
  font-size: 0.9375rem;
  padding: 0.8125rem 0.9375rem;
  height: auto;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

body.body.bg-primary .form-control::placeholder {
  color: #a3a3bd;
}

body.body.bg-primary .form-control:focus {
  border-color: var(--fxp-primary);
  background: var(--fxp-surface);
  box-shadow: 0 0 0 3px var(--fxp-primary-soft);
  outline: 0;
}

/* --------------------------------------------------------------------------
   6. Primary action
   -------------------------------------------------------------------------- */
body.body.bg-primary .btn {
  border-radius: var(--fxp-radius-sm);
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: 0.01em;
  padding: 0.8125rem 1rem;
  border: 0;
  transition: transform 0.12s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

body.body.bg-primary .btn-primary {
  background: linear-gradient(135deg, var(--fxp-primary) 0%, #4d4ac4 100%) !important;
  color: #fff !important;
  box-shadow: 0 6px 16px -4px rgba(60, 57, 171, 0.5);
}

body.body.bg-primary .btn-primary:hover,
body.body.bg-primary .btn-primary:focus {
  background: linear-gradient(135deg, var(--fxp-primary-hover) 0%, var(--fxp-primary) 100%) !important;
  box-shadow: 0 8px 20px -4px rgba(60, 57, 171, 0.6);
}

body.body.bg-primary .btn-primary:active {
  transform: translateY(1px);
}

body.body.bg-primary .btn-primary:focus-visible {
  outline: 2px solid var(--fxp-accent);
  outline-offset: 2px;
}

/* The login button is <span onclick="sublog()" class="btn btn-primary btn-block">.
   Restore block behaviour and pointer affordance without changing the element
   or the onclick handler. */
body.body.bg-primary span.btn.btn-block {
  display: block;
  width: 100%;
  text-align: center;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

/* --------------------------------------------------------------------------
   7. Links + footer text
   -------------------------------------------------------------------------- */
body.body.bg-primary .text-primary {
  color: var(--fxp-primary) !important;
}

body.body.bg-primary .text-primary:hover {
  color: var(--fxp-primary-hover) !important;
}

body.body.bg-primary .card .card-body > .text-center p {
  color: var(--fxp-muted);
  font-size: 0.875rem;
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   8. Reduced motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  body.body.bg-primary .card.main-width,
  body.body.bg-primary .btn,
  body.body.bg-primary .form-control {
    animation: none !important;
    transition: none !important;
  }
}

/* --------------------------------------------------------------------------
   9. Small screens
   -------------------------------------------------------------------------- */
@media (max-width: 576px) {
  body.body.bg-primary .container-fluid {
    padding: 1rem;
  }

  body.body.bg-primary .card.main-width {
    max-width: 100%;
  }

  body.body.bg-primary .card.main-width .card .card-body {
    padding: 1.75rem 1.25rem 1.5rem !important;
  }

  body.body.bg-primary .card .card-body > .d-flex img {
    max-height: 38px;
  }

  body.body.bg-primary h2 {
    font-size: 1.3rem;
  }
}
