/* ═══════════════════════════════════════════════
   NAWADER DASHBOARD SYSTEM v3.0
   ═══════════════════════════════════════════════ */

body.dashboard-body {
    display: flex;
    height: 100vh;
    overflow: hidden;
    background: var(--bg-obsidian);
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: rgba(8,8,18,0.95);
    border-left: 1px solid var(--border);
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: width 0.3s;
    z-index: 100;
}

.sidebar-header {
    height: 72px;
    display: flex;
    align-items: center;
    padding: 0 24px;
    border-bottom: 1px solid var(--border);
}

.sidebar-logo {
    display: flex; align-items: center; gap: 12px;
    text-decoration: none;
}

.sidebar-logo-icon {
    width: 36px; height: 36px;
    background: var(--grad-cyan);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; color: #000;
    box-shadow: 0 0 15px rgba(0,229,255,0.3);
}

.sidebar-logo span {
    font-size: 16px; font-weight: 800; color: var(--white);
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 16px;
    border-radius: var(--r-md);
    color: var(--chrome);
    text-decoration: none;
    font-size: 14px; font-weight: 600;
    transition: all 0.2s;
}
.nav-item:hover {
    background: var(--bg-card);
    color: var(--white);
}
.nav-item.active {
    background: var(--cyan-dim);
    color: var(--cyan);
    border: 1px solid rgba(0,229,255,0.2);
}
.nav-item i { font-size: 18px; }

.sidebar-footer {
    padding: 24px 16px;
    border-top: 1px solid var(--border);
}

.user-profile {
    display: flex; align-items: center; gap: 12px;
    padding: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    cursor: pointer;
    transition: border-color 0.2s;
}
.user-profile:hover { border-color: rgba(255,255,255,0.2); }
.user-avatar {
    width: 36px; height: 36px; border-radius: 8px;
    background: var(--grad-violet);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; color: #fff; font-size: 14px;
}
.user-info { flex: 1; }
.user-info strong { display: block; font-size: 13px; color: var(--white); }
.user-info span { font-size: 11px; color: var(--muted); }

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Topbar */
.topbar {
    height: 72px;
    background: rgba(3,3,8,0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    z-index: 90;
}

.search-bar {
    display: flex; align-items: center; gap: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-pill);
    padding: 8px 16px;
    width: 400px;
    transition: border-color 0.2s;
}
.search-bar:focus-within {
    border-color: rgba(0,229,255,0.4);
    box-shadow: 0 0 20px rgba(0,229,255,0.1);
}
.search-bar i { color: var(--muted); }
.search-bar input {
    background: transparent; border: none; outline: none;
    color: var(--white); font-family: var(--font-ar);
    font-size: 14px; width: 100%;
}
.search-shortcut {
    font-family: var(--font-mono); font-size: 10px; color: var(--muted);
    background: rgba(255,255,255,0.05); padding: 2px 6px; border-radius: 4px;
}

.topbar-actions {
    display: flex; align-items: center; gap: 16px;
}
.action-btn {
    width: 40px; height: 40px; border-radius: 10px;
    background: var(--bg-card); border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; color: var(--chrome); cursor: pointer;
    position: relative;
    transition: all 0.2s;
}
.action-btn:hover { background: rgba(255,255,255,0.08); color: var(--white); }
.action-badge {
    position: absolute; top: -4px; right: -4px;
    width: 18px; height: 18px; border-radius: 50%;
    background: #ef4444; border: 2px solid var(--bg-obsidian);
    font-size: 10px; font-weight: 800; color: #fff;
    display: flex; align-items: center; justify-content: center;
}

/* Dashboard Content Area */
.dashboard-area {
    flex: 1;
    padding: 32px;
    overflow-y: auto;
    position: relative;
}

.dashboard-header {
    display: flex; align-items: flex-end; justify-content: space-between;
    margin-bottom: 32px;
}
.dashboard-header h1 { font-size: 28px; margin-bottom: 4px; }
.dashboard-header p { font-size: 14px; color: var(--chrome); }
.header-actions { display: flex; gap: 12px; }

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}
.metric-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    padding: 24px;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}
.metric-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); }
.metric-icon {
    width: 48px; height: 48px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; margin-bottom: 16px;
}
.metric-label { font-size: 13px; color: var(--chrome); font-weight: 600; margin-bottom: 8px; }
.metric-value { font-size: 32px; font-weight: 800; line-height: 1; display: flex; align-items: baseline; gap: 8px; }
.metric-trend { font-size: 12px; font-weight: 700; padding: 4px 8px; border-radius: var(--r-pill); display: inline-flex; align-items: center; gap: 4px; }
.trend-up { background: rgba(16,185,129,0.15); color: #10b981; }
.trend-down { background: rgba(239,68,68,0.15); color: #ef4444; }
.metric-bg-chart {
    position: absolute; bottom: 0; left: 0; right: 0; height: 60px;
    opacity: 0.1;
    background-size: 100% 100%;
}

/* Dashboard Main Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

.panel {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    padding: 24px;
    display: flex; flex-direction: column;
}
.panel-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 24px;
}
.panel-title { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.panel-action { font-size: 13px; color: var(--cyan); text-decoration: none; font-weight: 600; }

/* Table */
.data-table {
    width: 100%; border-collapse: collapse; text-align: right;
}
.data-table th {
    font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase;
    padding-bottom: 12px; border-bottom: 1px solid var(--border);
}
.data-table td {
    padding: 16px 0; border-bottom: 1px solid rgba(255,255,255,0.03);
    font-size: 14px;
}
.data-table tr:last-child td { border-bottom: none; }
.status-badge {
    font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: var(--r-pill); display: inline-block;
}
.status-pending { background: rgba(245,158,11,0.15); color: var(--gold-bright); }
.status-active { background: rgba(0,229,255,0.15); color: var(--cyan); }
.status-completed { background: rgba(16,185,129,0.15); color: #10b981; }

.tbl-service { display: flex; align-items: center; gap: 12px; }
.tbl-icon { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 16px; }

/* API Modules List */
.api-list { display: flex; flex-direction: column; gap: 12px; }
.api-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px; background: rgba(255,255,255,0.02);
    border: 1px solid var(--border); border-radius: var(--r-md);
    transition: border-color 0.2s; cursor: pointer;
}
.api-item:hover { border-color: rgba(0,229,255,0.3); }
.api-info { display: flex; align-items: center; gap: 12px; }
.api-icon { font-size: 24px; color: var(--chrome); }
.api-item:hover .api-icon { color: var(--cyan); }
.api-info strong { display: block; font-size: 14px; margin-bottom: 2px; }
.api-info span { font-size: 11px; color: var(--muted); }
.api-latency { font-size: 12px; font-weight: 700; color: #10b981; }

/* Responsive Dashboard */
@media (max-width: 1200px) {
    .metrics-grid { grid-template-columns: repeat(2, 1fr); }
    .dashboard-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .sidebar { position: fixed; transform: translateX(100%); right: 0; bottom: 0; top: 0; }
    .topbar { padding: 0 16px; }
    .search-bar { width: 200px; }
    .metrics-grid { grid-template-columns: 1fr; }
}
