@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;
}

/* --------------------------------------
   Global Loading Animation
   -------------------------------------- */
.global-loader {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.global-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.global-loader .spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(45, 139, 78, 0.2);
    border-radius: 50%;
    border-top-color: #2D8B4E;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* -- Mobile Text Size Reductions -- */
@media (max-width: 480px) {
    .site-title { font-size: 24px !important; }
    .form-subtitle-urdu { font-size: 14px !important; }
    .cta-button { font-size: 16px !important; }
    .faq-question { font-size: 15px !important; }
    .p2-main-title { font-size: 20px !important; }
    .p2-total-value { font-size: 32px !important; }
}

/* -- Aggressive Mobile Fixes -- */
@media (max-width: 480px) {
    .site-title { font-size: 18px !important; margin-bottom: 5px !important; }
    .form-subtitle-urdu { font-size: 12px !important; }
    .cta-button { font-size: 14px !important; padding: 10px !important; }
    .faq-question { font-size: 13px !important; }
    .faq-answer { font-size: 12px !important; }
    .p2-main-title { font-size: 16px !important; }
    .p2-total-value { font-size: 26px !important; }
    .page-wrapper { padding: 10px !important; }
    .card { padding: 15px !important; border-radius: 12px !important; }
    .form-field { margin-bottom: 12px !important; }
    .input-group input, .input-group select, .dob-row select, input[type=text] {
        padding: 10px !important; font-size: 13px !important;
    }
}
