/**
 * Pension & Life Insurance Management System
 * Dashboard Design Language
 * Based on sample_dashboard.php design
 */

body {
    background-color: #f8fafc;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.page-content {
    padding: 0.5rem 1.5rem 1.5rem 1.5rem;
}

/* Welcome Header - Pension Brand Colors */
.welcome-header {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    color: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.welcome-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M20,20 Q50,5 80,20 Q85,50 80,80 Q50,95 20,80 Q5,50 20,20" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></svg>');
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: rotate(0deg) translateY(0px); }
    50% { transform: rotate(180deg) translateY(-20px); }
}

.welcome-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    position: relative;
    z-index: 1;
}

.welcome-text h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.welcome-text p {
    opacity: 0.9;
    margin: 0;
}

.datetime-display {
    text-align: right;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1rem;
    min-width: 200px;
}

.current-time {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Courier New', monospace;
}

.current-date {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Metrics Cards */
.metrics-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.metric-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--accent-color, #10b981);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.metric-card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.metric-card:hover::before {
    opacity: 1;
}

/* Metric card color variants */
.metric-card.members { --accent-color: #2563eb; }
.metric-card.schemes { --accent-color: #10b981; }
.metric-card.contributions { --accent-color: #f59e0b; }
.metric-card.withdrawals { --accent-color: #8b5cf6; }
.metric-card.policies { --accent-color: #ec4899; }
.metric-card.claims { --accent-color: #ef4444; }
.metric-card.premiums { --accent-color: #06b6d4; }
.metric-card.payouts { --accent-color: #14b8a6; }
.metric-card.revenue { --accent-color: #8b5cf6; }
.metric-card.balances { --accent-color: #06b6d4; }

.metric-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.metric-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
}

.metric-icon {
    background: #f1f5f9;
    border-radius: 8px;
    padding: 0.5rem;
    font-size: 1.25rem;
    color: var(--accent-color, #10b981);
}

.metric-value {
    font-size: 2.25rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
    line-height: 1;
}

.metric-change {
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
    margin-bottom: 1rem;
}

.metric-trend {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.trend-up { color: #10b981; }
.trend-down { color: #ef4444; }
.trend-neutral { color: #3b82f6; }

.metric-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    color: var(--accent-color, #2563eb);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.metric-link:hover {
    color: #1e40af;
}

/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.quick-action {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    text-decoration: none;
    color: #1e293b;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.quick-action:hover {
    color: #2563eb;
    border-color: #2563eb;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.quick-action-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    color: #2563eb;
    display: block;
}

.quick-action-title {
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.quick-action-desc {
    font-size: 0.75rem;
    color: #64748b;
    margin: 0;
}

/* Charts and Analytics */
.chart-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    margin-bottom: 2rem;
}

.chart-header {
    padding: 1.5rem 1.5rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.chart-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 1rem 0;
}

.chart-body {
    padding: 1rem 1.5rem 1.5rem;
}

/* Tables */
.table-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    overflow: hidden;
    margin-bottom: 2rem;
}

.table-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.table-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.data-table th {
    background: #f8fafc;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    color: #64748b;
    border-bottom: 1px solid #e2e8f0;
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.875rem;
}

.data-table tbody tr:hover {
    background: #f8fafc;
}

/* Status Badges */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-pending { background: #fef3c7; color: #92400e; }
.status-approved { background: #dcfce7; color: #166534; }
.status-processed { background: #d1fae5; color: #065f46; }
.status-active { background: #dbeafe; color: #1d4ed8; }
.status-lapsed { background: #fee2e2; color: #991b1b; }
.status-rejected { background: #fee2e2; color: #991b1b; }
.status-paid { background: #d1fae5; color: #065f46; }
.status-overdue { background: #fee2e2; color: #991b1b; }

/* Page Cards */
.page-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    margin-bottom: 2rem;
}

.page-card-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.page-card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.page-card-body {
    padding: 1.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .page-content {
        padding: 1rem;
    }
    
    .welcome-content {
        flex-direction: column;
        text-align: center;
    }
    
    .datetime-display {
        min-width: auto;
        width: 100%;
    }
    
    .metrics-row {
        grid-template-columns: 1fr;
    }
    
    .metric-value {
        font-size: 1.75rem;
    }
    
    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }
}
