@font-face {
            font-family: 'CodecPro';
            src: url('../Fonts/CodecPro-Regular.otf') format('opentype');
            font-weight: 400;
            font-display: swap;
        }

        @font-face {
            font-family: 'CodecPro';
            src: url('../Fonts/CodecPro-News.otf') format('opentype');
            font-weight: 500;
            font-display: swap;
        }

        @font-face {
            font-family: 'CodecPro';
            src: url('../Fonts/CodecPro-Bold.otf') format('opentype');
            font-weight: 700;
            font-display: swap;
        }

        @font-face {
            font-family: 'CodecPro';
            src: url('../Fonts/CodecPro-ExtraBold.otf') format('opentype');
            font-weight: 800;
            font-display: swap;
        }

        :root {
            --primary: #b51f72;
            --primary-dark: #b51f72;
            --primary-light: #fce4f3;
            --secondary-red: #eb0045;
            --secondary-lime: #e0e326;
            --secondary-teal: #87cfc6;
            --bg: #f2f2f7; /* Native iOS/Android app background */
            --surface: #ffffff;
            --text: #000000;
            --text-muted: #666666;
            --border-light: transparent;
            --radius-lg: 16px;
            --radius-md: 12px;
            --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
            --shadow-md: none;
            --shadow-float: 0 4px 15px rgba(0, 0, 0, 0.05);
        }

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

        body {
            font-family: 'CodecPro', 'Dubai', sans-serif;
            background: var(--bg);
            color: var(--text);
            line-height: 1.6;
            min-height: 100vh;
        }

        /* Native App Header */
        .header {
            background-color: var(--primary);
            color: white;
            padding: calc(20px + env(safe-area-inset-top)) 20px 20px;
            text-align: center;
            border-bottom: none;
            position: relative;
            z-index: 10;
        }

        .header img {
            height: 68px; /* Larger bank logo as requested */
            margin-bottom: 8px;
            filter: drop-shadow(0 2px 5px rgba(0,0,0,0.15)); 
            opacity: 1; /* Clean white */
        }

        .header h1 {
            font-size: 1.3rem;
            font-weight: 700;
            margin-bottom: 4px;
            color: white;
            letter-spacing: 0px;
        }

        .header p {
            font-size: 0.9rem;
            font-weight: 400;
            color: rgba(255,255,255,0.85); /* subtle native text */
        }

        .layout-container {
            max-width: 700px;
            margin: 16px auto 40px; /* True native layout flowing cleanly below header, no overlap */
            padding: 0 16px;
            position: relative;
            z-index: 2;
        }

        /* Step Container */
        .step-box {
            background: var(--surface);
            border-radius: var(--radius-lg);
            padding: 24px;
            box-shadow: var(--shadow-sm);
            margin-bottom: 20px;
            border: none; /* Removed outline for native feel */
        }

        .step-label {
            font-size: 0.9rem;
            color: var(--primary-dark);
            font-weight: 800;
            margin-bottom: 16px;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .step-num {
            background: var(--primary);
            color: white;
            width: 24px;
            height: 24px;
            border-radius: 50%;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 0.75rem;
        }

        /* Category Grid */
        .cat-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 10px;
        }

        .cat-btn {
            padding: 14px 12px;
            border-radius: 12px;
            border: 2px solid #eee;
            background: var(--white);
            cursor: pointer;
            transition: all 0.2s;
            text-align: center;
            font-family: 'CodecPro', 'Dubai', sans-serif;
            font-size: 0.9rem;
            color: var(--text);
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 5px;
        }

        .cat-btn:hover {
            border-color: var(--primary);
            background: #fdf2f8;
        }

        .cat-btn.active {
            border-color: var(--primary);
            background: var(--primary-light);
            color: var(--primary-dark);
            font-weight: bold;
        }

        .cat-btn .cat-icon {
            width: 32px;
            height: 32px;
        }

        .cat-btn .cat-icon svg {
            width: 100%;
            height: 100%;
        }

        .cat-btn .cat-name {
            font-size: 0.82rem;
            line-height: 1.3;
        }

        /* Sub-category */
        .sub-list {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .sub-btn {
            padding: 14px 18px;
            border-radius: 12px;
            border: 2px solid #eee;
            background: var(--white);
            cursor: pointer;
            transition: all 0.2s;
            font-family: 'CodecPro', 'Dubai', sans-serif;
            font-size: 0.95rem;
            color: var(--text);
            text-align: right;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .sub-btn:hover {
            border-color: var(--primary);
            background: #fdf2f8;
        }

        .sub-btn.active {
            border-color: var(--primary);
            background: var(--primary-light);
            color: var(--primary-dark);
            font-weight: bold;
        }

        .sub-btn .arrow {
            color: var(--primary);
            opacity: 0;
            transition: opacity 0.2s;
        }

        .sub-btn:hover .arrow,
        .sub-btn.active .arrow {
            opacity: 1;
        }

        /* Result Card */
        .result-card {
            background: var(--surface);
            border-radius: var(--radius-lg);
            overflow: hidden;
            box-shadow: var(--shadow-sm);
            animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
            border: none;
        }

        @keyframes slideUp {
            from {
                opacity: 0;
                transform: translateY(30px) scale(0.98);
            }
            to {
                opacity: 1;
                transform: translateY(0) scale(1);
            }
        }

        .result-stripe {
            display: none; /* Removed heavy striped header */
        }

        .result-header {
            padding: 24px 24px 16px;
        }

        .result-header h3 {
            color: var(--text);
            font-size: 1.25rem;
            font-weight: 800;
            margin-bottom: 8px;
        }

        .result-header .badge {
            display: inline-flex;
            background: var(--primary-light);
            color: var(--primary-dark);
            padding: 6px 14px;
            border-radius: 50px;
            font-size: 0.85rem;
            font-weight: bold;
        }

        .result-body {
            padding: 10px 25px 25px;
        }

        .info-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 16px 0;
            border-bottom: 1px solid rgba(0,0,0,0.04);
        }

        .info-row:last-of-type {
            border-bottom: none;
        }

        .info-row .label {
            color: var(--text-muted);
            font-size: 0.9rem;
            font-weight: 500;
        }

        .info-row .value {
            font-weight: 800;
            font-size: 1.05rem;
            color: var(--text);
            text-align: left;
        }

        .info-row .value.big {
            color: var(--primary);
            font-size: 1.15rem;
            background: var(--primary-light);
            padding: 4px 12px;
            border-radius: 8px;
        }

        .cond-box {
            background: #fdf2f8;
            padding: 18px;
            border-radius: 16px;
            border-right: 4px solid var(--primary);
            margin-top: 10px;
            font-size: 0.9rem;
            line-height: 1.8;
            color: var(--text);
        }

        /* Placeholder */
        .placeholder {
            text-align: center;
            padding: 40px 20px;
            color: var(--text2);
        }

        .placeholder .ph-icon {
            font-size: 2.5rem;
            margin-bottom: 10px;
            opacity: 0.4;
        }

        /* Reset */
        .reset-btn {
            display: none;
            text-align: center;
            margin-top: 10px;
        }

        .reset-btn button {
            background: none;
            border: 1.5px solid var(--primary);
            color: var(--primary);
            padding: 8px 22px;
            border-radius: 50px;
            font-family: 'Dubai';
            font-size: 0.9rem;
            cursor: pointer;
            transition: all 0.2s;
        }

        .reset-btn button:hover {
            background: var(--primary);
            color: white;
        }

        /* PWA Install Button */
        .pwa-install-banner {
            display: none;
            position: fixed;
            bottom: 20px;
            left: 50%;
            transform: translateX(-50%);
            z-index: 9999;
            background-color: var(--primary);
            color: white;
            padding: 14px 28px;
            border-radius: 50px;
            box-shadow: 0 8px 32px rgba(182, 0, 114, 0.4), 0 2px 8px rgba(0, 0, 0, 0.1);
            cursor: pointer;
            font-family: 'CodecPro', 'Dubai', sans-serif;
            font-size: 0.95rem;
            font-weight: bold;
            border: none;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            animation: slideUpBanner 0.5s ease forwards;
            display: none;
            align-items: center;
            gap: 10px;
            white-space: nowrap;
        }

        .pwa-install-banner:hover {
            transform: translateX(-50%) scale(1.05);
            box-shadow: 0 12px 40px rgba(182, 0, 114, 0.5);
        }

        .pwa-install-banner:active {
            transform: translateX(-50%) scale(0.98);
        }

        .pwa-install-banner .install-icon {
            width: 22px;
            height: 22px;
            flex-shrink: 0;
        }

        .pwa-install-banner .close-install {
            margin-right: 8px;
            background: rgba(255, 255, 255, 0.2);
            border: none;
            color: white;
            width: 24px;
            height: 24px;
            border-radius: 50%;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 14px;
            transition: background 0.2s;
            flex-shrink: 0;
        }

        .pwa-install-banner .close-install:hover {
            background: rgba(255, 255, 255, 0.35);
        }

        @keyframes slideUpBanner {
            from {
                opacity: 0;
                transform: translateX(-50%) translateY(30px);
            }

            to {
                opacity: 1;
                transform: translateX(-50%) translateY(0);
            }
        }

        /* iOS Install Instructions */
        .ios-install-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.6);
            z-index: 10000;
            backdrop-filter: blur(4px);
            -webkit-backdrop-filter: blur(4px);
        }

        .ios-install-modal {
            position: absolute;
            bottom: 30px;
            left: 50%;
            transform: translateX(-50%);
            background: white;
            border-radius: 20px;
            padding: 28px 24px;
            max-width: 340px;
            width: 90%;
            text-align: center;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
            animation: slideUpBanner 0.4s ease;
        }

        .ios-install-modal img {
            width: 60px;
            height: 60px;
            border-radius: 14px;
            margin-bottom: 14px;
        }

        .ios-install-modal h3 {
            color: var(--primary-dark);
            font-size: 1.1rem;
            margin-bottom: 6px;
        }

        .ios-install-modal p {
            color: #666;
            font-size: 0.88rem;
            line-height: 1.7;
            margin-bottom: 16px;
        }

        .ios-install-modal .step-ios {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 10px 14px;
            background: #f8f8fa;
            border-radius: 12px;
            margin-bottom: 8px;
            text-align: right;
            font-size: 0.85rem;
            color: #444;
        }

        .ios-install-modal .step-ios .num {
            background: var(--primary);
            color: white;
            min-width: 24px;
            height: 24px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.75rem;
            font-weight: bold;
        }

        .ios-install-modal .close-modal {
            margin-top: 14px;
            background: var(--primary);
            color: white;
            border: none;
            padding: 10px 30px;
            border-radius: 50px;
            font-family: 'CodecPro', 'Dubai', sans-serif;
            font-size: 0.9rem;
            cursor: pointer;
            transition: background 0.2s;
        }

        .ios-install-modal .close-modal:hover {
            background: var(--primary-dark);
        }

        /* Info Sections */
        .info-section {
            background: var(--surface);
            border-radius: var(--radius-lg);
            padding: 24px;
            box-shadow: var(--shadow-sm);
            margin-top: 16px;
            border: none;
            transition: all 0.3s ease;
        }

        .info-section:active {
            transform: scale(0.99);
        }

        .info-toggle {
            cursor: pointer;
            display: flex;
            justify-content: space-between;
            align-items: center;
            -webkit-tap-highlight-color: transparent;
        }

        .info-toggle h2 {
            color: var(--text);
            font-size: 1.1rem;
            font-weight: 800;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .info-toggle .chevron {
            transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
            color: var(--text2);
            width: 20px;
            height: 20px;
            flex-shrink: 0;
        }

        .info-toggle .chevron svg {
            width: 100%;
            height: 100%;
        }

        .info-section.open .info-toggle .chevron {
            transform: rotate(180deg);
            color: var(--primary);
        }

        .info-content {
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .info-section.open .info-content {
            max-height: 1500px;
        }

        .info-content ul {
            list-style: none;
            padding-top: 15px;
        }

        .info-content ul li {
            position: relative;
            padding-right: 28px;
            margin-bottom: 10px;
            font-size: 0.9rem;
            color: #555;
            line-height: 1.7;
        }

        .info-content ul li::before {
            content: "✓";
            color: white;
            background: var(--primary);
            width: 18px;
            height: 18px;
            border-radius: 50%;
            font-size: 0.6rem;
            position: absolute;
            right: 0;
            top: 5px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .info-content ul li.dash-bullet::before {
            content: "-";
            color: var(--text-muted);
            background: none;
            width: auto;
            height: auto;
            border-radius: 0;
            font-size: 1.1rem;
            font-weight: bold;
            display: inline;
            top: 0;
        }

        .info-content .formula-grid {
            display: grid;
            grid-template-columns: 1fr;
            gap: 12px;
            padding-top: 15px;
        }

        .formula-item {
            background: #f9f9fc;
            padding: 12px;
            border-radius: 10px;
            text-align: center;
        }

        .formula-item h4 {
            font-size: 0.8rem;
            color: var(--primary-dark);
            margin-bottom: 4px;
        }

        .formula-item .f {
            font-weight: bold;
            color: var(--primary);
            font-size: 0.9rem;
        }

        .types-list {
            padding-top: 15px;
            display: flex;
            gap: 15px;
            overflow-x: auto;
            scroll-snap-type: x mandatory;
            padding-bottom: 20px;
            -ms-overflow-style: none;
            /* IE and Edge */
            scrollbar-width: none;
            /* Firefox */
            margin: 0 -5px;
            /* allow padding space */
        }

        .types-list::-webkit-scrollbar {
            display: none;
        }

        .card-detail-box {
            border: none;
            border-radius: 20px;
            padding: 24px;
            background: var(--surface);
            box-shadow: var(--shadow-sm);
            flex: 0 0 90%;
            scroll-snap-align: center;
            display: flex;
            flex-direction: column;
            gap: 16px;
            position: relative;
            overflow: hidden;
            margin: 0 5px;
            direction: rtl;
        }

        .card-detail-box::before {
            display: none; /* Minimalist */
        }

        .card-detail-header {
            display: flex;
            align-items: center;
            gap: 15px;
            border-bottom: 1px solid #f0f0f0;
            padding-bottom: 12px;
        }

        .card-detail-header img {
            height: 45px;
            border-radius: 6px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
        }

        .card-detail-header strong {
            color: var(--primary-dark);
            font-size: 1.05rem;
            line-height: 1.3;
        }

        .card-detail-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 10px;
        }

        .cd-item {
            background: #fdf2f8;
            padding: 14px;
            border-radius: 12px;
            border: 1px solid transparent;
            transition: all 0.2s;
        }

        .cd-item:hover {
            border-color: var(--primary-light);
            background: #fdfcfcf2;
        }

        .cd-label {
            display: flex;
            align-items: center;
            gap: 6px;
            color: var(--primary-dark);
            font-size: 0.85rem;
            font-weight: bold;
            margin-bottom: 6px;
            opacity: 0.9;
        }

        .cd-label::before {
            content: '';
            display: inline-block;
            width: 5px;
            height: 5px;
            background: var(--primary);
            border-radius: 50%;
        }

        .cd-val {
            font-weight: 500;
            color: #333;
            font-size: 0.9rem;
            line-height: 1.5;
            padding-right: 12px;
            display: block;
        }

        /* Modern Calculator UI */
        .modern-calc {
            background: var(--surface);
            border-radius: var(--radius-lg);
            padding: 30px 24px;
            box-shadow: var(--shadow-sm);
            margin-bottom: 24px;
            border: none;
            position: relative;
            overflow: hidden;
        }

        .modern-calc::before {
            display: none; /* Minimalist */
        }

        .calc-header-modern {
            display: flex;
            align-items: center;
            gap: 16px;
            margin-bottom: 24px;
            border-bottom: none;
            padding-bottom: 0;
        }

        .calc-header-modern .icon-wrapper {
            background: var(--primary-light);
            color: var(--primary);
            width: 48px;
            height: 48px;
            border-radius: 16px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.5rem;
            box-shadow: 0 4px 10px rgba(182, 0, 114, 0.1);
        }

        .calc-header-modern h2 {
            font-size: 1.25rem;
            color: #1a1a1a;
            margin: 0;
            font-weight: 800;
        }

        .calc-header-modern p {
            color: var(--text2);
            font-size: 0.85rem;
            margin-top: 4px;
        }

        .calc-section-title {
            font-size: 0.95rem;
            color: var(--primary-dark);
            font-weight: bold;
            display: flex;
            align-items: center;
            gap: 8px;
            margin-bottom: 16px;
            margin-top: 8px;
        }

        .calc-section-title::before {
            content: '';
            display: block;
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background: var(--primary);
        }

        .modern-calc-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 16px;
            margin-bottom: 24px;
        }

        .modern-input-group {
            display: flex;
            flex-direction: column;
            gap: 6px;
            position: relative;
        }

        .modern-input-group label {
            font-size: 0.85rem;
            color: #4a4a5a;
            font-weight: 600;
            margin-left: 4px;
        }

        .modern-input-wrapper {
            position: relative;
            display: flex;
            align-items: center;
        }

        .modern-input-wrapper .currency-symbol {
            position: absolute;
            right: 16px;
            color: var(--text-muted);
            font-weight: 800;
            font-size: 1.1rem;
            pointer-events: none;
        }

        .modern-input-group input {
            width: 100%;
            padding: 16px 40px 16px 16px;
            border: 1px solid var(--border-light);
            border-radius: 12px;
            font-family: 'CodecPro', 'Dubai', sans-serif;
            font-size: 1.05rem;
            font-weight: 700;
            color: var(--text);
            background: #fafafa;
            outline: none;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            appearance: none;
        }

        .modern-input-group input:hover {
            background: #f5f5f5;
        }

        .modern-input-group input:focus {
            border-color: var(--text);
            background: #ffffff;
            box-shadow: none;
        }

        .modern-input-group input::placeholder {
            color: #a0a4ab;
            font-weight: 500;
        }

        .modern-calc-btn {
            width: 100%;
            padding: 16px;
            background-color: var(--primary);
            color: white;
            border: none;
            border-radius: 12px;
            font-family: 'CodecPro', 'Dubai', sans-serif;
            font-size: 1.05rem;
            font-weight: bold;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 10px;
            box-shadow: 0 6px 16px rgba(182, 0, 114, 0.3);
            margin-top: 8px;
        }

        .modern-calc-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 24px rgba(182, 0, 114, 0.4);
        }

        .modern-calc-btn:active {
            transform: translateY(0);
        }

        .modern-calc-btn svg {
            width: 20px;
            height: 20px;
            stroke-width: 2.5;
        }

        #calc-result {
            margin-top: 24px;
            background: #fff;
            border: 1px solid var(--primary-light);
            border-radius: 16px;
            padding: 20px;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
            animation: fadeIn 0.4s ease;
            position: relative;
            overflow: hidden;
        }

        #calc-result::before {
            content: '';
            position: absolute;
            top: 0;
            right: 0;
            bottom: 0;
            width: 4px;
            background: var(--primary);
            border-radius: 0 16px 16px 0;
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(10px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        @media (max-width: 600px) {
            .modern-calc-grid {
                grid-template-columns: 1fr;
                gap: 12px;
            }

            .modern-calc {
                padding: 24px 20px;
            }
        }

        .hidden {
            display: none;
        }

        .spacer {
            height: 10px;
        }

        /* Footer */
        .footer {
            background: transparent;
            text-align: center;
            padding: 30px 20px 28px;
            margin-top: 10px;
        }

        .footer .footer-divider {
            width: 40px;
            height: 2px;
            background: var(--primary);
            opacity: 0.25;
            margin: 0 auto 16px;
            border-radius: 2px;
        }

        .footer p {
            margin: 3px 0;
            color: #aaa;
            font-size: 0.8rem;
            letter-spacing: 0.02em;
        }

        .footer .copyright {
            color: #ccc;
            font-size: 0.72rem;
            margin-top: 8px;
        }

        @media (max-width: 500px) {
            .header {
                padding: 25px 15px 55px;
                border-radius: 0 0 25px 25px;
            }

            .header h1 {
                font-size: 1.4rem;
            }

            .cat-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 8px;
            }

            .step-box {
                padding: 20px;
            }

            .info-content .formula-grid {
                grid-template-columns: 1fr;
            }
        }

        @media print {
            .header {
                padding: 15px;
                border-radius: 0;
            }

            .cat-grid,
            .sub-list,
            .reset-btn,
            .info-section {
                display: none;
            }

            .result-card {
                box-shadow: none;
                border: 1px solid #ddd;
            }
        }

        /* Modern Select */
        .select-wrapper {
            position: relative;
        }

        .select-wrapper::after {
            content: '▼';
            font-size: 0.7rem;
            color: var(--text-muted);
            position: absolute;
            left: 20px; /* RTL layout */
            top: 50%;
            transform: translateY(-50%);
            pointer-events: none;
        }

        .modern-select {
            width: 100%;
            padding: 18px 24px;
            font-family: 'CodecPro', 'Dubai', sans-serif;
            font-size: 1.05rem;
            font-weight: 700;
            color: var(--text);
            border: 1px solid var(--border-light);
            border-radius: 12px;
            background-color: #fafafa;
            appearance: none;
            -webkit-appearance: none;
            -moz-appearance: none;
            outline: none;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            cursor: pointer;
            box-shadow: none;
            direction: rtl;
        }

        .modern-select:hover {
            background-color: #f5f5f5;
        }

        .modern-select:focus {
            border-color: var(--text);
            background-color: var(--surface);
            box-shadow: none;
        }

        .policy-btn {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            background-color: var(--surface);
            color: var(--primary);
            padding: 10px 20px;
            border: 2px solid var(--primary);
            border-radius: 50px;
            font-size: 0.9rem;
            font-weight: bold;
            text-decoration: none;
            box-shadow: 0 4px 10px rgba(0,0,0,0.04);
            transition: all 0.3s ease;
        }

        .policy-btn:hover {
            background-color: var(--primary);
            color: white;
            box-shadow: 0 6px 15px rgba(181, 31, 114, 0.2);
            border-color: var(--primary);
        }
