.dashboard {
    max-width: 1100px;
    margin: 0 auto;
    padding: 30px 20px;
}

.dashboard-header {
    margin-bottom: 30px;
}

.dashboard-header h1 {
    text-align: left;
    margin: 0 0 6px 0;
    font-size: 1.8rem;
    color: #333;
    font-family: var(--brand-font-heading, system-ui, sans-serif);
}

.dashboard-subtitle {
    color: #666;
    font-size: 1rem;
    margin: 0;
}

/* Quick Actions */
.dashboard-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.dashboard-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--brand-primary, #4CAF50);
    color: #fff;
    border: none;
    border-radius: var(--brand-border-radius, 6px);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
}

.dashboard-action-btn:hover {
    background: var(--brand-primary-dark, #388E3C);
    transform: translateY(-1px);
}

.dashboard-action-secondary {
    background: transparent;
    color: var(--brand-primary, #4CAF50);
    border: 1.5px solid var(--brand-primary, #4CAF50);
}

.dashboard-action-secondary:hover {
    background: color-mix(in srgb, var(--brand-primary, #4CAF50) 8%, transparent);
    color: var(--brand-primary, #4CAF50);
}

/* Stats Row */
.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: var(--brand-border-radius, 6px);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

a.stat-card-link {
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
}

a.stat-card-link:hover {
    border-color: var(--brand-primary, #4CAF50);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.15);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--brand-primary, #4CAF50) 12%, white);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-primary, #4CAF50);
    flex-shrink: 0;
}

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: #333;
    line-height: 1.2;
}

.stat-label {
    font-size: 0.85rem;
    color: #888;
}

/* Section Titles */
.section-title {
    font-size: 1.3rem;
    color: #333;
    margin: 0 0 20px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #eee;
    font-family: var(--brand-font-heading, system-ui, sans-serif);
}

/* Tools Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.tool-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-top: 3px solid var(--brand-primary, #4CAF50);
    border-radius: var(--brand-border-radius, 6px);
    padding: 24px 20px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.tool-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.tool-card-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-primary, #4CAF50);
    flex-shrink: 0;
}

.tool-card-content h3 {
    margin: 0 0 6px 0;
    font-size: 1.05rem;
    color: #333;
    font-family: var(--brand-font-heading, system-ui, sans-serif);
}

.tool-card-content p {
    margin: 0;
    font-size: 0.88rem;
    color: #666;
    line-height: 1.4;
}

/* Recent Calculations */
.recent-calculations {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: var(--brand-border-radius, 6px);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.calc-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid #f0f0f0;
}

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

.calc-type-badge {
    display: inline-block;
    padding: 4px 12px;
    background: color-mix(in srgb, var(--brand-primary, #4CAF50) 12%, white);
    color: var(--brand-primary, #4CAF50);
    border-radius: 12px;
    font-size: 0.82rem;
    font-weight: 600;
}

.calc-item-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.calc-type-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.calc-time {
    font-size: 0.82rem;
    color: #999;
}

/* Pin/Star Button */
.tool-card-pin {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: color 0.2s, background 0.2s;
    padding: 0;
}

.tool-card-pin:hover {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
}

.tool-card-pin.pinned {
    color: #f59e0b;
}

.tool-card-pin.pinned svg {
    fill: #f59e0b;
}

/* Analytics */
.analytics-row {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
}

.analytics-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: var(--brand-border-radius, 6px);
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    position: relative;
}

.analytics-card-title {
    margin: 0 0 12px 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #555;
}

.analytics-chart-wrap {
    height: 220px;
    position: relative;
}

.analytics-chart-doughnut {
    height: 200px;
}

.analytics-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bbb;
    font-size: 0.9rem;
}

/* PDF Link in calc items */
.calc-item-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.calc-pdf-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--brand-primary, #4CAF50);
    background: color-mix(in srgb, var(--brand-primary, #4CAF50) 8%, white);
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.2s;
}

.calc-pdf-link:hover {
    background: color-mix(in srgb, var(--brand-primary, #4CAF50) 16%, white);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 50px 20px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: var(--brand-border-radius, 6px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.empty-state-icon {
    color: #ccc;
    margin-bottom: 16px;
}

.empty-state h3 {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    color: #555;
}

.empty-state p {
    margin: 0 0 20px 0;
    color: #999;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .stats-row {
        grid-template-columns: 1fr;
    }

    .tools-grid {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 480px) {
    .dashboard-header h1 {
        font-size: 1.4rem;
    }
}
