:root {
    /* iOS 18 Light Color Palette — always applied */
    color-scheme: light;
    --ios-blue: #0c19ae;
    --ios-blue-rgb: 12, 25, 174;
    --ios-bg-light: #f0f0f5;
    --ios-bg-dark: #000000;
    --ios-card-bg: rgba(255, 255, 255, 0.92);
    --ios-card-border: rgba(180, 210, 255, 0.4);
    --ios-text-primary: #1C1C1E;
    --ios-text-secondary: #3A3A3C;
    --ios-text-tertiary: #8E8E93;
    --ios-danger: #FF3B30;
    --ios-success: #34C759;

    /* Dimensions & Effects */
    --radius-xl: 32px;
    --radius-lg: 20px;
    --radius-md: 12px;
    --blur-amount: 25px;
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.10);
}

* {
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: var(--ios-bg-light);
    color: var(--ios-text-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Dynamic Background Gradient */
.bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    background: radial-gradient(circle at 0% 0%, rgba(var(--ios-blue-rgb), 0.15) 0%, transparent 40%),
        radial-gradient(circle at 100% 100%, rgba(88, 86, 214, 0.15) 0%, transparent 40%);
}

.page-container {
    width: 100%;
    max-width: 590px;
    padding: 20px;
    animation: fadeIn 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

/* Glassmorphism Card */
.card {
    background: var(--ios-card-bg);
    backdrop-filter: blur(var(--blur-amount));
    -webkit-backdrop-filter: blur(var(--blur-amount));
    border: 1px solid var(--ios-card-border);
    border-radius: var(--radius-xl);
    padding: 32px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 24px;
}

h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

/* Centered, stylish heading variant */
.stylish-heading {
    text-align: center;
    font-size: 36px;
    font-weight: 500;
    letter-spacing: -1px;
    background: linear-gradient(135deg, var(--ios-blue) 0%, #4a90d9 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    line-height: 1.2;
}

.subtitle {
    color: var(--ios-text-secondary);
    font-size: 17px;
    margin-bottom: 32px;
}

/* Form Styles */
.form-group {
    margin-bottom: 24px;
}

/* Inline label + input on same row */
.inline-form-group {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.inline-form-group label {
    flex: 0 0 180px;
    margin: 0;
    text-align: left;
    white-space: nowrap;
}

.inline-form-group .input-container {
    flex: 1;
    max-width: 50%;
    margin-left: auto;
}

label {
    display: block;
    font-size: 17px;
    font-weight: 600;
    color: var(--ios-text-primary);
    margin-bottom: 8px;
    margin-left: 4px;
}

.input-container {
    position: relative;
}

input,
select {
    width: 100%;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    border-radius: var(--radius-md);
    padding: 14px 16px;
    font-size: 15px;
    font-weight: 600;
    color: var(--ios-text-primary);
    transition: all 0.2s ease;
}

input::placeholder,
select::placeholder {
    font-size: 12px;
}



input:focus,
select:focus {
    outline: none;
    background: rgba(var(--ios-blue-rgb), 0.08);
    box-shadow: 0 0 0 2px var(--ios-blue);
}

.btn {
    width: 100%;
    border: none;
    border-radius: var(--radius-lg);
    padding: 16px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

/* Two-button row */
.btn-row {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}
.btn-row .btn {
    flex: 1;
}

.btn-primary {
    background: var(--ios-blue);
    color: white;
    box-shadow: 0 4px 12px rgba(var(--ios-blue-rgb), 0.3);
}

.btn-secondary-action {
    background: rgba(var(--ios-blue-rgb), 0.12);
    color: var(--ios-blue);
    border: 1.5px solid rgba(var(--ios-blue-rgb), 0.25);
}

.btn-secondary-action:hover {
    background: rgba(var(--ios-blue-rgb), 0.2);
}

.btn-primary:active {
    transform: scale(0.97);
    background: #0062CC;
}

.btn-secondary {
    background: rgba(0, 0, 0, 0.05);
    color: var(--ios-blue);
}



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

/* Progress Indicator */
.steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    position: relative;
}

.steps::after {
    content: '';
    position: absolute;
    top: 15px;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(0, 0, 0, 0.05);
    z-index: 0;
}



.step-item {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.step-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--ios-bg-light);
    border: 2px solid rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 14px;
    font-weight: 700;
    transition: all 0.3s ease;
}



.step-item.active .step-circle {
    background: var(--ios-blue);
    color: white;
    border-color: var(--ios-blue);
    box-shadow: 0 0 15px rgba(var(--ios-blue-rgb), 0.4);
}

.step-item.completed .step-circle {
    background: var(--ios-success);
    color: white;
    border-color: var(--ios-success);
}

.step-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--ios-text-tertiary);
}

.step-item.active .step-label {
    color: var(--ios-blue);
}

/* Receipt Section */
.receipt-section {
    border-top: 1px solid var(--ios-card-border);
    padding-top: 24px;
    margin-top: 24px;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
    color: #0c19ae;
}

.donation-row {
    display: grid;
    grid-template-columns: 1fr 120px;
    gap: 12px;
    margin-bottom: 12px;
    align-items: center;
}

.donation-label {
    font-size: 17px;
    font-weight: 600;
}

/* Majlis Donation dropdown row */
.majlis-row {
    grid-template-columns: 1fr 2fr !important;
}
.majlis-input-group {
    display: flex;
    gap: 10px;
    align-items: center;
}
.majlis-select {
    flex: 1;
    min-width: 0;
}

.amount-input-wrapper {
    position: relative;
}

.amount-input-wrapper::before {
    content: '€';
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ios-text-tertiary);
    font-size: 15px;
}

.amount-input-wrapper input {
    padding-left: 28px;
}

/* Additional receipt sections */
.receipt-section {
    margin-top: 24px;
}
.receipt-separator {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: rgba(var(--ios-blue-rgb), 0.08);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--ios-blue);
    font-size: 16px;
    font-weight: 700;
    color: var(--ios-blue);
    margin-bottom: 8px;
}
.remove-receipt-btn {
    background: none;
    border: none;
    color: var(--ios-danger);
    font-size: 18px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

/* ── Review Page Styles ─────────────────────────────────────── */
.review-receipt-block {
    background: rgba(255,255,255,0.6);
    border: 1px solid var(--ios-card-border);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    overflow: hidden;
}
.review-receipt-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(var(--ios-blue-rgb), 0.08);
    border-left: 4px solid var(--ios-blue);
    padding: 12px 16px;
    font-size: 16px;
    font-weight: 700;
    color: var(--ios-blue);
}
.review-meta {
    padding: 6px 16px;
    font-size: 13px;
    color: var(--ios-text-secondary);
    border-bottom: 1px solid rgba(0,0,0,0.04);
}
.review-donations {
    padding: 8px 0;
}
.review-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    font-size: 15px;
}
.review-row:not(:last-child) {
    border-bottom: 1px solid rgba(0,0,0,0.04);
}
.review-category { color: var(--ios-text-primary); font-weight: 500; }
.review-amount   { font-weight: 700; color: var(--ios-blue); }
.review-receipt-total {
    display: flex;
    justify-content: space-between;
    padding: 10px 16px;
    background: rgba(var(--ios-blue-rgb), 0.06);
    border-top: 1px solid rgba(var(--ios-blue-rgb), 0.15);
    font-weight: 700;
    font-size: 15px;
    color: var(--ios-text-primary);
}

.total-bar {
    background: rgba(var(--ios-blue-rgb), 0.1);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
}

.total-label {
    font-weight: 600;
    color: var(--ios-blue);
}

.total-amount {
    font-size: 20px;
    font-weight: 700;
    color: var(--ios-blue);
}

/* Logo Styling */
.logo-container {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.form-logo {
    max-width: 360px;
    height: auto;
    /* Seamless blending with the translucent card background */
    mix-blend-mode: multiply;
}



/* Utility */
.hidden {
    display: none;
}

/* =========================================
   Mobile Responsiveness 
   ========================================= */
@media (max-width: 600px) {
    /* Stack inline form groups vertically on small screens */
    .inline-form-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        margin-bottom: 24px;
    }

    .inline-form-group label {
        flex: none;
        width: 100%;
        white-space: normal;
        margin-left: 0;
    }

    .inline-form-group .input-container {
        flex: none;
        max-width: 100%;
        width: 100%;
        margin-left: 0;
    }

    /* Stack receipt headers / Remove buttons on mobile */
    .receipt-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    /* Make padding slightly smaller on phones */
    .card {
        padding: 24px 20px;
    }
}