:root {
    --bg-dark-1: #0d1023;
    --bg-dark-2: #151935;
    --glass: rgba(12, 18, 40, 0.45);
    --glass-border: rgba(255, 255, 255, 0.14);
    --text-main: #ffffff;
    --text-soft: rgba(255, 255, 255, 0.78);
    --text-faded: rgba(255, 255, 255, 0.58);
    --blue: #46a0ff;
    --blue-strong: #2f86ff;
    --blue-dark: #1d4ed8;
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    --radius-xl: 28px;
    --radius-lg: 18px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    font-family: Arial, sans-serif;
}

body {
    color: var(--text-main);
    background:
        radial-gradient(circle at 20% 20%, rgba(45, 115, 255, 0.35), transparent 28%),
        radial-gradient(circle at 80% 25%, rgba(255, 90, 200, 0.32), transparent 30%),
        radial-gradient(circle at 70% 75%, rgba(118, 76, 255, 0.30), transparent 28%),
        radial-gradient(circle at 30% 80%, rgba(90, 220, 255, 0.22), transparent 26%),
        linear-gradient(135deg, var(--bg-dark-1), var(--bg-dark-2));
    overflow-x: hidden;
}

/* =========================
   BACKGROUND
========================= */

.page-bg {
    position: fixed;
    inset: 0;
    overflow: hidden;
    z-index: 0;
}

.bg-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at center, rgba(255, 255, 255, 0.08), transparent 45%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0));
    backdrop-filter: blur(1px);
}

.bg-shape {
    position: absolute;
    border-radius: 999px;
    filter: blur(55px);
    opacity: 0.8;
}

.shape-1 {
    width: 420px;
    height: 420px;
    top: 5%;
    left: 5%;
    background: rgba(39, 123, 255, 0.35);
}

.shape-2 {
    width: 480px;
    height: 480px;
    top: 0;
    right: 8%;
    background: rgba(240, 90, 190, 0.30);
}

.shape-3 {
    width: 420px;
    height: 420px;
    bottom: 5%;
    right: 16%;
    background: rgba(133, 80, 255, 0.28);
}

.shape-4 {
    width: 360px;
    height: 360px;
    bottom: 8%;
    left: 18%;
    background: rgba(72, 214, 255, 0.20);
}

/* =========================
   GENERIC LAYOUT
========================= */

.landing-wrap,
.hero,
.container,
.split-layout {
    position: relative;
    z-index: 1;
}

.landing-wrap,
.hero,
.container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.landing-wrap {
    gap: 70px;
    max-width: 1400px;
    margin: 0 auto;
}

.split-layout {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 90px;
    padding: 40px 60px;
    max-width: 1500px;
    margin: 0 auto;
}

.split-panel {
    width: 100%;
}

.split-form-panel {
    max-width: 560px;
    display: flex;
    justify-content: flex-start;
}

.split-content-panel {
    flex: 1;
    display: flex;
    justify-content: flex-start;
}

/* =========================
   GLASS / CARD
========================= */

.glass-card,
.hero-card,
.card,
.landing-card,
.form-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.landing-card {
    width: 100%;
    max-width: 430px;
    padding: 34px 30px;
}

.hero-card,
.card {
    width: 100%;
    max-width: 520px;
    padding: 32px;
    color: #fff;
}

.form-card {
    width: 100%;
    max-width: 530px;
    min-height: 470px;
    padding: 34px 34px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* =========================
   BRAND
========================= */

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
}

.brand-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #49a2ff, #2e7cff);
    color: #fff;
    font-size: 18px;
    box-shadow: 0 10px 25px rgba(52, 125, 255, 0.4);
}

.brand-text {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.brand-io {
    font-weight: 700;
    color: #ffffff;
}

/* =========================
   TYPOGRAPHY
========================= */

h1,
h2,
h3 {
    margin-top: 0;
}

p {
    line-height: 1.6;
}

.landing-title {
    margin: 0 0 12px;
    font-size: 34px;
    line-height: 1.1;
    font-weight: 700;
    color: var(--text-main);
}

.landing-subtitle {
    margin: 0 0 26px;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-soft);
}

.home-title {
    margin: 6px 0 18px;
    font-size: 44px;
    line-height: 1.08;
    color: #ffffff;
    font-weight: 700;
}

.home-subtitle {
    margin: 0 0 28px;
    max-width: 420px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 16px;
    line-height: 1.6;
}

.form-title {
    margin: 0 0 18px;
    font-size: 38px;
    line-height: 1.05;
    color: #ffffff;
}

.form-subtitle {
    margin: 0 0 24px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 16px;
    line-height: 1.6;
}

.eyebrow {
    font-size: 28px;
    color: rgba(255, 255, 255, 0.92);
    margin-bottom: 8px;
}

.landing-note {
    font-size: 18px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.58);
    max-width: 580px;
}

/* =========================
   SIDE CONTENT
========================= */

.landing-side {
    max-width: 620px;
    width: 100%;
}

.side-content {
    padding: 10px 10px 10px 0;
}

.landing-side h2 {
    margin: 0 0 26px;
    font-size: 68px;
    line-height: 0.95;
    color: #68c3ff;
    text-shadow: 0 8px 30px rgba(104, 195, 255, 0.18);
}

.content-box {
    max-width: 700px;
}

.content-box .eyebrow {
    font-size: 40px;
    color: rgba(255, 255, 255, 0.92);
    margin-bottom: 10px;
    line-height: 1.1;
}

.content-box h2 {
    margin: 0 0 32px;
    font-size: 96px;
    line-height: 0.95;
    color: #69c6ff;
    text-shadow: 0 8px 30px rgba(104, 195, 255, 0.18);
}

/* =========================
   FEATURES
========================= */

.feature-list {
    list-style: none;
    padding: 0;
    margin: 0 0 30px;
}

.feature-list li {
    position: relative;
    padding-left: 42px;
    margin-bottom: 22px;
    font-size: 22px;
    color: rgba(255, 255, 255, 0.92);
    line-height: 1.5;
}

.feature-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    color: #ffffff;
    font-weight: bold;
}

/* =========================
   BUTTONS
========================= */

.actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.actions.vertical {
    flex-direction: column;
}

.btn,
button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 52px;
    padding: 14px 20px;
    border: 0;
    border-radius: 16px;
    cursor: pointer;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.btn:hover,
button:hover {
    transform: translateY(-1px);
}

.btn-primary,
button,
.btn {
    background: linear-gradient(135deg, var(--blue), var(--blue-strong));
    color: #fff;
    box-shadow: 0 15px 35px rgba(55, 132, 255, 0.35);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: none;
}

.actions.vertical .btn {
    min-height: 64px;
    font-size: 18px;
    border-radius: 20px;
}

/* =========================
   MODE SWITCH
========================= */

.mode-switch {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.switch {
    flex: 1;
    min-height: 54px;
    padding: 12px 18px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.03);
    color: #ffffff;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    transition: all 0.18s ease;
}

.switch:hover {
    transform: translateY(-1px);
}

.switch.active {
    background: linear-gradient(135deg, #4ea4ff, #3b82f6);
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: 0 15px 35px rgba(55, 132, 255, 0.28);
}

/* =========================
   PANELS
========================= */

.panel {
    width: 100%;
}

.hidden-panel {
    display: none;
}

.active-panel {
    display: block;
}

.panel-topbar {
    margin-bottom: 10px;
}

.back-link {
    width: auto;
    min-height: auto;
    padding: 0;
    margin: 0 0 10px;
    background: transparent;
    border: 0;
    box-shadow: none;
    color: #9fd0ff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.back-link:hover {
    transform: none;
    text-decoration: underline;
}

/* =========================
   FORMS
========================= */

.styled-form {
    margin-top: 8px;
}

label {
    display: block;
    margin: 18px 0 8px;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.92);
}

input[type="file"],
input[type="text"],
input[type="password"],
input[type="email"],
textarea,
select {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    outline: none;
    transition: border-color 0.18s ease, background 0.18s ease;
}

.styled-form input[type="file"] {
    padding: 16px;
}

input::placeholder,
textarea::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

input:focus,
textarea:focus,
select:focus {
    border-color: rgba(94, 174, 255, 0.55);
    background: rgba(255, 255, 255, 0.08);
}

textarea {
    min-height: 120px;
    resize: vertical;
}

.form-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 22px;
}

.form-links a {
    color: #9fd0ff;
    text-decoration: none;
    font-size: 15px;
}

.form-links a:hover {
    text-decoration: underline;
}

/* =========================
   LINKS
========================= */

a {
    color: #90c8ff;
}

/* =========================
   SUCCESS BOX
========================= */

.success-box {
    margin-bottom: 24px;
    padding: 24px;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(11, 37, 63, 0.92), rgba(8, 28, 48, 0.92));
    border: 1px solid rgba(74, 222, 128, 0.28);
    color: #e8fff5;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.success-head {
    margin-bottom: 18px;
}

.success-badge {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    margin-bottom: 12px;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.14);
    border: 1px solid rgba(16, 185, 129, 0.30);
    color: #b8f7d4;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.success-box h2,
.success-title {
    margin: 0 0 8px;
    font-size: 20px;
    line-height: 1.2;
    color: #ffffff;
}

.success-intro {
    margin: 0;
    color: rgba(232, 255, 245, 0.78);
    font-size: 14px;
    line-height: 1.5;
}

.success-main-credentials,
.success-credentials {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 20px;
}

.credential-card,
.success-credential {
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(255, 255, 255, 0.04);
}

.credential-card-primary {
    background: linear-gradient(135deg, rgba(70, 160, 255, 0.18), rgba(47, 134, 255, 0.14));
    border-color: rgba(96, 165, 250, 0.34);
}

.credential-card-pin {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.16), rgba(52, 211, 153, 0.10));
    border-color: rgba(74, 222, 128, 0.28);
}

.credential-label,
.success-credential-label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.72);
}

.credential-value,
.success-credential-value {
    font-size: 32px;
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: 1px;
    color: #ffffff;
    word-break: break-word;
}

.success-meta,
.success-details {
    margin-top: 6px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.10);
}

.success-meta-row,
.success-detail-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 6px 0;
}

.meta-label,
.success-detail-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.66);
    min-width: 88px;
}

.meta-value,
.success-detail-value {
    font-size: 14px;
    color: #ffffff;
    text-align: right;
    word-break: break-word;
}

.warning,
.success-warning {
    margin-top: 18px;
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(255, 208, 137, 0.10);
    border: 1px solid rgba(255, 208, 137, 0.22);
    color: #ffd089;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 1200px) {
    .split-layout {
        gap: 50px;
    }

    .content-box h2 {
        font-size: 74px;
    }

    .content-box .eyebrow {
        font-size: 30px;
    }

    .feature-list li {
        font-size: 19px;
    }
}

@media (max-width: 1100px) {
    .landing-wrap {
        flex-direction: column;
        gap: 35px;
        text-align: center;
    }

    .landing-card {
        max-width: 520px;
    }

    .side-content {
        padding: 0;
    }

    .landing-side h2 {
        font-size: 54px;
    }
}

@media (max-width: 980px) {
    .split-layout {
        flex-direction: column;
        text-align: center;
        gap: 34px;
        padding: 28px 22px;
    }

    .split-form-panel,
    .split-content-panel {
        max-width: 100%;
        justify-content: center;
    }

    .form-card {
        max-width: 560px;
        min-height: auto;
    }

    .content-box h2 {
        font-size: 58px;
    }

    .content-box .eyebrow {
        font-size: 24px;
    }

    .feature-list li {
        padding-left: 0;
    }

    .feature-list li::before {
        position: static;
        display: inline-block;
        margin-right: 10px;
    }

    .home-subtitle {
        max-width: none;
    }
}

@media (max-width: 640px) {
    .landing-wrap,
    .hero,
    .container,
    .split-layout {
        padding: 20px;
    }

    .landing-card,
    .hero-card,
    .card,
    .form-card {
        padding: 24px;
        border-radius: 22px;
    }

    .landing-title {
        font-size: 28px;
    }

    .home-title {
        font-size: 32px;
    }

    .form-title {
        font-size: 30px;
    }

    .eyebrow,
    .content-box .eyebrow {
        font-size: 22px;
    }

    .landing-side h2,
    .content-box h2 {
        font-size: 44px;
    }

    .feature-list li {
        font-size: 17px;
        margin-bottom: 16px;
    }

    .landing-note {
        font-size: 16px;
    }

    .actions {
        flex-direction: column;
    }

    .success-box {
        padding: 18px;
    }

    .credential-value,
    .success-credential-value {
        font-size: 26px;
    }

    .success-meta-row,
    .success-detail-row {
        flex-direction: column;
        gap: 4px;
    }

    .meta-value,
    .success-detail-value {
        text-align: left;
    }
}

.success-box {
    margin: 0 0 24px;
    padding: 24px;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(9, 59, 86, 0.95), rgba(11, 68, 95, 0.92));
    border: 1px solid rgba(0, 217, 255, 0.30);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.success-title {
    margin: 0 0 20px;
    font-size: 22px;
    line-height: 1.2;
    font-weight: 700;
    color: #dffbea;
}

.success-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 20px;
}

.success-card {
    padding: 16px 18px;
    border-radius: 16px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.10);
}

.success-card-code {
    background: linear-gradient(180deg, rgba(63, 143, 255, 0.16), rgba(63, 143, 255, 0.08));
    border-color: rgba(99, 179, 255, 0.24);
}

.success-card-pin {
    background: linear-gradient(180deg, rgba(28, 200, 138, 0.16), rgba(28, 200, 138, 0.08));
    border-color: rgba(90, 230, 175, 0.22);
}

.success-label {
    display: block;
    margin: 0 0 10px;
    font-size: 12px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.70);
}

.success-value {
    display: block;
    font-size: 34px;
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: 1px;
    color: #ffffff;
    word-break: break-word;
}

.success-info {
    margin-top: 6px;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.10);
}

.success-info-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 7px 0;
}

.success-info-key {
    display: block;
    font-size: 14px;
    color: rgba(255,255,255,0.62);
}

.success-info-val {
    display: block;
    font-size: 14px;
    color: #ffffff;
    text-align: right;
    word-break: break-word;
}

.success-warning {
    margin-top: 18px;
    padding: 13px 15px;
    border-radius: 14px;
    background: rgba(255, 187, 92, 0.10);
    border: 1px solid rgba(255, 187, 92, 0.22);
    color: #ffd48f;
    font-size: 14px;
    line-height: 1.45;
    font-weight: 700;
}

@media (max-width: 640px) {
    .success-box {
        padding: 18px;
    }

    .success-grid {
        grid-template-columns: 1fr;
    }

    .success-value {
        font-size: 28px;
    }

    .success-info-row {
        flex-direction: column;
        gap: 4px;
    }

    .success-info-val {
        text-align: left;
    }
}

.success-info-val {
    text-align: right;
    max-width: 260px;
    overflow-wrap: anywhere;
}

.success-value {
    font-size: 28px;          /* prima era troppo grande */
    font-weight: 700;         /* meno “grasso” */
    letter-spacing: 0.5px;    /* meno spaziato */
    white-space: nowrap;      /* NON va a capo */
    overflow: hidden;
    text-overflow: ellipsis;  /* sicurezza se proprio lungo */
}

.copy-btn {
    margin-top: 16px;
    width: 100%;
    padding: 14px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.06);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
}

.copy-btn:hover {
    background: rgba(255,255,255,0.10);
}

.success-warning {
    margin-top: 18px;
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(255, 187, 92, 0.12);
    border: 1px solid rgba(255, 187, 92, 0.25);
    color: #ffd48f;
    font-size: 14px;
    font-weight: 600;
}