/**
 * MetricAlgo Options (limits) design tokens for Staticprofit Blade shells.
 * Source of truth for variable values: series_tools_python/options_limits_backtest/frontend/src/index.css
 * Scope all usage under .ma-limits-skin to avoid clashing with Bootstrap/theme CSS.
 */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

/* =========================================================
   TOKENS — light (default)
   ========================================================= */
.ma-limits-skin {
  --color-bg-primary: 255 255 255;
  --color-bg-secondary: 249 250 251;
  --color-bg-tertiary: 243 244 246;
  --color-surface-primary: 255 255 255;
  --color-surface-secondary: 249 250 251;
  --color-surface-hover: 243 244 246;
  --color-text-primary: 55 65 81;
  --color-text-secondary: 107 114 128;
  --color-text-muted: 156 163 175;
  --color-border: 229 231 235;
  --color-border-hover: 209 213 219;
  --color-accent-primary: 59 130 246;
  --color-accent-hover: 37 99 235;
  --color-accent-cyan: 6 182 212;
  --color-accent-cyan-dark: 8 145 178;
  --color-success: 34 197 94;
  --color-danger: 239 68 68;
  --color-warning: 245 158 11;
  --color-profit: 34 197 94;
  --color-loss: 239 68 68;
  --header-height: 64px;
  --sidebar-width: 64px;
  --sidebar-width-expanded: 240px;
  --content-max-width: 1920px;
  --space-page: 24px;
  --space-section: 24px;
  --space-card: 16px;
  --space-kpi: 12px;
  --space-element: 8px;
  --sidebar-bg: 21 101 192;
  --sidebar-active: 13 71 161;
  --sidebar-hover: 25 118 210;
  --sidebar-text: 255 255 255;
  --status-connected: 34 197 94;
  --status-disconnected: 239 68 68;
  --status-pending: 156 163 175;
  --status-warning: 245 158 11;

  font-family: "Inter", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: rgb(var(--color-text-primary));
  /* background-color: rgb(var(--color-bg-primary)); */
}

/* =========================================================
   TOKENS — dark (body.dark-mode matches limits .dark)
   ========================================================= */
body.dark-mode .ma-limits-skin {
  --color-bg-primary: 10 14 23;
  --color-bg-secondary: 17 24 39;
  --color-bg-tertiary: 31 41 55;
  --color-surface-primary: 31 41 55;
  --color-surface-secondary: 55 65 81;
  --color-surface-hover: 75 85 99;
  --color-text-primary: 229 231 235;
  --color-text-secondary: 156 163 175;
  --color-text-muted: 107 114 128;
  --color-border: 55 65 81;
  --color-border-hover: 75 85 99;
  --sidebar-bg: 30 41 59;
  --sidebar-active: 15 23 42;
  --sidebar-hover: 51 65 85;
}

/* =========================================================
   COMPONENT UTILITIES
   ========================================================= */
.ma-limits-skin .ma-limits-card {
  background: rgb(var(--color-surface-primary));
  border-radius: 0.5rem;
  border: 1px solid rgb(var(--color-border));
  padding: 1.25rem;
}

.ma-limits-skin .ma-limits-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.25rem;
  border-radius: 0.375rem;
  font-weight: 500;
  font-size: 0.9375rem;
  transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
  border: none;
  cursor: pointer;
  text-decoration: none;
}

.ma-limits-skin .ma-limits-btn:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgb(var(--color-bg-primary)), 0 0 0 4px rgb(var(--color-accent-primary));
}

.ma-limits-skin .ma-limits-btn-primary {
  background: linear-gradient(to right, rgb(var(--color-accent-cyan)), rgb(var(--color-accent-primary)));
  color: #fff;
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.3);
}

.ma-limits-skin .ma-limits-btn-primary:hover {
  background: linear-gradient(to right, rgb(var(--color-accent-cyan-dark)), rgb(var(--color-accent-hover)));
  color: #fff;
  box-shadow: 0 0 30px rgba(6, 182, 212, 0.4);
}

.ma-limits-skin .ma-limits-btn-secondary {
  background: rgb(var(--color-surface-secondary));
  color: rgb(var(--color-text-primary));
}

.ma-limits-skin .ma-limits-btn-secondary:hover {
  background: rgb(var(--color-surface-hover));
}

.ma-limits-skin .ma-limits-input {
  width: 100%;
  padding: 0.625rem 1rem;
  background: rgb(var(--color-surface-primary));
  border: 1px solid rgb(var(--color-border));
  border-radius: 0.5rem;
  color: rgb(var(--color-text-primary));
  font-size: 0.9375rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.ma-limits-skin .ma-limits-input::placeholder {
  color: rgb(var(--color-text-muted));
}

.ma-limits-skin .ma-limits-input:focus {
  outline: none;
  border-color: rgba(6, 182, 212, 0.5);
  box-shadow: 0 0 0 1px rgba(6, 182, 212, 0.3);
}

.ma-limits-skin .ma-limits-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgb(var(--color-text-secondary));
  margin-bottom: 0.375rem;
}

.ma-limits-skin .ma-limits-text-muted { color: rgb(var(--color-text-muted)); }
.ma-limits-skin .ma-limits-text-accent { color: rgb(var(--color-accent-cyan)); }
.ma-limits-skin .ma-limits-profit { color: rgb(var(--color-profit)); }
.ma-limits-skin .ma-limits-loss { color: rgb(var(--color-loss)); }

.ma-limits-skin .ma-limits-kpi-box {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  background: rgb(var(--color-surface-primary));
  border: 1px solid rgb(var(--color-border));
  border-radius: 0.5rem;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.ma-limits-skin .ma-limits-kpi-box:hover {
  border-color: rgb(var(--color-accent-cyan));
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.15);
}

.ma-limits-skin .ma-limits-actions-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.ma-limits-skin .ma-limits-alert-danger {
  background: rgba(239, 68, 68, 0.1);
  border: 2px solid rgb(var(--color-danger));
  color: rgb(var(--color-danger));
  border-radius: 0.5rem;
  padding: 1rem;
}

.ma-limits-skin .ma-limits-alert-warning {
  background: rgba(245, 158, 11, 0.1);
  border: 2px solid rgb(var(--color-warning));
  color: rgb(var(--color-warning));
  border-radius: 0.5rem;
  padding: 1rem;
}

.ma-limits-skin .ma-limits-alert-success {
  background: rgba(34, 197, 94, 0.1);
  border: 2px solid rgb(var(--color-success));
  color: rgb(var(--color-success));
  border-radius: 0.5rem;
  padding: 1rem;
}

/* =========================================================
   SCROLLBARS
   ========================================================= */
.ma-limits-skin.ma-limits-skin--scrollbars ::-webkit-scrollbar { width: 8px; height: 8px; }
.ma-limits-skin.ma-limits-skin--scrollbars ::-webkit-scrollbar-track { background: rgb(var(--color-bg-secondary)); }
.ma-limits-skin.ma-limits-skin--scrollbars ::-webkit-scrollbar-thumb { background: rgb(var(--color-surface-secondary)); border-radius: 4px; }
.ma-limits-skin.ma-limits-skin--scrollbars ::-webkit-scrollbar-thumb:hover { background: rgb(var(--color-surface-hover)); }

/* =========================================================
   AUTH GRADIENT ORBS  (placed as child of .ma-options-auth-orbs)
   ========================================================= */
.ma-options-auth-orbs {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.ma-options-auth-orbs .ma-orb-1 {
  position: absolute;
  top: 20%;
  left: 20%;
  width: 500px;
  height: 500px;
  background: rgba(6, 182, 212, 0.18);
  border-radius: 50%;
  filter: blur(90px);
  animation: ma-orb-pulse 4s ease-in-out infinite;
}

.ma-options-auth-orbs .ma-orb-2 {
  position: absolute;
  bottom: 20%;
  right: 20%;
  width: 400px;
  height: 400px;
  background: rgba(59, 130, 246, 0.12);
  border-radius: 50%;
  filter: blur(80px);
  animation: ma-orb-pulse 4s ease-in-out infinite;
  animation-delay: 1s;
}

.ma-options-auth-orbs .ma-orb-3 {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: rgba(139, 92, 246, 0.07);
  border-radius: 50%;
  filter: blur(100px);
  animation: ma-orb-pulse 4s ease-in-out infinite;
  animation-delay: 2s;
}

@keyframes ma-orb-pulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.06); }
}

.ma-options-auth-orbs .ma-orb-3 {
  animation: ma-orb-3-pulse 4s ease-in-out infinite;
  animation-delay: 2s;
}

@keyframes ma-orb-3-pulse {
  0%, 100% { opacity: 0.6; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.06); }
}

/* =========================================================
   AUTH LAYOUT WRAPPER  (.ma-options-auth-wrap)
   ========================================================= */
.ma-options-auth-wrap {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.ma-options-auth-inner {
  width: 100%;
  max-width: 440px;
}

/* Logo */
.ma-options-auth-logo {
  text-align: center;
  margin-bottom: 2rem;
}

.ma-options-auth-logo img {
  max-height: 80px;
  width: auto;
}

.ma-options-auth-logo-sub {
  margin-top: 0.5rem;
  font-size: 0.9375rem;
  color: rgb(var(--color-text-secondary));
}

/* Card */
.ma-options-auth-card {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 1rem;
  padding: 2rem;
  border: 1px solid rgba(221, 227, 234, 0.12);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

body.dark-mode .ma-options-auth-card {
  background: rgba(18, 26, 36, 0.8);
}

body:not(.dark-mode) .ma-options-auth-card {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(226, 232, 240, 0.8);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Card title */
.ma-options-auth-card-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: rgb(var(--color-text-primary));
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.ma-options-auth-card-title .ma-auth-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  background: linear-gradient(135deg, rgba(6,182,212,0.2), rgba(59,130,246,0.2));
  border: 1px solid rgba(6, 182, 212, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* Input group */
.ma-options-auth-field {
  margin-bottom: 1.25rem;
}

.ma-options-auth-field label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgb(var(--color-text-secondary));
  margin-bottom: 0.375rem;
}

.ma-options-auth-field .input-group .input-group-text {
  border-radius: 0.5rem 0 0 0.5rem !important;
  transition: color 0.2s;
}

body.dark-mode .ma-options-auth-field .input-group .input-group-text {
  background: rgba(11, 17, 26, 0.5) !important;
  border-color: rgba(221, 227, 234, 0.12) !important;
  color: rgb(var(--color-text-muted)) !important;
}

body:not(.dark-mode) .ma-options-auth-field .input-group .input-group-text {
  background: rgb(var(--color-bg-secondary)) !important;
  border-color: rgb(var(--color-border)) !important;
  color: rgb(var(--color-text-muted)) !important;
}

.ma-options-auth-field .input-group input {
  border-radius: 0 0.5rem 0.5rem 0 !important;
  font-family: "Inter", system-ui, sans-serif !important;
  font-size: 0.9375rem !important;
  transition: border-color 0.2s, box-shadow 0.2s !important;
  padding: 0.625rem 1rem !important;
}

body.dark-mode .ma-options-auth-field .input-group input {
  background: rgba(11, 17, 26, 0.6) !important;
  border-color: rgba(221, 227, 234, 0.12) !important;
  color: rgb(var(--color-text-primary)) !important;
}

body:not(.dark-mode) .ma-options-auth-field .input-group input {
  background: #ffffff !important;
  border-color: rgb(var(--color-border)) !important;
  color: rgb(var(--color-text-primary)) !important;
}

.ma-options-auth-field .input-group input::placeholder {
  color: rgb(var(--color-text-muted)) !important;
}

.ma-options-auth-field .input-group input:focus {
  border-color: rgba(6, 182, 212, 0.5) !important;
  box-shadow: 0 0 0 1px rgba(6, 182, 212, 0.3) !important;
  outline: none !important;
}

/* Standard input without input-group */
.ma-options-auth-field input[type="text"],
.ma-options-auth-field input[type="email"],
.ma-options-auth-field input[type="password"] {
  width: 100%;
  border-radius: 0.5rem !important;
  font-family: "Inter", system-ui, sans-serif !important;
  font-size: 0.9375rem !important;
  padding: 0.625rem 1rem !important;
  transition: border-color 0.2s, box-shadow 0.2s !important;
}

body.dark-mode .ma-options-auth-field input[type="text"],
body.dark-mode .ma-options-auth-field input[type="email"],
body.dark-mode .ma-options-auth-field input[type="password"] {
  background: rgba(11, 17, 26, 0.6) !important;
  border: 1px solid rgba(221, 227, 234, 0.12) !important;
  color: rgb(var(--color-text-primary)) !important;
}

body:not(.dark-mode) .ma-options-auth-field input[type="text"],
body:not(.dark-mode) .ma-options-auth-field input[type="email"],
body:not(.dark-mode) .ma-options-auth-field input[type="password"] {
  background: #ffffff !important;
  border: 1px solid rgb(var(--color-border)) !important;
  color: rgb(var(--color-text-primary)) !important;
}

.ma-options-auth-field input:focus {
  border-color: rgba(6, 182, 212, 0.5) !important;
  box-shadow: 0 0 0 1px rgba(6, 182, 212, 0.3) !important;
  outline: none !important;
}

/* Error labels */
.ma-options-auth-field .text-danger {
  font-size: 0.8125rem;
  margin-top: 0.25rem;
  display: block;
}

/* Primary button */
.ma-options-auth-btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(to right, rgb(6, 182, 212), rgb(59, 130, 246)) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 0.5rem !important;
  font-family: "Inter", system-ui, sans-serif !important;
  font-weight: 600 !important;
  font-size: 1rem !important;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.3) !important;
  transition: all 0.3s !important;
  text-decoration: none !important;
}

.ma-options-auth-btn-primary:hover {
  background: linear-gradient(to right, rgb(8, 145, 178), rgb(37, 99, 235)) !important;
  box-shadow: 0 0 30px rgba(6, 182, 212, 0.45) !important;
  transform: translateY(-1px);
  color: #fff !important;
}

/* Link (cyan accent) */
.ma-options-auth-link {
  color: rgb(6, 182, 212) !important;
  text-decoration: none;
  transition: color 0.2s;
}

.ma-options-auth-link:hover {
  color: rgb(8, 145, 178) !important;
}

/* Divider row */
.ma-options-auth-divider {
  position: relative;
  text-align: center;
  margin: 1.25rem 0;
}

.ma-options-auth-divider::before {
  content: '';
  position: absolute;
  inset: 50% 0 auto;
  height: 1px;
  background: rgb(var(--color-border));
}

.ma-options-auth-divider span {
  position: relative;
  padding: 0 0.75rem;
  font-size: 0.8125rem;
  color: rgb(var(--color-text-muted));
}

body.dark-mode .ma-options-auth-divider span {
  background: rgba(18, 26, 36, 0.8);
}

body:not(.dark-mode) .ma-options-auth-divider span {
  background: rgba(255, 255, 255, 0.85);
}

/* Footer note */
.ma-options-auth-footer {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.8125rem;
  color: rgb(var(--color-text-muted));
}

/* Alert */
.ma-options-auth-alert-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: rgb(239 68 68);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

body:not(.dark-mode) .ma-options-auth-alert-error {
  background: rgb(254, 242, 242);
  border-color: rgb(252, 165, 165);
  color: rgb(185, 28, 28);
}

.ma-options-auth-alert-info {
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.25);
  color: rgb(var(--color-text-secondary));
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

/* =========================================================
   LEGACY BOOTSTRAP CLASS OVERRIDES (within .ma-limits-skin)
   Targets pages that still use wrap-login100 / input100 etc.
   ========================================================= */
.ma-limits-skin .container-login100 {
  display: flex !important;
  justify-content: center;
  align-items: flex-start;
  background: transparent !important;
}

.ma-limits-skin .wrap-login100 {
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border-radius: 1rem !important;
  border: 1px solid rgba(221, 227, 234, 0.12) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35) !important;
  max-width: 440px !important;
  width: 100% !important;
}

body.dark-mode .ma-limits-skin .wrap-login100 {
  background: rgba(18, 26, 36, 0.8) !important;
}

body:not(.dark-mode) .ma-limits-skin .wrap-login100 {
  background: rgba(255, 255, 255, 0.85) !important;
  border-color: rgba(226, 232, 240, 0.8) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
}

.ma-limits-skin .login100-form-title {
  font-family: "Inter", system-ui, sans-serif !important;
  font-size: 1.2rem !important;
  font-weight: 600 !important;
  color: rgb(var(--color-text-primary)) !important;
  margin-bottom: 1.5rem !important;
  padding-bottom: 0 !important;
}

.ma-limits-skin .wrap-input100 {
  margin-bottom: 1.25rem !important;
  border: none !important;
}

body.dark-mode .ma-limits-skin .input-group-text {
  background: rgba(11, 17, 26, 0.5) !important;
  border-color: rgba(221, 227, 234, 0.12) !important;
  color: rgb(var(--color-text-muted)) !important;
  border-radius: 0.5rem 0 0 0.5rem !important;
}

body:not(.dark-mode) .ma-limits-skin .input-group-text {
  background: rgb(var(--color-bg-secondary)) !important;
  border-color: rgb(var(--color-border)) !important;
  color: rgb(var(--color-text-muted)) !important;
  border-radius: 0.5rem 0 0 0.5rem !important;
}

body.dark-mode .ma-limits-skin .input100,
body.dark-mode .ma-limits-skin .form-control {
  background: rgba(11, 17, 26, 0.6) !important;
  border-color: rgba(221, 227, 234, 0.12) !important;
  color: rgb(var(--color-text-primary)) !important;
  border-radius: 0 0.5rem 0.5rem 0 !important;
  font-family: "Inter", system-ui, sans-serif !important;
}

body:not(.dark-mode) .ma-limits-skin .input100,
body:not(.dark-mode) .ma-limits-skin .form-control {
  background: #ffffff !important;
  border-color: rgb(var(--color-border)) !important;
  color: rgb(var(--color-text-primary)) !important;
  border-radius: 0 0.5rem 0.5rem 0 !important;
  font-family: "Inter", system-ui, sans-serif !important;
}

.ma-limits-skin .input100::placeholder,
.ma-limits-skin .form-control::placeholder {
  color: rgb(var(--color-text-muted)) !important;
}

.ma-limits-skin .input100:focus,
.ma-limits-skin .form-control:focus {
  border-color: rgba(6, 182, 212, 0.5) !important;
  box-shadow: 0 0 0 1px rgba(6, 182, 212, 0.3) !important;
  outline: none !important;
}

.ma-limits-skin .container-login100-form-btn {
  margin-top: 1.5rem;
}

.ma-limits-skin .login100-form-btn {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  padding: 0.75rem 1.5rem !important;
  background: linear-gradient(to right, rgb(6, 182, 212), rgb(59, 130, 246)) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 0.5rem !important;
  font-family: "Inter", system-ui, sans-serif !important;
  font-weight: 600 !important;
  font-size: 1rem !important;
  cursor: pointer !important;
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.3) !important;
  transition: all 0.3s !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
}

.ma-limits-skin .login100-form-btn:hover {
  background: linear-gradient(to right, rgb(8, 145, 178), rgb(37, 99, 235)) !important;
  box-shadow: 0 0 30px rgba(6, 182, 212, 0.45) !important;
  transform: translateY(-1px);
  color: #fff !important;
}

/* Cyan link color inside skin */
.ma-limits-skin a.text-primary,
.ma-limits-skin .text-primary {
  color: rgb(6, 182, 212) !important;
}

.ma-limits-skin a.text-primary:hover {
  color: rgb(8, 145, 178) !important;
}

/* Grid/grid dots pattern overlay (optional, applied via class) */
.ma-options-auth-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.025;
  background-image:
    linear-gradient(rgba(6,182,212,0.6) 1px, transparent 1px),
    linear-gradient(90deg, rgba(6,182,212,0.6) 1px, transparent 1px);
  background-size: 50px 50px;
}

/* =========================================================
   BROAD INPUT-GROUP OVERRIDES inside auth card
   (catches all pages regardless of outer wrapper class)
   ========================================================= */
.ma-options-auth-card .input-group {
  flex-wrap: nowrap;
}

.ma-options-auth-card .input-group .input-group-text {
  border-radius: 0.5rem 0 0 0.5rem !important;
  min-width: 2.75rem;
  justify-content: center;
  flex-shrink: 0;
  transition: color 0.2s, background 0.2s;
}

body.dark-mode .ma-options-auth-card .input-group .input-group-text {
  background: rgba(11, 17, 26, 0.55) !important;
  border-color: rgba(221, 227, 234, 0.12) !important;
  color: rgb(var(--color-text-muted)) !important;
}

body:not(.dark-mode) .ma-options-auth-card .input-group .input-group-text {
  background: rgb(var(--color-bg-secondary)) !important;
  border-color: rgb(var(--color-border)) !important;
  color: rgb(var(--color-text-muted)) !important;
}

.ma-options-auth-card .input-group .form-control,
.ma-options-auth-card .input-group input[type="text"],
.ma-options-auth-card .input-group input[type="email"],
.ma-options-auth-card .input-group input[type="password"] {
  border-radius: 0 0.5rem 0.5rem 0 !important;
  font-family: "Inter", system-ui, sans-serif !important;
  font-size: 0.9375rem !important;
  padding: 0.625rem 1rem !important;
  line-height: 1.5 !important;
}

body.dark-mode .ma-options-auth-card .input-group .form-control,
body.dark-mode .ma-options-auth-card .input-group input[type="text"],
body.dark-mode .ma-options-auth-card .input-group input[type="email"],
body.dark-mode .ma-options-auth-card .input-group input[type="password"] {
  background: rgba(11, 17, 26, 0.6) !important;
  border-color: rgba(221, 227, 234, 0.12) !important;
  color: rgb(var(--color-text-primary)) !important;
}

body:not(.dark-mode) .ma-options-auth-card .input-group .form-control,
body:not(.dark-mode) .ma-options-auth-card .input-group input[type="text"],
body:not(.dark-mode) .ma-options-auth-card .input-group input[type="email"],
body:not(.dark-mode) .ma-options-auth-card .input-group input[type="password"] {
  background: #ffffff !important;
  border-color: rgb(var(--color-border)) !important;
  color: rgb(var(--color-text-primary)) !important;
}

.ma-options-auth-card .input-group .form-control::placeholder,
.ma-options-auth-card .input-group input::placeholder {
  color: rgb(var(--color-text-muted)) !important;
  opacity: 1;
}

.ma-options-auth-card .input-group .form-control:focus,
.ma-options-auth-card .input-group input:focus {
  border-color: rgba(6, 182, 212, 0.5) !important;
  box-shadow: 0 0 0 1px rgba(6, 182, 212, 0.3) !important;
  outline: none !important;
  z-index: 3;
}

/* Focus glow ripples to the icon too */
.ma-options-auth-card .input-group:focus-within .input-group-text {
  border-color: rgba(6, 182, 212, 0.4) !important;
  color: rgb(6, 182, 212) !important;
}

/* Card top accent gradient bar */
.ma-options-auth-card {
  border-top: 2px solid transparent;
  background-clip: padding-box;
  position: relative;
}

.ma-options-auth-card::before {
  content: '';
  position: absolute;
  top: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(to right, rgb(6, 182, 212), rgb(59, 130, 246), rgba(139,92,246,0.4));
  border-radius: 1rem 1rem 0 0;
  pointer-events: none;
}

/* Logo sizing consistency */
.ma-options-auth-logo img {
  max-height: 72px;
  width: auto;
  display: block;
  margin: 0 auto;
}

/* Auth wrap — ensure proper centering even when page is short */
.ma-options-auth-wrap {
  min-height: 100vh;
}

/* Smooth hover on auth links */
.ma-options-auth-footer a,
.ma-options-auth-footer a:visited {
  color: rgb(6, 182, 212);
  text-decoration: none;
  transition: color 0.2s;
}

.ma-options-auth-footer a:hover {
  color: rgb(8, 145, 178);
}

/* Dark text fallback in footer */
.ma-options-auth-card .text-dark {
  color: rgb(var(--color-text-secondary)) !important;
}

/* Checkbox styling */
.ma-options-auth-card input[type="checkbox"] {
  accent-color: rgb(6, 182, 212);
  width: 1rem;
  height: 1rem;
  cursor: pointer;
}

/* Alert styling inside card */
.ma-options-auth-card .alert-success,
.ma-options-auth-card .alert-danger,
.ma-options-auth-card .alert-warning {
  border-radius: 0.5rem;
  font-size: 0.875rem;
  border: 1px solid;
}

body.dark-mode .ma-options-auth-card .alert-success {
  background: rgba(34, 197, 94, 0.1) !important;
  border-color: rgba(34, 197, 94, 0.3) !important;
  color: rgb(74, 222, 128) !important;
}

body.dark-mode .ma-options-auth-card .alert-danger {
  background: rgba(239, 68, 68, 0.1) !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
  color: rgb(248, 113, 113) !important;
}

/* Ensure .ma-options-auth-card does NOT inherit from Bootstrap's .card default white bg */
body.dark-mode .ma-options-auth-card.card {
  background: rgba(18, 26, 36, 0.8) !important;
  border: 1px solid rgba(221, 227, 234, 0.12) !important;
}

/* =========================================================
   BOOTSTRAP CARD OVERRIDES inside .ma-limits-skin
   Covers user settings, dashboard cards, and inner pages
   ========================================================= */
body.dark-mode .ma-limits-skin .card {
  background: rgba(31, 41, 55, 0.85) !important;
  border: 1px solid rgba(55, 65, 81, 0.8) !important;
  border-radius: 0.625rem !important;
}

body:not(.dark-mode) .ma-limits-skin .card {
  background: #ffffff !important;
  border: 1px solid rgb(var(--color-border)) !important;
  border-radius: 0.625rem !important;
}

body.dark-mode .ma-limits-skin .card-header {
  background: rgba(17, 24, 39, 0.6) !important;
  border-bottom: 1px solid rgba(55, 65, 81, 0.8) !important;
  color: rgb(var(--color-text-primary)) !important;
}

body:not(.dark-mode) .ma-limits-skin .card-header {
  background: rgb(var(--color-bg-secondary)) !important;
  border-bottom: 1px solid rgb(var(--color-border)) !important;
  color: rgb(var(--color-text-primary)) !important;
}

.ma-limits-skin .card-title {
  font-family: "Inter", system-ui, sans-serif !important;
  font-weight: 600 !important;
  color: rgb(var(--color-text-primary)) !important;
}

.ma-limits-skin .card-body {
  color: rgb(var(--color-text-secondary)) !important;
}

body.dark-mode .ma-limits-skin .card-body {
  background: transparent !important;
}

/* Form controls within ma-limits-skin (settings forms etc.) */
.ma-limits-skin .form-control {
  font-family: "Inter", system-ui, sans-serif !important;
  border-radius: 0.375rem !important;
}

body.dark-mode .ma-limits-skin .form-control {
  background: rgba(17, 24, 39, 0.7) !important;
  border-color: rgba(55, 65, 81, 0.8) !important;
  color: rgb(var(--color-text-primary)) !important;
}

body.dark-mode .ma-limits-skin .form-control:focus {
  background: rgba(11, 17, 26, 0.8) !important;
  border-color: rgba(6, 182, 212, 0.5) !important;
  box-shadow: 0 0 0 1px rgba(6, 182, 212, 0.25) !important;
}

/* Buttons within settings */
.ma-limits-skin .btn-primary {
  background: linear-gradient(to right, rgb(6, 182, 212), rgb(59, 130, 246)) !important;
  border: none !important;
  font-family: "Inter", system-ui, sans-serif !important;
  box-shadow: 0 0 16px rgba(6, 182, 212, 0.25) !important;
  transition: all 0.2s !important;
}

.ma-limits-skin .btn-primary:hover {
  background: linear-gradient(to right, rgb(8, 145, 178), rgb(37, 99, 235)) !important;
  box-shadow: 0 0 24px rgba(6, 182, 212, 0.35) !important;
}

/* Table overrides */
body.dark-mode .ma-limits-skin table.table {
  color: rgb(var(--color-text-secondary)) !important;
}

body.dark-mode .ma-limits-skin .table thead th {
  background: rgba(17, 24, 39, 0.6) !important;
  border-color: rgba(55, 65, 81, 0.8) !important;
  color: rgb(var(--color-text-muted)) !important;
  font-size: 0.75rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
}

body.dark-mode .ma-limits-skin .table td {
  border-color: rgba(55, 65, 81, 0.4) !important;
}

body.dark-mode .ma-limits-skin .table-hover tbody tr:hover {
  background: rgba(55, 65, 81, 0.3) !important;
}
