
/* ── Global Transitions & Base Styles ────────────────── */
* {
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* ── Custom Dropdown Menu ───────────────────────────── */
.custom-dropdown-menu {
    display: none;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    pointer-events: none;
}
.dropdown-active .custom-dropdown-menu {
    display: block !important;
    opacity: 1 !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
}
.rotate {
    transform: rotate(180deg) !important;
}
.dropdown {
    position: relative;
}
.dropdown-active {
    z-index: 9999 !important;
}

/* ── Custom Buttons ────────────────────────────────── */
.btn-primary-custom {
    background: #002793;
    color: white;
    border-radius: 30px;
    padding: 14px 32px;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 10px 20px rgba(0, 39, 147, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
}

.btn-primary-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(0, 39, 147, 0.3);
    background: #001a6e;
    color: white;
}

.btn-primary-custom:active {
    transform: scale(0.96);
}

.btn-primary-custom .icon-box {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.5s ease;
    margin-left: 12px;
}

.btn-primary-custom:hover .icon-box {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(0deg);
}

.btn-primary-custom .icon-box i {
    font-size: 18px;
}

.btn-secondary-custom .icon-box {
    width: 44px;
    height: 44px;
    background: rgba(0, 39, 147, 0.08);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    margin-left: 12px;
}

.btn-secondary-custom:hover .icon-box {
    background: rgba(0, 39, 147, 0.15);
}

.btn-secondary-custom {
    background: white;
    color: #64748b;
    border-radius: 30px;
    padding: 14px 32px;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-secondary-custom:hover {
    background: #f8fafc;
    color: #002793;
    border-color: #002793;
}

.btn-secondary-custom:active {
    transform: scale(0.96);
}

/* Standard button size for forms and other pages */
.btn-standard {
    padding: 10px 24px !important;
    font-size: 16px !important;
    min-height: 52px;
}

.btn-standard .icon-box {
    width: 32px !important;
    height: 32px !important;
    margin-left: 8px !important;
}

.btn-standard .icon-box i {
    font-size: 14px !important;
}

/* ── Global Layout Components ───────────────────────── */
.bg-blob {
    position: absolute;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(0,39,147,0.04) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
    display: none;
}
.blob-1 { top: -200px; right: -200px; }
.blob-2 { bottom: -200px; left: -200px; background: radial-gradient(circle, rgba(73,111,215,0.04) 0%, transparent 70%); }

.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.05);
}

/* ── Home Page ────────────────────────────────────── */
.home-page {
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    background: #f8fafc;
}
.home-page .bg-blob { width: 800px; height: 800px; }
.home-page .blob-1 { top: -300px; right: -200px; }
.home-page .blob-2 { bottom: -300px; left: -200px; }

.home-container {
    position: relative;
    z-index: 1;
}

.hero-illustration-wrapper {
    perspective: 1200px;
}
.floating-hero {
    animation: floatHero 8s ease-in-out infinite;
    transform-style: preserve-3d;
}
@keyframes floatHero {
    0%, 100% { transform: translateY(0px) rotateY(-3deg) rotateX(2deg); }
    50% { transform: translateY(-30px) rotateY(3deg) rotateX(-2deg); }
}

.stat-badge {
    background: white;
    padding: 12px 20px;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(0,0,0,0.02);
}

/* ── Step Pages (Common) ─────────────────────────── */
.step-page, .identification-page, .scan-page, .checkout-page {
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    background: #f8fafc;
}

.form-container, .id-container, .scan-container, .content-container, .checkout-container {
    position: relative;
    z-index: 1;
}

.input-field {
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 16px;
    width: 100%;
    background: white;
}
.input-field:focus {
    border-color: #002793;
    box-shadow: 0 0 0 4px rgba(0, 39, 147, 0.1);
    outline: none;
}
.input-field[readonly] {
    background: #f1f5f9;
    color: #64748b;
    cursor: not-allowed;
}

.section-title {
    font-size: 24px;
    font-weight: 800;
    color: #002793;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, #e2e8f0, transparent);
}

.iti--separate-dial-code .iti__selected-flag {
    background-color: transparent !important;
    padding-left: 12px !important;
}

/* ── Identification & Scanning ───────────────────── */
.illustration-wrapper {
    perspective: 1000px;
}
.floating-illustration {
    animation: floatId 6s ease-in-out infinite;
    transform-style: preserve-3d;
}
@keyframes floatId {
    0%, 100% { transform: translateY(0px) rotateY(-5deg); }
    50% { transform: translateY(-15px) rotateY(5deg); }
}

.scanner-wrapper {
    position: relative;
    width: 100%;
    max-width: 500px;
    aspect-ratio: 1;
    border-radius: 40px;
    overflow: hidden;
    border: 8px solid white;
    box-shadow: 0 30px 60px -12px rgba(0,0,0,0.15);
    background: #000;
}

.scanner-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, transparent, #3CCF65, transparent);
    z-index: 10;
    animation: scanMove 3s ease-in-out infinite;
    box-shadow: 0 0 15px #3CCF65;
}

@keyframes scanMove {
    0%, 100% { top: 5%; }
    50% { top: 95%; }
}

.scanner-corners {
    position: absolute;
    inset: 40px;
    border: 2px solid rgba(255,255,255,0.2);
    z-index: 5;
    pointer-events: none;
}
.corner {
    position: absolute;
    width: 30px;
    height: 30px;
    border: 4px solid #3CCF65;
}
.tl { top: -2px; left: -2px; border-right: 0; border-bottom: 0; }
.tr { top: -2px; right: -2px; border-left: 0; border-bottom: 0; }
.bl { bottom: -2px; left: -2px; border-right: 0; border-top: 0; }
.br { bottom: -2px; right: -2px; border-left: 0; border-top: 0; }

#preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ── Checkout Specific ──────────────────────────── */
.input-focus-effect:focus-within {
    border-color: #002793;
    box-shadow: 0 0 0 4px rgba(0, 39, 147, 0.1);
}

.card-screen-wrapper {
    width: 100%;
    max-width: 648px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 28px 65px rgba(0,39,147,0.16), 0 4px 16px rgba(0,0,0,0.07);
    margin: 0 auto;
}

.card-hdr {
    background: linear-gradient(135deg, #001a6e 0%, #002793 60%, #1a3fa8 100%);
    padding: 0 20px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}
.card-hdr::before {
    content: '';
    position: absolute;
    right: -30px; top: -30px;
    width: 110px; height: 110px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}
.card-hdr::after {
    content: '';
    position: absolute;
    right: 60px; bottom: -40px;
    width: 80px; height: 80px;
    background: rgba(255,255,255,0.04);
    border-radius: 50%;
}
.card-hdr-left { display: flex; align-items: center; gap: 10px; position: relative; z-index: 1; min-width: 0; flex: 1; }
.card-hdr-logo-wrap {
    width: 32px; height: 32px; flex-shrink: 0;
    background: rgba(255,255,255,0.14);
    border-radius: 8px; padding: 5px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid rgba(255,255,255,0.2);
}
.card-hdr-logo-wrap img { width: 100%; height: 100%; object-fit: contain; filter: brightness(0) invert(1); display: block; }
.card-hdr-text { min-width: 0; }
.card-hdr-name {
    color: #fff; font-size: 12.5px; font-weight: 800;
    letter-spacing: 0.04em; text-transform: uppercase;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    max-width: 220px;
    line-height: 1.2;
}
.card-hdr-sub {
    color: rgba(255,255,255,0.45); font-size: 7.5px; font-weight: 600;
    letter-spacing: 0.16em; text-transform: uppercase; margin-top: 1px;
}
.card-hdr-right { position: relative; z-index: 1; flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.card-hdr-pass-badge {
    background: rgba(255,255,255,0.16);
    border: 1px solid rgba(255,255,255,0.28);
    border-radius: 6px;
    padding: 5px 12px;
    color: #fff; font-size: 9px; font-weight: 800;
    letter-spacing: 0.25em; text-transform: uppercase;
}
.card-hdr-addr {
    color: rgba(255,255,255,0.38);
    font-size: 7px; font-weight: 600;
    letter-spacing: 0.1em; text-transform: uppercase;
    text-align: right; line-height: 1.5;
}

.card-stripe {
    height: 4px;
    background: linear-gradient(90deg, #002793 0%, #496FD7 28%, #46A5ED 55%, #3CCF65 80%, #002793 100%);
}

.card-body {
    display: flex;
    align-items: stretch;
    padding: 18px 20px;
    gap: 16px;
    min-height: 170px;
    background:
        radial-gradient(ellipse at 90% 110%, rgba(0,39,147,0.04) 0%, transparent 60%),
        linear-gradient(155deg, #ffffff 0%, #f6f8ff 100%);
}

.card-photo-col { display: flex; flex-direction: column; align-items: center; justify-content: center; flex-shrink: 0; }
.card-photo-frame {
    width: 108px; height: 132px;
    border-radius: 10px; overflow: hidden;
    border: 3px solid #fff;
    box-shadow: 0 6px 20px rgba(0,39,147,0.16), 0 1px 4px rgba(0,0,0,0.08);
    background: #f3f4f6;
}
.card-photo-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

.card-divider { width: 1px; background: linear-gradient(180deg, transparent, #e0e3f0 20%, #e0e3f0 80%, transparent); flex-shrink: 0; }

.card-info { flex: 1; display: flex; flex-direction: column; justify-content: space-between; min-width: 0; padding: 2px 0; }
.card-name  { font-size: 20px; font-weight: 900; color: #002793; line-height: 1.15; }
.card-regno {
    font-size: 8.5px; font-weight: 700; color: #94a3b8;
    letter-spacing: 0.2em; text-transform: uppercase;
    margin-top: 2px; margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f8;
}
.card-fields { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-label { font-size: 7px; font-weight: 800; color: #94a3b8; letter-spacing: 0.22em; text-transform: uppercase; margin-bottom: 1px; }
.card-value { font-size: 12.5px; font-weight: 600; color: #1e293b; }
.card-host-pill {
    display: inline-flex; align-items: center;
    font-size: 11px; font-weight: 700; color: #002793;
    background: rgba(0,39,147,0.07);
    padding: 2px 10px; border-radius: 20px;
    border: 1px solid rgba(0,39,147,0.13);
}
.card-status { display: flex; align-items: center; gap: 5px; margin-top: 10px; padding-top: 10px; border-top: 1px solid #f0f0f8; }
.card-dot { width: 7px; height: 7px; background: #3CCF65; border-radius: 50%; animation: pulseDot 2s infinite; }
@keyframes pulseDot {
    0%,100% { box-shadow: 0 0 0 0 rgba(60,207,101,0.4); }
    50%      { box-shadow: 0 0 0 4px rgba(60,207,101,0); }
}
.card-status-txt { font-size: 9px; font-weight: 800; color: #3CCF65; letter-spacing: 0.1em; text-transform: uppercase; }

/* ── Lanyard ─────────────────────────────────────────── */
.lanyard-hole {
    width: 12px; height: 12px;
    background: white; border: 2px solid #D1D5DB;
    border-radius: 50%; margin: 0 auto -6px;
    position: relative; z-index: 10;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.lanyard-strip {
    width: 3px; height: 28px;
    background: linear-gradient(180deg, #002793, #496FD7);
    margin: 0 auto;
}

.card-value-purpose { font-size: 10px; font-style: italic; color: #64748b; line-height: 1.3; }

/* QR column */
.card-qr-col {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 6px; flex-shrink: 0;
    padding-left: 16px;
    border-left: 1px solid #eef0f8;
}
.card-qr-frame {
    width: 96px; height: 96px;
    padding: 4px; background: #fff;
    border-radius: 8px;
    border: 1.5px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.card-qr-frame img { width: 100%; height: 100%; object-fit: contain; display: block; }
.card-qr-label { font-size: 7px; font-weight: 700; color: #94a3b8; letter-spacing: 0.2em; text-transform: uppercase; text-align: center; }
.card-qr-id { font-size: 8px; font-weight: 800; color: #002793; letter-spacing: 0.1em; text-align: center; }

.btn-danger-custom {
    background: #ef4444;
    color: white;
    border-radius: 30px;
    padding: 14px 32px;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 10px 20px rgba(239, 68, 68, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
}

.btn-danger-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(239, 68, 68, 0.3);
    background: #dc2626;
    color: white;
}

.btn-danger-custom:active {
    transform: scale(0.96);
}

.btn-danger-custom .icon-box {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.5s ease;
    margin-left: 12px;
}

.btn-danger-custom:hover .icon-box {
    background: rgba(255, 255, 255, 0.3);
}

@media (max-width: 640px) {
    .card-hdr-name { max-width: 140px; }
    .card-body { flex-direction: column; align-items: center; text-align: center; }
    .card-divider { display: none; }
    .card-info { align-items: center; margin-top: 15px; }
    .card-fields { align-items: center; }
    .card-status { justify-content: center; }
}

/* ── Legacy QR Button ────────────────────────────── */
.qr-section{
    margin-top: 40px;
}
.qrbtn{
    padding: 12px 24px 12px 24px;
    border-radius: 8px;
    background-color: #002793;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
}

@media (max-width: 768px) {
    .btn-primary-custom, .btn-secondary-custom, .btn-danger-custom {
        padding: 8px 14px !important;
        font-size: 13px !important;
        gap: 4px !important;
        border-radius: 20px !important;
    }
    .btn-primary-custom .icon-box, .btn-secondary-custom .icon-box, .btn-danger-custom .icon-box {
        width: 26px !important;
        height: 26px !important;
        margin-left: 4px !important;
    }
    .btn-primary-custom .icon-box i, .btn-secondary-custom .icon-box i, .btn-danger-custom .icon-box i {
        font-size: 11px !important;
    }
}

/* ── PRE-REGISTERED & FRONTPAGE PREMIUM REDESIGN ── */

/* 1. Glass Card Premium Upgrade */
.glass-card {
    background: rgba(255, 255, 255, 0.82) !important;
    backdrop-filter: blur(24px) !important;
    -webkit-backdrop-filter: blur(24px) !important;
    border: 1px solid rgba(255, 255, 255, 0.6) !important;
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.01),
        0 20px 40px -8px rgba(0, 39, 147, 0.05),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.8) !important;
}

/* 2. Unified Telephone Input Container */
.iti {
    position: relative;
    display: block;
    width: 100%;
    border: 1.5px solid #e2e8f0;
    border-radius: 16px;
    background: #ffffff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 39, 147, 0.02);
}

.iti:focus-within {
    border-color: #002793 !important;
    box-shadow: 0 0 0 4px rgba(0, 39, 147, 0.08), 0 12px 24px rgba(0, 39, 147, 0.04) !important;
    transform: translateY(-1px);
}

/* Handle Validation Errors on the container */
.iti:has(.border-danger) {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.08) !important;
}

/* Remove default inner input borders and make it fill container */
.iti input.input-field {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    padding-top: 14px !important;
    padding-bottom: 14px !important;
    padding-left: 104px !important; /* spacing to clear country code selector */
    padding-right: 16px !important;
    border-radius: 16px !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    color: #1e293b !important;
    width: 100% !important;
    height: auto !important;
    outline: none !important;
}

/* Flag & Dial Code Selector on the Left */
.iti .iti__selected-flag {
    background: #f8fafc !important;
    border-right: 1px solid #e2e8f0 !important;
    border-radius: 14px 0 0 14px !important;
    padding: 0 16px !important;
    transition: background-color 0.2s ease;
}

.iti .iti__selected-flag:hover {
    background: #f1f5f9 !important;
}

.iti--separate-dial-code .iti__selected-dial-code {
    margin-left: 8px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #334155 !important;
}

/* Premium Flag Dropdown List Styling */
.iti__country-list {
    border-radius: 16px !important;
    border: 1px solid rgba(0, 39, 147, 0.08) !important;
    box-shadow: 0 20px 40px rgba(0, 39, 147, 0.08) !important;
    padding: 8px !important;
    margin-top: 8px !important;
    background-color: #ffffff !important;
    backdrop-filter: blur(10px) !important;
    transition: none !important;
}

.iti__country {
    border-radius: 8px !important;
    padding: 8px 12px !important;
    transition: all 0.2s ease !important;
    color: #334155 !important;
    font-weight: 500 !important;
}

.iti__country.iti__highlight {
    background-color: rgba(0, 39, 147, 0.06) !important;
    color: #002793 !important;
}
