/* === Acroclinic Default (scoped) - Dark theme by default ============================= */
/* Owiń widok w .msc-theme */
.msc-theme {
  --msc-bg: #040404;
  --msc-surface: #0d0d0d;
  --msc-surface-alt: #131313;
  --msc-text: #e9ecef;
  --msc-text-strong: #f5f7fa;
  --msc-text-muted: #98a2ad;
  --msc-border: #262626;
  --msc-border-dim: #1a1a1a;
  --msc-shadow: 0 2px 10px -4px rgba(0, 0, 0, .7), 0 0 0 1px rgba(0, 0, 0, .3);
  --msc-shadow-soft: 0 1px 6px rgba(0, 0, 0, .5);
  --msc-accent: #f59e0b;
  --msc-accent-dark: #d97706;
  --msc-accent-light: #fbbf24;
  --msc-black: #000;
  --msc-white: #fff;
  --msc-success: #38a169;
  --msc-warning: #d69e2e;
  --msc-error: #e53e3e;
  background: var(--msc-bg);
  color: var(--msc-text);
}

/* Always-on theme palettes (work in both light/dark OS modes) */
.msc-theme-gold {
  --msc-bg: #040404;
  --msc-surface: #0d0d0d;
  --msc-surface-alt: #131313;
  --msc-border: #262626;
  --msc-border-faint: #1a1a1a;
  --msc-text: #e9ecef;
  --msc-text-dim: #98a2ad;
  --msc-accent: #f59e0b;
  --msc-accent-alt: #fbbf24;
  --msc-accent-rgb: 245, 158, 11;
  color: var(--msc-text);
}

.msc-theme-emerald {
  --msc-bg: #03120d;
  --msc-surface: #0b1f18;
  --msc-surface-alt: #0f2720;
  --msc-border: #16352b;
  --msc-border-faint: #0c1d17;
  --msc-text: #e6f8f2;
  --msc-text-dim: #95b9ae;
  --msc-accent: #10b981;
  --msc-accent-alt: #34d399;
  --msc-accent-rgb: 16, 185, 129;
  color: var(--msc-text);
}

/* Softer gold variant (calmer, less saturated) */
.msc-theme-gold.msc-gold-soft {
  --msc-accent: #e0b64a;
  --msc-accent-alt: #f0cf74;
  --msc-accent-rgb: 224, 182, 74;
  --msc-text: #e8ecef;
}

.msc-theme-gold.msc-gold-soft .msc-d-top h1 {
  color: #e6c46a;
  text-shadow: 0 0 10px rgba(224, 182, 74, .16), 0 1px 2px rgba(0, 0, 0, .35);
}

.msc-theme-gold.msc-gold-soft .msc-d-nav a.active,
.msc-theme-gold.msc-gold-soft .msc-d-nav a:hover {
  background: linear-gradient(90deg, rgba(var(--msc-accent-rgb), .13), rgba(var(--msc-accent-rgb), .045));
}

.msc-theme-gold.msc-gold-soft .msc-settings-btn-primary {
  background: linear-gradient(90deg, var(--msc-accent), var(--msc-accent-alt));
  color: #111;
}

.msc-theme-gold.msc-gold-soft .msc-table thead th {
  color: #e7c063;
}

.msc-theme-gold.msc-gold-soft .msc-icon-btn {
  box-shadow: 0 2px 8px rgba(0, 0, 0, .35), 0 0 0 1px #2a220f;
}

/* Dashboard wrapper: ensure full-viewport black canvas (scoped to body.msc-abs-black) */
body.msc-abs-black .msc-theme-wrapper {
  position: relative;
  background: #000 !important;
}

body.msc-abs-black .msc-theme-wrapper::before {
  content: "";
  position: fixed;
  inset: 0;
  background: #000;
  z-index: -1;
}

/* When the global net is active, keep wrappers transparent so the canvas is visible */
body.msc-has-net .msc-theme-wrapper {
  background: transparent !important;
}

body.msc-has-net .msc-theme-wrapper::before {
  display: none !important;
}

body.msc-has-net .msc-theme {
  background: transparent !important;
}

/* Gold theme: generic form controls always dark (prevents white flash on focus) */
.msc-theme-gold input[type="text"],
.msc-theme-gold input[type="email"],
.msc-theme-gold input[type="password"],
.msc-theme-gold input[type="date"],
.msc-theme-gold input[type="time"],
.msc-theme-gold input[type="number"],
.msc-theme-gold select,
.msc-theme-gold textarea {
  background: #0d0d0d !important;
  border: 1px solid #2a2a2a !important;
  color: #e9ecef !important;
  box-shadow: none !important;
}

.msc-theme-gold input:focus,
.msc-theme-gold select:focus,
.msc-theme-gold textarea:focus {
  outline: none;
  border-color: #f59e0b !important;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, .35) !important;
  background: #111 !important;
}

.msc-theme-gold ::placeholder {
  color: #7c8792;
  opacity: .8;
}

/* Settings: explicit dark styling outside media query (always-on) */
.msc-theme-gold .msc-settings-panel {
  background: #0f0f0f;
  border: 1px solid #222;
  box-shadow: 0 10px 36px -12px rgba(0, 0, 0, .7), 0 0 0 1px #111;
}

.msc-theme-gold .msc-settings-label {
  color: #e9ecef;
}

.msc-theme-gold .msc-settings-help {
  color: #9aa2ad;
}

.msc-theme-gold .msc-settings-input,
.msc-theme-gold .msc-settings-select,
.msc-theme-gold .msc-settings-time {
  background: #0d0d0d;
  border: 1px solid #2a2a2a;
  color: #e9ecef;
  border-radius: 10px;
  box-shadow: none;
}

.msc-theme-gold .msc-settings-input:focus,
.msc-theme-gold .msc-settings-select:focus,
.msc-theme-gold .msc-settings-time:focus {
  outline: none;
  border-color: #f59e0b;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, .35);
  background: #111;
}

.msc-theme-gold .msc-settings-switch {
  background: linear-gradient(90deg, var(--msc-accent) 0%, var(--msc-accent-alt, var(--msc-accent)) var(--msc-switch-fill, 0%), #121212 var(--msc-switch-fill, 0%), #121212 100%);
  border: 1px solid #2a2a2a;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .35);
}

.msc-theme-gold .msc-settings-switch::after {
  background: #e5e7eb;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .5);
}

.msc-theme-gold .msc-settings-checkbox:checked+.msc-settings-switch {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
  border-color: #614000;
}

.msc-theme-gold .msc-settings-checkbox:checked+.msc-settings-switch {
  --msc-switch-x: 24px;
}

.msc-theme-gold .msc-settings-btn-primary {
  background: linear-gradient(130deg, #fde68a 0%, #fbbf24 45%, #f59e0b 75%, #d97706 100%);
  color: #1a1200;
  border: none;
  box-shadow: 0 12px 32px -14px rgba(251, 191, 36, .7), 0 0 0 1px rgba(251, 214, 134, .45);
  text-shadow: 0 1px 0 rgba(255, 255, 255, .4);
}

.msc-theme-gold .msc-settings-actions {
  border-top: 1px solid #1b1b1b;
}

/* strengthen section headers/help in gold theme */
.msc-theme-gold .msc-settings-section-title {
  color: #f4f7fa;
}

.msc-theme-gold .msc-settings-section-desc {
  color: #aab4be;
}

/* Auth headings in gold */
.msc-theme-gold .msc-auth-context,
.msc-theme-gold .msc-auth-header h1 {
  color: #fbbf24 !important;
  text-shadow: 0 0 10px rgba(251, 191, 36, .12);
}

/* Dashboard top title gold */
.msc-theme-gold .msc-d-top h1,
.msc-theme-gold .msc-d-brand,
.msc-theme-gold .msc-d-title {
  color: #fbbf24 !important;
  text-shadow: 0 0 10px rgba(251, 191, 36, .12);
}

/* === WSIZ Variant (two-column: left image, right red block, white login card) */
.msc-auth-wsiz {
  --wsiz-red: #aa1428;
  --wsiz-red-dark: #8d0f20;
  --wsiz-card-w: 560px;
  --wsiz-gap: 68px;
}

.msc-auth-wsiz.msc-auth-shell {
  background: #ffffff;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 52vw 1fr;
  position: relative;
  padding: 0;
  margin: 0;
}

.msc-auth-shell,
#msc-auth,
#msc-login {
  position: relative;
  z-index: 2;
}

.msc-auth-wsiz .msc-auth-side {
  display: none !important;
}

.msc-auth-wsiz:before {
  content: "";
  position: relative;
}

.msc-auth-wsiz:before {
  grid-column: 1/2;
  background: #000;
}

.msc-auth-wsiz .msc-auth-main {
  grid-column: 2/3;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 140px 40px 140px;
  background: linear-gradient(0deg, var(--wsiz-red-dark) 0%, var(--wsiz-red) 80%);
}

.msc-auth-wsiz .msc-auth-panels {
  width: 100%;
  display: flex;
  justify-content: center;
}

.msc-auth-wsiz .msc-auth-panel {
  background: #ffffff;
  color: #222;
  width: 100%;
  max-width: var(--wsiz-card-w);
  border: 1px solid #d9d9d9;
  box-shadow: 0 12px 42px -10px rgba(0, 0, 0, .28), 0 4px 16px -4px rgba(0, 0, 0, .18);
  border-radius: 0;
  padding: 56px 46px 60px;
  font-size: .85rem;
}

.msc-auth-wsiz .msc-auth-panel h2 {
  margin: 0 0 18px;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: .4px;
  text-align: center;
  color: #0d0d0d;
}

.msc-auth-wsiz .msc-auth-note {
  font-size: .62rem;
  line-height: 1.35;
  letter-spacing: .35px;
  margin: -6px 0 26px;
  text-align: center;
  color: #111;
  max-width: var(--wsiz-card-w);
}

.msc-auth-wsiz .msc-auth-tabs {
  display: none !important;
}

.msc-auth-wsiz .msc-auth-panel+.msc-auth-panel {
  display: none !important;
}

.msc-auth-wsiz .msc-field label {
  font-size: .65rem;
  font-weight: 600;
  letter-spacing: .55px;
  color: #222;
}

.msc-auth-wsiz .msc-field input {
  background: #fff;
  border: 1px solid #c9c9c9;
  border-radius: 0;
  padding: 10px 12px;
  font-size: .8rem;
}

.msc-auth-wsiz .msc-field input:focus {
  outline: 2px solid var(--wsiz-red);
  outline-offset: 2px;
  border-color: var(--wsiz-red);
}

.msc-auth-wsiz .msc-btn-primary {
  background: var(--wsiz-red);
  border: none;
  border-radius: 0;
  padding: 14px 20px;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .5px;
}

.msc-auth-wsiz .msc-btn-primary:hover {
  filter: brightness(1.05);
}

.msc-auth-wsiz .msc-btn-primary:active {
  filter: brightness(.92);
}

.msc-auth-wsiz .msc-btn-primary:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(205, 14, 46, .5);
}

.msc-auth-wsiz .msc-alt-links {
  margin-top: 16px;
  font-size: .58rem;
  letter-spacing: .4px;
  text-align: center;
  color: #222;
}

.msc-auth-wsiz .msc-alt-links a {
  color: var(--wsiz-red);
  font-weight: 600;
}

.msc-auth-wsiz .msc-alt-links a:hover {
  text-decoration: underline;
}

.msc-auth-wsiz .msc-feedback {
  font-size: .62rem;
  min-height: 18px;
  text-align: center;
}

.msc-auth-wsiz .msc-auth-context {
  display: none;
}

.msc-auth-wsiz .msc-auth-logo-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-bottom: 30px;
}

.msc-auth-wsiz .msc-auth-logo-top img {
  max-width: 200px;
  height: auto;
}

.msc-auth-wsiz .msc-auth-forgot {
  text-align: center;
  margin-top: 18px;
  font-size: .62rem;
}

.msc-auth-wsiz .msc-auth-forgot a {
  color: #222;
  text-decoration: none;
}

.msc-auth-wsiz .msc-auth-forgot a:hover {
  text-decoration: underline;
}

@media (max-width:1200px) {
  .msc-auth-wsiz.msc-auth-shell {
    grid-template-columns: 1fr;
  }

  .msc-auth-wsiz:before {
    display: none;
  }

  .msc-auth-wsiz .msc-auth-main {
    padding: 120px 26px 120px;
  }
}

@media (max-width:640px) {
  .msc-auth-wsiz .msc-auth-panel {
    padding: 46px 32px 54px;
  }
}

/* === Refined Minimal Variant (PERFECT CENTERING) ========================= */
:root {
  --refine-bg: #000000;
}

.msc-auth-refine {
  --refine-width: 560px;
  --refine-radius: 20px;
  --refine-accent: #f59e0b;
  --refine-accent-alt: #fbbf24;
  --refine-panel: #000000;
  --refine-panel-border: #1e1e1e;
  --refine-field: #0e0e0e;
  --refine-field-border: #262626;
  --refine-bg: #000000;
  --refine-text: #e9eef1;
  --refine-label: #9aaab4;
  --refine-muted: #6f7d85;
}

/* Perfect centered shell */
.msc-auth-refine.msc-auth-shell {
  background: var(--refine-bg);
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 50px 20px;
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  margin: 0;
  box-sizing: border-box;
}

/* Black variant */
.msc-auth-black .msc-auth-shell {
  background: #000 !important;
}

.msc-auth-black #msc-auth.msc-auth-shell {
  position: relative;
  width: 100vw;
  max-width: 100vw !important;
  margin: 0;
  transform: none;
}

body.msc-auth-stretch #msc-auth.msc-auth-refine.msc-auth-shell {
  width: 100vw;
  max-width: 100vw;
  padding: 60px 20px;
}

/* Subtle animated background - performance optimized */
.msc-auth-refine.msc-auth-shell::before,
.msc-auth-refine.msc-auth-shell::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.msc-auth-refine.msc-auth-shell::before {
  background: none;
}

.msc-auth-refine.msc-auth-shell::after {
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .006) 0 1px, transparent 1px 80px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .004) 0 1px, transparent 1px 60px);
  mask: linear-gradient(180deg, transparent 0 10%, #000 25% 75%, transparent 90% 100%);
  opacity: .15;
}

/* Animacja tylko na małych/średnich ekranach (nie obciąża dużych monitorów) */
@media (max-width: 1920px) and (prefers-reduced-motion: no-preference) {
  .msc-auth-refine.msc-auth-shell::after {
    will-change: transform;
    animation: mscAuthGrid 120s linear infinite;
  }
}

@keyframes mscAuthGrid {
  0% {
    transform: translate3d(0, 0, 0);
  }

  100% {
    transform: translate3d(0, -180px, 0);
  }
}

/* Main container - PERFECTLY CENTERED */
.msc-auth-refine .msc-auth-main {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: var(--refine-width);
  margin: 0 auto;
}

.msc-auth-hero {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 0 20px 30px;
  display: flex;
  justify-content: center;
}

.msc-auth-hero-inner {
  max-width: 100%;
  text-align: center;
}

.msc-auth-hero-title {
  margin: 0 0 12px;
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  letter-spacing: .6px;
  font-weight: 800;
  background: linear-gradient(180deg, #fde68a, #f59e0b);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 6px 20px rgba(0, 0, 0, .55));
}

.msc-auth-hero-tag {
  margin: 0;
  font-size: clamp(.82rem, 1vw, .95rem);
  line-height: 1.5;
  color: #94a3b8;
  font-weight: 500;
  letter-spacing: .3px;
}

/* Optional logo */
.msc-auth-logo {
  width: 100px;
  max-width: 30vw;
  height: auto;
  margin: 0 0 20px;
  filter: drop-shadow(0 6px 20px rgba(0, 0, 0, .6));
  opacity: .96;
  transition: transform .6s cubic-bezier(.65, .05, .36, 1), filter .4s;
}

.msc-auth-logo:hover {
  transform: translateY(-3px) scale(1.03);
  filter: drop-shadow(0 10px 28px rgba(0, 0, 0, .75));
}

@media (max-width:760px) {
  .msc-auth-hero {
    padding: 0 16px 20px;
  }

  .msc-auth-hero-title {
    font-size: 1.8rem;
  }
}

/* Black variant keeps components dark but allows refine visuals if present */

/* Banners */
.msc-auth-banners {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 10px 0 24px;
}

.msc-auth-banner {
  position: relative;
  padding: 14px 18px 14px 54px;
  border: 1px solid #1f2933;
  border-radius: 14px;
  background: #070707;
  color: #d6e2ee;
  font-size: .73rem;
  letter-spacing: .4px;
  line-height: 1.5;
  box-shadow: 0 6px 24px -10px rgba(0, 0, 0, .7), 0 0 0 1px #111;
  overflow: hidden;
}

.msc-auth-banner:before {
  content: "";
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  box-shadow: 0 4px 14px -4px rgba(245, 158, 11, .9);
}

.msc-auth-banner.success:before {
  background: linear-gradient(135deg, #16a34a, #15803d);
  box-shadow: 0 4px 14px -4px rgba(21, 128, 61, .85);
}

.msc-auth-banner.warn:before {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  box-shadow: 0 4px 14px -4px rgba(217, 119, 6, .85);
}

.msc-auth-banner.error:before {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  box-shadow: 0 4px 14px -4px rgba(185, 28, 28, .85);
}

.msc-auth-banner strong {
  color: #fff;
  font-weight: 600;
}

/* Kill-switch: hide any legacy close buttons injected by cache/theme */
.msc-auth-banner .msc-auth-banner-close {
  display: none !important;
}

/* Loading overlay */
.msc-auth-loading {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 50%, rgba(20, 20, 20, .9), rgba(0, 0, 0, .98));
  backdrop-filter: blur(6px);
}

.msc-auth-spinner {
  width: 86px;
  height: 86px;
  position: relative;
  --c1: #f59e0b;
  --c2: #fbbf24;
}

.msc-auth-spinner:before,
.msc-auth-spinner:after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  animation: mscSpin 1.4s linear infinite;
  border: 6px solid transparent;
}

.msc-auth-spinner:before {
  border-top-color: var(--c1);
  border-right-color: var(--c2);
  filter: drop-shadow(0 0 8px rgba(245, 158, 11, .55));
}

.msc-auth-spinner:after {
  border-bottom-color: var(--c2);
  border-left-color: var(--c1);
  animation-direction: reverse;
  filter: drop-shadow(0 0 8px rgba(251, 191, 36, .45));
}

@keyframes mscSpin {
  0% {
    transform: rotate(0deg) scale(1);
  }

  50% {
    transform: rotate(180deg) scale(.92);
  }

  100% {
    transform: rotate(360deg) scale(1);
  }
}

/* Accessible motion preference */
@media (prefers-reduced-motion:reduce) {

  .msc-auth-refine.msc-auth-shell::before,
  .msc-auth-refine.msc-auth-shell::after {
    animation: none;
    background: none;
    filter: none;
  }
}

/* === GLOBAL LIGHT THEME FOR DASHBOARD ===== */
/* Removed global body override; theming is now scoped via wrappers (.msc-theme, .msc-theme-gold, etc.) */

/* Only apply black background when specifically requested for auth pages */
body.msc-auth-full-bg {
  background: #000 !important;
}

body.msc-auth-full-bg * {
  background-image: none !important;
}

/* Scope sizing reset to plugin wrappers to avoid global theme impact */
.msc-theme-wrapper *,
.msc-theme-wrapper *::before,
.msc-theme-wrapper *::after,
#msc-auth *,
#msc-auth *::before,
#msc-auth *::after,
#msc-login *,
#msc-login *::before,
#msc-login *::after,
#msc-register *,
#msc-register *::before,
#msc-register *::after,
#msc-reset *,
#msc-reset *::before,
#msc-reset *::after {
  box-sizing: border-box;
}

body.msc-auth-full-bg #page,
body.msc-auth-full-bg .site,
body.msc-auth-full-bg .elementor,
body.msc-auth-full-bg .e-con,
body.msc-auth-full-bg .e-con-inner,
body.msc-auth-full-bg .elementor-section,
body.msc-auth-full-bg .elementor-container,
body.msc-auth-full-bg .elementor-column,
body.msc-auth-full-bg .elementor-widget-wrap,
body.msc-auth-full-bg .elementor-kit,
body.msc-auth-full-bg .elementor-top-section {
  background: transparent !important;
  box-shadow: none !important;
}

body.msc-auth-full-bg *[style*="background"],
body.msc-auth-full-bg *[style*="background-color"] {
  background: transparent !important;
}

body.msc-auth-full-bg:before {
  content: "";
  position: fixed;
  inset: 0;
  background: #000;
  z-index: -3;
}

/* Remove central boxed max-width visual columns in Elementor canvas */
body.msc-auth-full-bg .elementor.e-con-boxed>.e-con-inner,
body.msc-auth-full-bg .elementor-section .elementor-container {
  max-width: 100% !important;
  padding: 0 !important;
}

body.msc-auth-full-bg .elementor {
  width: 100% !important;
}

/* When lightning canvas present, hide blob layer to prevent muddy mix */
body.msc-auth-full-bg .msc-bg-lightning~#msc-auth.msc-auth-refine.msc-auth-shell::before {
  display: none !important;
}

/* Global background override for auth pages */
body.msc-auth-full-bg {
  background: var(--refine-bg) !important;
  background-color: var(--refine-bg) !important;
  background-image: none !important;
}

/* Ensure uniform background for auth pages */
body.msc-auth-full-bg {
  background: var(--refine-bg) !important;
}

body.msc-auth-full-bg *:not(.msc-auth-shell):not(.msc-auth-shell *) {
  background: transparent !important;
}

/* Force uniform background on Elementor containers */
body.msc-auth-full-bg .elementor,
body.msc-auth-full-bg .elementor-element,
body.msc-auth-full-bg .e-con,
body.msc-auth-full-bg .e-con-inner,
body.msc-auth-full-bg .elementor-widget,
body.msc-auth-full-bg .elementor-shortcode,
body.msc-auth-full-bg .msc-modern {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
}

/* Override any Elementor background styles */
body.msc-auth-full-bg::before,
body.msc-auth-full-bg::after,
body.msc-auth-full-bg *::before,
body.msc-auth-full-bg *::after {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
}

/* Ensure the main auth shell has proper background */
body.msc-auth-full-bg .msc-auth-shell.msc-auth-refine {
  background: var(--refine-bg) !important;
}

.msc-auth-refine .msc-auth-main {
  width: 100%;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: stretch;
  padding: 0;
  margin: 0 auto;
  box-sizing: border-box;
}

.msc-auth-refine .msc-auth-header,
.msc-auth-refine .msc-auth-tabs,
.msc-auth-refine .msc-auth-panels {
  width: 100%;
  box-sizing: border-box;
}

.msc-modern.msc-auth-black {
  max-width: none !important;
  width: 100%;
}

.msc-auth-refine .msc-auth-header {
  margin-bottom: 0;
  text-align: center;
  padding: 0;
}

.msc-auth-refine .msc-auth-context {
  margin: 0 0 12px;
  text-align: center;
  font-size: clamp(1.4rem, 3.5vw, 1.75rem);
  font-weight: 700;
  letter-spacing: .3px;
  color: var(--refine-text);
  line-height: 1.2;
}

.msc-auth-refine .msc-auth-tabs {
  display: flex;
  gap: 4px;
  position: relative;
  margin: 4px 0 2px;
  justify-content: stretch;
  border-bottom: 1px solid #1d2b36;
  padding: 0;
  box-sizing: border-box;
}

.msc-auth-refine .msc-auth-tab {
  flex: 1;
  appearance: none;
  -webkit-appearance: none;
  background: #0d0d0d;
  border: 1px solid #1f1f1f;
  border-bottom: none;
  margin: 0;
  border-radius: 10px 10px 0 0;
  color: #a6b6c2;
  font-size: clamp(.68rem, 2vw, .75rem);
  letter-spacing: .2px;
  font-weight: 600;
  padding: 10px 8px 9px;
  position: relative;
  cursor: pointer;
  transition: color .35s, background .35s, border-color .35s, box-shadow .45s;
  text-align: center;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.msc-auth-refine .msc-auth-tab:focus-visible {
  outline: 2px solid var(--refine-accent);
  outline-offset: 2px;
}

.msc-auth-refine .msc-auth-tab:hover {
  color: #ffffff;
  background: #1a1f27;
  border-color: #345d96;
  box-shadow: 0 4px 14px -6px rgba(0, 0, 0, .65);
}

.msc-auth-refine .msc-auth-tab.active,
.msc-auth-refine .msc-auth-tab[aria-selected="true"] {
  color: #ffffff;
  background: #243041;
  border-color: #3980e0;
  box-shadow: 0 6px 26px -8px rgba(0, 0, 0, .78), 0 0 0 1px #214c7e inset;
}

.msc-auth-refine .msc-auth-tab.active::after,
.msc-auth-refine .msc-auth-tab[aria-selected="true"]::after {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: -2px;
  height: 3px;
  background: linear-gradient(90deg, #3b82f6, #60a5fa, #3b82f6);
  border-radius: 3px;
  box-shadow: 0 0 10px -1px rgba(59, 130, 246, .85), 0 0 2px 0 rgba(59, 130, 246, .55);
}


.msc-auth-refine .msc-auth-panel {
  background: #030303 !important;
  border: 1px solid #1f1f1f;
  border-radius: 20px;
  padding: 32px 28px 36px;
  color: var(--refine-text);
  box-shadow: 0 4px 14px -6px rgba(0, 0, 0, .65), 0 0 0 1px #121212;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  overflow: visible;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

@media (min-width:760px) {
  .msc-auth-refine .msc-auth-panel {
    padding: 48px 54px 54px;
  }

  .msc-auth-refine .msc-grid-2 {
    gap: 20px 22px;
  }
}

@media (min-width:1020px) {
  .msc-auth-refine .msc-grid-2 {
    gap: 26px 28px;
  }

  .msc-auth-refine .msc-auth-panel {
    padding: 54px 60px 60px;
  }
}

/* === Wide Auth Layout ===================================================== */
.msc-auth-wide .msc-auth-main {
  max-width: clamp(900px, 90vw, 1280px);
}

.msc-auth-wide .msc-auth-panels {
  display: grid;
  grid-template-columns: 1fr;
}

.msc-auth-wide .msc-auth-panel {
  max-width: 100%;
}

/* Side-by-side layout when multiple panels visible (future) */
@media (min-width:1040px) {
  .msc-auth-wide .msc-auth-panels.multi {
    grid-template-columns: repeat(auto-fit, minmax(440px, 1fr));
    gap: 40px 46px;
    align-items: start;
  }

  .msc-auth-wide .msc-auth-panels.multi .msc-auth-panel {
    height: 100%;
  }
}

/* Widen single active panel container */
@media (min-width:1040px) {
  .msc-auth-wide .msc-auth-panel:not(.hidden) {
    width: 100%;
  }
}

/* For register form with grid: allow 2 columns to breathe */
@media (min-width:900px) {
  .msc-auth-wide .msc-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 34px;
  }

  .msc-auth-wide .msc-auth-panel {
    padding: 60px 70px 66px;
  }

  .msc-auth-wide .msc-panel-head {
    margin-bottom: 12px;
  }
}

@media (min-width:1180px) {
  .msc-auth-wide .msc-auth-panel {
    padding: 66px 86px 74px;
  }

  .msc-auth-wide .msc-grid-2 {
    gap: 34px 40px;
  }
}

/* === Full Width Variant =================================================== */
.msc-auth-full .msc-auth-main {
  width: 100%;
  max-width: clamp(960px, 85vw, 1280px);
  padding-left: 2.5rem;
  padding-right: 2.5rem;
  margin: 0 auto;
}

.msc-auth-full .msc-auth-panel {
  max-width: clamp(820px, 72vw, 1180px);
  margin: 0 auto;
}

/* Ultra full width override */
/* Bleed variant (only if class present) */
.msc-auth-full.msc-auth-bleed .msc-auth-panel {
  max-width: none !important;
  width: 100vw !important;
  margin-left: calc(-50vw + 50%);
  padding-left: 4vw;
  padding-right: 6vw;
  border-radius: 0;
  border-left: none;
  border-right: none;
}

.msc-auth-full.msc-auth-bleed .msc-auth-main {
  padding-left: 0;
  padding-right: 0;
  max-width: none;
}

@media (min-width:1400px) {
  .msc-auth-full.msc-auth-bleed .msc-auth-panel {
    padding-left: 3vw;
    padding-right: 5vw;
  }
}

/* Reduce vertical padding / height footprint */
.msc-auth-full.msc-auth-bleed .msc-auth-panel {
  padding-top: 46px;
  padding-bottom: 54px;
}

@media (min-width:1180px) {
  .msc-auth-full.msc-auth-bleed .msc-auth-panel {
    padding-top: 52px;
    padding-bottom: 60px;
  }
}

/* === Visual Spec Layout (moderate centered) =============================== */
.msc-auth-visual .msc-auth-main {
  max-width: 820px;
  width: 100%;
  padding: 0 40px 40px;
  margin: 0 auto;
}

.msc-auth-visual .msc-auth-panel {
  max-width: 620px;
  margin: 40px auto 0;
  padding: 46px 54px 56px;
  border-radius: 34px;
}

/* Center header, tabs, and panel wrapper to align visually on large screens */
#msc-auth.msc-auth-visual .msc-auth-main {
  align-items: center;
}

#msc-auth.msc-auth-visual .msc-auth-header,
#msc-auth.msc-auth-visual .msc-auth-tabs,
#msc-auth.msc-auth-visual .msc-auth-panels {
  width: 100%;
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
}

#msc-auth.msc-auth-visual .msc-auth-context {
  text-align: center;
}

.msc-auth-visual .msc-auth-tabs {
  max-width: 620px;
  margin: 30px auto 0;
}

.msc-auth-visual .msc-auth-banners {
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
}

.msc-auth-visual .msc-auth-context {
  text-align: center;
}

@media (max-width:760px) {
  .msc-auth-visual .msc-auth-main {
    padding: 0 22px 40px;
  }

  .msc-auth-visual .msc-auth-panel {
    margin-top: 30px;
    padding: 40px 34px 48px;
    border-radius: 28px;
  }

  .msc-auth-visual .msc-auth-tabs {
    margin-top: 24px;
  }
}

@media (max-width:380px) {
  .msc-d-brand {
    font-size: .9rem;
  }

  .msc-d-nav {
    gap: 6px;
  }

  .msc-d-nav a {
    padding: 7px 10px;
    font-size: .7rem;
  }
}

/* === Fit (single-screen, no scroll) ======================================= */
.msc-auth-fit.msc-auth-shell {
  min-height: 100vh;
  height: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.msc-auth-fit .msc-auth-hero {
  width: 100%;
  max-width: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 0 30px;
  margin: 0 auto;
}

.msc-auth-fit .msc-auth-main {
  width: 100%;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 0;
  margin: 0 auto;
}

.msc-auth-fit .msc-auth-header {
  margin-bottom: 0;
}

.msc-auth-fit .msc-auth-banners {
  margin: 2px 0 8px;
}

.msc-auth-fit .msc-auth-tabs {
  margin: 0 0 4px;
}

.msc-auth-fit .msc-auth-panel {
  margin: 0;
  padding: 32px 28px 36px;
}

@media (max-width:360px) {
  .msc-auth-fit.msc-auth-shell {
    padding: 24px 12px;
  }

  .msc-auth-fit .msc-auth-hero {
    padding: 8px 0 16px;
  }

  .msc-auth-fit .msc-auth-main {
    max-width: 100%;
    gap: 16px;
  }

  .msc-auth-fit .msc-auth-panel {
    padding: 20px 14px 24px;
  }
}

@media (min-width:361px) and (max-width:480px) {
  .msc-auth-fit.msc-auth-shell {
    padding: 30px 16px;
  }

  .msc-auth-fit .msc-auth-hero {
    padding: 10px 0 20px;
  }

  .msc-auth-fit .msc-auth-main {
    max-width: 100%;
    gap: 18px;
  }

  .msc-auth-fit .msc-auth-panel {
    padding: 24px 18px 28px;
  }
}

@media (min-width:481px) and (max-width:640px) {
  .msc-auth-fit.msc-auth-shell {
    padding: 35px 20px;
  }

  .msc-auth-fit .msc-auth-hero {
    padding: 15px 0 25px;
  }

  .msc-auth-fit .msc-auth-main {
    max-width: 100%;
    gap: 20px;
  }

  .msc-auth-fit .msc-auth-panel {
    padding: 26px 22px 30px;
  }
}

/* Left bias: shift whole container slightly left on very wide screens */
@media (min-width:1400px) {
  .msc-auth-full .msc-auth-main {
    padding-left: 3vw;
    padding-right: 6vw;
  }

  .msc-auth-full .msc-auth-panel {
    margin-left: 0;
  }
}

/* Nuke common theme/container constraints */
.msc-auth-full,
.msc-auth-full .elementor-container,
.msc-auth-full .elementor-section,
.msc-auth-full .entry-content,
.msc-auth-full .container,
.msc-auth-full .site,
.msc-auth-full .content-area {
  max-width: none !important;
  width: 100% !important;
}

.msc-auth-full .msc-auth-panels {
  display: block;
}

@media (min-width:1280px) {
  .msc-auth-full .msc-auth-panel {
    padding: 72px 96px 84px;
  }

  .msc-auth-full .msc-grid-2 {
    gap: 40px 48px;
  }
}

.msc-auth-main {
  padding-bottom: var(--safe-bot);
}

.msc-auth-hero-inner {
  padding-top: var(--safe-top);
}

.msc-auth-refine .msc-auth-panel:after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(145deg, rgba(245, 158, 11, .18), rgba(251, 191, 36, .06) 35%, transparent 70%);
  mix-blend-mode: overlay;
  opacity: .45;
}

/* Animated focus ring (only when keyboard navigating) */
body:not(.using-mouse) .msc-auth-refine .msc-field input:focus {
  box-shadow: 0 0 0 2px rgba(59, 130, 246, .55), 0 0 0 5px rgba(59, 130, 246, .25);
  transition: box-shadow .25s, background .25s;
}

body.using-mouse .msc-auth-refine .msc-field input:focus {
  box-shadow: none;
}

/* Caps lock indicator */
.msc-pass-has-indicator {
  position: relative;
}

.msc-caps-indicator {
  position: absolute;
  top: 6px;
  right: 6px;
  padding: 2px 6px 3px;
  font-size: .52rem;
  font-weight: 700;
  letter-spacing: .6px;
  border: 1px solid #2c2c2c;
  border-radius: 6px;
  background: #0d0d0d;
  color: #666;
  opacity: 0;
  transform: translateY(-4px) scale(.8);
  transition: opacity .25s, transform .25s, color .3s, border-color .3s;
  pointer-events: none;
}

.msc-caps-indicator.visible {
  opacity: .6;
  transform: translateY(0) scale(.9);
}

.msc-caps-indicator.on {
  color: #fff;
  border-color: #3b82f6;
  box-shadow: 0 0 0 1px #1e3a8a, 0 0 8px -1px rgba(59, 130, 246, .7);
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Better tab hover & active states */
.msc-auth-refine .msc-auth-tab {
  transition: background .38s, color .38s, border-color .38s, box-shadow .48s;
}

.msc-auth-refine .msc-auth-tab.active {
  box-shadow: 0 4px 18px -6px rgba(0, 0, 0, .65), 0 0 0 1px #1d3c66 inset;
}

.msc-auth-refine .msc-auth-panel:before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: none;
  opacity: 0;
}

.msc-auth-refine .msc-auth-panels {
  display: flex;
  flex-direction: column;
  gap: 0;
}

@media (max-width: 720px) {
  .msc-auth-refine .msc-auth-panel {
    padding: 18px 16px 20px;
  }

  .msc-auth-refine .msc-grid-2 {
    display: block;
  }
}

/* === Consent Box (Login) =============================================== */
.msc-theme-gold .msc-consent-box {
  background: #0f0f0f;
  border: 1px solid #222;
  border-radius: 14px;
  padding: 14px 14px 12px;
  box-shadow: 0 8px 28px -12px rgba(0, 0, 0, .7), 0 0 0 1px #111;
}

.msc-theme-gold .msc-consent-head {
  color: #e7c063;
  font-weight: 800;
  margin: 4px 0 8px;
  letter-spacing: .3px;
}

.msc-theme-gold .msc-consent-desc {
  color: #aab4be;
  font-size: .85rem;
  line-height: 1.5;
  margin: 0 0 10px;
}

.msc-theme-gold .msc-consent-check {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #e9ecef;
  font-weight: 600;
  margin-bottom: 6px;
}

.msc-theme-gold .msc-consent-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--msc-accent, #f59e0b);
}

.msc-theme-gold .msc-consent-hint {
  color: #8e98a3;
  font-size: .75rem;
  letter-spacing: .2px;
}

/* Consent (combined auth) — upgrade inline line to a neat card */
.msc-auth-refine .msc-consent {
  background: linear-gradient(180deg, #101010, #0c0c0c);
  border: 1px solid #1f1f1f;
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 8px 28px -12px rgba(0, 0, 0, .7), 0 0 0 1px #111;
  margin-top: 10px;
  text-align: left;
}

.msc-auth-refine .msc-consent:focus-within {
  border-color: rgba(245, 158, 11, .35);
  box-shadow: 0 0 0 1px rgba(245, 158, 11, .25) inset, 0 0 0 3px rgba(245, 158, 11, .12);
}

.msc-auth-refine .msc-consent .msc-consent-line {
  display: grid;
  grid-template-columns: 20px 1fr;
  align-items: center;
  column-gap: 10px;
  margin: 0;
  font-size: .9rem;
  font-weight: 600;
  letter-spacing: .15px;
  color: #e9ecef;
  text-transform: none;
}

.msc-auth-refine .msc-consent .msc-consent-line>input[type="checkbox"] {
  grid-column: 1;
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--msc-accent, #f59e0b);
  flex: 0 0 auto;
  appearance: auto;
  -webkit-appearance: checkbox;
  background: transparent;
  padding: 0;
  border: 0;
  box-shadow: none;
}

.msc-auth-refine .msc-consent .msc-consent-line>span {
  grid-column: 2;
  line-height: 1.5;
}

.msc-auth-refine .msc-consent a {
  color: var(--msc-accent, #f59e0b);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1.2px;
}

.msc-auth-refine .msc-consent a:hover {
  color: #ffd37a;
}

/* === Messages: Broadcast checkbox list (admin) ========================= */
.msc-theme-gold .msc-bc-layout {
  gap: 18px;
  align-items: start;
}

.msc-theme-gold .msc-bc-box {
  background: #0f0f0f;
  border: 1px solid #222;
  border-radius: 14px;
  padding: 14px 14px 18px;
  box-shadow: 0 8px 28px -12px rgba(0, 0, 0, .7), 0 0 0 1px #111;
}

.msc-theme-gold .msc-box-head {
  font-weight: 800;
  color: #e7c063;
  margin: 4px 0 12px;
  letter-spacing: .3px;
  text-shadow: 0 0 10px rgba(231, 192, 99, .08);
}

.msc-theme-gold .msc-bc-recipients {
  background: #0b0b0b;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  padding: 6px;
  max-height: 320px;
  overflow: auto;
  box-shadow: inset 0 1px 0 rgba(0, 0, 0, .35);
}

.msc-theme-gold .msc-bc-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #1c1c1c;
  border-radius: 10px;
  background: #0d0d0d;
  margin: 6px 4px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .25) inset;
  transition: border-color .2s, box-shadow .2s, background .2s;
}

.msc-theme-gold .msc-bc-item:hover {
  border-color: #3a2a10;
  box-shadow: 0 0 0 1px rgba(245, 158, 11, .25) inset;
  background: #101010;
}

.msc-theme-gold .msc-bc-item.checked {
  border-color: #614000;
  box-shadow: 0 0 0 1px rgba(245, 158, 11, .35) inset, 0 0 12px -6px rgba(245, 158, 11, .25);
  background: linear-gradient(0deg, rgba(245, 158, 11, .06), transparent 60%);
}

.msc-theme-gold .msc-bc-name {
  color: #e9ecef;
  font-weight: 600;
  letter-spacing: .2px;
}

.msc-theme-gold .msc-bc-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--msc-accent, #f59e0b);
  cursor: pointer;
}

.msc-theme-gold .msc-bc-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 2px 8px;
  color: #aab4be;
  font-size: .72rem;
}

.msc-theme-gold .msc-bc-count {
  display: inline-block;
  background: rgba(245, 158, 11, .12);
  color: #e7c063;
  border: 1px solid rgba(245, 158, 11, .25);
  border-radius: 999px;
  padding: 3px 8px;
  font-weight: 700;
  letter-spacing: .25px;
}

.msc-theme-gold .msc-bc-toolbar .msc-link {
  color: var(--msc-accent, #f59e0b);
  cursor: pointer;
  text-decoration: none;
}

.msc-theme-gold .msc-bc-toolbar .msc-link:hover {
  text-decoration: underline;
}

@media (max-width: 900px) {
  .msc-theme-gold .msc-bc-layout {
    display: block;
  }

  .msc-theme-gold .msc-bc-box {
    margin-bottom: 16px;
  }
}

/* Align email option to the left and keep spacing tidy */
.msc-theme-gold .msc-msg-form .msc-bc-box label {
  color: #e9ecef;
}

.msc-auth-refine .msc-panel-intro {
  margin: 0 0 8px;
}

.msc-auth-refine .msc-panel-intro p {
  margin: 0 0 6px;
  font-size: .8rem;
  color: var(--refine-muted);
  line-height: 1.5;
}

.msc-auth-refine .msc-panel-intro p:last-child {
  margin-bottom: 0;
}

.msc-auth-refine .msc-field {
  margin-bottom: 18px;
  width: 100%;
  box-sizing: border-box;
}

.msc-auth-refine .msc-field label {
  font-size: .7rem;
  letter-spacing: .3px;
  font-weight: 600;
  color: var(--refine-label);
  text-transform: uppercase;
  margin-bottom: 7px;
  display: block;
}

.msc-auth-refine .msc-field input,
.msc-auth-refine .msc-field select {
  width: 100%;
  background: #111 !important;
  border: 1px solid #2a2a2a;
  color: #f2f6f9;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: .85rem;
  font-weight: 500;
  line-height: 1.3;
  min-height: 44px;
  box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
  transition: border-color .25s, background .25s, box-shadow .25s;
  box-sizing: border-box;
}

.msc-auth-refine .msc-field input:hover {
  border-color: #3a3a3a;
  background: #151515 !important;
}

.msc-auth-refine .msc-field input:focus {
  border-color: var(--refine-accent);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .35);
  background: #181818 !important;
  outline: none;
}

.msc-auth-refine .msc-field input::placeholder {
  color: #8a9ba8;
  opacity: .85;
}

.msc-auth-refine .msc-pass-toggle {
  background: transparent;
  border-radius: 8px;
}

.msc-auth-refine .msc-btn,
.msc-auth-refine .msc-btn-primary {
  width: 100%;
  background: #2563eb;
  border: 1px solid #2e6fed;
  border-radius: 10px;
  padding: 14px 22px;
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .3px;
  color: #ffffff;
  box-shadow: 0 6px 18px -10px rgba(0, 0, 0, .6);
  transition: background .25s, border-color .25s, transform .2s;
  cursor: pointer;
  box-sizing: border-box;
  min-height: 48px;
}

.msc-auth-refine .msc-btn-primary:hover {
  background: #2f6ff1;
  border-color: #3577f2;
  box-shadow: 0 8px 24px -12px rgba(37, 99, 235, .7);
}

.msc-auth-refine .msc-btn-primary:active {
  transform: translateY(1px);
  background: #215ad8;
}

.msc-auth-refine .msc-btn-primary:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

.msc-auth-refine .msc-alt-links {
  font-size: .62rem;
  text-align: center;
  margin-top: 6px;
  color: var(--refine-muted);
  letter-spacing: .28px;
  line-height: 1.4;
}

.msc-auth-refine .msc-alt-links a {
  color: #9fb3c2;
  text-decoration: none;
  transition: color .25s;
}

.msc-auth-refine .msc-alt-links a:hover {
  color: #d2e0e8;
}

.msc-auth-refine .msc-feedback {
  font-size: .62rem;
  letter-spacing: .3px;
  color: #b8cad6;
  line-height: 1.5;
}

.msc-auth-refine .msc-feedback.error {
  color: #ff6b6b;
}

.msc-auth-refine .msc-feedback.success {
  color: #51cf66;
}

.msc-auth-refine .msc-actions {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media (max-width: 420px) {
  .msc-auth-refine .msc-actions {
    gap: 12px;
  }
}

/* Enhanced password strength meter */
.msc-auth-refine .msc-pass-strength {
  margin-top: 8px;
}

.msc-auth-refine .msc-ps-bar {
  height: 4px;
  background: rgba(255, 255, 255, .08);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 6px;
}

.msc-auth-refine .msc-ps-bar span {
  display: block;
  height: 100%;
  border-radius: 2px;
  width: 100%;
  transform-origin: left center;
  transform: scaleX(var(--msc-ps-scale, 0));
  transition: transform .35s ease, background .3s;
}

.msc-auth-refine .msc-ps-label {
  font-size: .6rem;
  color: var(--refine-muted);
  font-weight: 500;
}

/* Grid layout improvements - with proper sizing */
.msc-auth-refine .msc-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 18px;
  margin-bottom: 0;
  width: 100%;
  box-sizing: border-box;
}

.msc-auth-refine .msc-grid-2 .msc-field {
  margin-bottom: 0;
}

/* Password toggle button */
.msc-auth-refine .msc-pass-toggle {
  background: transparent;
  border: none;
  color: var(--refine-muted);
  padding: 4px;
  margin-left: 8px;
  cursor: pointer;
  transition: color .25s;
  border-radius: 4px;
}

.msc-auth-refine .msc-pass-toggle .msc-pass-ico {
  font-size: 1rem;
  line-height: 1;
  display: inline-block;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .5));
}

.msc-auth-refine .msc-pass-toggle .msc-pass-ico svg {
  width: 20px;
  height: 20px;
  display: block;
}

.msc-auth-refine .msc-pass-toggle:hover {
  color: var(--refine-label);
  background: rgba(255, 255, 255, .05);
}

/* Flat modifier: removes gradients / glows, ultra minimal */
.msc-auth-refine-flat .msc-auth-panel {
  background: #1c2e3d;
  box-shadow: 0 6px 18px -10px rgba(0, 0, 0, .55);
}

.msc-auth-refine-flat .msc-auth-panel:before {
  display: none;
}

.msc-auth-refine-flat .msc-field input {
  background: #223b4b;
}

.msc-auth-refine-flat .msc-btn-primary {
  background: #3173e8;
  box-shadow: 0 6px 18px -10px rgba(0, 0, 0, .55);
}

.msc-auth-refine-flat .msc-auth-tab::after {
  background: #2e7dfc;
}

/* Ultra contrast modifier builds on contrast: brighter panel */
.msc-auth-refine-contrast.msc-auth-refine-flat .msc-auth-panel {
  background: #22394a;
}

/* Optional stronger contrast modifier */
.msc-auth-refine-contrast .msc-auth-panel {
  background: #1f3141;
  border-color: #3b5566;
}

.msc-auth-refine-contrast .msc-field input {
  background: #243d4f;
  border-color: #3b5668;
}

.msc-auth-refine-contrast .msc-field input:focus {
  background: #2c4a5f;
}

.msc-auth-refine-contrast .msc-auth-tabs:after {
  background: linear-gradient(90deg, rgba(255, 255, 255, .15), rgba(255, 255, 255, .04));
}

/* === Enhanced Responsive Layout (Mobile-First) ============================ */
/* Extra small phones (≤360px) */
@media (max-width:360px) {
  .msc-auth-refine.msc-auth-shell {
    padding: 24px 12px 32px;
  }

  .msc-auth-refine .msc-auth-main {
    gap: 16px;
    max-width: 100%;
  }

  .msc-auth-refine .msc-auth-panel {
    padding: 20px 14px 24px;
    border-radius: 14px;
    gap: 14px;
  }

  .msc-auth-refine .msc-auth-context {
    font-size: 1.25rem;
    margin-bottom: 6px;
  }

  .msc-auth-refine .msc-auth-tabs {
    margin: 0 0 2px;
    gap: 2px;
  }

  .msc-auth-refine .msc-auth-tab {
    padding: 10px 4px;
    font-size: .62rem;
    letter-spacing: .1px;
    min-height: 42px;
  }

  .msc-auth-refine .msc-field {
    margin-bottom: 12px;
  }

  .msc-auth-refine .msc-field label {
    font-size: .7rem;
    margin-bottom: 5px;
  }

  .msc-auth-refine .msc-field input,
  .msc-auth-refine .msc-field select {
    padding: 12px 12px;
    font-size: .8rem;
    min-height: 44px;
  }

  .msc-auth-refine .msc-btn,
  .msc-auth-refine .msc-btn-primary {
    padding: 13px 16px;
    font-size: .78rem;
    min-height: 46px;
  }

  .msc-auth-refine .msc-grid-2 {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .msc-auth-hero-title {
    font-size: 1.6rem !important;
  }

  .msc-auth-hero-tag {
    font-size: .78rem !important;
  }
}

/* Small phones (361px - 480px) */
@media (min-width:361px) and (max-width:480px) {
  .msc-auth-refine.msc-auth-shell {
    padding: 30px 16px 40px;
  }

  .msc-auth-refine .msc-auth-main {
    gap: 18px;
    max-width: 100%;
  }

  .msc-auth-refine .msc-auth-panel {
    padding: 24px 18px 28px;
    border-radius: 16px;
    gap: 16px;
  }

  .msc-auth-refine .msc-auth-context {
    font-size: 1.35rem;
    margin-bottom: 8px;
  }

  .msc-auth-refine .msc-auth-tabs {
    margin: 0 0 2px;
    gap: 3px;
  }

  .msc-auth-refine .msc-auth-tab {
    padding: 10px 6px;
    font-size: .65rem;
    letter-spacing: .15px;
    min-height: 44px;
  }

  .msc-auth-refine .msc-field {
    margin-bottom: 14px;
  }

  .msc-auth-refine .msc-field label {
    font-size: .72rem;
    margin-bottom: 6px;
  }

  .msc-auth-refine .msc-field input,
  .msc-auth-refine .msc-field select {
    padding: 12px 13px;
    font-size: .82rem;
    min-height: 46px;
  }

  .msc-auth-refine .msc-btn,
  .msc-auth-refine .msc-btn-primary {
    padding: 13px 18px;
    font-size: .8rem;
    min-height: 48px;
  }

  .msc-auth-refine .msc-grid-2 {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .msc-auth-banners {
    gap: 10px;
    margin: 8px 0 18px;
  }

  .msc-auth-banner {
    padding: 11px 14px 11px 42px;
    font-size: .68rem;
  }

  .msc-auth-banner:before {
    width: 18px;
    height: 18px;
    left: 14px;
  }
}

/* Standard phones (481px - 640px) */
@media (min-width:481px) and (max-width:640px) {
  .msc-auth-refine.msc-auth-shell {
    padding: 40px 20px 50px;
  }

  .msc-auth-refine .msc-auth-main {
    gap: 20px;
    max-width: 100%;
  }

  .msc-auth-refine .msc-auth-panel {
    padding: 26px 22px 30px;
    border-radius: 18px;
    gap: 18px;
  }

  .msc-auth-refine .msc-auth-context {
    font-size: 1.5rem;
    margin-bottom: 10px;
  }

  .msc-auth-refine .msc-auth-tabs {
    gap: 4px;
  }

  .msc-auth-refine .msc-auth-tab {
    padding: 10px 10px;
    font-size: .7rem;
  }

  .msc-auth-refine .msc-grid-2 {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* Tablets portrait (641px - 900px) */
@media (min-width:641px) and (max-width:900px) {
  .msc-auth-refine.msc-auth-shell {
    padding: 50px 32px 60px;
  }

  .msc-auth-refine .msc-auth-main {
    gap: 22px;
    max-width: 540px;
  }

  .msc-auth-refine .msc-auth-panel {
    padding: 28px 24px 32px;
  }

  .msc-auth-refine .msc-auth-context {
    font-size: 1.65rem;
  }

  .msc-auth-refine .msc-grid-2 {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

/* Tablets landscape & small desktops (901px - 1180px) */
@media (min-width:901px) and (max-width:1180px) {
  .msc-auth-refine.msc-auth-shell {
    padding: 50px 40px 60px;
  }

  .msc-auth-refine .msc-auth-main {
    gap: 24px;
    max-width: 560px;
  }

  .msc-auth-refine .msc-auth-panel {
    padding: 30px 26px 34px;
  }

  .msc-auth-refine .msc-grid-2 {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px 20px;
  }
}

/* Large desktops (1181px+) */
@media (min-width:1181px) {
  .msc-auth-refine.msc-auth-shell {
    padding: 60px 40px;
  }

  .msc-auth-refine .msc-auth-main {
    gap: 24px;
    max-width: 580px;
  }

  .msc-auth-refine .msc-auth-panel {
    padding: 32px 28px 36px;
  }

  .msc-auth-refine .msc-grid-2 {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px 20px;
  }
}

/* REMOVED prefers-color-scheme media query - fixed dark theme always active */
/* Password reset page styles (moved outside media query) */
.msc-reset-shell {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
}

.msc-reset-container {
  width: 100%;
  max-width: 480px;
}

.msc-reset-card {
  background: var(--msc-surface);
  border: 1px solid var(--msc-border);
  border-radius: 28px;
  padding: 46px 44px 54px;
  box-shadow: 0 14px 46px -10px rgba(0, 0, 0, .35), 0 4px 18px -6px rgba(0, 0, 0, .18);
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.msc-reset-title {
  margin: 0 0 4px;
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: .5px;
  color: var(--msc-accent-dark);
}

.msc-reset-intro {
  margin: 0 0 8px;
  font-size: .9rem;
  line-height: 1.4;
  color: color-mix(in oklab, var(--msc-text) 75%, #555);
}

.msc-reset-links {
  margin-top: 10px;
  font-size: .7rem;
  text-align: center;
  color: color-mix(in oklab, var(--msc-text) 70%, #666);
}

.msc-reset-links a {
  color: var(--msc-accent-dark);
  text-decoration: none;
  font-weight: 600;
}

.msc-reset-links a:hover {
  text-decoration: underline;
}

@media (max-width:560px) {
  .msc-reset-card {
    padding: 38px 30px 46px;
    border-radius: 22px;
  }
}

/* === Professional Auth Variant (Pro) ===================================== */
/* Wrapper: add class .msc-auth-pro to #msc-auth for elevated design */
.msc-auth-pro.msc-auth-shell {
  --msc-pro-bg-left: none;
  --msc-pro-bg-right: #000;
  display: flex;
  min-height: 86vh;
  background: #000;
  color: #e9ecef;
  position: relative;
  overflow: hidden;
}

.msc-auth-pro .msc-auth-side {
  flex: 0 0 36%;
  display: flex;
  padding: 58px 54px 46px;
  color: #fff;
  position: relative;
}

.msc-auth-pro .msc-auth-side-inner {
  max-width: 380px;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.msc-auth-pro .msc-auth-brand {
  margin: 0;
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: .8px;
  text-shadow: 0 8px 32px rgba(0, 0, 0, .35);
}

.msc-auth-pro .msc-auth-tagline {
  margin: 0;
  font-size: .9rem;
  line-height: 1.5;
  font-weight: 500;
  opacity: .95;
}

.msc-auth-pro .msc-auth-benefits {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: .75rem;
  letter-spacing: .6px;
  font-weight: 600;
  text-transform: uppercase;
}

.msc-auth-pro .msc-auth-benefits li {
  position: relative;
  padding-left: 20px;
}

.msc-auth-pro .msc-auth-benefits li:before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: linear-gradient(135deg, #fff, #d9ecff);
  box-shadow: 0 2px 6px -1px rgba(0, 0, 0, .35);
}

.msc-auth-pro .msc-auth-footnote {
  margin-top: auto;
  font-size: .6rem;
  letter-spacing: .8px;
  opacity: .7;
}

.msc-auth-pro .msc-auth-main {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  padding: 48px 46px 64px;
  gap: 34px;
}

.msc-auth-pro .msc-auth-tabs {
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .08);
  backdrop-filter: blur(10px);
  border-radius: 18px;
  display: inline-flex;
  padding: 10px 12px;
  gap: 6px;
  position: relative;
  box-shadow: 0 6px 24px -8px rgba(0, 0, 0, .45), 0 2px 8px -2px rgba(0, 0, 0, .3);
}

.msc-auth-pro .msc-auth-tab {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .15);
  color: #b4c2d7;
  border-radius: 12px;
  padding: 10px 18px 12px;
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .5px;
  position: relative;
  cursor: pointer;
  transition: color .35s, background .35s, border-color .35s;
}

.msc-auth-pro .msc-auth-tab::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 6px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, #4aa8ff, #1d7af0);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .5s cubic-bezier(.65, .05, .36, 1);
}

.msc-auth-pro .msc-auth-tab:hover {
  background: rgba(255, 255, 255, .08);
  color: #e2eefc;
}

.msc-auth-pro .msc-auth-tab:focus-visible {
  outline: 2px solid #4aa8ff;
  outline-offset: 3px;
}

.msc-auth-pro .msc-auth-tab.active,
.msc-auth-pro .msc-auth-tab[aria-selected="true"] {
  background: rgba(255, 255, 255, .12);
  color: #ffffff;
  border-color: rgba(255, 255, 255, .35);
  box-shadow: 0 4px 14px -4px rgba(0, 0, 0, .5) inset;
}

.msc-auth-pro .msc-auth-tab.active::after,
.msc-auth-pro .msc-auth-tab[aria-selected="true"]::after {
  transform: scaleX(1);
}

.msc-auth-pro .msc-auth-panels {
  display: grid;
  gap: 26px;
  grid-auto-flow: row;
}

.msc-auth-pro .msc-auth-panel {
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .08);
  backdrop-filter: blur(12px);
  border-radius: 24px;
  padding: 34px 32px 40px;
  color: #d6e2f4;
  box-shadow: 0 10px 40px -10px rgba(0, 0, 0, .55);
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  overflow: hidden;
}

.msc-auth-pro .msc-auth-panel:before {
  content: "";
  position: absolute;
  inset: 0;
  background: none;
  pointer-events: none;
}

.msc-auth-pro .msc-auth-panel h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: .5px;
}

/* Form fields (override) */
.msc-auth-pro .msc-field label {
  font-size: .7rem;
  letter-spacing: .7px;
  font-weight: 700;
  text-transform: uppercase;
  color: #8aa2bf;
}

.msc-auth-pro .msc-field input {
  background: linear-gradient(180deg, #ffffff, #f1f5f9);
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px 16px;
  font-size: .85rem;
  color: #1e293b;
  box-shadow: 0 1px 0 #fff inset, 0 1px 2px rgba(0, 0, 0, .06) inset;
  transition: box-shadow .25s, border-color .25s, background .3s;
}

.msc-auth-pro .msc-field input:focus {
  border-color: #4aa8ff;
  box-shadow: 0 0 0 4px rgba(74, 168, 255, .3), 0 1px 0 #fff inset;
  background: #fff;
}

.msc-auth-pro .msc-field input::placeholder {
  color: #94a3b8;
}

/* Password visibility toggle */
.msc-pass-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.msc-pass-wrap input {
  flex: 1 1 auto;
  padding-right: 46px;
}

.msc-pass-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: linear-gradient(135deg, #2563eb, #1d7af0);
  color: #fff;
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  cursor: pointer;
  font-size: .85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px -2px rgba(0, 0, 0, .45);
  transition: filter .25s, transform .15s;
}

.msc-pass-toggle:hover {
  filter: brightness(1.1);
}

.msc-pass-toggle:active {
  transform: translateY(-50%) scale(.96);
}

.msc-pass-toggle:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.msc-pass-toggle[aria-pressed="true"] {
  background: linear-gradient(135deg, #1d7af0, #2563eb);
}

/* Buttons */
.msc-auth-pro .msc-btn-primary {
  background: linear-gradient(90deg, #2563eb, #1d7af0);
  border: none;
  border-radius: 12px;
  font-weight: 600;
  letter-spacing: .4px;
  padding: 14px 20px;
  font-size: .85rem;
  box-shadow: 0 4px 18px -4px rgba(0, 0, 0, .5), 0 2px 6px -2px rgba(0, 0, 0, .4);
}

.msc-auth-pro .msc-btn-primary:hover {
  filter: brightness(1.08);
}

.msc-auth-pro .msc-btn-primary:active {
  transform: translateY(1px);
}

.msc-auth-pro .msc-btn-primary:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(74, 168, 255, .45);
}

.msc-auth-pro .msc-btn-secondary {
  background: rgba(255, 255, 255, .12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 12px;
  font-weight: 600;
  padding: 12px 18px;
  font-size: .8rem;
  box-shadow: 0 2px 10px -4px rgba(0, 0, 0, .45);
}

.msc-auth-pro .msc-btn-secondary:hover {
  background: rgba(255, 255, 255, .18);
}

/* Links */
.msc-auth-pro .msc-alt-links {
  color: #7f95ad;
  font-size: .65rem;
}

.msc-auth-pro .msc-alt-links a {
  color: #4aa8ff;
}

.msc-auth-pro .msc-alt-links a:hover {
  text-decoration: underline;
}

/* Feedback */
.msc-auth-pro .msc-feedback {
  font-size: .65rem;
  min-height: 18px;
  letter-spacing: .4px;
}

.msc-auth-pro .msc-feedback.msc-error {
  color: #fca5a5;
}

.msc-auth-pro .msc-feedback.msc-ok {
  color: #6ee7b7;
}

/* Animations for panel transitions (reuse existing classes) */
.msc-auth-pro .msc-fade-in {
  animation: mscFadeIn .3s ease;
}

.msc-auth-pro .msc-fade-out {
  animation: mscFadeOut .15s ease;
}

@keyframes mscFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes mscFadeOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

/* Compact/mobile adjustments */
@media (max-width:1080px) {
  .msc-auth-pro.msc-auth-shell {
    background: var(--msc-pro-bg-right);
    flex-direction: column;
  }

  .msc-auth-pro .msc-auth-side {
    flex: 0 0 auto;
    padding: 42px 34px 10px;
  }

  .msc-auth-pro .msc-auth-main {
    padding: 10px 22px 54px;
  }
}

@media (max-width:560px) {
  .msc-auth-pro .msc-auth-panel {
    padding: 30px 24px 34px;
    border-radius: 22px;
  }

  .msc-auth-pro .msc-auth-tabs {
    padding: 8px 10px;
  }

  .msc-auth-pro .msc-auth-tab {
    padding: 8px 14px 10px;
  }
}

/* REMOVED prefers-color-scheme dark media query - keeps consistent dark styling */

/* === Full Screen Enhancement Variant ===================================== */
.msc-auth-pro-full.msc-auth-shell {
  min-height: 100vh;
  background: #000;
  position: relative;
  overflow: hidden;
}

.msc-auth-pro-full.msc-auth-shell:before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    /* removed blue accents */
    repeating-linear-gradient(45deg, rgba(255, 255, 255, .04) 0 2px, transparent 2px 8px);
  mix-blend-mode: screen;
  pointer-events: none;
}

.msc-auth-pro-full .msc-auth-side {
  background: transparent;
}

.msc-auth-pro-full .msc-auth-main {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.msc-auth-pro-full .msc-auth-panel {
  background: linear-gradient(155deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .04));
  border: 1px solid rgba(255, 255, 255, .18);
  box-shadow: 0 20px 60px -18px rgba(0, 0, 0, .65), 0 6px 28px -10px rgba(0, 0, 0, .55);
}

.msc-auth-pro-full .msc-auth-panel:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(140deg, rgba(255, 255, 255, .12), transparent 55%);
  pointer-events: none;
  mix-blend-mode: overlay;
}

.msc-auth-pro-full .msc-auth-tabs {
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .16);
  box-shadow: 0 10px 40px -12px rgba(0, 0, 0, .55), 0 2px 10px -4px rgba(0, 0, 0, .4);
}

.msc-auth-pro-full .msc-auth-tab {
  border-color: rgba(255, 255, 255, .25);
}

.msc-auth-pro-full .msc-auth-tab.active,
.msc-auth-pro-full .msc-auth-tab[aria-selected="true"] {
  background: rgba(255, 255, 255, .18);
  border-color: rgba(255, 255, 255, .4);
}

.msc-auth-pro-full .msc-auth-brand {
  text-shadow: 0 10px 34px rgba(0, 0, 0, .55), 0 2px 8px rgba(0, 0, 0, .4);
}

.msc-auth-pro-full .msc-auth-benefits li:before {
  box-shadow: 0 3px 10px -2px rgba(0, 0, 0, .55);
}

@media (max-width:1080px) {
  .msc-auth-pro-full.msc-auth-shell {
    background: #000;
  }
}

/* Absolute black override removed to prevent global theme impact. If needed, implement via wrapper-specific class only. */
/* Maksymalne wypełnienie szerokości – eliminacja bocznych "pasów" */

/* ===== Auth Absolute Black Variant (scoped, non-destructive) ========= */
/* Wrapper: .msc-auth-black (applied in PHP). Provides pure #000 canvas without forcing global body override. */
.msc-abs-black-html,
html.msc-abs-black-html {
  background: #000 !important;
}

html.msc-abs-black-html body,
body.msc-abs-black {
  background: #000 !important;
  color: #fff;
}

/* Do not force black backgrounds on site containers when net is present */
html.msc-abs-black-html body,
body.msc-abs-black:not(.msc-has-net),
body.msc-abs-black:not(.msc-has-net) #page,
body.msc-abs-black:not(.msc-has-net) .site,
body.msc-abs-black:not(.msc-has-net) .elementor,
body.msc-abs-black:not(.msc-has-net) .elementor-section,
body.msc-abs-black:not(.msc-has-net) .e-con,
body.msc-abs-black:not(.msc-has-net) #content {
  background: #000 !important;
}

body.msc-abs-black * {
  background-image: none !important;
}

.msc-abs-black-html ::-webkit-scrollbar {
  width: 12px;
  background: #000;
}

.msc-abs-black-html ::-webkit-scrollbar-track {
  background: #000;
}

.msc-abs-black-html ::-webkit-scrollbar-thumb {
  background: #161616;
  border-radius: 8px;
  border: 2px solid #000;
}

.msc-abs-black-html ::-webkit-scrollbar-thumb:hover {
  background: #1f1f1f;
}

.msc-auth-black {
  --msc-auth-black-bg: #000;
  --msc-auth-black-surface: #000;
  --msc-auth-black-border: #1a1a1a;
  --msc-auth-black-field: #0e0e0e;
  --msc-auth-black-field-border: #2a2a2a;
  --msc-auth-black-text: #f5f7fa;
  --msc-auth-black-muted: #9aa1a9;
  --msc-auth-black-accent: #f59e0b;
  --msc-auth-black-accent-alt: #fbbf24;
}

.msc-auth-theme-gold {
  --msc-auth-black-accent: #f59e0b;
  --msc-auth-black-accent-alt: #fbbf24;
  --msc-auth-gold-ring: #f59e0b;
  --msc-auth-gold-text: #fcd34d;
}

.msc-auth-theme-gold .msc-auth-panel {
  position: relative;
  border: 1px solid #3a2a00 !important;
  box-shadow: 0 0 0 1px #3a2a00, 0 8px 32px -10px rgba(0, 0, 0, .9), 0 0 22px -6px rgba(245, 158, 11, .25) !important;
}

.msc-auth-theme-gold .msc-auth-panel:before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(140deg, rgba(245, 158, 11, .65), rgba(251, 191, 36, .15) 40%, rgba(245, 158, 11, .55) 70%, rgba(245, 158, 11, .05));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.msc-auth-theme-gold .msc-auth-panel:after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 30% 20%, rgba(251, 191, 36, .12), transparent 60%), radial-gradient(circle at 80% 75%, rgba(245, 158, 11, .1), transparent 70%);
  mix-blend-mode: overlay;
  opacity: .45;
  pointer-events: none;
}

.msc-auth-theme-gold .msc-auth-tabs {
  border: 1px solid #3a2a00 !important;
  box-shadow: 0 0 0 1px #3a2a00 !important;
}

.msc-auth-theme-gold .msc-auth-tab {
  border: 1px solid #3a2a00 !important;
  background: #0b0b0b !important;
}

.msc-auth-theme-gold .msc-auth-tab:hover {
  background: #141414 !important;
}

.msc-auth-theme-gold .msc-auth-tab.active,
.msc-auth-theme-gold .msc-auth-tab[aria-selected="true"] {
  background: linear-gradient(145deg, #1a1304, #0d0d0d) !important;
  color: #fcd34d !important;
}

.msc-auth-theme-gold .msc-auth-tab.active:after,
.msc-auth-theme-gold .msc-auth-tab[aria-selected="true"]:after {
  height: 3px;
  border-radius: 3px;
}

.msc-auth-theme-gold .msc-btn,
.msc-auth-theme-gold .msc-btn-primary {
  position: relative;
  overflow: hidden;
}

.msc-auth-theme-gold .msc-btn:before {
  content: "";
  position: absolute;
  top: 0;
  left: -40%;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .45), rgba(255, 255, 255, .05));
  transform: skewX(-22deg) translateX(-120%);
  transition: transform .8s cubic-bezier(.77, 0, .18, 1);
  pointer-events: none;
}

.msc-auth-theme-gold .msc-btn:hover:before {
  transform: skewX(-22deg) translateX(280%);
}

.msc-auth-theme-gold .msc-btn:active {
  transform: translateY(1px) scale(.985);
}

.msc-auth-theme-gold input:focus,
.msc-auth-theme-gold select:focus,
.msc-auth-theme-gold textarea:focus {
  box-shadow: 0 0 0 1px #1a1203, 0 0 0 3px rgba(245, 158, 11, .5) !important;
  background: #111 !important;
}

/* Shine FX (optional) */
@keyframes mscGoldShineText {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

.msc-auth-fx-shine.msc-auth-theme-gold .msc-auth-hero-title {
  background: linear-gradient(110deg, #4d3a10, #fcd34d, #f59e0b, #4d3a10);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
  animation: mscGoldShineText 6s ease-in-out infinite;
  text-shadow: 0 0 28px rgba(245, 158, 11, .2), 0 0 4px rgba(0, 0, 0, .9);
}

.msc-auth-fx-shine.msc-auth-theme-gold .msc-auth-panel:after {
  opacity: .6;
}

.msc-auth-fx-shine.msc-auth-theme-gold .msc-btn:before {
  transition: transform .9s cubic-bezier(.65, .05, .36, 1);
}

.msc-auth-fx-shine.msc-auth-theme-gold .msc-btn:hover:before {
  transform: skewX(-22deg) translateX(360%);
}

/* Matte FX: toned-down luxury variant (no animated shine, softer edges) */
.msc-auth-fx-matte.msc-auth-theme-gold .msc-auth-hero-title {
  background: none !important;
  color: #e7c063 !important;
  text-shadow: 0 0 8px rgba(251, 191, 36, .18), 0 1px 2px #000;
}

.msc-auth-fx-matte.msc-auth-theme-gold .msc-auth-panel {
  box-shadow: 0 0 0 1px #3a2a00, 0 4px 18px -8px rgba(0, 0, 0, .85), 0 0 12px -4px rgba(245, 158, 11, .14) !important;
}

.msc-auth-fx-matte.msc-auth-theme-gold .msc-auth-panel:before {
  background: linear-gradient(140deg, rgba(245, 158, 11, .35), rgba(251, 191, 36, .06) 40%, rgba(245, 158, 11, .3) 70%, rgba(245, 158, 11, .02));
}

.msc-auth-fx-matte.msc-auth-theme-gold .msc-btn:before {
  display: none;
}

.msc-auth-fx-matte.msc-auth-theme-gold .msc-btn {
  background: linear-gradient(90deg, #d69717, #f2c24b) !important;
  box-shadow: 0 4px 14px -6px rgba(245, 158, 11, .4), 0 0 0 1px #3a2a00 !important;
}

.msc-auth-fx-matte.msc-auth-theme-gold .msc-btn:hover {
  filter: brightness(1.04);
}

/* Animated underline for tabs (width slide) */
.msc-auth-theme-gold .msc-auth-tab {
  position: relative;
  overflow: hidden;
}

.msc-auth-theme-gold .msc-auth-tab:after {
  transition: width .45s cubic-bezier(.77, 0, .18, 1);
  width: 0;
  left: 50%;
  transform: translateX(-50%);
}

.msc-auth-theme-gold .msc-auth-tab:hover:after {
  width: 60%;
}

.msc-auth-theme-gold .msc-auth-tab.active:after,
.msc-auth-theme-gold .msc-auth-tab[aria-selected="true"]:after {
  width: 90%;
}

/* Hero subtle halo */
.msc-auth-theme-gold .msc-auth-hero {
  position: relative;
}

.msc-auth-theme-gold .msc-auth-hero:before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 640px;
  max-width: 92vw;
  height: 420px;
  transform: translateX(-50%);
  background: radial-gradient(circle at 50% 28%, rgba(245, 158, 11, .18), rgba(0, 0, 0, 0) 70%);
  filter: blur(42px);
  opacity: .65;
  pointer-events: none;
}

.msc-auth-fx-matte.msc-auth-theme-gold .msc-auth-hero:before {
  opacity: .35;
  filter: blur(36px);
}

/* Input icons (background SVG) */
.msc-auth-theme-gold .msc-auth-panel input[type=email] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23fbbf24' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 4.5l5.5 4 5.5-4'/%3E%3Crect x='2' y='3.5' width='12' height='9' rx='2' ry='2' stroke='%23f59e0b'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 12px 50%;
  padding-left: 40px !important;
}

.msc-auth-theme-gold .msc-auth-panel input[type=password] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23fbbf24' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.5' y='7' width='9' height='6' rx='1.5'/%3E%3Cpath d='M5.5 7V5.2a2.5 2.5 0 115 0V7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 12px 50%;
  padding-left: 40px !important;
}

.msc-auth-theme-gold .msc-auth-panel input[name*='first'],
.msc-auth-theme-gold .msc-auth-panel input[name*='imie'] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23fbbf24' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='8' cy='5' r='3.2'/%3E%3Cpath d='M2.5 13.5c1.2-2.4 3.2-3.7 5.5-3.7s4.3 1.3 5.5 3.7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 12px 50%;
  padding-left: 40px !important;
}

.msc-auth-theme-gold .msc-auth-panel input[name*='last'],
.msc-auth-theme-gold .msc-auth-panel input[name*='nazw'] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23fbbf24' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='8' cy='5' r='3.2'/%3E%3Cpath d='M2.5 13.5c1.2-2.4 3.2-3.7 5.5-3.7s4.3 1.3 5.5 3.7'/%3E%3Cpath d='M11.2 8.2c.9.2 1.8.6 2.3 1.1'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 12px 50%;
  padding-left: 40px !important;
}

/* Smooth transitions */
.msc-auth-theme-gold .msc-auth-panel input,
.msc-auth-theme-gold .msc-auth-tab,
.msc-auth-theme-gold .msc-btn {
  transition: background .45s, border-color .45s, color .45s, box-shadow .45s;
}


/* Accessibility contrast adjustments */
.msc-auth-theme-gold .msc-feedback.error {
  color: #f87171;
}

.msc-auth-theme-gold .msc-feedback.success {
  color: #4ade80;
}

.msc-auth-theme-gold .msc-auth-panel input {
  border-color: #2d2002 !important;
}

.msc-auth-theme-gold .msc-auth-panel input:hover {
  border-color: #3a2a00 !important;
}

.msc-auth-theme-gold .msc-auth-panel input:focus {
  border-color: #f59e0b !important;
}

/* -------- Layout Stability -------- */
#msc-auth .msc-auth-panel {
  min-height: 520px;
}

#msc-auth .msc-auth-panel .msc-auth-panel-inner {
  min-height: 440px;
}

.msc-auth-panel-inner {
  display: flex;
  flex-direction: column;
}

.msc-auth-panel-inner form {
  flex: 1 0 auto;
}

/* Avoid jump when switching tabs: reserve banner + heading space */
.msc-auth-banners {
  min-height: 54px;
}

.msc-auth-hero-title {
  line-height: 1.08;
}

/* -------- Animated Background (orbs) - Performance Optimized -------- */
.msc-auth-bg-orbs {
  position: relative;
}

.msc-auth-bg-orbs:before,
.msc-auth-bg-orbs:after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.msc-auth-bg-orbs:before {
  background: radial-gradient(circle at 82% 68%, rgba(251, 191, 36, .08), rgba(0, 0, 0, 0) 50%);
  filter: blur(35px) saturate(110%);
  opacity: .4;
}

.msc-auth-bg-orbs:after {
  background: radial-gradient(circle at 70% 25%, rgba(245, 158, 11, .06), rgba(0, 0, 0, 0) 50%);
  filter: blur(40px) saturate(120%);
  mix-blend-mode: screen;
  opacity: .3;
}

/* Animacja tylko na ekranach ≤1920px (wyłączona na dużych monitorach) */
@media (max-width: 1920px) and (prefers-reduced-motion: no-preference) {
  .msc-auth-bg-orbs:before {
    animation: mscOrbsDrift 28s ease-in-out infinite alternate;
  }

  .msc-auth-bg-orbs:after {
    animation: mscOrbsDrift2 36s ease-in-out infinite alternate;
  }
}

@keyframes mscOrbsDrift {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }

  50% {
    transform: translate3d(1.5%, -1.5%, 0) scale(1.03);
  }

  100% {
    transform: translate3d(-0.8%, 1.5%, 0) scale(1.01);
  }
}

@keyframes mscOrbsDrift2 {
  0% {
    transform: translate3d(0, 0, 0) scale(1.02);
  }

  50% {
    transform: translate3d(-1.5%, 0.8%, 0) scale(1);
  }

  100% {
    transform: translate3d(0.8%, -1.5%, 0) scale(1.04);
  }
}

/* Elevate content over animated layers */
.msc-auth-bg-orbs #msc-auth,
.msc-auth-bg-orbs .msc-auth-main,
.msc-auth-bg-orbs .msc-auth-panel,
.msc-auth-bg-orbs .msc-auth-hero {
  position: relative;
  z-index: 2;
}

/* ===== Global Theming for Dashboard / Logged-in UI ===== */
.msc-theme-gold {
  --msc-bg: #040404;
  --msc-surface: #0d0d0d;
  --msc-surface-alt: #131313;
  --msc-border: #262626;
  --msc-border-faint: #1a1a1a;
  --msc-text: #e9ecef;
  --msc-text-dim: #98a2ad;
  --msc-accent: #f59e0b;
  --msc-accent-alt: #fbbf24;
  --msc-accent-rgb: 245, 158, 11;
  color: var(--msc-text);
}

.msc-theme-emerald {
  --msc-bg: #03120d;
  --msc-surface: #0b1f18;
  --msc-surface-alt: #0f2720;
  --msc-border: #16352b;
  --msc-border-faint: #0c1d17;
  --msc-text: #e6f8f2;
  --msc-text-dim: #95b9ae;
  --msc-accent: #10b981;
  --msc-accent-alt: #34d399;
  --msc-accent-rgb: 16, 185, 129;
  color: var(--msc-text);
}

.msc-theme-emerald {
  background: #010a07;
}

.msc-theme-emerald .msc-d-sidebar {
  background: #0a1813;
  border-right: 1px solid #102820;
}

.msc-theme-emerald .msc-d-nav a {
  color: var(--msc-text-dim);
}

.msc-theme-emerald .msc-d-nav a.active,
.msc-theme-emerald .msc-d-nav a:hover {
  background: linear-gradient(90deg, rgba(var(--msc-accent-rgb), .2), rgba(var(--msc-accent-rgb), .05));
  color: #fff;
}

.msc-theme-emerald .msc-d-brand {
  color: #34d399;
  text-shadow: 0 0 12px rgba(var(--msc-accent-rgb), .35);
  letter-spacing: .6px;
}

.msc-theme-emerald .msc-d-top {
  border-bottom: 1px solid #123024;
}

.msc-theme-emerald .msc-d-main {
  background: linear-gradient(180deg, #010a07, #051a13);
}

.msc-theme-emerald .msc-d-tile {
  background: var(--msc-surface);
  border: 1px solid #123227;
  box-shadow: 0 2px 10px -4px rgba(0, 0, 0, .6), 0 0 0 1px #0d211a;
}

.msc-theme-emerald .msc-d-tile:hover {
  transform: translateY(-4px);
  border-color: #1c5a46;
  box-shadow: 0 8px 26px -10px rgba(0, 0, 0, .85), 0 0 0 1px #1c5a46, 0 0 18px -4px rgba(var(--msc-accent-rgb), .35);
}

.msc-theme-emerald .msc-d-title {
  color: #fff;
}

.msc-theme-emerald .msc-d-desc {
  color: var(--msc-text-dim);
}

.msc-theme-emerald .msc-card,
.msc-theme-emerald .msc-table {
  background: var(--msc-surface);
  border: 1px solid #123227;
}

.msc-theme-emerald .msc-card {
  box-shadow: 0 2px 10px -4px rgba(0, 0, 0, .7), 0 0 0 1px #0d211a;
}

.msc-theme-emerald .msc-table thead th {
  color: #34d399;
  background: #0f2720;
}

.msc-theme-emerald .msc-table tbody tr:hover {
  background: #102c23;
}

.msc-theme-emerald .msc-table tbody tr:nth-child(even) {
  background: #0d241d;
}

.msc-theme-emerald .msc-table tbody tr:nth-child(even):hover {
  background: #132e25;
}

.msc-theme-emerald a {
  color: var(--msc-accent-alt);
}

.msc-theme-emerald a:hover {
  color: #6ee7b7;
}

.msc-theme-emerald .msc-user-name {
  color: #34d399;
}

.msc-theme-emerald .msc-icon-btn,
.msc-theme-emerald .msc-btn-sm {
  background: #0e211b;
  border: 1px solid #1a4a3a;
  color: #bde1d6;
}

.msc-theme-emerald .msc-icon-btn:hover,
.msc-theme-emerald .msc-btn-sm:hover {
  background: #133029;
  border-color: #256650;
  color: #fff;
}

/* Reusable accent adaptation for auth variant */
.msc-auth-theme-emerald {
  --msc-auth-black-accent: #10b981;
  --msc-auth-black-accent-alt: #34d399;
}

.msc-auth-theme-emerald .msc-auth-tab.active:after,
.msc-auth-theme-emerald .msc-auth-tab[aria-selected="true"]:after {
  background: linear-gradient(90deg, #10b981, #34d399) !important;
}

.msc-auth-theme-emerald .msc-btn,
.msc-auth-theme-emerald .msc-btn-primary {
  background: linear-gradient(90deg, #10b981, #34d399) !important;
}

/* Background Intensity Modifiers */
.msc-bg-intensity-low.msc-auth-bg-orbs:before {
  opacity: .4;
}

.msc-bg-intensity-low.msc-auth-bg-orbs:after {
  opacity: .25;
}

.msc-bg-intensity-high.msc-auth-bg-orbs:before {
  opacity: 1;
  filter: blur(48px) saturate(140%);
}

.msc-bg-intensity-high.msc-auth-bg-orbs:after {
  opacity: .85;
}

.msc-bg-intensity-low.msc-bg-grid:before {
  opacity: .1;
}

.msc-bg-intensity-low.msc-bg-grid:after {
  opacity: .22;
}

.msc-bg-intensity-high.msc-bg-grid:before {
  opacity: .28;
}

.msc-bg-intensity-high.msc-bg-grid:after {
  opacity: .55;
}

/* Micro Transitions & Panel Fade */
.msc-auth-panel,
.msc-d-tile,
.msc-card,
.msc-table tbody tr {
  transition: background .45s, box-shadow .45s, border-color .5s, transform .45s;
}

#msc-d-content {
  animation: mscPanelFade .5s ease;
}

@keyframes mscPanelFade {
  0% {
    opacity: 0;
    transform: translateY(8px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Reduced Motion Fallbacks */
@media (prefers-reduced-motion:reduce) {

  .msc-auth-bg-orbs:before,
  .msc-auth-bg-orbs:after,
  .msc-bg-grid:before,
  .msc-bg-grid:after {
    animation: none !important;
    transform: none !important;
  }

  .msc-auth-bg-orbs:before,
  .msc-auth-bg-orbs:after {
    opacity: .3;
  }

  .msc-bg-grid:before,
  .msc-bg-grid:after {
    opacity: .18;
  }

  .msc-auth-fx-shine .msc-auth-hero-title {
    animation: none !important;
    background: #fff;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

.msc-theme-gold {
  background: #000;
}

.msc-theme-gold .msc-d-sidebar {
  background: #0c0c0c;
  border-right: 1px solid #1c1c1c;
}

.msc-theme-gold .msc-d-nav a {
  color: var(--msc-text-dim);
  transition: background .4s, color .4s;
}

.msc-theme-gold .msc-d-nav a.active,
.msc-theme-gold .msc-d-nav a:hover {
  background: linear-gradient(90deg, rgba(var(--msc-accent-rgb), .18), rgba(var(--msc-accent-rgb), .06));
  color: #fff;
}

.msc-theme-gold .msc-d-brand {
  color: #fbbf24;
  text-shadow: 0 0 12px rgba(var(--msc-accent-rgb), .35);
}

.msc-theme-gold .msc-d-top {
  border-bottom: 1px solid #1a1a1a;
  padding-bottom: 12px;
  margin-bottom: 24px;
}

.msc-theme-gold .msc-d-main {
  background: linear-gradient(180deg, #020202, #050505);
}

.msc-theme-gold .msc-d-tile {
  background: var(--msc-surface);
  border: 1px solid #1e1e1e;
  box-shadow: 0 2px 10px -4px rgba(0, 0, 0, .7), 0 0 0 1px #141414;
  transition: transform .4s, box-shadow .4s, border-color .4s;
}

.msc-theme-gold .msc-d-tile:hover {
  transform: translateY(-4px);
  border-color: #2c2618;
  box-shadow: 0 8px 28px -10px rgba(0, 0, 0, .85), 0 0 0 1px #2c2618, 0 0 16px -4px rgba(var(--msc-accent-rgb), .35);
}

.msc-theme-gold .msc-d-title {
  color: #fff;
}

.msc-theme-gold .msc-d-desc {
  color: var(--msc-text-dim);
}

.msc-theme-gold .msc-card,
.msc-theme-gold .msc-table-wrap,
.msc-theme-gold .msc-table {
  background: var(--msc-surface);
  color: var(--msc-text);
  border: 1px solid #222;
  border-radius: 14px;
}

.msc-theme-gold .msc-card {
  box-shadow: 0 2px 10px -4px rgba(0, 0, 0, .7), 0 0 0 1px #141414;
  padding: 20px 22px;
}

.msc-theme-gold .msc-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: .8rem;
}

.msc-theme-gold .msc-table thead th {
  text-align: left;
  padding: 12px 14px;
  font-weight: 600;
  font-size: .7rem;
  letter-spacing: .5px;
  color: #fcd34d;
  background: #111;
  position: sticky;
  top: 0;
  z-index: 3;
}

.msc-theme-gold .msc-table tbody td {
  padding: 10px 14px;
  border-top: 1px solid #1d1d1d;
}

.msc-theme-gold .msc-table tbody tr:hover {
  background: #111;
}

.msc-theme-gold .msc-table tbody tr:nth-child(even) {
  background: #0f0f0f;
}

.msc-theme-gold .msc-table tbody tr:nth-child(even):hover {
  background: #141414;
}

.msc-theme-gold .msc-table tfoot td {
  padding: 10px 14px;
  border-top: 2px solid #262626;
  font-weight: 600;
}

.msc-theme-gold .msc-user-name {
  color: #fcd34d;
  font-weight: 600;
}

.msc-theme-gold a {
  color: var(--msc-accent-alt);
}

.msc-theme-gold a:hover {
  color: #fde68a;
}

/* Logout button w gold theme */
.msc-theme-gold .msc-logout-btn {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  border-color: #991b1b;
  box-shadow: 0 2px 8px rgba(220, 38, 38, .35), 0 0 0 1px #7f1d1d, 0 0 12px rgba(220, 38, 38, .15);
}

.msc-theme-gold .msc-logout-btn:hover {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  box-shadow: 0 4px 16px rgba(220, 38, 38, .5), 0 0 0 1px #991b1b, 0 0 20px rgba(220, 38, 38, .25);
}

/* Buttons inside tables/cards */
.msc-theme-gold .msc-icon-btn,
.msc-theme-gold .msc-btn-sm {
  background: #161616;
  border: 1px solid #272112;
  color: #d7d1c6;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: .65rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  line-height: 1;
}

.msc-theme-gold .msc-icon-btn:hover,
.msc-theme-gold .msc-btn-sm:hover {
  background: #1f1a0e;
  color: #fff;
  border-color: #3a2d14;
}

.msc-theme-gold .msc-icon-btn:active,
.msc-theme-gold .msc-btn-sm:active {
  transform: translateY(1px);
}

/* Animated Grid Background Option */
.msc-bg-grid {
  position: relative;
}

.msc-bg-grid:before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(0deg, rgba(255, 255, 255, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
  background-size: 60px 60px, 60px 60px;
  opacity: .18;
  mask: linear-gradient(180deg, transparent 0%, #000 12%, #000 88%, transparent 100%);
  animation: mscGridSlow 40s linear infinite;
  pointer-events: none;
}

.msc-bg-grid:after {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 70% 30%, rgba(var(--msc-accent-rgb, .4)), rgba(0, 0, 0, 0) 60%);
  filter: blur(60px);
  opacity: .28;
  pointer-events: none;
  animation: mscGridPulse 24s ease-in-out infinite alternate;
}

@keyframes mscGridSlow {
  0% {
    background-position: 0 0, 0 0;
  }

  100% {
    background-position: 600px 600px, 600px 0;
  }
}

@keyframes mscGridPulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }

  100% {
    transform: scale(1);
  }
}


.msc-auth-theme-gold .msc-auth-hero-title {
  color: #fcd34d !important;
  text-shadow: 0 0 18px rgba(251, 191, 36, .25), 0 0 2px rgba(0, 0, 0, .8);
}

.msc-auth-theme-gold .msc-auth-tab.active,
.msc-auth-theme-gold .msc-auth-tab[aria-selected="true"] {
  border-color: #f59e0b !important;
}

.msc-auth-theme-gold .msc-auth-tab.active:after,
.msc-auth-theme-gold .msc-auth-tab[aria-selected="true"]:after {
  background: linear-gradient(90deg, #f59e0b, #fbbf24) !important;
}

.msc-auth-theme-gold .msc-btn,
.msc-auth-theme-gold .msc-btn-primary {
  background: linear-gradient(90deg, #f59e0b, #fbbf24) !important;
  box-shadow: 0 6px 18px -6px rgba(245, 158, 11, .55), 0 0 0 1px #332300 !important;
}

.msc-auth-theme-gold .msc-btn:hover {
  filter: brightness(1.08);
}

.msc-auth-theme-gold input:focus,
.msc-auth-theme-gold select:focus,
.msc-auth-theme-gold textarea:focus {
  box-shadow: 0 0 0 2px rgba(245, 158, 11, .45) !important;
  border-color: #f59e0b !important;
}

.msc-auth-theme-gold .msc-auth-banners .msc-auth-banner:before {
  background: linear-gradient(135deg, #f59e0b, #fbbf24) !important;
  box-shadow: 0 4px 14px -4px rgba(245, 158, 11, .85) !important;
}

.msc-auth-theme-gold a {
  color: #fbbf24;
}

.msc-auth-theme-gold a:hover {
  color: #fde68a;
}

.msc-auth-black {
  background: #000 !important;
  position: relative;
  isolation: isolate;
}

.msc-auth-black .msc-auth-panels,
.msc-auth-black .msc-auth-panel {
  background: #000 !important;
}

.msc-auth-black .msc-auth-panel {
  border: 1px solid var(--msc-auth-black-border);
  box-shadow: 0 0 0 1px #0b0b0b, 0 10px 34px -12px rgba(0, 0, 0, .9);
}

.msc-auth-black .msc-auth-panel:before,
.msc-auth-black .msc-auth-panel:after {
  display: none !important;
}

/* Remove any inherited backdrop/blur or gradient haze */
.msc-auth-black,
.msc-auth-black * {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.msc-auth-black .msc-auth-shell:before,
.msc-auth-black .msc-auth-shell:after,
.msc-auth-black.msc-auth-refine.msc-auth-shell:before,
.msc-auth-black.msc-auth-refine.msc-auth-shell:after {
  display: none !important;
  background: none !important;
}

.msc-auth-black .msc-auth-panel {
  background: #000 !important;
}

.msc-auth-black .msc-auth-tabs,
.msc-auth-black .msc-auth-tab {
  background: #050505 !important;
}

.msc-auth-black .msc-auth-hero,
.msc-auth-black .msc-auth-hero-inner {
  background: #000 !important;
}

.msc-auth-black .msc-auth-hero-title {
  background: none !important;
  -webkit-background-clip: initial;
  background-clip: initial;
  color: #d3d7dc !important;
}

.msc-auth-black .msc-auth-hero-tag {
  color: #5e6872 !important;
}

.msc-auth-black .msc-auth-panel input {
  background: #0c0c0c !important;
}

.msc-auth-black .msc-auth-panel input:focus {
  background: #121212 !important;
}

.msc-auth-black .msc-auth-tab.active {
  background: #0f0f0f !important;
}

.msc-auth-black .msc-auth-banners .msc-auth-banner {
  background: #050505 !important;
  box-shadow: 0 0 0 1px #111;
}

.msc-auth-black .msc-auth-tabs {
  background: #050505;
  border: 1px solid #141414;
}

.msc-auth-black .msc-auth-tab {
  background: #060606;
  border: 1px solid #151515;
  color: #8d99a5;
}

.msc-auth-black .msc-auth-tab:hover {
  background: #0b0b0b;
  color: #cfd7dd;
}

.msc-auth-black .msc-auth-tab.active,
.msc-auth-black .msc-auth-tab[aria-selected="true"] {
  background: linear-gradient(145deg, #181818, #101010) !important;
  border-color: #2a2a2a !important;
  color: #fff;
  box-shadow: 0 0 0 1px #262626, 0 4px 14px -6px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .04) inset;
}

.msc-auth-black .msc-auth-tab.active:after,
.msc-auth-black .msc-auth-tab[aria-selected="true"]:after {
  background: linear-gradient(90deg, var(--msc-auth-black-accent), var(--msc-auth-black-accent-alt));
  height: 3px;
  border-radius: 3px;
  width: 80%;
  left: 50%;
  transform: translateX(-50%);
}

/* Stronger highlight for gold */
.msc-auth-theme-gold .msc-auth-tab.active,
.msc-auth-theme-gold .msc-auth-tab[aria-selected="true"] {
  background: linear-gradient(160deg, #241a08, #120d05) !important;
  border-color: #3f2c10 !important;
  box-shadow: 0 0 0 1px #3f2c10, 0 6px 22px -10px rgba(0, 0, 0, .85), 0 0 10px -2px rgba(245, 158, 11, .4);
}

.msc-auth-theme-gold .msc-auth-tab.active:after,
.msc-auth-theme-gold .msc-auth-tab[aria-selected="true"]:after {
  height: 4px;
  box-shadow: 0 0 6px -1px rgba(245, 158, 11, .75);
}

/* Stronger highlight for emerald */
.msc-auth-theme-emerald .msc-auth-tab.active,
.msc-auth-theme-emerald .msc-auth-tab[aria-selected="true"] {
  background: linear-gradient(150deg, #0f2d24, #071a14) !important;
  border-color: #1d5c48 !important;
  box-shadow: 0 0 0 1px #1d5c48, 0 6px 20px -10px rgba(0, 0, 0, .85), 0 0 10px -2px rgba(16, 185, 129, .45);
}

.msc-auth-theme-emerald .msc-auth-tab.active:after,
.msc-auth-theme-emerald .msc-auth-tab[aria-selected="true"]:after {
  height: 4px;
  box-shadow: 0 0 6px -1px rgba(16, 185, 129, .7);
}

.msc-auth-black .msc-auth-context,
.msc-auth-black h1,
.msc-auth-black h2,
.msc-auth-black h3,
.msc-auth-black h4 {
  color: var(--msc-auth-black-text) !important;
}

.msc-auth-black p,
.msc-auth-black label,
.msc-auth-black .msc-alt-links,
.msc-auth-black small {
  color: var(--msc-auth-black-muted) !important;
}

.msc-auth-black a {
  color: var(--msc-auth-black-accent);
}

.msc-auth-black a:hover {
  color: var(--msc-auth-black-accent-alt);
}

.msc-auth-black input[type="text"],
.msc-auth-black input[type="email"],
.msc-auth-black input[type="password"],
.msc-auth-black input[type="number"],
.msc-auth-black input[type="date"],
.msc-auth-black select,
.msc-auth-black textarea {
  background: var(--msc-auth-black-field) !important;
  border: 1px solid var(--msc-auth-black-field-border) !important;
  color: var(--msc-auth-black-text) !important;
  box-shadow: none !important;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: .84rem;
}

.msc-auth-black input:focus,
.msc-auth-black select:focus,
.msc-auth-black textarea:focus {
  outline: none;
  border-color: var(--msc-auth-black-accent) !important;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, .5) !important;
}

.msc-auth-black ::placeholder {
  color: #5f6b75 !important;
}

.msc-auth-black .msc-btn,
.msc-auth-black .msc-btn-primary {
  background: linear-gradient(90deg, var(--msc-auth-black-accent), var(--msc-auth-black-accent-alt));
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 14px 20px;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .4px;
  box-shadow: 0 6px 20px -8px rgba(0, 0, 0, .9), 0 0 0 1px #0c0c0c;
}

.msc-auth-black .msc-btn:hover {
  filter: brightness(1.07);
}

.msc-auth-black .msc-btn:active {
  transform: translateY(1px);
}

.msc-auth-black .msc-btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.msc-auth-black .msc-feedback {
  font-size: .64rem;
  letter-spacing: .35px;
}

.msc-auth-black .msc-feedback.error {
  color: #ff6b6b;
}

.msc-auth-black .msc-feedback.success {
  color: #51cf66;
}

.msc-auth-black .msc-pass-toggle {
  background: #101010;
  border: 1px solid #1e1e1e;
  color: #b5c0c9;
  border-radius: 8px;
}

.msc-auth-black .msc-pass-toggle:hover {
  background: #161616;
  color: #fff;
}

.msc-auth-black .msc-pass-toggle:focus-visible {
  outline: 2px solid var(--msc-auth-black-accent);
  outline-offset: 2px;
}

.msc-auth-black .msc-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width:520px) {
  .msc-auth-black .msc-grid-2 {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* Smooth appear */
.msc-auth-black .msc-auth-panel {
  animation: mscAuthBlackIn .35s ease;
}

@keyframes mscAuthBlackIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Ensure schedule/auth combined wrapper remains black */
.msc-auth-black .msc-modern {
  background: transparent !important;
}

body.msc-abs-black .elementor-section .elementor-container,
body.msc-abs-black .elementor .e-con-inner {
  max-width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin: 0 !important;
}

/* Debug marker (opcjonalny) */
body.msc-abs-black.msc-show-debug * {
  outline: 1px solid rgba(255, 0, 0, .05) !important;
}

/* Dodatkowe wymuszenia WordPress / motyw / block theme kontenery */
body.msc-abs-black #primary,
body.msc-abs-black #main,
body.msc-abs-black #content,
body.msc-abs-black .site-content,
body.msc-abs-black .wp-site-blocks,
body.msc-abs-black .wp-block-group,
body.msc-abs-black .wp-block-cover,
body.msc-abs-black .wp-block-cover-image,
body.msc-abs-black .wp-block-template-part,
body.msc-abs-black header,
body.msc-abs-black footer,
body.msc-abs-black .entry-content,
body.msc-abs-black .page,
body.msc-abs-black .post,
body.msc-abs-black .content-area,
body.msc-abs-black .hfeed,
body.msc-abs-black .site-main {
  background: #000 !important;
}

/* Zerowanie paddingów/marginesów kontenerów mogących tworzyć "ramki" */
body.msc-abs-black #primary,
body.msc-abs-black #main,
body.msc-abs-black #content,
body.msc-abs-black .site-content,
body.msc-abs-black .wp-site-blocks,
body.msc-abs-black .wp-block-group,
body.msc-abs-black .wp-block-template-part,
body.msc-abs-black .elementor-section,
body.msc-abs-black .elementor-container,
body.msc-abs-black .e-con-inner {
  margin: 0 !important;
  padding: 0 !important;
}

/* Usunięcie potencjalnych tła obrazków inline */
body.msc-abs-black [style*="url("] {
  background-image: none !important;
}

/* Minimalizacja luk pionowych jeśli motyw dodaje odstępy globalne */
body.msc-abs-black .site,
body.msc-abs-black #page {
  padding: 0 !important;
  margin: 0 !important;
}

/* Wymuś aby html/body nie miały żadnego min-height kolidującego z pełnym czarnym tłem */
html:has(body.msc-abs-black),
body.msc-abs-black {
  min-height: 100%;
}

/* Dodatkowe wymuszenia WordPress / motyw / block theme kontenery */
body.msc-abs-black #primary,
body.msc-abs-black #main,
body.msc-abs-black #content,
body.msc-abs-black .site-content,
body.msc-abs-black .wp-site-blocks,
body.msc-abs-black .wp-block-group,
body.msc-abs-black .wp-block-cover,
body.msc-abs-black .wp-block-cover-image,
body.msc-abs-black .wp-block-template-part,
body.msc-abs-black header,
body.msc-abs-black footer,
body.msc-abs-black .entry-content,
body.msc-abs-black .page,
body.msc-abs-black .post,
body.msc-abs-black .content-area,
body.msc-abs-black .hfeed,
body.msc-abs-black .site-main {
  background: #000 !important;
}

/* Zerowanie paddingów/marginesów kontenerów mogących tworzyć "ramki" */
body.msc-abs-black #primary,
body.msc-abs-black #main,
body.msc-abs-black #content,
body.msc-abs-black .site-content,
body.msc-abs-black .wp-site-blocks,
body.msc-abs-black .elementor-section,
body.msc-abs-black .elementor-container,
body.msc-abs-black .e-con-inner {
  margin: 0 !important;
  padding: 0 !important;
}

/* Usunięcie potencjalnych tła obrazków inline */
body.msc-abs-black [style*="url("] {
  background-image: none !important;
}

/* Minimalizacja luk pionowych jeśli motyw dodaje odstępy globalne */
body.msc-abs-black .site,
body.msc-abs-black #page {
  padding: 0 !important;
  margin: 0 !important;
}

/* Wymuś aby html/body nie miały żadnego min-height kolidującego z pełnym czarnym tłem */
html:has(body.msc-abs-black),
body.msc-abs-black {
  min-height: 100%;
}


/* === Cohesive Clean Auth Variant ========================================= */
/* Ziel: brak jasnych ramek, mocniejszy kontrast, jedna spójna głębia */
.msc-auth-clean.msc-auth-shell {
  min-height: 100vh;
  width: 100%;
  margin: 0;
  padding: 0;
  background:
    radial-gradient(circle at 25% 20%, #6b4a0a 0%, #2a2108 35%, transparent 70%),
    radial-gradient(circle at 75% 80%, #5a4109 0%, #221a06 40%, #0f0b03 75%),
    linear-gradient(140deg, #0b0b0b, #060606);
  background-size: cover;
  background-attachment: fixed;
  display: flex;
  flex-direction: row;
  overflow: hidden;
  position: relative;
}

.msc-auth-clean.msc-auth-shell:before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(55deg, rgba(255, 255, 255, .04) 0 2px, transparent 2px 10px),
    radial-gradient(circle at 60% 30%, rgba(251, 191, 36, .12), transparent 60%);
  mix-blend-mode: overlay;
  pointer-events: none;
  opacity: .55;
}

.msc-auth-clean .msc-auth-side {
  flex: 0 0 34%;
  padding: 70px clamp(40px, 4vw, 70px);
  background: linear-gradient(160deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .02));
  backdrop-filter: blur(22px);
  border: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .04);
}

.msc-auth-clean .msc-auth-side-inner {
  max-width: 400px;
}

.msc-auth-clean .msc-auth-brand {
  font-size: 2.6rem;
  letter-spacing: 1px;
  text-shadow: 0 10px 40px rgba(0, 0, 0, .55), 0 4px 14px rgba(0, 0, 0, .4);
}

.msc-auth-clean .msc-auth-tagline {
  color: #b8c9de;
}

.msc-auth-clean .msc-auth-benefits {
  font-size: .7rem;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: #d0dceb;
}

.msc-auth-clean .msc-auth-benefits li:before {
  content: "";
  background: linear-gradient(135deg, #4aa8ff, #1d7af0);
  width: 11px;
  height: 11px;
  border-radius: 4px;
  box-shadow: 0 2px 8px -2px rgba(0, 0, 0, .55);
  top: 4px;
}

.msc-auth-clean .msc-auth-footnote {
  color: #7b8fa7;
}

.msc-auth-clean .msc-auth-main {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 70px clamp(32px, 6vw, 100px);
}

.msc-auth-clean .msc-auth-panels {
  width: 100%;
  max-width: 620px;
  display: flex;
  flex-direction: column;
  gap: 50px;
}

.msc-auth-clean .msc-auth-panel {
  background: linear-gradient(155deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .04));
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 26px 70px -18px rgba(0, 0, 0, .7), 0 10px 40px -14px rgba(0, 0, 0, .55);
  border-radius: 30px;
  padding: 48px 46px 54px;
  position: relative;
  overflow: hidden;
  color: #d7e4f5;
  backdrop-filter: blur(22px);
}

.msc-auth-clean .msc-auth-panel:before {
  content: "";
  position: absolute;
  inset: 0;
  background: none;
  mix-blend-mode: normal;
  pointer-events: none;
}

.msc-auth-clean .msc-auth-tabs {
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .12);
  backdrop-filter: blur(16px);
  padding: 12px 14px;
  border-radius: 18px;
  display: flex;
  gap: 10px;
  box-shadow: 0 14px 40px -16px rgba(0, 0, 0, .7), 0 4px 16px -6px rgba(0, 0, 0, .55);
}

.msc-auth-clean .msc-auth-tab {
  background: linear-gradient(145deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .04));
  border: 1px solid rgba(255, 255, 255, .18);
  color: #b7c5d8;
  font-size: .72rem;
  letter-spacing: .55px;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: 14px;
  position: relative;
  cursor: pointer;
  transition: background .4s, color .4s, border-color .4s;
}

.msc-auth-clean .msc-auth-tab::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 6px;
  height: 3px;
  background: linear-gradient(90deg, #4aa8ff, #1d7af0);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: 50% 50%;
  transition: transform .5s cubic-bezier(.76, .02, .24, 1), opacity .35s;
  opacity: 0;
}

.msc-auth-clean .msc-auth-tab:hover {
  background: linear-gradient(145deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .05));
  color: #e0ecfa;
}

.msc-auth-clean .msc-auth-tab:focus-visible {
  outline: 2px solid #4aa8ff;
  outline-offset: 3px;
}

.msc-auth-clean .msc-auth-tab.active,
.msc-auth-clean .msc-auth-tab[aria-selected="true"] {
  background: linear-gradient(135deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, .10));
  color: #f0f6ff;
  border-color: rgba(255, 255, 255, .42);
  box-shadow: 0 2px 6px -2px rgba(0, 0, 0, .4) inset, 0 0 0 1px rgba(255, 255, 255, .08) inset;
}

.msc-auth-clean .msc-auth-tab.active::after,
.msc-auth-clean .msc-auth-tab[aria-selected="true"]::after {
  transform: scaleX(1);
  opacity: 1;
  height: 4px;
  bottom: 5px;
}

.msc-auth-clean .msc-field label {
  color: #88a0ba;
}

.msc-auth-clean .msc-field input {
  background: linear-gradient(180deg, #f5f9fd, #dbe7f3);
  border: 1px solid #cadef3;
  color: #0f2339;
  box-shadow: 0 1px 0 #fff inset, 0 0 0 0 rgba(74, 168, 255, .4);
}

.msc-auth-clean .msc-field input:focus {
  border-color: #4aa8ff;
  box-shadow: 0 0 0 4px rgba(74, 168, 255, .4), 0 1px 0 #fff inset;
  background: #fff;
}

.msc-auth-clean .msc-pass-toggle {
  background: linear-gradient(135deg, #1d7af0, #2563eb);
}

.msc-auth-clean .msc-pass-toggle:hover {
  filter: brightness(1.1);
}

.msc-auth-clean .msc-btn-primary {
  background: linear-gradient(90deg, #2563eb, #1d7af0);
  border: none;
  border-radius: 14px;
  font-weight: 600;
  letter-spacing: .45px;
  font-size: .82rem;
  padding: 14px 20px;
  box-shadow: 0 6px 26px -8px rgba(0, 0, 0, .55), 0 3px 12px -4px rgba(0, 0, 0, .45);
}

.msc-auth-clean .msc-btn-primary:hover {
  filter: brightness(1.08);
}

.msc-auth-clean .msc-btn-primary:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(74, 168, 255, .45);
}

.msc-auth-clean .msc-alt-links {
  color: #7f95ad;
}

.msc-auth-clean .msc-alt-links a {
  color: #4aa8ff;
}

.msc-auth-clean .msc-feedback {
  color: #d0e0f3;
}

.msc-auth-clean .msc-feedback.msc-error {
  color: #fca5a5;
}

.msc-auth-clean .msc-feedback.msc-ok {
  color: #6ee7b7;
}

.msc-auth-clean .msc-auth-panels .msc-auth-panel+.msc-auth-panel {
  margin-top: 40px;
}

@media (max-width:1080px) {
  .msc-auth-clean .msc-auth-side {
    display: none;
  }

  .msc-auth-clean .msc-auth-main {
    padding: 60px clamp(22px, 6vw, 60px);
  }

  .msc-auth-clean .msc-auth-panels {
    gap: 46px;
  }
}

@media (max-width:640px) {
  .msc-auth-clean .msc-auth-panel {
    padding: 42px 36px 50px;
    border-radius: 26px;
  }

  .msc-auth-clean .msc-auth-tabs {
    padding: 10px 10px;
  }

  .msc-auth-clean .msc-auth-tab {
    padding: 10px 16px;
  }
}

/* === Force Full-Width Variant (eliminates theme side gutters) ============ */
/* Improved fullwidth breakout: uses viewport units & centered container */
.msc-auth-fullwidth {
  position: relative;
  width: 100vw;
  min-height: 100vh;
  margin-left: 50%;
  transform: translateX(-50%);
  padding-top: clamp(40px, 6vh, 90px);
  padding-bottom: clamp(60px, 8vh, 140px);
  box-sizing: border-box;
}

body.admin-bar .msc-auth-fullwidth {
  padding-top: calc(clamp(40px, 6vh, 90px) + 32px);
}

.msc-auth-fullwidth.msc-auth-shell {
  max-width: none;
}

.msc-auth-fullwidth .msc-auth-main {
  max-width: 1240px;
  margin: 0 auto;
  width: 100%;
}

/* === Global Background Net (animated canvas) ============================ */
/* Minimal container used by login page only; safe defaults */
.msc-bg-net {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
}

.msc-bg-net canvas {
  display: block;
  width: 100vw;
  height: 100vh;
}

/* Ensure black base while net is active, also when canvas extends on long pages */
body.msc-has-net {
  background-color: #000;
}

/* Create a stacking context for plugin wrapper so body-level background layers stay behind */
.msc-theme-wrapper {
  isolation: isolate;
}

/* Remove any blue diary gradient: keep pure black base under plugin */
body:has(.msc-theme-wrapper.msc-theme-gold)::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: #000;
  pointer-events: none;
}

body.msc-has-net:has(.msc-theme-wrapper.msc-theme-gold)::before {
  background: #000;
}

/* Accept example alias class as well (ac-bg-net) just in case */
.ac-bg-net {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
}

.ac-bg-net canvas {
  display: block;
  width: 100vw;
  height: 100vh;
}

/* When net is active, provide a black base so gold is visible */
/* HARD BLACK: any page that contains our plugin views gets full black page background */
html:has(#msc-auth),
html:has(#msc-login),
html:has(#msc-register),
html:has(#msc-reset),
html:has(.msc-theme-wrapper) {
  background: #000 !important;
}

html:has(#msc-auth) body,
html:has(#msc-login) body,
html:has(#msc-register) body,
html:has(#msc-reset) body,
html:has(.msc-theme-wrapper) body {
  background: #000 !important;
}

/* Remove theme containers’ backgrounds & spacing on these pages */
html:has(#msc-auth) #page,
html:has(#msc-login) #page,
html:has(#msc-register) #page,
html:has(#msc-reset) #page,
html:has(.msc-theme-wrapper) #page,
html:has(#msc-auth) .site,
html:has(#msc-login) .site,
html:has(#msc-register) .site,
html:has(#msc-reset) .site,
html:has(.msc-theme-wrapper) .site,
html:has(#msc-auth) header,
html:has(#msc-login) header,
html:has(#msc-register) header,
html:has(#msc-reset) header,
html:has(.msc-theme-wrapper) header,
html:has(#msc-auth) footer,
html:has(#msc-login) footer,
html:has(#msc-register) footer,
html:has(#msc-reset) footer,
html:has(.msc-theme-wrapper) footer,
html:has(#msc-auth) .elementor,
html:has(#msc-login) .elementor,
html:has(#msc-register) .elementor,
html:has(#msc-reset) .elementor,
html:has(.msc-theme-wrapper) .elementor,
html:has(#msc-auth) .elementor-section,
html:has(#msc-login) .elementor-section,
html:has(#msc-register) .elementor-section,
html:has(#msc-reset) .elementor-section,
html:has(.msc-theme-wrapper) .elementor-section,
html:has(#msc-auth) .elementor-container,
html:has(#msc-login) .elementor-container,
html:has(#msc-register) .elementor-container,
html:has(#msc-reset) .elementor-container,
html:has(.msc-theme-wrapper) .elementor-container,
html:has(#msc-auth) .e-con,
html:has(#msc-login) .e-con,
html:has(#msc-register) .e-con,
html:has(#msc-reset) .e-con,
html:has(.msc-theme-wrapper) .e-con,
html:has(#msc-auth) .e-con-inner,
html:has(#msc-login) .e-con-inner,
html:has(#msc-register) .e-con-inner,
html:has(#msc-reset) .e-con-inner,
html:has(.msc-theme-wrapper) .e-con-inner,
html:has(#msc-auth) .entry-content,
html:has(#msc-login) .entry-content,
html:has(#msc-register) .entry-content,
html:has(#msc-reset) .entry-content,
html:has(.msc-theme-wrapper) .entry-content {
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Make sure any inline background styles don’t bleed through */
html:has(#msc-auth) [style*="background"],
html:has(#msc-login) [style*="background"],
html:has(#msc-register) [style*="background"],
html:has(#msc-reset) [style*="background"],
html:has(.msc-theme-wrapper) [style*="background"] {
  background: transparent !important;
}

/* Gold heading for auth hero (Panel Klubu) */
.msc-auth-hero-title {
  background: linear-gradient(180deg, #fde68a, #f59e0b) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  color: transparent !important;
  text-shadow: 0 1px 0 rgba(0, 0, 0, .6), 0 12px 28px rgba(0, 0, 0, .6);
}

/* Do not force a global black background when net is active */
/* body.msc-has-net { background:#000 !important; } */
/* When global net exists, keep wrappers transparent so canvas shows through */
/* Keep only high-level plugin wrappers transparent; DO NOT clear .msc-auth-shell/.msc-auth-main backgrounds */
body.msc-has-net .msc-modern,
body.msc-has-net .msc-theme-wrapper {
  background: transparent !important;
}

/* Keep refine animated layers visible even with net */
/* Fallback when :has() not applied due to builder order: JS adds .msc-has-net on body */
/* Do not force-clear specific auth shells; allow their designed gradients/overlays to display */
body.msc-has-net .msc-modern,
body.msc-has-net .msc-theme-wrapper {
  background: transparent !important;
}

/* Allow refine layers even when net is present (they live inside the shell above the net) */
/* Intentionally no-op for ::before/::after here */
/* Ensure site wrappers are transparent while net is present */
/* Removed global clears for site containers while net is active – limit to plugin wrappers */
/* Block theme & common wrappers */
/* Removed resets for common theme containers – only plugin shells are made transparent above */
/* Removed pseudo-element clears on site containers */
/* Cards/Tables over net: subtle translucency and gold accents for coherence */
body.msc-has-net .msc-theme-gold .msc-card,
body.msc-has-net .msc-theme-gold .msc-table-wrap,
body.msc-has-net .msc-theme-gold .msc-table {
  background: rgba(10, 10, 10, .72) !important;
  border-color: #2a220f !important;
  box-shadow: 0 10px 26px -16px rgba(0, 0, 0, .85), 0 0 0 1px #20190a !important;
}

/* Fine-tune attendance specific boxes spacing */
body.msc-has-net #msc-attendance-root .msc-card {
  margin-bottom: 16px !important;
}

/* Do not clip translucent boxes near bottom; allow the glow to render */
body.msc-has-net .msc-d-main {
  overflow: visible !important;
}

body.msc-has-net .msc-theme-gold .msc-table thead th {
  background: #0f0f0f !important;
  color: #fcd34d !important;
}

/* Dashboard: remove inner backgrounds so the canvas isn't cut off */
/* Keep inner dashboard backgrounds so the diary gradient can show through; only clear hard wrappers */
body.msc-has-net .msc-dashboard {
  background: transparent !important;
}

/* Do not wipe .msc-d-main background — it hosts the diary gradient */
/* body.msc-has-net .msc-d-main{ background:transparent !important; } */
/* body.msc-has-net .msc-d-main::before{ display:none !important; } */
/* Stretch dashboard to bottom under the net */
body.msc-has-net .msc-dashboard,
body.msc-has-net .msc-d-main,
body.msc-has-net .msc-d-sidebar {
  min-height: 100vh !important;
}

/* Ensure plugin wrappers are above the background net layer */
.msc-theme-wrapper,
.msc-auth-shell,
.msc-modern {
  position: relative;
  z-index: 1;
}

@media (max-width: 860px) {
  body.msc-has-net .msc-d-sidebar {
    min-height: auto !important;
  }
}

body.msc-has-net .msc-d-tiles {
  margin-bottom: 36px;
}

/* Attendance view — mirror dashboard look over the net */
body.msc-has-net #msc-attendance-root {
  position: relative;
  z-index: 1;
  min-height: 100vh !important;
  padding: 46px 56px 64px;
  /* align with .msc-d-main spacing */
  background: transparent !important;
  overflow: visible !important;
}

@media (max-width:1040px) {
  body.msc-has-net #msc-attendance-root {
    padding: 40px 42px 60px;
  }
}

@media (max-width:860px) {
  body.msc-has-net #msc-attendance-root {
    padding: 32px 26px 68px;
  }
}

body.msc-has-net #msc-attendance-root .msc-header {
  color: #fcd34d !important;
  text-shadow: 0 0 14px rgba(245, 158, 11, .18), 0 1px 0 rgba(0, 0, 0, .5) !important;
  border-bottom: 1px solid #2a220f !important;
  padding-bottom: 10px !important;
  margin-bottom: 14px !important;
}

body.msc-has-net #msc-attendance-root .msc-att-sessions {
  margin-bottom: 28px;
}

/* Softer tiles over animated net (gold theme) */
body.msc-has-net .msc-theme-gold .msc-d-tile {
  background: rgba(10, 10, 10, .7) !important;
  border-color: #2a220f !important;
  box-shadow: 0 8px 22px -16px rgba(0, 0, 0, .82), 0 0 0 1px #20190a !important;
}

body.msc-has-net .msc-theme-gold .msc-d-tile:hover {
  border-color: #3a2a12 !important;
  box-shadow: 0 12px 28px -18px rgba(0, 0, 0, .88), 0 0 0 1px #3a2a12, 0 0 14px -8px rgba(245, 158, 11, .24) !important;
}

/* Sidebar and topbar coherence over net */
body.msc-has-net .msc-theme-gold .msc-d-sidebar {
  background: rgba(8, 8, 8, .8) !important;
  border-right: 1px solid #221a09 !important;
  box-shadow: 0 6px 18px -12px rgba(0, 0, 0, .8);
}

body.msc-has-net .msc-theme-gold .msc-d-top {
  border-bottom: 1px solid #1c1608 !important;
}

/* Golden title subtle glow */
body.msc-has-net .msc-theme-gold .msc-d-top h1 {
  color: #fcd34d !important;
  text-shadow: 0 0 10px rgba(245, 158, 11, .18), 0 1px 2px rgba(0, 0, 0, .5) !important;
}

/* Nuke decorative before/after on wrappers so they don't mask the canvas */
body.msc-has-net #page::before,
body.msc-has-net #page::after,
body.msc-has-net .site::before,
body.msc-has-net .site::after,
body.msc-has-net .wp-site-blocks::before,
body.msc-has-net .wp-site-blocks::after,
body.msc-has-net .entry-content::before,
body.msc-has-net .entry-content::after,
body.msc-has-net .content-area::before,
body.msc-has-net .content-area::after,
body.msc-has-net .site-main::before,
body.msc-has-net .site-main::after,
body.msc-has-net header::before,
body.msc-has-net header::after,
body.msc-has-net footer::before,
body.msc-has-net footer::after,
body.msc-has-net .elementor::before,
body.msc-has-net .elementor::after,
body.msc-has-net .elementor-section::before,
body.msc-has-net .elementor-section::after,
body.msc-has-net .elementor-container::before,
body.msc-has-net .elementor-container::after,
body.msc-has-net .elementor-column::before,
body.msc-has-net .elementor-column::after,
body.msc-has-net .e-con::before,
body.msc-has-net .e-con::after,
body.msc-has-net .e-con-inner::before,
body.msc-has-net .e-con-inner::after,
body.msc-has-net .elementor-widget-wrap::before,
body.msc-has-net .elementor-widget-wrap::after,
body.msc-has-net .elementor-shortcode::before,
body.msc-has-net .elementor-shortcode::after {
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .msc-bg-net:not(.msc-animate-force) {
    display: none !important;
  }
}

/* Simplified always-centered auth layout */
.msc-auth-fullwidth.msc-auth-clean {
  --msc-auth-panel-w: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  padding: 0 clamp(20px, 4vw, 48px);
}

.msc-auth-fullwidth.msc-auth-clean .msc-auth-side {
  display: none !important;
}

.msc-auth-fullwidth.msc-auth-clean .msc-auth-main {
  width: 100%;
  max-width: var(--msc-auth-panel-w);
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}

.msc-auth-fullwidth.msc-auth-clean .msc-auth-panels {
  width: 100%;
  max-width: var(--msc-auth-panel-w);
}

/* unified centered heading width */
.msc-auth-fullwidth.msc-auth-clean .msc-auth-context {
  width: 100%;
  max-width: var(--msc-auth-panel-w);
  margin: 0 auto 4px;
  text-align: center;
  font-size: clamp(1.55rem, 2.4vw, 1.85rem);
  font-weight: 600;
  letter-spacing: .5px;
  background: linear-gradient(90deg, #ffffff, #dfe9ff 45%, #b3d4ff 85%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, .38));
}

@media (min-height:900px) {
  .msc-auth-fullwidth.msc-auth-clean {
    justify-content: center;
  }
}

@media (max-width:1100px) {
  .msc-auth-fullwidth.msc-auth-clean {
    grid-template-columns: 1fr;
    padding: 70px clamp(24px, 5vw, 48px) 90px;
  }

  .msc-auth-fullwidth.msc-auth-clean .msc-auth-side {
    display: none;
  }

  .msc-auth-fullwidth.msc-auth-clean .msc-auth-panels {
    gap: 54px;
  }
}

@media (max-width:560px) {
  .msc-auth-fullwidth.msc-auth-clean {
    padding: 56px clamp(16px, 6vw, 28px) 80px;
  }

  .msc-auth-fullwidth.msc-auth-clean .msc-auth-panel {
    padding: 40px 30px 46px;
  }
}

/* === Focus Variant: show only one panel at a time (clean vertical) ======= */
.msc-auth-focus.msc-auth-clean {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.msc-auth-focus.msc-auth-clean .msc-auth-main {
  gap: 18px;
}

.msc-auth-focus .msc-auth-panels {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.msc-auth-focus .msc-auth-panel {
  width: var(--msc-auth-panel-w);
  max-width: 100%;
}

.msc-auth-focus .msc-auth-panel.hidden {
  display: none !important;
}

.msc-auth-focus .msc-auth-tabs {
  align-self: center;
  margin-bottom: 6px;
  box-shadow: 0 6px 22px -10px rgba(0, 0, 0, .55);
  position: relative;
  width: var(--msc-auth-panel-w);
}

/* refined spacing + width */
.msc-auth-focus .msc-auth-panels .msc-auth-panel+.msc-auth-panel {
  margin-top: 0;
}

.msc-auth-focus .msc-auth-side-inner {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.msc-auth-focus .msc-auth-brand {
  font-size: 2.8rem;
}

.msc-auth-focus .msc-auth-tagline {
  font-size: .92rem;
  line-height: 1.45;
}

.msc-auth-focus .msc-auth-benefits {
  gap: 8px;
}

.msc-auth-focus .msc-auth-panel {
  padding: 36px 32px 40px;
  border-radius: 24px;
}

.msc-auth-focus .msc-auth-panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .06)) padding-box,
    linear-gradient(140deg, rgba(255, 255, 255, .45), rgba(255, 255, 255, 0) 55%) border-box;
  border: 1px solid rgba(255, 255, 255, .22);
  box-shadow:
    0 20px 46px -18px rgba(0, 0, 0, .55),
    0 8px 28px -14px rgba(0, 0, 0, .5),
    0 0 0 1px rgba(255, 255, 255, .05) inset,
    0 1px 0 rgba(255, 255, 255, .22) inset,
    0 0 0 4px rgba(255, 255, 255, .04) inset;
  backdrop-filter: blur(20px) saturate(160%);
}

.msc-auth-focus .msc-auth-tabs {
  background: rgba(255, 255, 255, .04);
}

.msc-auth-focus .msc-auth-panels,
.msc-auth-focus .msc-auth-tabs {
  max-width: var(--msc-auth-panel-w);
}

.msc-auth-focus .msc-auth-main {
  align-items: center;
}

.msc-auth-focus .msc-auth-main>.msc-auth-tabs {
  width: 100%;
}

@media (max-width:1100px) {
  .msc-auth-focus.msc-auth-clean {
    grid-template-columns: 1fr;
  }

  .msc-auth-focus .msc-auth-panel {
    width: 100%;
  }

  .msc-auth-focus .msc-auth-tabs {
    align-self: center;
  }
}

@media (max-width:640px) {
  .msc-auth-focus .msc-auth-panel {
    padding: 40px 30px 46px;
  }
}

/* Ensure any .hidden inside auth always hides */
.msc-auth-panel.hidden {
  display: none !important;
}

/* If some themes wrap shortcode in .entry-content adding padding */
.entry-content>.msc-auth-fullwidth {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.msc-auth-full-bg {
  background: radial-gradient(circle at 18% 22%, #1d62cc 0%, #0f3978 34%, #07203f 68%) fixed, linear-gradient(125deg, #08172a, #06121f 70%);
  background-size: cover;
  background-attachment: fixed;
  overflow-x: hidden;
}

/* subtle right edge fade so dark block nie jest twardy */
.msc-auth-full-bg:after {
  content: "";
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 28vw;
  pointer-events: none;
  background: linear-gradient(270deg, rgba(6, 18, 31, .92) 0%, rgba(10, 28, 50, .6) 35%, rgba(12, 34, 60, 0) 100%);
}

/* === Enhancement Pack A1 B1 C1 D1 E4 F1 =================================== */
/* B1: darker inputs (override clean variant) */
.msc-auth-clean .msc-field input {
  background: linear-gradient(180deg, #142739, #0f1e2c);
  border: 1px solid #244864;
  color: #e6f2ff;
  box-shadow: 0 0 0 0 rgba(74, 168, 255, .35), 0 1px 2px rgba(0, 0, 0, .45) inset;
}

/* === Auth Tabs Simplified High Clarity =================================== */
.msc-auth-refine .msc-auth-tabs {
  display: flex;
  padding: 6px;
  gap: 8px;
  background: #0d1115;
  border: 1px solid #1e2730;
  border-radius: 14px;
}

.msc-auth-refine .msc-auth-tab {
  flex: 1;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .35px;
  padding: 11px 10px 10px;
  border: 1px solid #25313c;
  border-radius: 9px;
  background: #141b23;
  color: #f2f6fa;
  cursor: pointer;
  position: relative;
  transition: background .25s, color .25s, border-color .25s, box-shadow .3s;
}

.msc-auth-refine .msc-auth-tab:not(.active):not([aria-selected="true"]) {
  color: #e3e9ef;
}

.msc-auth-refine .msc-auth-tab:hover {
  background: #1c2731;
  color: #fff;
  border-color: #334758;
}

.msc-auth-refine .msc-auth-tab:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

.msc-auth-refine .msc-auth-tab.active,
.msc-auth-refine .msc-auth-tab[aria-selected="true"] {
  background: #2563eb;
  color: #ffffff;
  border-color: #3b82f6;
  box-shadow: 0 0 0 1px #1d4ed8 inset, 0 2px 6px -2px rgba(0, 0, 0, .6);
}

.msc-auth-refine .msc-auth-tab.active::after,
.msc-auth-refine .msc-auth-tab[aria-selected="true"]::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: -4px;
  height: 3px;
  background: #53a3ff;
  border-radius: 2px;
  box-shadow: 0 2px 6px -2px rgba(83, 163, 255, .65);
}

@media (max-width:560px) {
  .msc-auth-refine .msc-auth-tabs {
    gap: 4px;
    padding: 4px 6px 6px;
  }

  .msc-auth-refine .msc-auth-tab {
    font-size: .74rem;
    padding: 10px 8px 9px;
  }
}



/* === DASHBOARD 2.0 JASNY WARIANT ========================================= */
/* Dashboard z jasnym motywem jako domyślny */
.msc-dashboard {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px 1fr;
  background: #000000;
  position: relative;
}

@media (max-width:1040px) {
  .msc-dashboard {
    grid-template-columns: 220px 1fr;
  }
}

@media (max-width:860px) {
  .msc-dashboard {
    grid-template-columns: 1fr;
  }
}

/* Sidebar - dark variant */
.msc-d-sidebar {
  display: flex;
  flex-direction: column;
  gap: 22px;
  background: #0c0c0c;
  backdrop-filter: blur(10px);
  border-right: 1px solid #1c1c1c;
  box-shadow: 2px 0 8px rgba(0, 0, 0, .5);
  position: relative;
  z-index: 2;
}

.msc-d-sidebar:after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 88% 14%, rgba(245, 158, 11, .06), transparent 60%),
    radial-gradient(circle at 20% 82%, rgba(251, 191, 36, .04), transparent 65%);
  mix-blend-mode: screen;
  opacity: .3;
}

.msc-d-brand {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: .8px;
  color: #fbbf24;
  text-shadow: 0 0 12px rgba(245, 158, 11, .35);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .5));
}

.msc-d-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.msc-d-nav a {
  position: relative;
  /* extra left padding so the decorative stripe does not overlap text */
  padding: 10px 18px 10px 22px;
  font-size: .78rem;
  letter-spacing: .4px;
  font-weight: 600;
  border: 1px solid var(--msc-border);
  background: var(--msc-surface);
  color: var(--msc-text);
  border-radius: 10px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background .35s, color .35s, border-color .4s, box-shadow .5s, transform .2s;
}

.msc-d-nav a:before {
  content: "";
  position: absolute;
  /* move the stripe further left so it sits in the gutter */
  left: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 50%;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--msc-accent), var(--msc-accent-dark));
  opacity: 0;
  transition: opacity .4s, height .4s;
}

.msc-d-nav a:hover {
  background: color-mix(in oklab, var(--msc-surface), var(--msc-accent) 8%);
  color: var(--msc-text-strong);
  border-color: color-mix(in oklab, var(--msc-border), var(--msc-accent) 20%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
}

.msc-d-nav a.active {
  background: linear-gradient(100deg, color-mix(in oklab, var(--msc-accent), var(--msc-white) 20%) 0%,
      color-mix(in oklab, var(--msc-accent), var(--msc-white) 40%) 60%,
      color-mix(in oklab, var(--msc-accent), var(--msc-white) 25%) 100%);
  color: var(--msc-white);
  border-color: var(--msc-accent);
  box-shadow: 0 4px 12px rgba(49, 130, 206, .25), 0 0 0 1px var(--msc-accent-light);
}

.msc-d-nav a.active:before {
  opacity: 1;
  height: 70%;
}

.msc-d-nav a:active {
  transform: translateY(1px);
}

/* === Dashboard Responsive Layout ========================================== */
/* Mobile phones (max 640px) */
@media (max-width:640px) {
  .msc-dashboard {
    grid-template-columns: 1fr;
  }

  .msc-d-sidebar {
    position: sticky;
    top: 0;
    z-index: 100;
    flex-direction: row;
    overflow-x: auto;
    padding: 12px 12px 14px;
    gap: 8px;
    border-right: none;
    border-bottom: 1px solid #1c1c1c;
    box-shadow: 0 4px 16px -8px rgba(0, 0, 0, .7);
    backdrop-filter: blur(20px) saturate(160%);
    align-items: center;
    -webkit-overflow-scrolling: touch;
  }

  body.msc-has-net .msc-d-sidebar {
    min-height: auto !important;
  }

  .msc-d-brand {
    margin-right: 8px;
    font-size: .85rem;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .msc-d-nav {
    flex-direction: row;
    gap: 6px;
    align-items: center;
    overflow-x: auto;
    flex: 1;
  }

  .msc-d-nav a {
    flex: 0 0 auto;
    padding: 8px 14px 8px 18px;
    font-size: .72rem;
    height: auto;
    white-space: nowrap;
  }

  .msc-d-nav a:before {
    height: 35%;
    left: 5px;
    width: 3px;
  }

  .msc-d-main {
    padding: 24px 18px 60px;
  }

  .msc-d-top {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 24px;
  }

  .msc-d-top h1 {
    font-size: 1.6rem;
  }

  .msc-d-tiles {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .msc-icon-btn {
    width: 38px;
    height: 38px;
    font-size: 1rem;
  }
}

/* Tablets portrait (641px - 860px) */
@media (min-width:641px) and (max-width:860px) {
  .msc-dashboard {
    grid-template-columns: 1fr;
  }

  .msc-d-sidebar {
    position: sticky;
    top: 0;
    z-index: 100;
    flex-direction: row;
    overflow-x: auto;
    padding: 14px 16px 16px;
    gap: 10px;
    border-right: none;
    border-bottom: 1px solid #1c1c1c;
    box-shadow: 0 6px 18px -10px rgba(0, 0, 0, .6);
    backdrop-filter: blur(24px) saturate(160%);
    align-items: center;
  }

  .msc-d-brand {
    margin-right: 12px;
    font-size: .95rem;
    white-space: nowrap;
  }

  .msc-d-nav {
    flex-direction: row;
    gap: 8px;
    align-items: center;
    overflow-x: auto;
  }

  .msc-d-nav a {
    flex: 0 0 auto;
    padding: 9px 16px 9px 20px;
    font-size: .75rem;
  }

  .msc-d-nav a:before {
    height: 38%;
    left: 6px;
  }

  .msc-d-main {
    padding: 28px 24px 70px;
  }

  .msc-d-top {
    gap: 20px;
    margin-bottom: 28px;
  }

  .msc-d-top h1 {
    font-size: 1.85rem;
  }

  .msc-d-tiles {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
  }
}

/* Tablets landscape (861px - 1040px) */
@media (min-width:861px) and (max-width:1040px) {
  .msc-dashboard {
    grid-template-columns: 220px 1fr;
  }

  .msc-d-sidebar {
    padding: 24px 18px;
    gap: 8px;
  }

  .msc-d-brand {
    font-size: 1.05rem;
  }

  .msc-d-nav a {
    font-size: .76rem;
    padding: 9px 16px 9px 20px;
  }

  .msc-d-main {
    padding: 36px 38px 70px;
  }

  .msc-d-top h1 {
    font-size: 1.95rem;
  }

  .msc-d-tiles {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 28px;
  }
}

/* Standard desktops (1041px - 1280px) */
@media (min-width:1041px) and (max-width:1280px) {
  .msc-dashboard {
    grid-template-columns: 240px 1fr;
  }

  .msc-d-sidebar {
    padding: 28px 20px;
  }

  .msc-d-main {
    padding: 42px 48px 75px;
  }

  .msc-d-tiles {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
  }
}

/* Large desktops (1281px+) */
@media (min-width:1281px) {
  .msc-dashboard {
    grid-template-columns: 260px 1fr;
  }

  .msc-d-sidebar {
    padding: 32px 24px;
  }

  .msc-d-main {
    padding: 46px 56px 80px;
  }

  .msc-d-tiles {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 34px;
  }
}

/* Main area - dark variant */
.msc-d-main {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #020202 0%, #050505 100%);
}

.msc-d-main:before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 74% 18%, rgba(245, 158, 11, .03), transparent 55%),
    radial-gradient(circle at 18% 72%, rgba(251, 191, 36, .02), transparent 60%);
  opacity: .25;
  mix-blend-mode: screen;
  pointer-events: none;
}

/* Wyłącz ciężkie efekty na monitorach >1920px */
@media (min-width: 1921px) {
  .msc-d-main:before {
    opacity: .15;
  }
}

.msc-d-top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  margin: 0 0 34px;
  padding: 0 0 14px;
  border-bottom: 1px solid var(--msc-border);
}

.msc-d-top h1 {
  margin: 0;
  font-size: 2.15rem;
  line-height: 1.05;
  letter-spacing: .6px;
  font-weight: 800;
  color: var(--msc-text-strong);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .05);
}

@media (max-width:600px) {
  .msc-d-top h1 {
    font-size: 1.7rem;
  }
}

.msc-d-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.msc-user-name {
  background: var(--msc-surface);
  padding: 8px 14px;
  border-radius: 32px;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .5px;
  color: var(--msc-text-strong);
  border: 1px solid var(--msc-border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .05);
}

.msc-icon-btn {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--msc-accent), var(--msc-accent-dark));
  color: var(--msc-white);
  text-decoration: none;
  font-size: 1.05rem;
  box-shadow: 0 2px 8px rgba(49, 130, 206, .25), 0 0 0 1px var(--msc-accent-dark);
  transition: filter .35s, transform .35s;
  cursor: pointer;
  border: none;
  appearance: none;
}

.msc-icon-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
}

.msc-icon-btn:active {
  transform: translateY(1px);
}

/* Logout button - wyróżniony czerwony */
.msc-logout-btn,
a.msc-logout-btn {
  padding: 9px 18px;
  border-radius: 8px;
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  color: #fff;
  text-decoration: none;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .4px;
  border: 1px solid #991b1b;
  box-shadow: 0 2px 8px rgba(220, 38, 38, .3), 0 0 0 1px #7f1d1d;
  transition: all .3s cubic-bezier(.4, 0, .2, 1);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.msc-logout-btn:hover,
a.msc-logout-btn:hover {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  border-color: #b91c1c;
  box-shadow: 0 4px 14px rgba(220, 38, 38, .4), 0 0 0 1px #991b1b;
  transform: translateY(-2px);
}

.msc-logout-btn:active,
a.msc-logout-btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(220, 38, 38, .3);
}

/* Ikona w przycisku wylogowania */
.msc-logout-btn:before {
  content: "⎋";
  font-size: 1.1em;
  line-height: 1;
}

/* Responsywny logout - na małych ekranach tylko ikona */
@media (max-width:480px) {
  .msc-logout-btn {
    padding: 10px;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    justify-content: center;
  }

  .msc-logout-btn .msc-logout-text {
    display: none;
  }
}

/* Tiles grid - jasny wariant */
.msc-d-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 34px;
  position: relative;
  z-index: 2;
}

.msc-d-tile {
  position: relative;
  background: linear-gradient(145deg, var(--msc-surface), var(--msc-surface-alt));
  border: 1px solid var(--msc-border);
  border-radius: 18px;
  padding: 26px 26px 28px;
  text-decoration: none;
  color: var(--msc-text);
  box-shadow: var(--msc-shadow-soft);
  overflow: hidden;
  transition: background .3s, box-shadow .4s, transform .4s, border-color .3s;
}

.msc-d-tile:before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 78% 18%, rgba(245, 158, 11, .06), transparent 60%),
    radial-gradient(circle at 18% 82%, rgba(251, 191, 36, .04), transparent 65%);
  opacity: .4;
  mix-blend-mode: screen;
  pointer-events: none;
  transition: opacity .3s;
}

.msc-d-tile:hover {
  transform: translateY(-6px);
  border-color: color-mix(in oklab, var(--msc-border), var(--msc-accent) 30%);
  background: linear-gradient(145deg, var(--msc-surface), var(--msc-surface-alt));
  box-shadow: 0 8px 25px rgba(0, 0, 0, .5), 0 0 0 1px color-mix(in oklab, var(--msc-accent), #000 50%);
}

.msc-d-tile:hover:before {
  opacity: .6;
}

.msc-d-ico {
  font-size: 2.2rem;
  margin: 0 0 14px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .1));
}

.msc-d-title {
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: .4px;
  margin: 0 0 6px;
  color: var(--msc-text-strong);
}

.msc-d-desc {
  font-size: .78rem;
  line-height: 1.5;
  letter-spacing: .3px;
  color: var(--msc-text-muted);
  margin: 0;
}

/* Dynamic content panel - jasny wariant */
#msc-d-content.msc-card {
  background: linear-gradient(145deg, var(--msc-surface), var(--msc-surface-alt));
  border: 1px solid var(--msc-border);
  border-radius: 22px;
  padding: 34px 40px 42px;
  box-shadow: var(--msc-shadow);
  color: var(--msc-text);
}

#msc-d-content.msc-card h2:first-child {
  margin-top: 0;
}

/* Scroll enhancements for long dynamic panels */
#msc-d-content.msc-card::-webkit-scrollbar {
  width: 10px;
}

#msc-d-content.msc-card::-webkit-scrollbar-track {
  background: var(--msc-border);
  border-radius: 6px;
}

#msc-d-content.msc-card::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--msc-accent), var(--msc-accent-dark));
  border-radius: 6px;
}

/* Fade animation for tile -> panel transition */
@keyframes mscPanelFade {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Already referenced earlier (#msc-d-content), commit stronger variant */
#msc-d-content {
  animation: mscPanelFade .55s cubic-bezier(.4, .08, .1, 1);
}

/* Reduce motion fallback */
@media (prefers-reduced-motion:reduce) {

  .msc-d-tile,
  .msc-d-nav a,
  #msc-d-content {
    transition: none !important;
    animation: none !important;
  }
}

/* Gold + Emerald theme integration for new dashboard visuals */
/* When net is active, keep dashboard fully transparent; otherwise, allow theme gradient */
.msc-auth-theme-gold .msc-dashboard,
.msc-theme-gold .msc-dashboard {
  background: linear-gradient(145deg, #050505, #0e0e0e 55%, #141414);
}

body.msc-has-net .msc-theme-gold .msc-dashboard {
  background: transparent !important;
}

.msc-auth-theme-gold .msc-d-tile,
.msc-theme-gold .msc-d-tile {
  background: linear-gradient(150deg, rgba(255, 200, 80, .08), rgba(255, 200, 80, .02));
  border-color: rgba(255, 255, 255, .12);
}

.msc-auth-theme-gold .msc-d-tile:hover,
.msc-theme-gold .msc-d-tile:hover {
  box-shadow: 0 14px 42px -14px rgba(0, 0, 0, .85), 0 0 0 1px rgba(255, 200, 80, .25), 0 0 32px -10px rgba(255, 185, 60, .4);
}

.msc-auth-theme-gold #msc-d-content.msc-card,
.msc-theme-gold #msc-d-content.msc-card {
  background: linear-gradient(145deg, rgba(255, 200, 80, .08), rgba(255, 200, 80, .02));
}

.msc-auth-theme-emerald .msc-dashboard,
.msc-theme-emerald .msc-dashboard {
  background: linear-gradient(145deg, #031a13, #06251a 55%, #052d1e);
}

.msc-auth-theme-emerald .msc-d-tile,
.msc-theme-emerald .msc-d-tile {
  background: linear-gradient(150deg, rgba(16, 185, 129, .12), rgba(16, 185, 129, .025));
  border-color: rgba(255, 255, 255, .1);
}

.msc-auth-theme-emerald .msc-d-tile:hover,
.msc-theme-emerald .msc-d-tile:hover {
  box-shadow: 0 14px 42px -14px rgba(0, 0, 0, .85), 0 0 0 1px rgba(16, 185, 129, .3), 0 0 32px -10px rgba(16, 185, 129, .4);
}

.msc-auth-theme-emerald #msc-d-content.msc-card,
.msc-theme-emerald #msc-d-content.msc-card {
  background: linear-gradient(145deg, rgba(16, 185, 129, .12), rgba(16, 185, 129, .03));
}

/* Utility: compact density mode (future) */
.msc-dashboard.compact .msc-d-tile {
  padding: 20px 20px 22px;
}

.msc-dashboard.compact .msc-d-main {
  padding: 34px 40px 60px;
}

.msc-auth-clean .msc-field input::placeholder {
  color: #aac2d6;
  opacity: .9;
}

.msc-icon-field:before {
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .4));
  opacity: .92;
}

.msc-auth-clean .msc-field input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, .35), 0 1px 0 #0b1a28 inset;
  background: #152d42;
  color: #ffffff;
}

/* C1: centered tab bar sizing */
.msc-auth-focus .msc-auth-tabs {
  max-width: 480px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  justify-content: center;
}

.msc-auth-focus .msc-auth-tabs .msc-auth-tab {
  flex: 1 1 auto;
}

/* D1: full-width primary button & larger radius */
.msc-auth-clean .msc-actions .msc-btn-primary {
  width: 100%;
  border-radius: 24px;
  padding: 16px 26px;
  font-size: .9rem;
  letter-spacing: .55px;
}

/* E4: icon fields */
.msc-icon-field {
  position: relative;
}

.msc-icon-field input {
  padding-left: 44px !important;
}

.msc-icon-field:before {
  content: "";
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  opacity: .85;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .4));
  background-size: 22px 22px;
  background-repeat: no-repeat;
}

/* Mail icon */
.msc-if-mail:before {
  background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' fill='none' stroke='%236ab6ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='3' y='5' width='18' height='14' rx='2' ry='2'/%3E%3Cpolyline points='3,7 12,13 21,7'/%3E%3C/svg%3E");
}

/* Lock icon */
.msc-if-lock:before {
  background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' fill='none' stroke='%236ab6ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='4' y='11' width='16' height='10' rx='2'/%3E%3Cpath d='M8 11V8a4 4 0 0 1 8 0v3'/%3E%3Ccircle cx='12' cy='16' r='1.5'/%3E%3C/svg%3E");
}

/* User icon */
.msc-if-user:before {
  background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' fill='none' stroke='%236ab6ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 20c1.2-4 6.8-6 8-6s6.8 2 8 6'/%3E%3C/svg%3E");
}

/* Password toggle alignment inside icon field */
.msc-icon-field .msc-pass-toggle {
  right: 10px;
}

/* F1: password strength meter */
.msc-pass-strength {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: .65rem;
  letter-spacing: .4px;
}

.msc-pass-strength .msc-ps-bar {
  background: #132432;
  border: 1px solid #1f3a52;
  border-radius: 10px;
  height: 12px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .45) inset;
  isolation: isolate;
}

.msc-pass-strength .msc-ps-bar span {
  position: absolute;
  left: 0;
  top: 0;
  display: block;
  height: 100%;
  width: var(--msc-ps-width, 100%);
  z-index: 2;
  transform-origin: left center !important;
  transform: scaleX(var(--msc-ps-scale, 0)) !important;
  opacity: 1 !important;
  mix-blend-mode: normal !important;
  background: linear-gradient(90deg, var(--msc-ps-color-start, #ef4444), var(--msc-ps-color-end, #dc2626)) !important;
  background-color: var(--msc-ps-color-end, #dc2626);
  transition: transform .35s ease, width .35s ease, background .45s ease;
  border-radius: 12px;
  will-change: transform, width, background;
  box-shadow: 0 0 18px -8px var(--msc-ps-color-end, #dc2626);
}

.msc-pass-strength .msc-ps-label {
  font-size: .7rem;
  font-weight: 600;
  color: #94b4d3;
}

/* Map score -> width & colors */
.msc-pass-strength[data-score="0"] {
  --msc-ps-scale: .14;
  --msc-ps-width: 14%;
  --msc-ps-color-start: #ef4444;
  --msc-ps-color-end: #dc2626;
}

.msc-pass-strength[data-score="1"] {
  --msc-ps-scale: .34;
  --msc-ps-width: 34%;
  --msc-ps-color-start: #f97316;
  --msc-ps-color-end: #ea580c;
}

.msc-pass-strength[data-score="2"] {
  --msc-ps-scale: .60;
  --msc-ps-width: 60%;
  --msc-ps-color-start: #eab308;
  --msc-ps-color-end: #ca8a04;
}

.msc-pass-strength[data-score="3"] {
  --msc-ps-scale: .80;
  --msc-ps-width: 80%;
  --msc-ps-color-start: #16a34a;
  --msc-ps-color-end: #15803d;
}

/* Full strength */
.msc-pass-strength[data-score="4"] {
  --msc-ps-scale: 1;
  --msc-ps-width: 100%;
  --msc-ps-color-start: #22c55e;
  --msc-ps-color-end: #16a34a;
}

.msc-pass-strength[data-score="0"] .msc-ps-bar span {
  background: linear-gradient(90deg, #ef4444, #dc2626) !important;
}

.msc-pass-strength[data-score="1"] .msc-ps-bar span {
  background: linear-gradient(90deg, #f97316, #ea580c) !important;
}

.msc-pass-strength[data-score="2"] .msc-ps-bar span {
  background: linear-gradient(90deg, #eab308, #ca8a04) !important;
}

.msc-pass-strength[data-score="3"] .msc-ps-bar span {
  background: linear-gradient(90deg, #16a34a, #15803d) !important;
}

.msc-pass-strength[data-score="4"] .msc-ps-bar span {
  background: linear-gradient(90deg, #22c55e, #16a34a) !important;
}

.msc-pass-strength[data-score="4"] .msc-ps-bar span {
  box-shadow: 0 0 22px -6px rgba(34, 197, 94, .55);
}

/* Simplified: use base .msc-auth-banner-close styles for all banners (minimal × button) */
/* Ensure no stray blue override; keep consistent green for strong */
.msc-pass-strength[data-score="4"] .msc-ps-bar span {
  width: 100%;
  background: linear-gradient(90deg, #22c55e, #16a34a) !important;
}

.msc-field-strength {
  grid-column: 1 / -1;
  margin-top: -4px;
}

/* Dashboard logo placement */
.msc-dashboard .msc-d-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 16px 0;
}

.msc-dashboard .msc-d-logo img {
  max-width: 220px;
  width: 60%;
  height: auto;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .4));
  opacity: .95;
}

@media (prefers-reduced-motion: reduce) {
  .msc-auth-clean .msc-auth-tab::after {
    transition: none !important;
  }
}


/* === Single Panel Variant (standalone login/register/reset) ============= */
.msc-auth-single.msc-auth-shell {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
}

.msc-auth-single .msc-auth-main.solo {
  width: 100%;
  max-width: 520px;
  padding: 0;
}

.msc-auth-single .msc-auth-panel {
  backdrop-filter: blur(14px);
  background: linear-gradient(155deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .05));
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 30px;
  padding: 50px 46px 58px;
  box-shadow: 0 22px 70px -18px rgba(0, 0, 0, .65), 0 8px 34px -12px rgba(0, 0, 0, .55);
}

.msc-auth-single .msc-auth-brand.solo {
  font-size: 2.1rem;
  margin: 0 0 10px;
  letter-spacing: .9px;
}

.msc-auth-single .msc-auth-tagline.solo {
  margin: 0 0 30px;
  font-size: .85rem;
  letter-spacing: .4px;
  color: #b5c6dc;
}

.msc-auth-single .msc-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}

.msc-auth-single .msc-field:last-of-type {
  margin-bottom: 10px;
}

.msc-auth-single .msc-actions {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.msc-auth-single .msc-alt-links {
  text-align: center;
  font-size: .65rem;
  color: #8ea3bd;
}

.msc-auth-single .msc-alt-links a {
  color: #4aa8ff;
  text-decoration: none;
  font-weight: 600;
}

.msc-auth-single .msc-alt-links a:hover {
  text-decoration: underline;
}

@media (max-width:640px) {
  .msc-auth-single .msc-auth-panel {
    padding: 42px 34px 48px;
    border-radius: 26px;
  }
}

/* === Journal / Notebook Aesthetic Variant ================================= */
.msc-theme-journal {
  --msc-j-bg: #fdfdfb;
  --msc-j-paper: #ffffff;
  --msc-j-ink: #2f3437;
  --msc-j-accent: #3d63d6;
  --msc-j-accent-soft: #5d7ff0;
  --msc-j-line: #e7e9ef;
  --msc-j-muted: #6b7280;
  --msc-j-wash: #f3f5fa;
  background: var(--msc-j-bg);
  color: var(--msc-j-ink);
  font-family: "Inter", "Segoe UI", system-ui, Arial, sans-serif;
}

.msc-theme-journal .msc-auth-shell {
  background: linear-gradient(115deg, #f3f6fc 0%, #eef2f9 40%, #e8eef8 100%);
  position: relative;
}

.msc-theme-journal .msc-auth-shell:before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(180deg, rgba(61, 99, 214, .05) 0 42px, transparent 42px 84px), radial-gradient(circle at 70% 30%, rgba(93, 127, 240, .08), transparent 60%);
  pointer-events: none;
}

.msc-theme-journal .msc-auth-side {
  background: linear-gradient(135deg, #4564d3, #5d7ff0, #6e90ff);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15);
}

.msc-theme-journal .msc-auth-side-inner {
  backdrop-filter: blur(2px);
}

.msc-theme-journal .msc-auth-brand {
  font-family: "Poppins", "Inter", sans-serif;
  letter-spacing: .8px;
}

.msc-theme-journal .msc-auth-panel {
  background: var(--msc-j-paper);
  border: 1px solid var(--msc-j-line);
  box-shadow: 0 6px 28px -8px rgba(0, 20, 90, .25), 0 2px 6px -2px rgba(0, 0, 0, .08);
  position: relative;
  overflow: hidden;
}

.msc-theme-journal .msc-auth-panel:before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .75), rgba(255, 255, 255, .9)),
    repeating-linear-gradient(0deg, transparent 0 34px, rgba(61, 99, 214, .08) 34px 35px);
  opacity: .55;
  mix-blend-mode: overlay;
  pointer-events: none;
}

.msc-theme-journal .msc-auth-tab {
  background: rgba(255, 255, 255, .45);
  border: 1px solid var(--msc-j-line);
  color: var(--msc-j-muted);
  backdrop-filter: blur(3px);
  border-radius: 14px;
  padding: 12px 22px;
  position: relative;
  font-weight: 600;
  letter-spacing: .4px;
  overflow: hidden;
  transition: background .4s ease, color .4s ease, box-shadow .4s ease, border-color .35s ease;
}

.msc-theme-journal .msc-auth-tab::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 8px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--msc-j-accent), var(--msc-j-accent-soft));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .45s cubic-bezier(.65, .05, .36, 1);
}

.msc-theme-journal .msc-auth-tab:hover {
  background: rgba(255, 255, 255, .65);
}

.msc-theme-journal .msc-auth-tab:focus-visible {
  outline: 2px solid var(--msc-j-accent);
  outline-offset: 3px;
}

.msc-theme-journal .msc-auth-tab[aria-selected="true"],
.msc-theme-journal .msc-auth-tab.active {
  background: linear-gradient(135deg, var(--msc-j-accent) 0%, var(--msc-j-accent-soft) 95%);
  color: #fff;
  box-shadow: 0 6px 22px -6px rgba(61, 99, 214, .55);
  border-color: var(--msc-j-accent-soft);
}

.msc-theme-journal .msc-auth-tab[aria-selected="true"]::after,
.msc-theme-journal .msc-auth-tab.active::after {
  transform: scaleX(1);
}

.msc-theme-journal .msc-field label {
  color: var(--msc-j-muted);
}

.msc-theme-journal .msc-field input {
  background: linear-gradient(180deg, #ffffff, #f5f7fb);
  border: 1px solid var(--msc-j-line);
  box-shadow: 0 1px 0 #fff inset, 0 0 0 2px transparent, 0 0 0 0 rgba(61, 99, 214, .3);
  transition: box-shadow .25s, border-color .25s;
}

.msc-theme-journal .msc-field input:focus {
  border-color: var(--msc-j-accent);
  box-shadow: 0 0 0 3px rgba(61, 99, 214, .35);
}

.msc-theme-journal .msc-btn-primary {
  background: linear-gradient(90deg, var(--msc-j-accent) 0%, var(--msc-j-accent-soft) 100%);
  box-shadow: 0 4px 18px -4px rgba(61, 99, 214, .55), 0 1px 3px rgba(0, 0, 0, .15);
  font-weight: 600;
  letter-spacing: .4px;
}

.msc-theme-journal .msc-btn-primary:hover {
  filter: brightness(1.07);
}

.msc-theme-journal .msc-btn-secondary {
  background: color-mix(in oklab, #ffffff, var(--msc-j-accent) 8%);
  border: 1px solid var(--msc-j-line);
  color: var(--msc-j-accent);
  box-shadow: 0 2px 10px -3px rgba(61, 99, 214, .35);
}

.msc-theme-journal .msc-btn-secondary:hover {
  background: color-mix(in oklab, #ffffff, var(--msc-j-accent) 14%);
}

.msc-theme-journal .msc-btn-primary.msc-btn-pastel {
  background: linear-gradient(135deg, color-mix(in oklab, #ffffff, var(--msc-j-accent) 25%) 0%, color-mix(in oklab, #ffffff, var(--msc-j-accent-soft) 35%) 100%);
  color: var(--msc-j-ink);
  box-shadow: 0 3px 12px -4px rgba(61, 99, 214, .35), 0 1px 2px rgba(0, 0, 0, .12);
  border: 1px solid var(--msc-j-line);
}

.msc-theme-journal .msc-btn-primary.msc-btn-pastel:hover {
  filter: brightness(1.08);
  box-shadow: 0 6px 20px -6px rgba(61, 99, 214, .4);
}

.msc-theme-journal .msc-btn-primary.msc-btn-pastel:focus-visible {
  outline: 2px solid var(--msc-j-accent);
  outline-offset: 3px;
}

.msc-theme-journal .msc-btn-secondary.msc-btn-soft {
  background: color-mix(in oklab, #ffffff, var(--msc-j-accent) 4%);
  color: var(--msc-j-accent);
  box-shadow: 0 2px 8px -3px rgba(61, 99, 214, .3);
}

.msc-theme-journal .msc-btn-secondary.msc-btn-soft:hover {
  background: color-mix(in oklab, #ffffff, var(--msc-j-accent) 10%);
}

.msc-theme-journal .msc-btn-secondary.msc-btn-soft:focus-visible {
  outline: 2px solid var(--msc-j-accent);
  outline-offset: 3px;
}

.msc-theme-journal .msc-feedback.msc-error {
  color: #dc2626;
}

.msc-theme-journal .msc-feedback.msc-ok {
  color: #0d7f4f;
}

.msc-theme-journal .msc-alt-links a {
  color: var(--msc-j-accent);
}

.msc-theme-journal .msc-login-shell {
  background: linear-gradient(135deg, #f1f4fa, #eef2f9);
}

.msc-theme-journal .msc-login-box {
  background: var(--msc-j-paper);
  border: 1px solid var(--msc-j-line);
  box-shadow: 0 6px 26px -6px rgba(61, 99, 214, .35), 0 4px 10px -4px rgba(0, 0, 0, .12);
}

.msc-theme-journal .msc-login-brand {
  background: linear-gradient(90deg, var(--msc-j-accent), var(--msc-j-accent-soft));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 4px 20px rgba(61, 99, 214, .35);
}

.msc-theme-journal .msc-auth-panel .msc-panel-intro {
  color: color-mix(in oklab, var(--msc-j-muted) 80%, #444);
}

.msc-theme-journal .msc-auth-tabs {
  background: rgba(255, 255, 255, .5);
  border: 1px solid var(--msc-j-line);
  box-shadow: 0 4px 14px -6px rgba(0, 0, 0, .12);
}

.msc-theme-journal .msc-auth-side:before {
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .4), transparent 60%), radial-gradient(circle at 75% 70%, rgba(255, 255, 255, .25), transparent 65%);
}

.msc-theme-journal .msc-card-u {
  background: var(--msc-j-paper);
  border-color: var(--msc-j-line);
}

.msc-theme-journal .msc-btn-outline {
  background: rgba(255, 255, 255, .5);
  border: 1px solid var(--msc-j-line);
  color: var(--msc-j-accent);
}

.msc-theme-journal .msc-btn-outline:hover {
  background: rgba(255, 255, 255, .7);
}

.msc-theme-journal .msc-form-field>label {
  color: var(--msc-j-muted);
}

.msc-theme-journal .msc-badge-neutral {
  background: color-mix(in oklab, var(--msc-j-accent) 40%, #ffffff);
}

/* REMOVED prefers-color-scheme dark media query for journal theme - keeps consistent styling */

/* Bazowe */
.msc-theme,
.msc-theme body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background: var(--msc-bg);
  color: var(--msc-text);
  margin: 0;
  padding: 0;
}

/* Responsive breakpoints */
:root {
  --bp-xs: 420px;
  --bp-sm: 600px;
  --bp-md: 900px;
  --bp-lg: 1200px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bot: env(safe-area-inset-bottom, 0px);
}

/* Nested theme guard: when a .msc-theme is inside a themed wrapper (e.g., .msc-theme-gold), inherit outer background to avoid mismatched panels */
.msc-theme-gold .msc-theme,
.msc-theme-emerald .msc-theme,
.msc-modern .msc-theme {
  background: transparent;
}

/* Kontener */
.msc-theme .msc-container {
  max-width: 900px;
  margin: 40px auto;
  background: var(--msc-surface);
  border-radius: 12px;
  box-shadow: var(--msc-shadow);
  border: 2px solid var(--msc-border);
  padding: 32px;
}

@media (max-width: 700px) {
  .msc-theme .msc-container {
    margin: 16px;
    padding: 16px;
  }
}

/* Nagłówek */
.msc-theme .msc-header {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--msc-text);
  letter-spacing: .5px;
  text-shadow: 0 2px 8px #0008;
}

/* Karty */
.msc-theme .msc-card {
  background: var(--msc-surface);
  border-radius: 8px;
  box-shadow: var(--msc-shadow-soft);
  border: 1px solid var(--msc-border);
  padding: 18px 24px;
  margin-bottom: 18px;
}

@media (max-width: 700px) {
  .msc-theme .msc-card {
    padding: 12px 14px;
  }
}

/* Przycisk */
.msc-theme .msc-btn {
  background: linear-gradient(90deg, var(--msc-accent) 0%, var(--msc-accent-dark) 100%);
  color: var(--msc-white);
  font-weight: 600;
  box-shadow: 0 2px 8px #0008;
  border: none;
  border-radius: 6px;
  padding: 10px 22px;
  font-size: 1rem;
  cursor: pointer;
  transition: transform .06s ease, filter .2s ease;
}

.msc-theme .msc-btn:hover {
  filter: brightness(1.05);
}

.msc-theme .msc-btn:active {
  transform: translateY(1px);
}

/* Consent line in auth forms */
.msc-consent .msc-consent-line {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: .85rem;
  color: var(--msc-text);
}

.msc-consent .msc-consent-line input[type="checkbox"] {
  margin-top: 3px;
}

.msc-consent a {
  color: var(--msc-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Attendance toolbar/date spacing and sticky header offset to prevent overlap */
#msc-attendance-root .msc-sched-toolbar {
  gap: 10px;
}

#msc-attendance-root .msc-att-date {
  min-width: 160px;
  text-align: center;
  font-weight: 600;
  letter-spacing: .3px;
}

#msc-attendance-root .msc-att-body .msc-table thead th {
  top: 48px;
}

@media (max-width: 560px) {
  #msc-attendance-root .msc-sched-toolbar {
    justify-content: center;
  }

  #msc-attendance-root .msc-att-date {
    min-width: auto;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .06);
  }
}

.msc-theme .msc-btn:disabled {
  opacity: .6;
  cursor: not-allowed;
}

.msc-theme .msc-btn:focus-visible {
  outline: 2px solid var(--msc-white);
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(0, 120, 212, .25);
}

/* Secondary / outline button */
.msc-theme .msc-btn-outline {
  background: transparent;
  color: var(--msc-accent-dark);
  border: 1px solid var(--msc-accent);
  font-weight: 600;
  border-radius: 6px;
  padding: 9px 20px;
  font-size: 1rem;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, box-shadow .15s ease;
  text-decoration: none;
  display: inline-block;
}

.msc-theme .msc-btn-outline:hover {
  background: color-mix(in oklab, var(--msc-accent) 15%, var(--msc-white));
}

.msc-theme .msc-btn-outline:active {
  transform: translateY(1px);
}

.msc-theme .msc-btn-outline:focus-visible {
  outline: 2px solid var(--msc-accent);
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(0, 120, 212, .25);
}

/* Tabela */
.msc-theme .msc-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}

/* Small screens: enable horizontal scroll wrapper if needed */
.msc-table-wrap {
  width: 100%;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 720px) {

  .msc-theme .msc-table th,
  .msc-theme .msc-table td {
    padding: 8px;
  }
}

@media (max-width: 560px) {
  .msc-theme .msc-table {
    display: block;
    width: 100%;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  .msc-theme .msc-table thead th,
  .msc-theme .msc-table td {
    white-space: nowrap;
  }
}

.msc-theme .msc-table th,
.msc-theme .msc-table td {
  padding: 6px 8px;
  border: 1px solid color-mix(in oklab, var(--msc-border) 20%, transparent);
  vertical-align: top;
  color: var(--msc-text);
}

.msc-theme .msc-table th {
  background: color-mix(in oklab, var(--msc-surface), var(--msc-accent) 6%);
  text-align: left;
  font-weight: 700;
}

/* Hover & striped rows for better readability */
.msc-theme .msc-table tbody tr:nth-child(even) {
  background: color-mix(in oklab, var(--msc-surface), var(--msc-accent) 3%);
}

.msc-theme .msc-table tbody tr:hover {
  background: color-mix(in oklab, var(--msc-surface), var(--msc-accent) 10%);
  cursor: pointer;
}

/* Status tags (sessions) */
.msc-theme .msc-tag {
  display: inline-block;
  padding: 2px 8px;
  font-size: .65rem;
  font-weight: 600;
  letter-spacing: .5px;
  border-radius: 20px;
  text-transform: uppercase;
  background: var(--msc-border);
  color: var(--msc-text-strong);
}

.msc-theme .msc-tag-scheduled {
  background: color-mix(in oklab, var(--msc-accent) 85%, var(--msc-white));
  color: var(--msc-white);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .15) inset;
}

.msc-theme .msc-tag-canceled {
  background: linear-gradient(135deg, #dc2626, #991b1b);
  color: #fff;
}

/* === Class Types (Groups) – chips and buttons ========================= */
.msc-card .msc-ct-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 14px;
  margin: 10px 0;
  border: 1px solid var(--msc-border);
  border-radius: 16px;
  background: rgba(10, 12, 14, .55);
  box-shadow: 0 10px 24px -18px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .04) inset;
}

.msc-card .msc-ct-main {
  display: flex;
  align-items: center;
  gap: 10px;
}

.msc-card .msc-ct-color {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  box-shadow: 0 2px 8px -2px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .08) inset;
}

.msc-card .msc-ct-main strong {
  font-size: .95rem;
  letter-spacing: .2px;
  color: #e6eef7;
}

.msc-card .msc-ct-coaches,
.msc-card .msc-ct-members {
  font-size: .8rem;
  color: #bfd0df;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.msc-card .msc-ct-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 4px;
}

/* chips showing person + remove */
.msc-card .msc-ct-coaches .msc-badge,
.msc-card .msc-ct-members .msc-badge {
  -webkit-appearance: none;
  appearance: none;
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .4px;
  color: #e8f2ff;
  background: linear-gradient(135deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .04));
  box-shadow: 0 6px 18px -10px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .08) inset;
}

.msc-card .msc-ct-coaches .msc-badge:hover,
.msc-card .msc-ct-members .msc-badge:hover {
  filter: brightness(1.06);
  box-shadow: 0 8px 20px -12px rgba(0, 0, 0, .85), 0 0 0 1px rgba(255, 255, 255, .12) inset;
}

.msc-card .msc-ct-coaches .msc-badge:active,
.msc-card .msc-ct-members .msc-badge:active {
  transform: translateY(1px);
}

.msc-card .msc-ct-coaches .msc-badge.msc-rem,
.msc-card .msc-ct-members .msc-badge.msc-rem {
  position: relative;
  padding-right: 28px;
}

.msc-card .msc-ct-coaches .msc-badge.msc-rem::after,
.msc-card .msc-ct-members .msc-badge.msc-rem::after {
  content: "";
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
  width: 10px;
  height: 2px;
  background: rgba(0, 0, 0, .8);
  border-radius: 2px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .12) inset;
}

.msc-card .msc-ct-coaches .msc-badge.msc-rem::before,
.msc-card .msc-ct-members .msc-badge.msc-rem::before {
  content: "";
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%) rotate(-45deg);
  width: 10px;
  height: 2px;
  background: rgba(0, 0, 0, .8);
  border-radius: 2px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .12) inset;
}

/* small buttons */
.msc-card .msc-btn-small {
  --_bg: linear-gradient(90deg, var(--msc-accent), var(--msc-accent-dark));
  --_text: #fff;
  -webkit-appearance: none;
  appearance: none;
  border: 0;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .4px;
  color: var(--_text);
  background: var(--_bg);
  box-shadow: 0 6px 18px -10px rgba(0, 0, 0, .75), 0 0 0 1px rgba(51, 35, 0, .55);
  transition: filter .2s, transform .18s;
}

.msc-card .msc-btn-small:hover {
  filter: brightness(1.07);
}

.msc-card .msc-btn-small:active {
  transform: translateY(1px);
}

.msc-card .msc-btn-small.msc-danger {
  --_bg: linear-gradient(135deg, #ef4444, #b91c1c);
}

.msc-card .msc-btn-small.msc-ghost {
  --_bg: transparent;
  --_text: var(--msc-accent);
  background: transparent;
  border: 1px solid color-mix(in oklab, var(--msc-accent) 70%, #332300);
  box-shadow: none;
}

/* inline add form tidy */
.msc-card .msc-inline-add-form input[type="text"],
.msc-card .msc-inline-add-form select {
  background: rgba(0, 0, 0, .35);
  color: #e8f2ff;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 10px;
  padding: 8px 10px;
  outline: none;
}

.msc-card .msc-inline-add-form input[type="text"]:focus,
.msc-card .msc-inline-add-form select:focus {
  border-color: color-mix(in oklab, var(--msc-accent) 60%, #fff 0%);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, .2);
}

.msc-card .msc-inline-add-form button[type="submit"] {
  margin-left: 4px;
}

.msc-card .msc-inline-add-form [data-close] {
  -webkit-appearance: none;
  appearance: none;
  border: 0;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, .08);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .12) inset;
  cursor: pointer;
}

.msc-card .msc-inline-add-form [data-close]:hover {
  filter: brightness(1.06);
}

.msc-card .msc-inline-add-form [data-close]:active {
  transform: translateY(1px);
}

/* === Messages (inbox/sent) =========================================== */
.msc-msg-shell {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.msc-msg-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.msc-msg-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.msc-msg-item {
  background: var(--msc-surface, #0f0f0f);
  border: 1px solid var(--msc-border, #222);
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 2px 10px -6px rgba(0, 0, 0, .7), 0 0 0 1px rgba(0, 0, 0, .4) inset;
}

.msc-msg-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.msc-msg-subject {
  color: #e6eef7;
  font-weight: 700;
}

.msc-msg-meta {
  color: #9fb0bd;
  font-size: .75rem;
}

.msc-msg-body {
  color: #d6e0ea;
  font-size: .9rem;
  white-space: pre-wrap;
}

.msc-msg-opts {
  margin-top: 8px;
  display: flex;
  gap: 8px;
}

.msc-msg-compose {
  background: var(--msc-surface, #0f0f0f);
  border: 1px solid var(--msc-border, #222);
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 2px 10px -6px rgba(0, 0, 0, .7), 0 0 0 1px rgba(0, 0, 0, .4) inset;
}

.msc-msg-form .msc-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 8px 0;
}

.msc-msg-form input[type="text"],
.msc-msg-form select,
.msc-msg-form textarea {
  flex: 1 1 auto;
  background: #0d0d0d;
  border: 1px solid #2a2a2a;
  color: #e9ecef;
  border-radius: 10px;
  padding: 8px 10px;
}

.msc-msg-form .msc-right {
  justify-content: flex-end;
}

/* Tabs-like appearance for messages actions */
.msc-msg-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.msc-msg-actions .msc-btn-sm {
  background: #0f0f0f;
  border: 1px solid #2a2a2a;
  color: #e0e6ed;
  border-radius: 10px;
}

.msc-msg-actions .msc-btn-sm.active {
  background: linear-gradient(180deg, rgba(218, 165, 32, .25), rgba(218, 165, 32, .15));
  border-color: #a9801e;
  color: #ffd36b;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .5) inset;
}

.msc-msg-actions .msc-btn-sm.msc-btn-highlight {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border-color: #f59e0b;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
  transition: all 0.2s ease;
}

.msc-msg-actions .msc-btn-sm.msc-btn-highlight:hover {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  box-shadow: 0 6px 16px rgba(245, 158, 11, 0.4);
  transform: translateY(-1px);
}

.msc-msg-actions .msc-btn-sm.msc-btn-highlight:active {
  transform: translateY(0);
}

/* Attendance presence badges */
.msc-theme .msc-presence-badge {
  display: inline-block;
  min-width: 70px;
  text-align: center;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: .7rem;
  font-weight: 600;
}

.msc-theme .msc-present {
  background: linear-gradient(90deg, #16a34a, #15803d);
  color: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .25);
}

.msc-theme .msc-absent {
  background: linear-gradient(90deg, #64748b, #334155);
  color: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .25);
}

#msc-ses-attendance table.msc-table tbody tr:hover {
  background: color-mix(in oklab, var(--msc-surface), var(--msc-accent) 6%);
  cursor: default;
}

#msc-ses-attendance .button {
  font-size: .65rem;
  padding: 4px 8px;
}

#msc-ses-attendance .button:focus-visible {
  outline: 2px solid var(--msc-white);
  outline-offset: 1px;
  box-shadow: 0 0 0 3px rgba(0, 120, 212, .45);
}

/* Small action buttons inside table */
.msc-theme .msc-table .button {
  background: var(--msc-accent);
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: .7rem;
  line-height: 1.1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
  letter-spacing: .3px;
}

.msc-theme .msc-table .button+.button {
  margin-left: 4px;
}

.msc-theme .msc-table .button:hover {
  filter: brightness(1.07);
}

.msc-theme .msc-table .button:active {
  transform: translateY(1px);
}

.msc-theme .msc-table .button:focus-visible {
  outline: 2px solid var(--msc-white);
  outline-offset: 1px;
  box-shadow: 0 0 0 3px rgba(0, 120, 212, .4);
}

/* Group action cell: flex wrap for small widths */
.msc-theme .msc-table td:last-child {
  min-width: 240px;
}

.msc-theme .msc-table td:last-child {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

/* Attendance area */
#msc-ses-attendance {
  border: 2px solid color-mix(in oklab, var(--msc-accent) 40%, var(--msc-border));
  box-shadow: 0 4px 24px -4px rgba(0, 0, 0, .18);
}

#msc-ses-attendance h3 {
  letter-spacing: .5px;
}

#msc-ses-attendance .msc-status {
  margin-top: 4px;
}

/* Utility spacing for meta */
#msc-ses-attendance-meta {
  background: color-mix(in oklab, var(--msc-accent) 15%, var(--msc-surface));
  padding: 4px 8px;
  border-radius: 6px;
}

/* Usunięto style kalendarza i dashboardu */

/* Status/alerty */
.msc-theme .msc-status {
  margin-top: 8px;
  font-size: .925rem;
  color: color-mix(in oklab, var(--msc-text) 70%, #aaa);
}

.msc-theme .msc-error {
  color: #ff7a7a;
}

/* Formularze i pola */
.msc-theme input[type="text"],
.msc-theme input[type="email"],
.msc-theme input[type="password"],
.msc-theme input[type="date"],
.msc-theme input[type="number"],
.msc-theme select,
.msc-theme textarea {
  width: 100%;
  background: linear-gradient(180deg, #ffffff, #f9fafb);
  color: var(--msc-text);
  border: 1px solid color-mix(in oklab, var(--msc-border) 45%, transparent);
  border-radius: 12px;
  padding: 12px 14px;
  outline: none;
  box-shadow: 0 1px 0 #fff inset, 0 1px 2px rgba(0, 0, 0, .06) inset, 0 0 0 0 rgba(0, 120, 212, .35);
  transition: box-shadow .25s ease, border-color .25s ease, background .3s ease;
}

.msc-theme input:focus,
.msc-theme select:focus,
.msc-theme textarea:focus {
  border-color: var(--msc-accent);
  box-shadow: 0 0 0 4px rgba(0, 120, 212, .22), 0 1px 0 #fff inset, 0 1px 2px rgba(0, 0, 0, .08) inset;
  background: linear-gradient(180deg, #ffffff, #f1f5f9);
}

.msc-theme label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 600;
  color: var(--msc-text-strong);
}

/* Auth panel */
.msc-theme .msc-auth-tabs {
  display: flex;
  gap: 6px;
  padding: 8px;
}

.msc-theme .msc-auth-tab {
  background: transparent;
  color: var(--msc-text);
  border: 1px solid var(--msc-border);
  border-radius: 8px;
  padding: 10px 18px;
  cursor: pointer;
  position: relative;
  font-weight: 600;
  letter-spacing: .3px;
  transition: background .35s ease, color .35s ease, box-shadow .35s ease;
  overflow: hidden;
}

.msc-theme .msc-auth-tab::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 6px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--msc-accent) 0%, var(--msc-accent-dark) 100%);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .4s cubic-bezier(.65, .05, .36, 1);
}

.msc-theme .msc-auth-tab:hover {
  background: color-mix(in oklab, var(--msc-surface), var(--msc-accent) 6%);
}

.msc-theme .msc-auth-tab:focus-visible {
  outline: 2px solid var(--msc-accent);
  outline-offset: 3px;
}

.msc-theme .msc-auth-tab.active,
.msc-theme .msc-auth-tab[aria-selected="true"] {
  background: color-mix(in oklab, var(--msc-surface), var(--msc-accent) 14%);
  color: var(--msc-black);
  box-shadow: 0 4px 14px -4px rgba(0, 0, 0, .18) inset;
}

.msc-theme .msc-auth-tab.active::after,
.msc-theme .msc-auth-tab[aria-selected="true"]::after {
  transform: scaleX(1);
}

.msc-theme .msc-auth-pane.hidden {
  display: none;
}

.msc-theme .msc-auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.msc-theme .msc-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.msc-theme .msc-row>* {
  flex: 1 1 220px;
}

.msc-theme .msc-link {
  color: var(--msc-accent);
  text-decoration: underline;
}

.msc-theme .msc-spacer {
  flex: 1 1 auto;
}

@media (max-width: 520px) {
  .msc-theme .msc-row {
    gap: 8px;
  }

  .msc-theme .msc-row>* {
    flex: 1 1 100%;
  }
}

/* Wysoki kontrast & redukcja animacji */
@media (forced-colors: active) {
  .msc-theme .msc-btn {
    border: 1px solid CanvasText;
  }

  .msc-theme .msc-calendar-day {
    border-color: CanvasText;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}

/* Dashboard layout - jasny wariant */
.msc-theme .msc-dashboard {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 70vh;
  background: var(--msc-bg);
}

.msc-theme .msc-d-sidebar {
  background: var(--msc-surface);
  border-right: 1px solid var(--msc-border);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.msc-theme .msc-d-brand {
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--msc-accent);
  letter-spacing: .5px;
}

.msc-theme .msc-d-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--msc-text);
  text-decoration: none;
}

.msc-theme .msc-d-nav a.active,
.msc-theme .msc-d-nav a:hover {
  background: color-mix(in oklab, var(--msc-surface), var(--msc-accent) 10%);
  color: var(--msc-text-strong);
}

.msc-theme .msc-d-main {
  padding: 24px;
  background: var(--msc-bg);
}

/* Gold theme: enforce pure black background under dashboard/content */
.msc-theme-wrapper.msc-theme-gold .msc-d-main,
.msc-theme-wrapper.msc-theme-gold #msc-d-content,
.msc-theme-wrapper.msc-theme-gold .msc-settings-wrap {
  background: #000 !important;
}

/* Sidebar remains dark, cards keep black surface for contrast */
.msc-theme-wrapper.msc-theme-gold .msc-d-side {
  background: #0a0a0a;
}

.msc-theme-wrapper.msc-theme-gold .msc-card {
  background: #0b0b0b;
  border-color: #1f1f1f;
  box-shadow: 0 10px 26px -16px rgba(0, 0, 0, .85), 0 0 0 1px #111;
}

@media (max-width: 1024px) {
  .msc-theme .msc-dashboard {
    grid-template-columns: 1fr;
  }

  .msc-theme .msc-d-sidebar {
    position: sticky;
    top: 0;
    z-index: 5;
    backdrop-filter: saturate(120%) blur(6px);
    background: color-mix(in oklab, var(--msc-surface), #000 8%);
  }

  .msc-theme .msc-d-main {
    padding: 16px;
  }
}

.msc-theme .msc-d-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.msc-theme .msc-d-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.msc-theme .msc-user-name {
  font-weight: 600;
  color: var(--msc-text-strong);
  padding: 4px 10px;
  border-radius: 20px;
  background: color-mix(in oklab, var(--msc-surface), var(--msc-accent) 6%);
}

.msc-theme .msc-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--msc-accent) 0%, var(--msc-accent-dark) 95%);
  color: var(--msc-white);
  text-decoration: none;
  font-size: 1.05rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .3);
}

.msc-theme .msc-icon-btn:hover {
  filter: brightness(1.08);
}

.msc-theme .msc-icon-btn:active {
  transform: translateY(1px);
}

.msc-theme .msc-icon-btn:focus-visible {
  outline: 2px solid var(--msc-white);
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(49, 130, 206, .4);
}

.msc-theme .msc-d-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

@media (max-width: 420px) {
  .msc-theme .msc-d-tiles {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
}

.msc-theme .msc-d-tile {
  display: block;
  background: var(--msc-surface);
  border: 1px solid var(--msc-border);
  border-radius: 10px;
  padding: 16px;
  box-shadow: var(--msc-shadow-soft);
  color: var(--msc-text);
  text-decoration: none;
}

.msc-theme .msc-d-tile:hover {
  transform: translateY(-1px);
  box-shadow: var(--msc-shadow);
}

.msc-theme .msc-d-ico {
  font-size: 2rem;
  margin-bottom: 10px;
}

.msc-theme .msc-d-title {
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--msc-text-strong);
}

.msc-theme .msc-d-desc {
  font-size: .95rem;
  color: var(--msc-text-muted);
}

/* Schedule (plan zajęć) */
.msc-theme .msc-sched-toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.msc-theme .msc-sched-toolbar .msc-spacer {
  flex: 1 1 100%;
  height: 0;
}

@media (min-width: 560px) {
  .msc-theme .msc-sched-toolbar .msc-spacer {
    flex: 1 1 auto;
  }
}

.msc-theme .msc-sched-wrapper {
  background: var(--msc-surface);
  border: 1px solid var(--msc-border);
  border-radius: 10px;
  padding: 12px;
  box-shadow: var(--msc-shadow-soft);
}

.msc-theme .msc-sched-grid {
  display: flex;
  flex-direction: column;
  font-size: .85rem;
  overflow-x: auto;
}

.msc-theme .msc-sched-row {
  display: grid;
  grid-template-columns: 70px repeat(7, 1fr);
  min-height: 38px;
}

/* Single-day mode will set a modifier class to reduce columns */
.msc-theme .msc-sched-row.msc-single-day {
  grid-template-columns: 70px 1fr;
}

.msc-theme .msc-sched-head {
  position: sticky;
  top: 0;
  background: var(--msc-surface);
  z-index: 2;
  color: #d5dde6;
}

.msc-theme .msc-sched-cell {
  border: 1px solid color-mix(in oklab, var(--msc-border) 55%, transparent);
  padding: 4px 6px;
  box-sizing: border-box;
}

.msc-theme .msc-sched-dayhead {
  text-align: center;
  font-weight: 600;
  background: color-mix(in oklab, var(--msc-surface), var(--msc-accent) 6%);
  color: #e2e8f0;
}

.msc-theme .msc-sched-dayhead.msc-today {
  background: linear-gradient(90deg, var(--msc-accent) 0%, var(--msc-accent-dark) 100%);
  color: var(--msc-white);
}

.msc-theme .msc-sched-timehead {
  background: var(--msc-surface);
}

.msc-theme .msc-sched-hour {
  background: color-mix(in oklab, var(--msc-surface), var(--msc-accent) 3%);
  font-weight: 600;
  color: #9fb0bd;
}

.msc-theme .msc-sched-slot {
  position: relative;
  overflow: visible;
  min-height: 60px;
  height: 60px;
}

.msc-theme .msc-sched-event {
  background: linear-gradient(135deg, var(--msc-accent) 0%, var(--msc-accent-dark) 90%);
  color: var(--msc-white);
  border-radius: 6px;
  padding: 4px 6px;
  font-size: .7rem;
  line-height: 1.15;
  box-shadow: 0 2px 4px rgba(0, 0, 0, .25);
  display: block;
  position: relative;
  z-index: 2;
  animation: msc-event-fade-in 0.3s ease;
}

/* Multi-hour events - absolute positioning to span cells */
.msc-theme .msc-sched-event-multi {
  position: absolute;
  left: 2px;
  right: 2px;
  z-index: 5;
  overflow: hidden;
}

/* Fade in animation for events */
@keyframes msc-event-fade-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Loading skeleton for grid */
.msc-sched-grid.is-loading .msc-sched-slot {
  position: relative;
  overflow: hidden;
}

.msc-sched-grid.is-loading .msc-sched-slot::after {
  content: '';
  position: absolute;
  inset: 4px;
  background: linear-gradient(90deg, transparent 0%, rgba(212, 175, 55, 0.08) 50%, transparent 100%);
  animation: msc-shimmer 1.5s infinite;
  border-radius: 4px;
}

@keyframes msc-shimmer {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

.msc-theme .msc-sched-event[data-has-color="1"] {
  box-shadow: 0 2px 4px rgba(0, 0, 0, .25);
}

.msc-theme .msc-sched-event strong {
  display: block;
  font-size: .72rem;
  margin-bottom: 2px;
}

@media (max-width: 560px) {
  .msc-theme .msc-sched-grid {
    font-size: .8rem;
  }

  .msc-theme .msc-sched-row {
    grid-template-columns: 60px repeat(7, minmax(120px, 1fr));
  }

  .msc-theme .msc-sched-dayhead {
    position: sticky;
    left: 0;
  }
}

/* =============================================
   NEW SESSION MODAL - Premium Solid Design
   ============================================= */
.msc-sched-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9990;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(6px);
  animation: msc-fade-in 0.25s ease;
}

@keyframes msc-fade-in {
  from {
    opacity: 0
  }

  to {
    opacity: 1
  }
}

@keyframes msc-slide-up {
  from {
    opacity: 0;
    transform: translateY(30px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}

.msc-sched-new-form {
  position: fixed;
  z-index: 9999;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(460px, calc(100vw - 32px));
  /* Solidne, nieprzezroczyste tło z gradientem */
  background: #1a1d24;
  background: linear-gradient(145deg, #1e2229 0%, #181b21 100%);
  border: 2px solid rgba(212, 175, 55, 0.25);
  border-radius: 18px;
  padding: 32px 28px 28px;
  box-shadow:
    0 30px 60px -15px rgba(0, 0, 0, 0.9),
    0 0 0 1px rgba(212, 175, 55, 0.1),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.03);
  animation: msc-slide-up 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Złota linia akcentowa */
.msc-sched-new-form::before {
  content: '';
  position: absolute;
  top: 0;
  left: 15%;
  right: 15%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.8), transparent);
  border-radius: 2px;
}

/* Subtelny border gradient */
.msc-sched-new-form::after {
  content: '';
  position: absolute;
  inset: -2px;
  z-index: -1;
  background: linear-gradient(145deg, rgba(212, 175, 55, 0.3), transparent 60%);
  border-radius: 18px;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  padding: 2px;
  pointer-events: none;
}

.msc-sched-new-form h3 {
  margin: 0 0 24px;
  font-size: 1.25rem;
  font-weight: 700;
  color: #e8e9ed;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.msc-sched-new-form h3::before {
  content: '📅';
  font-size: 1.5rem;
  filter: drop-shadow(0 2px 4px rgba(212, 175, 55, 0.3));
}

.msc-sched-new-form .msc-snf-field {
  margin-bottom: 18px;
}

.msc-sched-new-form .msc-snf-label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(212, 175, 55, 0.9);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

/* SELECT I INPUT - CIEMNY MOTYW */
.msc-sched-new-form select,
.msc-sched-new-form input[type="time"],
.msc-sched-new-form input[type="text"] {
  width: 100%;
  box-sizing: border-box;
  padding: 14px 16px;
  font-size: 1rem;
  background: #0f1116;
  background: linear-gradient(165deg, #12151a 0%, #0d0f13 100%);
  border: 1.5px solid rgba(212, 175, 55, 0.2);
  border-radius: 12px;
  color: #e8e9ed;
  font-family: inherit;
  transition: all 0.25s ease;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.msc-sched-new-form select:hover,
.msc-sched-new-form input[type="time"]:hover,
.msc-sched-new-form input[type="text"]:hover {
  border-color: rgba(212, 175, 55, 0.4);
  background: linear-gradient(165deg, #15181f 0%, #0f1116 100%);
}

.msc-sched-new-form select:focus,
.msc-sched-new-form input[type="time"]:focus,
.msc-sched-new-form input[type="text"]:focus {
  outline: none;
  border-color: rgba(212, 175, 55, 0.7);
  background: #0f1116;
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.3),
    0 0 0 3px rgba(212, 175, 55, 0.15);
}

/* SELECT DROPDOWN - CIEMNY MOTYW */
.msc-sched-new-form select option {
  background: #1a1d24;
  color: #e8e9ed;
  padding: 12px;
}

.msc-sched-new-form .msc-snf-time-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.msc-sched-new-form .msc-snf-actions {
  display: flex;
  gap: 12px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.msc-sched-new-form .msc-btn-primary {
  flex: 1;
  padding: 16px 24px;
  font-size: 1rem !important;
  font-weight: 700 !important;
  background: linear-gradient(135deg, #d4af37 0%, #b8941f 100%) !important;
  color: #1a1a1a !important;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow:
    0 6px 20px -6px rgba(212, 175, 55, 0.5),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.2);
  text-shadow: none !important;
  letter-spacing: 0.3px;
  -webkit-text-fill-color: #1a1a1a !important;
}

.msc-sched-new-form .msc-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow:
    0 8px 25px -6px rgba(212, 175, 55, 0.6),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.3);
  background: linear-gradient(135deg, #e0bd45 0%, #c4a023 100%);
}

.msc-sched-new-form .msc-btn-primary:active {
  transform: translateY(0);
}

.msc-sched-new-form .msc-btn-outline {
  flex: 0 0 auto;
  padding: 16px 24px;
  font-size: 0.95rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.03);
  border: 1.5px solid rgba(212, 175, 55, 0.25);
  color: #a8aab0;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.msc-sched-new-form .msc-btn-outline:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(212, 175, 55, 0.4);
  color: #d0d2d8;
}

.msc-sched-new-form .msc-snf-status {
  text-align: center;
  margin-top: 14px;
  font-size: 0.88rem;
  min-height: 1.3em;
  color: rgba(212, 175, 55, 0.9);
  font-weight: 500;
}

/* Delete button in event */
.msc-theme .msc-sched-event {
  position: relative;
}

.msc-theme .msc-sched-event .msc-sched-del {
  position: absolute;
  top: 2px;
  right: 2px;
  background: rgba(0, 0, 0, .35);
  color: #fff;
  border: none;
  width: 18px;
  height: 18px;
  line-height: 16px;
  padding: 0;
  cursor: pointer;
  border-radius: 4px;
  font-size: .8rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.msc-theme .msc-sched-event .msc-sched-del:hover {
  background: rgba(0, 0, 0, .55);
}

.msc-theme .msc-sched-event .msc-sched-del:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 1px;
}

.msc-theme .msc-sched-range {
  font-weight: 600;
}

.msc-theme .msc-sched-toolbar .msc-sched-range {
  color: color-mix(in oklab, var(--msc-text) 85%, #b7c0c8);
  letter-spacing: .2px;
}

/* Polished nav arrows for schedule */
.msc-theme .msc-sched-toolbar .msc-nav-btn {
  --_size: 34px;
  --_ring: color-mix(in oklab, var(--msc-accent) 65%, #2a2a2a);
  width: var(--_size);
  height: var(--_size);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid color-mix(in oklab, var(--msc-accent) 55%, var(--msc-border));
  background: linear-gradient(145deg, color-mix(in oklab, var(--msc-surface), var(--msc-accent) 10%), var(--msc-surface));
  color: color-mix(in oklab, var(--msc-accent-dark) 85%, #e5e7eb);
  box-shadow: 0 4px 14px -8px rgba(0, 0, 0, .65), 0 0 0 1px rgba(0, 0, 0, .25);
  cursor: pointer;
  line-height: 1;
  padding: 0;
  transition: transform .15s ease, filter .25s, background .25s, border-color .25s, color .25s, box-shadow .25s;
}

@media (max-width: 420px) {
  .msc-theme .msc-sched-toolbar .msc-nav-btn {
    --_size: 30px;
  }
}

.msc-theme .msc-sched-toolbar .msc-nav-btn:hover {
  filter: brightness(1.05);
  border-color: color-mix(in oklab, var(--msc-accent) 72%, var(--msc-border));
  background: linear-gradient(145deg, color-mix(in oklab, var(--msc-surface), var(--msc-accent) 16%), var(--msc-surface));
}

.msc-theme .msc-sched-toolbar .msc-nav-btn:active {
  transform: translateY(1px) scale(.98);
}

.msc-theme .msc-sched-toolbar .msc-nav-btn:focus-visible {
  outline: 2px solid var(--_ring);
  outline-offset: 2px;
}

.msc-theme .msc-sched-toolbar .msc-nav-ico {
  display: inline-block;
  width: 16px;
  height: 16px;
}

/* Ghost Today button (optional, hidden by default if not in DOM) */
.msc-theme .msc-sched-toolbar .msc-btn-ghost {
  background: transparent;
  border: 1px solid color-mix(in oklab, var(--msc-accent) 35%, var(--msc-border));
  color: color-mix(in oklab, var(--msc-accent) 85%, #e5e7eb);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: .78rem;
  letter-spacing: .2px;
}

@media (max-width: 420px) {
  .msc-theme .msc-sched-toolbar .msc-btn-ghost {
    padding: 5px 10px;
    font-size: .74rem;
  }
}

.msc-theme .msc-sched-toolbar .msc-btn-ghost:hover {
  background: color-mix(in oklab, var(--msc-accent) 12%, transparent);
}

.msc-theme .msc-sched-toolbar .msc-btn-ghost:focus-visible {
  outline: 2px solid color-mix(in oklab, var(--msc-accent) 65%, #2a2a2a);
  outline-offset: 2px;
}

/* Gold theme stronger accents */
.msc-theme-gold .msc-sched-toolbar .msc-nav-btn {
  border-color: #3a2a12;
  color: #fcd34d;
  background: linear-gradient(145deg, rgba(245, 158, 11, .12), #0f0f0f);
  box-shadow: 0 6px 18px -10px rgba(0, 0, 0, .8), 0 0 0 1px #20190a;
}

.msc-theme-gold .msc-sched-toolbar .msc-nav-btn:hover {
  background: linear-gradient(145deg, rgba(245, 158, 11, .18), #101010);
  border-color: #4a3616;
}

.msc-theme-gold .msc-sched-toolbar .msc-nav-btn:focus-visible {
  outline: 2px solid #f59e0b;
}

.msc-theme-gold .msc-sched-toolbar .msc-btn-ghost {
  border-color: #3a2a12;
  color: #fcd34d;
}

.msc-theme-gold .msc-sched-toolbar .msc-btn-ghost:hover {
  background: rgba(245, 158, 11, .08);
}

.msc-theme .msc-mode-btn.msc-active {
  background: linear-gradient(90deg, var(--msc-accent) 0%, var(--msc-accent-dark) 100%);
  color: var(--msc-white);
  border-color: var(--msc-accent-dark);
}

.msc-theme .msc-mode-btn.msc-active:hover {
  filter: brightness(1.05);
}

.msc-theme .msc-sched-grid::-webkit-scrollbar {
  height: 10px;
}

.msc-theme .msc-sched-grid::-webkit-scrollbar-track {
  background: var(--msc-bg);
}

.msc-theme .msc-sched-grid::-webkit-scrollbar-thumb {
  background: var(--msc-border);
  border-radius: 20px;
}

@media (max-width:900px) {
  .msc-theme .msc-dashboard {
    grid-template-columns: 1fr;
  }

  .msc-theme .msc-d-sidebar {
    flex-direction: row;
    overflow: auto;
    gap: 8px;
  }
}

/* === Modal (custom confirm) === */
.msc-theme .msc-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, .55);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 30px;
}

.msc-theme .msc-modal {
  background: var(--msc-surface);
  border: 2px solid var(--msc-border);
  border-radius: 16px;
  box-shadow: 0 6px 32px -4px rgba(0, 0, 0, .4);
  max-width: 380px;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.msc-theme .msc-modal-head {
  padding: 18px 22px 4px;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: .5px;
}

.msc-theme .msc-modal-body {
  padding: 4px 22px 18px;
  font-size: .95rem;
  line-height: 1.35;
  color: color-mix(in oklab, var(--msc-text) 85%, #666);
}

.msc-theme .msc-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 14px 18px 18px;
}

.msc-theme .msc-modal-btn {
  flex: 0 0 auto;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: .9rem;
  cursor: pointer;
  border: 1px solid transparent;
  background: linear-gradient(90deg, var(--msc-accent) 0%, var(--msc-accent-dark));
  color: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .25);
}

.msc-theme .msc-modal-btn:hover {
  filter: brightness(1.07);
}

.msc-theme .msc-modal-btn:focus-visible {
  outline: 2px solid var(--msc-white);
  outline-offset: 2px;
}

.msc-theme .msc-modal-btn-secondary {
  background: color-mix(in oklab, var(--msc-surface), var(--msc-accent) 8%);
  color: var(--msc-text);
  border: 1px solid var(--msc-border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
}

.msc-theme .msc-modal-btn-secondary:hover {
  background: color-mix(in oklab, var(--msc-surface), var(--msc-accent) 14%);
}

.msc-theme .msc-modal-btn-danger {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
}

.msc-theme .msc-modal-btn-danger:hover {
  filter: brightness(1.07);
}

.msc-theme .msc-modal-enter {
  animation: mscModalFade .25s ease;
}

@keyframes mscModalFade {
  from {
    opacity: 0;
    transform: translateY(8px) scale(.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* === Small anchored confirm popover === */
.msc-theme .msc-pop-confirm {
  position: absolute;
  top: 0;
  right: 0;
  transform: translate(6px, -6px);
  background: var(--msc-surface);
  border: 1px solid var(--msc-border);
  border-radius: 10px;
  padding: 10px 12px 12px;
  width: 180px;
  box-shadow: 0 6px 20px -4px rgba(0, 0, 0, .35);
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: .72rem;
}

.msc-theme .msc-pop-confirm h4 {
  margin: 0;
  font-size: .7rem;
  letter-spacing: .5px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--msc-text-strong);
}

.msc-theme .msc-pop-confirm p {
  margin: 0;
  line-height: 1.3;
  font-size: .72rem;
  color: color-mix(in oklab, var(--msc-text) 80%, #666);
}

.msc-theme .msc-pop-confirm .msc-pop-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.msc-theme .msc-pop-btn {
  border: none;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: .65rem;
  font-weight: 600;
  cursor: pointer;
  background: color-mix(in oklab, var(--msc-accent) 20%, var(--msc-surface));
  color: var(--msc-text-strong);
}

.msc-theme .msc-pop-btn:hover {
  background: color-mix(in oklab, var(--msc-accent) 30%, var(--msc-surface));
}

.msc-theme .msc-pop-btn-danger {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  color: #fff;
}

.msc-theme .msc-pop-btn-danger:hover {
  filter: brightness(1.07);
}

.msc-theme .msc-pop-confirm:focus-within {
  outline: 2px solid var(--msc-accent);
  outline-offset: 2px;
}

/* My sessions list */
.msc-theme .msc-myatt-ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.msc-theme .msc-myatt-item {
  background: var(--msc-surface);
  border: 1px solid var(--msc-border);
  border-left: 6px solid var(--msc-accent);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: .8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.msc-theme .msc-myatt-item .msc-myatt-time {
  font-weight: 600;
  color: var(--msc-text-strong);
}

.msc-theme .msc-myatt-item .msc-myatt-title {
  font-weight: 500;
}

.msc-theme .msc-myatt-item .msc-myatt-coach {
  font-size: .7rem;
  color: color-mix(in oklab, var(--msc-text) 65%, #777);
}

/* Badge statuses (my sessions) */
.msc-badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: .6rem;
  font-weight: 600;
  letter-spacing: .5px;
  line-height: 1;
  background: var(--msc-border);
  color: #333;
  vertical-align: middle;
}

.msc-badge-present {
  background: #16a34a;
  color: #fff;
}

.msc-badge-absent {
  background: #dc2626;
  color: #fff;
}

.msc-badge-excused {
  background: #d97706;
  color: #fff;
}

.msc-badge-none {
  background: #e5e7eb;
  color: #555;
}

/* Attendance status row coloring - DARK THEME */
.msc-att-row.msc-att-present {
  background: rgba(34, 197, 94, 0.15) !important;
  color: #e9ecef !important;
}

.msc-att-row.msc-att-absent {
  background: rgba(239, 68, 68, 0.15) !important;
  color: #e9ecef !important;
}

.msc-att-row.msc-att-excused {
  background: rgba(245, 158, 11, 0.15) !important;
  color: #e9ecef !important;
}

.msc-att-row.msc-att-present td,
.msc-att-row.msc-att-absent td,
.msc-att-row.msc-att-excused td {
  color: #e9ecef !important;
}

.msc-att-counts {
  display: inline-flex;
  gap: 4px;
}

.msc-att-chip {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: rgba(0, 0, 0, 0.06);
  padding: 2px 4px;
  border-radius: 4px;
}

.msc-att-chip-present {
  background: rgba(34, 197, 94, 0.3);
  color: #4ade80;
}

.msc-att-chip-absent {
  background: rgba(239, 68, 68, 0.3);
  color: #f87171;
}

.msc-att-chip-excused {
  background: rgba(245, 158, 11, 0.3);
  color: #fbbf24;
}

.msc-att-chip-none {
  background: rgba(255, 255, 255, 0.1);
  color: #9ca3af;
}

.msc-att-legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: .72rem;
  margin-top: 6px;
}

.msc-att-legend span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.msc-att-legend i {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .08) inset;
}

.msc-att-legend i.present {
  background: rgba(34, 197, 94, 0.4);
  border: 1px solid #22c55e;
}

.msc-att-legend i.absent {
  background: rgba(239, 68, 68, 0.4);
  border: 1px solid #ef4444;
}

.msc-att-legend i.excused {
  background: rgba(245, 158, 11, 0.4);
  border: 1px solid #f59e0b;
}

/* Attendance polish */
.msc-att-session {
  overflow: hidden;
}

.msc-att-head {
  position: sticky;
  top: 0;
  background: var(--msc-card-bg, rgba(0, 0, 0, .06));
  backdrop-filter: saturate(120%) blur(4px);
  padding: 10px 12px;
  border-bottom: 1px solid rgba(0, 0, 0, .08);
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.msc-att-title {
  font-weight: 700;
}

.msc-att-time {
  display: inline-block;
  font-size: .8rem;
  padding: 2px 6px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 999px;
}

.msc-att-body .msc-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.msc-att-body .msc-table thead th {
  position: sticky;
  top: 40px;
  background: var(--msc-card-bg, rgba(0, 0, 0, .06));
  z-index: 1;
}

.msc-att-row {
  transition: background .15s ease, box-shadow .15s ease;
  border-left: 4px solid transparent;
}

.msc-att-row:hover {
  box-shadow: inset 0 0 0 9999px rgba(255, 255, 255, .02);
}

.msc-att-row.msc-att-present {
  border-left-color: #22c55e;
}

.msc-att-row.msc-att-absent {
  border-left-color: #ef4444;
}

.msc-att-row.msc-att-excused {
  border-left-color: #f59e0b;
}

.msc-att-select {
  min-width: 160px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(255, 255, 255, .06);
  color: inherit;
}

.msc-att-select.is-present {
  border-color: #22c55e;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, .25);
}

.msc-att-select.is-absent {
  border-color: #ef4444;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, .25);
}

.msc-att-select.is-excused {
  border-color: #f59e0b;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, .25);
}

.msc-att-select.is-none {
  opacity: .9;
}

/* === Settings toast (success/error) ===================================== */
.msc-toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  background: linear-gradient(135deg, var(--msc-surface), var(--msc-surface-alt));
  border: 1px solid var(--msc-border);
  color: var(--msc-text-strong);
  padding: 10px 14px;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .15);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .2s ease, transform .2s ease;
  z-index: 99999;
}

.msc-toast.on {
  opacity: 1;
  transform: translateY(0);
}

.msc-toast.msc-toast-ok {
  border-color: color-mix(in oklab, var(--msc-accent) 50%, var(--msc-border));
}

.msc-toast.msc-toast-err {
  border-color: #dc2626;
  color: #7f1d1d;
  background: linear-gradient(135deg, #fff5f5, #ffecec);
}

/* Busy state for Save button */
.msc-settings-btn.is-busy {
  position: relative;
  pointer-events: none;
  opacity: .8;
}

.msc-settings-btn.is-busy::after {
  content: "";
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, .6);
  border-top-color: #fff;
  border-radius: 50%;
  animation: mscSpin .8s linear infinite;
}

.msc-settings-btn[disabled] {
  opacity: .6;
  cursor: not-allowed;
}

/* === Dashboard polish for dark gold theme =============================== */
.msc-theme-gold .msc-d-top h1 {
  color: #fcd34d;
  text-shadow: 0 0 12px rgba(245, 158, 11, .15), 0 1px 2px rgba(0, 0, 0, .4);
}

.msc-theme-gold .msc-user-name {
  background: #141414;
  border: 1px solid #2c2618;
  color: #fcd34d;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .35);
}

.msc-theme-gold .msc-d-nav a:focus-visible {
  outline: 2px solid var(--msc-accent);
  outline-offset: 2px;
}

.msc-theme-gold .msc-d-nav a.active {
  box-shadow: 0 6px 24px -10px rgba(0, 0, 0, .85), 0 0 0 1px rgba(245, 158, 11, .25);
}

.msc-theme-gold .msc-d-tile:hover {
  box-shadow: 0 14px 42px -14px rgba(0, 0, 0, .85), 0 0 0 1px rgba(245, 158, 11, .28), 0 0 32px -10px rgba(245, 158, 11, .35);
}

/* === Settings dark theme (gold) ======================================== */
.msc-theme-gold .msc-settings-shell {
  color: var(--msc-text);
}

.msc-theme-gold .msc-settings-title {
  color: #fcd34d;
  text-shadow: 0 0 10px rgba(245, 158, 11, .18);
}

.msc-theme-gold .msc-settings-subtitle {
  color: #b89b5d;
}

.msc-theme-gold .msc-settings-panel {
  background: #0f0f0f;
  border: 1px solid #222;
  box-shadow: 0 10px 36px -12px rgba(0, 0, 0, .7), 0 0 0 1px #111;
}

.msc-theme-gold .msc-settings-label {
  color: #e9ecef;
}

.msc-theme-gold .msc-settings-help {
  color: #9aa2ad;
}

.msc-theme-gold .msc-settings-input,
.msc-theme-gold .msc-settings-select,
.msc-theme-gold .msc-settings-time {
  background: #0d0d0d;
  border: 1px solid #2a2a2a;
  color: #e9ecef;
  border-radius: 10px;
  box-shadow: none;
}

.msc-theme-gold .msc-settings-input:focus,
.msc-theme-gold .msc-settings-select:focus,
.msc-theme-gold .msc-settings-time:focus {
  outline: none;
  border-color: #f59e0b;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, .35);
  background: #111;
}

.msc-theme-gold .msc-settings-switch {
  background: linear-gradient(90deg, var(--msc-accent) 0%, var(--msc-accent-alt, var(--msc-accent)) var(--msc-switch-fill, 0%), #161616 var(--msc-switch-fill, 0%), #161616 100%);
  border: 1px solid #2a2a2a;
}

.msc-theme-gold .msc-settings-switch::after {
  background: #e5e7eb;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .5);
}

.msc-theme-gold .msc-settings-checkbox:checked+.msc-settings-switch {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
  border-color: #614000;
}

/* unified knob position is handled via --msc-switch-x variable */

.msc-theme-gold .msc-settings-btn-primary {
  background: linear-gradient(130deg, #fde68a 0%, #facc15 42%, #f59e0b 78%, #d97706 100%) !important;
  background-color: #facc15 !important;
  color: #111 !important;
  border: none;
  box-shadow: 0 20px 44px -20px rgba(250, 204, 21, .9), 0 0 0 1px rgba(63, 44, 16, .65) !important;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .55);
}

.msc-theme-gold .msc-settings-btn-primary:hover {
  filter: brightness(1.06);
  box-shadow: 0 26px 54px -24px rgba(250, 204, 21, .95), 0 0 0 1px rgba(251, 213, 109, .7) !important;
}

.msc-theme-gold .msc-settings-actions {
  border-top: 1px solid #1b1b1b;
}

/* Toast on dark */
.msc-theme-gold .msc-settings-shell .msc-toast {
  background: #0f0f0f;
  border: 1px solid #2a2a2a;
  color: #e9ecef;
}

.msc-theme-gold .msc-settings-shell .msc-toast.msc-toast-ok {
  border-color: #614000;
}

/* === Universal Auth/Login Redesign ===================================== */
.msc-auth-shell {
  display: flex;
  min-height: 80vh;
  width: 100%;
  max-width: none;
  margin: 0;
  background: var(--msc-bg);
}

.msc-auth-side {
  flex: 0 0 42%;
  background: linear-gradient(135deg, var(--msc-accent) 0%, var(--msc-accent-dark) 90%);
  color: #fff;
  display: flex;
  align-items: stretch;
  position: relative;
  overflow: hidden;
}

.msc-auth-side:before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, .25), transparent 60%), radial-gradient(circle at 70% 70%, rgba(255, 255, 255, .18), transparent 65%);
  mix-blend-mode: soft-light;
}

.msc-auth-side-inner {
  position: relative;
  z-index: 2;
  padding: 48px clamp(32px, 4vw, 64px);
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.msc-auth-brand {
  margin: 0;
  font-size: 2.4rem;
  letter-spacing: .5px;
  font-weight: 800;
  text-shadow: 0 4px 18px rgba(0, 0, 0, .35);
}

.msc-auth-tagline {
  margin: 0;
  font-size: 1rem;
  line-height: 1.45;
  max-width: 420px;
  font-weight: 500;
}

.msc-auth-benefits {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: .9rem;
}

.msc-auth-benefits li {
  position: relative;
  padding-left: 24px;
}

.msc-auth-benefits li:before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: #fff;
  font-weight: 600;
}

.msc-auth-footnote {
  font-size: .7rem;
  margin-top: auto;
  opacity: .7;
}

.msc-auth-main {
  flex: 1;
  display: flex;
  padding: 40px clamp(24px, 4vw, 64px);
  align-items: flex-start;
  justify-content: center;
}

.msc-auth-panels {
  width: 100%;
  max-width: 560px;
}

.msc-auth-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  background: var(--msc-surface);
  padding: 6px;
  border-radius: 14px;
  box-shadow: var(--msc-shadow-soft);
  border: 1px solid var(--msc-border);
}

.msc-auth-tab {
  flex: 1;
  background: transparent;
  border: none;
  padding: 14px 8px;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  font-size: .95rem;
  color: var(--msc-text);
  transition: background .25s, color .25s, box-shadow .25s;
}

.msc-auth-tab:hover {
  background: color-mix(in oklab, var(--msc-surface), var(--msc-accent) 6%);
}

.msc-auth-tab[aria-selected="true"] {
  background: linear-gradient(135deg, var(--msc-accent) 0%, var(--msc-accent-dark));
  color: #fff;
  box-shadow: 0 4px 12px -2px rgba(0, 0, 0, .35);
}

.msc-auth-panel {
  background: var(--msc-surface);
  border: 1px solid var(--msc-border);
  border-radius: 16px;
  padding: 34px clamp(24px, 3vw, 40px);
  box-shadow: 0 6px 30px -8px rgba(0, 0, 0, .25);
  animation: mscFadePanel .25s ease;
}

@keyframes mscFadePanel {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.msc-auth-panel.hidden {
  display: none;
}

.msc-fade-out {
  animation: mscFadeOut .14s forwards ease;
}

.msc-fade-in {
  animation: mscFadeIn .18s ease;
}

@keyframes mscFadeOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }

  to {
    opacity: 0;
    transform: translateY(-6px);
  }
}

@keyframes mscFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.msc-form {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.msc-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.msc-field label {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: color-mix(in oklab, var(--msc-text) 80%, #444);
}

.msc-field input {
  font-size: .95rem;
  padding: 14px 14px;
  border-radius: 10px;
  border: 1px solid color-mix(in oklab, var(--msc-border) 45%, transparent);
  background: linear-gradient(180deg, #fff, #f9fafb);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
}

.msc-field input:focus {
  border-color: var(--msc-accent);
  box-shadow: 0 0 0 4px rgba(0, 120, 212, .2);
  background: #fff;
}

.msc-grid-2 {
  display: grid;
  gap: 22px;
  grid-template-columns: 1fr 1fr;
}

@media (max-width:760px) {
  .msc-grid-2 {
    grid-template-columns: 1fr;
  }

  .msc-auth-shell {
    flex-direction: column;
  }

  .msc-auth-side {
    flex: 0 0 auto;
    min-height: 220px;
    border-bottom-left-radius: 32px;
    border-bottom-right-radius: 32px;
  }

  .msc-auth-side-inner {
    padding: 36px 32px;
  }

  .msc-auth-main {
    padding: 32px 22px 64px;
  }

  .msc-auth-panel {
    border-radius: 20px;
  }
}

@media (max-width:1024px) {
  .msc-auth-black #msc-auth.msc-auth-shell {
    width: 100vw;
    margin-left: 50%;
    transform: translateX(-50%);
  }
}

.msc-actions {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 8px;
}

.msc-alt-links {
  font-size: .75rem;
  text-align: center;
  color: color-mix(in oklab, var(--msc-text) 70%, #666);
}

.msc-alt-links a {
  color: var(--msc-accent-dark);
  font-weight: 600;
  text-decoration: none;
}

.msc-alt-links a:hover {
  text-decoration: underline;
}

.msc-btn-primary {
  background: linear-gradient(90deg, var(--msc-accent) 0%, var(--msc-accent-dark) 100%);
}

.msc-btn-primary:hover {
  filter: brightness(1.07);
}

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

.w-100 {
  width: 100%;
}

.msc-feedback {
  min-height: 22px;
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .4px;
}

.msc-feedback.msc-error {
  color: #dc2626;
}

.msc-feedback.msc-ok {
  color: #059669;
}

.msc-panel-intro {
  font-size: .85rem;
  line-height: 1.4;
  margin: 0 0 4px;
  color: color-mix(in oklab, var(--msc-text) 75%, #555);
}

/* === Global Component System ============================================ */
/* Spacing scale utility (margin / padding helpers) */
.msc-mt-0 {
  margin-top: 0 !important;
}

.msc-mt-1 {
  margin-top: 4px !important;
}

.msc-mt-2 {
  margin-top: 8px !important;
}

.msc-mt-3 {
  margin-top: 12px !important;
}

.msc-mt-4 {
  margin-top: 16px !important;
}

.msc-mt-5 {
  margin-top: 24px !important;
}

.msc-mt-6 {
  margin-top: 32px !important;
}

.msc-mb-0 {
  margin-bottom: 0 !important;
}

.msc-mb-1 {
  margin-bottom: 4px !important;
}

.msc-mb-2 {
  margin-bottom: 8px !important;
}

.msc-mb-3 {
  margin-bottom: 12px !important;
}

.msc-mb-4 {
  margin-bottom: 16px !important;
}

.msc-mb-5 {
  margin-bottom: 24px !important;
}

.msc-mb-6 {
  margin-bottom: 32px !important;
}

.msc-pt-0 {
  padding-top: 0 !important;
}

.msc-pt-1 {
  padding-top: 4px !important;
}

.msc-pt-2 {
  padding-top: 8px !important;
}

.msc-pt-3 {
  padding-top: 12px !important;
}

.msc-pt-4 {
  padding-top: 16px !important;
}

.msc-pt-5 {
  padding-top: 24px !important;
}

.msc-pt-6 {
  padding-top: 32px !important;
}

.msc-p-0 {
  padding: 0 !important;
}

.msc-p-1 {
  padding: 4px !important;
}

.msc-p-2 {
  padding: 8px !important;
}

.msc-p-3 {
  padding: 12px !important;
}

.msc-p-4 {
  padding: 16px !important;
}

.msc-p-5 {
  padding: 24px !important;
}

.msc-p-6 {
  padding: 32px !important;
}

/* Card utility */
.msc-card-u {
  background: var(--msc-surface);
  border: 1px solid var(--msc-border);
  border-radius: 14px;
  padding: 20px 24px;
  box-shadow: var(--msc-shadow-soft);
  position: relative;
}

.msc-card-u+.msc-card-u {
  margin-top: 18px;
}

.msc-card-u.msc-card-tonal {
  background: color-mix(in oklab, var(--msc-surface), var(--msc-accent) 6%);
}

.msc-card-u.msc-card-outline {
  background: transparent;
}

/* Form field (unified wrapper) */
.msc-form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.msc-form-field>label {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: color-mix(in oklab, var(--msc-text) 70%, #444);
}

.msc-form-field .msc-inline-hint {
  font-size: .65rem;
  color: color-mix(in oklab, var(--msc-text) 55%, #666);
  line-height: 1.3;
}

.msc-form-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.msc-field-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.msc-field-row>* {
  flex: 1 1 200px;
}

/* Secondary button (neutral surface, accent text) */
.msc-btn-secondary {
  background: color-mix(in oklab, var(--msc-surface), var(--msc-accent) 8%);
  border: 1px solid color-mix(in oklab, var(--msc-accent) 40%, var(--msc-border));
  color: var(--msc-accent-dark);
  font-weight: 600;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: .9rem;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .12);
  transition: background .2s, box-shadow .2s, transform .08s;
}

.msc-btn-secondary:hover {
  background: color-mix(in oklab, var(--msc-surface), var(--msc-accent) 14%);
}

.msc-btn-secondary:active {
  transform: translateY(1px);
}

.msc-btn-secondary:focus-visible {
  outline: 2px solid var(--msc-accent);
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(0, 120, 212, .25);
}

/* Danger variant */
.msc-btn-danger {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  color: #fff;
  border: none;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .25);
}

.msc-btn-danger:hover {
  filter: brightness(1.07);
}

.msc-btn-danger:active {
  transform: translateY(1px);
}

.msc-btn-danger:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, .45);
}

/* Tight form variant */
.msc-form-tight .msc-form-field {
  margin-bottom: 10px;
}

/* Utility layout helpers */
.msc-flex {
  display: flex;
}

.msc-flex-col {
  display: flex;
  flex-direction: column;
}

.msc-flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.msc-gap-1 {
  gap: 4px;
}

.msc-gap-2 {
  gap: 8px;
}

.msc-gap-3 {
  gap: 12px;
}

.msc-gap-4 {
  gap: 16px;
}

.msc-grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

/* Elevation tokens */
.msc-elev-1 {
  box-shadow: 0 1px 3px rgba(0, 0, 0, .12), 0 1px 2px rgba(0, 0, 0, .08);
}

.msc-elev-2 {
  box-shadow: 0 4px 12px -2px rgba(0, 0, 0, .18), 0 2px 4px rgba(0, 0, 0, .12);
}

.msc-elev-3 {
  box-shadow: 0 8px 28px -6px rgba(0, 0, 0, .25), 0 6px 14px rgba(0, 0, 0, .2);
}

/* Badge generic */
.msc-badge-neutral {
  background: color-mix(in oklab, var(--msc-surface), var(--msc-accent) 18%);
  color: #fff;
  border-radius: 20px;
  padding: 4px 10px;
  font-size: .65rem;
  font-weight: 600;
  letter-spacing: .5px;
}

/* Standalone login page variant */
.msc-login-shell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
  padding: 40px 16px;
  background: linear-gradient(135deg, var(--msc-bg), #e8ecf2);
}

.msc-login-box {
  width: 100%;
  max-width: 420px;
  background: var(--msc-surface);
  padding: 42px 40px 48px;
  border-radius: 28px;
  box-shadow: 0 10px 40px -8px rgba(0, 0, 0, .28);
  border: 1px solid var(--msc-border);
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.msc-login-brand {
  text-align: center;
  margin: 0;
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: .6px;
  background: linear-gradient(90deg, var(--msc-accent), var(--msc-accent-dark));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.msc-login-box .msc-form {
  gap: 20px;
}

@media (max-width:520px) {
  .msc-login-box {
    padding: 34px 26px 42px;
    border-radius: 22px;
  }
}

/* === Modern Unified Theme (opt-in via .msc-modern on a wrapper) ========= */
.msc-modern {
  --m-bg: linear-gradient(145deg, #0f172a, #111f37 55%, #0d1320);
  --m-surface: rgba(255, 255, 255, .04);
  --m-surface-alt: rgba(255, 255, 255, .07);
  --m-border: rgba(255, 255, 255, .18);
  --m-text: #dbe7f5;
  --m-text-strong: #fff;
  --m-accent: #3b82f6;
  --m-accent-alt: #2563eb;
  --m-danger: #ef4444;
  --m-warn: #f59e0b;
  --m-ok: #10b981;
  --m-radius-lg: 28px;
  --m-radius: 16px;
  --m-radius-sm: 8px;
  --m-shadow-1: 0 4px 18px -6px rgba(0, 0, 0, .55), 0 2px 8px -2px rgba(0, 0, 0, .4);
  --m-shadow-2: 0 18px 50px -12px rgba(0, 0, 0, .65), 0 8px 32px -10px rgba(0, 0, 0, .55);
  --m-grid-gap: 22px;
  font-family: "Inter", "Segoe UI", system-ui, Arial, sans-serif;
  background: #0d1320;
  background-image: var(--m-bg), repeating-linear-gradient(45deg, rgba(255, 255, 255, .04) 0 2px, transparent 2px 10px);
  background-attachment: fixed;
  color: var(--m-text);
}

.msc-modern * {
  box-sizing: border-box;
}

.msc-modern a {
  color: var(--m-accent);
  text-decoration: none;
}

.msc-modern a:hover {
  text-decoration: underline;
}

.msc-modern h1,
.msc-modern h2,
.msc-modern h3 {
  font-weight: 700;
  letter-spacing: .5px;
  color: var(--m-text-strong);
  margin: 0 0 18px;
}

.msc-modern .msc-shell {
  max-width: 1380px;
  margin: 0 auto;
  padding: 50px clamp(24px, 4vw, 70px);
  display: flex;
  flex-direction: column;
  gap: 46px;
}

/* Panels / cards */
.msc-modern .msc-panel {
  background: var(--m-surface);
  border: 1px solid var(--m-border);
  border-radius: var(--m-radius);
  padding: 34px clamp(24px, 3vw, 44px);
  position: relative;
  box-shadow: var(--m-shadow-1);
  backdrop-filter: blur(18px);
  display: flex;
  flex-direction: column;
  gap: 26px;
  overflow: hidden;
}

.msc-modern .msc-panel:before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 85% 10%, rgba(59, 130, 246, .22), transparent 60%), radial-gradient(circle at 15% 90%, rgba(37, 99, 235, .16), transparent 65%);
  mix-blend-mode: overlay;
  pointer-events: none;
}

.msc-modern .msc-panel-tight {
  padding: 26px 30px;
  gap: 18px;
}

.msc-modern .msc-panel-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: .6px;
}

.msc-modern .msc-panel-sub {
  margin: -10px 0 8px;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: color-mix(in oklab, var(--m-text) 70%, #8895a7);
}

/* Grid layout utilities */
.msc-modern .msc-grid {
  display: grid;
  gap: var(--m-grid-gap);
}

.msc-modern .msc-grid-3 {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.msc-modern .msc-grid-4 {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

/* Buttons */
.msc-modern .msc-btn {
  --btn-bg: linear-gradient(90deg, var(--m-accent-alt), var(--m-accent));
  --btn-shadow: 0 6px 26px -8px rgba(0, 0, 0, .6), 0 2px 10px -4px rgba(0, 0, 0, .45);
  background: var(--btn-bg);
  border: none;
  border-radius: 14px;
  padding: 14px 22px;
  font-weight: 600;
  letter-spacing: .5px;
  font-size: .85rem;
  color: #fff;
  cursor: pointer;
  box-shadow: var(--btn-shadow);
  transition: filter .28s, transform .18s;
  position: relative;
}

.msc-modern .msc-btn:hover {
  filter: brightness(1.1);
}

.msc-modern .msc-btn:active {
  transform: translateY(1px);
}

.msc-modern .msc-btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .45);
}

.msc-modern .msc-btn-soft {
  --btn-bg: linear-gradient(135deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .06));
  color: var(--m-text);
  border: 1px solid var(--m-border);
  box-shadow: 0 4px 18px -6px rgba(0, 0, 0, .5);
}

.msc-modern .msc-btn-danger {
  --btn-bg: linear-gradient(135deg, #dc2626, #b91c1c);
}

.msc-modern .msc-btn-ok {
  --btn-bg: linear-gradient(135deg, #059669, #10b981);
}

/* Inline chips */
.msc-modern .msc-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: .65rem;
  font-weight: 600;
  letter-spacing: .5px;
  text-transform: uppercase;
  border: 1px solid var(--m-border);
  color: var(--m-text);
  background: rgba(255, 255, 255, .08);
  border-radius: 24px;
  box-shadow: 0 2px 6px -2px rgba(0, 0, 0, .35);
}

.msc-modern .msc-chip-accent {
  background: linear-gradient(135deg, var(--m-accent-alt), var(--m-accent));
  color: #fff;
}

.msc-modern .msc-chip-ok {
  background: linear-gradient(135deg, #059669, #10b981);
  color: #fff;
}

.msc-modern .msc-chip-warn {
  background: linear-gradient(135deg, #f59e0b, #b45309);
  color: #fff;
}

.msc-modern .msc-chip-danger {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  color: #fff;
}

/* Form fields */
.msc-modern .msc-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.msc-modern .msc-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.msc-modern .msc-field label {
  font-size: .65rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: .55px;
  color: color-mix(in oklab, var(--m-text) 70%, #8fa2b5);
}

.msc-modern .msc-field input[type="text"],
.msc-modern .msc-field input[type="email"],
.msc-modern .msc-field input[type="password"],
.msc-modern .msc-field input[type="number"],
.msc-modern .msc-field input[type="date"],
.msc-modern .msc-field select,
.msc-modern .msc-field textarea {
  background: linear-gradient(180deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .08));
  border: 1px solid var(--m-border);
  color: var(--m-text);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: .85rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .4) inset, 0 0 0 0 rgba(59, 130, 246, .4);
  backdrop-filter: blur(6px);
  transition: border-color .25s, box-shadow .3s, background .35s;
}

.msc-modern .msc-field input:focus,
.msc-modern .msc-field select:focus,
.msc-modern .msc-field textarea:focus {
  border-color: var(--m-accent);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, .35), 0 1px 2px rgba(0, 0, 0, .4) inset;
  background: linear-gradient(180deg, rgba(59, 130, 246, .25), rgba(59, 130, 246, .12));
}

.msc-modern .msc-field input::placeholder {
  color: #93a7bc;
}

.msc-modern .msc-inline {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.msc-modern .msc-inline>* {
  flex: 1 1 200px;
}

.msc-modern .msc-form-split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.msc-modern .msc-form-tight {
  gap: 18px;
}

.msc-modern .msc-feedback {
  font-size: .65rem;
  min-height: 16px;
  letter-spacing: .4px;
}

.msc-modern .msc-feedback.msc-error {
  color: var(--m-danger);
}

.msc-modern .msc-feedback.msc-ok {
  color: var(--m-ok);
}

/* Tables */
.msc-modern table {
  width: 100%;
  border-collapse: collapse;
  font-size: .75rem;
}

.msc-modern table thead th {
  text-align: left;
  font-weight: 600;
  letter-spacing: .4px;
  padding: 10px 14px;
  background: linear-gradient(135deg, rgba(255, 255, 255, .18), rgba(255, 255, 255, .08));
  border-bottom: 1px solid var(--m-border);
  position: relative;
}

.msc-modern table thead th:after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, rgba(59, 130, 246, .5), rgba(255, 255, 255, 0));
}

.msc-modern table tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.msc-modern table tbody tr {
  transition: background .25s;
}

.msc-modern table tbody tr:hover {
  background: rgba(255, 255, 255, .06);
}

.msc-modern table tbody tr:last-child td {
  border-bottom: none;
}

/* Badges & status pills */
.msc-modern .msc-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  padding: 4px 10px;
  font-size: .6rem;
  font-weight: 600;
  letter-spacing: .5px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .12);
  color: var(--m-text);
}

.msc-modern .msc-badge-ok {
  background: linear-gradient(135deg, #059669, #10b981);
  color: #fff;
}

.msc-modern .msc-badge-warn {
  background: linear-gradient(135deg, #f59e0b, #b45309);
  color: #fff;
}

.msc-modern .msc-badge-danger {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  color: #fff;
}

/* Navigation (dashboard) */
.msc-modern .msc-nav {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.msc-modern .msc-nav a {
  background: rgba(255, 255, 255, .06);
  border: 1px solid var(--m-border);
  padding: 10px 16px;
  border-radius: 12px;
  font-size: .7rem;
  letter-spacing: .55px;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--m-text);
  position: relative;
  overflow: hidden;
  transition: background .35s, border-color .35s, color .35s;
}

.msc-modern .msc-nav a:hover {
  background: rgba(255, 255, 255, .12);
}

.msc-modern .msc-nav a.active {
  background: linear-gradient(135deg, var(--m-accent-alt), var(--m-accent));
  color: #fff;
  border-color: rgba(255, 255, 255, .35);
  box-shadow: 0 6px 20px -8px rgba(0, 0, 0, .6);
}

/* Footer / subtle text */
.msc-modern .msc-footnote {
  font-size: .6rem;
  letter-spacing: .5px;
  opacity: .55;
  margin-top: 40px;
  text-align: center;
}

/* Utility spacing shortcuts */
.msc-modern .gap-xs {
  gap: 6px;
}

.msc-modern .gap-sm {
  gap: 12px;
}

.msc-modern .gap-md {
  gap: 24px;
}

.msc-modern .gap-lg {
  gap: 46px;
}

.msc-modern .stack-sm>*+* {
  margin-top: 10px;
}

.msc-modern .stack-md>*+* {
  margin-top: 20px;
}

.msc-modern .stack-lg>*+* {
  margin-top: 34px;
}

.msc-modern .text-dim {
  color: color-mix(in oklab, var(--m-text) 70%, #93a7bc);
}

.msc-modern .text-strong {
  color: var(--m-text-strong);
}

.msc-modern .accent {
  color: var(--m-accent);
}

/* Responsive tweaks */
@media (max-width:880px) {
  .msc-modern .msc-shell {
    padding: 42px clamp(18px, 5vw, 40px);
  }
}

@media (max-width:600px) {
  .msc-modern .msc-panel {
    padding: 30px 26px 36px;
    border-radius: 22px;
  }
}

/* REMOVED prefers-color-scheme light media query for modern theme - keeps consistent dark styling */

/* Settings Panel Styling */
.msc-settings-shell {
  background: linear-gradient(145deg, #061725, #04101b);
  min-height: 100vh;
  padding: 40px 20px;
  color: #dbe7f1;
}

.msc-settings-container {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.msc-settings-header {
  text-align: left;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.msc-settings-title {
  margin: 0 0 8px;
  font-size: 2.2rem;
  font-weight: 600;
  letter-spacing: .25px;
  color: #f2f6fb;
}

.msc-settings-subtitle {
  margin: 0;
  font-size: .85rem;
  font-weight: 500;
  color: #6f8596;
  letter-spacing: .2px;
}

.msc-settings-content {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.msc-settings-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.msc-settings-section-header {
  padding-left: 2px;
}

.msc-settings-section-title {
  margin: 0 0 4px;
  font-size: 1.1rem;
  font-weight: 700;
  color: #f1f5f9;
  letter-spacing: .25px;
}

.msc-settings-section-desc {
  margin: 0;
  font-size: .75rem;
  color: #a0aab5;
  font-weight: 500;
}

.msc-settings-panel {
  background: linear-gradient(160deg, #0b0b0b, #0f1318);
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 14px;
  padding: 28px 30px;
  box-shadow: 0 14px 36px -16px rgba(0, 0, 0, .55), 0 4px 14px -6px rgba(0, 0, 0, .48);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.msc-settings-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.msc-settings-label {
  font-size: .72rem;
  font-weight: 700;
  color: #dfe8ef;
  text-transform: uppercase;
  letter-spacing: .46px;
  margin-bottom: 2px;
  overflow: visible;
  /* prevent half-cut labels on some themes */
}

.msc-settings-input,
.msc-settings-select {
  background: linear-gradient(145deg, #0d0d0d, #111316);
  border: 1px solid rgba(255, 255, 255, .12);
  color: #e8eef4;
  border-radius: 10px;
  padding: 13px 15px;
  font-size: .84rem;
  transition: border-color .2s, background .3s, box-shadow .28s;
  width: 100%;
  min-height: 42px;
  /* avoid clipped text/placeholder */
}

/* Pretty range slider (used for capacity) */
.msc-range {
  --msc-range-bg: #121212;
  --msc-range-fill: linear-gradient(90deg, var(--msc-accent, #f59e0b), var(--msc-accent-dark, #fbbf24));
  appearance: none;
  height: 6px;
  border-radius: 999px;
  background: var(--msc-range-bg);
  outline: none;
  border: 1px solid #2a2a2a;
  width: 100%;
}

.msc-range:focus-visible {
  box-shadow: 0 0 0 3px rgba(245, 158, 11, .25);
}

.msc-range::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--msc-accent, #f59e0b) 0%, var(--msc-accent-dark, #fbbf24) var(--_val, 0%), #121212 var(--_val, 0%));
}

.msc-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--msc-accent, #f59e0b);
  margin-top: -7px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, .3);
}

.msc-range::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: #121212;
}

.msc-range::-moz-range-progress {
  height: 6px;
  background: var(--msc-accent, #f59e0b);
}

.msc-range::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--msc-accent, #f59e0b);
}

.msc-inline-form .msc-range-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 240px;
}

.msc-inline-form .msc-range-wrap output {
  font-variant-numeric: tabular-nums;
  min-width: 28px;
  text-align: right;
  color: #e8eef4;
}

@media (max-width:600px) {
  .msc-inline-form .msc-range-wrap {
    min-width: 180px;
  }
}

.msc-settings-input:hover,
.msc-settings-select:hover {
  border-color: rgba(255, 255, 255, .2);
}

.msc-settings-input:focus,
.msc-settings-select:focus {
  outline: none;
  border-color: rgba(245, 158, 11, .9);
  box-shadow: 0 0 0 2px rgba(245, 158, 11, .35);
  background: #141414;
}

.msc-settings-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236B7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 12px center;
  background-repeat: no-repeat;
  background-size: 16px;
  padding-right: 40px;
}

.msc-settings-help {
  font-size: .68rem;
  color: #7a8d9e;
  font-weight: 500;
  margin-top: 2px;
  line-height: 1.4;
}

.msc-settings-toggle-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 48px;
}

.msc-settings-toggle-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.msc-settings-toggle {
  flex-shrink: 0;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.msc-settings-checkbox {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.msc-settings-switch {
  display: block;
  width: 48px;
  height: 24px;
  /* dynamic fill based on --msc-switch-fill percentage */
  background: linear-gradient(90deg, var(--msc-accent, #f59e0b) 0%, var(--msc-accent-dark, #fbbf24) var(--msc-switch-fill, 0%), #121212 var(--msc-switch-fill, 0%), #121212 100%);
  border-radius: 12px;
  position: relative;
  cursor: pointer;
  transition: background .15s linear, box-shadow .25s;
  border: 1px solid #2a2a2a;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .35);
}

.msc-settings-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: #ffffff;
  border-radius: 50%;
  transition: transform .2s cubic-bezier(.4, 0, .2, 1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, .2);
  /* allow JS to drive the knob while dragging */
  transform: translateX(clamp(0px, var(--msc-switch-x, 0px), 24px));
}

.msc-settings-checkbox:checked+.msc-settings-switch {
  border-color: #614000;
  --msc-switch-x: 24px;
  --msc-switch-fill: 100%;
}

.msc-settings-checkbox:focus-visible+.msc-settings-switch {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* ON/OFF labels around the switch */
.msc-settings-toggle::before,
.msc-settings-toggle::after {
  content: '';
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .2px;
}

.msc-settings-toggle::before {
  content: 'Nie';
  color: #d2dde6;
  opacity: .98;
}

.msc-settings-toggle::after {
  content: 'Tak';
  color: #d2dde6;
  opacity: .6;
}

.msc-settings-toggle.is-on::before {
  color: #9fb0bd;
  opacity: .85;
}

.msc-settings-toggle.is-on::after {
  color: #ffd27a;
  opacity: 1;
}

@media (max-width: 520px) {

  .msc-settings-toggle::before,
  .msc-settings-toggle::after {
    display: none;
  }
}

.msc-settings-time-range {
  display: flex;
  align-items: center;
  gap: 12px;
}

.msc-settings-time {
  background: linear-gradient(145deg, #1d3343, #1b2d3a);
  border: 1px solid rgba(255, 255, 255, .08);
  color: #ecf4fb;
  border-radius: 10px;
  padding: 13px 15px;
  font-size: .84rem;
  width: 120px;
  transition: border-color .2s, background .3s, box-shadow .28s;
}

.msc-settings-time:hover {
  border-color: rgba(255, 255, 255, .18);
}

.msc-settings-time:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .45);
  background: #223a4b;
}

.msc-settings-time-separator {
  font-size: .9rem;
  color: #8799a8;
  font-weight: 500;
}

.msc-settings-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, .08);
}

.msc-settings-btn {
  border: none;
  border-radius: 10px;
  padding: 12px 24px;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .3px;
  cursor: pointer;
  transition: all .25s;
  min-width: 120px;
}

.msc-settings-btn-secondary {
  background: transparent;
  color: #8799a8;
  border: 1px solid rgba(255, 255, 255, .12);
}

.msc-settings-btn-secondary:hover {
  background: rgba(255, 255, 255, .04);
  color: #a8b8c4;
  border-color: rgba(255, 255, 255, .2);
}


.msc-settings-btn-primary {
  background: linear-gradient(130deg, #fde68a 0%, #facc15 42%, #f59e0b 78%, #d97706 100%) !important;
  background-color: #facc15 !important;
  /* fallback */
  color: #111 !important;
  box-shadow: 0 16px 34px -16px rgba(250, 204, 21, .85), 0 0 0 1px rgba(63, 44, 16, .65) !important;
  border: 1px solid rgba(251, 213, 109, .7) !important;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .55);
  font-weight: 700;
}

.msc-settings-btn-primary:hover {
  filter: brightness(1.06);
  box-shadow: 0 22px 46px -22px rgba(250, 204, 21, .95), 0 0 0 1px rgba(251, 213, 109, .7) !important;
}

.msc-settings-btn-primary:active {
  transform: translateY(1px) scale(.99);
}

.msc-settings-btn:focus-visible {
  outline: 2px solid #f59e0b;
  outline-offset: 3px;
}

@media (max-width: 768px) {
  .msc-settings-shell {
    font-size: .68rem;
    color: #9aa2ad;
    font-weight: 500;
  }

  .msc-settings-container {
    gap: 24px;
  }

  .msc-settings-panel {
    padding: 20px 18px;
  }

  .msc-settings-toggle-group {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .msc-settings-actions {
    flex-direction: column-reverse;
  }

  .msc-settings-btn {
    width: 100%;
  }

  .msc-settings-time-range {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .msc-settings-time {
    width: 100%;
  }
}

/* === Panel Head (Auth Panels) ============================================= */
.msc-auth-refine .msc-panel-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin: 0 0 4px;
  padding: 2px 0 10px;
  position: relative;
}

.msc-auth-refine .msc-panel-head:after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, 0));
}

.msc-auth-refine .msc-ph-icon {
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  line-height: 1;
  border-radius: 16px;
  background: linear-gradient(145deg, #1b1b1b, #111);
  border: 1px solid #252525;
  box-shadow: 0 6px 18px -8px rgba(0, 0, 0, .6), 0 2px 4px -1px rgba(0, 0, 0, .5) inset;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .45));
}

.msc-auth-refine .msc-ph-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.msc-auth-refine .msc-ph-title {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: .4px;
  background: linear-gradient(90deg, #ffffff, #9fb3c2);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, .55));
}

.msc-auth-refine .msc-ph-sub {
  margin: 0;
  font-size: .66rem;
  line-height: 1.5;
  color: #7f909d;
  font-weight: 500;
  letter-spacing: .5px;
  max-width: 360px;
}

/* Hover / focus accent for icon */
.msc-auth-refine .msc-auth-panel:focus-within .msc-ph-icon {
  border-color: #2e4f90;
  box-shadow: 0 0 0 1px #193768, 0 0 0 4px rgba(59, 130, 246, .35), 0 2px 4px -1px rgba(0, 0, 0, .5) inset;
}

/* Gold theme overrides */
.msc-auth-theme-gold .msc-panel-head:after {
  background: linear-gradient(90deg, rgba(255, 198, 90, .4), rgba(255, 198, 90, 0));
}

.msc-auth-theme-gold .msc-ph-icon {
  background: linear-gradient(145deg, #2a2107, #141008);
  border-color: #3f3220;
  box-shadow: 0 6px 18px -8px rgba(0, 0, 0, .7), 0 2px 5px -1px rgba(0, 0, 0, .6) inset;
}

.msc-auth-theme-gold .msc-auth-panel:focus-within .msc-ph-icon {
  border-color: #72591d;
  box-shadow: 0 0 0 1px #3d2e11, 0 0 0 4px rgba(234, 179, 8, .35), 0 2px 5px -1px rgba(0, 0, 0, .6) inset;
}

.msc-auth-theme-gold .msc-ph-title {
  background: linear-gradient(90deg, #ffe7b0, #ffe19a, #f8d275);
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
}

.msc-auth-theme-gold .msc-ph-sub {
  color: #c6b08a;
}

/* Emerald theme overrides */
.msc-auth-theme-emerald .msc-panel-head:after {
  background: linear-gradient(90deg, rgba(16, 185, 129, .45), rgba(16, 185, 129, 0));
}

.msc-auth-theme-emerald .msc-ph-icon {
  background: linear-gradient(145deg, #03251a, #051a13);
  border-color: #063b2a;
  box-shadow: 0 6px 18px -8px rgba(0, 0, 0, .7), 0 2px 5px -1px rgba(0, 0, 0, .6) inset;
}

.msc-auth-theme-emerald .msc-auth-panel:focus-within .msc-ph-icon {
  border-color: #0d7a56;
  box-shadow: 0 0 0 1px #064933, 0 0 0 4px rgba(16, 185, 129, .38), 0 2px 5px -1px rgba(0, 0, 0, .6) inset;
}

.msc-auth-theme-emerald .msc-ph-title {
  background: linear-gradient(90deg, #6ef7c4, #4ade80, #34d399);
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
}

.msc-auth-theme-emerald .msc-ph-sub {
  color: #78c2a4;
}

/* Black absolute variant synergy */
.msc-auth-black .msc-ph-icon {
  background: #0e0e0e;
  border-color: #272727;
}

.msc-auth-black .msc-panel-head:after {
  background: linear-gradient(90deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0));
}

/* Reduced motion: subtle transition removal */
@media (prefers-reduced-motion:reduce) {
  .msc-auth-refine .msc-ph-icon {
    transition: none !important;
  }
}

@media (max-width:560px) {
  .msc-auth-refine .msc-panel-head {
    flex-direction: row;
    gap: 14px;
    padding: 0 0 10px;
  }

  .msc-auth-refine .msc-ph-icon {
    width: 42px;
    height: 42px;
    font-size: 1.25rem;
  }

  .msc-auth-refine .msc-ph-title {
    font-size: 1rem;
  }

  .msc-auth-refine .msc-ph-sub {
    font-size: .62rem;
  }
}

/* Black-context gold overrides for refine/pro to remove residual blues */
body.msc-abs-black .msc-auth-refine .msc-auth-tab:focus-visible,
html.msc-abs-black-html body .msc-auth-refine .msc-auth-tab:focus-visible {
  outline: 2px solid var(--msc-auth-black-accent) !important;
}

body.msc-abs-black .msc-auth-refine .msc-auth-tab.active,
body.msc-abs-black .msc-auth-refine .msc-auth-tab[aria-selected="true"],
html.msc-abs-black-html body .msc-auth-refine .msc-auth-tab.active,
html.msc-abs-black-html body .msc-auth-refine .msc-auth-tab[aria-selected="true"] {
  border-color: var(--msc-auth-black-accent) !important;
}

body.msc-abs-black .msc-auth-refine .msc-auth-tab.active::after,
body.msc-abs-black .msc-auth-refine .msc-auth-tab[aria-selected="true"]::after,
html.msc-abs-black-html body .msc-auth-refine .msc-auth-tab.active::after,
html.msc-abs-black-html body .msc-auth-refine .msc-auth-tab[aria-selected="true"]::after {
  background: linear-gradient(90deg, var(--msc-auth-black-accent), var(--msc-auth-black-accent-alt)) !important;
  box-shadow: 0 0 8px -2px rgba(245, 158, 11, .6) !important;
}

/* Pro variant: swap blues to gold when in black context */
body.msc-abs-black .msc-auth-pro .msc-auth-tab::after,
html.msc-abs-black-html body .msc-auth-pro .msc-auth-tab::after {
  background: linear-gradient(90deg, var(--msc-auth-black-accent), var(--msc-auth-black-accent-alt)) !important;
}

body.msc-abs-black .msc-auth-pro .msc-auth-tab:focus-visible,
html.msc-abs-black-html body .msc-auth-pro .msc-auth-tab:focus-visible {
  outline: 2px solid var(--msc-auth-black-accent) !important;
}

body.msc-abs-black .msc-auth-pro .msc-field input:focus,
html.msc-abs-black-html body .msc-auth-pro .msc-field input:focus {
  border-color: var(--msc-auth-black-accent) !important;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, .35) !important;
}

body.msc-abs-black .msc-auth-pro .msc-btn-primary,
html.msc-abs-black-html body .msc-auth-pro .msc-btn-primary {
  background: linear-gradient(90deg, var(--msc-auth-black-accent), var(--msc-auth-black-accent-alt)) !important;
  box-shadow: 0 6px 20px -8px rgba(0, 0, 0, .9), 0 0 0 1px #0c0c0c !important;
}

body.msc-abs-black .msc-auth-pro .msc-alt-links a,
html.msc-abs-black-html body .msc-auth-pro .msc-alt-links a {
  color: var(--msc-auth-black-accent) !important;
}

body.msc-abs-black .msc-auth-pro .msc-alt-links a:hover,
html.msc-abs-black-html body .msc-auth-pro .msc-alt-links a:hover {
  color: var(--msc-auth-black-accent-alt) !important;
}

/* Refine variant: swap blues to gold when in black context */
body.msc-abs-black .msc-auth-refine .msc-btn-primary,
html.msc-abs-black-html body .msc-auth-refine .msc-btn-primary {
  background: linear-gradient(90deg, var(--msc-auth-black-accent), var(--msc-auth-black-accent-alt)) !important;
  border: 1px solid #3f2c10 !important;
  color: #fff !important;
  box-shadow: 0 6px 20px -8px rgba(0, 0, 0, .9), 0 0 0 1px #0c0c0c !important;
}

body.msc-abs-black .msc-auth-refine .msc-field input:focus,
html.msc-abs-black-html body .msc-auth-refine .msc-field input:focus {
  border-color: var(--msc-auth-black-accent) !important;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, .45) !important;
}

/* Tabs base surfaces to dark in black context */
body.msc-abs-black .msc-auth-refine .msc-auth-tabs,
html.msc-abs-black-html body .msc-auth-refine .msc-auth-tabs {
  background: #050505 !important;
  border: 1px solid #141414 !important;
}

body.msc-abs-black .msc-auth-refine .msc-auth-tab,
html.msc-abs-black-html body .msc-auth-refine .msc-auth-tab {
  background: #060606 !important;
  border: 1px solid #151515 !important;
  color: #8d99a5 !important;
}

body.msc-abs-black .msc-auth-refine .msc-auth-tab:hover,
html.msc-abs-black-html body .msc-auth-refine .msc-auth-tab:hover {
  background: #0b0b0b !important;
  color: #cfd7dd !important;
}

body.msc-abs-black .msc-auth-refine .msc-auth-tab.active,
html.msc-abs-black-html body .msc-auth-refine .msc-auth-tab.active {
  background: #0f0f0f !important;
}

/* Welcome/info banner indicator -> gold */
body.msc-abs-black .msc-auth-banners .msc-auth-banner:before,
html.msc-abs-black-html body .msc-auth-banners .msc-auth-banner:before {
  background: linear-gradient(135deg, #f59e0b, #fbbf24) !important;
  box-shadow: 0 4px 14px -4px rgba(245, 158, 11, .85) !important;
}

/* Inputs/Autofill: force dark on Chrome/Safari within plugin pages */
html.msc-abs-black-html body .msc-modern input,
html.msc-abs-black-html body .msc-modern select,
html.msc-abs-black-html body .msc-modern textarea {
  color: #e6e6e6 !important;
  background: #0f1012 !important;
  border-color: #2a2a2a !important;
  caret-color: #f59e0b !important;
}

html.msc-abs-black-html body .msc-modern input:-webkit-autofill,
html.msc-abs-black-html body .msc-modern select:-webkit-autofill,
html.msc-abs-black-html body .msc-modern textarea:-webkit-autofill {
  -webkit-text-fill-color: #e6e6e6 !important;
  transition: background-color 99999s ease-in-out 0s, color 99999s ease-in-out 0s;
  box-shadow: 0 0 0 1000px #121316 inset !important;
}

/* Firefox autofill */
html.msc-abs-black-html body .msc-modern input:-moz-autofill,
html.msc-abs-black-html body .msc-modern select:-moz-autofill,
html.msc-abs-black-html body .msc-modern textarea:-moz-autofill {
  box-shadow: 0 0 0 1000px #121316 inset !important;
  -moz-text-fill-color: #e6e6e6 !important;
}

/* Form control accent color (checkbox/radio etc.) */
html.msc-abs-black-html body .msc-modern input[type="checkbox"],
html.msc-abs-black-html body .msc-modern input[type="radio"] {
  accent-color: #f59e0b;
  /* gold */
}


/* === Black context: force gold palette for core UI (msc-modern) ========= */
/* Scope strictly to plugin pages (class added server-side in head). */
body.msc-abs-black .msc-modern {
  --m-accent: #f59e0b;
  /* gold */
  --m-accent-alt: #fbbf24;
  /* lighter gold */
  --m-text: #e6e6e6;
  --m-border: rgba(255, 255, 255, .12);
}

/* Inputs focus */
body.msc-abs-black .msc-modern .msc-field input:focus,
body.msc-abs-black .msc-modern .msc-field select:focus,
body.msc-abs-black .msc-modern .msc-field textarea:focus {
  border-color: var(--m-accent) !important;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, .35) !important;
  background: linear-gradient(180deg, rgba(245, 158, 11, .16), transparent) !important;
}

/* Buttons focus */
body.msc-abs-black .msc-modern .msc-btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, .45) !important;
}

/* Tables and panels */
body.msc-abs-black .msc-modern table thead th:after {
  background: linear-gradient(90deg, rgba(245, 158, 11, .45), rgba(255, 255, 255, 0)) !important;
}

body.msc-abs-black .msc-modern table tbody tr:hover {
  background: rgba(245, 158, 11, .08) !important;
}

body.msc-abs-black .msc-modern .msc-panel:before {
  background: radial-gradient(circle at 85% 10%, rgba(245, 158, 11, .18), transparent 60%), radial-gradient(circle at 15% 90%, rgba(251, 191, 36, .12), transparent 65%) !important;
}

/* === Global Responsive Enhancements ======================================= */
/* Cards and containers on small screens */
@media (max-width:640px) {

  .msc-theme .msc-card,
  .msc-theme .msc-container {
    border-radius: 16px;
    padding: 20px 18px;
    margin: 12px 8px;
  }

  .msc-theme .msc-header {
    font-size: 1.6rem;
    margin-bottom: 18px;
  }

  .msc-theme .msc-btn,
  .msc-theme .msc-btn-primary,
  .msc-theme .msc-btn-secondary {
    padding: 11px 18px;
    font-size: .8rem;
    width: 100%;
  }

  .msc-theme .msc-btn-outline {
    padding: 10px 16px;
    font-size: .78rem;
  }
}

/* Tables - better mobile handling */
@media (max-width:720px) {
  .msc-table-wrap {
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .3);
    margin: 10px 0;
  }

  .msc-theme .msc-table {
    font-size: .75rem;
  }

  .msc-theme .msc-table th,
  .msc-theme .msc-table td {
    padding: 8px 10px;
    font-size: .72rem;
  }
}

/* Modals on mobile */
@media (max-width:560px) {
  .msc-modal {
    width: calc(100vw - 24px) !important;
    max-width: calc(100vw - 24px) !important;
    margin: 12px;
    padding: 24px 20px;
  }

  .msc-modal-head {
    font-size: 1.2rem;
  }

  .msc-modal-body {
    font-size: .82rem;
    line-height: 1.5;
  }

  .msc-modal-actions {
    flex-direction: column;
    gap: 10px;
  }

  .msc-modal-actions button {
    width: 100%;
  }
}

/* Forms and inputs - better touch targets */
@media (max-width:640px) {

  .msc-field input,
  .msc-field select,
  .msc-field textarea {
    padding: 12px 14px;
    font-size: .85rem;
    min-height: 44px;
    /* iOS touch target minimum */
  }

  .msc-field label {
    font-size: .78rem;
    margin-bottom: 6px;
  }
}

/* Grid layouts - stack on mobile */
@media (max-width:640px) {

  .msc-grid-2,
  .msc-grid-3,
  .msc-grid-4 {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }
}

/* Action buttons groups */
@media (max-width:560px) {
  .msc-actions {
    flex-direction: column;
    gap: 12px;
  }

  .msc-actions button,
  .msc-actions .msc-btn {
    width: 100%;
    margin: 0;
  }
}

/* Schedule/Calendar views */
@media (max-width:768px) {
  .msc-sched-wrapper {
    padding: 16px 12px;
    overflow-x: auto;
  }

  .msc-sched-grid {
    min-width: 600px;
    /* Prevent extreme squishing */
  }
}

/* Settings panel */
@media (max-width:720px) {
  .msc-settings-shell {
    padding: 24px 16px;
  }

  .msc-settings-container {
    padding: 0;
  }

  .msc-settings-panel {
    padding: 24px 20px;
    border-radius: 16px;
  }

  .msc-settings-title {
    font-size: 1.6rem;
  }

  .msc-settings-group {
    padding: 18px 0;
  }

  .msc-settings-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

/* Attendance views */
@media (max-width:860px) {
  #msc-attendance-root {
    padding: 24px 20px !important;
  }

  .msc-att-header {
    flex-direction: column;
    gap: 14px;
    align-items: flex-start;
  }
}

/* My Sessions / User panels */
@media (max-width:640px) {
  .msc-myatt-item {
    padding: 16px 14px;
    border-radius: 12px;
  }

  .msc-myatt-date {
    font-size: .7rem;
  }

  .msc-myatt-title {
    font-size: .95rem;
  }
}