/* Executive Profile Dashboard — SEPDCO */
:root {
    --ep-bg: #f0f4f8;
    --ep-surface: #ffffff;
    --ep-surface-2: #f8fafc;
    --ep-text: #0f172a;
    --ep-text-muted: #64748b;
    --ep-primary: #0088cc;
    --ep-primary-dark: #062237;
    --ep-accent: #0ea5e9;
    --ep-border: rgba(15, 23, 42, 0.08);
    --ep-glass: rgba(255, 255, 255, 0.72);
    --ep-shadow: 0 4px 24px rgba(6, 34, 55, 0.08);
    --ep-radius: 14px;
    --ep-hero-grad: linear-gradient(135deg, #062237 0%, #0a4a7c 45%, #0088cc 100%);
}

[data-ep-theme="dark"] {
    --ep-bg: #0b1220;
    --ep-surface: #111827;
    --ep-surface-2: #1a2332;
    --ep-text: #f1f5f9;
    --ep-text-muted: #94a3b8;
    --ep-border: rgba(255, 255, 255, 0.08);
    --ep-glass: rgba(17, 24, 39, 0.85);
    --ep-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
    --ep-hero-grad: linear-gradient(135deg, #020617 0%, #062237 50%, #0a4a7c 100%);
}

.ep-dashboard {
    background: var(--ep-bg);
    color: var(--ep-text);
    font-family: inherit;
    min-height: 100vh;
}

.ep-toolbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.5rem;
    background: var(--ep-glass);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--ep-border);
}

.ep-theme-btn {
    border: 1px solid var(--ep-border);
    background: var(--ep-surface);
    color: var(--ep-text);
    border-radius: 999px;
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.ep-theme-btn:hover {
    border-color: var(--ep-primary);
    color: var(--ep-primary);
}

/* Hero */
.ep-hero {
    background: var(--ep-hero-grad);
    padding: 3rem 0 4rem;
    position: relative;
    overflow: hidden;
}

.ep-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4z'/%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.ep-hero-inner {
    position: relative;
    z-index: 2;
}

.ep-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0088cc, #0ea5e9);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    font-weight: 800;
    color: #fff;
    border: 4px solid rgba(255,255,255,0.25);
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
    flex-shrink: 0;
}

.ep-hero-name {
    color: #fff;
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    font-weight: 800;
    margin: 0 0 0.35rem;
}

.ep-hero-title {
    color: rgba(255,255,255,0.9);
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.ep-hero-tagline {
    color: rgba(255,255,255,0.75);
    font-size: 0.95rem;
    max-width: 600px;
    line-height: 1.7;
}

.ep-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.ep-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none !important;
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
    cursor: pointer;
}

.ep-btn-primary {
    background: #fff;
    color: var(--ep-primary-dark) !important;
}

.ep-btn-outline {
    background: rgba(255,255,255,0.12);
    color: #fff !important;
    border: 1px solid rgba(255,255,255,0.3);
}

.ep-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.ep-contact-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.ep-chip {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.9);
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    font-size: 0.8rem;
    text-decoration: none !important;
}

.ep-chip:hover {
    background: rgba(255,255,255,0.2);
    color: #fff !important;
}

/* Sections */
.ep-section {
    padding: 2.5rem 0;
}

.ep-section-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--ep-text);
    margin-bottom: 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.ep-section-title i {
    color: var(--ep-primary);
}

.ep-section-sub {
    color: var(--ep-text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

/* Stat cards */
.ep-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
}

.ep-stat-card {
    background: var(--ep-surface);
    border: 1px solid var(--ep-border);
    border-radius: var(--ep-radius);
    padding: 1.15rem;
    box-shadow: var(--ep-shadow);
    transition: transform 0.25s, border-color 0.25s;
    text-align: center;
}

.ep-stat-card:hover {
    transform: translateY(-4px);
    border-color: var(--ep-primary);
}

.ep-stat-icon {
    width: 42px;
    height: 42px;
    margin: 0 auto 0.65rem;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(0,136,204,0.15), rgba(0,136,204,0.05));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ep-primary);
    font-size: 1.1rem;
}

.ep-stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--ep-primary-dark);
    line-height: 1.1;
}

[data-ep-theme="dark"] .ep-stat-value {
    color: var(--ep-primary);
}

.ep-stat-label {
    font-size: 0.78rem;
    color: var(--ep-text-muted);
    margin-top: 0.35rem;
    line-height: 1.4;
}

/* Cards & charts */
.ep-card {
    background: var(--ep-surface);
    border: 1px solid var(--ep-border);
    border-radius: var(--ep-radius);
    padding: 1.25rem;
    box-shadow: var(--ep-shadow);
    height: 100%;
}

.ep-chart {
    min-height: 280px;
}

.ep-summary-card {
    background: var(--ep-surface);
    border-right: 4px solid var(--ep-primary);
    border-radius: var(--ep-radius);
    padding: 1.75rem;
    box-shadow: var(--ep-shadow);
    font-size: 1rem;
    line-height: 1.9;
    color: var(--ep-text-muted);
}

.ep-summary-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.ep-highlight-badge {
    background: var(--ep-surface-2);
    border: 1px solid var(--ep-border);
    padding: 0.4rem 0.85rem;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--ep-text);
}

/* Expertise bars */
.ep-skill-bar {
    margin-bottom: 0.85rem;
}

.ep-skill-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-bottom: 0.3rem;
    font-weight: 600;
}

.ep-skill-track {
    height: 8px;
    background: var(--ep-surface-2);
    border-radius: 999px;
    overflow: hidden;
}

.ep-skill-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--ep-primary-dark), var(--ep-primary));
    border-radius: 999px;
    transition: width 1s ease;
}

/* Timeline */
.ep-timeline {
    position: relative;
    padding-right: 2rem;
}

.ep-timeline::before {
    content: '';
    position: absolute;
    right: 6px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--ep-primary), transparent);
}

.ep-timeline-item {
    position: relative;
    padding: 0 1.5rem 1.5rem 0;
    margin-bottom: 0.5rem;
}

.ep-timeline-item::before {
    content: '';
    position: absolute;
    right: -2rem;
    top: 0.35rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--ep-primary);
    border: 2px solid var(--ep-surface);
    box-shadow: 0 0 0 2px var(--ep-primary);
}

.ep-timeline-year {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--ep-primary);
    margin-bottom: 0.25rem;
}

.ep-timeline-title {
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.6;
    color: var(--ep-text);
}

.ep-timeline-meta {
    font-size: 0.78rem;
    color: var(--ep-text-muted);
    margin-top: 0.25rem;
}

/* Publications */
.ep-pub-item {
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--ep-border);
}

.ep-pub-item:last-child {
    border-bottom: none;
}

.ep-pub-year {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--ep-primary);
}

.ep-pub-title {
    font-size: 0.88rem;
    line-height: 1.6;
    margin-top: 0.2rem;
}

/* Filters */
.ep-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    padding: 1rem;
    background: var(--ep-surface);
    border-radius: var(--ep-radius);
    border: 1px solid var(--ep-border);
}

.ep-filter-group label {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--ep-text-muted);
    margin-bottom: 0.25rem;
}

.ep-filter-group select,
.ep-filter-group input {
    padding: 0.45rem 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--ep-border);
    background: var(--ep-surface-2);
    color: var(--ep-text);
    font-size: 0.85rem;
    min-width: 130px;
}

/* Data grid */
.ep-table-wrap {
    overflow-x: auto;
    border-radius: var(--ep-radius);
    border: 1px solid var(--ep-border);
    background: var(--ep-surface);
}

.ep-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.ep-table th {
    background: var(--ep-surface-2);
    padding: 0.75rem;
    text-align: right;
    font-weight: 700;
    color: var(--ep-text-muted);
    cursor: pointer;
    white-space: nowrap;
    user-select: none;
    position: sticky;
    top: 0;
}

.ep-table th:hover {
    color: var(--ep-primary);
}

.ep-table td {
    padding: 0.65rem 0.75rem;
    border-top: 1px solid var(--ep-border);
    vertical-align: top;
    line-height: 1.5;
}

.ep-table tbody tr:hover {
    background: var(--ep-surface-2);
}

.ep-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    color: var(--ep-text-muted);
}

.ep-pagination button {
    border: 1px solid var(--ep-border);
    background: var(--ep-surface-2);
    color: var(--ep-text);
    padding: 0.35rem 0.85rem;
    border-radius: 6px;
    cursor: pointer;
    margin: 0 0.15rem;
}

.ep-pagination button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.ep-tag {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.72rem;
    background: rgba(0,136,204,0.12);
    color: var(--ep-primary);
    margin: 0.1rem;
}

.ep-loading {
    text-align: center;
    padding: 4rem;
    color: var(--ep-text-muted);
}

.ep-domain-pill {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0.85rem;
    background: var(--ep-surface-2);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}

.ep-domain-count {
    font-weight: 800;
    color: var(--ep-primary);
}

@media (max-width: 768px) {
    .ep-hero { padding: 2rem 0 2.5rem; }
    .ep-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .ep-filters { flex-direction: column; }
    .ep-filter-group select, .ep-filter-group input { width: 100%; }
    .ep-table { font-size: 0.75rem; }
}

@media (max-width: 480px) {
    .ep-stats-grid { grid-template-columns: 1fr 1fr; }
    .ep-stat-value { font-size: 1.4rem; }
}

/* RTL Persian layout */
[dir="rtl"] .ep-hero-inner { text-align: right; }
[dir="rtl"] .ep-hero-title,
[dir="rtl"] .ep-hero-tagline { padding-right: 0; }
[dir="rtl"] .ep-summary-card { border-right: 4px solid var(--ep-primary); border-left: none; }
[dir="rtl"] .ep-section-title { border-right: 3px solid var(--ep-primary); padding-right: 0.75rem; }
[dir="rtl"] .ep-table th, [dir="rtl"] .ep-table td { text-align: right; }
[dir="rtl"] .ep-domain-pill { flex-direction: row-reverse; }
[dir="rtl"] .ep-skill-label { flex-direction: row-reverse; }
[dir="rtl"] .ep-pagination { flex-direction: row-reverse; }
[dir="rtl"] .ep-toolbar { flex-direction: row-reverse; }
[dir="rtl"] .ep-hero-actions { justify-content: flex-start; }
