/* Miner Wars Strategic Calculator v5.6 - Stylesheet */

.mwc-container {
    max-width: 1100px;
    margin: 30px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #0f172a;
    line-height: 1.6;
}

.mwc-header {
    text-align: center;
    padding: 30px 20px;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    border-radius: 12px 12px 0 0;
    color: white;
    box-shadow: 0 4px 20px rgba(30, 58, 138, 0.15);
}

.mwc-header h2 {
    margin: 0 0 8px 0;
    font-size: 28px;
    font-weight: 700;
    color: white;
}

.mwc-subtitle {
    margin: 0;
    font-size: 14px;
    opacity: 0.92;
    color: #dbeafe;
}

.mwc-form {
    background: white;
    padding: 30px;
    border-radius: 0 0 12px 12px;
    border: 1px solid #e2e8f0;
    border-top: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
}

.mwc-section-title {
    margin: 25px 0 10px 0;
    padding: 10px 14px;
    background: linear-gradient(to right, #eff6ff 0%, transparent 100%);
    border-left: 4px solid #3b82f6;
    font-size: 16px;
    font-weight: 700;
    color: #1e3a8a;
    border-radius: 0 6px 6px 0;
}

.mwc-section-title:first-of-type {
    margin-top: 0;
}

.mwc-help-text {
    font-size: 13px;
    color: #64748b;
    margin: 0 0 15px 0;
    font-style: italic;
    padding: 8px 12px;
    background: #f8fafc;
    border-radius: 6px;
    border-left: 3px solid #cbd5e1;
}

.mwc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 18px;
    margin-bottom: 15px;
}

.mwc-field {
    display: flex;
    flex-direction: column;
}

.mwc-field label {
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 14px;
    color: #334155;
}

.mwc-field input, .mwc-field select {
    padding: 11px 14px;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    font-size: 15px;
    background: #f8fafc;
    transition: border-color 0.15s;
    font-family: inherit;
}

.mwc-field input:focus, .mwc-field select:focus {
    outline: none;
    border-color: #3b82f6;
    background: white;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.mwc-field small {
    font-size: 12px;
    color: #64748b;
    margin-top: 5px;
}

.mwc-submit {
    width: 100%;
    padding: 15px 24px;
    margin-top: 20px;
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.15s;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
}

.mwc-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(5, 150, 105, 0.35);
}

.mwc-submit:disabled { opacity: 0.7; cursor: not-allowed; }

/* Risultati */
.mwc-result {
    margin-top: 30px;
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
}

.mwc-result-header {
    padding: 25px 30px;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
    color: white;
}

.mwc-result-header h3 {
    margin: 0 0 8px 0;
    font-size: 22px;
    color: white;
}

.mwc-result-body { padding: 30px; }

/* Inputs summary */
.mwc-inputs-summary {
    background: #f1f5f9;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    font-size: 13px;
    border-left: 4px solid #3b82f6;
}

.mwc-pill {
    display: inline-block;
    padding: 3px 10px;
    background: #1e3a8a;
    color: white;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin: 2px 3px 2px 0;
}
.mwc-pill-plat { background: #7c3aed; }
.mwc-pill-risk { background: #b45309; }
.mwc-pill-coord-high { background: #059669; }
.mwc-pill-coord-medium { background: #d97706; }
.mwc-pill-coord-low { background: #dc2626; }

/* === BEST CONFIG (NEW v3.0) === */
.mwc-best-config-box {
    background: linear-gradient(135deg, #ecfdf5 0%, #ffffff 100%);
    border: 2px solid #059669;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 15px rgba(5, 150, 105, 0.1);
}

.mwc-best-config-title {
    font-size: 22px;
    font-weight: 800;
    color: #059669;
    margin: 0 0 6px 0;
    text-align: center;
}

.mwc-best-config-subtitle {
    text-align: center;
    font-size: 13px;
    color: #64748b;
    margin: 0 0 20px 0;
    font-style: italic;
}

.mwc-setup-summary {
    text-align: center;
    padding: 15px;
    background: white;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1.5px solid #a7f3d0;
}

.mwc-setup-summary-label {
    font-size: 12px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-bottom: 6px;
}

.mwc-setup-summary-value {
    font-size: 20px;
    font-weight: 700;
    color: #065f46;
    font-family: "Courier New", monospace;
}

/* Griglia spell (3 card: Focus/Power/Echo) */
.mwc-spells-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

@media (max-width: 640px) {
    .mwc-spells-grid { grid-template-columns: 1fr; }
}

.mwc-spell-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
}

.mwc-spell-card.active-green  { border-color: #10b981; background: linear-gradient(to bottom, #d1fae5 0%, white 40%); }
.mwc-spell-card.active-purple { border-color: #7c3aed; background: linear-gradient(to bottom, #ede9fe 0%, white 40%); }
.mwc-spell-card.active-red    { border-color: #dc2626; background: linear-gradient(to bottom, #fee2e2 0%, white 40%); }
.mwc-spell-card.inactive      { opacity: 0.6; background: #f8fafc; }

.mwc-spell-icon { font-size: 22px; margin-bottom: 4px; }

.mwc-spell-name {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 4px;
}

.mwc-spell-tier {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.mwc-tier-OFF    { background: #e2e8f0; color: #64748b; }
.mwc-tier-Base  { background: #10b981; color: white; }
.mwc-tier-Super  { background: #7c3aed; color: white; }
.mwc-tier-Ultra  { background: #dc2626; color: white; }

.mwc-spell-detail {
    font-size: 11px;
    color: #64748b;
    line-height: 1.4;
}

.mwc-spell-detail strong { color: #0f172a; }

/* Stats totali */
.mwc-config-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.mwc-stat-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 12px;
    text-align: center;
}

.mwc-stat-label {
    font-size: 10px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-weight: 600;
}

.mwc-stat-value {
    font-size: 17px;
    font-weight: 700;
    color: #0f172a;
    margin-top: 2px;
}

.mwc-stat-value.good { color: #059669; }
.mwc-stat-value.warn { color: #b45309; }

/* Bande attive table */
.mwc-bands-box {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.mwc-bands-box h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #1e3a8a;
    font-weight: 700;
}

.mwc-bands-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.mwc-bands-table th {
    background: #f1f5f9;
    padding: 8px 6px;
    text-align: left;
    color: #334155;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-bottom: 2px solid #cbd5e1;
}

.mwc-bands-table td {
    padding: 8px 6px;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
}

.mwc-band-badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 12px;
    background: #1e3a8a;
    color: white;
    font-weight: 700;
    font-size: 12px;
    min-width: 45px;
    text-align: center;
}

.mwc-band-badge.excluded { background: #94a3b8; }

.mwc-value-gmt { font-weight: 700; color: #059669; }
.mwc-value-cost { color: #dc2626; }
.mwc-value-net.positive { color: #059669; font-weight: 700; }
.mwc-value-net.negative { color: #dc2626; }

.mwc-ev-ratio-high { color: #059669; font-weight: 700; }
.mwc-ev-ratio-low { color: #b45309; }

/* Bande escluse */
.mwc-excluded-box {
    background: #fef3c7;
    border-left: 4px solid #b45309;
    padding: 15px 18px;
    border-radius: 6px;
    margin-bottom: 15px;
}

.mwc-excluded-box h4 {
    margin: 0 0 8px 0;
    color: #92400e;
    font-size: 14px;
}

.mwc-excluded-list {
    margin: 0;
    padding-left: 18px;
    font-size: 12px;
}

.mwc-excluded-list li {
    margin-bottom: 4px;
    color: #451a03;
}

/* Alternative */
.mwc-alternatives-box {
    background: #f0f9ff;
    border: 1.5px solid #0ea5e9;
    border-radius: 10px;
    padding: 18px;
    margin-bottom: 15px;
}

.mwc-alternatives-box h4 {
    margin: 0 0 10px 0;
    color: #075985;
    font-size: 15px;
}

.mwc-alternatives-box p {
    font-size: 12px;
    color: #0c4a6e;
    margin: 0 0 12px 0;
    font-style: italic;
}

.mwc-alt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 10px;
}

.mwc-alt-card {
    background: white;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid #bae6fd;
}

.mwc-alt-summary {
    font-weight: 700;
    font-size: 13px;
    color: #075985;
    margin-bottom: 6px;
    font-family: "Courier New", monospace;
}

.mwc-alt-stats {
    font-size: 11px;
    color: #334155;
}

.mwc-alt-stats strong {
    color: #0f172a;
}

/* Box tattici */
.mwc-tactical {
    background: #fef3c7;
    border-left: 4px solid #b45309;
    padding: 15px 18px;
    border-radius: 6px;
    margin-bottom: 12px;
}

.mwc-tactical h4 {
    margin: 0 0 6px 0;
    color: #92400e;
    font-size: 14px;
}

.mwc-tactical p {
    margin: 0;
    font-size: 13px;
    color: #451a03;
}

/* Platinum */
.mwc-platinum-box {
    background: #ede9fe;
    border-left: 4px solid #7c3aed;
    padding: 15px 18px;
    border-radius: 6px;
    margin-bottom: 15px;
}

.mwc-platinum-box h4 {
    margin: 0 0 8px 0;
    color: #5b21b6;
    font-size: 15px;
}

.mwc-platinum-box p {
    margin: 0 0 6px 0;
    font-size: 13px;
    color: #1e1b4b;
}

.mwc-platinum-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.mwc-platinum-metric {
    background: white;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #c4b5fd;
}

.mwc-platinum-metric-label {
    font-size: 11px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.mwc-platinum-metric-value {
    font-size: 16px;
    font-weight: 700;
    color: #5b21b6;
    margin-top: 2px;
}

.mwc-platinum-formula {
    font-family: "Courier New", monospace;
    font-size: 11px;
    background: rgba(255,255,255,0.7);
    padding: 6px 10px;
    border-radius: 4px;
    margin-top: 8px;
    color: #4c1d95;
    display: block;
    border: 1px solid #c4b5fd;
}

/* Errori */
.mwc-errors, .mwc-no-config {
    background: #fee2e2;
    padding: 18px 22px;
    border-radius: 8px;
    margin-top: 15px;
    color: #991b1b;
}
.mwc-errors ul, .mwc-no-config ul { margin: 8px 0 0 22px; padding: 0; }

/* KPI */
.mwc-kpi-box {
    background: #f0fdf4;
    border-left: 4px solid #059669;
    padding: 15px 18px;
    border-radius: 6px;
    margin-bottom: 12px;
}

.mwc-kpi-box h4 { margin: 0 0 8px 0; color: #065f46; font-size: 14px; }

.mwc-kpi-table {
    width: 100%;
    margin-top: 8px;
    font-size: 12px;
    border-collapse: collapse;
}

.mwc-kpi-table th {
    background: #d1fae5;
    padding: 6px 8px;
    text-align: left;
    color: #065f46;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.mwc-kpi-table td {
    padding: 6px 8px;
    border-bottom: 1px solid #a7f3d0;
    color: #0f172a;
    vertical-align: top;
}

/* BTC */
.mwc-btc-box {
    background: #fff7ed;
    border-left: 4px solid #ea580c;
    padding: 15px 18px;
    border-radius: 6px;
    margin-bottom: 12px;
}

.mwc-btc-box h4 { margin: 0 0 6px 0; color: #9a3412; font-size: 14px; }
.mwc-btc-box p { margin: 0 0 8px 0; font-size: 12px; color: #7c2d12; }

.mwc-btc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 8px;
    margin-top: 8px;
}

.mwc-btc-item {
    background: white;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #fed7aa;
    text-align: center;
}

.mwc-btc-item-band { font-size: 11px; color: #9a3412; font-weight: 700; text-transform: uppercase; }
.mwc-btc-item-value { font-size: 13px; font-weight: 700; color: #0f172a; margin-top: 2px; font-family: "Courier New", monospace; }

/* EV notes */
.mwc-ev-notes {
    background: #f3e8ff;
    border-left: 4px solid #7c3aed;
    padding: 15px 18px;
    border-radius: 6px;
    margin-bottom: 12px;
}

.mwc-ev-notes h4 { margin: 0 0 6px 0; color: #5b21b6; font-size: 14px; }
.mwc-ev-notes ul { margin: 0; padding-left: 20px; }
.mwc-ev-notes li { font-size: 12px; color: #4c1d95; margin-bottom: 3px; }

/* Footer */
.mwc-footer-note {
    margin-top: 20px;
    padding: 15px 20px;
    background: #f8fafc;
    border-radius: 8px;
    font-size: 12px;
    color: #64748b;
    line-height: 1.5;
}

.mwc-footer-note p { margin: 0; }
.mwc-footer-note strong { color: #334155; }

.mwc-version-footer {
    text-align: center;
    margin-top: 20px;
    padding: 10px;
    font-size: 11px;
    color: #94a3b8;
    font-style: italic;
}

/* Responsive */
@media (max-width: 600px) {
    .mwc-header h2 { font-size: 22px; }
    .mwc-form, .mwc-result-body { padding: 20px; }
    .mwc-bands-table { font-size: 10px; }
    .mwc-bands-table th, .mwc-bands-table td { padding: 6px 3px; }
    .mwc-best-config-title { font-size: 18px; }
    .mwc-setup-summary-value { font-size: 16px; }
    .mwc-spells-grid { grid-template-columns: 1fr; }
}


/* v4.1 — Titoli ad alto contrasto per evitare testo chiaro su sfondi chiari */
.mwc-container .mwc-best-config-title,
.mwc-container .mwc-alternatives-box h4,
.mwc-container .mwc-platinum-box h4,
.mwc-container .mwc-tactical h4,
.mwc-container .mwc-excluded-box h4,
.mwc-container .mwc-bands-box h4,
.mwc-container .mwc-kpi-box h4,
.mwc-container .mwc-btc-box h4,
.mwc-container .mwc-ev-notes h4 {
    opacity: 1 !important;
    font-weight: 800 !important;
    letter-spacing: 0.01em;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 8px;
    text-shadow: none !important;
}

.mwc-container .mwc-best-config-title {
    color: #14532d !important;
    background: rgba(5, 150, 105, 0.12);
}

.mwc-container .mwc-bands-box h4 {
    color: #1e3a8a !important;
    background: rgba(59, 130, 246, 0.10);
}

.mwc-container .mwc-alternatives-box h4 {
    color: #0c4a6e !important;
    background: rgba(14, 165, 233, 0.12);
}

.mwc-container .mwc-platinum-box h4,
.mwc-container .mwc-ev-notes h4 {
    color: #4c1d95 !important;
    background: rgba(124, 58, 237, 0.12);
}

.mwc-container .mwc-tactical h4,
.mwc-container .mwc-excluded-box h4,
.mwc-container .mwc-btc-box h4 {
    color: #78350f !important;
    background: rgba(180, 83, 9, 0.14);
}

.mwc-container .mwc-kpi-box h4 {
    color: #065f46 !important;
    background: rgba(5, 150, 105, 0.12);
}


/* v5.1 — Fix compatibilità tema + contrasto titoli */
.mwc-container h1::before,
.mwc-container h1::after,
.mwc-container h2::before,
.mwc-container h2::after,
.mwc-container h3::before,
.mwc-container h3::after,
.mwc-container h4::before,
.mwc-container h4::after,
.mwc-container h5::before,
.mwc-container h5::after {
    content: none !important;
    display: none !important;
}

.mwc-container .mwc-header h2,
.mwc-container .mwc-section-title,
.mwc-container .mwc-best-config-title,
.mwc-container .mwc-bands-box h4,
.mwc-container .mwc-excluded-box h4,
.mwc-container .mwc-alternatives-box h4,
.mwc-container .mwc-platinum-box h4,
.mwc-container .mwc-tactical h4 {
    -webkit-text-fill-color: currentColor !important;
    background-image: none !important;
}

.mwc-container .mwc-section-title {
    color: #1e3a8a !important;
    background: linear-gradient(to right, #dbeafe 0%, #eff6ff 72%, transparent 100%) !important;
    border-left: 4px solid #2563eb !important;
    font-weight: 800 !important;
    text-shadow: none !important;
}

.mwc-container .mwc-header h2 {
    color: #ffffff !important;
    text-shadow: none !important;
}

.mwc-container .mwc-subtitle {
    color: #e0e7ff !important;
}

.mwc-btn-text,
.mwc-btn-loading {
    font-family: inherit;
    letter-spacing: normal;
}


/* v5.2 — Tooltip helper per q(L,m) e r(L,m) */
.mwc-field label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.mwc-tooltip {
    position: relative;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}

.mwc-tooltip-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #7dd3fc;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    cursor: help;
    user-select: none;
}

.mwc-tooltip-bubble {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 10px);
    transform: translateX(-50%);
    width: min(280px, 70vw);
    padding: 10px 12px;
    border-radius: 10px;
    background: #0f172a;
    color: #f8fafc;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.45;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.25);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.15s ease, visibility 0.15s ease, transform 0.15s ease;
    z-index: 20;
}

.mwc-tooltip-bubble::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: #0f172a transparent transparent transparent;
}

.mwc-tooltip:hover .mwc-tooltip-bubble,
.mwc-tooltip:focus-within .mwc-tooltip-bubble {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-2px);
}

@media (max-width: 600px) {
    .mwc-tooltip-bubble {
        left: 0;
        transform: translateX(0);
        width: min(260px, 78vw);
    }
    .mwc-tooltip-bubble::after {
        left: 16px;
        transform: none;
    }
    .mwc-tooltip:hover .mwc-tooltip-bubble,
    .mwc-tooltip:focus-within .mwc-tooltip-bubble {
        transform: translateX(0) translateY(-2px);
    }
}


/* v5.4 — Access gate WordPress ruolo gominer */
.mwc-auth-gate {
    margin: 30px auto;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.mwc-auth-gate-header {
    padding: 28px 30px;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
    color: white;
}

.mwc-auth-gate-header h2 {
    margin: 0 0 8px 0;
    color: white !important;
    font-size: 28px;
    font-weight: 800;
}

.mwc-auth-gate-header p {
    margin: 0;
    color: #dbeafe !important;
    font-size: 15px;
}

.mwc-auth-gate-body {
    display: grid;
    grid-template-columns: minmax(320px, 1.1fr) minmax(240px, 0.9fr);
    gap: 22px;
    padding: 26px;
    background: #f8fafc;
}

.mwc-auth-gate-body.single {
    grid-template-columns: 1fr;
}

.mwc-auth-card,
.mwc-auth-note {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 22px;
}

.mwc-auth-card h3,
.mwc-auth-note h4 {
    margin: 0 0 10px 0;
    color: #0f172a !important;
    font-weight: 800;
}

.mwc-auth-card p,
.mwc-auth-note p,
.mwc-auth-note li {
    color: #475569 !important;
    font-size: 14px;
}

.mwc-auth-note ul {
    margin: 10px 0 0 18px;
    padding: 0;
}

.mwc-auth-form-wrap form {
    margin-top: 14px;
}

.mwc-auth-form-wrap label {
    display: block;
    margin-bottom: 6px;
    color: #334155;
    font-weight: 700;
    font-size: 14px;
}

.mwc-auth-form-wrap input[type="text"],
.mwc-auth-form-wrap input[type="password"] {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    background: #f8fafc;
    font-size: 15px;
    margin-bottom: 14px;
}

.mwc-auth-form-wrap input[type="text"]:focus,
.mwc-auth-form-wrap input[type="password"]:focus {
    outline: none;
    border-color: #2563eb;
    background: white;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.10);
}

.mwc-auth-form-wrap .login-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0 14px 0;
}

.mwc-auth-form-wrap .login-remember label {
    margin: 0;
    font-weight: 600;
}

.mwc-auth-form-wrap input[type="submit"],
.mwc-auth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 220px;
    padding: 13px 18px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: white !important;
    font-weight: 800;
    font-size: 15px;
    text-decoration: none !important;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.22);
}

.mwc-auth-btn.secondary {
    background: linear-gradient(135deg, #475569 0%, #64748b 100%);
    box-shadow: 0 8px 20px rgba(100, 116, 139, 0.18);
}

.mwc-auth-card.denied {
    border-left: 4px solid #dc2626;
}

.mwc-auth-gate.denied .mwc-auth-gate-header {
    background: linear-gradient(135deg, #7f1d1d 0%, #b91c1c 100%);
}

.mwc-auth-actions {
    margin-top: 16px;
}

@media (max-width: 760px) {
    .mwc-auth-gate-body {
        grid-template-columns: 1fr;
        padding: 18px;
    }

    .mwc-auth-gate-header {
        padding: 22px 20px;
    }

    .mwc-auth-gate-header h2 {
        font-size: 24px;
    }

    .mwc-auth-form-wrap input[type="submit"],
    .mwc-auth-btn {
        width: 100%;
        min-width: 0;
    }
}


/* v5.5 — Cloudflare Turnstile nel login gate */
.mwc-turnstile-wrap {
    margin: 10px 0 14px 0;
}

.mwc-turnstile-wrap .cf-turnstile {
    display: inline-block;
    max-width: 100%;
}

.mwc-turnstile-error {
    margin-top: 8px;
    color: #b91c1c;
    font-size: 13px;
    font-weight: 600;
}


/* v5.6 — Login, registrazione e reset integrati */
.auth-tabs-layout {
    align-items: start;
}

.mwc-auth-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.mwc-auth-tab {
    appearance: none;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #334155;
    padding: 10px 14px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 14px;
    cursor: pointer;
}

.mwc-auth-tab.is-active {
    background: #1e3a8a;
    border-color: #1e3a8a;
    color: white;
}

.mwc-auth-panel {
    display: none;
}

.mwc-auth-panel.is-active {
    display: block;
}

.mwc-inline-form input[type="text"],
.mwc-inline-form input[type="email"],
.mwc-inline-form input[type="password"] {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    background: #f8fafc;
    font-size: 15px;
    margin-bottom: 12px;
}

.mwc-inline-form input[type="text"]:focus,
.mwc-inline-form input[type="email"]:focus,
.mwc-inline-form input[type="password"]:focus {
    outline: none;
    border-color: #2563eb;
    background: white;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.10);
}

.mwc-checkbox-row {
    display: flex !important;
    align-items: center;
    gap: 10px;
    margin: 8px 0 14px 0;
    color: #334155;
    font-weight: 600;
}

.mwc-checkbox-row input {
    margin: 0;
}

.mwc-auth-feedback {
    margin-bottom: 14px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
}

.mwc-auth-feedback.success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.mwc-auth-feedback.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.mwc-auth-btn.is-loading {
    opacity: 0.7;
    pointer-events: none;
}

.mwc-auth-btn.is-loading::after {
    content: '...';
    margin-left: 8px;
}


/* v8.4.0 — Auth gate UI refresh: label/optional badge, info feedback, micro-interazioni */

/* Header del gate: profondità e accento luminoso */
.mwc-auth-gate {
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.12);
}
.mwc-auth-gate-header {
    position: relative;
    overflow: hidden;
}
.mwc-auth-gate-header::after {
    content: "";
    position: absolute;
    top: -60%;
    right: -10%;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(96, 165, 250, 0.28) 0%, rgba(96, 165, 250, 0) 70%);
    pointer-events: none;
}
.mwc-auth-gate-header h2 {
    letter-spacing: -0.01em;
}

/* Tab pill: hover e focus accessibile */
.mwc-auth-tab {
    transition: border-color 0.12s ease, background 0.12s ease, color 0.12s ease, transform 0.12s ease;
}
.mwc-auth-tab:hover {
    border-color: #94a3b8;
    background: #eef2f7;
}
.mwc-auth-tab.is-active {
    box-shadow: 0 6px 16px rgba(30, 58, 138, 0.22);
}
.mwc-auth-tab:focus-visible,
.mwc-auth-btn:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* Label dei campi inline (Alias / ID GoMining) */
.mwc-inline-label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 6px 0 6px;
    color: #1e293b;
    font-weight: 700;
    font-size: 14px;
}

/* Badge "facoltativo" */
.mwc-inline-optional {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

/* Input inline: angoli più morbidi, transizioni e placeholder coerente */
.mwc-inline-form input[type="text"],
.mwc-inline-form input[type="email"],
.mwc-inline-form input[type="password"] {
    border-radius: 12px;
    transition: border-color 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.mwc-inline-form input::placeholder {
    color: #94a3b8;
}

/* Bottone a tutta larghezza dentro i form inline + micro-lift */
.mwc-inline-form .mwc-auth-btn {
    width: 100%;
    min-width: 0;
    margin-top: 4px;
}
.mwc-auth-btn {
    transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}
.mwc-auth-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.04);
}
.mwc-auth-btn:active {
    transform: translateY(0);
}

/* Variante "info" del feedback (usata dallo switch dei tab e dai messaggi neutri) */
.mwc-auth-feedback.info {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* Checkbox termini: più leggibile */
.mwc-checkbox-row span {
    font-size: 13.5px;
    line-height: 1.4;
}


/* v8.4.0 — Legenda icone spell sopra i setup consigliati */
.mwc-spell-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    align-items: center;
    margin: 0 0 12px;
    padding: 10px 12px;
    background: rgba(148, 163, 184, 0.10);
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.5;
}
.mwc-spell-legend strong {
    margin-right: 4px;
}

/* ==========================================================
   v8.6.2 — Mobile auth/login CoVe patch
   Obiettivo: evitare tagli laterali su smartphone dentro Elementor/WordPress.
   La protezione agisce solo sul layout del plugin, non sul tema globale.
   ========================================================== */
.mwc-container,
.mwc-auth-gate,
.mwc-auth-gate *,
.mwc-container * {
    box-sizing: border-box;
}

.mwc-container {
    width: 100%;
    max-width: 1100px;
    min-width: 0;
    overflow-x: hidden;
    padding-left: 16px;
    padding-right: 16px;
}

.mwc-auth-gate {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-left: auto;
    margin-right: auto;
}

.mwc-auth-gate-body,
.mwc-auth-card,
.mwc-auth-note,
.mwc-auth-form-wrap,
.mwc-inline-form,
.auth-tabs-layout,
.mwc-auth-panel {
    min-width: 0;
    max-width: 100%;
}

.mwc-auth-tabs {
    width: 100%;
    max-width: 100%;
}

.mwc-auth-tab {
    max-width: 100%;
    white-space: normal;
    line-height: 1.2;
}

.mwc-auth-form-wrap input[type="text"],
.mwc-auth-form-wrap input[type="password"],
.mwc-inline-form input[type="text"],
.mwc-inline-form input[type="email"],
.mwc-inline-form input[type="password"],
.mwc-auth-form-wrap input[type="submit"],
.mwc-auth-btn {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.mwc-turnstile-wrap,
.mwc-turnstile-wrap .cf-turnstile {
    max-width: 100%;
    overflow-x: auto;
}

@media (max-width: 900px) {
    .mwc-container {
        margin: 18px auto;
        padding-left: 12px;
        padding-right: 12px;
    }

    .mwc-auth-gate {
        margin-top: 18px;
        margin-bottom: 18px;
        border-radius: 14px;
    }

    .mwc-auth-gate-body,
    .mwc-auth-gate-body.single {
        display: block;
        padding: 14px;
    }

    .mwc-auth-card,
    .mwc-auth-note {
        width: 100%;
        max-width: 100%;
        padding: 18px;
        margin: 0 0 14px 0;
    }

    .mwc-auth-note:last-child {
        margin-bottom: 0;
    }
}

@media (max-width: 480px) {
    .mwc-container {
        margin: 12px auto;
        padding-left: 8px;
        padding-right: 8px;
    }

    .mwc-auth-gate-header {
        padding: 20px 16px;
    }

    .mwc-auth-gate-header h2 {
        font-size: 22px;
        line-height: 1.18;
    }

    .mwc-auth-gate-header p {
        font-size: 14px;
    }

    .mwc-auth-gate-body,
    .mwc-auth-gate-body.single {
        padding: 10px;
    }

    .mwc-auth-card,
    .mwc-auth-note {
        padding: 16px;
        border-radius: 12px;
    }

    .mwc-auth-tabs {
        gap: 8px;
    }

    .mwc-auth-tab {
        flex: 1 1 auto;
        padding: 9px 10px;
        font-size: 13px;
        text-align: center;
    }

    .mwc-auth-form-wrap label,
    .mwc-inline-label {
        font-size: 13px;
    }

    .mwc-auth-form-wrap input[type="text"],
    .mwc-auth-form-wrap input[type="password"],
    .mwc-inline-form input[type="text"],
    .mwc-inline-form input[type="email"],
    .mwc-inline-form input[type="password"] {
        padding: 11px 12px;
        font-size: 16px; /* evita zoom automatico iOS */
    }
}
