/* CSS Reset and Basic Styles */
:root {
    --bg-color: #f4f7fa;
    --main-bg-color: #ffffff;
    --sidebar-width: 240px;
    --right-sidebar-width: 320px;
    --primary-text: #1e293b;
    --secondary-text: #64748b;
    --border-color: #e2e8f0;
    --purple-light: #f3e8ff;
    --purple-dark: #6b21a8;
    --orange-light: #fff7ed;
    --orange-dark: #f97316;
    --blue-accent: #3b82f6;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
    color: var(--primary-text);
    font-size: 14px;
}

.dashboard-container {
    display: flex;
    min-height: 100vh;
}

/* Left Sidebar */
.sidebar-left {
    width: var(--sidebar-width);
    background-color: var(--main-bg-color);
    padding: 24px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-color);
}

.logo {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 40px;
    color: var(--purple-dark);
}

.user-profile {
    text-align: center;
    margin-bottom: 30px;
}

.user-profile img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--purple-light);
    margin-bottom: 10px;
}

.user-profile h4 {
    font-weight: 600;
}

.user-profile p {
    font-size: 12px;
    color: var(--secondary-text);
}

.user-profile .status {
    color: #22c55e;
    font-size: 12px;
}
.user-profile .status .fa-circle {
    font-size: 8px;
}


.nav-menu h5 {
    color: var(--secondary-text);
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.nav-menu ul {
    list-style: none;
    margin-bottom: 30px;
}

.nav-menu ul li a {
    display: flex;
    align-items: center;
    padding: 12px 10px;
    text-decoration: none;
    color: var(--secondary-text);
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
    margin-bottom: 4px; /* Tambah baris ini */
}

.nav-menu ul li a.active,
.nav-menu ul li a:hover {
    background-color: var(--purple-light);
    color: var(--purple-dark);
}

.nav-menu ul li a i {
    margin-right: 15px;
    width: 20px;
    text-align: center;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 24px 32px;
    overflow-y: auto;
}

.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.main-header .welcome-message h2 {
    font-size: 24px;
    font-weight: 600;
}

.main-header .welcome-message p {
    color: var(--secondary-text);
}

.search-bar {
    display: flex;
    align-items: center;
    background-color: var(--bg-color);
    padding: 8px 16px;
    border-radius: 8px;
    width: 300px;
}

.search-bar i {
    color: var(--secondary-text);
}

.search-bar input {
    border: none;
    background: none;
    outline: none;
    margin-left: 10px;
    width: 100%;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
}

.highlight-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 30px;
}

.card {
    padding: 24px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: white;
}

.card.orange {
    background: linear-gradient(135deg, #fb923c, #f97316);
}

.card.purple {
    background: linear-gradient(135deg, #a78bfa, #7c3aed);
}

.card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

.card-users {
    display: flex;
}

.card-users img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid white;
    margin-left: -10px;
}
.card-users img:first-child {
    margin-left: 0;
}

.card .progress-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: conic-gradient(#059669 47%, #a855f7 0);
    font-weight: 600;
}
.card .progress-circle::before {
     content: "47%";
     color: white;
     background-color: #7c3aed;
     width: 85%;
     height: 85%;
     border-radius: 50%;
     display: grid;
     place-items: center;
}

.tasks-section .tabs {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.tasks-section .tabs a {
    padding: 10px 5px;
    text-decoration: none;
    color: var(--secondary-text);
    font-weight: 500;
    position: relative;
}

.tasks-section .tabs a.active {
    color: var(--primary-text);
}

.tasks-section .tabs a.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--purple-dark);
}

.task-list ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.task-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background-color: var(--main-bg-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.task-item .task-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    margin-right: 15px;
    font-size: 20px;
    color: white;
}
.task-item .task-icon.uber { background-color: #000000; }
.task-item .task-icon.facebook { background-color: #1877f2; }
.task-item .task-icon.payoneer { background-color: #ff7800; }
.task-item .task-icon.upwork { background-color: #14a800; }

.task-info {
    flex: 1;
}
.task-info h4 {
    font-weight: 600;
    font-size: 15px;
}
.task-info p {
    color: var(--secondary-text);
    font-size: 12px;
}

.task-users {
    display: flex;
}

.task-users img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid white;
    margin-left: -10px;
}
.task-users img:first-child {
    margin-left: 0;
}


/* Right Sidebar */
.sidebar-right {
    width: var(--right-sidebar-width);
    background-color: var(--main-bg-color);
    padding: 24px;
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.right-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 20px;
}
.right-header i {
    font-size: 18px;
    color: var(--secondary-text);
    cursor: pointer;
}
.right-header img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.widget-card {
    background-color: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
}

.call-widget .header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}
.call-widget .header p {
    font-size: 12px;
    color: var(--secondary-text);
}
.call-widget .header a {
    text-decoration: none;
    color: var(--blue-accent);
    font-weight: 500;
}

.call-widget h4 {
    font-weight: 600;
}

.call-widget .timer-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--main-bg-color);
    padding: 10px 15px;
    border-radius: 12px;
    margin-top: 15px;
}

.call-widget .timer-users {
    display: flex;
}
.call-widget .timer-users img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid white;
    margin-left: -10px;
}
.call-widget .timer-users img:first-child {
    margin-left: 0;
}

.call-widget .time {
    background-color: var(--purple-light);
    color: var(--purple-dark);
    padding: 5px 10px;
    border-radius: 6px;
    font-weight: 500;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}
.stat-card {
    padding: 15px;
    border-radius: 12px;
}
.stat-card.pink { background-color: #fdf2f8; border: 1px solid #fbcfe8;}
.stat-card.blue { background-color: #eff6ff; border: 1px solid #bfdbfe;}
.stat-card.orange-light { background-color: #fff7ed; border: 1px solid #fed7aa;}
.stat-card.green-light { background-color: #f0fdf4; border: 1px solid #bbf7d0;}

.stat-card span {
    font-size: 22px;
    font-weight: 700;
}
.stat-card p {
    font-size: 12px;
    font-weight: 500;
    color: var(--secondary-text);
}
.stat-card .details {
    font-size: 10px;
    margin-top: 5px;
    color: var(--secondary-text);
}
.details .fa-circle {
    font-size: 6px;
    vertical-align: middle;
}
.details .overdue { color: #ef4444;}

.calendar .header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.calendar .header h5 {
    font-weight: 600;
    font-size: 15px;
}
.calendar .header .nav-arrows i {
    color: var(--secondary-text);
    cursor: pointer;
    padding: 5px;
}
.calendar table {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
}
.calendar th, .calendar td {
    padding: 8px 0;
    font-size: 12px;
    color: var(--secondary-text);
    font-weight: 500;
}
.calendar td {
    cursor: pointer;
    position: relative;
}
.calendar td.today {
    background-color: var(--purple-dark);
    color: white;
    border-radius: 50%;
}
.calendar td.active-day::after {
    content: '';
    position: absolute;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background-color: var(--blue-accent);
    border-radius: 50%;
}
/* Styling untuk Pill-style Tabs/Buttons */
.pill-tabs {
    display: inline-flex;
    background-color: #e2e8f0; /* Warna latar belakang kelabu lembut */
    padding: 5px;
    border-radius: 12px; /* Melengkungkan bekas luar */
    gap: 5px; /* Jarak antara butang */
}

.pill-tabs a {
    text-decoration: none;
    padding: 8px 18px; /* Saiz butang */
    border-radius: 9px; /* Melengkungkan setiap butang */
    font-weight: 500;
    color: var(--secondary-text);
    transition: all 0.3s ease; /* Animasi lembut */
}

/* Apabila butang aktif atau di-hover */
.pill-tabs a.active,
.pill-tabs a:hover {
    background-color: var(--main-bg-color); /* Latar belakang putih */
    color: var(--purple-dark); /* Teks warna ungu */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08); /* Bayang-bayang lembut untuk efek timbul */
}
/* Header untuk Grid Tugasan */
.task-grid-header {
    display: grid;
    grid-template-columns: 50px 1fr 180px 140px 60px; /* 5 kolum sekarang */
    gap: 15px;
    padding: 0 20px;
    margin-bottom: 10px;
    color: var(--secondary-text);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11px;
}

/* Container untuk senarai tugasan grid */
.task-list-grid ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px; /* Jarak antara setiap 'kad' tugasan */
}

/* Stail untuk setiap 'kad' tugasan (setiap <li>) */
.task-list-grid li {
    display: grid;
    grid-template-columns: 50px 1fr 180px 140px 60px; /* 5 kolum sekarang */
    gap: 15px; /* Jarak antara item dalam kad */
    align-items: center;
    padding: 15px 20px;
    background-color: var(--main-bg-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.2s ease-in-out;
}

.task-list-grid li:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.07);
    border-color: #d1d5db;
    transform: translateY(-2px);
}

/* Stail untuk info tugasan dalam kad */
.task-list-grid .task-info-cell h4 {
    font-weight: 600;
    font-size: 15px;
    margin: 0 0 4px 0;
}
.task-list-grid .task-info-cell p {
    font-size: 12px;
    color: var(--secondary-text);
    margin: 0;
}

/* Stail untuk avatar pengguna */
.task-list-grid .task-users-cell {
    display: flex;
    justify-content: flex-start; /* Selarikan avatar ke kiri */
}

.task-list-grid .task-users-cell img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid white;
    margin-left: -10px;
}
.task-list-grid .task-users-cell img:first-child {
    margin-left: 0;
}

/* Stail untuk Status Badge (Kekal sama, tapi pastikan ia ada) */
.status-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 12px; /* Bentuk pil */
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    text-align: center;
}

.status-inprogress { background-color: #eff6ff; color: #3b82f6; } /* Biru */
.status-overdue { background-color: #fee2e2; color: #ef4444; } /* Merah */
.status-completed { background-color: #f0fdf4; color: #22c55e; } /* Hijau */
.status-backlog { background-color: #f1f5f9; color: #64748b; } /* Kelabu */

/* Stail untuk butang aksi '...' */
.action-btn {
    color: var(--secondary-text);
    padding: 5px 10px;
    border-radius: 6px;
    cursor: pointer;
    text-align: center;
}
.action-btn:hover {
    background-color: #e2e8f0;
}
/* Stail untuk ikon kategori di sebelah kiri */
.task-icon-cell {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    font-size: 20px;
    color: white;
    font-weight: 600;
}
/* Stail untuk Kumpulan Butang Utama */
.button-primary, .button-secondary {
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

/* Butang Utama (Ungu) */
.button-primary {
    background-color: var(--purple-dark);
    color: white;
}
.button-primary:hover {
    background-color: #581c87; /* Ungu lebih gelap */
}

/* Butang Sekunder (Garis) */
.button-secondary {
    background-color: transparent;
    color: var(--primary-text);
    border: 1px solid var(--border-color);
}
.button-secondary:hover {
    background-color: #f8fafc; /* Kelabu lembut */
    border-color: #cbd5e1;
}
/* Stail untuk sel header grid */
.task-grid-header > div {
    position: relative; /* Penting untuk kedudukan butang delete */
    display: flex;
    align-items: center;
}

/* Butang delete column tersembunyi */
.delete-column-btn {
    margin-left: 8px; /* Jarak dari teks tajuk */
    background-color: #e2e8f0;
    color: var(--secondary-text);
    width: 20px;
    height: 20px;
    flex-shrink: 0; /* TAMBAH: Elak butang dari mengecut */
    aspect-ratio: 1; /* TAMBAH: Paksa bentuk menjadi segi empat sama */
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 12px;
    cursor: pointer;
    opacity: 0; /* Sembunyikan secara lalai */
    pointer-events: none; /* Tidak boleh diklik apabila tersembunyi */
    transition: all 0.2s ease;
}

/* Paparkan butang delete apabila header di-hover */
.task-grid-header > div:hover .delete-column-btn {
    opacity: 1; /* Paparkan semula */
    pointer-events: auto; /* Benarkan ia diklik */
}

.delete-column-btn:hover {
    background-color: #ef4444; /* Warna merah apabila di-hover */
    color: white;
}
/* Stail untuk input 'in-place editing' */
.inline-edit-input {
    width: 95%;
    padding: 6px 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    font-weight: 600;
    border: 2px solid var(--purple-dark);
    border-radius: 6px;
    outline: none;
}
