
/* =========================================================
   MultiDebrid V3 Mode Fix
   Fixes light/dark contrast, transparent text, card surfaces,
   nav readability and responsive spacing across the V3 layout.
   ========================================================= */
:root,
html[data-theme="light"]{
  --md-bg:#f5f7fb;
  --md-bg-2:#eef4ff;
  --md-surface:#ffffff;
  --md-surface-2:#f8fbff;
  --md-text:#0f172a;
  --md-heading:#07111f;
  --md-muted:#52657f;
  --md-soft:#eef3ff;
  --md-border:#dce5f3;
  --md-primary:#635bff;
  --md-primary-dark:#5146e6;
  --md-accent:#14b8a6;
  --md-ok:#12b76a;
  --md-warning:#f59e0b;
  --md-shadow:0 24px 70px rgba(15,23,42,.10);
  color-scheme:light;
}
html[data-theme="dark"]{
  --md-bg:#070b18;
  --md-bg-2:#0b1225;
  --md-surface:#10182d;
  --md-surface-2:#151f38;
  --md-text:#f8fafc;
  --md-heading:#ffffff;
  --md-muted:#aab8d6;
  --md-soft:rgba(255,255,255,.075);
  --md-border:rgba(148,163,184,.24);
  --md-primary:#8b7cff;
  --md-primary-dark:#a195ff;
  --md-accent:#37d5ff;
  --md-ok:#72f59e;
  --md-warning:#fbbf24;
  --md-shadow:0 30px 90px rgba(0,0,0,.42);
  color-scheme:dark;
}
html,body{background:var(--md-bg)!important;color:var(--md-text)!important;}
body.md-site{background:
  radial-gradient(circle at 12% 10%, color-mix(in srgb,var(--md-primary) 16%,transparent), transparent 30%),
  radial-gradient(circle at 86% 8%, color-mix(in srgb,var(--md-accent) 13%,transparent), transparent 28%),
  var(--md-bg)!important;
}
html[data-theme="dark"] body.md-site{background:
  radial-gradient(circle at 14% 9%,rgba(139,124,255,.16),transparent 32%),
  radial-gradient(circle at 85% 8%,rgba(55,213,255,.10),transparent 30%),
  linear-gradient(180deg,#070b18 0%,#0a1022 48%,#070b18 100%)!important;
}
.md-ambient{opacity:.9;background:radial-gradient(circle at 10% 18%,color-mix(in srgb,var(--md-primary) 15%,transparent),transparent 26%),radial-gradient(circle at 88% 12%,color-mix(in srgb,var(--md-accent) 12%,transparent),transparent 24%)!important;}
.md-navbar{background:color-mix(in srgb,var(--md-surface) 88%,transparent)!important;border-bottom:1px solid var(--md-border)!important;box-shadow:0 12px 36px rgba(15,23,42,.055)!important;}
html[data-theme="dark"] .md-navbar{box-shadow:0 18px 60px rgba(0,0,0,.32)!important;}
.md-brand,.md-brand span,.md-nav-links a,.md-user-pill strong{color:var(--md-text)!important;}
.md-nav-links a{opacity:1!important;color:var(--md-muted)!important;font-weight:850!important;}
.md-nav-links a:hover,.md-nav-links a.active{background:var(--md-soft)!important;color:var(--md-primary-dark)!important;}
.md-user-pill,.md-theme-toggle,.md-btn-outline,.md-btn-ghost{background:var(--md-surface-2)!important;border:1px solid var(--md-border)!important;color:var(--md-text)!important;}
.md-user-pill small{color:var(--md-muted)!important;}
.md-menu-toggle{background:var(--md-surface-2)!important;color:var(--md-text)!important;border:1px solid var(--md-border)!important;}
.md-hero{background:linear-gradient(135deg,color-mix(in srgb,var(--md-primary) 7%,transparent),color-mix(in srgb,var(--md-accent) 7%,transparent))!important;}
html[data-theme="dark"] .md-hero{background:linear-gradient(135deg,rgba(11,16,34,.86),rgba(18,27,54,.94))!important;}
.md-hero-bg{background:radial-gradient(circle at 15% 20%,color-mix(in srgb,var(--md-primary) 16%,transparent),transparent 34%),radial-gradient(circle at 85% 12%,color-mix(in srgb,var(--md-accent) 13%,transparent),transparent 30%)!important;}
.md-hero h1,.md-page-title,.md-panel h1,.md-panel h2,.md-panel h3,.md-page-card h1,.md-page-card h2,.md-page-card h3,.md-card-head h2,.md-v3-flow-head h2,.md-v3-flow-grid h3,.md-support-toolbar h2,.md-premium-card h2,.md-auth-card h1{color:var(--md-heading)!important;text-shadow:none!important;}
.md-hero p,.md-page-subtitle,.md-panel p,.md-page-card p,.md-muted,.md-v3-flow-head p,.md-v3-flow-grid p,.md-process-item span,.md-security-item span,.md-support-limits small,.md-stat-card span{color:var(--md-muted)!important;}
.md-badge,.md-eyebrow{background:color-mix(in srgb,var(--md-primary) 10%,var(--md-surface))!important;border-color:color-mix(in srgb,var(--md-primary) 28%,var(--md-border))!important;color:var(--md-primary-dark)!important;}
.md-downloader-card,.md-panel,.md-page-card,.md-info-card,.md-stat-card,.md-premium-card,.md-auth-card,.md-support-host-card,.md-v3-flow,.md-metric,.md-mini-card,.card,.box{background:var(--md-surface)!important;border:1px solid var(--md-border)!important;color:var(--md-text)!important;box-shadow:var(--md-shadow)!important;}
.md-v3-flow{background:linear-gradient(145deg,var(--md-surface),var(--md-surface-2))!important;}
.md-v3-flow-grid article,.md-host,.md-process-item,.md-security-item,.md-support-limits div,.md-form-row input,.md-form-row textarea,.md-form-row select,.md-link-form textarea,.form-control,.md-support-toolbar input{background:var(--md-surface-2)!important;border-color:var(--md-border)!important;color:var(--md-text)!important;}
.md-link-form textarea::placeholder,.md-form-row input::placeholder,.md-form-row textarea::placeholder{color:color-mix(in srgb,var(--md-muted) 76%,transparent)!important;}
.md-card-head>i,.md-v3-flow-grid article i,.md-stat-card i,.md-process-num,.md-security-item i,.md-support-logo{background:color-mix(in srgb,var(--md-primary) 12%,var(--md-surface-2))!important;color:var(--md-primary-dark)!important;}
.md-v3-flow-grid article b{color:color-mix(in srgb,var(--md-muted) 58%,transparent)!important;}
.md-v3-flow-grid h3{color:var(--md-warning)!important;}
html[data-theme="dark"] .md-v3-flow-grid h3{color:#ffd166!important;}
.md-v3-status-strip>div{background:linear-gradient(135deg,#0b1022,#172554)!important;border-color:rgba(255,255,255,.12)!important;color:#fff!important;}
.md-v3-status-strip span{color:#aab8d6!important;}
.md-v3-status-strip strong{color:#fff!important;}
.md-v3-workspace{background:linear-gradient(135deg,#111936,#172554 58%,#312e81)!important;border-color:rgba(255,255,255,.16)!important;color:#fff!important;}
.md-v3-workspace h2,.md-v3-workspace strong{color:#fff!important;}
.md-v3-workspace p,.md-v3-workspace span,.md-v3-workspace small{color:#b9c5e7!important;}
.md-v3-cards>div{background:rgba(255,255,255,.08)!important;border-color:rgba(255,255,255,.13)!important;}
.md-premium-result-card{background:linear-gradient(145deg,#11143a,#0f1e3c 58%,#13344f)!important;color:#fff!important;border-color:rgba(255,255,255,.14)!important;overflow:hidden!important;}
.md-premium-result-card *{color:inherit;}
.md-premium-result-card .md-result-title,.md-premium-result-card h3,.md-premium-result-card strong{color:#fff!important;}
.md-premium-result-card .md-result-meta,.md-premium-result-card small{color:#b9c5e7!important;}
.md-premium-result-card .md-status-ready,.md-premium-result-card .md-result-status{color:#72f59e!important;}
.md-result-item{background:var(--md-surface-2)!important;color:var(--md-text)!important;border-color:var(--md-border)!important;}
.md-result-item.info{background:color-mix(in srgb,var(--md-primary) 9%,var(--md-surface))!important;border-color:color-mix(in srgb,var(--md-primary) 26%,var(--md-border))!important;}
.md-result-item.success{background:color-mix(in srgb,var(--md-ok) 11%,var(--md-surface))!important;border-color:color-mix(in srgb,var(--md-ok) 28%,var(--md-border))!important;}
.md-result-item.danger{background:color-mix(in srgb,#f04438 10%,var(--md-surface))!important;border-color:color-mix(in srgb,#f04438 30%,var(--md-border))!important;color:var(--md-text)!important;}
.md-live-activity{background:rgba(7,11,24,.94)!important;color:#fff!important;border:1px solid rgba(255,255,255,.12)!important;}
.md-live-activity *{color:inherit;}
.md-live-activity small,.md-live-activity span{color:#b9c5e7!important;}
.md-site-footer{background:#070b18!important;color:#d9e3ff!important;}
.md-site-footer h4,.md-site-footer strong{color:#fff!important;}
.md-site-footer a,.md-site-footer p,.md-footer-bottom{color:#9facd5!important;}
.md-host-live-card{background:var(--md-surface)!important;border-color:var(--md-border)!important;color:var(--md-text)!important;}
.md-host-live-card h3,.md-host-live-meta b,.md-live-health strong{color:var(--md-heading)!important;}
.md-host-live-meta span,.md-host-live-card>small,.md-live-health span,.md-host-summary-row small{color:var(--md-muted)!important;}
.md-page-hero{background:linear-gradient(135deg,#0d1328,#172554)!important;color:#fff!important;}
.md-page-hero .md-page-title{color:#fff!important;}
.md-page-hero .md-page-subtitle{color:#c4cce3!important;}
.md-feature-list li{color:var(--md-text)!important;}
.md-price,.md-plan-name{color:var(--md-heading)!important;}
.md-price span,.md-price small{color:var(--md-muted)!important;}
.md-support-host-card h3,.md-support-limits b{color:var(--md-heading)!important;}
.md-btn-primary{color:#fff!important;background:linear-gradient(135deg,#635bff,#37bdf8)!important;}
.md-btn-primary *{color:#fff!important;}
@media(max-width:980px){
  .md-nav-links,.md-nav-actions{background:color-mix(in srgb,var(--md-surface) 96%,transparent)!important;border:1px solid var(--md-border)!important;box-shadow:var(--md-shadow)!important;}
  .md-nav-links a{color:var(--md-text)!important;}
}


/* =========================================================
   V3 PLUS - final mode/readability polish
   ========================================================= */
.md-status{font-weight:850!important;border-radius:16px!important;padding:14px 16px!important;line-height:1.45!important;}
.md-status.success{background:#e8fff4!important;border:1px solid #9ff0ca!important;color:#065f46!important;}
.md-status.success b{color:#064e3b!important;}
.md-status.warning{background:#fff7df!important;border:1px solid #fde68a!important;color:#92400e!important;}
html[data-theme="dark"] .md-status.success{background:rgba(18,183,106,.14)!important;border-color:rgba(114,245,158,.42)!important;color:#b7ffd2!important;}
html[data-theme="dark"] .md-status.success b{color:#fff!important;}
html[data-theme="dark"] .md-status.warning{background:rgba(251,191,36,.13)!important;border-color:rgba(251,191,36,.38)!important;color:#ffe8a3!important;}
.md-link-form textarea{min-height:158px!important;font-weight:750!important;}
.md-hero{overflow:hidden!important;}
.md-hero-copy{position:relative;z-index:2!important;}
.md-downloader-card{position:relative;z-index:3!important;}
.md-hero h1{letter-spacing:-.075em!important;}
.md-v3-flow{margin-bottom:22px!important;}
.md-v3-flow-grid article{transition:.22s ease!important;}
.md-v3-flow-grid article:hover,.md-premium-card:hover,.md-support-host-card:hover{transform:translateY(-4px)!important;}
.md-v3-flow-grid h3{color:#f59e0b!important;}
html[data-theme="dark"] .md-v3-flow-grid article{background:linear-gradient(145deg,#111a31,#0f172a)!important;}
html[data-theme="dark"] .md-page-card,html[data-theme="dark"] .md-panel,html[data-theme="dark"] .md-premium-card{background:linear-gradient(145deg,#10182d,#0d1428)!important;}
.md-premium-card.featured{border-color:color-mix(in srgb,var(--md-primary) 42%,var(--md-border))!important;box-shadow:0 26px 80px color-mix(in srgb,var(--md-primary) 18%,transparent)!important;}
.md-plan-tag{background:linear-gradient(135deg,#635bff,#37bdf8)!important;color:#fff!important;border-radius:999px!important;padding:8px 11px!important;font-weight:950!important;}
.md-logo-btn{background:var(--md-surface-2)!important;border-color:var(--md-border)!important;}
.md-logo-btn:hover{transform:translateY(-3px)!important;border-color:var(--md-primary)!important;box-shadow:0 14px 34px color-mix(in srgb,var(--md-primary) 16%,transparent)!important;}
.fp-modal-content{background:var(--md-surface)!important;color:var(--md-text)!important;border:1px solid var(--md-border)!important;border-radius:26px!important;box-shadow:var(--md-shadow)!important;}
.fp-modal h3{color:var(--md-heading)!important;}.fp-modal p{color:var(--md-muted)!important;}.fp-input{background:var(--md-surface-2)!important;color:var(--md-text)!important;border-color:var(--md-border)!important;}
.md-v3-premium-hero{position:relative;overflow:hidden;margin-bottom:24px;padding:30px;border-radius:34px;background:linear-gradient(135deg,#0b1022,#172554 56%,#312e81);color:#fff;border:1px solid rgba(255,255,255,.12);box-shadow:0 30px 90px rgba(15,23,42,.24);}
.md-v3-premium-hero:before{content:"";position:absolute;right:-70px;top:-80px;width:260px;height:260px;border-radius:999px;background:rgba(55,213,255,.22);filter:blur(12px)}
.md-v3-premium-hero>*{position:relative}.md-v3-premium-hero h2{margin:10px 0 8px;color:#fff;font-size:clamp(28px,4vw,48px);letter-spacing:-.06em;line-height:1}.md-v3-premium-hero p{max-width:760px;color:#c9d5f2!important;font-weight:750;line-height:1.7}.md-v3-premium-row{display:flex;flex-wrap:wrap;gap:10px;margin-top:18px}.md-v3-premium-row span{display:inline-flex;align-items:center;gap:8px;padding:11px 14px;border-radius:999px;background:rgba(255,255,255,.09);border:1px solid rgba(255,255,255,.13);color:#fff;font-weight:900}.md-v3-premium-row i{color:#72f59e}.md-v3-premium-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:20px 0 24px}.md-v3-premium-feature{padding:20px;border-radius:24px;background:var(--md-surface);border:1px solid var(--md-border);box-shadow:var(--md-shadow)}.md-v3-premium-feature i{width:48px;height:48px;border-radius:16px;display:grid;place-items:center;background:color-mix(in srgb,var(--md-primary) 12%,var(--md-surface-2));color:var(--md-primary-dark);font-size:24px;margin-bottom:14px}.md-v3-premium-feature h3{margin:0 0 8px;color:var(--md-heading);font-size:20px}.md-v3-premium-feature p{margin:0;color:var(--md-muted);font-weight:750;line-height:1.6}.md-premium-card{position:relative;overflow:hidden;padding:24px!important;border-radius:30px!important}.md-premium-card:before{content:"";position:absolute;inset:0 0 auto 0;height:5px;background:linear-gradient(90deg,#635bff,#37bdf8,#72f59e)}.md-price{font-size:48px!important;letter-spacing:-.06em!important;margin:14px 0!important}.md-feature-list{display:grid!important;gap:10px!important;margin-top:18px!important}.md-feature-list li{background:color-mix(in srgb,var(--md-primary) 7%,var(--md-surface-2));border:1px solid var(--md-border);border-radius:16px;padding:11px 12px!important}.md-feature-list i{color:var(--md-ok)!important}.md-page-hero{padding:62px 0!important}.md-page-hero .md-eyebrow{background:rgba(255,255,255,.1)!important;color:#dfe7ff!important;border-color:rgba(255,255,255,.18)!important}.md-page-hero .md-page-title{letter-spacing:-.065em!important}.md-page-hero .md-page-subtitle{max-width:760px!important;}
.md-support-summary span{color:#fff!important}.md-support-summary b{color:#72f59e!important}.md-support-host-card,.md-page-card,.md-panel{transition:.22s ease!important}.md-dashboard-grid .md-page-card{border-radius:30px!important}.md-process-item strong,.md-security-item strong{color:var(--md-heading)!important}.md-process-num{font-weight:950!important}@media(max-width:980px){.md-v3-premium-grid{grid-template-columns:1fr}.md-hero h1{font-size:clamp(42px,12vw,78px)!important}.md-hero-grid{gap:26px!important}}

/* =========================================================
   V3 FINAL - public copy, host density and theme consistency
   ========================================================= */
.md-v3-flow-head p,
.md-v3-copy p,
.md-panel p,
.md-seo-section p,
.md-process-item span,
.md-v3-flow-grid p{
  color:var(--md-muted)!important;
  opacity:1!important;
}
.md-v3-flow-head h2,
.md-panel h2,
.md-seo-section h2,
.md-v3-copy h2{
  color:var(--md-heading)!important;
}
.md-v3-workspace .md-v3-copy h2,
.md-v3-workspace .md-v3-copy p,
.md-v3-workspace .md-eyebrow,
.md-v3-workspace .md-v3-cards *{
  color:#fff!important;
  opacity:1!important;
}
.md-v3-workspace .md-v3-cards span,
.md-v3-workspace .md-v3-cards small{color:#cbd5ff!important;}
.md-host-grid{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  max-height:360px!important;
  overflow:hidden!important;
}
.md-host{background:var(--md-surface-2)!important;border-color:var(--md-border)!important;}
.md-host span{color:var(--md-text)!important;opacity:1!important;font-weight:850!important;}
html[data-theme="dark"] .md-host{background:#152039!important;border-color:rgba(148,163,184,.25)!important;}
html[data-theme="dark"] .md-host span{color:#eaf0ff!important;}
.md-host-live-card h3,
.md-host-live-meta b,
.md-host-summary-row b{color:var(--md-heading)!important;opacity:1!important;}
.md-host-live-card small,
.md-host-live-meta span,
.md-host-summary-row span,
.md-host-summary-row small{color:var(--md-muted)!important;opacity:1!important;}
html[data-theme="dark"] .md-host-live-card h3,
html[data-theme="dark"] .md-host-live-meta b,
html[data-theme="dark"] .md-host-summary-row b{color:#f8fbff!important;}
html[data-theme="dark"] .md-host-live-card small,
html[data-theme="dark"] .md-host-live-meta span,
html[data-theme="dark"] .md-host-summary-row span,
html[data-theme="dark"] .md-host-summary-row small{color:#b7c4de!important;}
.md-v3-premium-hero,
html[data-theme="dark"] .md-v3-premium-hero{
  background:linear-gradient(135deg,#0b1022,#172554 56%,#312e81)!important;
  color:#fff!important;
}
.md-v3-premium-hero h2,
.md-v3-premium-hero p,
.md-v3-premium-hero span,
.md-v3-premium-hero .md-eyebrow{color:#fff!important;opacity:1!important;}
.md-v3-premium-hero p{color:#dbe6ff!important;}
.md-v3-premium-row span{background:rgba(255,255,255,.11)!important;border-color:rgba(255,255,255,.18)!important;color:#fff!important;}
.md-v3-premium-feature,
.md-premium-card,
.md-page-card,
.md-panel{background:var(--md-surface)!important;border-color:var(--md-border)!important;color:var(--md-text)!important;}
.md-v3-premium-feature h3,
.md-premium-card h3,
.md-plan-name,
.md-price,
.md-feature-list li span{color:var(--md-heading)!important;opacity:1!important;}
.md-v3-premium-feature p,
.md-price small{color:var(--md-muted)!important;opacity:1!important;}
html[data-theme="dark"] .md-v3-premium-feature,
html[data-theme="dark"] .md-premium-card,
html[data-theme="dark"] .md-page-card,
html[data-theme="dark"] .md-panel{background:linear-gradient(145deg,#10182d,#0d1428)!important;border-color:rgba(148,163,184,.22)!important;color:#dbe6ff!important;}
html[data-theme="dark"] .md-v3-premium-feature h3,
html[data-theme="dark"] .md-plan-name,
html[data-theme="dark"] .md-price,
html[data-theme="dark"] .md-feature-list li span{color:#f8fbff!important;}
html[data-theme="dark"] .md-v3-premium-feature p,
html[data-theme="dark"] .md-price small{color:#b7c4de!important;}
.md-feature-list li{background:color-mix(in srgb,var(--md-primary) 7%,var(--md-surface-2))!important;color:var(--md-text)!important;}
html[data-theme="dark"] .md-feature-list li{background:#152039!important;border-color:rgba(148,163,184,.2)!important;}
@media(max-width:760px){.md-host-grid{grid-template-columns:1fr!important;max-height:520px!important;}}

/* v3 final contrast cleanup - hosts + premium pricing */
html[data-theme="dark"] .md-panel .md-host,
html[data-theme="dark"] .md-host-grid .md-host{
    background:linear-gradient(145deg,#16213a,#111a31)!important;
    border-color:rgba(148,163,184,.28)!important;
    box-shadow:none!important;
}
html[data-theme="dark"] .md-panel .md-host span,
html[data-theme="dark"] .md-host-grid .md-host span{
    color:#e8eefc!important;
    opacity:1!important;
    font-weight:900!important;
}
html[data-theme="dark"] .md-panel .md-host img,
html[data-theme="dark"] .md-host-grid .md-host img{
    opacity:1!important;
    filter:none!important;
}
html[data-theme="dark"] .md-panel .md-link-more{
    color:#8da2ff!important;
}
html[data-theme="dark"] .md-panel .md-eyebrow{
    color:#c9c3ff!important;
    background:rgba(124,92,255,.16)!important;
    border-color:rgba(167,139,250,.42)!important;
}

/* Premium cards should stay readable in both modes */
.md-pricing-grid .md-premium-card{
    min-height:auto!important;
}
html[data-theme="dark"] .md-pricing-grid .md-premium-card{
    background:linear-gradient(145deg,#101827,#0b1120)!important;
    border-color:rgba(148,163,184,.22)!important;
    color:#f8fafc!important;
}
html[data-theme="dark"] .md-pricing-grid .md-premium-card.featured{
    background:linear-gradient(145deg,#28216f,#151f3a)!important;
    border-color:rgba(129,140,248,.55)!important;
}
html[data-theme="dark"] .md-pricing-grid .md-plan-name,
html[data-theme="dark"] .md-pricing-grid .md-price,
html[data-theme="dark"] .md-pricing-grid .md-price span,
html[data-theme="dark"] .md-pricing-grid .md-feature-list span{
    color:#ffffff!important;
    opacity:1!important;
}
html[data-theme="dark"] .md-pricing-grid .md-price small{
    color:#cbd5e1!important;
}
html[data-theme="dark"] .md-pricing-grid .md-plan-tag{
    background:rgba(99,102,241,.28)!important;
    color:#e0e7ff!important;
}
html[data-theme="dark"] .md-pricing-grid .md-feature-list li{
    background:rgba(30,41,59,.92)!important;
    border-color:rgba(148,163,184,.24)!important;
    color:#ffffff!important;
}
html[data-theme="dark"] .md-pricing-grid .md-logo-btn,
html[data-theme="dark"] .md-pricing-grid .md-logo-btn.card-wide{
    background:#ffffff!important;
    border-color:rgba(226,232,240,.95)!important;
    box-shadow:0 10px 26px rgba(0,0,0,.18)!important;
}
html[data-theme="dark"] .md-pricing-grid .md-logo-btn:hover,
html[data-theme="dark"] .md-pricing-grid .md-logo-btn.card-wide:hover{
    background:#f8fafc!important;
    border-color:#93c5fd!important;
}
html[data-theme="dark"] .md-pricing-grid .md-logo-btn img{
    opacity:1!important;
    filter:none!important;
}
html[data-theme="dark"] .md-v3-premium-feature{
    background:linear-gradient(145deg,#101827,#0b1120)!important;
    border-color:rgba(148,163,184,.22)!important;
}
html[data-theme="dark"] .md-v3-premium-feature h3{color:#fff!important;}
html[data-theme="dark"] .md-v3-premium-feature p{color:#cbd5e1!important;}

/* Light mode guards */
html:not([data-theme="dark"]) .md-panel .md-host span,
html:not([data-theme="dark"]) .md-host-grid .md-host span{
    color:#1e293b!important;
    opacity:1!important;
    font-weight:900!important;
}
html:not([data-theme="dark"]) .md-pricing-grid .md-feature-list span,
html:not([data-theme="dark"]) .md-pricing-grid .md-plan-name,
html:not([data-theme="dark"]) .md-pricing-grid .md-price{
    color:#0f172a!important;
    opacity:1!important;
}

/* Premium page final repair - 2026-07-02 */
.md-page-section,
.md-container,
.md-v3-premium-hero,
.md-pricing-grid,
.md-premium-card{box-sizing:border-box!important;}
.md-v3-premium-hero{max-width:100%!important;overflow:hidden!important;padding:28px!important;}
.md-v3-premium-hero h2{max-width:920px!important;font-size:clamp(32px,4.2vw,56px)!important;line-height:1.04!important;letter-spacing:-.055em!important;white-space:normal!important;overflow-wrap:break-word!important;}
.md-v3-premium-hero p{max-width:920px!important;}
.md-v3-premium-row{max-width:100%!important;overflow:hidden!important;}
.md-v3-premium-row span{white-space:normal!important;}

/* Pricing cards: readable in light mode, including the highlighted middle card */
html:not([data-theme="dark"]) .md-pricing-grid .md-premium-card{background:#ffffff!important;border-color:#dbe4f3!important;color:#0f172a!important;box-shadow:0 24px 70px rgba(15,23,42,.10)!important;}
html:not([data-theme="dark"]) .md-pricing-grid .md-premium-card.featured{background:linear-gradient(145deg,#171d42,#2f2a7d)!important;border-color:rgba(99,102,241,.45)!important;color:#ffffff!important;box-shadow:0 28px 80px rgba(79,70,229,.22)!important;}
html:not([data-theme="dark"]) .md-pricing-grid .md-premium-card.featured .md-plan-name,
html:not([data-theme="dark"]) .md-pricing-grid .md-premium-card.featured .md-price,
html:not([data-theme="dark"]) .md-pricing-grid .md-premium-card.featured .md-price span{color:#ffffff!important;opacity:1!important;text-shadow:none!important;}
html:not([data-theme="dark"]) .md-pricing-grid .md-premium-card.featured .md-price small{color:#dbeafe!important;opacity:1!important;}
html:not([data-theme="dark"]) .md-pricing-grid .md-premium-card.featured .md-plan-tag{background:linear-gradient(135deg,#6675ff,#39bdf8)!important;color:#fff!important;}
html:not([data-theme="dark"]) .md-pricing-grid .md-premium-card.featured .md-feature-list li{background:rgba(255,255,255,.12)!important;border-color:rgba(255,255,255,.20)!important;color:#ffffff!important;}
html:not([data-theme="dark"]) .md-pricing-grid .md-premium-card.featured .md-feature-list span{color:#ffffff!important;opacity:1!important;}
html:not([data-theme="dark"]) .md-pricing-grid .md-premium-card.featured .md-logo-btn,
html:not([data-theme="dark"]) .md-pricing-grid .md-premium-card.featured .md-logo-btn.card-wide{background:#ffffff!important;border-color:#e2e8f0!important;}
html:not([data-theme="dark"]) .md-pricing-grid .md-premium-card.featured .md-logo-btn img{opacity:1!important;filter:none!important;}

/* Dark mode pricing cleanup */
html[data-theme="dark"] .md-pricing-grid .md-premium-card{background:linear-gradient(145deg,#101827,#0b1120)!important;border-color:rgba(148,163,184,.24)!important;color:#f8fafc!important;}
html[data-theme="dark"] .md-pricing-grid .md-premium-card.featured{background:linear-gradient(145deg,#201b5f,#151f3a)!important;border-color:rgba(129,140,248,.55)!important;}
html[data-theme="dark"] .md-pricing-grid .md-premium-card .md-plan-name,
html[data-theme="dark"] .md-pricing-grid .md-premium-card .md-price,
html[data-theme="dark"] .md-pricing-grid .md-premium-card .md-price span,
html[data-theme="dark"] .md-pricing-grid .md-premium-card .md-feature-list span{color:#ffffff!important;opacity:1!important;}
html[data-theme="dark"] .md-pricing-grid .md-premium-card .md-price small{color:#cbd5e1!important;opacity:1!important;}
html[data-theme="dark"] .md-pricing-grid .md-premium-card .md-feature-list li{background:rgba(30,41,59,.92)!important;border-color:rgba(148,163,184,.26)!important;}
html[data-theme="dark"] .md-pricing-grid .md-premium-card .md-logo-btn,
html[data-theme="dark"] .md-pricing-grid .md-premium-card .md-logo-btn.card-wide{background:#ffffff!important;border-color:#e2e8f0!important;}
html[data-theme="dark"] .md-pricing-grid .md-premium-card .md-logo-btn img{opacity:1!important;filter:none!important;}

@media(max-width:900px){.md-v3-premium-hero{padding:22px!important;border-radius:26px!important}.md-v3-premium-hero h2{font-size:clamp(30px,9vw,46px)!important}.md-pricing-grid{grid-template-columns:1fr!important}.md-premium-card.featured{transform:none!important}}

/* Premium page daylight repair - clean readable cards and no clipped hero */
html:not([data-theme="dark"]) body.md-site .md-page-section,
html[data-theme="light"] body.md-site .md-page-section{
  overflow-x:hidden!important;
}
html:not([data-theme="dark"]) .md-v3-premium-hero,
html[data-theme="light"] .md-v3-premium-hero{
  background:linear-gradient(135deg,#ffffff 0%,#f4f7ff 56%,#eef7ff 100%)!important;
  color:#0f172a!important;
  border:1px solid #dbe4f3!important;
  box-shadow:0 22px 70px rgba(15,23,42,.10)!important;
  max-width:100%!important;
  width:100%!important;
  margin-left:0!important;
  margin-right:0!important;
  padding:30px!important;
}
html:not([data-theme="dark"]) .md-v3-premium-hero:before,
html[data-theme="light"] .md-v3-premium-hero:before{
  background:rgba(99,102,241,.16)!important;
}
html:not([data-theme="dark"]) .md-v3-premium-hero .md-eyebrow,
html[data-theme="light"] .md-v3-premium-hero .md-eyebrow{
  background:#eef2ff!important;
  color:#4f46e5!important;
  border-color:#c7d2fe!important;
}
html:not([data-theme="dark"]) .md-v3-premium-hero h2,
html[data-theme="light"] .md-v3-premium-hero h2{
  color:#0f172a!important;
  font-size:clamp(32px,4vw,52px)!important;
  line-height:1.06!important;
  max-width:820px!important;
  overflow:visible!important;
}
html:not([data-theme="dark"]) .md-v3-premium-hero p,
html[data-theme="light"] .md-v3-premium-hero p{
  color:#475569!important;
  max-width:780px!important;
}
html:not([data-theme="dark"]) .md-v3-premium-row span,
html[data-theme="light"] .md-v3-premium-row span{
  background:#ffffff!important;
  border-color:#dbe4f3!important;
  color:#334155!important;
  box-shadow:0 8px 22px rgba(15,23,42,.06)!important;
}
html:not([data-theme="dark"]) .md-v3-premium-row i,
html[data-theme="light"] .md-v3-premium-row i{
  color:#10b981!important;
}

/* Light mode pricing cards: all plans stay bright, including the middle plan */
html:not([data-theme="dark"]) .md-pricing-grid .md-premium-card,
html:not([data-theme="dark"]) .md-pricing-grid .md-premium-card.featured,
html[data-theme="light"] .md-pricing-grid .md-premium-card,
html[data-theme="light"] .md-pricing-grid .md-premium-card.featured{
  background:#ffffff!important;
  color:#0f172a!important;
  border:1px solid #dbe4f3!important;
  box-shadow:0 22px 60px rgba(15,23,42,.10)!important;
  transform:none!important;
}
html:not([data-theme="dark"]) .md-pricing-grid .md-premium-card.featured,
html[data-theme="light"] .md-pricing-grid .md-premium-card.featured{
  border-color:#8b8cff!important;
  box-shadow:0 28px 78px rgba(99,102,241,.18)!important;
}
html:not([data-theme="dark"]) .md-pricing-grid .md-premium-card.featured:after,
html[data-theme="light"] .md-pricing-grid .md-premium-card.featured:after{
  opacity:.08!important;
}
html:not([data-theme="dark"]) .md-pricing-grid .md-premium-card .md-plan-name,
html:not([data-theme="dark"]) .md-pricing-grid .md-premium-card.featured .md-plan-name,
html:not([data-theme="dark"]) .md-pricing-grid .md-premium-card .md-price,
html:not([data-theme="dark"]) .md-pricing-grid .md-premium-card.featured .md-price,
html:not([data-theme="dark"]) .md-pricing-grid .md-premium-card .md-price span,
html:not([data-theme="dark"]) .md-pricing-grid .md-premium-card.featured .md-price span,
html[data-theme="light"] .md-pricing-grid .md-premium-card .md-plan-name,
html[data-theme="light"] .md-pricing-grid .md-premium-card.featured .md-plan-name,
html[data-theme="light"] .md-pricing-grid .md-premium-card .md-price,
html[data-theme="light"] .md-pricing-grid .md-premium-card.featured .md-price,
html[data-theme="light"] .md-pricing-grid .md-premium-card .md-price span,
html[data-theme="light"] .md-pricing-grid .md-premium-card.featured .md-price span{
  color:#0f172a!important;
  opacity:1!important;
  text-shadow:none!important;
}
html:not([data-theme="dark"]) .md-pricing-grid .md-premium-card .md-price small,
html:not([data-theme="dark"]) .md-pricing-grid .md-premium-card.featured .md-price small,
html[data-theme="light"] .md-pricing-grid .md-premium-card .md-price small,
html[data-theme="light"] .md-pricing-grid .md-premium-card.featured .md-price small{
  color:#64748b!important;
  opacity:1!important;
}
html:not([data-theme="dark"]) .md-pricing-grid .md-premium-card .md-feature-list li,
html:not([data-theme="dark"]) .md-pricing-grid .md-premium-card.featured .md-feature-list li,
html[data-theme="light"] .md-pricing-grid .md-premium-card .md-feature-list li,
html[data-theme="light"] .md-pricing-grid .md-premium-card.featured .md-feature-list li{
  background:#f3f6ff!important;
  border:1px solid #dbe4f3!important;
  color:#0f172a!important;
}
html:not([data-theme="dark"]) .md-pricing-grid .md-premium-card .md-feature-list span,
html:not([data-theme="dark"]) .md-pricing-grid .md-premium-card.featured .md-feature-list span,
html[data-theme="light"] .md-pricing-grid .md-premium-card .md-feature-list span,
html[data-theme="light"] .md-pricing-grid .md-premium-card.featured .md-feature-list span{
  color:#0f172a!important;
  opacity:1!important;
}
html:not([data-theme="dark"]) .md-pricing-grid .md-logo-btn,
html:not([data-theme="dark"]) .md-pricing-grid .md-logo-btn.card-wide,
html[data-theme="light"] .md-pricing-grid .md-logo-btn,
html[data-theme="light"] .md-pricing-grid .md-logo-btn.card-wide{
  background:#f8fbff!important;
  border-color:#d7e2f3!important;
}
html:not([data-theme="dark"]) .md-pricing-grid .md-logo-btn img,
html[data-theme="light"] .md-pricing-grid .md-logo-btn img{
  opacity:1!important;
  filter:none!important;
}
@media(max-width:1200px){
  .md-pricing-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
}
@media(max-width:760px){
  .md-pricing-grid{grid-template-columns:1fr!important;}
  html:not([data-theme="dark"]) .md-v3-premium-hero h2,
  html[data-theme="light"] .md-v3-premium-hero h2{font-size:clamp(30px,9vw,42px)!important;}
}

/* === FINAL PREMIUM PAGE STABILITY FIX - 2026-07-02 ===
   Premium.php light/dark contrast and layout lock. Keep this at the very end. */
html, body.md-site{max-width:100%;overflow-x:hidden!important;}
body.md-site .md-container{box-sizing:border-box;max-width:1180px!important;width:calc(100% - 34px)!important;margin-left:auto!important;margin-right:auto!important;}
body.md-site .md-page-section{overflow:hidden!important;}

/* Premium hero: never crop the title in light or dark mode */
body.md-site .md-v3-premium-hero{
  box-sizing:border-box!important;
  width:100%!important;
  max-width:100%!important;
  overflow:hidden!important;
  padding:32px!important;
  border-radius:30px!important;
}
body.md-site .md-v3-premium-hero h2{
  display:block!important;
  max-width:760px!important;
  white-space:normal!important;
  word-break:normal!important;
  overflow-wrap:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
  font-size:clamp(30px,3.6vw,48px)!important;
  line-height:1.08!important;
  letter-spacing:-.055em!important;
}
body.md-site .md-v3-premium-hero p{max-width:760px!important;white-space:normal!important;}
body.md-site .md-v3-premium-row{display:flex!important;flex-wrap:wrap!important;max-width:100%!important;}
body.md-site .md-v3-premium-row span{white-space:nowrap!important;}

/* Light mode premium hero */
html:not([data-theme="dark"]) body.md-site .md-v3-premium-hero,
html[data-theme="light"] body.md-site .md-v3-premium-hero{
  background:linear-gradient(135deg,#ffffff 0%,#f7faff 58%,#edf5ff 100%)!important;
  border:1px solid #dbe4f3!important;
  box-shadow:0 24px 70px rgba(15,23,42,.10)!important;
  color:#0f172a!important;
}
html:not([data-theme="dark"]) body.md-site .md-v3-premium-hero h2,
html[data-theme="light"] body.md-site .md-v3-premium-hero h2{color:#0f172a!important;text-shadow:none!important;}
html:not([data-theme="dark"]) body.md-site .md-v3-premium-hero p,
html[data-theme="light"] body.md-site .md-v3-premium-hero p{color:#475569!important;text-shadow:none!important;}
html:not([data-theme="dark"]) body.md-site .md-v3-premium-hero .md-eyebrow,
html[data-theme="light"] body.md-site .md-v3-premium-hero .md-eyebrow{background:#eef2ff!important;color:#4f46e5!important;border-color:#c7d2fe!important;}
html:not([data-theme="dark"]) body.md-site .md-v3-premium-row span,
html[data-theme="light"] body.md-site .md-v3-premium-row span{background:#fff!important;border-color:#dbe4f3!important;color:#334155!important;}

/* Dark mode premium hero */
html[data-theme="dark"] body.md-site .md-v3-premium-hero{
  background:linear-gradient(135deg,#0b1022 0%,#14203a 58%,#231f66 100%)!important;
  border:1px solid rgba(255,255,255,.14)!important;
  color:#fff!important;
}
html[data-theme="dark"] body.md-site .md-v3-premium-hero h2,
html[data-theme="dark"] body.md-site .md-v3-premium-hero p,
html[data-theme="dark"] body.md-site .md-v3-premium-row span{color:#fff!important;opacity:1!important;}
html[data-theme="dark"] body.md-site .md-v3-premium-hero p{color:#dbe6ff!important;}

/* Pricing grid: stable columns without horizontal overflow */
body.md-site .md-pricing-grid{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:18px!important;
  align-items:stretch!important;
  max-width:100%!important;
  overflow:visible!important;
}
body.md-site .md-pricing-grid .md-premium-card{
  box-sizing:border-box!important;
  min-width:0!important;
  width:100%!important;
  transform:none!important;
  isolation:isolate!important;
}
body.md-site .md-pricing-grid .md-premium-card::after{pointer-events:none!important;}
body.md-site .md-pricing-grid .md-plan-name,
body.md-site .md-pricing-grid .md-price,
body.md-site .md-pricing-grid .md-price span,
body.md-site .md-pricing-grid .md-feature-list span{position:relative!important;z-index:2!important;opacity:1!important;text-shadow:none!important;}
body.md-site .md-payment-gateways-grid{position:relative!important;z-index:2!important;}
body.md-site .md-logo-btn{background:#ffffff!important;border:1px solid #d7e2f3!important;box-shadow:none!important;}
body.md-site .md-logo-btn img{opacity:1!important;filter:none!important;mix-blend-mode:normal!important;}

/* Light mode pricing cards: every package, including Popular, stays readable */
html:not([data-theme="dark"]) body.md-site .md-pricing-grid .md-premium-card,
html:not([data-theme="dark"]) body.md-site .md-pricing-grid .md-premium-card.featured,
html[data-theme="light"] body.md-site .md-pricing-grid .md-premium-card,
html[data-theme="light"] body.md-site .md-pricing-grid .md-premium-card.featured{
  background:#ffffff!important;
  background-image:none!important;
  color:#0f172a!important;
  border:1px solid #dbe4f3!important;
  box-shadow:0 22px 60px rgba(15,23,42,.10)!important;
}
html:not([data-theme="dark"]) body.md-site .md-pricing-grid .md-premium-card::after,
html:not([data-theme="dark"]) body.md-site .md-pricing-grid .md-premium-card.featured::after,
html[data-theme="light"] body.md-site .md-pricing-grid .md-premium-card::after,
html[data-theme="light"] body.md-site .md-pricing-grid .md-premium-card.featured::after{display:none!important;content:none!important;}
html:not([data-theme="dark"]) body.md-site .md-pricing-grid .md-plan-name,
html:not([data-theme="dark"]) body.md-site .md-pricing-grid .md-price,
html:not([data-theme="dark"]) body.md-site .md-pricing-grid .md-price span,
html:not([data-theme="dark"]) body.md-site .md-pricing-grid .md-feature-list span,
html[data-theme="light"] body.md-site .md-pricing-grid .md-plan-name,
html[data-theme="light"] body.md-site .md-pricing-grid .md-price,
html[data-theme="light"] body.md-site .md-pricing-grid .md-price span,
html[data-theme="light"] body.md-site .md-pricing-grid .md-feature-list span{color:#0f172a!important;}
html:not([data-theme="dark"]) body.md-site .md-pricing-grid .md-price small,
html[data-theme="light"] body.md-site .md-pricing-grid .md-price small{color:#64748b!important;}
html:not([data-theme="dark"]) body.md-site .md-pricing-grid .md-feature-list li,
html[data-theme="light"] body.md-site .md-pricing-grid .md-feature-list li{background:#f3f6ff!important;border-color:#dbe4f3!important;color:#0f172a!important;}

/* Dark mode pricing cards */
html[data-theme="dark"] body.md-site .md-pricing-grid .md-premium-card,
html[data-theme="dark"] body.md-site .md-pricing-grid .md-premium-card.featured{
  background:linear-gradient(145deg,#101827,#0b1120)!important;
  color:#f8fafc!important;
  border:1px solid rgba(148,163,184,.24)!important;
  box-shadow:0 24px 70px rgba(0,0,0,.34)!important;
}
html[data-theme="dark"] body.md-site .md-pricing-grid .md-premium-card.featured{background:linear-gradient(145deg,#171b42,#241f69)!important;border-color:rgba(129,140,248,.50)!important;}
html[data-theme="dark"] body.md-site .md-pricing-grid .md-plan-name,
html[data-theme="dark"] body.md-site .md-pricing-grid .md-price,
html[data-theme="dark"] body.md-site .md-pricing-grid .md-price span,
html[data-theme="dark"] body.md-site .md-pricing-grid .md-feature-list span{color:#ffffff!important;}
html[data-theme="dark"] body.md-site .md-pricing-grid .md-price small{color:#cbd5e1!important;}
html[data-theme="dark"] body.md-site .md-pricing-grid .md-feature-list li{background:rgba(30,41,59,.94)!important;border-color:rgba(148,163,184,.24)!important;color:#ffffff!important;}
html[data-theme="dark"] body.md-site .md-pricing-grid .md-logo-btn,
html[data-theme="dark"] body.md-site .md-pricing-grid .md-logo-btn.card-wide{background:#ffffff!important;border-color:#dbe4f3!important;}

@media(max-width:1100px){body.md-site .md-pricing-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}}
@media(max-width:740px){body.md-site .md-pricing-grid{grid-template-columns:1fr!important;}body.md-site .md-v3-premium-hero{padding:22px!important;border-radius:24px!important;}body.md-site .md-v3-premium-hero h2{font-size:clamp(30px,10vw,42px)!important;}body.md-site .md-v3-premium-row span{white-space:normal!important;}}


/* =========================================================
   MOBILE NAV REPAIR - clean single dropdown panel
   ========================================================= */
.md-nav-panel{display:flex;align-items:center;gap:10px;margin-left:auto;}
.md-nav-panel .md-nav-links{margin-left:0;}
@media(max-width:980px){
  .md-nav-container{position:relative!important;}
  .md-nav-panel{
    display:none!important;
    position:fixed!important;
    left:14px!important;
    right:14px!important;
    top:74px!important;
    z-index:9999!important;
    flex-direction:column!important;
    align-items:stretch!important;
    gap:14px!important;
    padding:18px!important;
    border-radius:28px!important;
    background:color-mix(in srgb,var(--md-surface) 97%,transparent)!important;
    border:1px solid var(--md-border)!important;
    box-shadow:0 28px 90px rgba(15,23,42,.24)!important;
    max-height:calc(100vh - 92px)!important;
    overflow:auto!important;
    backdrop-filter:blur(18px)!important;
  }
  html[data-theme="dark"] .md-nav-panel{box-shadow:0 32px 100px rgba(0,0,0,.55)!important;}
  .md-nav-panel.open{display:flex!important;}
  .md-nav-panel .md-nav-links,
  .md-nav-panel .md-nav-actions{
    display:flex!important;
    position:static!important;
    inset:auto!important;
    top:auto!important;
    left:auto!important;
    right:auto!important;
    margin:0!important;
    padding:0!important;
    width:100%!important;
    flex-direction:column!important;
    align-items:stretch!important;
    gap:8px!important;
    background:transparent!important;
    border:0!important;
    box-shadow:none!important;
  }
  .md-nav-panel .md-nav-links a{
    display:flex!important;
    align-items:center!important;
    min-height:46px!important;
    padding:12px 16px!important;
    border-radius:18px!important;
    color:var(--md-heading)!important;
    background:transparent!important;
  }
  .md-nav-panel .md-nav-links a.active,
  .md-nav-panel .md-nav-links a:hover{background:var(--md-soft)!important;color:var(--md-primary-dark)!important;}
  .md-nav-panel .md-nav-actions{border-top:1px solid var(--md-border)!important;padding-top:14px!important;}
  .md-nav-panel .md-theme-toggle{width:46px!important;height:46px!important;align-self:flex-start!important;}
  .md-nav-panel .md-user-pill{width:100%!important;justify-content:flex-start!important;background:var(--md-soft)!important;color:var(--md-heading)!important;}
  .md-nav-panel .md-user-pill strong{color:var(--md-heading)!important;}
  .md-nav-panel .md-btn{width:100%!important;min-height:46px!important;}
  .md-menu-toggle.is-open i:before{content:"\ec8d";}
}
@media(max-width:480px){
  .md-brand img{max-width:160px!important;height:auto!important;}
  .md-nav-panel{left:10px!important;right:10px!important;top:70px!important;border-radius:24px!important;}
}

/* =========================================================
   FINAL NAVIGATION REPAIR
   Desktop: single horizontal row. Mobile/tablet: one clean drawer.
   ========================================================= */
body.md-site .md-navbar{min-height:72px!important;}
body.md-site .md-nav-container{
  display:flex!important;
  align-items:center!important;
  flex-wrap:nowrap!important;
  gap:18px!important;
  min-height:58px!important;
}
body.md-site .md-brand{
  flex:0 0 auto!important;
  min-width:150px!important;
}
body.md-site .md-nav-panel{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  flex:1 1 auto!important;
  min-width:0!important;
  gap:10px!important;
  margin-left:auto!important;
}
body.md-site .md-nav-panel .md-nav-links{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  flex:0 1 auto!important;
  min-width:0!important;
  flex-wrap:nowrap!important;
  gap:4px!important;
  margin-left:0!important;
  white-space:nowrap!important;
}
body.md-site .md-nav-panel .md-nav-links a{
  white-space:nowrap!important;
  flex:0 0 auto!important;
}
body.md-site .md-nav-panel .md-nav-actions{
  display:flex!important;
  align-items:center!important;
  flex:0 0 auto!important;
  flex-wrap:nowrap!important;
  gap:10px!important;
}
body.md-site .md-menu-toggle{display:none!important;}

@media (max-width:1180px){
  body.md-site .md-navbar{min-height:70px!important;}
  body.md-site .md-nav-container{position:relative!important;min-height:56px!important;}
  body.md-site .md-brand{min-width:0!important;}
  body.md-site .md-brand img{max-height:38px!important;max-width:170px!important;}
  body.md-site .md-menu-toggle{
    display:inline-grid!important;
    place-items:center!important;
    margin-left:auto!important;
    position:relative!important;
    z-index:10001!important;
  }
  body.md-site .md-nav-panel{
    display:none!important;
    position:fixed!important;
    left:14px!important;
    right:14px!important;
    top:76px!important;
    z-index:10000!important;
    flex-direction:column!important;
    align-items:stretch!important;
    justify-content:flex-start!important;
    gap:14px!important;
    margin:0!important;
    padding:18px!important;
    max-height:calc(100vh - 94px)!important;
    overflow:auto!important;
    border-radius:26px!important;
    background:#ffffff!important;
    border:1px solid #dbe4f3!important;
    box-shadow:0 28px 90px rgba(15,23,42,.22)!important;
    backdrop-filter:blur(18px)!important;
  }
  html[data-theme="dark"] body.md-site .md-nav-panel{
    background:#0f172a!important;
    border-color:rgba(148,163,184,.24)!important;
    box-shadow:0 34px 100px rgba(0,0,0,.58)!important;
  }
  body.md-site .md-nav-panel.open{display:flex!important;}
  body.md-site .md-nav-panel .md-nav-links,
  body.md-site .md-nav-panel .md-nav-actions{
    display:flex!important;
    position:static!important;
    inset:auto!important;
    width:100%!important;
    flex-direction:column!important;
    align-items:stretch!important;
    justify-content:flex-start!important;
    gap:8px!important;
    margin:0!important;
    padding:0!important;
    background:transparent!important;
    border:0!important;
    box-shadow:none!important;
  }
  body.md-site .md-nav-panel .md-nav-links a{
    display:flex!important;
    align-items:center!important;
    min-height:46px!important;
    padding:12px 16px!important;
    border-radius:18px!important;
    color:#0f172a!important;
    background:transparent!important;
    font-size:15px!important;
  }
  html[data-theme="dark"] body.md-site .md-nav-panel .md-nav-links a{color:#f8fafc!important;}
  body.md-site .md-nav-panel .md-nav-links a.active,
  body.md-site .md-nav-panel .md-nav-links a:hover{
    background:#eef2ff!important;
    color:#4f46e5!important;
  }
  html[data-theme="dark"] body.md-site .md-nav-panel .md-nav-links a.active,
  html[data-theme="dark"] body.md-site .md-nav-panel .md-nav-links a:hover{
    background:rgba(129,140,248,.18)!important;
    color:#c4b5fd!important;
  }
  body.md-site .md-nav-panel .md-nav-actions{
    border-top:1px solid #dbe4f3!important;
    padding-top:14px!important;
  }
  html[data-theme="dark"] body.md-site .md-nav-panel .md-nav-actions{border-top-color:rgba(148,163,184,.24)!important;}
  body.md-site .md-nav-panel .md-theme-toggle{width:46px!important;height:46px!important;align-self:flex-start!important;}
  body.md-site .md-nav-panel .md-user-pill{
    width:100%!important;
    justify-content:flex-start!important;
    background:#f3f6ff!important;
    color:#0f172a!important;
  }
  html[data-theme="dark"] body.md-site .md-nav-panel .md-user-pill{background:rgba(30,41,59,.9)!important;color:#fff!important;}
  body.md-site .md-nav-panel .md-user-pill strong{color:inherit!important;}
  body.md-site .md-nav-panel .md-btn{width:100%!important;min-height:46px!important;}
}
@media (max-width:480px){
  body.md-site .md-brand img{max-width:150px!important;}
  body.md-site .md-nav-panel{left:10px!important;right:10px!important;top:72px!important;border-radius:22px!important;}
}

/* =========================================================
   NAV FINAL FIX 2 - stop desktop wrapping + working mobile panel
   ========================================================= */
body.md-site .md-nav-container{
  display:flex!important;
  align-items:center!important;
  flex-wrap:nowrap!important;
}
body.md-site .md-nav-panel{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  flex:1 1 auto!important;
  min-width:0!important;
  flex-wrap:nowrap!important;
  gap:10px!important;
  margin-left:auto!important;
}
body.md-site .md-nav-panel .md-nav-links,
body.md-site .md-nav-panel .md-nav-actions{
  display:flex!important;
  align-items:center!important;
  flex-direction:row!important;
  flex-wrap:nowrap!important;
  position:static!important;
  inset:auto!important;
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
  width:auto!important;
  padding:0!important;
  margin:0!important;
}
body.md-site .md-nav-panel .md-nav-links{gap:4px!important;flex:0 1 auto!important;min-width:0!important;}
body.md-site .md-nav-panel .md-nav-actions{gap:8px!important;flex:0 0 auto!important;}
body.md-site .md-nav-panel .md-nav-links a{white-space:nowrap!important;padding:10px 11px!important;font-size:14px!important;}
body.md-site .md-menu-toggle{display:none!important;}
body.md-site .md-user-pill{max-width:185px!important;}
body.md-site .md-user-pill small{display:none!important;}

@media (max-width:1280px){
  body.md-site .md-brand{min-width:0!important;}
  body.md-site .md-brand img{max-height:38px!important;max-width:170px!important;}
  body.md-site .md-menu-toggle{
    display:inline-grid!important;
    place-items:center!important;
    margin-left:auto!important;
    position:relative!important;
    z-index:10001!important;
  }
  body.md-site .md-nav-panel{
    display:none!important;
    position:fixed!important;
    left:14px!important;
    right:14px!important;
    top:76px!important;
    z-index:10000!important;
    flex-direction:column!important;
    align-items:stretch!important;
    justify-content:flex-start!important;
    gap:14px!important;
    margin:0!important;
    padding:18px!important;
    max-height:calc(100vh - 94px)!important;
    overflow:auto!important;
    border-radius:26px!important;
    background:#ffffff!important;
    border:1px solid #dbe4f3!important;
    box-shadow:0 28px 90px rgba(15,23,42,.22)!important;
    backdrop-filter:blur(18px)!important;
  }
  html[data-theme="dark"] body.md-site .md-nav-panel{
    background:#0f172a!important;
    border-color:rgba(148,163,184,.24)!important;
    box-shadow:0 34px 100px rgba(0,0,0,.58)!important;
  }
  body.md-site .md-nav-panel.open{display:flex!important;}
  body.md-site .md-nav-panel .md-nav-links,
  body.md-site .md-nav-panel .md-nav-actions{
    display:flex!important;
    position:static!important;
    inset:auto!important;
    width:100%!important;
    flex-direction:column!important;
    align-items:stretch!important;
    justify-content:flex-start!important;
    gap:8px!important;
    margin:0!important;
    padding:0!important;
    background:transparent!important;
    border:0!important;
    box-shadow:none!important;
  }
  body.md-site .md-nav-panel .md-nav-links a{
    display:flex!important;
    align-items:center!important;
    min-height:46px!important;
    padding:12px 16px!important;
    border-radius:18px!important;
    color:#0f172a!important;
    background:transparent!important;
    font-size:15px!important;
  }
  html[data-theme="dark"] body.md-site .md-nav-panel .md-nav-links a{color:#f8fafc!important;}
  body.md-site .md-nav-panel .md-nav-links a.active,
  body.md-site .md-nav-panel .md-nav-links a:hover{background:#eef2ff!important;color:#4f46e5!important;}
  html[data-theme="dark"] body.md-site .md-nav-panel .md-nav-links a.active,
  html[data-theme="dark"] body.md-site .md-nav-panel .md-nav-links a:hover{background:rgba(129,140,248,.18)!important;color:#c4b5fd!important;}
  body.md-site .md-nav-panel .md-nav-actions{border-top:1px solid #dbe4f3!important;padding-top:14px!important;}
  html[data-theme="dark"] body.md-site .md-nav-panel .md-nav-actions{border-top-color:rgba(148,163,184,.24)!important;}
  body.md-site .md-nav-panel .md-theme-toggle{width:46px!important;height:46px!important;align-self:flex-start!important;}
  body.md-site .md-nav-panel .md-user-pill{width:100%!important;max-width:none!important;justify-content:flex-start!important;background:#f3f6ff!important;color:#0f172a!important;}
  html[data-theme="dark"] body.md-site .md-nav-panel .md-user-pill{background:rgba(30,41,59,.9)!important;color:#fff!important;}
  body.md-site .md-nav-panel .md-user-pill strong{color:inherit!important;}
  body.md-site .md-nav-panel .md-btn{width:100%!important;min-height:46px!important;}
}
@media (max-width:480px){
  body.md-site .md-brand img{max-width:150px!important;}
  body.md-site .md-nav-panel{left:10px!important;right:10px!important;top:72px!important;border-radius:22px!important;}
}

/* =========================================================
   MOBILE FIT FIX - auth/contact/menu/card overflow repair
   ========================================================= */
html, body{
  max-width:100%!important;
  overflow-x:hidden!important;
}
*, *::before, *::after{box-sizing:border-box!important;}
img, video, iframe{max-width:100%;}

@media (max-width:640px){
  body.md-site .md-container,
  body.md-site .container,
  body.md-site .container-fluid{
    width:100%!important;
    max-width:100%!important;
    padding-left:14px!important;
    padding-right:14px!important;
    margin-left:auto!important;
    margin-right:auto!important;
  }

  body.md-site .md-page-section{
    padding:22px 0!important;
    overflow:hidden!important;
  }

  body.md-site .md-page-hero{
    padding:42px 0 28px!important;
    overflow:hidden!important;
  }

  body.md-site .md-page-title,
  body.md-site .md-auth-card h1,
  body.md-site .md-auth-showcase h1,
  body.md-site .md-hero h1{
    font-size:clamp(34px, 11vw, 46px)!important;
    line-height:1.02!important;
    letter-spacing:-.05em!important;
    overflow-wrap:anywhere!important;
  }

  body.md-site .md-page-subtitle,
  body.md-site .md-auth-card p,
  body.md-site .md-auth-showcase p,
  body.md-site .md-hero p{
    font-size:16px!important;
    line-height:1.55!important;
  }

  body.md-site .md-auth-shell,
  body.md-site .md-contact-grid,
  body.md-site .md-dashboard-grid,
  body.md-site .md-section-grid{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    width:100%!important;
    gap:16px!important;
  }

  body.md-site .md-auth-card,
  body.md-site .md-auth-showcase,
  body.md-site .md-page-card,
  body.md-site .md-panel,
  body.md-site .md-downloader-card,
  body.md-site .md-premium-card,
  body.md-site .md-info-card,
  body.md-site .md-stat-card{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    padding:22px 18px!important;
    border-radius:28px!important;
    overflow:hidden!important;
  }

  body.md-site .md-auth-showcase{
    min-height:auto!important;
  }

  body.md-site .md-auth-stats,
  body.md-site .md-metric-grid,
  body.md-site .md-support-limits,
  body.md-site .md-host-grid,
  body.md-site .md-support-card-grid{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    width:100%!important;
  }

  body.md-site .md-form,
  body.md-site .md-form-row,
  body.md-site .md-form-row input,
  body.md-site .md-form-row textarea,
  body.md-site .md-form-row select,
  body.md-site .md-link-form textarea,
  body.md-site .md-btn-full,
  body.md-site .md-btn{
    max-width:100%!important;
  }

  body.md-site .md-form-row input,
  body.md-site .md-form-row textarea,
  body.md-site .md-form-row select,
  body.md-site .md-link-form textarea{
    width:100%!important;
    min-width:0!important;
    height:auto!important;
    padding:15px 16px!important;
    font-size:16px!important;
    border-radius:18px!important;
  }

  body.md-site .md-form-row textarea{
    min-height:145px!important;
  }

  body.md-site .md-form-row label{
    font-size:15px!important;
    margin-bottom:8px!important;
  }

  body.md-site .md-btn-full,
  body.md-site button.md-btn-full{
    width:100%!important;
    min-height:54px!important;
    justify-content:center!important;
    white-space:normal!important;
    text-align:center!important;
  }

  body.md-site .md-auth-note{
    text-align:center!important;
    font-size:16px!important;
    line-height:1.45!important;
  }

  body.md-site .g-recaptcha,
  body.md-site .md-form .g-recaptcha,
  body.md-site .md-auth-card .g-recaptcha,
  body.md-site .md-page-card .g-recaptcha{
    display:block!important;
    width:304px!important;
    max-width:304px!important;
    transform:scale(.82)!important;
    transform-origin:left top!important;
    margin:14px 0 -2px 0!important;
    height:68px!important;
  }

  body.md-site .g-recaptcha > div,
  body.md-site .g-recaptcha iframe{
    max-width:304px!important;
  }

  body.md-site .md-contact-card,
  body.md-site .md-process-item,
  body.md-site .md-security-item,
  body.md-site .md-auth-stat{
    width:100%!important;
    min-width:0!important;
  }

  body.md-site .md-nav-panel{
    left:12px!important;
    right:12px!important;
    width:auto!important;
    max-width:none!important;
    padding:18px!important;
    max-height:calc(100dvh - 88px)!important;
    overflow-y:auto!important;
  }
}

@media (max-width:390px){
  body.md-site .md-container,
  body.md-site .container,
  body.md-site .container-fluid{
    padding-left:10px!important;
    padding-right:10px!important;
  }
  body.md-site .md-auth-card,
  body.md-site .md-auth-showcase,
  body.md-site .md-page-card,
  body.md-site .md-panel,
  body.md-site .md-downloader-card{
    padding:20px 14px!important;
    border-radius:24px!important;
  }
  body.md-site .g-recaptcha,
  body.md-site .md-form .g-recaptcha,
  body.md-site .md-auth-card .g-recaptcha,
  body.md-site .md-page-card .g-recaptcha{
    transform:scale(.76)!important;
    height:62px!important;
  }
}
