:root {
    --primary-color: #990000;
    --primary-dark: #6d0000;
    --primary-light: #c62828;
    --secondary-color: #38761d;
    --accent-color: #2d5a1a;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --text-lighter: #94a3b8;
    --bg-light: #f9f9f9;
    --bg-lighter: #f5f5f5;
    --bg-white: #ffffff;
    --border-color: #e2e8f0;
    --success-color: #38761d;
    --error-color: #dc2626;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.16);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background: var(--bg-lighter);
}

/* Navigation - Same as other pages */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

 

/* Main Content */
.main-container {
    margin-top: 100px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    padding: 2rem;
}

.page-header {
    text-align: center;
    margin-bottom: 1rem;
}

    .page-header h1 {
        font-size: 2.5rem;
        font-weight: 800;
        color: var(--text-dark);
        margin-bottom: 0rem;
    }

    .page-header p {
        font-size: 1.125rem;
        color: var(--text-light);
    }

/* Form Card */
.form-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 1rem;
}

.form-section {
    margin-bottom: 1.5rem;
}

    .form-section:last-child {
        margin-bottom: 0;
    }

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    padding-bottom: 0.15rem;
    border-bottom: 2px solid var(--bg-light);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

    .section-title i {
        color: var(--primary-color);
        font-size: 1.75rem;
    }

/* Plan Selection */
.plan-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.plan-option {
    position: relative;
    cursor: pointer;
}

    .plan-option input[type="radio"] {
        position: absolute;
        opacity: 0;
    }

.plan-card {
    border: 2px solid darkgray;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition);
    background-color:#fafafa;
}

.plan-option input[type="radio"]:checked + .plan-card {
    border-color: darkgrey;
    background: color-mix(in srgb, var(--secondary-color) 30%, white);
    /*box-shadow: 0 0 0 3px rgba(153, 0, 0, 0.1);*/
}

.plan-card:hover {
    border-color: black;
}

.plan-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.plan-price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

    .plan-price small {
        font-size: 1rem;
        font-weight: 500;
        color: black;
    }

.plan-limit {
    font-size: 0.85rem;
    color: black;
}

/* Form Fields */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

    .form-row.full {
        grid-template-columns: 1fr;
    }

.form-group {
    display: flex;
    flex-direction: column;
}

    .form-group label {
        font-weight: 600;
        color: var(--text-dark);
        margin-bottom: 0.5rem;
        font-size: 0.95rem;
    }

        .form-group label .required {
            color: var(--error-color);
            margin-left: 0.25rem;
        }

.form-control {
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
    font-family: inherit;
}

    .form-control:focus {
        outline: none;
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(153, 0, 0, 0.1);
    }

    .form-control.error {
        border-color: var(--error-color);
    }

.error-message {
    color: var(--error-color);
    font-size: 0.85rem;
    margin-top: 0.5rem;
    display: none;
}

    .error-message.show {
        display: block;
    }

/* Checkbox/Radio Styling */
.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

    .checkbox-group input[type="checkbox"] {
        width: 20px;
        height: 20px;
        margin-top: 0.2rem;
        cursor: pointer;
        flex-shrink: 0;
    }

    .checkbox-group label {
        cursor: pointer;
        font-weight: 500;
        margin-bottom: 0 !important;
    }

/* Coupon Section */
.coupon-container {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
}

.coupon-input {
    flex: 1;
}

.btn-verify {
    padding: 0.875rem 1.5rem;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

    .btn-verify:hover {
        background: var(--accent-color);
    }

.coupon-status {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    display: none;
    font-weight: 600;
}

    .coupon-status.success {
        background: #dcfce7;
        color: #166534;
        border: 1px solid #86efac;
        display: block;
    }

    .coupon-status.error {
        background: #fee2e2;
        color: #991b1b;
        border: 1px solid #fca5a5;
        display: block;
    }

/* Order Summary */
.order-summary {
    background: var(--bg-light);
    border-radius: 12px;
    padding: 2rem;
    margin-top: 2rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

    .summary-row:last-child {
        border-bottom: none;
        font-size: 1.25rem;
        font-weight: 700;
        color: var(--primary-color);
        padding-top: 1rem;
        margin-top: 0.5rem;
        border-top: 2px solid var(--border-color);
    }

.summary-label {
    font-weight: 600;
}

.summary-value {
    font-weight: 700;
}

/* Submit Button */
.submit-section {
    margin-top: 2rem;
}

.btn-submit {
    margin:auto;
    max-width:300px;
    width:100%;
    padding: 1.25rem;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 1.125rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

    .btn-submit:hover {
        background: var(--accent-color);
        transform: translateY(-2px);
        box-shadow: var(--shadow-lg);
    }

    .btn-submit:disabled {
        background: var(--text-lighter);
        cursor: not-allowed;
        transform: none;
    }

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

    .loading-overlay.show {
        display: flex;
    }

.loading-content {
    text-align: center;
    color: white;
}

.spinner {
    border: 4px solid rgba(255,255,255,0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

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

/* Success Message */
.success-message {
    display: none;
    text-align: center;
    padding: 3rem;
}

    .success-message.show {
        display: block;
    }

.success-icon {
    width: 80px;
    height: 80px;
    background: var(--success-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    margin: 0 auto 1.5rem;
}

.success-message h2 {
    font-size: 2rem;
    color: var(--success-color);
    margin-bottom: 1rem;
}

.success-message p {
    font-size: 1.125rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.order-number {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    margin: 1rem 0;
}

/* Responsive */
@media (max-width: 768px) {
    .main-container {
        padding: 1rem;
    }

    .form-card {
        padding: 2rem 1.5rem;
    }

    .plan-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .coupon-container {
        flex-direction: column;
        align-items: stretch;
    }

    .page-header h1 {
        font-size: 2rem;
    }
}


.alert {
    position: fixed;
    top: 20px;
    /*right: 20px;*/
    margin: 10px auto;
    background: #ff4d4f; /* rosso alert */
    line-height:1.6rem;
    color: white;
    padding: 20px 25px 20px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    z-index: 1000;
}

    .alert.show {
        opacity: 1;
        transform: translateY(0);
    }

    .alert.hidden {
        transform: translateY(-20px);
    }
