/* ============================================================ */
/* Corp Policy - MAIN STYLES                                    */
/* ============================================================ */

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #e0e7ff;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.1);
    --radius: 10px;
    --radius-sm: 6px;
}

/* ── Reset ── */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--gray-50);
    color: var(--gray-800);
    padding-top: 76px;
    line-height: 1.6;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--gray-100); }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }

/* ── Main Content ── */
.main-content {
    padding: 24px 32px;
    max-width: 1400px;
    margin: 0 auto;
}

/* ── Page Header ── */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.page-title h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--gray-900);
}

.page-title p {
    font-size: 14px;
    color: var(--gray-500);
    margin-top: 4px;
}

.page-actions {
    display: flex;
    gap: 12px;
}

/* ── Buttons ── */
.btn {
    padding: 10px 22px;
    border-radius: var(--radius-sm);
    border: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-family: inherit;
}

.btn-primary {
    background: var(--primary);
    color: white;
}
.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99,102,241,0.3);
}

.btn-success {
    background: var(--success);
    color: white;
}
.btn-success:hover {
    background: #059669;
}

.btn-warning {
    background: var(--warning);
    color: white;
}
.btn-warning:hover {
    background: #d97706;
}

.btn-danger {
    background: var(--danger);
    color: white;
}
.btn-danger:hover {
    background: #dc2626;
}

.btn-outline {
    background: transparent;
    color: var(--gray-600);
    border: 1px solid var(--gray-300);
}
.btn-outline:hover {
    background: var(--gray-100);
}

.btn-sm {
    padding: 4px 10px;
    font-size: 12px;
    border-radius: 4px;
}

/* ── Cards ── */
.card {
    background: white;
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    transition: all 0.2s;
}
.card:hover {
    box-shadow: var(--shadow-lg);
}

.card-title {
    font-size: 14px;
    color: var(--gray-500);
    font-weight: 500;
}
.card-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--gray-900);
    margin-top: 4px;
}

/* ── Stats Grid ── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

/* ── Tables ── */
.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    background: white;
    border-radius: var(--radius);
    border-collapse: collapse;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.data-table thead {
    background: var(--gray-50);
}

.data-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--gray-200);
}

.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--gray-100);
    font-size: 14px;
}

.data-table tbody tr:hover {
    background: var(--gray-50);
}

/* ── Badges ── */
.badge {
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    display: inline-block;
}
.badge-success { background: #d1fae5; color: #065f46; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-info { background: #dbeafe; color: #1e40af; }
.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-secondary { background: var(--gray-200); color: var(--gray-600); }

/* ── Alerts ── */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid transparent;
}

.alert-success { background: #d1fae5; color: #065f46; border-color: #a7f3d0; }
.alert-danger { background: #fee2e2; color: #991b1b; border-color: #fecaca; }
.alert-warning { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.alert-info { background: #dbeafe; color: #1e40af; border-color: #bfdbfe; }

.alert .close {
    margin-left: auto;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: inherit;
    opacity: 0.6;
}
.alert .close:hover { opacity: 1; }

/* ── Forms ── */
.form-group {
    margin-bottom: 18px;
}
.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 4px;
}
.form-group .form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s;
    background: white;
}
.form-group .form-control:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}
.form-group textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

.form-container {
    max-width: 800px;
    background: white;
    padding: 32px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* ── Detail View ── */
.detail-view {
    background: white;
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
}
.detail-row {
    display: flex;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-100);
}
.detail-row:last-child { border-bottom: none; }
.detail-label {
    font-weight: 500;
    color: var(--gray-500);
    width: 200px;
    min-width: 200px;
}
.detail-value {
    flex: 1;
    color: var(--gray-800);
}

/* ── Footer ── */
.main-footer {
    background: white;
    border-top: 1px solid var(--gray-200);
    padding: 16px 32px;
    margin-top: 32px;
}
.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--gray-500);
}

/* ── Search Results ── */
.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    text-decoration: none;
    color: var(--gray-700);
    border-bottom: 1px solid var(--gray-100);
    transition: all 0.2s;
}
.search-result-item:hover {
    background: var(--gray-50);
}
.search-result-item .result-title {
    font-weight: 500;
}
.search-result-item .result-subtitle {
    font-size: 12px;
    color: var(--gray-400);
}
.search-result-empty {
    padding: 16px;
    text-align: center;
    color: var(--gray-400);
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .main-content { padding: 16px; }
    .stats-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
    .detail-row { flex-direction: column; }
    .detail-label { width: 100%; min-width: 100%; }
    .page-header { flex-direction: column; align-items: stretch; }
    .page-actions { flex-wrap: wrap; }
    .form-container { padding: 16px; }
    .data-table { font-size: 13px; }
    .data-table th, .data-table td { padding: 8px 12px; }
}
/* ============================================================ */
/* TOP NAV - RIGHT SIDE FIXES                                   */
/* ============================================================ */

/* ── Right aligned dropdowns ── */
.dropdown-right {
    right: 0;
    left: auto !important;
}

/* ── Profile dropdown specific ── */
.profile-dropdown .dropdown-content {
    min-width: 200px;
    padding: 8px 0;
}

.profile-dropdown .dropdown-content a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px;
    color: var(--gray-700);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}

.profile-dropdown .dropdown-content a:hover {
    background: var(--gray-50);
    color: var(--primary);
}

.profile-dropdown .dropdown-content a i {
    width: 20px;
    color: var(--gray-400);
}

.profile-dropdown .dropdown-content hr {
    margin: 6px 12px;
    border: none;
    border-top: 1px solid var(--gray-200);
}

.profile-dropdown .dropdown-content .logout-link {
    color: var(--danger);
}

.profile-dropdown .dropdown-content .logout-link:hover {
    background: #fef2f2;
    color: #dc2626;
}

.profile-dropdown .dropdown-content .logout-link i {
    color: var(--danger);
}

/* ── Profile button ── */
.nav-profile {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px 4px 4px;
    border-radius: 50px;
    border: none;
    background: none;
    cursor: pointer;
    transition: all 0.2s;
}

.nav-profile:hover {
    background: var(--gray-100);
}

.nav-profile .avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

.nav-profile .profile-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-700);
}

/* ── Language button ── */
.lang-btn {
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
}

/* ── Responsive fixes ── */
@media (max-width: 768px) {
    .nav-profile .profile-name {
        display: none;
    }
    
    .nav-profile {
        padding: 4px;
    }
    
    .dropdown-right {
        right: -10px;
    }
}
/* ============================================================ */
/* ULTRA PREMIUM DASHBOARD                                      */
/* ============================================================ */

.premium-dashboard {
    padding: 20px 0;
    max-width: 1440px;
    margin: 0 auto;
}

/* ── Glassmorphism ── */
.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

[data-theme="dark"] .glass {
    background: rgba(31, 41, 55, 0.7);
    border-color: rgba(55, 65, 81, 0.3);
}

/* ── Hero Section ── */
.hero-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px;
    background: linear-gradient(135deg, var(--nav-bg), var(--nav-active-bg));
    border-radius: 20px;
    border: 1px solid var(--nav-border);
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(99,102,241,0.06), transparent 70%);
    border-radius: 50%;
}

.hero-greeting {
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    z-index: 1;
}

.hero-wave {
    font-size: 40px;
}

.hero-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--nav-text-hover);
    margin: 0;
}

.hero-highlight {
    color: var(--primary);
}

.hero-subtitle {
    color: var(--nav-text);
    font-size: 14px;
    margin: 2px 0 0;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.hero-date { color: var(--nav-text); }
.hero-divider { color: var(--nav-border); }
.hero-role { 
    background: var(--primary);
    color: white;
    padding: 1px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}
.hero-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--success);
}
.hero-status .status-dot {
    width: 6px;
    height: 6px;
    background: var(--success);
    border-radius: 50%;
    animation: pulseDot 2s infinite;
}

.hero-right {
    display: flex;
    align-items: center;
    gap: 24px;
    position: relative;
    z-index: 1;
}

.hero-stats-mini {
    display: flex;
    align-items: center;
    gap: 16px;
}

.hero-stat {
    text-align: center;
}

.hero-stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--nav-text-hover);
    display: block;
    line-height: 1.2;
}

.hero-stat-label {
    font-size: 11px;
    color: var(--nav-text);
}

.hero-stat-divider {
    width: 1px;
    height: 30px;
    background: var(--nav-border);
}

.hero-actions {
    display: flex;
    gap: 8px;
}

.hero-btn {
    padding: 8px 18px;
    border-radius: 10px;
    border: 1px solid var(--nav-border);
    background: var(--nav-bg);
    color: var(--nav-text);
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.hero-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.hero-btn.primary {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.hero-btn.primary:hover {
    background: var(--primary-dark);
    transform: scale(1.02);
}

/* ── Metric Cards ── */
.metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.metric-card {
    padding: 18px 20px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all 0.3s ease;
    border: 1px solid var(--nav-border);
    background: var(--nav-bg);
}

.metric-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.06);
    border-color: var(--primary);
}

.metric-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
}

.metric-content {
    flex: 1;
}

.metric-value {
    font-size: 26px;
    font-weight: 700;
    color: var(--nav-text-hover);
    display: block;
    line-height: 1.2;
}

.metric-label {
    font-size: 12px;
    color: var(--nav-text);
}

.metric-change {
    font-size: 11px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.metric-change.up { color: var(--success); }
.metric-change.down { color: var(--warning); }

/* ── Premium Grid ── */
.premium-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 20px;
    margin-bottom: 28px;
}

.grid-left, .grid-right {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ── Premium Card ── */
.premium-card {
    background: var(--nav-bg);
    border-radius: 16px;
    border: 1px solid var(--nav-border);
    overflow: hidden;
    transition: all 0.3s ease;
}

.premium-card:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,0.04);
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--nav-border);
}

.card-title-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--nav-active-bg);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.card-title-group h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--nav-text-hover);
    margin: 0;
}

.card-link {
    font-size: 13px;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
}

.card-link:hover { gap: 8px; }

.chip {
    padding: 4px 14px;
    border-radius: 20px;
    border: none;
    background: transparent;
    color: var(--nav-text);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.chip:hover { background: var(--nav-active-bg); }
.chip.active {
    background: var(--primary);
    color: white;
}

.card-body { padding: 16px 20px; }

/* ── App Timeline ── */
.app-timeline {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.app-timeline-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 10px 14px;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.app-timeline-item:hover {
    background: var(--nav-active-bg);
    border-color: var(--nav-border);
}

.app-timeline-dot {
    width: 8px;
    height: 8px;
    min-width: 8px;
    border-radius: 50%;
    margin-top: 6px;
}

.app-timeline-dot.initiated { background: #94a3b8; }
.app-timeline-dot.in_progress { background: #f59e0b; }
.app-timeline-dot.pending { background: #f59e0b; }
.app-timeline-dot.completed { background: #10b981; }
.app-timeline-dot.approved { background: #10b981; }
.app-timeline-dot.rejected { background: #ef4444; }
.app-timeline-dot.cancelled { background: #ef4444; }

.app-timeline-content { flex: 1; }

.app-timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.app-timeline-code {
    font-weight: 600;
    color: var(--nav-text-hover);
    font-size: 13px;
}

.app-timeline-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 12px;
    color: var(--nav-text);
    margin-top: 2px;
}

.app-timeline-meta i { margin-right: 2px; }

/* ── Live Badge ── */
.live-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    color: var(--success);
    background: rgba(16,185,129,0.1);
    padding: 3px 12px;
    border-radius: 20px;
}

.live-dot {
    width: 6px;
    height: 6px;
    background: var(--success);
    border-radius: 50%;
    animation: pulseDot 1.5s infinite;
}

/* ── Activity Feed ── */
.activity-feed {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.feed-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--nav-border);
}

.feed-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.feed-avatar {
    width: 34px;
    height: 34px;
    min-width: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 13px;
}

.feed-content { flex: 1; }

.feed-text {
    font-size: 13px;
    color: var(--nav-text-hover);
    margin: 0;
}

.feed-meta {
    display: flex;
    gap: 12px;
    font-size: 11px;
    color: var(--nav-text);
    margin-top: 2px;
}

.feed-meta i { margin-right: 2px; }

/* ── Task List Premium ── */
.task-list-premium {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.task-premium-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid var(--nav-border);
    transition: all 0.2s;
}

.task-premium-item:hover {
    background: var(--nav-active-bg);
}

.task-premium-left {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex: 1;
}

.task-premium-dot {
    width: 8px;
    height: 8px;
    min-width: 8px;
    border-radius: 50%;
    margin-top: 4px;
}

.task-premium-dot.high { background: #ef4444; }
.task-premium-dot.medium { background: #f59e0b; }
.task-premium-dot.low { background: #10b981; }
.task-premium-dot.urgent { background: #ef4444; animation: pulseDot 1s infinite; }

.task-premium-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--nav-text-hover);
}

.task-premium-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 11px;
    color: var(--nav-text);
    margin-top: 2px;
}

.task-premium-meta i { margin-right: 2px; }

.task-premium-due.overdue { color: #ef4444; }

.task-premium-right { flex-shrink: 0; }

.task-badge {
    background: var(--primary);
    color: white;
    font-size: 12px;
    font-weight: 600;
    padding: 0 12px;
    border-radius: 20px;
    height: 24px;
    display: flex;
    align-items: center;
}

/* ── Service Distribution ── */
.service-distribution {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.service-dist-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.service-dist-info {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
}

.service-dist-name { color: var(--nav-text-hover); }
.service-dist-count { 
    color: var(--nav-text);
    font-size: 12px;
    font-weight: 500;
}

.service-dist-bar {
    width: 100%;
    height: 4px;
    background: var(--nav-border);
    border-radius: 4px;
    overflow: hidden;
}

.service-dist-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #818cf8);
    border-radius: 4px;
    transition: width 0.8s ease;
}

/* ── Quick Actions Premium ── */
.quick-actions-premium {
    margin-top: 8px;
}

.qa-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.qa-premium {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border-radius: 12px;
    border: 1px solid var(--nav-border);
    text-decoration: none;
    transition: all 0.3s;
    background: var(--nav-bg);
    position: relative;
}

.qa-premium:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.06);
    border-color: var(--primary);
}

.qa-premium-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
}

.qa-premium-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--nav-text-hover);
}

.qa-premium-desc {
    font-size: 12px;
    color: var(--nav-text);
}

.qa-premium-arrow {
    margin-left: auto;
    color: var(--nav-text);
    transition: all 0.3s;
}

.qa-premium:hover .qa-premium-arrow {
    transform: translateX(6px);
    color: var(--primary);
}

/* ── Empty State Modern ── */
.empty-state-modern {
    text-align: center;
    padding: 30px 20px;
}

.empty-state-modern .empty-icon {
    font-size: 40px;
    color: var(--nav-border);
    display: block;
    margin-bottom: 12px;
}

.empty-state-modern p {
    color: var(--nav-text);
    font-size: 14px;
    margin-bottom: 12px;
}

.empty-state-modern.small { padding: 20px; }
.empty-state-modern.small .empty-icon { font-size: 28px; }

/* ── Quick Create Modal ── */
.quick-create-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(12px);
    z-index: 999999;
    align-items: center;
    justify-content: center;
}

.quick-create-overlay.active { display: flex; }

.quick-create-modal {
    background: var(--nav-bg);
    border-radius: 20px;
    max-width: 480px;
    width: 90%;
    box-shadow: 0 40px 80px rgba(0,0,0,0.3);
    animation: modalSlide 0.3s ease;
    border: 1px solid var(--nav-border);
}

@keyframes modalSlide {
    from { opacity: 0; transform: scale(0.9) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.quick-create-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid var(--nav-border);
}

.quick-create-header h3 {
    font-size: 18px;
    color: var(--nav-text-hover);
}

.quick-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #9ca3af;
    cursor: pointer;
    padding: 0 4px;
}

.quick-close:hover {
    color: var(--nav-text-hover);
    transform: rotate(90deg);
}

.quick-create-body {
    padding: 16px 24px 24px;
}

.quick-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--nav-text-hover);
    transition: all 0.2s;
    border: 1px solid transparent;
}

.quick-item:hover {
    background: var(--nav-active-bg);
    border-color: var(--primary);
}

.quick-item i {
    font-size: 20px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--nav-border);
    border-radius: 10px;
}

.quick-title { font-weight: 600; font-size: 15px; }
.quick-desc { font-size: 12px; color: #9ca3af; }

/* ── Responsive ── */
@media (max-width: 1024px) {
    .premium-grid { grid-template-columns: 1fr; }
    .hero-section { flex-direction: column; align-items: flex-start; gap: 16px; }
    .hero-right { width: 100%; justify-content: space-between; }
    .hero-stats-mini { gap: 12px; }
    .hero-stat-divider { display: none; }
}

@media (max-width: 768px) {
    .metric-grid { grid-template-columns: repeat(2, 1fr); }
    .hero-stats-mini { flex-wrap: wrap; gap: 8px; }
    .hero-stat { flex: 1; min-width: 60px; }
    .hero-actions { width: 100%; }
    .hero-btn { flex: 1; justify-content: center; }
    .qa-grid { grid-template-columns: 1fr 1fr; }
    .app-timeline-header { flex-direction: column; align-items: flex-start; gap: 4px; }
    .card-top { flex-wrap: wrap; gap: 8px; }
}

@media (max-width: 480px) {
    .metric-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .metric-card { padding: 14px; }
    .metric-value { font-size: 20px; }
    .qa-grid { grid-template-columns: 1fr; }
}
/* ============================================================ */
/* DASHBOARD ULTIMATE CSS - FIX MISSING STYLES                 */
/* ============================================================ */

.dashboard-ultimate {
    padding: 20px 0;
    max-width: 1400px;
    margin: 0 auto;
}

/* ── Welcome Banner ── */
.welcome-banner {
    background: var(--nav-bg);
    border-radius: 16px;
    padding: 24px 28px;
    margin-bottom: 28px;
    border: 1px solid var(--nav-border);
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.welcome-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.welcome-greeting {
    display: flex;
    align-items: center;
    gap: 14px;
}

.greeting-icon {
    font-size: 36px;
}

.welcome-greeting h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--nav-text-hover);
    margin: 0;
}

.welcome-greeting h1 .highlight {
    color: var(--primary);
}

.welcome-greeting p {
    color: var(--nav-text);
    font-size: 14px;
    margin: 2px 0 0;
}

.role-tag {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 2px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.welcome-actions {
    display: flex;
    gap: 10px;
}

.btn-welcome {
    padding: 8px 18px;
    border-radius: 10px;
    border: 1px solid var(--nav-border);
    background: var(--nav-bg);
    color: var(--nav-text);
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-welcome:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-welcome.primary {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.btn-welcome.primary:hover {
    background: var(--primary-dark);
}

.welcome-stats-mini {
    display: flex;
    gap: 32px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--nav-border);
}

.mini-stat {
    text-align: center;
}

.mini-stat .mini-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--nav-text-hover);
    display: block;
}

.mini-stat .mini-label {
    font-size: 12px;
    color: var(--nav-text);
}

/* ── Widgets Grid ── */
.widgets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.widget-card {
    background: var(--nav-bg);
    border-radius: 14px;
    border: 1px solid var(--nav-border);
    transition: all 0.3s ease;
    overflow: hidden;
}

.widget-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.06);
    border-color: var(--primary);
}

.widget-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--nav-border);
}

.widget-icon {
    width: 34px;
    height: 34px;
    min-width: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 15px;
}

.widget-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--nav-text-hover);
    flex: 1;
}

.widget-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.widget-actions button {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: var(--nav-text);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.widget-actions button:hover {
    background: var(--nav-active-bg);
    color: var(--primary);
}

.widget-body {
    padding: 14px 16px;
}

.widget-value {
    font-size: 30px;
    font-weight: 700;
    color: var(--nav-text-hover);
    line-height: 1.2;
}

.widget-label {
    font-size: 13px;
    color: var(--nav-text);
    margin-top: 2px;
}

.widget-trend {
    font-size: 12px;
    font-weight: 500;
    margin-top: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.widget-trend.positive { color: var(--success); }
.widget-trend.warning { color: var(--warning); }
.widget-trend.negative { color: var(--danger); }

.widget-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    border-top: 1px solid var(--nav-border);
    background: var(--nav-active-bg);
}

.widget-update {
    font-size: 11px;
    color: var(--nav-text);
}

.widget-link {
    font-size: 12px;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
    transition: all 0.2s;
}

.widget-link:hover {
    gap: 8px;
}

/* ── Dashboard Main Grid ── */
.dashboard-main-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 20px;
    margin-bottom: 28px;
}

.dashboard-col-left,
.dashboard-col-right {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ── Recent Apps List ── */
.recent-apps-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.recent-app-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.recent-app-item:hover {
    background: var(--nav-active-bg);
    border-color: var(--nav-border);
}

.recent-app-item .app-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.recent-app-item .app-code {
    font-weight: 600;
    color: var(--nav-text-hover);
    font-size: 13px;
}

.recent-app-item .app-client {
    color: var(--nav-text);
    font-size: 13px;
}

.recent-app-item .app-service {
    font-size: 12px;
    color: var(--nav-text);
    background: var(--nav-border);
    padding: 1px 10px;
    border-radius: 12px;
}

.recent-app-item .app-status {
    display: flex;
    align-items: center;
    gap: 12px;
}

.recent-app-item .app-date {
    font-size: 12px;
    color: var(--nav-text);
}

/* ── Activity Timeline ── */
.activity-timeline {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--nav-border);
}

.activity-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.activity-icon {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 50%;
    background: var(--nav-active-bg);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

.activity-content {
    flex: 1;
    min-width: 0;
}

.activity-text {
    font-size: 13px;
    color: var(--nav-text-hover);
    margin: 0;
}

.activity-meta {
    display: flex;
    gap: 12px;
    font-size: 11px;
    color: var(--nav-text);
    margin-top: 2px;
}

.activity-meta i {
    margin-right: 2px;
}

/* ── Task List ── */
.task-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.task-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--nav-border);
    transition: all 0.2s;
}

.task-item:hover {
    background: var(--nav-active-bg);
}

.task-status-dot {
    width: 8px;
    height: 8px;
    min-width: 8px;
    border-radius: 50%;
}

.task-status-dot.high { background: var(--danger); }
.task-status-dot.medium { background: var(--warning); }
.task-status-dot.low { background: var(--success); }
.task-status-dot.urgent { background: var(--danger); animation: pulseDot 1s infinite; }

.task-info {
    flex: 1;
    min-width: 0;
}

.task-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--nav-text-hover);
    margin: 0;
}

.task-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 11px;
    color: var(--nav-text);
    margin-top: 2px;
}

.task-meta i {
    margin-right: 2px;
}

.task-due.overdue {
    color: var(--danger);
}

.task-priority {
    flex-shrink: 0;
}

.task-count-badge {
    background: var(--primary);
    color: white;
    font-size: 12px;
    font-weight: 600;
    padding: 0 10px;
    border-radius: 12px;
    height: 22px;
    display: flex;
    align-items: center;
}

/* ── Service List ── */
.service-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.service-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.service-info {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
}

.service-name {
    color: var(--nav-text-hover);
}

.service-count {
    color: var(--nav-text);
    font-size: 12px;
}

.service-bar {
    width: 100%;
    height: 4px;
    background: var(--nav-border);
    border-radius: 4px;
    overflow: hidden;
}

.service-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #818cf8);
    border-radius: 4px;
    transition: width 0.8s ease;
}

/* ── Quick Actions ── */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.qa-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border-radius: 12px;
    border: 1px solid var(--nav-border);
    text-decoration: none;
    transition: all 0.3s;
    background: var(--nav-bg);
}

.qa-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.06);
    border-color: var(--primary);
}

.qa-item .qa-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
}

.qa-item h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--nav-text-hover);
    margin: 0;
}

.qa-item p {
    font-size: 12px;
    color: var(--nav-text);
    margin: 0;
}

/* ── Empty State ── */
.empty-state {
    text-align: center;
    padding: 30px 20px;
}

.empty-state i {
    font-size: 40px;
    color: var(--nav-border);
    display: block;
    margin-bottom: 12px;
}

.empty-state p {
    color: var(--nav-text);
    font-size: 14px;
}

.empty-state.small {
    padding: 20px;
}

.empty-state.small i {
    font-size: 28px;
}

/* ── Quick Create Modal ── */
.quick-create-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(8px);
    z-index: 999999;
    align-items: center;
    justify-content: center;
}

.quick-create-overlay.active {
    display: flex;
}

.quick-create-modal {
    background: var(--nav-bg);
    border-radius: 16px;
    max-width: 480px;
    width: 90%;
    box-shadow: 0 40px 80px rgba(0,0,0,0.3);
    animation: modalSlide 0.3s ease;
}

@keyframes modalSlide {
    from { opacity: 0; transform: scale(0.9) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.quick-create-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid var(--nav-border);
}

.quick-create-header h3 {
    font-size: 18px;
    color: var(--nav-text-hover);
}

.quick-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #9ca3af;
    cursor: pointer;
    padding: 0 4px;
}

.quick-close:hover {
    color: var(--nav-text-hover);
    transform: rotate(90deg);
}

.quick-create-body {
    padding: 16px 24px 24px;
}

.quick-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--nav-text-hover);
    transition: all 0.2s;
    border: 1px solid transparent;
}

.quick-item:hover {
    background: var(--nav-active-bg);
    border-color: var(--primary);
}

.quick-item i {
    font-size: 20px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--nav-border);
    border-radius: 10px;
}

.quick-title {
    font-weight: 600;
    font-size: 15px;
}

.quick-desc {
    font-size: 12px;
    color: #9ca3af;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
    .dashboard-main-grid {
        grid-template-columns: 1fr;
    }
    .welcome-content {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 768px) {
    .widgets-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    .recent-app-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    .recent-app-item .app-status {
        width: 100%;
        justify-content: space-between;
    }
    .quick-actions-grid {
        grid-template-columns: 1fr 1fr;
    }
    .welcome-stats-mini {
        gap: 16px;
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .quick-actions-grid {
        grid-template-columns: 1fr;
    }
}