@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

/* Scroll Behavior */
html {
    scroll-behavior: smooth;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

/* Scroll to Top Button - IMPORTANT STYLES */
#scrollTopBtn {
    position: fixed;
    bottom: -60px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    font-weight: bold;
    display: flex !important;
    align-items: center;
    justify-content: center;
    z-index: 9999 !important;
    transition: bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.4);
    border: none;
    padding: 0;
    margin: 0;
    outline: none;
}

#scrollTopBtn.show {
    bottom: 30px;
}

#scrollTopBtn:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a3d8a 100%);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
    transform: translateY(-3px);
}

#scrollTopBtn:active {
    transform: translateY(-1px);
}


div.dataTables_wrapper div.dataTables_filter input {
    margin-left: 0.5em;
    display: inline-block;
    width: auto;
    border-radius: 50px;
}

div.table-responsive>div.dataTables_wrapper>div.row {
    margin: 10px 0 !important;
}

:root {
    --primary: #667eea;
    --primary-dark: #4f46e5;
    --secondary: #8b5cf6;
    --success: #10b981;
    --success-dark: #059669;
    --warning: #d67200;
    --danger: #ef4444;
    --dark: #1f2937;
    --light: #f9fafb;
    --border: #e5e7eb;
    --text: #374151;
    --text-light: #6b7280;
}

.phuong-phap-do {
    white-space: pre-line;
    vertical-align: top !important;
    padding-bottom: 10px !important;
}

.phuong-phap-do-duyet {
    white-space: pre-line;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--dark);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* table */

table {
    padding-top: 10px !important;
}

table th {
    padding-bottom: 12px;
    font-size: 13px;
    text-align: left;
    border-bottom: 1px solid var(--text-light);
}

table td {
    /* padding: 16px 5px !important; */
    vertical-align: middle !important;
}

table tr td .status {
    font-size: 10px;
    padding: 6px 16px;
    color: var(--light);
    border-radius: 20px;
    font-weight: 700;
}

table tr td .status.completed {
    background: var(--success);
}

table tr td .status.process {
    background: var(--primary);
}

table tr td .status.pending {
    background: var(--warning);
}

table tr td .status.danger {
    background: var(--danger);
}

table tr td .status.copy {
    background: #f4b619;

}

table tr td .status.edit {
    background: #a32263;
}

table tr td .status.assign {
    background: var(--secondary);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); */
    background: linear-gradient(135deg, #ffffff 0%, #667eea 100%);

    min-height: 100vh;
    color: var(--text);
}

.container {
    max-width: 99%;
    margin: 0 auto;
    padding-top: 10px;
    /* padding: 20px; */
}

.app-container {
    display: grid;
    grid-template-columns: 260px 1fr;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    margin: 20px auto;
}

/* Sidebar */
.sidebar {
    background: linear-gradient(180deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 30px 0;
}

.sidebar-header {
    padding: 0 20px 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h2 {
    font-size: 20px;
    margin-bottom: 5px;
}

.sidebar-header p {
    font-size: 12px;
    opacity: 0.8;
}

.sidebar-menu {
    padding: 20px 0;
}

.menu-item {
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s;
    border-left: 4px solid transparent;
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.menu-item.active {
    background: rgba(255, 255, 255, 0.2);
    border-left-color: white;
}

.menu-item i {
    font-size: 18px;
    width: 20px;
}

.text-center {
    text-align: center !important;
}

/* Main Content */
.main-content {
    padding: 30px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    background: var(--light);
}

.content-header {
    margin-bottom: 30px;
    margin-top: 0;
}

.content-header h1 {
    font-size: 28px;
    color: var(--dark);
    margin-bottom: 5px;
}

.content-header p {
    color: var(--text-light);
    font-size: 14px;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 15px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
}

.stat-card-red-child {
    background: white;
    padding: 10px;
    border-radius: 10px;
    box-shadow: 0 15px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
    margin-top: 15px;
}

.stat-card-red {
    background: #8b0f07;
    padding: 15px;
    border-radius: 15px;
    box-shadow: 15px 15px 15px 20px rgba(255, 0, 0, 0.05);
    transition: all 0.3s;
    font-weight: bold;
}

.stat-card-green {
    background: #228B22;
    padding: 15px;
    border-radius: 15px;
    box-shadow: 15px 15px 15px 20px rgba(0, 128, 0, 0.05);
    transition: all 0.3s;
    font-weight: bold;
}

.stat-card-yellow {
    background: var(--warning);
    padding: 15px;
    border-radius: 15px;
    box-shadow: 15px 15px 15px 20px rgba(251, 255, 30, 0.05);
    transition: all 0.3s;
    font-weight: bold;
}


.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.stat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stat-icon.primary {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
}

.stat-icon.pink {
    background: #ffeaef;
    color: #e82784;
}

.stat-icon.secondary {
    background: rgba(156, 77, 202, 0.1);
    color: var(--secondary);
}

.stat-icon.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.stat-icon.warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.stat-icon.danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 5px;
}

.stat-label {
    color: var(--text-light);
    font-size: 16px;
    padding-left: 5px;
}

.text-pink {
    color: #e82784 !important;
    font-weight: bold;
}

/* KPI List */
.kpi-grid {
    display: grid;
    gap: 20px;
    margin-bottom: 30px;
}

.kpi-card {
    background: white;
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
}

.kpi-card:hover {
    box-shadow: 0 10px 30px rgba(77, 21, 21, 0.1);
}

.kpi-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 20px;
}

.kpi-title {
    flex: 1;
}

.kpi-title h3 {
    font-size: 18px;
    color: var(--dark);
    margin-bottom: 5px;
}

.kpi-title p {
    font-size: 13px;
    color: var(--text-light);
}

.kpi-weight {
    background: var(--light);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
}

.kpi-number {
    background: #f8b2d4;
    padding: 0px 10px;
    border-radius: 8px;
    color: var(--dark);
}

.kpi-progress {
    margin-bottom: 15px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}

.progress-bar-container {
    height: 8px;
    background: var(--border);
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    border-radius: 10px;
    transition: width 0.5s ease;
}

.progress-bar.success {
    background: linear-gradient(90deg, var(--success), #34d399);
}

.progress-bar.warning {
    background: linear-gradient(90deg, var(--warning), #fbbf24);
}

.progress-bar.danger {
    background: linear-gradient(90deg, var(--danger), #f87171);
}

.kpi-footer {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.3);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: var(--success-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.3);
}

.btn-small {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-edit {
    background: rgb(163, 34, 99);
    color: white;
    flex: 1;
}

.btn-edit:hover {
    background: rgb(133, 30, 73);
    color: white;
}

.btn-update {
    background: var(--primary);
    color: white;
    flex: 1;
}

.btn-update:hover {
    background: var(--primary-dark);
}

.btn-evaluate {
    background: var(--success);
    color: white;
    flex: 1;
}

.btn-evaluate:hover {
    background: #059669;
}

.btn-assign {
    background: var(--secondary);
    color: white;
    flex: 1;
}

.btn-assign:hover {
    background: #7c3aed;
}

.btn-delete {
    background: var(--danger);
    color: white;
    flex: 1;
}

.btn-delete:hover {
    background: #dc2626;
}

/* Chart Container */
.chart-container {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
    margin-top: 30px;
}

.chart-header {
    margin-bottom: 20px;
}

.chart-header h3 {
    font-size: 18px;
    color: var(--dark);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 10px;
    border-radius: 20px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    /* overflow-y: auto; */
    animation: slideUp 0.3s ease;
    /* overflow-y: hidden; */
}

.modal-body {
    padding: 10px 30px;
    overflow-y: auto;
}

.modal-body::-webkit-scrollbar {
    width: 5px;
}

.modal-body::-webkit-scrollbar-track {
    background: var(--light);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    margin-bottom: 20px;
}

.modal-header h2 {
    font-size: 24px;
    color: var(--dark);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text);
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.modal-footer {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn-cancel {
    background: var(--border);
    color: var(--text);
    flex: 1;
}

.btn-cancel:hover {
    background: #d1d5db;
}

.btn-submit {
    flex: 1;
}

/* Table */
.table-container {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: var(--light);
}

th,
td {
    /* padding: 15px; */
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    font-weight: 600;
    color: var(--text);
    font-size: 14px;
}

td {
    font-size: 14px;
}

tbody tr:hover {
    background: var(--light);
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 5x;
    font-size: 12px;
    font-weight: 600;
}

.badge-success {
    background: #1cc88a;
    color: rgb(54, 54, 54) !important;
}

.badge-success-old {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.badge-warning {
    background: #f6c23e;
    color: black !important;
}

.danger {
    color: var(--danger);
}

.success {
    color: var(--success);
}

.badge-danger {
    background: #e74a3b;
    color: white !important;
    ;
}

.badge-danger-old {
    background: rgba(231, 74, 59, 0.1);
    color: var(--danger);
}

.badge-primary {
    background: #4e73df;
    color: white !important;
}

#newKpiPPD {
    position: absolute;
    opacity: 0;
    height: 0;
    pointer-events: none;
}

#newKpiPPDDisplay {
    cursor: pointer;
}

.ppd-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: none;
    margin-top: 5px;
}

.ppd-dropdown.active {
    display: block;
}

.ppd-option {
    padding: 10px 15px;
    cursor: pointer;
    transition: background 0.3s;
}

.ppd-option:hover {
    background: rgba(99, 102, 241, 0.1);
}

.ppd-option.selected {
    background: rgba(83, 85, 255, 0.719);
    color: white;
}

/* .qtux-dropdown {
    background: white;
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: none;
    margin-top: 5px;
}

.qtux-dropdown.active {
    display: block;
}

.qtux-option {
    padding: 10px 15px;
    cursor: pointer;
    transition: background 0.3s;
}

.qtux-option:hover {
    background: rgba(99, 102, 241, 0.1);
}

.qtux-option.selected {
    background: rgba(83, 85, 255, 0.719);
    color: white;
} */

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 5px 10px !important;
    }

    .app-container {
        grid-template-columns: 1fr;
    }

    .mobile-menu-toggle {
        display: flex !important;
    }

    .main-content {
        padding: 80px 15px 15px 15px;
        margin: 0;
    }

    .sidebar {
        position: fixed;
        left: -100%;
        top: 0;
        height: 100vh;
        width: 260px;
        z-index: 999;
        transition: left 0.3s ease;
        overflow-y: auto;
    }

    .sidebar.active {
        left: 0;
    }

    .mobile-menu-close {
        display: flex;
    }

    .mobile-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 998;
    }

    .mobile-overlay.active {
        display: block;
    }

    .sidebar.active~.mobile-overlay {
        display: block;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    /* Responsive Table */
    table {
        width: 100%;
        border-collapse: collapse;
    }

    table thead {
        display: none;
    }

    table tbody tr {
        display: block;
        margin-bottom: 15px;
        border: 1px solid var(--border);
        border-radius: 10px;
        background: white;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    }

    table tbody td {
        display: block;
        padding: 12px !important;
        text-align: right;
        border: none;
        border-bottom: 1px solid var(--border);
        position: relative;
        padding-left: 50% !important;
    }

    table tbody td:last-child {
        border-bottom: none;
    }

    table tbody td:before {
        content: attr(data-label);
        position: absolute;
        left: 12px;
        font-weight: 600;
        text-align: left;
        width: 45%;
        color: var(--text-light);
    }

    table tbody td .status {
        display: inline-block;
    }

    /* Hide columns on very small screens */
    table tbody td:nth-child(n+8) {
        display: none;
    }

    table tbody td:nth-child(1),
    table tbody td:nth-child(2),
    table tbody td:nth-child(3),
    table tbody td:nth-child(4),
    table tbody td:nth-child(5),
    table tbody td:nth-child(6),
    table tbody td:nth-child(7) {
        display: block;
    }

    .kpi-title {
        flex: unset !important;
    }

    .stat-card {
        padding: 10px !important;
    }
}

.giaoviec {
    height: 300px;
}

.giaoviec .nv-dropdown {
    width: 90%;
    left: 5%;
}

.nv-dropdown {
    position: absolute;
    /* top: 100%; */
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: none;
    margin-top: 5px;
    max-height: 400px;
    overflow-y: auto;
}

.nv-dropdown::-webkit-scrollbar {
    width: 5px;
}

.nv-dropdown::-webkit-scrollbar-track {
    background: var(--light);
}

.nv-dropdown.active {
    display: block;
}

.nv-search {
    padding: 10px;
    position: sticky;
    top: 0;
    background: white;
    border-bottom: 1px solid var(--border);
}

.nv-search input {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 5px;
    font-size: 14px;
}

.nv-option {
    padding: 10px 15px;
    cursor: pointer;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nv-option:hover {
    background: rgba(99, 102, 241, 0.1);
}

.nv-option.selected {
    background: rgba(99, 102, 241, 0.2);
}

.nv-option.hidden {
    display: none;
}

.nv-department {
    font-size: 12px;
    color: var(--text-light);
    margin-left: 10px;
}

.nv-checkbox {
    width: 16px;
    height: 16px;
    border: 2px solid var(--dark);
    border-radius: 3px;
    /* position: relative; */
}

.nv-option.selected .nv-checkbox:after {
    content: '✓';
    position: absolute;
    top: -50%;
    left: 20%;
    transform: translate(-50%, -50%);
    color: var(--success);
    font-size: 12px;
    position: relative;
}

/* qtux dropdown */
.qtux-dropdown {
    /* position: absolute;
    top: 100%; */
    /* left: 0;
    right: 0; */
    background: white;
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: none;
    margin-top: 5px;
    max-height: 400px;
    overflow-y: auto;
}

.qtux-dropdown::-webkit-scrollbar {
    width: 5px;
}

.qtux-dropdown::-webkit-scrollbar-track {
    background: var(--light);
}

.qtux-dropdown.active {
    display: block;
}

.qtux-search {
    padding: 10px;
    position: sticky;
    top: 0;
    background: white;
    border-bottom: 1px solid var(--border);
}

.qtux-search input {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 5px;
    font-size: 14px;
}

.qtux-option {
    padding: 10px 15px;
    cursor: pointer;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.qtux-option:hover {
    background: rgba(99, 102, 241, 0.1);
}

.qtux-option.selected {
    background: rgba(99, 102, 241, 0.2);
}

.qtux-option.hidden {
    display: none;
}

.qtux-checkbox {
    width: 16px;
    height: 16px;
    border: 2px solid var(--dark);
    border-radius: 3px;
    /* position: relative; */
}

.qtux-option.selected .qtux-checkbox:after {
    content: '✓';
    position: absolute;
    top: -50%;
    left: 20%;
    transform: translate(-50%, -50%);
    color: var(--success);
    font-size: 12px;
    position: relative;
}

.kp-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: none;
    margin-top: 5px;
    max-height: 300px;
    overflow-y: auto;
}

.kp-dropdown.active {
    display: block;
}

.kp-search {
    padding: 10px;
    position: sticky;
    top: 0;
    background: white;
    border-bottom: 1px solid var(--border);
}

.kp-search input {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 5px;
    font-size: 14px;
}

.kp-option {
    padding: 10px 15px;
    cursor: pointer;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.kp-option:hover {
    background: rgba(99, 102, 241, 0.1);
}

.kp-option.selected {
    background: rgba(99, 102, 241, 0.2);
}

.kp-option.hidden {
    display: none;
}

.kp-checkbox {
    width: 16px;
    height: 16px;
    border: 2px solid var(--border);
    border-radius: 3px;
    position: relative;
}

.kp-option.selected .kp-checkbox:after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--primary);
    font-size: 12px;
}

/* Toast Notification Styles */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 300px;
    animation: slideInRight 0.3s ease-out;
    pointer-events: auto;
    font-size: 14px;
    opacity: 1;
    flex-basis: unset !important;
}

.toast.success {
    border-left: 4px solid #10b981;
}

.toast.success .toast-icon {
    color: #10b981;
}

.toast.error {
    border-left: 4px solid #ef4444;
}

.toast.error .toast-icon {
    color: #ef4444;
}

.toast.warning {
    border-left: 4px solid #f59e0b;
}

.toast.warning .toast-icon {
    color: #f59e0b;
}

.toast.info {
    border-left: 4px solid #3b82f6;
}

.toast.info .toast-icon {
    color: #3b82f6;
}

.toast-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 2px;
}

.toast-message {
    color: #6b7280;
    font-size: 13px;
}

.toast-close {
    background: none;
    border: none;
    font-size: 18px;
    color: #9ca3af;
    cursor: pointer;
    padding: 0;
    margin-left: 8px;
    flex-shrink: 0;
    transition: color 0.2s;
}

.toast-close:hover {
    color: #6b7280;
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    margin-left: 5px;
    height: 3px;
    background: currentColor;
    border-radius: 0 0 8px 0;
    animation: slideOut 3s linear forwards;
}

.toast.success .toast-progress {
    background: #10b981;
}

.toast.error .toast-progress {
    background: #ef4444;
}

.toast.warning .toast-progress {
    background: #f59e0b;
}

.toast.info .toast-progress {
    background: #3b82f6;
}

.toast.removing {
    animation: slideOutRight 0.2s ease-in forwards;
}

@keyframes slideOutRight {
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        width: 100%;
    }

    to {
        width: 0;
    }
}

/* Mobile Menu Styles */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
    background: linear-gradient(180deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 8px;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.mobile-menu-toggle:active {
    transform: scale(0.95);
}

.mobile-menu-close {
    display: none;
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    font-size: 24px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.mobile-menu-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.mobile-overlay {
    display: none;
}

.kpiadmin-wrap {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    width: 100%;
}

/* ── Card base ── */
.kpiadmin-card {
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.10);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.kpiadmin-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.18);
}

/* ── Header ── */
.kpiadmin-card-header {
    padding: 18px 20px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.kpiadmin-card-header .icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.kpiadmin-card-header h3 {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1.4;
    margin-bottom: 0 !important;
}

/* ── Divider ── */
.kpiadmin-divider {
    height: 2px;
    margin: 0 20px;
    opacity: 0.18;
}

/* ── Items list ── */
.kpiadmin-items {
    padding: 14px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.kpiadmin-item {
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.10);
    padding: 11px 16px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: opacity 0.15s;
    cursor: default;
}

.kpiadmin-item:hover {
    opacity: 0.85;
}

.kpiadmin-item .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.kpiadmin-item h3 {
    margin-bottom: 0 !important;
    font-weight: 700;
}

/* ══ RED — Chưa có KPI ══ */
.card-red {
    background: linear-gradient(155deg, #7A1010 0%, #B91C1C 60%, #991616 100%);
}

.card-red .kpiadmin-card-header h3 {
    color: #ffffff;
}

.card-red .icon {
    color: #ffffff;
}

.card-red .kpiadmin-divider {
    background: #FCA5A5;
}

.card-red .kpiadmin-item {
    color: #FEE2E2;
}

.card-red .kpiadmin-item .dot {
    background: #FCA5A5;
}

/* ══ AMBER — Chưa đạt KPI ══ */
.card-amber {
    background: linear-gradient(155deg, #7C2D12 0%, #C2410C 50%, #EA580C 100%);
}

.card-amber .kpiadmin-card-header h3 {
    color: #ffffff;
}

.card-amber .icon {
    color: #ffffff;
}

.card-amber .kpiadmin-divider {
    background: #FED7AA;
}

.card-amber .kpiadmin-item {
    color: #FFEDD5;
}

.card-amber .kpiadmin-item .dot {
    background: #FED7AA;
}

/* ══ GREEN — Đạt KPI ══ */
.card-green {
    background: linear-gradient(155deg, #14532D 0%, #15803D 60%, #16A34A 100%);
}

.card-green .kpiadmin-card-header h3 {
    color: #ffffff;
}

.card-green .icon {
    color: #ffffff;
}

.card-green .kpiadmin-divider {
    background: #86EFAC;
}

.card-green .kpiadmin-item {
    color: #DCFCE7;
}

.card-green .kpiadmin-item .dot {
    background: #86EFAC;
}

/* ── Responsive ── */
@media (max-width: 640px) {
    .kpiadmin-wrap {
        grid-template-columns: 1fr;
    }
}

.dept-progress-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.10);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.dept-progress-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.18);
    cursor: pointer;
}


.interesting {
    position: relative;
    overflow: visible;

    border: 2px solid rgba(255, 193, 7, 0.7) !important;
    border-radius: 18px;

    background:
        linear-gradient(135deg,
            rgba(255, 193, 7, 0.10) 0%,
            rgba(255, 255, 255, 1) 40%,
            rgba(255, 193, 7, 0.05) 100%) !important;

    box-shadow:
        0 4px 20px rgba(255, 193, 7, 0.18),
        0 0 0 1px rgba(255, 193, 7, 0.2);

    transition: all 0.3s ease;
}

/* Hover */
.interesting:hover {
    transform: translateY(-3px);

    box-shadow:
        0 10px 28px rgba(255, 193, 7, 0.28),
        0 0 18px rgba(255, 193, 7, 0.35);
}

/* =========================
            BADGE TOP KPI
            ========================= */

.interesting .top-kpi-badge {
    position: absolute;

    top: -14px;
    right: 70px;

    background: linear-gradient(135deg,
            #ffd54f,
            #ffb300);

    color: white;

    padding: 6px 14px;

    border-radius: 999px;

    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;

    box-shadow:
        0 4px 12px rgba(255, 193, 7, 0.45),
        0 0 18px rgba(255, 193, 7, 0.4);

    z-index: 30;

    animation: badgeFloat 3s ease-in-out infinite;
}

/* =========================
   VƯƠNG MIỆN NGÔI SAO
========================= */

.interesting .crown-stars {
    position: absolute;

    top: -25px;
    right: 45px;
    rotate: 20deg;
    z-index: 25;

    animation: crownShake 4s ease-in-out infinite;
}

/* Style chung */
.interesting .crown-stars i {
    position: absolute;

    color: #ffc107;

    filter:
        drop-shadow(0 0 6px rgba(255, 193, 7, 0.8)) drop-shadow(0 0 12px rgba(255, 193, 7, 0.6));

    animation: sparkle 2s infinite;
}

/* Sao trái */
.interesting .crown-stars .star-left {
    font-size: 24px;

    top: 10px;
    left: -8px;

    rotate: -20deg;

    animation-delay: 0s;
}

/* Sao giữa */
.interesting .crown-stars .star-center {
    font-size: 36px;

    top: -6px;
    left: 18px;

    animation-delay: 0.4s;
}

/* Sao phải */
.interesting .crown-stars .star-right {
    font-size: 24px;

    top: 13px;
    left: 55px;

    rotate: 20deg;

    animation-delay: 0.8s;
}

/* =========================
   HIỆU ỨNG LẤP LÁNH
========================= */

@keyframes sparkle {

    0% {
        transform: scale(1);
        opacity: 0.95;

        filter:
            drop-shadow(0 0 2px rgba(255, 255, 255, 0.8)) drop-shadow(0 0 6px rgba(255, 255, 255, 0.5)) drop-shadow(0 0 10px rgba(0, 212, 255, 0.15));
    }

    25% {
        filter:
            drop-shadow(0 0 4px rgba(255, 255, 255, 1)) drop-shadow(0 0 10px rgba(255, 255, 255, 0.9)) drop-shadow(0 0 18px rgba(0, 212, 255, 0.25));
    }

    50% {
        transform: scale(1.18);
        opacity: 1;

        filter:
            drop-shadow(0 0 6px rgba(255, 255, 255, 1)) drop-shadow(0 0 14px rgba(255, 255, 255, 0.95)) drop-shadow(0 0 24px rgba(0, 212, 255, 0.35)) drop-shadow(0 0 30px rgba(168, 85, 247, 0.25));
    }

    75% {
        filter:
            drop-shadow(0 0 4px rgba(255, 255, 255, 1)) drop-shadow(0 0 12px rgba(255, 255, 255, 0.8)) drop-shadow(0 0 20px rgba(0, 212, 255, 0.2));
    }

    100% {
        transform: scale(1);
        opacity: 0.95;

        filter:
            drop-shadow(0 0 2px rgba(255, 255, 255, 0.8)) drop-shadow(0 0 6px rgba(255, 255, 255, 0.5)) drop-shadow(0 0 10px rgba(0, 212, 255, 0.15));
    }
}

/* =========================
   HIỆU ỨNG RUNG NHẸ
========================= */

@keyframes crownShake {
    0% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(-3deg);
    }

    50% {
        transform: rotate(2deg);
    }

    75% {
        transform: rotate(-2deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

/* =========================
   BADGE FLOAT
========================= */

@keyframes badgeFloat {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-3px);
    }

    100% {
        transform: translateY(0px);
    }
}


.interesting-pink {
    position: relative;
    overflow: visible;

    border: 2px solid rgba(236, 72, 153, 0.5);
    border-radius: 18px;

    background:
        linear-gradient(
            135deg,
            rgba(236, 72, 153, 0.10) 0%,
            rgba(255, 255, 255, 1) 45%,
            rgba(244, 114, 182, 0.08) 100%
        );

    box-shadow:
        0 4px 20px rgba(236, 72, 153, 0.15),
        0 0 0 1px rgba(236, 72, 153, 0.12);

    transition: all 0.3s ease;
}

.interesting-pink:hover {
    transform: translateY(-3px);

    box-shadow:
        0 12px 30px rgba(236, 72, 153, 0.25),
        0 0 20px rgba(244, 114, 182, 0.2);
}

.interesting-pink::before {
    content: "QUAN TÂM";
    position: absolute;

    top: 12px;
    left: -28px;

    width: 100px;
    text-align: center;

    padding: 4px 0;

    background: linear-gradient(
        135deg,
        #f472b6,
        #ec4899
    );

    color: white;
    font-size: 11px;
    font-weight: 700;

    transform: rotate(-45deg);

    box-shadow: 0 4px 12px rgba(236,72,153,0.3);
}