﻿/* =========================================
   DASHBOARD – TỔNG QUAN
========================================= */

.page-dashboard {
    background: #18191a;
    color: var(--text-main);
}

/* Mượt khi đổi theme */
body,
.dash-sidebar,
.dash-main,
.stat-card,
.quick-widget,
.chart-card,
.request-preview-card {
    transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

/* Light theme override (simple) */
body.theme-light {
    --bg-main: #f3f4f6;
    --bg-elevated: #ffffff;
    --bg-input: #e5e7eb;
    --text-main: #0f172a;
    --text-soft: #6b7280;
}

/* -----------------------------------------
   HEADER – bản có user account
----------------------------------------- */

.nav-left-account {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dashboard-sidebar-toggle {
    border: none;
    background: rgba(15, 23, 42, 0.9);
    border-radius: 999px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e5e7eb;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s ease, transform 0.15s ease;
}

.dashboard-sidebar-toggle:hover {
    background: rgba(37, 99, 235, 0.6);
    transform: translateY(-1px);
}

.header-user {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    object-fit: cover;
}

.header-user-info {
    display: flex;
    flex-direction: column;
}

.header-user-name {
    font-size: 0.9rem;
    font-weight: 500;
}

.header-user-role {
    font-size: 0.75rem;
    color: var(--text-soft);
}

/* -----------------------------------------
   SHELL & SIDEBAR
----------------------------------------- */

.dashboard-shell {
    display: flex;
    min-height: calc(100vh - 72px);
}

/* Sidebar */
.dash-sidebar {
    width: 260px;
    background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.3), rgba(15, 23, 42, 0.98));
    border-right: 1px solid rgba(30, 64, 175, 0.6);
    padding: 14px 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: sticky;
    top: 64px;
    align-self: flex-start;
    z-index: 20;
    box-shadow: 12px 0 40px rgba(0, 0, 0, 0.7);
}

.dashboard-shell.sidebar-collapsed .dash-sidebar {
    width: 78px;
    padding-inline: 8px;
}

/* Sidebar top */

.sidebar-top {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-user-mini {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-avatar {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    object-fit: cover;
    border: 2px solid rgba(59, 130, 246, 0.7);
}

.sidebar-user-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.sidebar-user-name {
    font-size: 0.9rem;
    font-weight: 500;
}

.sidebar-user-role {
    font-size: 0.78rem;
    color: var(--text-soft);
}

/* Collapse: ẩn text trong sidebar */
.dashboard-shell.sidebar-collapsed .sidebar-user-info,
.dashboard-shell.sidebar-collapsed .sidebar-label,
.dashboard-shell.sidebar-collapsed .sidebar-theme-toggle .theme-label,
.dashboard-shell.sidebar-collapsed .sidebar-voice-row .voice-label {
    display: none;
}

/* Theme toggle */

.sidebar-theme-toggle {
    margin-top: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
}

.theme-label {
    color: var(--text-soft);
}

.theme-switch {
    position: relative;
    width: 64px;
    height: 26px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.7);
    background: rgba(15, 23, 42, 0.98);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 6px;
    cursor: pointer;
    overflow: hidden;
}

.theme-knob {
    position: absolute;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent), var(--accent-alt));
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.7);
    left: 4px;
    transition: transform 0.22s ease;
}

.theme-icon {
    font-size: 0.9rem;
    z-index: 1;
}

body.theme-light .theme-knob {
    transform: translateX(32px);
}

/* Sidebar nav */

.sidebar-nav {
    flex: 1;
    margin-top: 6px;
}

.sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-item {
    position: relative;
}

.sidebar-item-danger .sidebar-link {
    color: #f97373;
}

.sidebar-link {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 10px;
    padding: 7px 9px;
    border: none;
    background: transparent;
    color: #e5e7eb;
    font-size: 0.88rem;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    text-align: left;
}

.sidebar-link:hover::before {
    transform: translateX(0);
}

.sidebar-link::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.14), rgba(37, 99, 235, 0.28));
    transform: translateX(-100%);
    transition: transform 0.18s ease-out;
}

.sidebar-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.9);
}

.sidebar-icon,
.sidebar-label {
    position: relative;
    z-index: 1;
}

.sidebar-icon {
    width: 24px;
    text-align: center;
    transition: transform 0.18s ease;
}

.sidebar-link:hover .sidebar-icon {
    transform: translateY(-1px) scale(1.1);
}

.sidebar-label {
    white-space: nowrap;
}

.dashboard-shell.sidebar-collapsed .sidebar-label {
    opacity: 0;
}

/* Active item */

.sidebar-item.active .sidebar-link {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.88), rgba(124, 58, 237, 0.88));
    box-shadow: 0 14px 40px rgba(37, 99, 235, 0.7);
}

.sidebar-item.active .sidebar-link::before {
    display: none;
}

/* Sidebar bottom */

.sidebar-bottom {
    border-top: 1px solid rgba(30, 64, 175, 0.6);
    padding-top: 8px;
    font-size: 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sidebar-status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status-pill {
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 0.75rem;
}

.status-online {
    background: rgba(22, 163, 74, 0.3);
    color: #bbf7d0;
}

.status-sync-btn {
    border-radius: 999px;
    padding: 2px 6px;
    border: 1px solid rgba(148, 163, 184, 0.7);
    background: transparent;
    color: #e5e7eb;
    font-size: 0.72rem;
    cursor: pointer;
}

.sidebar-voice-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.voice-indicator {
    width: 26px;
    height: 26px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.7);
    background: rgba(15, 23, 42, 0.98);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
}

.voice-label {
    font-size: 0.78rem;
    color: var(--text-soft);
}

/* -----------------------------------------
   MAIN
----------------------------------------- */

.dash-main {
    flex: 1;
    padding: 18px 20px 40px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* Page load (stagger sections) */

.dashboard-section {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s forwards;
}

.section-1 {
    animation-delay: 0.1s;
}

.section-2 {
    animation-delay: 0.2s;
}

.section-3 {
    animation-delay: 0.3s;
}

.section-4 {
    animation-delay: 0.4s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* -----------------------------------------
   DASH HEADER
----------------------------------------- */

.dash-header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}

.dash-header-left {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dash-greeting-small {
    font-size: 0.85rem;
    color: var(--text-soft);
}

.dash-greeting-main {
    font-size: 1.35rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.dash-greeting-cursor {
    display: inline-block;
    width: 10px;
    animation: blink 0.9s steps(1) infinite;
}

@keyframes blink {

    0%,
    50% {
        opacity: 1;
    }

    51%,
    100% {
        opacity: 0;
    }
}

.dash-quick-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dash-date-time {
    font-size: 0.85rem;
    color: var(--text-soft);
    display: flex;
    align-items: center;
    gap: 6px;
}

.dash-quick-stats {
    display: flex;
    align-items: center;
    gap: 6px;
}

.icon-pill {
    border-radius: 999px;
    border: 1px solid rgba(55, 65, 81, 0.9);
    background: rgba(15, 23, 42, 0.96);
    padding: 3px 8px;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    position: relative;
}

.icon-pill.small {
    font-size: 0.8rem;
    padding-inline: 6px;
}

.pill-badge {
    border-radius: 999px;
    padding: 0 5px;
    font-size: 0.7rem;
    background: #f97316;
    color: white;
}

.dash-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dash-search-wrapper {
    position: relative;
    min-width: 220px;
    flex: 1;
}

.dash-search-input {
    width: 100%;
    padding: 7px 10px;
    border-radius: 999px;
    border: 1px solid rgba(55, 65, 81, 0.9);
    background: var(--bg-input);
    font-size: 0.9rem;
    transition: box-shadow 0.18s ease, border-color 0.18s ease, transform 0.15s ease;
}

.dash-search-input:focus {
    outline: none;
    border-color: rgba(59, 130, 246, 0.8);
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.5);
    transform: translateY(-1px);
}

.dash-refresh-btn {
    font-size: 0.85rem;
}

/* -----------------------------------------
   STAT CARDS GRID
----------------------------------------- */

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 14px;
}

@keyframes cardPop {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.stat-card {
    background: var(--bg-elevated);
    border-radius: var(--radius-xl);
    padding: 12px 12px 10px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(30, 64, 175, 0.45);
    animation: cardPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.85);
    border-color: rgba(129, 140, 248, 0.85);
}

.stat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-soft);
}

.stat-title {
    font-size: 0.95rem;
    font-weight: 600;
}

.stat-icon-pulse {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: iconPulse 1.6s ease-in-out infinite;
}

@keyframes iconPulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: none;
    }

    50% {
        transform: scale(1.1);
        box-shadow: 0 0 25px rgba(37, 99, 235, 0.7);
    }
}

.stat-card-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-main-number {
    font-size: 1.4rem;
    font-weight: 700;
}

/* Flip number (tools sold) */

.flip-number {
    display: inline-block;
    transform-origin: bottom;
    transition: transform 0.18s ease;
}

.flip-number.flipping {
    transform: rotateX(40deg);
}

.stat-sub-row {
    font-size: 0.78rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
}

.stat-change {
    font-weight: 500;
}

.stat-change.up {
    color: #4ade80;
}

.stat-change.down {
    color: #f97373;
}

.stat-mini-label {
    color: var(--text-soft);
    font-size: 0.78rem;
}

.stat-mini-highlight {
    font-size: 0.8rem;
    color: #fbbf24;
}

/* Sparkline (fake nhỏ nhỏ cho đẹp) */
.stat-sparkline {
    margin-top: 4px;
    height: 24px;
    position: relative;
    overflow: hidden;
}

.sparkline-line {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.1), rgba(37, 99, 235, 0.5));
    opacity: 0.85;
}

/* Circle progress */

.stat-circle-wrap {
    margin-top: 4px;
    position: relative;
    width: 54px;
    height: 54px;
}

.stat-circle-svg {
    width: 54px;
    height: 54px;
    transform: rotate(-90deg);
}

.circle-bg {
    fill: none;
    stroke: rgba(31, 41, 55, 0.95);
    stroke-width: 3;
}

.circle-progress {
    fill: none;
    stroke: #38bdf8;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 0 100;
    transition: stroke-dasharray 0.4s ease;
}

.stat-circle-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
}

/* Job card */

.jobs-meta-row {
    display: flex;
    gap: 6px;
    font-size: 0.78rem;
    margin-bottom: 2px;
}

.jobs-pill {
    border-radius: 999px;
    padding: 2px 8px;
    background: rgba(17, 24, 39, 0.95);
    color: var(--text-soft);
}

.jobs-pill-high {
    background: rgba(248, 113, 113, 0.3);
    color: #fecaca;
}

.job-deadline-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    margin-bottom: 3px;
}

.job-progress-track {
    height: 4px;
    border-radius: 999px;
    background: rgba(31, 41, 55, 0.95);
    overflow: hidden;
}

.job-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #22c55e, #4ade80);
    transition: width 0.3s ease-out;
}

.job-progress-item {
    margin-top: 4px;
}

.job-progress-label {
    font-size: 0.78rem;
    color: var(--text-soft);
}

/* Requests card */

.stat-actions-row {
    display: flex;
    gap: 6px;
    margin-top: 4px;
}

.btn-mini {
    padding: 5px 10px;
    font-size: 0.8rem;
}

/* -----------------------------------------
   ACTIVITY & QUICK
----------------------------------------- */

.dash-activity-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.95fr);
    gap: 14px;
}

.section-header-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: flex-end;
    margin-bottom: 8px;
}

.section-header-row h2 {
    font-size: 1rem;
}

.section-header-row p {
    font-size: 0.85rem;
    color: var(--text-soft);
}

/* Activity */

.dash-activity {
    background: var(--bg-elevated);
    border-radius: var(--radius-xl);
    padding: 12px 12px 10px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(30, 64, 175, 0.45);
}

.activity-filter {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.filter-pill {
    border-radius: 999px;
    border: 1px solid rgba(55, 65, 81, 0.9);
    background: rgba(15, 23, 42, 0.96);
    color: var(--text-soft);
    padding: 2px 8px;
    font-size: 0.78rem;
    cursor: pointer;
}

.filter-pill.active {
    background: rgba(37, 99, 235, 0.7);
    border-color: rgba(37, 99, 235, 0.9);
    color: #e5e7eb;
}

.activity-list {
    list-style: none;
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 260px;
    overflow: auto;
}

.activity-item {
    display: flex;
    gap: 8px;
    font-size: 0.8rem;
    padding: 6px 7px;
    border-radius: var(--radius-md);
    background: rgba(15, 23, 42, 0.96);
    border: 1px solid rgba(31, 41, 55, 0.95);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.activity-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.9);
    border-color: rgba(37, 99, 235, 0.8);
}

.activity-icon-pill {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.96);
    display: flex;
    align-items: center;
    justify-content: center;
}

.activity-content {
    flex: 1;
}

.activity-title {
    font-size: 0.8rem;
}

.activity-meta {
    font-size: 0.75rem;
    color: var(--text-soft);
}

/* Activity new item animation */

@keyframes slideInActivity {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.activity-item.new {
    animation: slideInActivity 0.3s ease-out;
}

/* Quick column */

.dash-quick {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Quick widgets */

.quick-widget {
    background: var(--bg-elevated);
    border-radius: var(--radius-xl);
    padding: 10px 10px 8px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(30, 64, 175, 0.45);
}

.quick-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

.quick-header h3 {
    font-size: 0.9rem;
}

.link-button {
    border: none;
    background: none;
    color: #38bdf8;
    font-size: 0.78rem;
    text-decoration: underline;
    cursor: pointer;
}

/* Recent tools carousel */

.quick-tools-carousel {
    display: flex;
    gap: 6px;
    overflow-x: auto;
}

.quick-tool-card {
    min-width: 150px;
    padding: 6px 7px;
    border-radius: var(--radius-md);
    background: rgba(15, 23, 42, 0.96);
    border: 1px solid rgba(31, 41, 55, 0.95);
    font-size: 0.78rem;
}

.quick-tool-card h4 {
    font-size: 0.82rem;
    margin-bottom: 2px;
}

.quick-tool-card p {
    color: var(--text-soft);
    margin-bottom: 3px;
}

.quick-tag {
    border-radius: 999px;
    padding: 1px 6px;
    font-size: 0.7rem;
    background: rgba(148, 163, 184, 0.2);
}

.quick-tag.success {
    background: rgba(22, 163, 74, 0.3);
    color: #bbf7d0;
}

/* Tasks */

.task-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.8rem;
}

.task-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 4px;
    border-radius: var(--radius-md);
    background: rgba(15, 23, 42, 0.96);
}

.task-label {
    flex: 1;
}

.task-label.done {
    text-decoration: line-through;
    color: var(--text-soft);
}

/* Fancy checkbox */

.task-checkbox {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 1px solid rgba(148, 163, 184, 0.9);
    background: transparent;
    position: relative;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.task-checkbox:checked {
    background: linear-gradient(135deg, #22c55e, #4ade80);
    border-color: transparent;
}

.task-checkbox:checked::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 1px;
    width: 7px;
    height: 11px;
    border: 2px solid white;
    border-top: none;
    border-left: none;
    transform: rotate(40deg);
}

/* Notifications */

.notifications-header {
    align-items: center;
}

.notifications-panel {
    margin-top: 4px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 150px;
    overflow: hidden;
    transition: max-height 0.22s ease;
}

.notifications-panel.closed {
    max-height: 0;
}

.notif-item {
    display: flex;
    gap: 6px;
    font-size: 0.78rem;
}

.notif-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #22c55e;
    margin-top: 4px;
}

.notif-dot.muted {
    background: #6b7280;
}

.notif-text small {
    color: var(--text-soft);
}

/* Quick actions */

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
}

.quick-action-btn {
    border-radius: var(--radius-md);
    border: 1px solid rgba(55, 65, 81, 0.9);
    background: rgba(15, 23, 42, 0.96);
    font-size: 0.8rem;
    padding: 6px 6px;
    cursor: pointer;
    text-align: left;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.quick-action-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(56, 189, 248, 0.9);
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.9);
}

/* -----------------------------------------
   CHARTS & RECOMMENDATIONS
----------------------------------------- */

.dash-charts-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
    gap: 14px;
}

.dash-charts-main {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.1fr);
    grid-template-rows: auto auto;
    gap: 10px;
}

.chart-card {
    background: var(--bg-elevated);
    border-radius: var(--radius-xl);
    padding: 10px 12px 8px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(30, 64, 175, 0.45);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.chart-header h2 {
    font-size: 0.95rem;
}

.chart-header p {
    font-size: 0.8rem;
    color: var(--text-soft);
}

.chart-body {
    position: relative;
    min-height: 160px;
}

.chart-body-split {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 8px;
}

.chart-legend {
    font-size: 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.chart-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.chart-legend-color {
    width: 10px;
    height: 10px;
    border-radius: 999px;
}

.job-completion-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.job-completion-item {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 2fr) auto;
    gap: 6px;
    align-items: center;
    font-size: 0.8rem;
}

.job-completion-track {
    height: 4px;
    border-radius: 999px;
    background: rgba(31, 41, 55, 0.95);
    overflow: hidden;
}

.job-completion-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #22c55e, #4ade80);
    animation: fillBar 1.1s ease-out forwards;
}

.job-completion-fill.late {
    background: linear-gradient(90deg, #f97316, #f97373);
}

.job-completion-fill.pending {
    background: linear-gradient(90deg, #38bdf8, #a855f7);
}

@keyframes fillBar {
    from {
        width: 0%;
    }

    to {
        width: var(--target-width, 70%);
    }
}

/* Recommendations */

.dash-recommendations {
    background: var(--bg-elevated);
    border-radius: var(--radius-xl);
    padding: 10px 10px 8px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(30, 64, 175, 0.45);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.recommendation-group h3 {
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.recommend-card {
    border-radius: var(--radius-md);
    background: rgba(15, 23, 42, 0.96);
    border: 1px solid rgba(31, 41, 55, 0.95);
    padding: 6px 7px;
    font-size: 0.8rem;
    margin-bottom: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
}

.recommend-card.small {
    align-items: flex-start;
}

.recommend-main h4 {
    font-size: 0.86rem;
    margin-bottom: 2px;
}

.recommend-main p {
    color: var(--text-soft);
}

.recommend-tag {
    font-size: 0.78rem;
    border-radius: 999px;
    padding: 2px 7px;
    background: rgba(56, 189, 248, 0.2);
    color: #e0f2fe;
}

.tips-list {
    font-size: 0.8rem;
    color: var(--text-soft);
    list-style: disc;
    padding-left: 18px;
}

/* -----------------------------------------
   RESPONSIVE
----------------------------------------- */

@media (max-width: 1024px) {
    .dash-activity-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .dash-charts-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .dash-charts-main {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 768px) {
    .dashboard-shell {
        position: relative;
    }

    .dash-sidebar {
        position: fixed;
        top: 64px;
        left: 0;
        height: calc(100vh - 64px);
        transform: translateX(-100%);
        transition: transform 0.2s ease-out;
    }

    .dashboard-shell.sidebar-open .dash-sidebar {
        transform: translateX(0);
    }

    .dash-main {
        padding-inline: 14px;
    }

    .dash-header {
        gap: 10px;
    }

    .dash-activity-layout {
        gap: 10px;
    }
}

@media (max-width: 640px) {
    .dash-main {
        padding-inline: 10px;
        gap: 14px;
    }

    .dash-header {
        flex-direction: column;
        align-items: stretch;
    }

    .dash-header-right {
        width: 100%;
        flex-wrap: wrap;
    }

    .dash-search-wrapper {
        min-width: 0;
        flex: 1;
    }

    .dash-greeting-main {
        font-size: 1.15rem;
    }

    .stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .dash-charts-layout,
    .dash-charts-main {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 400px) {
    .stat-grid {
        grid-template-columns: 1fr;
    }
}