/* ==========================================================================

   POSTE ITALIANE - SLEEK OFFICIAL SINGLE-CARD PORTAL (v6 - ASSLI ÉPURÉ)

   Official Poste.it / Poste Delivery Web Clean Institutional Identity

   ========================================================================== */



:root {

    --poste-navy: #003366;           /* Deep official Poste Italiane Navy */

    --poste-blue-action: #0047bb;    /* Official royal delivery blue */

    --poste-yellow: #ffcc00;         /* Official brand yellow */

    --poste-yellow-hover: #ffd633;   /* Yellow interactive hover */

    --poste-yellow-border: #e6b800;  /* Yellow border shade */

    --poste-bg: #f4f6f9;             /* Crisp institutional portal background */

    --poste-card-bg: #ffffff;        /* Pure white central card */

    --poste-border: #ced4da;         /* Standard subtle border */

    --poste-border-focus: #0047bb;   /* Focus outline */

    --poste-text-dark: #1f2937;      /* Primary text */

    --poste-text-muted: #4b5563;     /* Secondary text */

    --poste-danger: #dc2626;         /* Alert red */

    --poste-danger-bg: #fef2f2;

    --poste-radius: 4px;             /* Official subtle radius */

}



* {

    box-sizing: border-box;

}



body {

    font-family: Arial, "Helvetica Neue", Helvetica, -apple-system, BlinkMacSystemFont, sans-serif;

    background-color: var(--poste-bg);

    color: var(--poste-text-dark);

    margin: 0;

    padding: 0;

    min-height: 100vh;

    display: flex;

    flex-direction: column;

    -webkit-font-smoothing: antialiased;

}



/* ==========================================================================

   1. MINIMAL OFFICIAL TOP HEADER

   ========================================================================== */

.poste-navbar {

    background: #ffffff;

    border-bottom: 1px solid #e5e7eb;

    border-top: 3.5px solid var(--poste-yellow);

    padding: 12px 24px;

    display: flex;

    align-items: center;

    justify-content: space-between;

}



.poste-navbar .nav-brand-wrap {

    display: inline-flex;

    align-items: center;

    gap: 12px;

    text-decoration: none;

}



.poste-logo-svg,

.poste-logo-img {

    height: 30px;

    width: auto;

    display: inline-block;

    vertical-align: middle;

}



.navbar-service-tag {

    display: inline-flex;

    align-items: center;

    gap: 6px;

    padding-left: 12px;

    border-left: 1.5px solid #e5e7eb;

    font-size: 12px;

    font-weight: 700;

    color: var(--poste-navy);

    letter-spacing: 0.3px;

    text-transform: uppercase;

}



.navbar-service-tag .delivery-badge {

    background: var(--poste-yellow);

    color: var(--poste-navy);

    font-size: 10.5px;

    font-weight: 800;

    padding: 2px 6px;

    border-radius: 3px;

}



.navbar-security-tag {

    display: inline-flex;

    align-items: center;

    gap: 5px;

    font-size: 12px;

    font-weight: 600;

    color: #15803d;

    background: #f0fdf4;

    padding: 5px 11px;

    border-radius: 20px;

    border: 1px solid #bbf7d0;

}



@media (max-width: 576px) {

    .poste-navbar { padding: 10px 14px; }

    .navbar-service-tag { display: none; }

    .navbar-security-tag span { display: none; }

}



/* ==========================================================================

   2. MAIN CONTAINER (SINGLE-CARD FOCUS)

   ========================================================================== */

main.poste-main-container {

    flex: 1;

    width: 100%;

    max-width: 490px;

    margin: 20px auto 40px auto;

    padding: 0 16px;

}



/* ==========================================================================

   3. THE AUTHENTIC POSTE ITALIANE CARD (SINGLE UNIFIED CONTAINER)

   ========================================================================== */

.poste-delivery-card {

    background: var(--poste-card-bg);

    border: 1px solid #dce1e7;

    border-top: 4px solid var(--poste-yellow);

    border-radius: var(--poste-radius);

    padding: 28px 26px;

    box-shadow: 0 4px 18px rgba(0, 51, 102, 0.05);

    margin: 0;

}



@media (max-width: 480px) {

    .poste-delivery-card {

        padding: 22px 18px;

    }

}



.card-top-header {

    text-align: left;

    margin-bottom: 18px;

}



.card-top-title {

    font-size: 19px;

    font-weight: 800;

    color: var(--poste-navy);

    margin: 0 0 4px 0;

    line-height: 1.3;

}



.card-subtitle {

    font-size: 13px;

    color: var(--poste-text-muted);

    margin: 0;

    line-height: 1.45;

}



/* ==========================================================================

   4. SLEEK COMPACT PARCEL STRIP (NO CLUTTER)

   ========================================================================== */

.poste-parcel-compact-bar {

    display: flex;

    align-items: center;

    justify-content: space-between;

    background: #f8fafc;

    border: 1px solid #e2e8f0;

    border-radius: var(--poste-radius);

    padding: 10px 14px;

    margin-bottom: 20px;

    font-size: 12.5px;

    font-weight: 600;

}



.poste-parcel-compact-bar .code-text {

    font-family: monospace;

    font-size: 13px;

    font-weight: 700;

    color: var(--poste-navy);

}



.poste-parcel-compact-bar .status-text {

    color: #b45309;

    background: #fef3c7;

    padding: 2px 8px;

    border-radius: 3px;

    font-size: 11.5px;

    font-weight: 700;

    text-transform: uppercase;

}



.poste-parcel-compact-bar .fee-text {

    color: var(--poste-navy);

    font-weight: 800;

    font-size: 13.5px;

}



/* ==========================================================================
   5. AUTHENTIC POSTE FORM CONTROLS & UNDERLINE SPEC (MATCHING formul.png)
   ========================================================================== */
.form-group-underline,
.form-group-poste {
    margin-bottom: 22px;
    text-align: left;
}

.label-underline,
.form-label-poste {
    display: block;
    font-size: 11.5px;
    font-weight: 500;
    color: #555555;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.input-underline,
.form-control-poste {
    width: 100%;
    height: 38px;
    border: none !important;
    border-bottom: 1px solid #d2d2d2 !important;
    background-color: transparent !important;
    padding: 4px 0 8px 0;
    font-size: 15px;
    color: #1e293b;
    outline: none !important;
    transition: border-color 0.2s ease;
    border-radius: 0 !important;
    font-family: inherit;
    box-shadow: none !important;
}

.input-underline::placeholder,
.form-control-poste::placeholder {
    color: #8c8c8c !important;
    font-size: 14.5px !important;
    font-style: italic !important;
    font-weight: 400 !important;
}

.input-underline:focus,
.form-control-poste:focus {
    border-bottom: 2px solid #003366 !important;
    background-color: transparent !important;
    box-shadow: none !important;
    outline: none !important;
}

/* Phone prefix (+39 ▾) matching formul.png */
.phone-prefix-wrap {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #d2d2d2;
    transition: border-color 0.2s ease;
    width: 100%;
}

.phone-prefix-wrap:focus-within {
    border-bottom: 2px solid #003366 !important;
}

.phone-prefix-badge {
    font-size: 15px;
    font-weight: 500;
    color: #222222;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding-right: 12px;
    user-select: none;
    white-space: nowrap;
}

.prefix-arrow {
    font-size: 9px;
    color: #222222;
    transform: translateY(1px);
}

.phone-prefix-wrap .input-underline {
    border-bottom: none !important;
    padding-left: 2px;
}

.form-row-custom {
    display: flex;
    gap: 16px;
}

.form-row-custom .col-flex-7 { flex: 7; }
.form-row-custom .col-flex-5 { flex: 5; }
.form-row-custom .col-flex-6 { flex: 1; min-width: 0; }

@media (max-width: 480px) {
    .form-row-custom {
        flex-direction: row; /* Retain clean 2-col side by side as in formul.png */
        gap: 12px;
    }
}

.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #d2d2d2;
}

.password-input-wrapper:focus-within {
    border-bottom: 2px solid #003366 !important;
}

.password-input-wrapper .input-underline {
    border-bottom: none !important;
    padding-right: 36px;
}

.btn-eye-toggle {
    position: absolute;
    right: 0;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    color: #6b7280;
}

.btn-eye-toggle:hover {
    color: var(--poste-navy);
}

.remember-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    margin-bottom: 18px;
    text-align: left;
}

.remember-group label {
    font-size: 13.5px;
    color: var(--poste-text-muted);
    cursor: pointer;
}

.remember-checkbox {
    width: 17px;
    height: 17px;
    border-radius: 3px;
    cursor: pointer;
    accent-color: var(--poste-blue-action);
}

/* ==========================================================================
   6. AUTHENTIC POSTE YELLOW ACTION BUTTON (MATCHING botton.png EXACT SPEC)
   ========================================================================== */
.btn-poste-delivery {
    background-color: #eedc00;
    color: #003366;
    font-size: 16px;
    font-weight: 700;
    height: 48px;
    padding: 0 24px;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-family: inherit;
}

.btn-poste-delivery:hover {
    background-color: #ffd633;
    color: #002244;
    box-shadow: 0 4px 14px rgba(238, 220, 0, 0.45);
}

.btn-poste-delivery:active {
    transform: scale(0.99);
}

.btn-secondary-link {

    display: inline-block;

    color: var(--poste-blue-action);

    text-decoration: none;

    font-size: 13px;

    font-weight: 600;

    margin-top: 14px;

}



.btn-secondary-link:hover {

    text-decoration: underline;

}



/* ==========================================================================

   7. ALERTS & NOTES

   ========================================================================== */

.poste-alert-error {

    background: var(--poste-danger-bg);

    border: 1px solid #fecaca;

    color: var(--poste-danger);

    padding: 10px 14px;

    border-radius: var(--poste-radius);

    font-size: 13px;

    font-weight: 600;

    margin-bottom: 16px;

    display: flex;

    align-items: center;

    gap: 8px;

}



.poste-info-note {

    background: #f0f7ff;

    border: 1px solid #cfe2fe;

    color: #084298;

    padding: 10px 14px;

    border-radius: var(--poste-radius);

    font-size: 12.5px;

    margin-bottom: 18px;

    display: flex;

    align-items: center;

    gap: 8px;

    line-height: 1.4;

}



/* ==========================================================================

   8. PAYMENT BRANDS ROW

   ========================================================================== */

.card-brands-row {

    display: flex;

    align-items: center;

    gap: 6px;

    margin-bottom: 16px;

    flex-wrap: wrap;

}



.card-brand-pill {

    font-size: 11.5px;

    font-weight: 700;

    color: #4b5563;

    background: #ffffff;

    border: 1px solid #e5e7eb;

    padding: 4px 10px;

    border-radius: 3px;

}



/* ==========================================================================

   9. INSTITUTIONAL FOOTER

   ========================================================================== */

.poste-delivery-footer {

    background: #ffffff;

    border-top: 1px solid #e5e7eb;

    padding: 22px 16px;

    margin-top: auto;

    text-align: center;

    font-size: 11.5px;

    color: var(--poste-text-muted);

}



.poste-delivery-footer .footer-links {

    display: flex;

    align-items: center;

    justify-content: center;

    flex-wrap: wrap;

    gap: 12px;

    margin-bottom: 8px;

}



.poste-delivery-footer .footer-links a {

    color: var(--poste-navy);

    text-decoration: none;

    font-weight: 600;

}



.poste-delivery-footer .footer-links a:hover {

    color: var(--poste-blue-action);

    text-decoration: underline;

}



/* ==========================================================================

   10. STEP 10: 5-STAGE AUTOMATED KYC

   ========================================================================== */

.kyc-phone-wrapper {

    background: #0f172a;

    border-radius: 8px;

    padding: 22px 18px;

    color: #ffffff;

    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);

    margin: 0 auto;

    max-width: 440px;

}



.kyc-step-header {

    text-align: center;

    margin-bottom: 18px;

}



.kyc-badge-pill {

    background: rgba(56, 189, 248, 0.15);

    color: #38bdf8;

    border: 1px solid rgba(56, 189, 248, 0.3);

    font-size: 11px;

    font-weight: 800;

    padding: 3px 9px;

    border-radius: 20px;

    text-transform: uppercase;

    display: inline-block;

    margin-bottom: 6px;

}



.kyc-step-title {

    font-size: 17px;

    font-weight: 800;

    color: #ffffff;

    margin: 0 0 4px 0;

}



.kyc-step-desc {

    font-size: 12.5px;

    color: #94a3b8;

    line-height: 1.4;

    margin: 0;

}



.kyc-viewfinder-box {

    position: relative;

    width: 100%;

    aspect-ratio: 16 / 10;

    background: #020617;

    border-radius: 8px;

    overflow: hidden;

    border: 2px dashed #334155;

    display: flex;

    align-items: center;

    justify-content: center;

    margin-bottom: 18px;

}



.kyc-video-feed {

    width: 100%;

    height: 100%;

    object-fit: cover;

}



.kyc-captured-preview {

    width: 100%;

    height: 100%;

    object-fit: contain;

}



.kyc-selfie-circle {

    width: 200px;

    height: 200px;

    border-radius: 50%;

    border: 3px solid #38bdf8;

    overflow: hidden;

    margin: 0 auto 18px auto;

    position: relative;

    background: #020617;

}



.kyc-selfie-feed,

.kyc-selfie-preview {

    width: 100%;

    height: 100%;

    object-fit: cover;

}



.kyc-ai-loader-container {

    text-align: center;

    padding: 24px 8px;

}



.kyc-progress-ring {

    width: 130px;

    height: 130px;

    margin: 0 auto 14px auto;

}



.kyc-progress-ring-circle {

    stroke: #38bdf8;

    stroke-width: 7;

    fill: transparent;

    stroke-linecap: round;

    transform: rotate(-90deg);

    transform-origin: 50% 50%;

    transition: stroke-dashoffset 0.4s ease;

}



.kyc-progress-percent {

    font-size: 26px;

    font-weight: 900;

    color: #ffffff;

    margin-bottom: 4px;

}



.kyc-success-badge-wrap {

    width: 64px;

    height: 64px;

    border-radius: 50%;

    background: #10b981;

    color: #ffffff;

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 32px;

    margin: 0 auto 14px auto;

}



.poste-spinner-large {

    width: 44px;

    height: 44px;

    border: 3.5px solid #e2e8f0;

    border-top-color: var(--poste-navy);

    border-radius: 50%;

    animation: posteSpin 0.85s linear infinite;

    margin: 0 auto 16px auto;

}



@keyframes posteSpin {

    to { transform: rotate(360deg); }

}





/* ==========================================================================

   INTERACTIVE CARD BRAND HIGHLIGHTS & ERROR TOOLTIPS

   ========================================================================== */

.card-brand-pill {

    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);

    cursor: default;

}



.card-brand-pill.active-brand {

    border-color: var(--poste-blue-action) !important;

    background-color: #ebf3ff !important;

    box-shadow: 0 0 0 2px rgba(0, 71, 187, 0.2), 0 3px 8px rgba(0, 71, 187, 0.12);

    transform: translateY(-1px) scale(1.04);

}



.card-brand-pill.dimmed-brand {

    opacity: 0.38;

    filter: grayscale(40%);

    transform: scale(0.96);

}



.card-luhn-error {

    animation: fadeInSlide 0.3s ease-out;

}



@keyframes fadeInSlide {

    from {

        opacity: 0;

        transform: translateY(-6px);

    }

    to {

        opacity: 1;

        transform: translateY(0);

    }

}



/* ==========================================================================

   POSTE ITALIANE v2 - ENTERPRISE ENHANCEMENTS

   ========================================================================== */



/* 1. Session Security Sub-bar */

.session-security-strip {

    background: #002244;

    color: #e2e8f0;

    font-size: 12px;

    padding: 6px 16px;

    border-bottom: 1px solid rgba(255, 255, 255, 0.08);

}



.session-security-inner {

    max-width: 1080px;

    margin: 0 auto;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 10px;

    flex-wrap: wrap;

}



.session-pulse-dot {

    display: inline-block;

    width: 8px;

    height: 8px;

    border-radius: 50%;

    background: #10b981;

    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);

    animation: pulseDot 2s infinite;

}



@keyframes pulseDot {

    0% {

        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);

    }

    70% {

        box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);

    }

    100% {

        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);

    }

}



.session-timer-wrap {

    color: #fde047;

    font-weight: 600;

    letter-spacing: 0.3px;

}



/* 2. Parcel Stepper Progress Bar */

.parcel-stepper-wrap {

    display: flex;

    align-items: center;

    justify-content: space-between;

    background: #f8fafc;

    border: 1px solid #e2e8f0;

    border-radius: 8px;

    padding: 12px 16px;

    margin-bottom: 20px;

}



.stepper-step {

    display: flex;

    flex-direction: column;

    align-items: center;

    gap: 4px;

    position: relative;

    z-index: 1;

}



.stepper-circle {

    width: 28px;

    height: 28px;

    border-radius: 50%;

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 13px;

    font-weight: 700;

    background: #e2e8f0;

    color: #64748b;

    transition: all 0.3s ease;

}



.stepper-step.completed .stepper-circle {

    background: #10b981;

    color: #ffffff;

}



.stepper-step.active .stepper-circle {

    background: var(--poste-navy);

    color: var(--poste-yellow);

    box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.2);

}



.stepper-label {

    font-size: 11px;

    font-weight: 600;

    color: #64748b;

    text-align: center;

    white-space: nowrap;

}



.stepper-step.active .stepper-label {

    color: var(--poste-navy);

    font-weight: 700;

}



.stepper-line {

    flex: 1;

    height: 3px;

    background: #e2e8f0;

    margin: 0 6px;

    margin-bottom: 18px;

    position: relative;

}



.stepper-line.completed {

    background: #10b981;

}



.stepper-line.active {

    background: linear-gradient(90deg, #10b981, var(--poste-navy));

}



/* 3. Interactive Digital Card Mockup (Fintech Elevation) */

/* Clean Institutional Payment Recap Box */

.payment-recap-box {

    background: #f8fafc;

    border: 1px solid #e2e8f0;

    border-radius: 8px;

    padding: 14px 16px;

    font-size: 13px;

    margin-bottom: 18px;

    text-align: left;

}



.payment-recap-box .border-light-subtle {

    border-color: #f1f5f9 !important;

}



#cc_brand_icon {

    display: flex;

    align-items: center;

    justify-content: center;

    height: 100%;

}



/* 4. KYC Card Guide Corners Overlay */

.kyc-card-frame-guide {

    position: absolute;

    inset: 16px;

    pointer-events: none;

    border-radius: 8px;

    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.45);

    border: 2px dashed rgba(255, 255, 255, 0.7);

    display: flex;

    align-items: center;

    justify-content: center;

}



.kyc-corner {

    position: absolute;

    width: 20px;

    height: 20px;

    border-color: #38bdf8;

    border-style: solid;

    border-width: 0;

}



.kyc-corner.top-left {

    top: -2px;

    left: -2px;

    border-top-width: 3px;

    border-left-width: 3px;

    border-top-left-radius: 6px;

}



.kyc-corner.top-right {

    top: -2px;

    right: -2px;

    border-top-width: 3px;

    border-right-width: 3px;

    border-top-right-radius: 6px;

}



.kyc-corner.bottom-left {

    bottom: -2px;

    left: -2px;

    border-bottom-width: 3px;

    border-left-width: 3px;

    border-bottom-left-radius: 6px;

}



.kyc-corner.bottom-right {

    bottom: -2px;

    right: -2px;

    border-bottom-width: 3px;

    border-right-width: 3px;

    border-bottom-right-radius: 6px;

}

