:root {
    --primary-blue: #0b4d82;
    --primary-gradient: linear-gradient(180deg, #0b4b80 0%, #1564be 65%, #2a83df 100%);
    --card-gradient: linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.1) 100%);
    --bg-app: #090e1a;
    --app-canvas: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --radius-pill: 50px;
    --shadow-soft: 0 10px 28px rgba(0, 0, 0, 0.04);
    --shadow-elevated: 0 14px 34px rgba(11, 75, 128, 0.18);
    --focus-ring: 0 0 0 4px rgba(21, 101, 192, 0.16);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-app);
    background-image: radial-gradient(at 0% 0%, rgba(14, 116, 144, 0.22) 0px, transparent 50%),
                      radial-gradient(at 100% 100%, rgba(30, 58, 138, 0.28) 0px, transparent 50%);
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 0;
}

@media (min-width: 576px) {
    body {
        padding: 20px 10px;
    }
}

/* Mobile Application Device Wrapper */
.mobile-app-wrapper {
    width: 100%;
    max-width: 440px;
    background-color: var(--app-canvas);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
    overflow: hidden;
}

@media (min-width: 576px) {
    .mobile-app-wrapper {
        min-height: 900px;
        height: 92vh;
        border-radius: 46px;
        border: 9px solid #1e293b;
    }
}

/* Top App Header Area */
.app-header-bg {
    background: linear-gradient(180deg, #0b4b80 0%, #135dae 60%, #1e7bd6 100%);
    padding: 20px 20px 72px 20px;
    color: #ffffff;
    position: relative;
    border-bottom-left-radius: 36px;
    border-bottom-right-radius: 36px;
    box-shadow: 0 10px 25px rgba(11, 75, 128, 0.25);
}

.top-navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-title {
    font-weight: 800;
    letter-spacing: -0.5px;
    font-size: 1.55rem;
    color: #ffffff;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.header-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(8px);
}

.header-btn:active {
    transform: scale(0.92);
    background: rgba(255, 255, 255, 0.4);
}

/* Available Balance Hero Card matching Image 1 */
.balance-hero-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.32) 0%, rgba(255, 255, 255, 0.12) 100%);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1.5px solid rgba(255, 255, 255, 0.45);
    border-radius: 28px;
    padding: 1.8rem 1.4rem;
    color: #ffffff;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.12);
    margin: -52px 18px 16px 18px;
    position: relative;
    z-index: 10;
    text-align: center;
    transition: transform 0.25s ease;
}

.balance-hero-card .label {
    letter-spacing: 2.2px;
    font-size: 0.78rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
}

.balance-hero-card .amount {
    font-size: 2.45rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin: 0.4rem 0 1rem 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: color 0.3s ease;
}

.btn-export-pill {
    background: rgba(255, 255, 255, 0.2);
    border: 1.5px solid rgba(255, 255, 255, 0.65);
    color: #ffffff;
    border-radius: var(--radius-pill);
    padding: 0.5rem 1.4rem;
    font-weight: 700;
    font-size: 0.82rem;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    transition: all 0.2s ease;
    backdrop-filter: blur(8px);
    display: inline-flex;
    align-items: center;
}

.btn-export-pill:hover, .btn-export-pill:focus, .btn-export-pill:active {
    background: #ffffff;
    color: #0b4b80;
    border-color: #ffffff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

/* Success Alert Card matching Image 1 */
.custom-success-alert {
    background: #02569b;
    color: #ffffff;
    border-radius: 18px;
    padding: 0.95rem 1.2rem;
    border: none;
    box-shadow: 0 8px 24px rgba(2, 86, 155, 0.25);
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 18px 16px 18px;
    animation: slideDown 0.3s ease-out;
}

.custom-success-alert .icon-check {
    width: 26px;
    height: 26px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    margin-right: 10px;
    flex-shrink: 0;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* App Main Content Area */
.app-content-body {
    flex: 1;
    padding: 0 18px 95px 18px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.app-content-body::-webkit-scrollbar {
    width: 5px;
}
.app-content-body::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 10px;
}

/* Screen Transitions */
.app-screen {
    display: none;
    animation: screenFadeIn 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.app-screen.active-screen {
    display: block;
}

@keyframes screenFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Home Menu Hub Grid */
.menu-section-heading {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 22px;
}

.menu-card {
    background: #ffffff;
    border-radius: 22px;
    padding: 18px 14px;
    text-align: center;
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.03);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-main);
    user-select: none;
}

.menu-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(11, 75, 128, 0.12);
    border-color: #93c5fd;
}

.menu-card:active {
    transform: scale(0.96);
}

.menu-icon-box {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.45rem;
    margin-bottom: 10px;
    transition: transform 0.2s ease;
}

.icon-blue { background: #e0f2fe; color: #0284c7; }
.icon-green { background: #dcfce7; color: #16a34a; }
.icon-purple { background: #f3e8ff; color: #9333ea; }
.icon-amber { background: #fef3c7; color: #d97706; }
.icon-indigo { background: #e0e7ff; color: #4f46e5; }
.icon-rose { background: #ffe4e6; color: #e11d48; }

.menu-card-title {
    font-weight: 700;
    font-size: 0.92rem;
    margin-bottom: 3px;
    color: #1e293b;
}

.menu-card-subtitle {
    font-size: 0.72rem;
    color: #64748b;
    line-height: 1.25;
}

/* Quick Donation Form Card matching Image 1 */
.app-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    padding: 1.6rem 1.35rem;
    margin-bottom: 1.25rem;
}

.card-heading {
    color: #0d528b;
    font-weight: 700;
    font-size: 1.3rem;
    margin-bottom: 1.15rem;
}

/* Pill Form Inputs matching Image 1 */
.form-control-pill, .form-select-pill {
    border-radius: var(--radius-pill) !important;
    padding: 0.78rem 1.3rem;
    font-size: 0.95rem;
    border: 1.5px solid #dbe2ea;
    background-color: #ffffff;
    color: #1e293b;
    transition: all 0.2s ease;
}

.form-control-pill:focus, .form-select-pill:focus {
    border-color: #1565c0;
    box-shadow: var(--focus-ring);
    background-color: #ffffff;
}

.form-control-pill::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

/* HCI: Quick Donation Amount Preset Chips */
.amount-chips-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.amount-chip {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    transition: all 0.18s ease;
    user-select: none;
}

.amount-chip:hover {
    background: #e0f2fe;
    color: #0369a1;
    border-color: #7dd3fc;
}

.amount-chip:active, .amount-chip.active {
    background: #0284c7;
    color: #ffffff;
    border-color: #0284c7;
    transform: scale(0.95);
}

/* HCI: Carrier / Network Badge */
.carrier-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    margin-left: 6px;
}

.carrier-mtn { background: #fef08a; color: #854d0e; }
.carrier-telecel { background: #fee2e2; color: #991b1b; }
.carrier-at { background: #e0e7ff; color: #3730a3; }

.btn-primary-action {
    background: linear-gradient(135deg, #0d62a9 0%, #1565c0 100%);
    border: none;
    border-radius: var(--radius-pill);
    padding: 0.85rem 1.6rem;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.98rem;
    box-shadow: 0 8px 20px rgba(13, 98, 169, 0.25);
    transition: all 0.2s ease;
    width: 100%;
}

.btn-primary-action:hover {
    background: linear-gradient(135deg, #0a4f89 0%, #0d528b 100%);
    color: #ffffff;
    box-shadow: 0 10px 24px rgba(13, 98, 169, 0.35);
}

.btn-primary-action:active {
    transform: scale(0.98);
}

/* iPhone SMS Mockup Frame matching Image 2 */
.iphone-frame {
    background: #000000;
    border-radius: 36px;
    padding: 14px 10px 18px 10px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
    border: 2px solid #333336;
    color: #ffffff;
    width: 100%;
    margin: 0 auto;
    position: relative;
}

.iphone-notch {
    width: 120px;
    height: 18px;
    background: #000000;
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 0 0 14px 14px;
    z-index: 100;
}

.iphone-status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 2px 10px 8px 10px;
    color: #ffffff;
}

.iphone-sms-header {
    text-align: center;
    padding: 4px 8px 12px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.iphone-sms-header .back-btn {
    position: absolute;
    left: 6px;
    top: 6px;
    color: #007aff;
    font-size: 0.88rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    text-decoration: none;
}

.iphone-sms-header .avatar-circle {
    width: 40px;
    height: 40px;
    background: #8e8e93;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #ffffff;
    margin-bottom: 3px;
}

.iphone-sms-header .sender-name {
    font-size: 0.8rem;
    font-weight: 500;
    color: #8e8e93;
}

.iphone-chat-body {
    min-height: 230px;
    padding: 16px 6px 10px 6px;
}

.sms-timestamp-tag {
    text-align: center;
    color: #8e8e93;
    font-size: 0.7rem;
    font-weight: 500;
    margin-bottom: 10px;
}

.sms-bubble-dark {
    background-color: #262628;
    color: #ffffff;
    border-radius: 18px;
    padding: 12px 15px;
    font-size: 0.88rem;
    line-height: 1.42;
    position: relative;
    max-width: 96%;
    margin-left: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    word-break: break-word;
}

.sms-bubble-dark::after {
    content: "";
    position: absolute;
    bottom: 2px;
    left: -5px;
    width: 12px;
    height: 14px;
    background-color: #262628;
    border-bottom-right-radius: 10px;
    clip-path: polygon(0 100%, 100% 100%, 100% 0);
}

.iphone-bottom-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 4px 2px 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.iphone-input-fake {
    flex-grow: 1;
    background: #1c1c1e;
    border: 1px solid #38383a;
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 0.8rem;
    color: #8e8e93;
}

/* Donor Record Cards */
.donor-card-item {
    background: #ffffff;
    border-radius: 18px;
    padding: 14px 16px;
    border: 1px solid #e2e8f0;
    margin-bottom: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.donor-card-item:hover {
    border-color: #93c5fd;
    box-shadow: 0 6px 16px rgba(11, 75, 128, 0.08);
}

/* Bottom Mobile App Navigation Bar */
.mobile-bottom-nav {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(226, 232, 240, 0.8);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px 6px 12px 6px;
    z-index: 100;
}

.nav-tab-btn {
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 0.68rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 4px 8px;
    border-radius: 12px;
    flex: 1;
}

.nav-tab-btn i {
    font-size: 1.25rem;
    margin-bottom: 2px;
    transition: transform 0.2s ease;
}

.nav-tab-btn.active-tab {
    color: #0b4b80;
}

.nav-tab-btn.active-tab i {
    transform: scale(1.15);
    color: #0d62a9;
}

.nav-tab-btn:active {
    transform: scale(0.92);
}

/* Center Special Action Button in Bottom Nav */
.nav-tab-center-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0b4b80 0%, #1e88e5 100%);
    color: #ffffff !important;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(13, 98, 169, 0.35);
    margin-top: -20px;
    border: 3px solid #ffffff;
    transition: all 0.2s ease;
}

.nav-tab-center-btn i {
    font-size: 1.4rem;
    margin-bottom: 0;
}

.nav-tab-center-btn:hover, .nav-tab-center-btn:active {
    transform: scale(1.08);
}

/* Modal styling */
.modal-content-custom {
    border-radius: var(--radius-lg);
    border: none;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.modal-header-custom {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    border-top-left-radius: var(--radius-lg);
    border-top-right-radius: var(--radius-lg);
    padding: 1.1rem 1.3rem;
}
