/* AI King HQ - Master AAA Game Studio Styling
   Designed for Maximum Visual Comfort (راحة بصرية فائقة) & Ergonomic Readability Across All Devices
*/
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap');

:root {
    /* Soothing Dark Palette (Reduces eye fatigue) */
    --bg-base: #0b0f19;
    --bg-surface: #111726;
    --bg-card: #141c2e;
    --bg-card-hover: #19233a;
    --bg-card-subtle: #0d1322;
    
    --border-color: #1e2a40;
    --border-subtle: rgba(255, 255, 255, 0.07);
    --border-gold: rgba(245, 158, 11, 0.4);
    
    /* Text Hierarchy */
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    --text-gold: #fbbf24;
    
    /* Muted & Ergonomic Accents */
    --accent-blue: #3b82f6;
    --accent-emerald: #10b981;
    --accent-purple: #8b5cf6;
    --accent-pink: #ec4899;
    --accent-amber: #f59e0b;
    --accent-cyan: #06b6d4;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    width: 100%;
    min-height: 100vh;
    background-color: var(--bg-base);
    color: var(--text-main);
    font-family: 'Cairo', 'Plus Jakarta Sans', sans-serif;
    direction: rtl;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* ========================================================
   HEADER & EXECUTIVE BAR
======================================================== */
.dash-header {
    background: #0d1220;
    border-bottom: 1px solid var(--border-color);
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.dash-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dash-logo-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #d97706, #b45309);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.3);
}

.dash-title h1 {
    font-size: 17px;
    font-weight: 800;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.2px;
}

.dash-title p {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

.live-pill {
    background: rgba(16, 185, 129, 0.12);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 10px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.live-indicator {
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
}

.boss-profile-chip {
    background: #141b2b;
    border: 1px solid rgba(245, 158, 11, 0.4);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    gap: 10px;
}

.boss-chip-avatar {
    font-size: 18px;
}

.boss-chip-text {
    font-size: 12px;
    font-weight: 800;
    color: #f8fafc;
}

.boss-chip-sub {
    font-size: 10px;
    color: var(--text-gold);
}

/* ========================================================
   EXECUTIVE STATS BANNER (KPIS)
======================================================== */
.stats-banner {
    padding: 16px 24px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.kpi-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
}

.kpi-card:hover {
    border-color: #2b3b5c;
    background: var(--bg-card-hover);
}

.kpi-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    background: #0f1523;
}

.kpi-value {
    font-size: 17px;
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
}

.kpi-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
}

/* ========================================================
   THE BOSS COMMAND CENTER (مكان الكتابة)
======================================================== */
.boss-command-section {
    max-width: 1400px;
    margin: 0 auto 16px auto;
    padding: 0 24px;
    width: 100%;
}

.command-card {
    background: #121827;
    border: 1px solid #243048;
    border-radius: var(--radius-lg);
    padding: 18px 22px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.command-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.command-header h2 {
    font-size: 15px;
    color: #fff;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
}

.command-header .badge-protocol {
    background: rgba(59, 130, 246, 0.12);
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.3);
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
}

.command-input-wrapper {
    display: flex;
    gap: 12px;
    align-items: center;
}

.command-textarea {
    flex: 1;
    background: #090d16;
    border: 1px solid #1e293d;
    border-radius: var(--radius-md);
    color: #f1f5f9;
    font-family: inherit;
    font-size: 13px;
    padding: 12px 14px;
    resize: none;
    line-height: 1.5;
    outline: none;
    transition: all 0.2s ease;
}

.command-textarea:focus {
    border-color: #3b82f6;
    background: #0c121e;
}

.command-textarea::placeholder {
    color: #64748b;
}

.btn-send-command {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border: 1px solid #3b82f6;
    color: #fff;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    cursor: pointer;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-send-command:hover {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    transform: translateY(-1px);
}

.command-quick-prompts {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    font-size: 11px;
    color: var(--text-muted);
}

.quick-prompt-btn {
    background: #151d2f;
    border: 1px solid #23304a;
    color: #cbd5e1;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-family: inherit;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-prompt-btn:hover {
    background: #1e2940;
    color: #fff;
    border-color: #3b82f6;
}

/* ========================================================
   THE 5% PIPELINE TRACKER
======================================================== */
.pipeline-section {
    max-width: 1400px;
    margin: 0 auto 16px auto;
    padding: 0 24px;
    width: 100%;
}

.pipeline-card {
    background: #111726;
    border: 1px solid #1f2b40;
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pipeline-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.pipeline-title-group h3 {
    font-size: 15px;
    color: #fff;
    font-weight: 800;
}

.pipeline-title-group p {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.btn-next-chunk {
    background: #162035;
    border: 1px solid #2b3b5c;
    color: #93c5fd;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    padding: 8px 14px;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-next-chunk:hover {
    background: #1e2c4a;
    color: #fff;
    border-color: #3b82f6;
}

.pipeline-progress-container {
    width: 100%;
    height: 7px;
    background: #090d16;
    border-radius: var(--radius-full);
    overflow: hidden;
    border: 1px solid #1a2336;
}

.pipeline-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2563eb, #38bdf8);
    transition: width 0.5s ease;
}

.chunk-badges-flow {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
}

.flow-step-tag {
    background: #151d2f;
    border: 1px solid #243048;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    color: #cbd5e1;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 5px;
}

.flow-arrow {
    color: #64748b;
    font-size: 11px;
}

/* ========================================================
   WORKSPACE (THE BOSS + 2 SPECIALISTS + 38 DEPTS)
======================================================== */
.workspace-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px 40px 24px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Tier 1: The Boss Suite */
.boss-suite-card {
    background: #141b2a;
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: var(--radius-lg);
    padding: 18px 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    position: relative;
    flex-wrap: wrap;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.boss-suite-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.boss-throne-avatar {
    width: 58px;
    height: 58px;
    background: linear-gradient(135deg, #d97706, #b45309);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    flex-shrink: 0;
    border: 1px solid #fbbf24;
}

.boss-suite-info h3 {
    font-size: 17px;
    font-weight: 800;
    color: #fff;
}

.boss-suite-info .boss-title {
    font-size: 12px;
    color: var(--text-gold);
    font-weight: 700;
}

.boss-suite-info .boss-task {
    font-size: 12px;
    color: #94a3b8;
    max-width: 650px;
    line-height: 1.4;
    margin-top: 2px;
}

.boss-xp-strip {
    margin-top: 8px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: var(--radius-sm);
    padding: 6px 10px;
}

.boss-xp-bar-bg {
    width: 100%;
    height: 6px;
    background: #090d16;
    border-radius: var(--radius-full);
    overflow: hidden;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.boss-xp-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
    transition: width 0.5s ease;
}

.btn-boss-action {
    background: linear-gradient(135deg, #d97706, #b45309);
    border: 1px solid #f59e0b;
    color: #fff;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    padding: 8px 14px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-boss-action:hover {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.btn-boss-action.secondary {
    background: #1a2234;
    border: 1px solid #2e3c56;
    color: #cbd5e1;
}

.btn-boss-action.secondary:hover {
    background: #232e46;
    color: #fff;
}

/* Tier 2: The 2 Specialists (Omar & Sarah) */
.specialists-strip {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.specialist-card {
    background: #131929;
    border: 1px solid #332752;
    border-radius: var(--radius-md);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.specialist-card:hover {
    border-color: #6366f1;
    background: #171f33;
}

.specialist-card.lamp-active {
    border-color: #7c3aed;
}

.spec-header-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.spec-avatar-box {
    width: 44px;
    height: 44px;
    background: #1e1b38;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
    border: 1px solid #6366f1;
}

.spec-info-title {
    flex: 1;
}

.spec-info-title h4 {
    font-size: 14px;
    font-weight: 800;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 6px;
}

.spec-role-pill {
    font-size: 11px;
    color: #c4b5fd;
    font-weight: 600;
}

.spec-task-desc {
    font-size: 11px;
    color: #94a3b8;
    line-height: 1.4;
    background: rgba(0, 0, 0, 0.2);
    padding: 6px 10px;
    border-radius: 6px;
    border-right: 3px solid #8b5cf6;
}

/* Filters & Search Bar */
.filter-bar-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.search-input-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-box input {
    width: 100%;
    background: #090d16;
    border: 1px solid var(--border-color);
    color: #fff;
    padding: 9px 36px 9px 12px;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 12px;
    outline: none;
    transition: all 0.2s;
}

.search-input-box input:focus {
    border-color: #3b82f6;
    background: #0d1320;
}

.search-input-box .icon {
    position: absolute;
    right: 12px;
    font-size: 14px;
    color: #64748b;
}

.filter-chips-row {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
}

.filter-chip {
    background: #141c2e;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.filter-chip:hover {
    color: #fff;
    border-color: #3b82f6;
}

.filter-chip.active {
    background: #1d4ed8;
    color: #fff;
    border-color: #3b82f6;
}

/* Tier 3: 38 Departments Grid */
.depts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.dept-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dept-card.gender-male {
    border-right: 3px solid #3b82f6;
}

.dept-card.gender-female {
    border-right: 3px solid #ec4899;
}

.dept-card:hover {
    background: var(--bg-card-hover);
    border-color: #2b3b5c;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.dept-card.lamp-active {
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.15);
}

.dept-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.dept-avatar-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dept-avatar {
    width: 42px;
    height: 42px;
    background: #172034;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    position: relative;
    border: 1px solid #23304c;
}

.gender-badge {
    position: absolute;
    bottom: -3px;
    right: -3px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    font-size: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: white;
    border: 2px solid var(--bg-card);
}

.gender-badge.male { background: #3b82f6; }
.gender-badge.female { background: #ec4899; }

.dept-lead-names h4 {
    font-size: 13px;
    font-weight: 800;
    color: #f1f5f9;
    display: flex;
    align-items: center;
    gap: 6px;
}

.dept-num-tag {
    font-size: 10px;
    color: #38bdf8;
    font-weight: 700;
}

.lamp-btn {
    font-size: 16px;
    cursor: pointer;
    filter: grayscale(100%) opacity(0.3);
    transition: all 0.25s;
    user-select: none;
}

.dept-card.lamp-active .lamp-btn,
.specialist-card.lamp-active .lamp-btn {
    filter: grayscale(0%) opacity(1);
    transform: scale(1.15);
    filter: drop-shadow(0 0 4px #facc15);
}

.dept-title-text {
    font-size: 12px;
    color: var(--text-gold);
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-level-rank-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(10, 14, 24, 0.6);
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.card-rank-title {
    font-size: 10px;
    color: #cbd5e1;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-level-tag {
    font-size: 10px;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: 4px;
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}

.card-xp-wrap {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.card-xp-info {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: #94a3b8;
}

.card-xp-bar {
    width: 100%;
    height: 4px;
    background: #090d16;
    border-radius: var(--radius-full);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.card-xp-fill {
    height: 100%;
    background: linear-gradient(90deg, #2563eb, #38bdf8);
    transition: width 0.4s ease;
}

.special-badge-halal {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34d399;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    text-align: center;
}

.special-badge-asset {
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #60a5fa;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    text-align: center;
}

.card-skills-preview {
    background: rgba(9, 13, 22, 0.6);
    border: 1px solid #1a2438;
    border-radius: 8px;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.card-skills-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 10px;
    font-weight: 700;
    color: #94a3b8;
}

.card-skill-row {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.card-skill-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 10px;
}

.card-skill-name {
    color: #cbd5e1;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.card-skill-badge {
    font-size: 9px;
    font-weight: 800;
    padding: 1px 4px;
    border-radius: 3px;
}

.card-skill-track {
    width: 100%;
    height: 3px;
    background: #090d16;
    border-radius: 999px;
    overflow: hidden;
}

.card-skill-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.4s ease;
}

.card-footer-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 10px;
    font-weight: 700;
    color: #38bdf8;
    padding-top: 4px;
    border-top: 1px dashed #1e2a40;
}

/* ========================================================
   MODAL - AGENT PROFILE & SKILLS EVOLUTION MATRIX
======================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(6, 9, 16, 0.85);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 16px;
}

.modal-content {
    background: #111726;
    border: 1px solid #23304a;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 740px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 20px 24px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid #1e2a40;
    padding-bottom: 10px;
    margin-bottom: 14px;
}

.modal-header h3 {
    font-size: 16px;
    color: #fff;
    font-weight: 800;
}

.close-modal {
    background: #182236;
    border: 1px solid #2a3a58;
    color: var(--text-muted);
    font-size: 18px;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.close-modal:hover {
    color: #fff;
    background: #dc2626;
    border-color: #ef4444;
}

.modal-agent-hero {
    display: flex;
    gap: 14px;
    align-items: center;
    background: #141b2c;
    border: 1px solid #202c44;
    border-radius: var(--radius-md);
    padding: 14px;
    margin-bottom: 14px;
}

.modal-hero-avatar {
    font-size: 34px;
    width: 58px;
    height: 58px;
    background: #1b243a;
    border: 1px solid #3b82f6;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.modal-hero-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.modal-rank-title {
    font-size: 11px;
    color: #fbbf24;
    font-weight: 700;
}

.badge-pill {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 999px;
}

.badge-pill.badge-male {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-pill.badge-female {
    background: rgba(236, 72, 153, 0.15);
    color: #f472b6;
    border: 1px solid rgba(236, 72, 153, 0.3);
}

.badge-pill.badge-level {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.modal-xp-box {
    margin-top: 4px;
}

.modal-xp-labels {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: #94a3b8;
    font-weight: 700;
    margin-bottom: 2px;
}

.modal-xp-bar-bg {
    width: 100%;
    height: 6px;
    background: #090d16;
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid #1a2438;
}

.modal-xp-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #34d399);
    border-radius: 999px;
    transition: width 0.5s ease;
}

.modal-skills-section {
    background: #0c111e;
    border: 1px solid #1d273e;
    border-radius: var(--radius-md);
    padding: 14px;
    margin-bottom: 14px;
}

.modal-skills-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}

.avg-mastery-badge {
    background: #172134;
    border: 1px solid #2a3a58;
    color: #fbbf24;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
}

.skills-evolution-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    max-height: 340px;
    overflow-y: auto;
    padding-left: 2px;
}

.skill-evolve-card {
    background: #121828;
    border: 1px solid #1f2a42;
    border-radius: 8px;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: all 0.2s;
}

.skill-evolve-card:hover {
    border-color: #3b82f6;
    background: #151e32;
}

.skill-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 6px;
}

.skill-name-txt {
    font-size: 11px;
    color: #f1f5f9;
    font-weight: 700;
    line-height: 1.3;
}

.skill-badge-rank {
    font-size: 9px;
    font-weight: 800;
    padding: 1px 5px;
    border-radius: 4px;
    white-space: nowrap;
}

.skill-progress-wrap {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.skill-progress-meta {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: #94a3b8;
}

.skill-track {
    width: 100%;
    height: 4px;
    background: #090d16;
    border-radius: 999px;
    overflow: hidden;
}

.skill-fill-bar {
    height: 100%;
    border-radius: 999px;
    transition: width 0.4s ease;
}

.skill-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.skill-xp-lbl {
    font-size: 9px;
    color: #64748b;
}

.btn-train-skill {
    background: #1e2d4a;
    border: 1px solid #3b82f6;
    color: #93c5fd;
    font-family: inherit;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
}

.btn-train-skill:hover {
    background: #2563eb;
    color: #fff;
}

.btn-train-skill:active {
    transform: scale(0.97);
}

/* Toast Notification */
.toast-container {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast-message {
    background: #141c2e;
    border: 1px solid #2e3f60;
    color: #f1f5f9;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    gap: 8px;
    animation: toastSlideUp 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes toastSlideUp {
    from {
        transform: translateY(15px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ========================================================
   RESPONSIVE BREAKPOINTS (MOBILE & TABLET ERGONOMICS)
======================================================== */
@media (max-width: 1100px) {
    .depts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .stats-banner {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .dash-header {
        padding: 10px 14px;
    }
    .stats-banner {
        grid-template-columns: repeat(2, 1fr);
        padding: 10px 14px;
    }
    .boss-command-section, .pipeline-section, .workspace-container {
        padding: 0 14px 20px 14px;
    }
    .specialists-strip {
        grid-template-columns: 1fr;
    }
    .depts-grid {
        grid-template-columns: 1fr;
    }
    .command-input-wrapper {
        flex-direction: column;
        align-items: stretch;
    }
    .btn-send-command {
        justify-content: center;
    }
    .skills-evolution-grid {
        grid-template-columns: 1fr;
    }
    .modal-agent-hero {
        flex-direction: column;
        text-align: center;
    }
    .modal-hero-info {
        align-items: center;
    }
    .modal-xp-box {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .stats-banner {
        grid-template-columns: 1fr;
    }
    .boss-suite-left {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ========================================================
   EXECUTIVE LOGIN SCREEN (بوابة الدخول الرئاسي)
======================================================== */
.login-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 30%, #151d32 0%, #0b0f19 80%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 1000;
}

.login-card {
    background: #111726;
    border: 1px solid rgba(245, 158, 11, 0.4);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 440px;
    padding: 32px 28px;
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.login-brand-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.login-logo-glow {
    width: 58px;
    height: 58px;
    background: linear-gradient(135deg, #f59e0b, #b45309);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.35);
    border: 1px solid #fde68a;
    margin-bottom: 4px;
}

.login-brand-header h2 {
    font-size: 20px;
    font-weight: 900;
    color: #fff;
    letter-spacing: 0.5px;
}

.login-badge-sub {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-gold);
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.25);
    padding: 2px 10px;
    border-radius: 999px;
}

.login-brand-header p {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
    line-height: 1.4;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.login-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.login-field label {
    font-size: 12px;
    font-weight: 700;
    color: #cbd5e1;
}

.login-input {
    width: 100%;
    background: #090d16;
    border: 1px solid #1f2b42;
    border-radius: var(--radius-md);
    color: #f1f5f9;
    font-family: inherit;
    font-size: 13px;
    padding: 11px 14px;
    outline: none;
    transition: all 0.2s ease;
}

.login-input:focus {
    border-color: #3b82f6;
    background: #0d1320;
}

.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper .login-input {
    padding-left: 38px;
}

.toggle-password {
    position: absolute;
    left: 12px;
    cursor: pointer;
    font-size: 14px;
    color: #94a3b8;
    user-select: none;
}

.login-options-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: var(--text-muted);
}

.remember-label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.ssl-chip {
    color: #34d399;
    font-size: 10px;
    font-weight: 700;
}

.btn-login-submit {
    background: linear-gradient(135deg, #d97706, #b45309);
    border: 1px solid #f59e0b;
    color: #fff;
    font-family: inherit;
    font-size: 13px;
    font-weight: 800;
    padding: 12px;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-login-submit:hover {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    transform: translateY(-1px);
}

.login-divider {
    text-align: center;
    position: relative;
    font-size: 11px;
    color: #64748b;
    margin: 4px 0;
}

.login-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    right: 0;
    left: 0;
    height: 1px;
    background: #1e293d;
    z-index: 1;
}

.login-divider span {
    position: relative;
    z-index: 2;
    background: #111726;
    padding: 0 10px;
}

.btn-quick-boss {
    background: #172136;
    border: 1px solid #2b3d60;
    color: #fbbf24;
    font-family: inherit;
    font-size: 12px;
    font-weight: 800;
    padding: 10px;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-quick-boss:hover {
    background: #1d2b48;
    border-color: #f59e0b;
}

.login-footer-info {
    text-align: center;
    font-size: 10px;
    color: #64748b;
    line-height: 1.4;
}

.btn-logout-small {
    background: #1e283d;
    border: 1px solid #334366;
    color: #94a3b8;
    font-family: inherit;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    cursor: pointer;
    margin-right: 8px;
    transition: all 0.2s;
}

.btn-logout-small:hover {
    background: #dc2626;
    color: #fff;
    border-color: #ef4444;
}

/* APK Download Banner */
.apk-download-banner {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid #10b981;
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 10px;
}

.apk-banner-info h4 {
    font-size: 13px;
    color: #34d399;
    font-weight: 800;
}

.apk-banner-info p {
    font-size: 11px;
    color: #cbd5e1;
    margin-top: 2px;
}

.btn-download-apk {
    background: linear-gradient(135deg, #10b981, #059669);
    border: 1px solid #34d399;
    color: #fff;
    font-family: inherit;
    font-size: 12px;
    font-weight: 800;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-download-apk:hover {
    background: linear-gradient(135deg, #34d399, #10b981);
    transform: translateY(-1px);
}

/* ========================================================
   TELEGRAM INTEGRATION & ON-DEMAND REA INQUIRIES FEED
   ======================================================== */
.telegram-strip {
    background: #111827;
    border: 1px solid #1f293d;
    border-radius: 10px;
    padding: 10px 16px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.telegram-status-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.telegram-bot-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.3);
    color: #38bdf8;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
}

.conn-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.conn-status-dot.connected {
    background: #10b981;
    box-shadow: 0 0 6px #10b981;
}

.conn-status-dot.waiting {
    background: #f59e0b;
    box-shadow: 0 0 6px #f59e0b;
}

.telegram-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-tg-action {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid #334155;
    color: #cbd5e1;
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
}

.btn-tg-action:hover {
    background: #1e293b;
    color: #fff;
    border-color: #38bdf8;
}

.btn-tg-action.highlight {
    background: rgba(56, 189, 248, 0.15);
    border-color: #0284c7;
    color: #38bdf8;
}

.btn-tg-action.highlight:hover {
    background: #0284c7;
    color: #fff;
}

/* Inquiries Feed */
.inquiries-feed-box {
    margin-top: 14px;
    border-top: 1px dashed #1e293b;
    padding-top: 12px;
}

.feed-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.feed-title {
    font-size: 12px;
    font-weight: 800;
    color: #a78bfa;
    display: flex;
    align-items: center;
    gap: 6px;
}

.inquiries-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 380px;
    overflow-y: auto;
    padding-left: 4px;
}

.inquiry-card-item {
    background: #0b0f19;
    border: 1px solid #1e293b;
    border-radius: 8px;
    padding: 12px;
    transition: border-color 0.2s;
}

.inquiry-card-item:hover {
    border-color: #334155;
}

.inquiry-top-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.inquiry-lead-badge {
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid rgba(139, 92, 246, 0.3);
    color: #c4b5fd;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
}

.inquiry-time {
    font-size: 10px;
    color: #64748b;
}

.inquiry-req-text {
    font-size: 12px;
    font-weight: 700;
    color: #f1f5f9;
    margin-bottom: 6px;
}

.inquiry-sarah-resp {
    background: #111827;
    border-right: 3px solid #8b5cf6;
    border-radius: 4px;
    padding: 8px 10px;
    font-size: 11px;
    color: #cbd5e1;
    font-family: inherit;
    line-height: 1.5;
}

.inquiry-sarah-resp code {
    background: #1e293b;
    color: #38bdf8;
    padding: 1px 4px;
    border-radius: 3px;
    font-family: monospace;
    font-size: 11px;
}

.inquiry-xp-gain {
    display: inline-flex;
    gap: 6px;
    font-size: 10px;
    font-weight: 700;
    color: #10b981;
    margin-top: 6px;
}

/* Research Modal Styles */
.research-input-row {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.research-engine-toggle {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 11px;
}

.research-engine-btn {
    background: #1e293b;
    border: 1px solid #334155;
    color: #94a3b8;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
}

.research-engine-btn.active {
    background: #3b82f6;
    color: #fff;
    border-color: #60a5fa;
}

.research-results-container {
    max-height: 350px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.research-result-card {
    background: #0b0f19;
    border: 1px solid #1e293b;
    border-radius: 6px;
    padding: 10px;
    font-size: 12px;
}

.research-result-card h5 {
    color: #38bdf8;
    font-size: 13px;
    margin-bottom: 4px;
}

.research-result-card a {
    color: #38bdf8;
    text-decoration: underline;
}

.research-result-card p {
    color: #94a3b8;
    font-size: 11px;
    line-height: 1.4;
}

