:root {
    --bg: #f1f5f9;
    --surface: rgba(255, 255, 255, 0.85);
    --surface-strong: rgba(255, 255, 255, 0.98);
    --card-border: rgba(15, 23, 42, 0.10);

    /* Accent is set per-page from PHP; fallback here */
    --accent: #3b82f6;
    --accent-alt: #2563eb;

    --success: #16a34a;
    --warning: #d97706;
    --danger: #dc2626;

    --text: #0f172a;
    --subtext: #475569;
    --muted: #64748b;

    --shadow: 0 30px 60px -30px rgba(15, 23, 42, 0.18);
    --shadow-strong: 0 20px 25px -5px rgba(15, 23, 42, 0.18);
}

html.theme-dark {
    --bg: #0f172a;
    --surface: rgba(15, 23, 42, 0.92);
    --surface-strong: rgba(15, 23, 42, 0.98);
    --card-border: rgba(148, 163, 184, 0.16);

    --text: #e2e8f0;
    --subtext: #94a3b8;
    --muted: #64748b;

    --shadow: 0 30px 60px -30px rgba(15, 23, 42, 0.6);
    --shadow-strong: 0 20px 25px -5px rgba(0, 0, 0, 0.30);
}

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

body {
    background: radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.08), transparent 55%),
        radial-gradient(circle at 80% 80%, rgba(16, 185, 129, 0.06), transparent 55%),
        var(--bg);
    color: var(--text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    min-height: 100vh;
    line-height: 1.6;
    display: flex;
}

/* Public pages (no sidebar layout) */
body.fundme-public {
    display: block;
}

/* Common container widths (used by existing pages) */
.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}

.container-sm {
    max-width: 680px;
}

.sidebar {
    width: 280px;
    background: var(--surface);
    border-right: 1px solid var(--card-border);
    padding: 2rem 0;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    backdrop-filter: blur(18px);
}

.sidebar h1 {
    font-size: 1.75rem;
    font-weight: 800;
    padding: 0 2rem;
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text);
}

.sidebar h1 i {
    color: var(--accent);
    font-size: 1.5rem;
}

.sidebar > p {
    padding: 0 2rem;
    color: var(--subtext);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.nav-links {
    flex: 1;
    padding: 0 1rem;
}

.nav-links a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    color: var(--subtext);
    text-decoration: none;
    border-radius: 12px;
    margin-bottom: 0.25rem;
    transition: all 0.2s;
    font-weight: 600;
}

.nav-links a:hover {
    background: rgba(59, 130, 246, 0.10);
    color: var(--text);
}

.nav-links a.active {
    background: rgba(59, 130, 246, 0.14);
    color: var(--accent);
}

.nav-links a i {
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 0 1rem;
}

.theme-toggle {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    border-radius: 12px;
    border: 1px solid var(--card-border);
    background: var(--surface-strong);
    color: var(--text);
    cursor: pointer;
    font-weight: 800;
    transition: all 0.2s;
}

.theme-toggle:hover {
    border-color: rgba(59, 130, 246, 0.35);
    box-shadow: var(--shadow);
    transform: translateY(-1px);
}

.main {
    flex: 1;
    margin-left: 280px;
    padding: 2.5rem;
    overflow-x: hidden;
}

.page-header {
    margin-bottom: 2.5rem;
    padding: 2rem;
    background: var(--surface);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
}

.page-header h1 {
    color: var(--accent);
}

.breadcrumb {
    color: var(--subtext);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s;
    font-weight: 700;
}

.breadcrumb a:hover {
    color: var(--accent-alt);
}

.breadcrumb i {
    font-size: 0.7rem;
    color: var(--muted);
}

h1 {
    font-size: 2.5rem;
    font-weight: 900;
    margin: 0 0 1.25rem 0;
    display: flex;
    align-items: center;
    gap: 1rem;
}

h1 i {
    color: var(--accent);
    font-size: 1.85rem;
}

.header-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.section,
.card {
    background: var(--surface);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 1.25rem;
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-header h2,
.section-header h3 {
    font-size: 1.25rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text);
    margin: 0;
}

.section-header h2 i,
.section-header h3 i {
    font-size: 1rem;
    color: var(--accent);
}

.btn {
    padding: 0.875rem 1.75rem;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 800;
    font-size: 0.95rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.02em;
}

.btn-primary {
    background: var(--accent);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.18);
}

.btn-primary:hover {
    background: var(--accent-alt);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.25);
}

.btn-secondary {
    background: var(--surface-strong);
    color: var(--text);
    border: 1px solid var(--card-border);
}

.btn-secondary:hover {
    background: rgba(148, 163, 184, 0.10);
    border-color: rgba(59, 130, 246, 0.35);
}

.btn-outline {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--card-border);
}

.btn-outline:hover {
    background: rgba(148, 163, 184, 0.10);
    border-color: rgba(59, 130, 246, 0.35);
}

.btn-white {
    background: var(--surface-strong);
    color: var(--accent);
    border: 1px solid rgba(59, 130, 246, 0.22);
}

.btn-white:hover {
    background: rgba(59, 130, 246, 0.06);
    border-color: rgba(59, 130, 246, 0.35);
}

.btn-danger {
    background: rgba(220, 38, 38, 0.12);
    color: var(--danger);
    border: 1px solid rgba(220, 38, 38, 0.22);
}

.btn-danger:hover {
    background: rgba(220, 38, 38, 0.16);
    border-color: rgba(220, 38, 38, 0.35);
}

.btn-small,
.btn-sm {
    padding: 0.6rem 1rem;
    border-radius: 12px;
    font-size: 0.9rem;
}

/* Back link */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    font-weight: 900;
    color: var(--text);
}

.back-btn:hover {
    color: var(--accent);
}

/* Balance card (wallet + other pages) */
.balance-card {
    background: linear-gradient(135deg, var(--accent), var(--accent-alt));
    color: white;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 2rem;
    box-shadow: var(--shadow-strong);
}

.balance-label {
    opacity: 0.9;
    font-weight: 800;
}

.balance-amount {
    font-size: 2.25rem;
    font-weight: 900;
    margin: 0.5rem 0 1.5rem 0;
    letter-spacing: -0.02em;
}

.balance-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Card header/title helpers (used by existing pages) */
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
}

.card-title i {
    color: var(--accent);
}

.card-link {
    text-decoration: none;
    font-weight: 900;
    color: var(--accent);
}

.card-link:hover {
    color: var(--accent-alt);
}

.alert {
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.alert-success {
    background: rgba(22, 163, 74, 0.10);
    border: 1px solid rgba(22, 163, 74, 0.22);
    color: #16a34a;
}

html.theme-dark .alert-success {
    color: #6ee7b7;
}

.alert-error {
    background: rgba(220, 38, 38, 0.10);
    border: 1px solid rgba(220, 38, 38, 0.22);
    color: #dc2626;
}

.alert-warning {
    background: rgba(217, 119, 6, 0.12);
    border: 1px solid rgba(217, 119, 6, 0.22);
    color: var(--warning);
}

html.theme-dark .alert-warning {
    color: #fdba74;
}

.form-group {
    margin-bottom: 1rem;
}

.recipient-info {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 1rem;
    border-radius: 16px;
    border: 1px solid var(--card-border);
    background: var(--surface-strong);
}

.recipient-avatar {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(59, 130, 246, 0.12);
    color: var(--accent);
    border: 1px solid rgba(59, 130, 246, 0.20);
    font-weight: 900;
}

.recipient-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

html.theme-dark .alert-error {
    color: #fca5a5;
}

/* Toast notifications (popups) */
.fundme-toast-host {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: min(380px, calc(100vw - 2rem));
    pointer-events: none;
}

.fundme-toast {
    pointer-events: auto;
    display: grid;
    grid-template-columns: 28px 1fr 28px;
    gap: 0.75rem;
    align-items: start;
    padding: 0.85rem 1rem;
    border-radius: 14px;
    background: var(--surface-strong);
    border: 1px solid var(--card-border);
    border-left: 4px solid var(--accent);
    box-shadow: var(--shadow);
    color: var(--text);
    animation: fundme-toast-in 0.18s ease-out;
}

.fundme-toast.is-hiding {
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.fundme-toast--success {
    border-left-color: var(--success);
}

.fundme-toast--error {
    border-left-color: var(--danger);
}

.fundme-toast--warning {
    border-left-color: var(--warning);
}

.fundme-toast__icon {
    color: var(--subtext);
    font-size: 1.05rem;
    line-height: 1.2;
    margin-top: 0.1rem;
}

.fundme-toast__body {
    color: var(--subtext);
    font-weight: 800;
    line-height: 1.35;
}

.fundme-toast__close {
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    margin-left: auto;
}

.fundme-toast__close:hover {
    color: var(--text);
}

@keyframes fundme-toast-in {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-group label,
label {
    font-weight: 800;
    color: var(--text);
}

.form-control,
input,
select,
textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--card-border);
    background: var(--surface-strong);
    color: var(--text);
    font-size: 1rem;
}

/* Don't apply text-input sizing to checkbox/radio controls */
input[type="checkbox"],
input[type="radio"] {
    width: auto;
    padding: 0;
    border-radius: 0;
}

.fundme-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 800;
}

.fundme-form-help {
    margin-top: 0.35rem;
    color: var(--subtext);
    font-weight: 700;
}

.fundme-social-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid var(--card-border);
    background: var(--surface-strong);
    color: var(--subtext);
    cursor: pointer;
    padding: 0;
}

.fundme-social-toggle:hover {
    border-color: rgba(59, 130, 246, 0.35);
    background: rgba(59, 130, 246, 0.08);
}

.fundme-social-toggle.is-active {
    color: var(--accent);
    border-color: rgba(59, 130, 246, 0.50);
    background: rgba(59, 130, 246, 0.12);
}

.fundme-social-toggle i {
    font-size: 1.15rem;
    line-height: 1;
}

/* File inputs (e.g., request media uploads) */
input[type="file"],
input[type="file"].form-control {
    padding: 10px 12px;
    cursor: pointer;
}

input[type="file"]::file-selector-button {
    margin-right: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--card-border);
    background: rgba(148, 163, 184, 0.10);
    color: var(--text);
    font-weight: 900;
    cursor: pointer;
}

input[type="file"]:hover::file-selector-button {
    border-color: rgba(59, 130, 246, 0.35);
    background: rgba(59, 130, 246, 0.08);
}

/* Safari/older Chromium */
input[type="file"]::-webkit-file-upload-button {
    margin-right: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--card-border);
    background: rgba(148, 163, 184, 0.10);
    color: var(--text);
    font-weight: 900;
    cursor: pointer;
}

input[type="file"]:hover::-webkit-file-upload-button {
    border-color: rgba(59, 130, 246, 0.35);
    background: rgba(59, 130, 246, 0.08);
}

textarea {
    min-height: 110px;
}

.form-control:focus,
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.list-item {
    padding: 1.25rem;
    border-bottom: 1px solid var(--card-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
}

.list-item:hover {
    background: rgba(59, 130, 246, 0.06);
}

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

/* Simple responsive grids */
.grid {
    display: grid;
    gap: 1.25rem;
}

.grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* KPI cards */
.kpi {
    background: var(--surface-strong);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 1.25rem;
}

.kpi-value {
    font-size: 1.75rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    color: var(--text);
}

.kpi-label {
    color: var(--subtext);
    font-weight: 700;
    margin-top: 0.25rem;
}

/* Action cards */
.action-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.action-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text);
    background: var(--surface-strong);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 1.25rem;
    transition: all 0.2s;
}

.action-card:hover {
    transform: translateY(-2px);
    border-color: rgba(59, 130, 246, 0.35);
    box-shadow: var(--shadow);
}

.action-icon {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(59, 130, 246, 0.12);
    color: var(--accent);
    border: 1px solid rgba(59, 130, 246, 0.20);
}

.action-label {
    font-weight: 900;
    letter-spacing: 0.01em;
}

/* Lists */
.list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.list-icon {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(59, 130, 246, 0.12);
    color: var(--accent);
    border: 1px solid rgba(59, 130, 246, 0.20);
    flex: 0 0 auto;
}

.list-content {
    flex: 1;
    min-width: 0;
    margin-left: 12px;
}

.list-title {
    font-weight: 900;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.list-subtitle {
    color: var(--subtext);
    font-weight: 700;
    font-size: 0.9rem;
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.list-amount {
    font-weight: 900;
    color: var(--text);
    margin-left: 12px;
    flex: 0 0 auto;
}

/* Badge aliases for legacy markup (e.g. class="badge badge-success") */
.badge.badge-success {
    background: rgba(22, 163, 74, 0.12);
    color: var(--success);
    border: 1px solid rgba(22, 163, 74, 0.22);
}

.badge.badge-warning {
    background: rgba(217, 119, 6, 0.12);
    color: var(--warning);
    border: 1px solid rgba(217, 119, 6, 0.22);
}

.badge.badge-danger {
    background: rgba(220, 38, 38, 0.12);
    color: var(--danger);
    border: 1px solid rgba(220, 38, 38, 0.22);
}

.badge.badge-info {
    background: rgba(59, 130, 246, 0.12);
    color: var(--accent);
    border: 1px solid rgba(59, 130, 246, 0.22);
}

/* Contacts */
.contact-card {
    background: var(--surface-strong);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.contact-avatar {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.20);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-weight: 900;
    overflow: hidden;
}

.contact-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.contact-name {
    font-weight: 900;
    color: var(--text);
}

.contact-quick-actions {
    display: flex;
    gap: 0.75rem;
}

.fundme-contact-top {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.fundme-contact-meta {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.fundme-contact-username {
    font-weight: 800;
    color: var(--subtext);
    font-size: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fundme-contact-sub {
    font-weight: 800;
    color: var(--subtext);
    font-size: 0.8rem;
    opacity: 0.9;
}

.fundme-contact-muted {
    opacity: 0.75;
}

/* Profile page helpers */
.fundme-profile-theme {
    --profilePrimary: var(--accent);
    --profileSecondary: var(--accent-alt);
}

.fundme-profile-preview {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: 240px minmax(0, 1fr);
    align-items: start;
}

.fundme-profile-qr {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.fundme-profile-qr img {
    width: 200px;
    height: 200px;
    object-fit: contain;
    border-radius: 16px;
    padding: 10px;
    background: var(--surface-strong);
    border: 1px solid var(--card-border);
}

.fundme-profile-qr-note {
    color: var(--subtext);
    font-weight: 700;
    font-size: 0.9rem;
    text-align: center;
}

.fundme-profile-url-row {
    display: flex;
    gap: 0.75rem;
    align-items: stretch;
    flex-wrap: wrap;
}

.fundme-profile-url-row input {
    flex: 1;
    min-width: 240px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
}

.fundme-profile-share-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.fundme-profile-avatar-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1rem;
    border-radius: 16px;
    border: 1px solid var(--card-border);
    background: var(--surface-strong);
}

.fundme-profile-avatar {
    width: 96px;
    height: 96px;
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid var(--card-border);
    background: var(--surface-strong);
    flex: 0 0 auto;
}

.fundme-profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fundme-profile-avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 2rem;
    color: white;
    background: linear-gradient(135deg, var(--profilePrimary), var(--profileSecondary));
}

.fundme-file-input {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
}

.theme-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.theme-swatch {
    width: 46px;
    height: 46px;
    border-radius: 999px;
    border: 1px solid var(--card-border);
    cursor: pointer;
    padding: 0;
    position: relative;
    box-shadow: var(--shadow);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.theme-swatch:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-strong);
}

.theme-swatch.is-active {
    outline: 3px solid var(--profilePrimary, var(--accent));
    outline-offset: 2px;
}

.theme-mini-avatar {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.95);
}

.theme-mini-line {
    position: absolute;
    left: 22px;
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
}

.theme-mini-line.line1 {
    top: 12px;
    width: 16px;

.fundme-settings-divider {
    height: 1px;
    width: 100%;
    background: var(--border);
    margin: 1.25rem 0;
}

.fundme-settings-section-title {
    margin: 0 0 0.75rem 0;
    font-size: 0.95rem;
    font-weight: 900;
    letter-spacing: 0.01em;
    color: var(--text);
}
}

.theme-mini-line.line2 {
    top: 22px;
    width: 22px;
}

.quick-btn {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text);
    background: rgba(148, 163, 184, 0.10);
    border: 1px solid var(--card-border);
    transition: all 0.2s;
}

.quick-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(59, 130, 246, 0.35);
}

.quick-btn.active {
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.35);
    color: var(--accent);
}

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    z-index: 2000;
}

.modal-content {
    width: 100%;
    max-width: 640px;
    background: var(--surface);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow-strong);
    overflow: hidden;
    max-height: calc(100vh - 2.5rem - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex: 0 0 auto;
}

.modal-header h2 {
    font-size: 1.1rem;
    font-weight: 900;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.modal-body {
    padding: 1.5rem;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.modal-close {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    border: 1px solid var(--card-border);
    background: var(--surface-strong);
    color: var(--text);
    cursor: pointer;
    font-size: 1.25rem;
    font-weight: 900;
    flex: 0 0 auto;
}

@media (max-width: 520px) {
    .modal {
        padding: 0.85rem;
    }

    .modal-header {
        padding: 1rem 1rem;
    }

    .modal-body {
        padding: 1rem;
    }
}

.modal-close:hover {
    border-color: rgba(59, 130, 246, 0.35);
}

/* Embedded payment iframe (used by FundMe gift/deposit) */
.fundme-iframe {
    width: 100%;
    height: min(70vh, 720px);
    border: 0;
    border-radius: 16px;
    background: var(--surface-strong);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.badge.success {
    background: rgba(22, 163, 74, 0.12);
    color: var(--success);
    border: 1px solid rgba(22, 163, 74, 0.22);
}

.badge.warning {
    background: rgba(217, 119, 6, 0.12);
    color: var(--warning);
    border: 1px solid rgba(217, 119, 6, 0.22);
}

.badge.danger {
    background: rgba(220, 38, 38, 0.12);
    color: var(--danger);
    border: 1px solid rgba(220, 38, 38, 0.22);
}

.badge.info {
    background: rgba(59, 130, 246, 0.12);
    color: var(--accent);
    border: 1px solid rgba(59, 130, 246, 0.22);
}

.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.mobile-menu-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid var(--card-border);
    background: var(--surface-strong);
    color: var(--text);
    cursor: pointer;
    font-weight: 900;
}

.mobile-menu-btn:hover {
    border-color: rgba(59, 130, 246, 0.35);
}

.sidebar-overlay {
    display: none;
}

.mobile-bottom-nav {
    display: none;
}

@media (max-width: 768px) {
    .page-header {
        margin-bottom: 1.25rem;
    }

    .mobile-menu-btn {
        display: inline-flex;
    }

    .breadcrumb {
        justify-content: space-between;
        width: 100%;
        gap: 1rem;
    }

    .breadcrumb h1 {
        flex: 1;
        font-size: 1.35rem;
        text-align: right;
        justify-content: flex-end;
        color: var(--accent);
    }

    .breadcrumb h1 i {
        color: var(--accent);
    }

    .sidebar {
        width: 86vw;
        max-width: 320px;
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        border-right: 1px solid var(--card-border);
        border-bottom: none;
        transform: translateX(-105%);
        transition: transform 0.25s ease;
        z-index: 1200;
    }

    body.sidebar-open {
        overflow: hidden;
    }

    body.sidebar-open .sidebar {
        transform: translateX(0);
    }

    .sidebar-overlay {
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.45);
        z-index: 1100;
        display: block;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease;
    }

    body.sidebar-open .sidebar-overlay {
        opacity: 1;
        pointer-events: auto;
    }

    .main {
        margin-left: 0;
        padding: 1.5rem;
    }

    body.has-mobile-bottom-nav .main {
        padding-bottom: 5.25rem;
    }

    .mobile-bottom-nav {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1000;
        display: flex;
        justify-content: space-around;
        gap: 0.25rem;
        padding: 0.5rem 0.6rem;
        background: var(--surface-strong);
        border-top: 1px solid var(--card-border);
        box-shadow: var(--shadow-strong);
        backdrop-filter: blur(18px);
    }

    .mobile-bottom-nav a {
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.2rem;
        padding: 0.45rem 0.25rem;
        border-radius: 12px;
        color: var(--subtext);
        text-decoration: none;
        font-weight: 800;
        font-size: 0.72rem;
        transition: background 0.2s, color 0.2s;
    }

    .mobile-bottom-nav a i {
        font-size: 1.2rem;
    }

    .mobile-bottom-nav a.active {
        background: rgba(59, 130, 246, 0.12);
        color: var(--accent);
    }

    h1 {
        font-size: 1.95rem;
    }

    h1 i {
        font-size: 1.7rem;
    }

    .header-actions {
        flex-direction: column;
        width: 100%;
    }

    .dashboard-quick-actions {
        display: none;
    }

    .btn {
        width: 100%;
    }

    /* Share button rows should stay compact on mobile */
    .fundme-profile-share-row .btn,
    .fundme-public-share .btn {
        width: auto;
        flex: 1 1 calc(50% - 0.75rem);
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .action-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    /* List items mobile responsive */
    .list-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        padding: 1rem;
    }

    .list-content {
        margin-left: 0;
        width: 100%;
    }

    .list-title {
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
    }

    .list-amount {
        margin-left: 0;
        align-self: flex-end;
        font-size: 1.1rem;
    }

    .list-icon {
        width: 36px;
        height: 36px;
    }

    /* Profile page mobile responsive */
    .fundme-profile-preview {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .fundme-profile-qr {
        width: 100%;
        max-width: 100%;
    }

    .fundme-profile-qr img {
        width: 180px;
        height: 180px;
    }

    .fundme-profile-url-row {
        flex-direction: column;
    }

    .fundme-profile-url-row input {
        width: 100%;
        min-width: unset;
    }

    .fundme-profile-url-row .btn {
        width: 100%;
    }

    .fundme-profile-avatar-row {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1rem;
    }

    .fundme-profile-avatar-row > div {
        width: 100%;
        min-width: unset;
    }
}

.fundme-seasonal-effects {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 1500;
}

.fundme-seasonal-effects__particle {
    position: absolute;
    top: -10%;
    font-size: 1.35rem;
    animation: fundmeSeasonalFloat 9s linear infinite;
    opacity: 0.9;
    transform: translate3d(0, 0, 0);
}

.fundme-seasonal-effects__particle--confetti {
    width: 10px;
    height: 14px;
    border-radius: 4px;
    background: var(--fx-color, rgba(255, 255, 255, 0.85));
    animation: fundmeSeasonalConfetti 7.5s linear infinite;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #fff;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.12);
}

.fundme-seasonal-effects__particle--float {
    font-size: 1.8rem;
}

.fundme-save-floating {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: calc(14px + env(safe-area-inset-bottom));
    width: min(560px, calc(100% - 1.5rem));
    z-index: 1600;
    padding: 0.6rem;
    border-radius: 14px;
    background: var(--card);
    border: 1px solid var(--border);
}

.has-mobile-bottom-nav .fundme-save-floating {
    bottom: calc(86px + env(safe-area-inset-bottom));
}

@keyframes fundmeSeasonalConfetti {
    0% {
        transform: translate3d(0, -10%, 0) rotate(0deg);
        opacity: 0;
    }
    20% {
        opacity: 1;
    }
    100% {
        transform: translate3d(calc(var(--fx-wind, 20px) * 1px), 110vh, 0) rotate(var(--fx-rotation, 180deg));
        opacity: 0;
    }
}

@keyframes fundmeSeasonalFloat {
    0% {
        transform: translate3d(0, 120vh, 0);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    100% {
        transform: translate3d(0, -10vh, 0);
        opacity: 0;
    }
}
