/* Dashboard Styles - Command Center */
.dashboard-container {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    animation: fadeIn 0.5s ease-out;
}

/* Greeting Header */
.dashboard-header {
    margin-bottom: 0.5rem;
}

.dashboard-header h2 {
    font-size: var(--font-size-2xl);
    color: #1a1a1a;
    font-weight: var(--font-weight-bold);
    margin-bottom: 0.25rem;
}

.dashboard-subtitle {
    color: #64748b;
    font-size: var(--font-size-sm);
}

/* Pulse Summary Bubbles */
.pulse-summary {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.pulse-badge {
    background: #ffffff;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-medium);
    color: #2e7d32;
    border: 1px solid rgba(46, 125, 50, 0.1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.pulse-badge i {
    font-size: 0.8rem;
}

#home-add-child-btn {
    background: #e8f5e9;
    border: 1px solid #a5d6a7;
    color: #2e7d32;
    transition: all 0.3s ease;
}

#home-add-child-btn:hover {
    background: #c8e6c9;
    border-color: #81c784;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.2);
}

/* Financial Card */
.financial-banner {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-radius: 20px;
    padding: 1.5rem;
    color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.2);
    position: relative;
    overflow: hidden;
}

.financial-banner::after {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 50%;
}

.finance-info h4 {
    font-size: var(--font-size-sm);
    color: #94a3b8;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.finance-info .total-balance {
    font-size: 2rem;
    font-weight: var(--font-weight-bold);
    margin-bottom: 0.25rem;
}

.finance-info .balance-label {
    font-size: var(--font-size-xs);
    color: #64748b;
}

.pay-cta-btn {
    background: #2e7d32;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: var(--font-weight-semibold);
    cursor: pointer;
    transition: all 0.2s;
    z-index: 1;
}

.pay-cta-btn:hover {
    background: #388e3c;
    transform: translateY(-2px);
}

/* Children Snapshot Grid */
.home-section-title {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    color: #1a1a1a;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.children-snapshots {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.child-snap-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.03);
    transition: transform 0.2s;
}

.child-snap-card:hover {
    transform: translateY(-4px);
}

.snap-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.snap-avatar {
    width: 44px;
    height: 44px;
    background: #e8f5e9;
    color: #2e7d32;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: var(--font-weight-bold);
    font-size: 1.2rem;
}

.snap-name h5 {
    font-size: var(--font-size-base);
    color: #1a1a1a;
    margin-bottom: 0.1rem;
}

.snap-name p {
    font-size: var(--font-size-xs);
    color: #64748b;
}

.snap-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.stat-box {
    background: #f8fafc;
    padding: 0.75rem;
    border-radius: 10px;
    text-align: center;
}

.stat-box .label {
    display: block;
    font-size: 0.65rem;
    color: #64748b;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.stat-box .value {
    display: block;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-bold);
    color: #1e293b;
}

/* Activity Feed */
.activity-feed {
    background: #ffffff;
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.activity-item {
    display: flex;
    gap: 1rem;
    position: relative;
}

.activity-item::before {
    content: '';
    position: absolute;
    left: 17px;
    top: 35px;
    bottom: -20px;
    width: 1px;
    background: #f1f5f9;
}

.activity-item:last-child::before {
    display: none;
}

.activity-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    z-index: 1;
}

.activity-icon.payment {
    background: #ecfdf5;
    color: #10b981;
}

.activity-icon.note {
    background: #eff6ff;
    color: #3b82f6;
}

.activity-icon.result {
    background: #fff7ed;
    color: #f59e0b;
}

.activity-content {
    padding-top: 0.25rem;
}

.activity-content p {
    font-size: var(--font-size-sm);
    color: #1e293b;
    margin-bottom: 0.2rem;
}

.activity-content span {
    font-size: var(--font-size-xs);
    color: #94a3b8;
}

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

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

@media (max-width: 480px) {
    .dashboard-container {
        padding: 0.5rem;
        gap: 0.75rem;
    }

    .dashboard-header {
        margin-bottom: 0.25rem;
    }

    .dashboard-header h2 {
        font-size: var(--font-size-lg);
        margin-bottom: 0.1rem;
    }

    .dashboard-subtitle {
        font-size: 0.7rem;
    }

    .pulse-summary {
        margin-top: 0.5rem;
        gap: 0.4rem;
    }

    .pulse-badge {
        padding: 0.3rem 0.6rem;
        font-size: 0.65rem;
    }

    .financial-banner {
        padding: 0.75rem 1rem;
        border-radius: 12px;
    }

    .finance-info h4 {
        font-size: 0.6rem;
        margin-bottom: 0.2rem;
    }

    .finance-info .total-balance {
        font-size: 1.25rem;
    }

    .finance-info .balance-label {
        font-size: 0.6rem;
    }

    .pay-cta-btn {
        padding: 0.35rem 0.6rem;
        font-size: 0.65rem;
        border-radius: 6px;
    }

    .home-section-title {
        font-size: var(--font-size-base);
        margin-bottom: 0.5rem;
        gap: 0.5rem;
    }

    .children-snapshots {
        gap: 0.5rem;
    }

    .child-snap-card {
        padding: 0.75rem;
        border-radius: 12px;
    }

    .snap-header {
        margin-bottom: 0.5rem;
        gap: 0.6rem;
    }

    .snap-avatar {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
        border-radius: 8px;
    }

    .snap-name h5 {
        font-size: var(--font-size-sm);
    }

    .snap-name p {
        font-size: 0.65rem;
    }

    .snap-stats {
        gap: 0.4rem;
    }

    .stat-box {
        padding: 0.4rem;
    }

    .stat-box .label {
        font-size: 0.55rem;
    }

    .stat-box .value {
        font-size: 0.75rem;
    }

    .activity-feed {
        padding: 0.75rem;
        border-radius: 12px;
    }

    .activity-list {
        gap: 0.75rem;
    }

    .activity-icon {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
    }

    .activity-item::before {
        left: 13px;
        top: 30px;
    }

    .activity-content p {
        font-size: 0.75rem;
    }

    .activity-content span {
        font-size: 0.6rem;
    }
}

/* Pull to Refresh Indicator */
.ptr-loading {
    padding: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
    margin-top: -60px;
    /* Hide by default */
    transition: margin-top 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    color: #2e7d32;
    font-size: 0.875rem;
    font-weight: 500;
}

.ptr-loading.active {
    margin-top: 0;
}

.ptr-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(46, 125, 50, 0.1);
    border-top: 2px solid #2e7d32;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Refresh Link in Financial Banner */
.refresh-banner-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 4px 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
}

.refresh-banner-link:hover {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.1);
}

.refresh-banner-link i {
    font-size: 0.65rem;
    transition: transform 0.5s ease;
}

.refresh-banner-link.syncing i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}