@import url('https://fonts.googleapis.com/css2?family=Noto+Nastaliq+Urdu:wght@400;700&display=swap');

/* ══════════════════════════════════════════════
   DLMS — Driving Licence Management System
   Stylesheet matching the official government design
   ══════════════════════════════════════════════ */

/* ── Fajer Noori Nastalique Font Fallback ── */
@font-face {
    font-family: 'Fajer Noori Nastalique';
    src: local('Fajer Noori Nastalique'),
         local('FajerNooriNastalique'),
         local('Jameel Noori Nastaleeq'),
         local('Nafees Nastaleeq'),
         url('fonts/Fajer-Noori-Nastalique.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* ── DOB Dropdowns ── */
.dob-row {
    display: flex;
    gap: 10px;
}

.dob-row select {
    flex: 1;
    padding: 14px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    color: #1a1a1a;
    background: #FAFAFA;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    cursor: pointer;
}

.dob-row select:focus {
    outline: none;
    border-color: #2D8B4E;
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(45, 139, 78, 0.1);
}

/* ── Reset & Base ── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(180deg, #e8f5e9 0%, #f1f8e9 50%, #e8f5e9 100%);
    background-attachment: fixed;
    color: #333333;
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ── Page Layout ── */
.page-wrapper {
    display: flex;
    justify-content: center;
    padding: 16px;
    min-height: 100vh;
}

.main-container {
    width: 100%;
    max-width: 440px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* ── Card Base ── */
.card {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(45, 139, 78, 0.12);
    border-radius: 14px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.07),
                0 1px 4px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    animation: fadeSlideUp 0.5s ease-out both;
}

.card:nth-child(2) { animation-delay: 0.1s; }
.card:nth-child(3) { animation-delay: 0.2s; }

@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ════════════════════════════════════════
   HERO CARD
   ════════════════════════════════════════ */
.hero-card {
    padding: 0;
    text-align: center;
    overflow: hidden;
    border-top: 5px solid #2D8B4E;
}

.hero-card .logos-container {
    padding: 24px 24px 12px;
    margin-bottom: 0;
}

.hero-card .site-title,
.hero-card .site-subtitle,
.hero-card .urdu-box,
.hero-card .cta-button {
    margin-left: 24px;
    margin-right: 24px;
}

/* ── Logos ── */
.logos-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.logo {
    height: 72px;
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
    border: none;
    outline: none;
    background: transparent;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
}

.logo:hover {
    transform: scale(1.05);
}

.logo[src=""],
.logo:not([src]) {
    display: none;
}

/* ── Title ── */
.site-title {
    font-size: 26px;
    font-weight: 900;
    color: #0a0a0a;
    margin-bottom: 10px;
    line-height: 1.3;
    letter-spacing: -0.5px;
}

.site-subtitle {
    font-size: 15px;
    color: #555555;
    margin-bottom: 22px;
    line-height: 1.5;
    font-weight: 500;
}

/* ── Urdu Description Box ── */
.urdu-box {
    background: linear-gradient(135deg, #FFF9E8 0%, #FFF3D4 100%);
    border: 1px solid #F0E4C4;
    border-radius: 10px;
    padding: 18px 16px;
    margin-bottom: 22px;
    text-align: right;
    transition: box-shadow 0.3s ease;
}

.urdu-box:hover {
    box-shadow: 0 2px 12px rgba(192, 168, 100, 0.15);
}

.urdu-box p {
    font-family: 'Fajer Noori Nastalique', 'Jameel Noori Nastaleeq', 'Noto Nastaliq Urdu', serif;
    font-size: 17px;
    color: #1a1a1a;
    line-height: 2.4;
    word-spacing: 2px;
    font-weight: 700;
}

/* ── CTA Button ── */
.cta-button {
    display: inline-block;
    width: auto;
    min-width: 280px;
    max-width: 100%;
    margin: 0 auto 18px;
    padding: 16px 36px;
    background: linear-gradient(135deg, #34A853 0%, #2D8B4E 50%, #1E7A3E 100%);
    color: #ffffff;
    font-size: 17px;
    font-weight: 800;
    font-family: 'Inter', sans-serif;
    border: none;
    border-radius: 28px;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    letter-spacing: 0.2px;
    box-shadow: 0 4px 14px rgba(45, 139, 78, 0.35);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.6s ease;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(45, 139, 78, 0.45);
    background: linear-gradient(135deg, #3BB85E 0%, #34A853 50%, #2D8B4E 100%);
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(45, 139, 78, 0.3);
}

/* ── Footer Text ── */
.footer-text {
    font-size: 13px;
    color: #ffffff;
    text-align: center;
    font-weight: 600;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, #1E7A3E 0%, #2D8B4E 100%);
    padding: 14px 20px;
    border-radius: 12px;
    margin-top: 4px;
}

/* ════════════════════════════════════════
   BANNER CARD
   ════════════════════════════════════════ */
.banner-card {
    padding: 0;
    border-radius: 14px;
    transition: transform 0.3s ease;
}

.banner-card:hover {
    transform: scale(1.01);
}

.banner-image {
    width: 100%;
    display: block;
    border-radius: 14px;
}

.banner-card:empty,
.banner-image[src=""] {
    display: none;
}

/* ════════════════════════════════════════
   FAQ CARD
   ════════════════════════════════════════ */
.faq-card {
    padding: 26px 18px 22px;
}

.faq-title {
    font-size: 19px;
    font-weight: 800;
    color: #1E7A3E;
    text-align: center;
    margin-bottom: 18px;
    letter-spacing: -0.2px;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ── FAQ Item ── */
.faq-item {
    background: #F5F5F5;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.faq-item:hover {
    background: #F0F0F0;
    border-color: #e0e0e0;
}

.faq-item.active {
    background: #EDF7ED;
    border-color: #c8e6c9;
}

.faq-question {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    cursor: pointer;
    gap: 14px;
    user-select: none;
    -webkit-user-select: none;
}

/* ── FAQ Plus Icon ── */
.faq-icon {
    width: 26px;
    height: 26px;
    min-width: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, #E8F5E9, #C8E6C9);
    color: #2D8B4E;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
    background: linear-gradient(135deg, #2D8B4E, #1E7A3E);
    color: #ffffff;
}

/* ── FAQ Question Text ── */
.faq-question-text {
    flex: 1;
    font-family: 'Fajer Noori Nastalique', 'Jameel Noori Nastaleeq', 'Noto Nastaliq Urdu', serif;
    font-size: 17px;
    color: #1a1a1a;
    font-weight: 700;
    text-align: right;
    direction: rtl;
    line-height: 2;
    transition: color 0.3s ease;
}

.faq-item.active .faq-question-text {
    color: #1E7A3E;
    font-weight: 700;
}

/* ── FAQ Answer ── */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                padding 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item.active .faq-answer {
    max-height: 300px;
    padding: 0 16px 16px;
}

.faq-answer-content {
    font-family: 'Fajer Noori Nastalique', 'Jameel Noori Nastaleeq', 'Noto Nastaliq Urdu', serif;
    font-size: 16px;
    color: #333333;
    text-align: right;
    direction: rtl;
    line-height: 2.2;
    border-top: 1px solid #d5e8d5;
    padding-top: 14px;
}

/* ════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════ */
@media (max-width: 480px) {
    .page-wrapper {
        padding: 10px 8px;
    }

    .main-container {
        gap: 10px;
    }

    .hero-card {
        padding: 24px 18px 18px;
    }

    .logo {
        height: 58px;
    }

    .site-title {
        font-size: 19px;
    }

    .urdu-box p {
        font-size: 14px;
        line-height: 2;
    }

    .cta-button {
        min-width: 220px;
        padding: 12px 24px;
        font-size: 14px;
    }

    .faq-card {
        padding: 20px 14px 18px;
    }

    .faq-question-text {
        font-size: 14px;
    }
}

@media (min-width: 768px) {
    .main-container {
        max-width: 480px;
    }

    .hero-card {
        padding: 40px 32px 28px;
    }

    .logo {
        height: 80px;
    }

    .site-title {
        font-size: 24px;
    }

    .faq-card {
        padding: 32px 24px;
    }
}

/* ── Accessibility ── */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

.cta-button:focus-visible,
.faq-question:focus-visible {
    outline: 3px solid #2D8B4E;
    outline-offset: 2px;
}

/* ── Selection ── */
::selection {
    background: #2D8B4E;
    color: white;
}

/* ════════════════════════════════════════
   WALLET POPUP OVERLAY
   ════════════════════════════════════════ */
.popup-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.popup-card {
    background: white;
    width: 100%;
    max-width: 500px;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    text-align: center;
    max-height: 90vh;
    overflow-y: auto;
}

.popup-logo {
    height: 48px;
    margin-bottom: 20px;
}

.popup-alert {
    border: 2px solid;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-family: 'Fajer Noori Nastalique', 'Noto Nastaliq Urdu', serif;
    font-size: 15px;
    line-height: 2;
    font-weight: 700;
}

.green-alert {
    border-color: #2D8B4E;
    color: #2D8B4E;
    background: #F0FAF0;
}

.red-alert {
    border-color: #D32F2F;
    color: #D32F2F;
    background: #FFF5F5;
}

.popup-heading {
    color: #2D8B4E;
    font-size: 14px;
    font-weight: 800;
    margin: 20px 0 16px;
}

.wallet-icons {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding: 16px;
    border: 1px solid #eee;
    border-radius: 8px;
}

.wallet-logo {
    height: 32px;
    width: auto;
    object-fit: contain;
    border-radius: 4px;
}

.no-bank-text {
    color: #D32F2F;
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 24px;
}

.popup-agreement {
    margin-bottom: 24px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.agreement-label-text {
    font-family: 'Fajer Noori Nastalique', 'Noto Nastaliq Urdu', serif;
    font-size: 15px;
    font-weight: 700;
    line-height: 2;
    color: #333;
}

/* ════════════════════════════════════════
   APPLICATION FORM PAGE
   ════════════════════════════════════════ */
.form-card {
    padding: 0;
    text-align: center;
    overflow: hidden;
    border-top: 5px solid #2D8B4E;
}

.form-card .logos-container {
    padding: 24px 24px 12px;
    margin-bottom: 0;
}

.form-card .site-title,
.form-card .form-subtitle-urdu,
.form-card form,
.form-card .footer-text {
    margin-left: 24px;
    margin-right: 24px;
}

.form-card .footer-text {
    margin-bottom: 24px;
}

.form-subtitle-urdu {
    font-family: 'Fajer Noori Nastalique', 'Noto Nastaliq Urdu', serif;
    font-size: 18px;
    font-weight: 700;
    color: #2D8B4E;
    direction: rtl;
    margin-bottom: 8px;
    line-height: 2;
}

.form-divider {
    height: 2px;
    background: linear-gradient(90deg, transparent, #2D8B4E, transparent);
    margin: 22px 0;
    border-radius: 1px;
}

/* ── Form Fields ── */
.form-field {
    margin-bottom: 20px;
    text-align: left;
}

.field-label {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 8px;
    line-height: 1.6;
}

.field-label span[dir="rtl"] {
    font-family: 'Fajer Noori Nastalique', 'Noto Nastaliq Urdu', serif;
    font-weight: 700;
    color: #2D8B4E;
    font-size: 16px;
}

/* ── Text Inputs & Select ── */
#application-form input[type="text"],
#application-form input[type="tel"],
#application-form input[type="date"],
#application-form select,
#payment-proof-form input[type="text"] {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    color: #1a1a1a;
    background: #FAFAFA;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
}

#application-form input:focus,
#application-form select:focus,
#payment-proof-form input:focus {
    outline: none;
    border-color: #2D8B4E;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(45, 139, 78, 0.1);
}

#application-form input::placeholder {
    color: #aaa;
    font-weight: 400;
}

#application-form select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%232D8B4E'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 24px;
    padding-right: 40px;
    cursor: pointer;
}

.input-error {
    border-color: #d32f2f !important;
    background: #FFF5F5 !important;
}

.field-error {
    display: none;
    font-size: 13px;
    color: #d32f2f;
    margin-top: 6px;
    font-weight: 500;
    line-height: 1.4;
}

/* ── Gender Radio Buttons ── */
.gender-options {
    display: flex;
    gap: 16px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    background: #FAFAFA;
    transition: all 0.3s ease;
}

.radio-option:hover {
    border-color: #2D8B4E;
    background: #F0FAF0;
}

.radio-option input[type="radio"] {
    display: none;
}

.radio-custom {
    width: 22px;
    height: 22px;
    min-width: 22px;
    border: 2px solid #ccc;
    border-radius: 50%;
    position: relative;
    transition: all 0.3s ease;
}

.radio-option input[type="radio"]:checked ~ .radio-custom {
    border-color: #2D8B4E;
}

.radio-option input[type="radio"]:checked ~ .radio-custom::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #2D8B4E;
}

.radio-option input[type="radio"]:checked ~ span:last-child {
    color: #2D8B4E;
}

.radio-option span[dir="rtl"] {
    font-family: 'Fajer Noori Nastalique', 'Noto Nastaliq Urdu', serif;
    font-size: 15px;
}

/* ── Image Upload Areas ── */
.upload-area {
    width: 100%;
    min-height: 140px;
    border: 2px dashed #c8c8c8;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #FAFAFA;
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
}

.upload-area:hover {
    border-color: #2D8B4E;
    background: #F0FAF0;
}

.upload-area.has-image {
    border-style: solid;
    border-color: #2D8B4E;
    background: #fff;
}

.upload-area.upload-error {
    border-color: #d32f2f !important;
    background: #FFF5F5 !important;
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px;
}

.upload-icon {
    font-size: 36px;
    line-height: 1;
}

.upload-text {
    font-size: 13px;
    color: #888;
    text-align: center;
    font-weight: 500;
    line-height: 1.6;
}

.upload-text span[dir="rtl"] {
    font-family: 'Fajer Noori Nastalique', 'Noto Nastaliq Urdu', serif;
    display: block;
    font-size: 14px;
    color: #2D8B4E;
    margin-top: 2px;
}

.upload-preview {
    width: 100%;
    height: 200px;
    object-fit: contain;
    border-radius: 10px;
}

/* ── Certification Checkbox ── */
.certification-field {
    background: linear-gradient(135deg, #FFF9E8, #FFF3D4);
    border: 1px solid #F0E4C4;
    border-radius: 12px;
    padding: 18px 16px;
    margin-bottom: 24px;
}

.checkbox-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
}

.checkbox-option input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 24px;
    height: 24px;
    min-width: 24px;
    border: 2px solid #c9a84c;
    border-radius: 6px;
    position: relative;
    transition: all 0.3s ease;
    margin-top: 4px;
}

.checkbox-option input[type="checkbox"]:checked ~ .checkbox-custom {
    background: #2D8B4E;
    border-color: #2D8B4E;
}

.checkbox-option input[type="checkbox"]:checked ~ .checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 16px;
    font-weight: 900;
}

.certification-text {
    font-family: 'Fajer Noori Nastalique', 'Noto Nastaliq Urdu', serif;
    font-size: 17px;
    font-weight: 700;
    color: #333;
    line-height: 2.2;
}

/* ── Submit Button ── */
.submit-button {
    margin-top: 8px;
    width: 100%;
}

.submit-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* ── Success Screen ── */
.success-card {
    padding: 40px 24px;
    text-align: center;
}

.success-content {
    padding: 24px 0;
}

.success-icon {
    font-size: 64px;
    margin-bottom: 16px;
    animation: successPop 0.5s ease-out;
}

@keyframes successPop {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

.success-title {
    font-size: 22px;
    font-weight: 800;
    color: #1E7A3E;
    margin-bottom: 8px;
}

.success-subtitle {
    font-family: 'Fajer Noori Nastalique', 'Noto Nastaliq Urdu', serif;
    font-size: 18px;
    font-weight: 700;
    color: #2D8B4E;
    margin-bottom: 20px;
    line-height: 2;
}

.success-message {
    font-size: 15px;
    color: #555;
    font-weight: 500;
    margin-bottom: 8px;
}

.success-message-urdu {
    font-family: 'Fajer Noori Nastalique', 'Noto Nastaliq Urdu', serif;
    font-size: 15px;
    color: #666;
    line-height: 2;
}

/* ── Form Responsive ── */
@media (max-width: 480px) {
    .form-card {
        padding: 24px 16px 20px;
    }

    .gender-options {
        flex-direction: column;
        gap: 10px;
    }

    .field-label {
        font-size: 14px;
    }

}

/* ════════════════════════════════════════
   PAYMENT PAGE
   ════════════════════════════════════════ */
#payment-section {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

#payment-section .card {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06),
                0 1px 3px rgba(0, 0, 0, 0.04);
    border-radius: 14px;
}

.payment-timer-wrapper {
    text-align: center;
    padding-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.timer-label {
    font-family: 'Fajer Noori Nastalique', 'Noto Nastaliq Urdu', serif;
    font-size: 14px;
    color: #666;
}

.countdown-timer {
    font-size: 32px;
    font-weight: 800;
    color: #D32F2F;
    background: rgba(211, 47, 47, 0.05);
    padding: 8px 24px;
    border-radius: 12px;
    letter-spacing: 2px;
    border: 1px solid rgba(211, 47, 47, 0.2);
}

.payment-card {
    text-align: center;
    padding: 28px 24px;
}

.payment-divider {
    height: 1px;
    background: #eee;
    margin: 16px 0;
}

.till-heading {
    font-size: 14px;
    font-weight: 700;
    color: #333;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.till-display-box {
    display: inline-flex;
    align-items: center;
    background: #FAFAFA;
    border: 1px solid #eee;
    padding: 8px 16px;
    border-radius: 8px;
    gap: 24px;
    margin-bottom: 16px;
}

.till-id-text {
    font-size: 20px;
    font-weight: 800;
    color: #D32F2F;
    letter-spacing: 1px;
}

.btn-copy {
    background: #1C2B36;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: background 0.2s;
}

.btn-copy:hover {
    background: #555;
}

.merchant-title {
    font-size: 13px;
    color: #333;
    margin-bottom: 24px;
    text-transform: uppercase;
}

.merchant-title strong {
    color: #2D8B4E;
}

.blue-tick {
    color: #1DA1F2;
    font-size: 14px;
}

.qr-container {
    background: #2D8B4E;
    padding: 20px;
    border-radius: 12px;
    display: inline-block;
    margin-bottom: 8px;
}

.qr-image {
    width: 200px;
    height: 200px;
    background: white;
    border-radius: 8px;
    padding: 8px;
    object-fit: contain;
}

.btn-download-qr {
    background: none;
    border: none;
    color: #2D8B4E;
    font-size: 14px;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
    display: block;
    margin: 4px auto 0;
}

.fee-display-wrapper {
    padding-top: 16px;
}

.fee-label {
    font-size: 12px;
    font-weight: 700;
    color: #888;
    margin-bottom: 8px;
}

.fee-amount {
    font-size: 48px;
    font-weight: 900;
    color: #D32F2F;
    line-height: 1;
    margin-bottom: 8px;
}

.fee-currency {
    font-family: 'Fajer Noori Nastalique', 'Noto Nastaliq Urdu', serif;
    font-size: 18px;
    font-weight: 700;
    color: #555;
}

/* Instructions Card */
.instructions-card {
    border: 2px solid #2D8B4E;
    padding: 24px;
    text-align: right;
}

.instructions-title {
    font-family: 'Fajer Noori Nastalique', 'Noto Nastaliq Urdu', serif;
    font-size: 20px;
    color: #333;
    margin-bottom: 16px;
}

.instructions-list {
    font-family: 'Fajer Noori Nastalique', 'Noto Nastaliq Urdu', serif;
    font-size: 16px;
    line-height: 2.2;
    color: #444;
    padding-right: 24px; /* RTL padding */
}

.instructions-list li {
    margin-bottom: 12px;
}

.instructions-list strong {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    color: #1a1a1a;
}

/* Payment Form */
.payment-form-card {
    padding: 24px;
}

.split-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.label-en {
    font-size: 13px;
    font-weight: 600;
    color: #555;
}

.label-ur {
    font-family: 'Fajer Noori Nastalique', 'Noto Nastaliq Urdu', serif;
    font-size: 14px;
    color: #333;
    text-align: right;
}

.required {
    color: #D32F2F;
}

.payment-upload-area {
    border: 1px dashed #2D8B4E;
    border-radius: 8px;
    padding: 12px 16px;
    background: #FAFAFA;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
}

.payment-upload-area:hover {
    background: #F0FAF0;
}

.upload-placeholder {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.upload-placeholder .upload-text {
    color: #999;
    font-size: 13px;
    text-align: right;
    flex: 1;
}

.btn-choose-file {
    background: #2D8B4E;
    color: white;
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    margin-left: 16px;
}

/* Agreement Checkbox Right Align */
.agreement-option {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 12px;
    cursor: pointer;
    flex-direction: row-reverse;
}

.agreement-option input[type="checkbox"] {
    display: none;
}

.agreement-option input[type="checkbox"]:checked ~ .checkbox-custom {
    background: #2D8B4E;
    border-color: #2D8B4E;
}

.agreement-option input[type="checkbox"]:checked ~ .checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
    font-weight: 900;
}

/* Agreement Card */
.agreement-card {
    padding: 24px;
    text-align: right;
}

.agreement-heading {
    font-family: 'Fajer Noori Nastalique', 'Noto Nastaliq Urdu', serif;
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin-bottom: 16px;
    text-align: center;
}

/* Spinner */
.spinner {
    width: 48px;
    height: 48px;
    border: 5px solid rgba(45, 139, 78, 0.2);
    border-top-color: #2D8B4E;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Receipt Details */
.receipt-details {
    background: #FAFAFA;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 16px;
    margin-top: 24px;
    text-align: left;
}

.receipt-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dashed #ddd;
}

.receipt-row:last-child {
    border-bottom: none;
}

.receipt-label {
    font-size: 14px;
    color: #666;
    font-weight: 600;
}

.receipt-value {
    font-size: 14px;
    font-weight: 800;
    color: #333;
}

/* ════════════════════════════════════════
   PAYMENT 2 PAGE — Remaining Amount
   ════════════════════════════════════════ */

/* Header Bar */
.p2-header {
    background: linear-gradient(135deg, #1a3c4d 0%, #1C4A5A 50%, #1a3c4d 100%);
    color: white;
    padding: 14px 20px;
    border-radius: 14px 14px 0 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.p2-back-arrow {
    color: white;
    text-decoration: none;
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
}

.p2-header-title {
    font-size: 17px;
    font-weight: 700;
}

/* Timer Section */
.p2-timer-section {
    text-align: center;
    padding: 20px 24px 16px;
}

.p2-timer-label {
    font-family: 'Fajer Noori Nastalique', 'Noto Nastaliq Urdu', serif;
    font-size: 14px;
    color: #888;
    margin-bottom: 6px;
}

.p2-countdown {
    font-size: 42px;
    font-weight: 900;
    color: #1C4A5A;
    letter-spacing: 3px;
    background: linear-gradient(135deg, #e0f7f0 0%, #d4f0e7 100%);
    display: inline-block;
    padding: 8px 32px;
    border-radius: 14px;
    border: 2px solid #2D8B4E;
}

/* Main Title */
.p2-main-title {
    text-align: center;
    font-size: 16px;
    font-weight: 900;
    color: #1a1a1a;
    letter-spacing: 1px;
    margin-bottom: 14px;
    text-transform: uppercase;
}

/* Fee Breakdown Card */
.p2-fee-card {
    padding: 24px;
}

.p2-fee-card-title {
    font-size: 15px;
    font-weight: 700;
    color: #333;
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
}

.p2-fee-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f5f5f5;
}

.p2-fee-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.p2-fee-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.p2-icon-priority {
    background: #e8f5e9;
    color: #2D8B4E;
}

.p2-icon-tax {
    background: #e3f2fd;
    color: #1976d2;
}

.p2-fee-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.p2-fee-name-group {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.p2-fee-name-ur {
    font-family: 'Fajer Noori Nastalique', 'Noto Nastaliq Urdu', serif;
    font-size: 12px;
    color: #888;
}

.p2-fee-value {
    font-size: 18px;
    font-weight: 800;
    color: #1C4A5A;
}

/* Total Banner */
.p2-total-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #1a1a1a;
    color: white;
    padding: 14px 20px;
    border-radius: 10px;
    margin-top: 16px;
}

.p2-total-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.p2-total-label {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.p2-total-dot {
    color: #D32F2F;
    font-size: 10px;
}

.p2-total-value {
    font-size: 24px;
    font-weight: 900;
}

/* Warning Card */
.p2-warning-card {
    background: #ffffff;
    border-left: 4px solid #2D8B4E;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    text-align: right;
    margin-bottom: 0;
}

.p2-warning-text {
    font-family: 'Fajer Noori Nastalique', 'Noto Nastaliq Urdu', serif;
    font-size: 15px;
    line-height: 2.2;
    color: #444;
}

.p2-warning-text strong {
    font-family: 'Inter', sans-serif;
    color: #1a1a1a;
}

/* Agreement Card (Payment 2 specific — green border) */
.p2-agreement-card {
    padding: 24px;
    text-align: right;
    border: 2px solid #2D8B4E;
    background: linear-gradient(135deg, #f0faf4 0%, #ffffff 100%);
}

/* Confirm Button */
.p2-confirm-btn {
    width: 100%;
    padding: 16px;
    background: #555;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

.p2-confirm-btn:disabled {
    background: #ccc;
    color: #999;
    cursor: not-allowed;
}

.p2-confirm-btn:not(:disabled):hover {
    background: #333;
}

/* Refined Mobile Overrides */
@media (max-width: 480px) {
    .hero-card, .banner-card, .faq-card {
        padding: 10px;
        margin: 10px;
    }
    .logos-container img {
        height: 60px;
        width: 60px;
    }
    .site-title {
        font-size: 1.25rem !important;
        margin-bottom: 5px;
    }
    .site-subtitle {
        font-size: 0.85rem !important;
        margin-bottom: 15px;
    }
    .urdu-box {
        padding: 12px 10px !important;
        margin: 0 10px 20px 10px !important;
    }
    .urdu-box p {
        font-size: 13px !important;
        line-height: 2 !important;
    }
    .cta-button {
        font-size: 14px !important;
        padding: 12px 16px !important;
        margin: 0 15px !important;
        width: calc(100% - 30px) !important;
    }
}


/* ══════════════════════════════════════════════
   NADRA Verification Screen Overlay
   ══════════════════════════════════════════════ */
.verification-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #093314 0%, #155022 50%, #06210b 100%);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
    animation: fadeInOverlay 0.35s ease-out;
}

@keyframes fadeInOverlay {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

.verification-card {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    padding: 28px 20px;
    width: 100%;
    max-width: 410px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45), 0 0 35px rgba(45, 139, 78, 0.25);
    text-align: center;
}

.verification-crest {
    width: 60px;
    height: 60px;
    margin: 0 auto 10px auto;
    display: block;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.12));
}

.verification-header h2 {
    font-size: 1.2rem;
    font-weight: 800;
    color: #1b5e20;
    margin-bottom: 2px;
}

.verification-header p {
    font-family: 'Noto Nastaliq Urdu', serif;
    font-size: 0.9rem;
    color: #333;
    margin-bottom: 18px;
}

.verification-progress-track {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
}

.verification-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #2D8B4E 0%, #4caf50 100%);
    border-radius: 10px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.verification-steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: left;
}

.v-step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: #ffffff;
    border: 1.5px solid #e0e0e0;
    border-radius: 12px;
    transition: all 0.35s ease;
}

.v-step.pending {
    opacity: 0.45;
    background: #f9f9f9;
    border-color: #eee;
}

.v-step.active {
    opacity: 1;
    background: #f0f9f2;
    border-color: #2D8B4E;
    box-shadow: 0 4px 14px rgba(45, 139, 78, 0.18);
}

.v-step.completed {
    opacity: 1;
    background: #f0f9f2;
    border-color: #2D8B4E;
}

.v-step-icon {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.v-spinner {
    width: 18px;
    height: 18px;
    border: 3px solid rgba(45, 139, 78, 0.2);
    border-top-color: #2D8B4E;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.v-check {
    width: 22px;
    height: 22px;
    background: #2D8B4E;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: bold;
    box-shadow: 0 2px 6px rgba(45, 139, 78, 0.4);
}

.v-step-text {
    display: flex;
    flex-direction: column;
}

.v-en {
    font-size: 0.84rem;
    font-weight: 700;
    color: #1b5e20;
}

.v-ur {
    font-size: 0.78rem;
    color: #444;
    font-family: 'Noto Nastaliq Urdu', serif;
}

/* ══════════════════════════════════════════════
   Mobile Phone UI Enhancements & Touch Polish
   ══════════════════════════════════════════════ */
@media (max-width: 480px) {
    .page-wrapper {
        padding: 8px 6px !important;
    }
    .main-container {
        max-width: 100% !important;
        gap: 10px !important;
    }
    .card {
        border-radius: 16px !important;
        padding: 16px 14px !important;
        margin: 0 !important;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05) !important;
    }
    .logos-container {
        gap: 16px !important;
        margin-bottom: 12px !important;
    }
    .logos-container img.logo {
        height: 52px !important;
        width: auto !important;
        max-width: 52px !important;
    }
    .site-title {
        font-size: 1.25rem !important;
        line-height: 1.25 !important;
        margin: 8px 0 4px 0 !important;
    }
    .site-subtitle {
        font-size: 0.82rem !important;
        margin-bottom: 12px !important;
    }
    .urdu-box {
        padding: 12px 10px !important;
        margin-bottom: 16px !important;
        border-radius: 12px !important;
    }
    .urdu-box p {
        font-size: 13px !important;
        line-height: 2.1 !important;
    }
    .cta-button, .submit-button, .btn-pay-now {
        font-size: 15px !important;
        padding: 14px 18px !important;
        border-radius: 12px !important;
        width: 100% !important;
        margin: 0 !important;
        box-shadow: 0 4px 14px rgba(45, 139, 78, 0.3) !important;
    }
    .cta-button:active, .submit-button:active {
        transform: scale(0.98) !important;
    }
    .form-group, .form-field {
        margin-bottom: 14px !important;
    }
    .form-field input[type="text"],
    .form-field input[type="number"],
    .form-field select {
        height: 46px !important;
        font-size: 14px !important;
        border-radius: 10px !important;
        padding: 0 12px !important;
    }
}


/* ══════════════════════════════════════════════
   Compact Popup & Mobile Scaling Overrides
   ══════════════════════════════════════════════ */

.popup-overlay {
    padding: 10px !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(0, 0, 0, 0.75) !important;
    backdrop-filter: blur(6px) !important;
}

.popup-card {
    max-width: 360px !important;
    width: 95% !important;
    padding: 16px 12px !important;
    border-radius: 14px !important;
    box-shadow: 0 10px 35px rgba(0,0,0,0.3) !important;
    text-align: center !important;
    max-height: 85vh !important;
    overflow-y: auto !important;
}

.popup-logo {
    height: 38px !important;
    margin: 0 auto 8px auto !important;
}

.popup-alert {
    padding: 8px 10px !important;
    font-size: 11.5px !important;
    line-height: 1.5 !important;
    margin-bottom: 8px !important;
    border-radius: 8px !important;
}

.popup-heading {
    font-size: 10.5px !important;
    margin: 8px 0 6px 0 !important;
    letter-spacing: 0.5px !important;
}

.wallet-icons {
    gap: 8px !important;
    margin-bottom: 8px !important;
}

.wallet-logo {
    height: 24px !important;
}

.no-bank-text {
    font-size: 11px !important;
    margin: 6px 0 !important;
}

.popup-agreement {
    margin: 8px 0 12px 0 !important;
}

.agreement-label-text {
    font-size: 11px !important;
    line-height: 1.4 !important;
}

.popup-proceed-btn {
    height: 42px !important;
    font-size: 13.5px !important;
    padding: 8px 14px !important;
    border-radius: 10px !important;
    width: 100% !important;
}

/* ── Universal Compact Mobile Sizing ── */
@media (max-width: 480px) {
    html {
        font-size: 14px !important;
    }
    
    body {
        font-size: 13px !important;
    }

    .page-wrapper {
        padding: 4px 4px !important;
    }

    .main-container {
        max-width: 100% !important;
        gap: 8px !important;
    }

    .card {
        border-radius: 12px !important;
        padding: 12px 10px !important;
        margin: 0 !important;
    }

    .site-title {
        font-size: 1.12rem !important;
        line-height: 1.25 !important;
        margin: 4px 0 !important;
    }

    .site-subtitle {
        font-size: 0.78rem !important;
        margin-bottom: 10px !important;
    }

    .urdu-box {
        padding: 10px 8px !important;
        margin-bottom: 12px !important;
        border-radius: 10px !important;
    }

    .urdu-box p {
        font-size: 12.5px !important;
        line-height: 1.95 !important;
    }

    h2, h3, h4, .section-title, .form-title {
        font-size: 0.95rem !important;
    }

    .field-label, label {
        font-size: 11.5px !important;
    }

    .form-field input[type="text"],
    .form-field input[type="number"],
    .form-field select,
    .dob-row select {
        height: 42px !important;
        font-size: 12.5px !important;
        padding: 0 10px !important;
        border-radius: 8px !important;
    }

    .cta-button, .submit-button, .btn-pay-now {
        font-size: 13.5px !important;
        height: 44px !important;
        padding: 10px 14px !important;
        border-radius: 10px !important;
    }

    .p2-timer-label, .timer-label {
        font-size: 12px !important;
    }

    .p2-countdown, .countdown-timer {
        font-size: 1.4rem !important;
    }

    .p2-warning-card, .warning-card {
        padding: 10px !important;
        font-size: 12px !important;
    }

    .instructions-card, .p2-instructions-card {
        padding: 10px !important;
        font-size: 12px !important;
    }
}


/* ══════════════════════════════════════════════
   Clean Footer Text Override (No Green Button Box)
   ══════════════════════════════════════════════ */
.footer-text,
.form-card .footer-text {
    background: transparent !important;
    background-color: transparent !important;
    color: #666666 !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    letter-spacing: 0.5px !important;
    padding: 12px 0 !important;
    margin: 12px 0 4px 0 !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
    text-align: center !important;
    display: block !important;
    width: 100% !important;
}


/* ══════════════════════════════════════════════
   Urdu Text Sizing — Match English proportions
   ══════════════════════════════════════════════ */
[dir="rtl"],
.urdu-box p,
.certification-text,
.agreement-label-text,
.v-ur,
span[dir="rtl"],
.form-subtitle-urdu,
.popup-alert {
    font-size: 12px !important;
    line-height: 1.7 !important;
}

.urdu-box {
    padding: 10px 12px !important;
    margin: 0 0 12px 0 !important;
}

.urdu-box p {
    font-size: 11.5px !important;
    line-height: 1.75 !important;
}

.form-subtitle-urdu {
    font-size: 13px !important;
}

.field-label span[dir="rtl"] {
    font-size: 11px !important;
}

.certification-text {
    font-size: 11.5px !important;
    line-height: 1.6 !important;
}

.popup-alert {
    font-size: 11px !important;
    line-height: 1.55 !important;
    padding: 8px 10px !important;
}

.agreement-label-text {
    font-size: 11px !important;
}

/* Upload area text */
.upload-text {
    font-size: 11px !important;
}
.upload-text-en {
    font-size: 11px !important;
}
.upload-icon {
    font-size: 22px !important;
}

/* FAQ section compact */
.faq-title {
    font-size: 14px !important;
}
.faq-question {
    font-size: 12.5px !important;
}
.faq-answer {
    font-size: 12px !important;
}


/* ══════════════════════════════════════════════
   Payment Page Tweaks (Fee size up, Instructions size down)
   ══════════════════════════════════════════════ */

/* Bigger Fee Amounts */
.fee-amount {
    font-size: 42px !important;
    font-weight: 800 !important;
    color: #1E7A3E !important;
}

.p2-total-value {
    font-size: 38px !important;
    font-weight: 800 !important;
}

/* Smaller Instructions */
.instructions-title {
    font-size: 13px !important;
    margin-bottom: 8px !important;
}

.instructions-list {
    padding-right: 18px !important;
}

.instructions-list li {
    font-size: 11.5px !important;
    line-height: 1.6 !important;
    margin-bottom: 6px !important;
}

/* Instruction fee highlight size adjust */
#instruction-fee {
    font-size: 12px !important;
}


/* ══════════════════════════════════════════════
   Logo Blending — Make logos look like PNGs
   (removes visible square background boxes)
   ══════════════════════════════════════════════ */
.logo, #logo-left, #logo-right,
.popup-logo, #popup-logo-top {
    background: transparent !important;
    mix-blend-mode: multiply !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    border: none !important;
}

/* Splash screen logo also blends */
#splash-loader img, #splash-loader svg {
    background: transparent !important;
}
