/* Base + operational dashboard styles — RTL Persian */

:root {
    --bg: #f4f6f9;
    --surface: #ffffff;
    --text: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --warn: #d97706;
    --shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
    --radius: 10px;
    --font: IRANSansX, Tahoma, sans-serif;
    /* Hub list shell tokens (shared with hub-shell.css) */
    --hub-ink: #0f172a;
    --hub-muted: #64748b;
    --hub-accent: #6366f1;
    --hub-accent-soft: #eef2ff;
    --hub-surface: #ffffff;
    --hub-border: #e2e8f0;
    --hub-radius-lg: 16px;
    --hub-radius-xl: 20px;
    /* Unified responsive breakpoints */
    --bp-wide: 1400px;
    --bp-laptop: 1280px;
    --bp-shell: 1024px;
    --bp-content: 768px;
    --bp-phone: 480px;
    --touch-min: 44px;
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-right: env(safe-area-inset-right, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* Dashboard layout */
.dashboard-shell {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: 100vh;
}

.dashboard-sidebar {
    background: #0f172a;
    color: #e2e8f0;
    padding: 1.25rem 1rem;
}

.dashboard-brand {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #334155;
}

.dashboard-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.dashboard-nav a {
    color: #cbd5e1;
    padding: 0.55rem 0.75rem;
    border-radius: 6px;
    text-decoration: none;
}

.dashboard-nav a:hover,
.dashboard-nav a.active {
    background: #1e293b;
    color: #fff;
    text-decoration: none;
}

.dashboard-main {
    padding: 1.5rem 2rem;
    max-width: 1400px;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.dashboard-header h1 {
    margin: 0 0 0.35rem;
    font-size: 1.5rem;
}

.dashboard-subtitle {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.dashboard-user {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.kpi-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.15rem;
    box-shadow: var(--shadow);
}

.kpi-card-warn {
    border-color: #fcd34d;
    background: #fffbeb;
}

.kpi-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
}

.kpi-value {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.2;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1rem;
}

.data-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.15rem;
    box-shadow: var(--shadow);
}

.data-card h2 {
    margin: 0 0 0.75rem;
    font-size: 1rem;
    font-weight: 600;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.data-table th,
.data-table td {
    padding: 0.5rem 0.4rem;
    border-bottom: 1px solid var(--border);
    text-align: right;
}

.data-table th {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.8rem;
}

.status-badge,
.priority-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.75rem;
    background: #e2e8f0;
    color: #334155;
}

.priority-high {
    background: #fef3c7;
    color: #92400e;
}

.feed-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.feed-list li {
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

.feed-list li:last-child {
    border-bottom: none;
}

.feed-list time {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

.empty-state {
    color: var(--text-muted);
    font-size: 0.9rem;
    padding: 0.5rem 0;
}

.milestone-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.milestone-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

.milestone-done {
    color: var(--text-muted);
}

.milestone-next {
    font-weight: 600;
}

@media (max-width: 900px) {
    .dashboard-shell {
        grid-template-columns: 1fr;
    }

    .dashboard-sidebar {
        padding: 1rem;
    }

    .dashboard-nav {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .dashboard-main {
        padding: 1rem;
    }
}
