@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');

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

body {
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #fefefe;
    background: #630084;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    text-shadow: none;
    padding-top: 80px; /* Add padding for fixed header */
}

.container {
    position: relative;
    z-index: 2;
    padding: 5px 6px 15px 6px;
}

/* Fixed Header */
.fixed-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #c43a00 0%, #f59e0b 100%);
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border-radius: 0 0 20px 20px;
    transition: all 0.3s ease; /* Add transition for smooth effect */
}

/* Dark overlay effect when modal is open */
.fixed-header.modal-open {
    background: linear-gradient(135deg, #9a3412 0%, #c43a00 100%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    filter: brightness(0.7) blur(1px);
}

.fixed-header.modal-open .header-title {
    color: rgba(255, 255, 255, 0.8);
}

.fixed-header.modal-open .back-button,
.fixed-header.modal-open .history-button {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.26);
}

.fixed-header.modal-open .back-button:hover,
.fixed-header.modal-open .history-button:hover {
    background: rgba(255, 255, 255, 0.18);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    position: relative;
}

.header-title {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    text-align: center;
    flex: 1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.back-button, .history-button {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    flex-shrink: 0;
}

.back-button:hover, .history-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.back-button i, .history-icon {
    color: white;
    font-size: 1rem;
}

.history-icon {
    width: 1.5rem;
    height: 1.5rem;
    object-fit: contain;
}

/* Remove old header styles */
.header {
    display: none;
}

.header-text {
    display: none;
}

.header h1 {
    display: none;
}

.header p {
    display: none;
}

/* Main Content */
.main-content {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
    margin-top: 0; /* Remove margin to touch header */
}

/* Loan Offer Card */
.loan-offer-card {
    background: linear-gradient(135deg, #ff993a 0%, #ff6600 40%, #ff0000 100%);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 12px 30px rgba(249, 191, 36, 0.25);
    width: 100%;
    max-width: none;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin: 0 auto 2rem;
    border: 1px solid rgba(234, 179, 8, 0.35);
    color: #6b240a;
}

/* Silver Card - Dark White Background */
.silver-card {
    background: #e8e8e8 !important;
    border: 1px solid rgba(200, 200, 200, 0.5);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

/* Manager Card (Gryphon) - White Background */
.manager-card {
    background: #e8e8e8 !important;
    border: 1px solid rgba(200, 200, 200, 0.5);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

/* Director Card (Phoenix) - White Background */
.director-card {
    background: #e8e8e8 !important;
    border: 1px solid rgba(200, 200, 200, 0.5);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

/* CEO Card (Garuda) - White Background */
.ceo-card {
    background: #e8e8e8 !important;
    border: 1px solid rgba(200, 200, 200, 0.5);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

/* Card Header Wrapper - Horizontal Layout */
.card-header-wrapper {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    margin-top: -0.5rem;
    align-items: center; /* Center icon and header vertically */
}

/* Card Header Icon - Left Side (3D circular badge) */
.card-header-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent; /* Overridden per card with gradient */
    border-radius: 50%; /* Circular shape */
    width: 5rem;
    height: 5rem;
    min-width: 5rem;
    padding: 0.5rem;
    flex-shrink: 0;
    /* Softer 3D-style shadow */
    box-shadow:
        0 4px 10px rgba(15, 23, 42, 0.22),   /* outer drop shadow (reduced) */
        0 0 0 1px rgba(255, 255, 255, 0.28), /* soft outer ring (thinner) */
        inset 0 3px 4px rgba(255, 255, 255, 0.3), /* top highlight (softer) */
        inset 0 -3px 4px rgba(15, 23, 42, 0.25);  /* bottom inner shadow (softer) */
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.card-header-icon::before {
    content: '';
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    /* glossy highlight on the top-left to enhance 3D look */
    background: radial-gradient(circle at 25% 20%, rgba(255, 255, 255, 0.7), transparent 55%);
    pointer-events: none;
    mix-blend-mode: screen;
}

/* slight press effect on hover */
.card-header-icon:hover {
    transform: translateY(-2px);
    box-shadow:
        0 6px 14px rgba(15, 23, 42, 0.28),
        0 0 0 1px rgba(255, 255, 255, 0.3),
        inset 0 4px 6px rgba(255, 255, 255, 0.32),
        inset 0 -4px 6px rgba(15, 23, 42, 0.28);
}

/* Background colors matching icon colors */
/* Rajawali (silver-card) - Blue */
.silver-card .card-header-icon {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

/* Gryphon (manager-card) - Orange */
.manager-card .card-header-icon {
    background: linear-gradient(135deg, #f97316 0%, #f59e0b 100%);
}

/* Phoenix (director-card) - Red */
.director-card .card-header-icon {
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
}

/* Garuda (ceo-card) - Red (same as Phoenix) */
.ceo-card .card-header-icon {
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
}

/* Card Header - Right Side */
.card-header {
    margin: 0;
    position: relative;
    z-index: 1;
    color: #6b240a;
    background: #ffffff;
    border-radius: 16px; /* Increased from 10px for more rounded corners */
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Level Info Section */
.level-info-section {
    margin-top: 0.75rem;
    margin-bottom: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem; /* Reduced from 0.5rem for tighter spacing */
}

.level-info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: #555555;
    line-height: 1.2; /* Reduced from 1.4 for tighter spacing */
}

.level-info-item i {
    color: #22c55e; /* Green checkmark */
    font-size: 1rem;
    flex-shrink: 0;
}

.level-info-text {
    color: #555555;
    font-weight: 400;
    white-space: nowrap; /* Prevent text wrapping to keep horizontal */
}

.level-info-item.level-info-potential {
    background: #F0F0F0;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-top: 0.25rem;
}

.level-info-item.level-info-potential .level-info-text {
    font-weight: 700;
    font-size: 0.85rem;
    color: #333333;
}

.level-reward,
.level-total,
.level-potential {
    font-weight: 600;
    color: #333333;
}

/* Background circular removed - only icon visible */

/* Curved background inside loan-offer-card */
.card-curved-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 115px;
    background-image: url('../img/bglengkung.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 20px 20px 50% 50% / 20px 20px 40px 40px;
    z-index: 0;
}

.card-curved-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #f97316 0%, #fbbf24 100%);
    opacity: 0.5;
    border-radius: inherit;
    z-index: 1;
}

/* Themed overlay gradients per card */
.silver-card .card-curved-bg::before {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}
.manager-card .card-curved-bg::before {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}
.director-card .card-curved-bg::before {
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
}
.ceo-card .card-curved-bg::before {
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
}

/* All cards now use white background for amount-label (top section) */

.loan-offer-card .info-boxes,
.loan-offer-card .action-section,
.loan-offer-card .card-header,
.loan-offer-card .card-header-wrapper {
    position: relative;
    z-index: 2;
}

.amount {
    font-size: 1.4rem; /* Reduced from 1.75rem */
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    padding: 0.5rem 1rem;
    background: linear-gradient(to right, #EEA5C1 0%, #C7588C 100%); /* Default pink to magenta gradient */
    border-radius: 0 0 16px 16px; /* Increased to match card-header */
    text-align: left;
    line-height: 1.2;
}

/* Amount background colors matching icon colors */
/* Rajawali (silver-card) - Blue */
.silver-card .amount {
    background: linear-gradient(to right, #3b82f6 0%, #1d4ed8 100%); /* Blue gradient */
}

/* Gryphon (manager-card) - Orange */
.manager-card .amount {
    background: linear-gradient(to right, #f97316 0%, #f59e0b 100%); /* Orange gradient */
}

/* Phoenix (director-card) - Red */
.director-card .amount {
    background: linear-gradient(to right, #ef4444 0%, #b91c1c 100%); /* Red gradient */
}

/* Garuda (ceo-card) - Red */
.ceo-card .amount {
    background: linear-gradient(to right, #ef4444 0%, #b91c1c 100%); /* Red gradient */
}

.amount-label {
    font-size: 1.3rem; /* Increased font size */
    color: #333333; /* Dark text for white background */
    font-weight: 700;
    background: #ffffff; /* White background for top section */
    padding: 0.5rem 1rem;
    border-radius: 16px 16px 0 0; /* Increased to match card-header */
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
    box-shadow: none;
    text-shadow: none;
    position: relative;
    overflow: hidden;
    line-height: 1.2;
}
/* Bold the job level text (Karyawan, Manager, Direktur, CEO) */
.amount-label span {
    font-weight: 700;
    color: #333333;
}

/* Removed specific silver-card amount-label styling to use default white background */

.amount-label i {
    color: rgba(255, 255, 255, 0.9); /* Light white for icon */
    font-size: 0.9rem;
    text-shadow: none;
    margin-right: 0.1rem;
}

/* Icon background now handled by card-header::before */

/* Icon in card-header-icon - Make it white to contrast with colored background */
.card-header-icon .amount-icon {
    width: 3rem;
    height: 3rem;
    object-fit: contain;
    display: block;
    filter: brightness(0) invert(1); /* Make icon white */
}

/* Information Boxes */
.info-boxes {
    display: flex;
    gap: 0.7rem;
    margin-bottom: 0.6rem;
    justify-content: space-between;
    flex-direction: row;
}

.info-box {
    background: linear-gradient(135deg, #fff7ed 0%, #fef3c7 60%, #fde68a 100%);
    border-radius: 12px;
    padding: 0.7rem 0.5rem;
    flex: 1;
    min-width: 100px;
    max-width: none;
    box-shadow: 0 6px 18px rgba(249, 191, 36, 0.18);
    border: 1px solid rgba(234, 179, 8, 0.45);
    color: #6b240a;
}

.silver-card .info-box {
    border: 1px solid rgba(59, 130, 246, 0.35);
}

.info-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.4rem;
}

.info-icon i {
    font-size: 1.2rem;
    color: #b45309;
}

/* Remove any shadow from icons inside info boxes */
.info-icon i,
.info-icon img {
    text-shadow: none !important;
    filter: none !important;
    box-shadow: none !important;
}

/* Specific icon colors for each info box */
.info-boxes .info-box:nth-child(1) .info-icon i { color: #f59e0b; }
.info-boxes .info-box:nth-child(2) .info-icon i { color: #fb923c; }
.info-boxes .info-box:nth-child(3) .info-icon i { color: #b45309; }

.silver-card .info-boxes .info-box:nth-child(1) .info-icon i { color: #60a5fa; }
.silver-card .info-boxes .info-box:nth-child(2) .info-icon i { color: #3b82f6; }
.silver-card .info-boxes .info-box:nth-child(3) .info-icon i { color: #2563eb; }

.info-value {
    font-size: 0.85rem;
    font-weight: 700;
    color: #6b240a;
    line-height: 1.1;
    text-shadow: none;
}

.info-label {
    font-size: 0.7rem;
    color: #b45309;
    font-weight: 500;
    text-align: center;
    line-height: 1.1;
    text-shadow: none;
}

/* Action Section */
.action-section {
    margin-top: 1rem;
}

.earning-box {
    width: 100%;
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    border: 1px solid #a5b4fc;
    border-radius: 15px;
    padding: 0.6rem 1rem;
    margin-bottom: 0.75rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
    overflow: hidden;
    animation: earning-float 2.5s ease-in-out infinite;
    will-change: transform;
}

/* Full-width estimate box styled like info-box */
.estimate-full {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: linear-gradient(135deg, #fef3c7 0%, #fbbf24 100%);
    border: 1px solid rgba(234, 179, 8, 0.5);
    border-radius: 12px;
    padding: 0.7rem 0.8rem;
    box-shadow: 0 8px 22px rgba(234, 179, 8, 0.25);
    margin-bottom: 0.6rem;
    animation: estimate-pulse 2s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

/* Pulsing animation for estimate boxes */
@keyframes estimate-pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 6px 20px rgba(59, 130, 246, 0.3);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    }
}

/* Shimmer effect for estimate boxes */
.estimate-full::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: estimate-shimmer 3s infinite;
}

@keyframes estimate-shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

.estimate-full .info-icon { margin: 0; margin-left: 0.3rem; }
.estimate-full .info-icon i { color: #b45309; /* warm brown for dark background */ }
.estimate-full .info-value { font-size: 0.85rem; font-weight: 600; color: #6b240a; }
.estimate-full .info-value strong { font-weight: 700; }

.silver-card .estimate-full {
    background: linear-gradient(135deg, #fff7ed 0%, #fef3c7 60%, #fbbf24 100%);
    border: 1px solid rgba(234, 179, 8, 0.5);
    box-shadow: 0 8px 22px rgba(234, 179, 8, 0.25);
}
.silver-card .estimate-full .info-icon i { color: #2563eb; }
.silver-card .estimate-full .info-value { color: #1e3a8a; }

.earning-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    color: #000;
    font-weight: 700;
    line-height: 1.2;
}

/* Shimmer highlight sweep */
.earning-box::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 25%, rgba(139, 92, 246, 0.45) 50%, transparent 75%);
    transform: translateX(-100%);
    animation: earning-sheen 1.8s linear infinite;
    pointer-events: none;
}

@keyframes earning-sheen {
    0%   { transform: translateX(-120%); }
    100% { transform: translateX(120%); }
}

/* Gentle float animation */
@keyframes earning-float {
    0%   { transform: translateY(0); }
    50%  { transform: translateY(-3px); }
    100% { transform: translateY(0); }
}

.earning-label {
    font-size: 0.85rem;
    text-shadow: none;
}

.earning-amount {
    font-size: 0.9rem;
    text-shadow: none;
}

.apply-button {
    background: linear-gradient(135deg, #fe6c51 0%, #fd1c4f 100%); /* Warm gradient */
    color: #fff;
    border: none;
    border-radius: 15px;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    width: 100%;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 4px 0 rgba(239, 68, 68, 0.55), 0 8px 16px rgba(239, 68, 68, 0.28);
}

.apply-button:hover {
    background: linear-gradient(135deg, #f94c49 0%, #e11d48 100%); /* Darker warm gradient on hover */
    transform: translateY(-1px);
    box-shadow: 0 5px 0 rgba(239, 68, 68, 0.6), 0 10px 20px rgba(239, 68, 68, 0.32);
}

/* Override button themes per card */
.manager-card .apply-button { background: linear-gradient(135deg, #f97316 0%, #f59e0b 100%); }
.manager-card .apply-button:hover { background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%); }
.manager-card .check-button { border-color: #ea580c; color: #ea580c; }
.manager-card .check-button:hover { background: rgba(234, 88, 12, 0.1); }

/* tinted raised shadow for manager (warm) */
.manager-card .apply-button { box-shadow: 0 4px 0 rgba(234, 88, 12, 0.55), 0 8px 16px rgba(234, 88, 12, 0.28); }
.manager-card .apply-button:hover { box-shadow: 0 5px 0 rgba(234, 88, 12, 0.6), 0 10px 20px rgba(234, 88, 12, 0.32); }
.manager-card .apply-button:active { box-shadow: 0 2px 0 rgba(234, 88, 12, 0.5), 0 6px 12px rgba(234, 88, 12, 0.24); }

.director-card .apply-button { background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%); }
.director-card .apply-button:hover { background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%); }
.director-card .check-button { border-color: #b91c1c; color: #b91c1c; }
.director-card .check-button:hover { background: rgba(185, 28, 28, 0.1); }

/* tinted raised shadow for director (red) */
.director-card .apply-button { box-shadow: 0 4px 0 rgba(239, 68, 68, 0.55), 0 8px 16px rgba(185, 28, 28, 0.28); }
.director-card .apply-button:hover { box-shadow: 0 5px 0 rgba(239, 68, 68, 0.6), 0 10px 20px rgba(185, 28, 28, 0.32); }
.director-card .apply-button:active { box-shadow: 0 2px 0 rgba(239, 68, 68, 0.5), 0 6px 12px rgba(185, 28, 28, 0.24); }

.ceo-card .apply-button { background: linear-gradient(135deg, #f97316 0%, #f59e0b 100%); }
.ceo-card .apply-button:hover { background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%); }
.ceo-card .check-button { border-color: #b91c1c; color: #b91c1c; }
.ceo-card .check-button:hover { background: rgba(185, 28, 28, 0.1); }

/* tinted raised shadow for CEO (warm) */
.ceo-card .apply-button { box-shadow: 0 4px 0 rgba(234, 88, 12, 0.55), 0 8px 16px rgba(234, 88, 12, 0.28); }
.ceo-card .apply-button:hover { box-shadow: 0 5px 0 rgba(234, 88, 12, 0.6), 0 10px 20px rgba(234, 88, 12, 0.32); }
.ceo-card .apply-button:active { box-shadow: 0 2px 0 rgba(234, 88, 12, 0.5), 0 6px 12px rgba(234, 88, 12, 0.24); }

/* Silver (first card) blue theme */
.silver-card .apply-button {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    box-shadow: 0 4px 0 rgba(59, 130, 246, 0.55), 0 8px 16px rgba(59, 130, 246, 0.28);
}
.silver-card .apply-button:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e3a8a 100%);
    box-shadow: 0 5px 0 rgba(59, 130, 246, 0.6), 0 10px 20px rgba(59, 130, 246, 0.32);
}
.silver-card .apply-button:active {
    box-shadow: 0 2px 0 rgba(59, 130, 246, 0.5), 0 6px 12px rgba(59, 130, 246, 0.24);
}

.apply-button:active {
    transform: translateY(3px);
    box-shadow: 0 2px 0 rgba(59, 130, 246, 0.5), 0 6px 12px rgba(59, 130, 246, 0.24);
}

.apply-button i {
    font-size: 1rem;
}

/* glossy highlight to enhance raised effect */
.apply-button::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.05) 45%, rgba(0, 0, 0, 0) 46%);
    pointer-events: none;
}
.check-button {
    margin-top: 0.6rem;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.45rem 2rem;
    border-radius: 15px;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid #f59e0b;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%); /* Yellow like previous earning-box */
    color: #f59e0b;
    transition: all 0.25s ease;
    line-height: 1.1;
}

.check-button i {
    font-size: 1rem;
}

.check-button:hover {
    background: linear-gradient(135deg, #fde68a 0%, #fbbf24 100%); /* Darker yellow shade on hover */
}

/* Karyawan (first card) check-button: dark blue text/icon + stroke, keep yellow background */
.main-content .loan-offer-card:first-of-type .check-button {
    border-color: #b45309; /* warm brown stroke */
    color: #b45309; /* warm brown text */
}

.main-content .loan-offer-card:first-of-type .check-button i {
    color: #b45309; /* warm brown icon */
}

.silver-card .check-button {
    border-color: #1d4ed8;
    color: #1d4ed8;
}
.silver-card .check-button i {
    color: #1d4ed8;
}
.silver-card .check-button:hover {
    background: rgba(37, 99, 235, 0.1);
}

.apply-icon {
    width: 22px;
    height: 22px;
    object-fit: contain;
    filter: drop-shadow(0 1px 1px rgba(0,0,0,0.15));
    position: relative;
    top: -2px; /* disesuaikan agar tidak terlalu ke bawah */
    margin-right: 8px; /* jarak dengan teks */
    margin-left: -4px; /* sedikit lebih ke kiri */
}

.apply-button span {
    display: inline-flex;
    align-items: center;
}



/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding-top: 70px; /* Reduce padding for mobile */
    }
    
    .fixed-header {
        border-radius: 0 0 15px 15px;
    }
    
    .header-content {
        padding: 12px 15px;
    }
    
    .header-title {
        font-size: 1.3rem;
    }
    
    .back-button, .history-button {
        width: 35px;
        height: 35px;
    }
    
    .back-button i, .history-icon {
        font-size: 0.9rem;
    }
    
    .history-icon {
        width: 1.3rem;
        height: 1.3rem;
    }
    
    .main-content {
        margin-top: 0; /* Ensure no gap on mobile */
    }
}

@media (max-width: 480px) {
    body {
        padding-top: 65px; /* Further reduce padding for small screens */
    }
    
    .header-content {
        padding: 10px 12px;
    }
    
    .header-title {
        font-size: 1.2rem;
    }
    
    .back-button, .history-button {
        width: 32px;
        height: 32px;
    }
    
    .back-button i, .history-icon {
        font-size: 0.8rem;
    }
    
    .history-icon {
        width: 1.2rem;
        height: 1.2rem;
    }
    
    .main-content {
        margin-top: 0; /* Ensure no gap on small screens */
    }
    
    .loan-offer-card {
        padding: 1.5rem;
        margin: 0 auto 1.25rem; /* remove extra top gap on mobile */
        max-width: 100%;
        width: calc(100% - 8px);
    }
    
    .amount {
        font-size: 1.6rem;
    }
    
    .info-boxes {
        flex-direction: row;
        gap: 0.35rem;
    }
    
    .info-box {
        min-width: 75px;
        max-width: none;
        padding: 0.7rem 0.35rem;
    }
    
    .info-icon {
        margin-bottom: 0.3rem;
    }
    
    .info-icon i {
        font-size: 0.9rem;
    }
    
    .info-value {
        font-size: 0.75rem;
    }
    
    .info-label {
        font-size: 0.65rem;
    }

    /* Earning box text sizes on small screens */
    .earning-label {
        font-size: 0.8rem;
    }

    .earning-amount {
        font-size: 0.85rem;
    }
}

/* Extra Small Mobile (Android) */
@media (max-width: 360px) {
    .info-boxes {
        gap: 0.3rem;
    }
    
    .info-box {
        min-width: 70px;
        padding: 0.6rem 0.3rem;
    }
    
    .info-icon {
        margin-bottom: 0.25rem;
    }
    
    .info-icon i {
        font-size: 0.8rem;
    }
    
    .info-value {
        font-size: 0.7rem;
    }
    
    .info-label {
        font-size: 0.6rem;
    }
}

/* Large Screen Enhancement */
@media (min-width: 768px) {
    .loan-offer-card {
        max-width: calc(100% - 12px);
        padding: 2.5rem;
    }
    
    .info-boxes {
        gap: 1.5rem;
    }
    
    .info-box {
        max-width: 200px;
        padding: 1.5rem 1rem;
    }
    
    .info-icon {
        margin-bottom: 0.6rem;
    }
    
    .info-icon i {
        font-size: 1.5rem;
    }
    
    .amount {
        font-size: 2.4rem;
    }
    
    .info-value {
        font-size: 1.2rem;
    }
}

/* Payment Modal */
.modal { display: none; }
.modal[aria-hidden="false"] { display: block; }
.modal, .modal * { text-shadow: none !important; }
.modal-backdrop {
    position: fixed; inset: 0; background: rgba(0,0,0,0.75); backdrop-filter: blur(3px);
    z-index: 999; opacity: 0; transition: opacity 0.2s ease;
}
.modal[aria-hidden="false"] .modal-backdrop { opacity: 1; }
.modal-dialog {
    position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%);
    width: min(92vw, 420px);
    /* Match dark-white level card background */
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(249, 115, 22, 0.25);
    overflow: hidden; z-index: 1000;
    color: #7C2D12; /* ensure readable text on light modal surfaces */
}
.modal-header {
    background: linear-gradient(135deg, #F97316 0%, #FB923C 50%, #FBBF24 100%);
    color: #ffffff;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-header h2 {
    font-size: 1rem;
    color: #ffffff;
}
.modal-close { background: transparent; border: 0; color: #ffffff; font-size: 1.25rem; cursor: pointer; }
.modal-body { padding: 14px 16px 4px 16px; }
.package-row {
    display: flex;
    gap: 12px;
    align-items: center;
    background: linear-gradient(135deg, #ffb561 0%, #ffedc7 50%, #ffd3b0 100%);
    border: 1px solid #FDBA74;
    border-radius: 10px;
    padding: 10px;
}
.package-icon { width: 40px; height: 40px; border-radius: 8px; background: #e5e7eb; display: grid; place-items: center; color: #6b7280; }
.package-icon { position: relative; }
.package-icon img { width: 28px; height: 28px; object-fit: contain; filter: none; position: relative; z-index: 1; }
.package-icon .masked-level-icon { position: absolute; inset: 0; margin: auto; width: 28px; height: 28px; background: linear-gradient(135deg, #f97316, #fbbf24); -webkit-mask-size: contain; -webkit-mask-repeat: no-repeat; -webkit-mask-position: center; mask-size: contain; mask-repeat: no-repeat; mask-position: center; z-index: 2; }

/* Package row & icon colors follow level (modal theme) */
/* Rajawali (theme-blue) */
.modal.theme-blue .package-row {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 60%, #bfdbfe 100%);
    border-color: #3b82f6;
}
.modal.theme-blue .package-icon {
    background: #e0f2fe;
    color: #1d4ed8;
}

/* Gryphon (theme-orange) */
.modal.theme-orange .package-row {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 60%, #fed7aa 100%);
    border-color: #f97316;
}
.modal.theme-orange .package-icon {
    background: #ffedd5;
    color: #c2410c;
}

/* Phoenix / Garuda (theme-red) */
.modal.theme-red .package-row {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 60%, #fecaca 100%);
    border-color: #ef4444;
}
.modal.theme-red .package-icon {
    background: #fee2e2;
    color: #b91c1c;
}

/* Level lain yang gunakan theme-green (user sudah ubah ke ungu) */
.modal.theme-green .package-row {
    background: linear-gradient(135deg, #f0ecfd 0%, #e0d7ff 60%, #c4b5fd 100%);
    border-color: #5933ff;
}
.modal.theme-green .package-icon {
    background: #f0ecfd;
    color: #4c1d95;
}
.package-info { display: flex; flex-direction: column; }
.package-name { font-weight: 700; font-size: 0.95rem; color: #7C2D12; }
.package-price { font-weight: 700; color: #C2410C; font-size: 1.1rem; }
/* tighten spacing between name and price */
.package-name { margin-bottom: 2px; line-height: 1.1; }
.package-price { margin-top: 0; line-height: 1.1; }
.promo-toggle-section {
    margin: 4px 0 -2px 0;
    text-align: left;
}

.promo-toggle-btn {
    background: none;
    color: #3b82f6;
    border: none;
    padding: 4px 0;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 500;
    display: inline-block;
    transition: color 0.3s ease;
    text-decoration: none;
}

.promo-toggle-btn:hover {
    color: #2563eb;
    text-decoration: underline;
}

.promo-toggle-btn:active {
    color: #1e40af;
}


.promo-form-section {
    margin: -2px 0 8px 0;
}

.promo-row { 
    display: flex; 
    gap: 8px; 
    margin: 2px 0; 
    width: 100%;
    box-sizing: border-box;
}
#promo-input { 
    flex: 1; 
    border: 1px solid #d1d5db; 
    border-radius: 8px; 
    padding: 8px 10px; 
    font-size: 0.95rem; 
    min-width: 0; /* Allow input to shrink */
    box-sizing: border-box;
}
.btn-secondary { 
    background: #2563eb; 
    color: #fff; 
    border: 0; 
    padding: 8px 14px; 
    border-radius: 8px; 
    cursor: pointer; 
    flex-shrink: 0; /* Prevent button from shrinking */
    white-space: nowrap; /* Prevent text wrapping */
}

.promo-telegram-info {
    margin: 4px 0 4px 0 !important;
    text-align: left;
    padding-left: 4px;
}

.promo-telegram-info p {
    font-size: 0.7rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.4;
    font-style: italic;
}

.promo-telegram-info .telegram-link {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.promo-telegram-info .telegram-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}
.methods-title { font-weight: 700; color: #7C2D12; margin: 8px 0 8px 0; }
.method-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.method-item { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    gap: 6px; 
    padding: 14px 12px; 
    border: 1px solid #FCD34D; 
    border-radius: 10px; 
    background: #FEF3C7; 
    cursor: pointer; 
    transition: all 0.2s ease;
}

/* Theme-based light backgrounds (warna muda) sesuai jabatan */
.modal.theme-green .method-item { background: #f0ecfd; border-color: #5933ff; }
.modal.theme-orange .method-item { background: #fff7ed; border-color: #fdba74; }
.modal.theme-blue .method-item { background: #eff6ff; border-color: #93c5fd; }
.modal.theme-red .method-item { background: #fef2f2; border-color: #fecaca; }

.modal.theme-green .method-item:hover { border-color: #5933ff; }
.modal.theme-orange .method-item:hover { border-color: #fb923c; }
.modal.theme-blue .method-item:hover { border-color: #60a5fa; }
.modal.theme-red .method-item:hover { border-color: #f87171; }

.method-item i {
    font-size: 20px;
    color: #c2410c;
}

.method-item[data-method="mbanking"] i {
    background: linear-gradient(135deg, #f97316 0%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.method-item[data-method="crypto"] i {
    background: linear-gradient(135deg, #f97316 0%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.method-item span {
    font-size: 0.8rem;
    font-weight: 600;
    color: #7C2D12;
}

.method-item.active { 
    border-color: #2563eb; 
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12) inset; 
}

/* Per-level accent colors for payment methods (ikon, border, teks) */
/* Rajawali (theme-blue) -> biru */
.modal.theme-blue .method-item {
    border-color: #3b82f6;
}
.modal.theme-blue .method-item i {
    color: #2563eb;
}
.modal.theme-blue .method-item span {
    color: #1d4ed8;
}

/* Gryphon (theme-orange) -> oranye */
.modal.theme-orange .method-item {
    border-color: #f97316;
}
.modal.theme-orange .method-item i {
    color: #ea580c;
}
.modal.theme-orange .method-item span {
    color: #c2410c;
}

/* Phoenix & Garuda (theme-red) -> merah */
.modal.theme-red .method-item {
    border-color: #ef4444;
}
.modal.theme-red .method-item i {
    color: #dc2626;
}
.modal.theme-red .method-item span {
    color: #b91c1c;
}

.method-logos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 10px; }
.method-logo { background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 4px 6px; display: flex; align-items: center; gap: 6px; }
.method-logo { position: relative; cursor: pointer; }
.method-logo.selected { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,0.15) inset; }
.method-logo.selected::after { content: "\2713"; position: absolute; right: 8px; top: 50%; transform: translateY(-50%); color: #3b82f6; font-weight: 800; font-size: 14px; }
.method-logo img { max-width: 44px; max-height: 18px; width: auto; height: auto; object-fit: contain; }
.method-logo span { font-size: 0.8rem; font-weight: 600; color: #111827; }

/* Payment breakdown */
.payment-breakdown { margin-top: 10px; background: #ffffe4; border: 1px solid #e5e7eb; border-radius: 10px; padding: 10px; }
.payment-breakdown .break-row { display: flex; align-items: center; justify-content: space-between; font-size: 0.75rem; margin: 4px 0; line-height: 1.1; }
.payment-breakdown .break-row.total { font-weight: 400; color: #111827; position: relative; padding-top: 10px; }
.payment-breakdown .break-divider { height: 1px; background: #e5e7eb; margin: 6px 0; }
#break-discount { color: #f97316 !important; font-weight: 600; }

/* Smaller font sizes for breakdown elements */
#break-title {
    font-size: 0.75rem !important;
    font-weight: 400 !important;
}

#break-base {
    font-size: 0.75rem !important;
    font-weight: 400 !important;
}

#break-admin {
    font-size: 0.75rem !important;
    font-weight: 400 !important;
}

#break-total-label {
    font-size: 0.75rem !important;
    font-weight: 700 !important;
}

#break-total {
    font-size: 0.85rem !important;
    font-weight: 700 !important;
}

/* Inline spinner for loading states */
.spinner-inline { width: 14px; height: 14px; border: 2px solid #e5e7eb; border-top-color: #2563eb; border-radius: 50%; display: inline-block; animation: tm-spin .8s linear infinite; vertical-align: -2px; margin-right: 6px; }
@keyframes tm-spin { to { transform: rotate(360deg); } }

/* Centered spinner between label and total */
.break-spinner { position: absolute; left: 50%; top: 66%; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 6px; color: #6b7280; font-weight: 600; font-size: 0.85rem; }
.break-spinner .spinner-inline { margin-right: 0; }
.modal-footer { display: flex; gap: 10px; padding: 6px 16px 12px 16px; align-items: stretch; margin-bottom: 10px; }
.modal-footer .btn-primary,
.modal-footer .btn-ghost { flex: 1 1 0; width: auto; }
.modal-footer .btn-primary { margin-bottom: 0; }
.btn-ghost { flex: 1; border: 1px solid #d1d5db; background: #fff; border-radius: 8px; padding: 10px 14px; cursor: pointer; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; line-height: 1; }
.btn-primary { flex: 1; border: 0; background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%); color: #fff; border-radius: 10px; padding: 12px 18px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 6px; min-height: 44px; line-height: 1; font-weight: 700; box-shadow: 0 10px 24px rgba(59,130,246,0.35), 0 2px 0 rgba(0,0,0,0.04); transition: transform .15s ease, box-shadow .2s ease, filter .2s ease; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 14px 30px rgba(59,130,246,0.45), 0 3px 0 rgba(0,0,0,0.05); filter: saturate(1.05); }
.btn-primary:active { transform: translateY(1px); box-shadow: 0 8px 18px rgba(59,130,246,0.32), 0 2px 0 rgba(0,0,0,0.05); }
/* removed pay icon */

/* Themed modal header and promo button */
.modal.theme-green .modal-header { background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%); }
.modal.theme-orange .modal-header { background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%); }
.modal.theme-blue .modal-header { background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%); }
.modal.theme-red .modal-header { background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%); }

.modal.theme-green #promo-check { background: #3b82f6; }
.modal.theme-orange #promo-check { background: #f59e0b; }
.modal.theme-blue #promo-check { background: #3b82f6; }
.modal.theme-red #promo-check { background: #ef4444; }

/* Themed primary button color per level */
.modal.theme-green #btn-pay-now { background: #3b82f6; }
.modal.theme-orange #btn-pay-now { background: #f59e0b; }
.modal.theme-blue #btn-pay-now { background: #3b82f6; }
.modal.theme-red #btn-pay-now { background: #ef4444; }

/* Theme-based styling for QRIS modal */
#qris-modal.theme-green .qris-header { background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%); }
#qris-modal.theme-orange .qris-header { background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%); }
#qris-modal.theme-blue .qris-header { background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%); }
#qris-modal.theme-red .qris-header { background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%); }

#qris-modal.theme-green .qris-btn-primary { background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%); }
#qris-modal.theme-orange .qris-btn-primary { background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%); }
#qris-modal.theme-blue .qris-btn-primary { background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%); }
#qris-modal.theme-red .qris-btn-primary { background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%); }

/* Custom Notification Styles */
.custom-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(239, 68, 68, 0.3);
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    max-width: 90%;
    width: auto;
    min-width: 300px;
    animation: slideDownNotification 0.3s ease-out;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.custom-notification.success {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
}

.custom-notification.warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.3);
}

.custom-notification.info {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
}

.notification-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.notification-content {
    flex: 1;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.4;
}

.notification-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.notification-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

@keyframes slideDownNotification {
    0% {
        transform: translateX(-50%) translateY(-100%);
        opacity: 0;
    }
    100% {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

@keyframes slideUpNotification {
    0% {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
    100% {
        transform: translateX(-50%) translateY(-100%);
        opacity: 0;
    }
}

.custom-notification.hide {
    animation: slideUpNotification 0.3s ease-in forwards;
}

/* Responsive notification */
@media (max-width: 480px) {
    .custom-notification {
        top: 10px;
        padding: 0.8rem 1.2rem;
        min-width: 280px;
        max-width: calc(100% - 20px);
    }
    
    .notification-content {
        font-size: 0.85rem;
    }
}

/* Loading Modal Styles */
.loading-dialog {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(90vw, 350px);
    background: linear-gradient(135deg, #FFF8E7 0%, #FEF3C7 50%, #FDE68A 100%);
    border: 1px solid rgba(249, 115, 22, 0.2);
    border-radius: 20px;
    padding: 0;
    overflow: hidden;
    z-index: 1001;
    box-shadow: 0 20px 60px rgba(249, 115, 22, 0.25);
}

.loading-content {
    padding: 3rem 2rem;
    text-align: center;
    color: #7C2D12;
}

.loading-spinner {
    margin-bottom: 1.5rem;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(249, 115, 22, 0.25);
    border-top: 4px solid #F97316;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #7C2D12;
}

.loading-message {
    font-size: 0.95rem;
    color: #78350F;
    margin: 0;
}

/* QRIS Payment Gateway Modal Styles */
.qris-dialog {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(90vw, 390px);
    background: white;
    border-radius: 20px;
    padding: 0;
    overflow: hidden;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 1001;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.qris-header {
    background: linear-gradient(135deg, #f97316 0%, #b45309 100%);
    color: white;
    padding: 2.25rem 1rem; /* taller header without shifting content */
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    line-height: 1.2;
}

/* Overlapping summary card between header and timer */
.qris-summary-card {
    position: relative;
    width: calc(100% - 2rem);
    margin: -34px auto 16px auto; /* lift card higher */
    background: #FFF8E7;
    border-radius: 12px;
    box-shadow: 0 8px 22px rgba(0,0,0,0.12);
    border: 1px solid #e5e7eb;
    padding: 10px 12px;
}
.qris-summary-card .summary-top { display: flex; align-items: center; justify-content: space-between; font-size: 0.8rem; color: #6b7280; }
.qris-summary-card .summary-label { font-weight: 600; }
.qris-summary-card .summary-paywithin { font-weight: 600; }
.qris-summary-card .summary-paywithin #timer-countdown { color: #dc2626; }
.qris-summary-card .summary-amount-row { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; color: #111827; }
.qris-summary-card .qris-amount { font-size: 1.8rem; color: #111827; }
.qris-summary-card .summary-method { display: inline-flex; align-items: center; gap: 6px; border-radius: 6px; border: 1px solid #e5e7eb; background: #fff; padding: 2px 6px; height: 28px; }
.qris-summary-card .summary-method img { max-width: 38px; max-height: 18px; object-fit: contain; }
.qris-summary-card .summary-method #summary-method-text { font-size: 0.8rem; font-weight: 700; color: #111827; }
.qris-summary-card .summary-order { margin-top: 4px; font-size: 0.75rem; color: #9ca3af; }
.qris-summary-card .summary-method-line { margin-top: 4px; font-size: 0.7rem; font-weight: 400; color: #6b7280; }

.qris-merchant-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    padding-left: 0px;
}

.qris-icon {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    position: relative; top: -12px; /* lift icon upward without changing header height */
}
.qris-icon img { width: 24px; height: 24px; object-fit: contain; position: relative; z-index: 1; }
.qris-icon .masked-level-icon { position: absolute; inset: 0; margin: auto; width: 24px; height: 24px; background: linear-gradient(135deg, #f97316, #fbbf24); -webkit-mask-size: contain; -webkit-mask-repeat: no-repeat; -webkit-mask-position: center; mask-size: contain; mask-repeat: no-repeat; mask-position: center; z-index: 2; }

/* Theme-specific gradients for masked icons */
.modal.theme-green .masked-level-icon, #qris-modal.theme-green .masked-level-icon { background: linear-gradient(135deg, #3b82f6, #1e40af); }
.modal.theme-orange .masked-level-icon, #qris-modal.theme-orange .masked-level-icon { background: linear-gradient(135deg, #f59e0b, #f97316); }
.modal.theme-blue .masked-level-icon, #qris-modal.theme-blue .masked-level-icon { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.modal.theme-red .masked-level-icon, #qris-modal.theme-red .masked-level-icon { background: linear-gradient(135deg, #ef4444, #b91c1c); }

.qris-details {
    flex: 1;
    margin-left: 2px;
    position: relative; top: -12px; /* lift title block upward */
}

.qris-title {
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 0;
    color: #ffffff;
}

.qris-amount {
    font-size: 1.55rem;
    font-weight: 700;
    line-height: 1.1;
    color: #111827;
}

.qris-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s ease;
    position: relative; top: -12px; /* lift close button upward */
}

.qris-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.qris-timer { background: transparent; padding: 0; border-bottom: 0; height: 20px; }

.qris-timer span {
    font-size: 0.9rem;
    color: #6b7280;
    line-height: 1.1;
}

.timer-countdown {
    font-size: 0.9rem;
    font-weight: 700;
    color: #ef4444;
    line-height: 1.1;
}

/* qris-payment-info removed */

/* payment-method removed */

.payment-method span {
    color: #8b5cf6;
}

.merchant-name {
    font-size: 0.75rem;
    color: #6b7280;
    line-height: 1.1;
}

.merchant-name span {
    font-weight: 600;
    color: #111827;
}

/* Merchant line under QR image */
.qris-merchant-below {
    margin-top: -12px;
    padding: 0 1.5rem 1rem 1.5rem;
    text-align: center;
    font-size: 0.8rem;
    color: #6b7280;
    margin-bottom: 6px; /* add slight gap before primary button */
}
.qris-merchant-below span { font-weight: 600; color: #111827; }

.qris-code-container {
    padding: 0.9rem 1.5rem 2rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    max-width: 280px;
    margin: -18px auto 0 auto; /* pull further up to touch summary card */
    transform: translateX(16px); /* shift further to the right */
}

.qris-code {
    flex: 1;
    display: flex;
    justify-content: center;
    margin-right: 50px;
}

.qris-code-image {
    width: 240px;
    height: 240px;
    background: #f3f4f6;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.qris-code-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 10px;
    color: transparent;
    font-size: 0;
    text-indent: -9999px;
}



.qris-download-section {
    position: absolute;
    right: -15px; /* move even further to the right */
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.qris-download {
    background: #e5e7eb;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #4b5563;
    transition: all 0.2s ease;
}

.download-text {
    font-size: 0.65rem;
    color: #6b7280;
    font-weight: 500;
    text-align: center;
    line-height: 1.2;
}

.qris-download:hover {
    background: #e5e7eb;
    color: #374151;
}

.qris-actions {
    padding: 0.75rem 1.5rem 1.5rem 1.5rem; /* pull actions up */
    margin-top: -6px;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.qris-btn-primary {
    background: linear-gradient(135deg, #f97316 0%, #b45309 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    animation: qris-pulse 1.6s ease-in-out infinite;
}

.qris-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.3);
}

@keyframes qris-pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(236, 72, 153, 0.35); }
    35% { transform: scale(0.97); box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.15); }
    70% { transform: scale(1.03); box-shadow: 0 0 0 10px rgba(236, 72, 153, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(236, 72, 153, 0); }
}

/* Theme-adaptive pulse color */
#qris-modal.theme-green .qris-btn-primary { animation-name: qris-pulse-green; }
@keyframes qris-pulse-green {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.35); }
    35% { transform: scale(0.97); box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15); }
    70% { transform: scale(1.03); box-shadow: 0 0 0 10px rgba(59, 130, 246, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
}

#qris-modal.theme-orange .qris-btn-primary { animation-name: qris-pulse-orange; }
@keyframes qris-pulse-orange {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.35); }
    35% { transform: scale(0.97); box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.15); }
    70% { transform: scale(1.03); box-shadow: 0 0 0 10px rgba(245, 158, 11, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

#qris-modal.theme-blue .qris-btn-primary { animation-name: qris-pulse-blue; }
@keyframes qris-pulse-blue {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.35); }
    35% { transform: scale(0.97); box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15); }
    70% { transform: scale(1.03); box-shadow: 0 0 0 10px rgba(59, 130, 246, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
}

#qris-modal.theme-red .qris-btn-primary { animation-name: qris-pulse-red; }
@keyframes qris-pulse-red {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.35); }
    35% { transform: scale(0.97); box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15); }
    70% { transform: scale(1.03); box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.qris-btn-secondary {
    background: white;
    color: #111827;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 0.6rem 0.9rem;
    font-size: 0.95rem;
    line-height: 0.95;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.qris-btn-secondary:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

/* Theme-adaptive text, icon, and border (keep white background) */
#qris-modal.theme-green .qris-btn-secondary { color: #1e40af; border-color: #3b82f6; }
#qris-modal.theme-green .qris-btn-secondary i { color: #3b82f6; }

#qris-modal.theme-orange .qris-btn-secondary { color: #b45309; border-color: #f59e0b; }
#qris-modal.theme-orange .qris-btn-secondary i { color: #f59e0b; }

#qris-modal.theme-blue .qris-btn-secondary { color: #1d4ed8; border-color: #3b82f6; }
#qris-modal.theme-blue .qris-btn-secondary i { color: #3b82f6; }

#qris-modal.theme-red .qris-btn-secondary { color: #b91c1c; border-color: #ef4444; }
#qris-modal.theme-red .qris-btn-secondary i { color: #ef4444; }

/* Responsive QRIS Modal */
@media (max-width: 480px) {
    .qris-dialog {
        width: 90vw !important;
        max-width: 90vw !important;
        margin: 0 !important;
        position: fixed !important;
        left: 50% !important;
        top: 50% !important;
        transform: translate(-50%, -50%) !important;
    }
    
    .loading-dialog {
        width: 90vw !important;
        max-width: 90vw !important;
        margin: 0 !important;
        position: fixed !important;
        left: 50% !important;
        top: 50% !important;
        transform: translate(-50%, -50%) !important;
    }
    
    .qris-code-image {
        width: 180px;
        height: 180px;
        font-size: 6rem;
    }
    
    .qris-header { padding: 1.75rem 1rem; }
    .qris-summary-card { width: calc(100% - 1.5rem); margin: -28px auto 16px auto; padding: 10px; }
    .qris-summary-card .qris-amount { font-size: 1.6rem; }
    
    .qris-title {
        font-size: 1.1rem;
    }
    
    .qris-amount { font-size: 1.4rem; }
    
    .qris-actions { padding: 0.4rem 1.25rem 1.1rem 1.25rem; margin-top: -14px; }
    
    .qris-code-container { padding: 0.6rem 1.25rem 1.3rem 1.25rem; gap: 0.25rem; max-width: 260px; margin-top: -22px; }
    
    .qris-download-section { right: -15px; }
    
    .download-text {
        font-size: 0.6rem;
    }
    
    .qris-code { margin-right: 52px; }
    .qris-merchant-below { margin-top: -14px; padding: 0 1rem 0.9rem 1rem; margin-bottom: 6px; }
    
    .qris-payment-info {
        padding: 0.75rem;
    }
    
    .payment-method {
        font-size: 0.8rem;
    }
    
    .merchant-name {
        font-size: 0.7rem;
    }
    
    .qris-timer {
        padding: 0.4rem 1.25rem;
        gap: 0.4rem;
    }
}

/* Responsive for very small screens */
@media (max-width: 360px) {
    .qris-dialog {
        width: 92vw !important;
        max-width: 92vw !important;
    }
    
    .loading-dialog {
        width: 95vw !important;
        max-width: 95vw !important;
    }
    
    .qris-code-image { width: 200px; height: 200px; font-size: 5rem; }
    
    .qris-header { padding: 1.5rem 0.75rem; }
    .qris-summary-card { width: calc(100% - 1.25rem); margin: -26px auto 14px auto; padding: 9px; }
    .qris-code-container { padding: 0.55rem 1rem 1.2rem 1rem; margin-top: -20px; }
    .qris-summary-card .qris-amount { font-size: 1.5rem; }
    .qris-merchant-below { margin-top: -16px; padding: 0 0.9rem 0.85rem 0.9rem; margin-bottom: 6px; }
    
    .qris-title {
        font-size: 1.05rem;
    }
    
    .qris-amount { font-size: 1.3rem; }
    
    .qris-actions { padding: 0.35rem 1rem 0.9rem 1rem; margin-top: -16px; }
    
    .qris-code-container {
        padding: 1.25rem 1rem;
        gap: 0.25rem;
        max-width: 240px;
    }
    
    .qris-download-section {
        right: -10px;
    }
    
    .download-text {
        font-size: 0.55rem;
    }
    
    .qris-code {
        margin-right: 40px;
    }
    
    .qris-payment-info {
        padding: 0.5rem;
    }
    
    .payment-method {
        font-size: 0.75rem;
    }
    
    .merchant-name {
        font-size: 0.65rem;
    }
    
    .qris-timer {
        padding: 0.3rem 1rem;
        gap: 0.3rem;
    }
}

/* Instructions Modal Styles */
.instructions-dialog {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(92vw, 420px);
    background: linear-gradient(135deg, #FFF8E7 0%, #FEF3C7 50%, #FDE68A 100%);
    border-radius: 20px;
    overflow: hidden;
    z-index: 1001;
    box-shadow: 0 20px 60px rgba(249, 115, 22, 0.25);
    border: 1px solid rgba(249, 115, 22, 0.2);
}

.instructions-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: linear-gradient(135deg, #F97316 0%, #FB923C 50%, #FBBF24 100%);
    color: #7C2D12;
}

.instructions-header h2 {
    font-size: 0.9rem;
    font-weight: 700;
    color: #7C2D12;
}

.instructions-close {
    background: rgba(124, 45, 18, 0.2);
    border: none;
    color: #7C2D12;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.instructions-close:hover { background: rgba(124, 45, 18, 0.3); transform: scale(1.05); }

.instructions-body {
    padding: 12px 14px 14px 14px;
    background: linear-gradient(180deg, #FFF8E7 0%, #FEF3C7 100%);
    color: #78350F;
    font-size: 0.9rem;
    line-height: 1.3;
}

.instructions-list { 
    margin: 0 0 10px 1.1rem; 
    color: #78350F;
}
.instructions-list li { 
    margin-bottom: 2px; 
    line-height: 1.15; 
    color: #78350F;
}

.instructions-body span {
    color: #C2410C;
    font-weight: 600;
}

.instructions-image { 
    display: flex; 
    justify-content: center; 
    margin: 6px 0 12px 0; 
}
.instructions-image img { 
    width: 100%; 
    max-width: 260px; 
    border-radius: 12px; 
    border: 1px solid rgba(249, 115, 22, 0.3); 
    box-shadow: 0 10px 24px rgba(249, 115, 22, 0.2);
}

@media (max-width: 480px) {
    .instructions-dialog { width: 92vw !important; max-width: 92vw !important; }
    .instructions-header { padding: 12px 12px; }
    .instructions-header h2 { font-size: 0.85rem; }
    .instructions-body { padding: 10px 12px 12px 12px; font-size: 0.85rem; line-height: 1.25; }
    .instructions-list li { margin-bottom: 2px; line-height: 1.12; }
    .instructions-list { margin-left: 1rem; }
    .instructions-image { margin: 6px 0 10px 0; }
    .instructions-image img { max-width: 220px; }
}

@media (max-width: 360px) {
    .instructions-header h2 { font-size: 0.8rem; }
    .instructions-body { font-size: 0.82rem; }
    .instructions-list li { line-height: 1.1; }
    .instructions-image img { max-width: 200px; }
}

/* Payment Checking Modal Styles */
.checking-dialog {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(90vw, 320px);
    background: linear-gradient(135deg, #FFF8E7 0%, #FEF3C7 50%, #FDE68A 100%);
    border-radius: 20px;
    overflow: hidden;
    z-index: 1001;
    box-shadow: 0 20px 60px rgba(249, 115, 22, 0.25);
    border: 1px solid rgba(249, 115, 22, 0.2);
}

.checking-content {
    padding: 2rem 1.5rem;
    text-align: center;
    background: linear-gradient(180deg, #FFF8E7 0%, #FEF3C7 100%);
    color: #7C2D12;
}

.checking-spinner {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
}

.checking-spinner .spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(249, 115, 22, 0.25);
    border-top: 4px solid #F97316;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.checking-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #7C2D12;
}

.checking-message {
    font-size: 0.9rem;
    color: #78350F;
    opacity: 1;
}

/* Payment Failed Modal Styles */
.failed-dialog {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(92vw, 380px);
    background: linear-gradient(135deg, #FFF8E7 0%, #FEF3C7 50%, #FDE68A 100%);
    border-radius: 20px;
    overflow: hidden;
    z-index: 1001;
    box-shadow: 0 20px 60px rgba(249, 115, 22, 0.25);
    border: 1px solid rgba(249, 115, 22, 0.2);
}

.failed-content {
    padding: 2rem 1.5rem;
    text-align: center;
    background: linear-gradient(180deg, #FFF8E7 0%, #FEF3C7 100%);
    color: #7C2D12;
}

.failed-icon {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
}

.failed-icon i {
    font-size: 3rem;
    color: #EA580C;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.failed-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #7C2D12;
    line-height: 1.4;
}

.failed-message {
    font-size: 0.9rem;
    color: #78350F;
    margin-bottom: 2rem;
    line-height: 1.5;
}

.failed-actions {
    display: flex;
    justify-content: center;
}

.failed-btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
}

.failed-btn.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.failed-btn.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.failed-btn.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #d1d5db;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.failed-btn.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

/* Responsive Design for Payment Modals */
@media (max-width: 480px) {
    .checking-dialog, .failed-dialog {
        width: 92vw !important;
        max-width: 92vw !important;
    }
    
    .checking-content, .failed-content {
        padding: 1.5rem 1rem;
    }
    
    .checking-title, .failed-title {
        font-size: 1rem;
    }
    
    .checking-message, .failed-message {
        font-size: 0.85rem;
    }
    
    .failed-icon i {
        font-size: 2.5rem;
    }
    
    .failed-btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.85rem;
    }
    
    /* Fix promo row for small screens */
    .promo-row {
        gap: 6px;
        margin: 2px 0;
    }
    
    #promo-input {
        font-size: 0.9rem;
        padding: 6px 8px;
    }
    
    .btn-secondary {
        padding: 6px 10px;
        font-size: 0.85rem;
    }
    
    .payment-breakdown {
        padding: 8px;
        margin-top: 8px;
    }
}

@media (max-width: 360px) {
    .checking-content, .failed-content {
        padding: 1.2rem 0.8rem;
    }
    
    .checking-title, .failed-title {
        font-size: 0.95rem;
    }
    
    .checking-message, .failed-message {
        font-size: 0.8rem;
    }
    
    .failed-icon i {
        font-size: 2rem;
    }
    
    .failed-btn {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }
    
    /* Extra small screen fixes for promo row */
    .promo-row {
        gap: 4px;
        flex-wrap: nowrap;
    }
    
    #promo-input {
        font-size: 0.85rem;
        padding: 5px 6px;
        min-width: 120px; /* Minimum width for input */
    }
    
    .btn-secondary {
        padding: 5px 8px;
        font-size: 0.8rem;
        min-width: 50px; /* Minimum width for button */
    }
    
    .payment-breakdown {
        padding: 6px;
        margin-top: 6px;
    }
    
    .promo-telegram-info p {
        font-size: 0.5rem;
        line-height: 1.3;
    }
}
