/*
Theme Name: Money Machine
Description: Financial Dashboard Theme for Money Machine
Version: 1.0
*/

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: linear-gradient(135deg, #2E8B57 0%, #1E6B47 100%);
    min-height: 100vh;
    color: #333;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px 40px 20px;
}

/* Website Selector Styles */
.website-selector h2 {
    color: white;
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 40px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.website-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

/* Company Header Styles */
.company-header {
    grid-column: 1 / -1;
    margin: 30px 0 20px 0;
    text-align: center;
}

.company-title {
    color: white;
    font-size: 1.8rem;
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50px;
    padding: 15px 40px;
    margin: 0;
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.company-title::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Website Card Styles */
.website-card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.website-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #2E8B57, #1E6B47);
}

.website-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.website-name {
    font-size: 1.4rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.website-domain {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 20px;
}

/* Health Score Styles */
.health-score {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: bold;
    margin: 20px auto;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.health-score.excellent { background: linear-gradient(135deg, #2ecc71, #27ae60); }
.health-score.good { background: linear-gradient(135deg, #3498db, #2980b9); }
.health-score.fair { background: linear-gradient(135deg, #f39c12, #d68910); }
.health-score.poor { background: linear-gradient(135deg, #e74c3c, #c0392b); }

/* Metrics Grid */
.website-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.metric {
    text-align: center;
}

.metric-value {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
    color: #2E8B57;
    margin-bottom: 5px;
}

.metric-label {
    font-size: 0.8rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Dashboard Styles */
.website-header {
    background: white;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.website-header h1 {
    font-size: 2.2rem;
    color: #333;
    margin-bottom: 10px;
}

.dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

/* Widget Styles */
.dashboard-widget {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.dashboard-widget::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #2E8B57, #1E6B47);
}

.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.widget-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
}

.widget-icon {
    font-size: 1.5rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 20px;
}

.stat-item {
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 12px;
}

.stat-number {
    display: block;
    font-size: 1.8rem;
    font-weight: bold;
    color: #2E8B57;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.8rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-trend {
    font-size: 0.7rem;
    font-weight: 600;
    margin-top: 5px;
    padding: 2px 6px;
    border-radius: 4px;
}

.stat-trend.up {
    background: #d4edda;
    color: #155724;
}

.stat-trend.down {
    background: #f8d7da;
    color: #721c24;
}

/* Keyword List */
.keyword-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.keyword-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f1f3f4;
}

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

.keyword-term {
    font-weight: 500;
    color: #333;
}

.keyword-position {
    display: flex;
    align-items: center;
    gap: 8px;
}

.position-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.position-badge.top-3 {
    background: #d4edda;
    color: #155724;
}

.position-badge.top-10 {
    background: #cce5ff;
    color: #0056b3;
}

.position-badge.top-50 {
    background: #fff3cd;
    color: #856404;
}

.position-badge.beyond-50 {
    background: #f8d7da;
    color: #721c24;
}

.position-change {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 4px;
    border-radius: 4px;
}

.position-change.up {
    background: #d4edda;
    color: #155724;
}

.position-change.down {
    background: #f8d7da;
    color: #721c24;
}

/* Health Checks */
.health-checks {
    space: 0;
}

.health-check-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #f1f3f4;
}

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

.progress-bar {
    background: #e9ecef;
    border-radius: 10px;
    height: 8px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2E8B57, #1E6B47);
    border-radius: 10px;
    transition: width 0.3s ease;
}

/* Chart Container */
.chart-container {
    height: 200px;
    background: #f8f9fa;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-style: italic;
}

/* No Websites State */
.no-websites {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 40px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.no-websites h3 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 15px;
}

.no-websites p {
    color: #666;
    font-size: 1rem;
}

/* Login Required */
.login-required {
    text-align: center;
    background: white;
    border-radius: 16px;
    padding: 60px 40px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    max-width: 500px;
    margin: 100px auto;
}

.login-required h2 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 20px;
}

.login-required p {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.6;
}

.login-button {
    display: inline-block;
    background: linear-gradient(135deg, #2E8B57, #1E6B47);
    color: white;
    padding: 12px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    margin-top: 20px;
    transition: transform 0.2s ease;
}

.login-button:hover {
    transform: translateY(-2px);
    color: white;
}

/* Financial-Specific Styles */
.financial-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.financial-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    border-left: 4px solid #2E8B57;
}

.financial-card.negative {
    border-left-color: #e74c3c;
}

.financial-card.warning {
    border-left-color: #f39c12;
}

.financial-amount {
    font-size: 2.2rem;
    font-weight: bold;
    color: #2E8B57;
    margin-bottom: 5px;
}

.financial-amount.negative {
    color: #e74c3c;
}

.financial-amount.warning {
    color: #f39c12;
}

.financial-label {
    font-size: 0.9rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.financial-trend {
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.financial-trend.positive {
    color: #27ae60;
}

.financial-trend.negative {
    color: #e74c3c;
}

.account-balance {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #f1f3f4;
}

.account-balance:last-child {
    border-bottom: none;
}

.account-name {
    font-weight: 500;
    color: #333;
}

.account-amount {
    font-weight: bold;
    font-size: 1.1rem;
}

.account-amount.positive {
    color: #2E8B57;
}

.account-amount.negative {
    color: #e74c3c;
}

.transaction-list {
    max-height: 300px;
    overflow-y: auto;
}

.transaction-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f1f3f4;
}

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

.transaction-details {
    flex: 1;
}

.transaction-description {
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
}

.transaction-date {
    font-size: 0.8rem;
    color: #666;
}

.transaction-amount {
    font-weight: bold;
    font-size: 1.1rem;
}

.transaction-amount.income {
    color: #2E8B57;
}

.transaction-amount.expense {
    color: #e74c3c;
}

.alert-box {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    color: #856404;
}

.alert-box.success {
    background: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.alert-box.danger {
    background: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.budget-progress {
    margin: 15px 0;
}

.budget-bar {
    background: #e9ecef;
    border-radius: 10px;
    height: 12px;
    overflow: hidden;
    margin-bottom: 8px;
}

.budget-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.3s ease;
    background: linear-gradient(90deg, #2E8B57, #1E6B47);
}

.budget-fill.over-budget {
    background: linear-gradient(90deg, #e74c3c, #c0392b);
}

.budget-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #666;
}

.currency {
    font-size: 0.8em;
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 20px 15px;
    }
    
    .website-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .dashboard {
        grid-template-columns: 1fr;
    }
    
    .website-selector h2 {
        font-size: 2rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .financial-overview {
        grid-template-columns: 1fr;
    }
    
    .financial-amount {
        font-size: 1.8rem;
    }
}