/* Happy Live Media Donations v1.0.0-alpha */
/* Red & White Theme | NetDynamic.Net */

:root {
    --red: #DC2626;
    --red-dark: #B91C1C;
    --red-light: #FEE2E2;
    --red-50: #FEF2F2;
    --white: #FFFFFF;
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;
    --success: #059669;
    --success-light: #D1FAE5;
    --warning: #D97706;
    --warning-light: #FEF3C7;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--gray-50);
    color: var(--gray-800);
    line-height: 1.6;
}

/* ========== PUBLIC DONATION PAGE ========== */
.donation-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.banner-wrap {
    width: 100%;
    max-width: 1300px;
    max-height: 280px;
    overflow: hidden;
    background: var(--red);
    margin: 0 auto;
}

.banner-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    max-height: 280px;
}

.donation-container {
    width: 100%;
    max-width: 520px;
    margin: -30px auto 40px;
    padding: 30px;
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    position: relative;
    z-index: 1;
}

.logo-wrap {
    width: 110px;
    height: 110px;
    margin: -60px auto 20px;
    border-radius: 50%;
    border: 4px solid var(--white);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    overflow: hidden;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-img {
    width: 120%;
    height: 120%;
    object-fit: cover;
    object-position: center;
}

/* Test Mode - Red Ring on Logo */
.logo-wrap.test-mode {
    border: 4px solid var(--red);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.3), 0 4px 12px rgba(0,0,0,0.15);
}

.donation-title {
    font-size: 26px;
    font-weight: 800;
    text-align: center;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.donation-desc {
    text-align: center;
    color: var(--gray-500);
    font-size: 15px;
    margin-bottom: 14px;
}

.step-label {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 8px;
    text-align: center;
}

/* Preset Amount Buttons */
.preset-amounts {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 16px;
}

.amount-btn {
    padding: 12px 22px;
    border: 2px solid var(--gray-200);
    background: var(--white);
    border-radius: 10px;
    font-size: 17px;
    font-weight: 700;
    color: var(--gray-700);
    cursor: pointer;
    transition: all 0.2s;
}

.amount-btn:hover {
    border-color: var(--red);
    color: var(--red);
    background: var(--red-50);
}

.amount-btn.active {
    background: var(--red);
    border-color: var(--red);
    color: var(--white);
}

/* Custom Amount Input */
.custom-amount-wrap {
    position: relative;
    margin-bottom: 20px;
}

.currency-sign {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 32px;
    font-weight: 700;
    color: var(--gray-400);
}

#donation-amount {
    width: 100%;
    padding: 20px 44px 20px 48px;
    border: 2px solid var(--gray-200);
    border-radius: 10px;
    font-size: 36px;
    font-weight: 700;
    text-align: center;
    outline: none;
    transition: border-color 0.2s;
}

#donation-amount:focus {
    border-color: var(--red);
}

#donation-amount::placeholder {
    color: var(--gray-300);
    font-weight: 400;
}

.amount-clear {
    position: absolute;
    right: 10px;
    top: 10px;
    width: 28px;
    height: 28px;
    border: none;
    background: var(--gray-200);
    color: var(--gray-500);
    border-radius: 50%;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.amount-clear:hover {
    background: var(--red);
    color: #fff;
}

/* Donor Info Fields inside Card Form */
.card-donor-fields {
    padding: 14px 16px 0;
}

.donor-info-fields {
    display: flex;
    gap: 12px;
    margin-bottom: 0;
}

.donor-field {
    flex: 1;
}

.donor-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-500);
    margin-bottom: 5px;
}

.optional-label {
    font-weight: 400;
    color: var(--gray-400);
    font-size: 12px;
}

.donor-field input {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--gray-200);
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

.donor-field input:focus {
    border-color: var(--red);
}

.donor-field input::placeholder {
    color: var(--gray-300);
}

/* Donor Message */
.message-wrap {
    margin-top: 11px;
    margin-bottom: 3px;
}

.message-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-500);
    margin-bottom: 6px;
}

.message-wrap textarea {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--gray-200);
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s;
}

.message-wrap textarea:focus {
    border-color: var(--red);
}

.message-wrap textarea::placeholder {
    color: var(--gray-300);
}

/* Fee Option */
.fee-option {
    background: var(--gray-50);
    border-radius: 10px;
    padding: 18px;
    margin-bottom: 0;
    transition: box-shadow 0.4s ease, background 0.4s ease;
}
.fee-option.highlight {
    box-shadow: 0 0 0 2px #3b82f6, 0 0 12px rgba(59,130,246,0.18);
    background: #eff6ff;
}

.fee-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-size: 14px;
    color: var(--gray-600);
    line-height: 1.5;
}

.fee-checkbox input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 22px;
    height: 22px;
    min-width: 22px;
    border: 2px solid var(--gray-300);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    margin-top: 1px;
}

.fee-checkbox input:checked ~ .checkmark {
    background: var(--red);
    border-color: var(--red);
}

.fee-checkbox input:checked ~ .checkmark::after {
    content: '\2713';
    color: white;
    font-size: 14px;
    font-weight: 700;
}

.fee-breakdown {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--gray-200);
}

.fee-breakdown-wrap {
    background: var(--gray-50);
    border-radius: 10px;
    padding: 14px 18px;
    margin-top: 10px;
}

.fee-line {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    font-size: 14px;
    color: var(--gray-600);
}

.fee-line.fee-total {
    border-top: 2px solid var(--gray-200);
    margin-top: 6px;
    padding-top: 10px;
    font-weight: 700;
    color: var(--gray-900);
    font-size: 16px;
}

/* Next Button */
.btn-next {
    width: 100%;
    margin-top: 16px;
    height: 55px;
    padding: 0 16px;
    font-size: 18px !important;
    font-weight: 700;
    border-radius: 10px;
}

/* Locked Amount (Step 2) */
.locked-amount {
    text-align: center;
    background: var(--gray-50);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 8px;
}

.locked-amount-label {
    font-size: 13px;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
}

.locked-amount-value {
    font-size: 48px;
    font-weight: 800;
    color: var(--red);
    line-height: 1.1;
    margin: 5px 0;
}

.locked-amount-detail {
    font-size: 15px;
    color: var(--gray-600);
    margin-bottom: 6px;
    background: var(--white);
    display: inline-block;
    padding: 5px 13px;
    border-radius: 8px;
    border: 1px solid var(--gray-200);
    font-weight: 600;
}

.locked-amount-change {
    background: none;
    border: none;
    color: var(--red);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    padding: 4px 0;
}

.locked-amount-change:hover {
    opacity: 0.7;
}

/* ========== PAYMENT METHODS ========== */
.payment-methods {
    margin-top: 16px;
}

.pay-section {
    margin-bottom: 0;
}

/* Wallet button section (Google Pay / Apple Pay) */
#wallet-section {
    margin-bottom: 8px;
}

#wallet-button {
    min-height: 48px;
}

/* Dividers between payment methods */
.pay-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 14px 0;
    color: var(--gray-400);
    font-size: 13px;
    font-weight: 500;
}

.pay-divider::before,
.pay-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--gray-200);
}

/* Card Select Button (branded with logos) */
.card-select-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border: 2px solid var(--gray-200);
    background: var(--white);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.card-select-btn:hover {
    border-color: var(--gray-400);
    background: var(--gray-50);
}

.card-select-label {
    font-size: 16px;
    font-weight: 700;
    color: var(--gray-800);
    white-space: nowrap;
}

.card-brand-logos {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-left: auto;
}

.card-logo {
    width: 36px;
    height: 24px;
    border-radius: 3px;
}

.card-select-arrow {
    font-size: 24px;
    color: var(--gray-400);
    font-weight: 300;
    line-height: 1;
    margin-left: 4px;
}

/* Expanded Card Form */
#card-form-expanded {
    border: 2px solid var(--gray-200);
    border-radius: 10px;
    overflow: hidden;
    animation: cardSlideDown 0.25s ease-out;
}

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

.card-form-inner {
    padding: 0;
}

.card-form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-600);
}

.card-form-close {
    border: none;
    background: none;
    font-size: 22px;
    color: var(--gray-400);
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    transition: color 0.2s;
}

.card-form-close:hover {
    color: var(--red);
}

.card-form-wrap {
    padding: 16px;
}

#card-element {
    padding: 12px;
    border: 2px solid var(--gray-200);
    border-radius: 8px 8px 0 0;
    background: var(--white);
    transition: border-color 0.2s;
    border-bottom: 1px solid var(--gray-200);
}

.card-zip-field input {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--gray-200);
    border-top: none;
    border-radius: 0 0 8px 8px;
    background: var(--white);
    font-size: 16px;
    font-family: Inter, -apple-system, BlinkMacSystemFont, sans-serif;
    color: #1F2937;
    transition: border-color 0.2s;
    outline: none;
    box-sizing: border-box;
}

.card-zip-field input::placeholder {
    color: #9CA3AF;
}

.card-zip-field input:focus {
    border-color: var(--red);
    border-top-color: var(--gray-200);
}

#card-element.StripeElement--focus {
    border-color: var(--red);
}

.card-errors {
    color: var(--red);
    font-size: 13px;
    padding: 0 16px;
    min-height: 0;
}

.card-errors:not(:empty) {
    padding: 4px 16px 8px;
}

/* Pay Button (card submit) */
.btn-pay {
    width: 100%;
    height: 50px;
    margin: 0;
    background: var(--red);
    color: white;
    border: none;
    border-radius: 0 0 8px 8px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-pay:hover {
    background: var(--red-dark);
}

.btn-pay:disabled {
    background: var(--gray-300);
    cursor: not-allowed;
}

/* PayPal Branded Button */
.btn-paypal {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 50px;
    background: #FFC439;
    border: none;
    border-radius: 10px;
    font-size: 17px;
    font-weight: 700;
    color: #253B80;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    text-decoration: none;
}

.btn-paypal:hover {
    background: #F0B72A;
    color: #253B80;
}

.paypal-logo-icon {
    flex-shrink: 0;
}

.paypal-text {
    font-size: 17px;
    font-weight: 600;
    color: #253B80;
}

.paypal-word {
    font-weight: 800;
    font-style: italic;
    color: #253B80;
}

.paypal-pal {
    color: #179BD7;
}

/* Processing Spinner */
.processing-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--red);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 20px;
}

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

#step-processing {
    text-align: center;
    padding: 40px 0;
    color: var(--gray-500);
}

/* Thank You */
.thankyou-icon {
    width: 70px;
    height: 70px;
    background: var(--success);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    margin: 0 auto 16px;
}

#step-thankyou {
    text-align: center;
    padding: 20px 0;
}

#step-thankyou h2 {
    color: var(--success);
    font-size: 28px;
    margin-bottom: 8px;
}

.thankyou-msg {
    color: var(--gray-600);
    margin-bottom: 24px;
    font-size: 15px;
}

.thankyou-details {
    background: var(--gray-50);
    border-radius: 10px;
    padding: 18px;
    margin-bottom: 24px;
    text-align: left;
}

.thankyou-details .detail-line {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 14px;
    color: var(--gray-600);
}

.thankyou-details .detail-line strong {
    color: var(--gray-800);
}

/* Error */
.error-icon {
    width: 70px;
    height: 70px;
    background: var(--red);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: 800;
    margin: 0 auto 16px;
}

#step-error {
    text-align: center;
    padding: 20px 0;
}

#step-error h2 {
    color: var(--red);
    margin-bottom: 8px;
}

#error-message {
    color: var(--gray-500);
    margin-bottom: 24px;
}

/* ========== IN-APP BROWSER OVERLAY ========== */
.inapp-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9000;
    background: rgba(0,0,0,0.88);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    overflow: hidden;
}

/* Top section: label + line + arrowhead all in a row pointing up-right */
.inapp-top {
    position: fixed;
    top: 10px;
    right: 16px;
    z-index: 9010;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: inappBounce 1.4s ease-in-out infinite;
}

@keyframes inappBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* Shaft wraps arrowhead + line, rotated to point top-right */
.inapp-arrow-shaft {
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: rotate(25deg);
    transform-origin: bottom center;
}

/* CSS triangle arrowhead pointing up */
.inapp-arrow-head {
    width: 0;
    height: 0;
    border-left: 14px solid transparent;
    border-right: 14px solid transparent;
    border-bottom: 20px solid #DC2626;
    filter: drop-shadow(0 0 6px rgba(220,38,38,0.7));
}

/* Line connecting arrowhead down to label */
.inapp-arrow-line {
    width: 5px;
    height: 50px;
    background: #DC2626;
    border-radius: 3px;
    filter: drop-shadow(0 0 6px rgba(220,38,38,0.7));
}

/* Label stays horizontal */
.inapp-arrow-label {
    margin-top: 6px;
    font-size: 15px;
    font-weight: 900;
    color: #fff;
    background: var(--red);
    padding: 5px 14px;
    border-radius: 20px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    white-space: nowrap;
    box-shadow: 0 4px 16px rgba(220,38,38,0.5);
}

/* Content card - compact, no scroll */
.inapp-content {
    margin-top: 120px;
    background: var(--white);
    border-radius: 18px;
    padding: 22px 22px 18px;
    max-width: 340px;
    width: calc(100% - 40px);
    text-align: center;
    box-shadow: 0 16px 50px rgba(0,0,0,0.3);
    position: relative;
    z-index: 9005;
}

.inapp-heading {
    font-size: 16px;
    font-weight: 700;
    color: var(--gray-600);
    margin-bottom: 6px;
}

/* Payment method badges */
.inapp-badges {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 0 0 6px;
    flex-wrap: wrap;
}

.inapp-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
}

.inapp-badge-gpay {
    background: #4285F4;
}

.inapp-badge-apple {
    background: #000;
}

.inapp-badge-card {
    background: var(--gray-600);
}

.inapp-subtext {
    color: var(--gray-500);
    font-size: 14px;
    margin-bottom: 12px;
}

/* Numbered steps - compact */
.inapp-steps {
    text-align: left;
    margin: 0 auto 12px;
}

.inapp-step {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 0;
    font-size: 14px;
    color: var(--gray-700);
    line-height: 1.3;
}

.inapp-step-num {
    width: 26px;
    height: 26px;
    min-width: 26px;
    background: var(--red);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
}

/* Visual menu mock - compact */
.inapp-menu-mock {
    border: 2px solid var(--gray-200);
    border-radius: 10px;
    overflow: hidden;
    margin: 0 auto;
    max-width: 200px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.inapp-mock-item {
    padding: 9px 14px;
    font-size: 13px;
    color: var(--gray-500);
    border-bottom: 1px solid var(--gray-100);
    text-align: left;
}

.inapp-mock-item:last-child {
    border-bottom: none;
}

.inapp-mock-highlight {
    background: var(--red-50);
    color: var(--red);
    font-weight: 700;
    position: relative;
    animation: inappPulseHighlight 2s ease-in-out infinite;
}

.inapp-mock-highlight::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--red);
    border-radius: 0 2px 2px 0;
}

@keyframes inappPulseHighlight {
    0%, 100% { background: var(--red-50); }
    50% { background: var(--red-light); box-shadow: inset 0 0 0 1px var(--red); }
}

/* PayPal bypass */
.inapp-paypal-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 14px 0 10px;
    color: var(--gray-400);
    font-size: 12px;
    font-weight: 500;
}

.inapp-paypal-divider::before,
.inapp-paypal-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--gray-200);
}

.inapp-paypal-btn {
    border-radius: 10px;
    height: 44px;
    font-size: 15px;
}

/* Mobile adjustments for overlay */
@media (max-width: 480px) {
    .inapp-top {
        right: 10px;
        top: 6px;
    }

    .inapp-arrow-line {
        height: 36px;
    }

    .inapp-arrow-label {
        font-size: 12px;
        padding: 4px 10px;
    }

    .inapp-content {
        margin-top: 100px;
        padding: 18px 16px 14px;
    }

    .inapp-heading {
        font-size: 14px;
    }

    .inapp-step {
        font-size: 13px;
    }

    .inapp-paypal-btn {
        height: 42px;
        font-size: 14px;
    }
}

/* Footer */
.donation-footer {
    margin-top: auto;
    padding: 20px;
    text-align: center;
    color: var(--gray-400);
    font-size: 13px;
}

.donation-footer a {
    color: var(--red);
    text-decoration: none;
}

/* ========== BUTTONS ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: var(--red);
    color: white;
}

.btn-primary:hover {
    background: var(--red-dark);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--gray-200);
    color: var(--gray-600);
}

.btn-outline:hover {
    border-color: var(--red);
    color: var(--red);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ========== ADMIN PANEL ========== */
.admin-panel {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.admin-header h1 {
    font-size: 24px;
    font-weight: 800;
    color: var(--gray-900);
}

.admin-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mode-badge {
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.mode-test {
    background: var(--warning-light);
    color: var(--warning);
}

.mode-live {
    background: var(--success-light);
    color: var(--success);
}

.version-tag {
    font-size: 12px;
    color: var(--gray-400);
    font-weight: 500;
}

/* Admin Tabs */
.admin-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 24px;
    padding: 0;
}

.tab-btn {
    padding: 9px 16px;
    border: 2px solid var(--gray-200);
    background: var(--white);
    color: var(--gray-500);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    border-radius: 8px;
    white-space: nowrap;
    transition: all 0.2s;
}

.tab-btn:hover {
    color: var(--gray-700);
    border-color: var(--gray-300);
}

.tab-btn.active {
    color: var(--white);
    background: var(--red);
    border-color: var(--red);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Settings Card */
.settings-card {
    background: var(--white);
    border-radius: 12px;
    padding: 28px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    border: 1px solid var(--gray-100);
}

.settings-card h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--red-light);
}

.settings-card h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-700);
    margin: 20px 0 12px;
}

/* Form Elements */
.form-group {
    margin-bottom: 18px;
    position: relative;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-600);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.form-group label small {
    font-weight: 400;
    text-transform: none;
    color: var(--gray-400);
    letter-spacing: 0;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="password"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
    background: var(--white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--red);
}

.form-group textarea {
    resize: vertical;
}

.form-row {
    display: flex;
    gap: 16px;
}

.form-row .form-group {
    flex: 1;
}

.form-row .form-group.flex-2 {
    flex: 2;
}

.help-text {
    font-size: 12px;
    color: var(--gray-400);
    margin-top: 6px;
}

.text-muted {
    color: var(--gray-400);
    font-size: 14px;
}

/* Toggle Buttons */
.toggle-group {
    display: flex;
    gap: 0;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid var(--gray-200);
}

.toggle-btn {
    flex: 1;
    padding: 10px 20px;
    border: none;
    background: var(--white);
    color: var(--gray-500);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.toggle-btn.active {
    background: var(--red);
    color: white;
}

.toggle-btn:not(.active):hover {
    background: var(--gray-50);
}

/* Password Eye Toggle */
.btn-eye {
    position: absolute;
    right: 10px;
    top: 34px;
    padding: 4px 10px;
    border: 1px solid var(--gray-200);
    background: var(--white);
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    color: var(--gray-500);
}

/* Image Previews */
.preview-img {
    max-width: 120px;
    max-height: 80px;
    border-radius: 8px;
    border: 2px solid var(--gray-200);
    display: block;
    margin-bottom: 8px;
    object-fit: cover;
}

.preview-img.banner-preview {
    max-width: 100%;
    max-height: 120px;
}

.preview-placeholder {
    width: 120px;
    height: 80px;
    background: var(--gray-100);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--gray-400);
    margin-bottom: 8px;
}

input[type="file"] {
    font-size: 13px;
    color: var(--gray-500);
}

/* Donations Table */
.donations-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.donations-table th {
    background: var(--gray-50);
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    color: var(--gray-600);
    border-bottom: 2px solid var(--gray-200);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.donations-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--gray-100);
    color: var(--gray-700);
}

.donations-table tr:hover td {
    background: var(--red-50);
}

.btn-delete-donation {
    background: none;
    border: none;
    color: var(--gray-300);
    font-size: 18px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    line-height: 1;
    transition: all 0.2s;
}

.btn-delete-donation:hover {
    color: var(--red);
    background: var(--red-50);
}

.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.badge-yes {
    background: var(--success-light);
    color: var(--success);
}

.badge-no {
    background: var(--gray-100);
    color: var(--gray-500);
}

.badge-test {
    background: var(--warning-light);
    color: var(--warning);
}

.badge-live {
    background: var(--success-light);
    color: var(--success);
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    padding: 14px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    z-index: 9999;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s;
    max-width: 400px;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.success {
    background: var(--success);
    color: white;
}

.toast.error {
    background: var(--red);
    color: white;
}

/* Payment Method Toggles */
.funding-toggles {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 22px;
}

.funding-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--gray-50);
    border: 2px solid var(--gray-200);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.funding-toggle:hover {
    border-color: var(--red);
}

.funding-toggle input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--red);
    cursor: pointer;
    flex-shrink: 0;
}

.funding-label {
    font-weight: 700;
    font-size: 15px;
    color: var(--gray-800);
    min-width: 100px;
}

.funding-desc {
    font-size: 13px;
    color: var(--gray-400);
}

/* Code Chips for Email Template */
.codes-reference {
    background: var(--gray-50);
    border-radius: 10px;
    padding: 18px;
    margin-bottom: 22px;
    border: 1px solid var(--gray-200);
}

.codes-reference h3 {
    margin: 0 0 12px !important;
    font-size: 14px !important;
}

.code-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.code-chip {
    padding: 6px 14px;
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: 6px;
    font-size: 13px;
    font-family: monospace;
    color: var(--red);
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
}

.code-chip:hover {
    background: var(--red);
    color: white;
    border-color: var(--red);
}

/* ========== RESPONSIVE ========== */

/* Tablet */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .admin-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .admin-header-right {
        flex-wrap: wrap;
    }

    .donations-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .funding-toggle {
        flex-wrap: wrap;
    }

    .funding-desc {
        width: 100%;
        padding-left: 32px;
        margin-top: -4px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    body {
        font-size: 14px;
    }

    /* Donation page */
    .donation-container {
        margin: -20px 10px 30px;
        padding: 20px 16px;
        border-radius: 12px;
    }

    .donation-title {
        font-size: 21px;
    }

    .donation-desc {
        font-size: 14px;
    }

    .preset-amounts {
        gap: 8px;
    }

    .amount-btn {
        padding: 10px 16px;
        font-size: 15px;
        flex: 1 1 auto;
        min-width: 70px;
        text-align: center;
    }

    #donation-amount {
        font-size: 18px;
        padding: 14px 14px 14px 32px;
    }

    .currency-sign {
        font-size: 18px;
        left: 12px;
    }

    .fee-option {
        padding: 14px;
    }

    .fee-checkbox {
        font-size: 13px;
    }

    .banner-wrap {
        max-height: 180px;
    }

    .banner-img {
        max-height: 180px;
    }

    .logo-wrap {
        margin-top: -50px;
    }

    .logo-img {
        width: 120%;
        height: 120%;
    }

    /* Admin panel */
    .admin-panel {
        padding: 10px;
    }

    .admin-header h1 {
        font-size: 20px;
    }

    .admin-tabs {
        gap: 5px;
    }

    .tab-btn {
        padding: 8px 12px;
        font-size: 12px;
    }

    .settings-card {
        padding: 16px;
        border-radius: 10px;
    }

    .settings-card h2 {
        font-size: 16px;
    }

    .toggle-group {
        flex-direction: column;
    }

    .toggle-btn {
        padding: 12px;
        text-align: center;
    }

    .btn {
        padding: 11px 18px;
        font-size: 14px;
        width: 100%;
        justify-content: center;
    }

    .btn-row {
        flex-direction: column;
    }

    .btn-sm {
        width: auto;
    }

    .btn-eye {
        top: 32px;
        padding: 3px 8px;
        font-size: 11px;
    }

    .form-group label {
        font-size: 12px;
    }

    .form-group input[type="text"],
    .form-group input[type="number"],
    .form-group input[type="password"],
    .form-group select,
    .form-group textarea {
        font-size: 16px;
        padding: 10px 12px;
    }

    .code-chips {
        gap: 6px;
    }

    .code-chip {
        padding: 5px 10px;
        font-size: 11px;
    }

    .preview-img {
        max-width: 100px;
        max-height: 70px;
    }

    .preview-placeholder {
        width: 100px;
        height: 70px;
    }

    /* Toast on mobile */
    .toast {
        left: 10px;
        right: 10px;
        bottom: 15px;
        max-width: none;
        text-align: center;
    }

    /* Funding toggles */
    .funding-label {
        min-width: auto;
        font-size: 14px;
    }

    .funding-desc {
        display: none;
    }

    /* Donor info fields stack on mobile */
    .donor-info-fields {
        flex-direction: column;
        gap: 6px;
    }

    .donor-field input {
        font-size: 16px;
    }

    /* Payment method buttons on mobile */
    .card-select-btn {
        padding: 12px 14px;
    }

    .card-select-label {
        font-size: 14px;
    }

    .card-logo {
        width: 30px;
        height: 20px;
    }

    .btn-pay,
    .btn-paypal {
        height: 48px;
        font-size: 16px;
    }
}
