/* ============================================================
   SCROLLBAR
============================================================ */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #888; }
::-webkit-scrollbar-thumb:hover { background: #555; }

/* ============================================================
   FONTS & ROOT
============================================================ */
@import url("https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700&display=swap");

:root {
    --header-height: 3rem;
    --nav-width: 68px;
    --first-color: var(--accent);
    --first-color-light: #484848ff;
    --white-color: var(--primary);
    --body-font: 'Nunito', sans-serif;
    --normal-font-size: 1rem;
    --z-fixed: 100;
}

/* ============================================================
   BASE
============================================================ */
*, ::before, ::after { box-sizing: border-box; }

body {
    position: relative;
    margin: var(--header-height) 0 0 0;
    padding: 0 1rem;
    font-family: var(--body-font);
    font-size: var(--normal-font-size);
    transition: 0.5s;
}

a { text-decoration: none; }
a:hover { text-decoration: none; }

/* ============================================================
   HEADER
============================================================ */
.header {
    width: 100%;
    height: var(--header-height);
    position: fixed;
    top: 0; left: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    background-color: var(--white-color);
    z-index: var(--z-fixed);
    transition: 0.5s;
}

.header_toggle { color: var(--first-color); font-size: 1.5rem; cursor: pointer; }
.header_img    { width: 35px; height: 35px; display: flex; justify-content: center; border-radius: 50%; overflow: hidden; }
.header_img img { width: 40px; }

/* ============================================================
   SIDEBAR & ACCORDION MENU GROUPINGS
   z-index 200 — always above backdrop (150)
============================================================ */
.l-navbar {
    position: fixed;
    top: 0;
    left: -100%;
    width: var(--nav-width);
    height: 100vh;
    background: linear-gradient(180deg, var(--first-color), #95d438);
    padding: 0.75rem 0.75rem 0 0;
    transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1), width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 200;
    overflow: hidden;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.08);
}

.l-navbar.show { left: 0; }

.nav {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow-x: hidden;
    overflow-y: auto;
}
.nav::-webkit-scrollbar { width: 4px; }
.nav::-webkit-scrollbar-track { background: transparent; }
.nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 10px; }
.nav::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.35); }

/* ── NAV LOGO ── */
.nav_logo,
.nav_link {
    display: grid;
    grid-template-columns: max-content max-content;
    align-items: center;
    column-gap: 1rem;
    padding: 0.65rem 0 0.65rem 1.5rem;
    cursor: pointer;
}

.nav_logo { margin-bottom: 1.5rem; }
.nav_logo-icon { font-size: 1.35rem; color: var(--white-color); }
.nav_logo-name { color: var(--white-color); font-weight: 800; font-size: 1.15rem; letter-spacing: -0.3px; display: block; }
.nav_logo-icon-img { display: none; }
.l-navbar:not(.show) .nav_logo-icon-img { display: block !important; margin: 0 auto; }
.l-navbar:not(.show) .nav_logo-name { display: none !important; }
.l-navbar:not(.show) .nav_logo { padding: 0.65rem 0 !important; display: flex !important; justify-content: center !important; }

/* ── NAV LIST CONTAINER ── */
.nav_list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-bottom: 2rem;
}

/* ── NAV LINK (flat items like Sign Out) ── */
.nav_link {
    position: relative;
    color: var(--first-color-light);
    margin-bottom: 0.35rem;
    border-radius: 0 25px 25px 0;
    transition: all 0.25s ease;
    text-decoration: none !important;
}
.nav_link:hover {
    color: var(--white-color);
    background: rgba(2, 68, 66, 0.08);
}

/* ── NAV NAME (text labels inside links/toggles) ── */
.nav_name {
    font-size: 0.92rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: inherit;
}

/* ── NAV SUBNAME (text labels inside sublinks) ── */
.nav_subname {
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── NAV ICON ── */
.nav_icon { font-size: 1.25rem; transition: transform 0.2s ease; }
.nav_link:hover .nav_icon { transform: scale(1.1); }

/* ── ACTIVE STATES ── */
.nav_link.active {
    color: var(--white-color);
    font-weight: 700;
    background: rgba(2, 68, 66, 0.14);
}
.nav_link.active::before {
    content: '';
    position: absolute; left: 0; top: 15%;
    width: 4px; height: 70%;
    background-color: var(--white-color);
    border-radius: 0 4px 4px 0;
}
.nav-item .nav-link::after,
.active::after { content: none; }

/* ── NAV ACCORDION & DROPDOWN GROUPS ── */
.nav_group {
    position: relative;
    margin-bottom: 0.35rem;
}
.nav_group-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 1rem 0.65rem 1.5rem;
    color: var(--first-color-light);
    border-radius: 0 25px 25px 0;
    cursor: pointer;
    transition: all 0.25s ease;
    margin-bottom: 0;
    user-select: none;
}
.nav_group-toggle:hover, .nav_group.open > .nav_group-toggle {
    color: var(--white-color);
    background: rgba(2, 68, 66, 0.08);
}
.nav_group-toggle.active {
    color: var(--white-color);
    font-weight: 700;
    background: rgba(2, 68, 66, 0.14);
}
.nav_group-toggle.active::before {
    content: '';
    position: absolute; left: 0; top: 15%;
    width: 4px; height: 70%;
    background-color: var(--white-color);
    border-radius: 0 4px 4px 0;
}

/* ── CHEVRON ── */
.nav_chevron {
    font-size: 0.8rem !important;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: inherit;
    opacity: 0.8;
}
.nav_group.open .nav_chevron {
    transform: rotate(180deg);
}

/* ── SUBMENU CONTAINER ── */
.nav_submenus {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease;
    opacity: 0;
    padding-left: 0.5rem;
}
.nav_group.open .nav_submenus {
    max-height: 600px;
    opacity: 1;
    margin-top: 0.2rem;
    margin-bottom: 0.4rem;
}

/* ── SUBLINK ITEMS ── */
.nav_sublink {
    display: block;
    padding: 0.5rem 1rem 0.5rem 2.8rem;
    color: #3b5c2a;
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: 0 20px 20px 0;
    text-decoration: none !important;
    transition: all 0.2s ease;
    position: relative;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.nav_sublink:hover {
    color: var(--primary, #024442);
    background: rgba(255, 255, 255, 0.5);
    transform: translateX(4px);
}
.nav_sublink.active {
    color: var(--primary, #024442);
    background: rgba(255, 255, 255, 0.85);
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(2, 68, 66, 0.06);
}
.nav_sublink.active::before {
    content: '';
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--primary, #024442);
}
.nav_subicon {
    display: none !important;
}

/* ── BADGE ── */
.nav_badge {
    margin-left: auto;
    background: var(--primary, #024442);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 12px;
}

/* ============================================================
   COLLAPSED SIDEBAR — show only centered icons
============================================================ */
.l-navbar:not(.show) .nav_name,
.l-navbar:not(.show) .nav_subname,
.l-navbar:not(.show) .nav_chevron,
.l-navbar:not(.show) .nav_submenus,
.l-navbar:not(.show) .nav_badge {
    display: none !important;
}
.l-navbar:not(.show) .nav_link,
.l-navbar:not(.show) .nav_group-toggle {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 0.75rem 0 !important;
    width: 100% !important;
    margin-bottom: 0.35rem !important;
}
.l-navbar:not(.show) .nav_link > div,
.l-navbar:not(.show) .nav_group-toggle > div {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    gap: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}
.l-navbar:not(.show) .nav_icon {
    margin: 0 !important;
    font-size: 1.25rem !important;
    display: block !important;
    text-align: center !important;
}
/* Tooltip on hover when collapsed */
.l-navbar:not(.show) .nav_group-toggle:hover::after,
.l-navbar:not(.show) .nav_link:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    left: calc(var(--nav-width) + 6px);
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary, #024442);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 6px;
    white-space: nowrap;
    z-index: 999;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* ============================================================
   BACKDROP
   z-index 150 — behind sidebar (200), above page content
============================================================ */
#navBackdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 150;
}
#navBackdrop.visible { display: block; }

/* ============================================================
   UTILITY
============================================================ */
.height-100 { height: 100vh; padding-top: 60px; }

/* ============================================================
   MOBILE  ≤ 767px
   Sidebar is absolute overlay — content never shifts
============================================================ */
@media screen and (max-width: 767px) {
    body         { padding-left: 1rem; }
    body.body-pd { padding-left: 1rem !important; }

    .header         { padding-left: 1rem; left: 0; width: 100%; }
    .header.body-pd { padding-left: 1rem !important; }

    .l-navbar      { left: -100%; width: 260px; z-index: 200; }
    .l-navbar.show { left: 0; }
}

/* ============================================================
   DESKTOP  ≥ 768px
   Sidebar shifts content normally
============================================================ */
@media screen and (min-width: 768px) {
    body {
        margin: calc(var(--header-height) + 1rem) 0 0 0;
        padding-left: calc(var(--nav-width) + 2rem);
    }
    .header {
        height: calc(var(--header-height) + 1rem);
        padding: 0 2rem 0 calc(var(--nav-width) + 2rem);
    }
    .header_img     { width: 40px; height: 40px; }
    .header_img img { width: 45px; }

    .l-navbar { left: 0; padding: 1rem 0.5rem 0 0; }
    .l-navbar.show { width: calc(var(--nav-width) + 196px); }

    body.body-pd   { padding-left: calc(var(--nav-width) + 218px); }
    .header.body-pd { padding-left: calc(var(--nav-width) + 218px); }

    #navBackdrop { display: none !important; }
}

/* ============================================================
   HEADER PROFILE MENU
============================================================ */
.header-menu {
    display: flex; flex-wrap: wrap; background: transparent;
    border-radius: 5px; text-align: center; padding: 10px;
    justify-content: center; align-items: center; cursor: pointer;
}
.header-menu .profile-icon {
    border-radius: 50px; width: 35px; height: 35px; object-fit: cover;
    margin: 2px; background: var(--accent); color: var(--primary);
    text-align: center; font-size: 18px; font-weight: 600;
    line-height: 35px; vertical-align: center; margin-right: 5px;
}
.header-menu div { margin: 2px; color: var(--first-color); }

/* ============================================================
   SWITCH TOGGLE
============================================================ */
.switch { position: relative; display: inline-block; width: 42px; height: 22px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; inset: 0; background: #ccc; border-radius: 30px; cursor: pointer; transition: .3s; }
.slider:before { content: ""; position: absolute; height: 16px; width: 16px; left: 3px; bottom: 3px; background: white; border-radius: 50%; transition: .3s; }
.switch input:checked + .slider { background: var(--accent); }
.switch input:checked + .slider:before { transform: translateX(20px); }

/* ============================================================
   BUTTONS
============================================================ */
.btn {
    padding: 11px 20px; border: none; border-radius: var(--radius);
    font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.2s;
    display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
}
.btn-primary   { background: var(--primary); color: white; }
.btn-primary:hover   { background: #035b58; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-secondary { background: white; color: var(--gray-600); border: 1px solid var(--gray-300); }
.btn-secondary:hover { background: var(--gray-50); border-color: var(--gray-400); }
.btn-danger    { background: var(--danger); color: white; }
.btn-danger:hover    { background: #dc2626; }
.btn-accent    { background: var(--accent); color: var(--dark); }
.btn-accent:hover    { background: #a8e856; transform: translateY(-1px); }

.btn-primary-custom {
    background: var(--accent); color: white; border: none;
    padding: 12px 24px; border-radius: 8px; font-weight: 600;
    cursor: pointer; transition: all 0.3s ease; font-size: 14px;
}
.btn-primary-custom:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(181,255,107,0.4); }

.btn-secondary-custom {
    background: white; color: #666; border: 2px solid #e0e0e0;
    padding: 12px 24px; border-radius: 8px; font-weight: 600;
    cursor: pointer; transition: all 0.3s ease; font-size: 14px;
}
.btn-secondary-custom:hover { border-color: var(--accent); color: var(--accent); }

/* ============================================================
   CLIENTS / MAIN TABLE
============================================================ */
.main-card { background: #fff; border-radius: 16px; padding: 24px; box-shadow: 0 10px 30px rgba(0,0,0,.06); width: 100%; }
.main-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
.main-header h3 { font-size: 22px; font-weight: 700; }
.add-client { background: #b8f35a; border: none; padding: 10px 18px; border-radius: 10px; font-weight: 600; cursor: pointer; }
.main-table { width: 100%; display: flex; flex-direction: column; gap: 12px; }
.table-head, .table-row { display: grid; grid-template-columns: 2fr 1.3fr 1fr .8fr 1fr .5fr; align-items: center; padding: 14px 16px; }
.table-head { color: #777; font-size: 14px; border-bottom: 1px solid #eee; }
.table-row  { background: #f9fbfc; border-radius: 12px; transition: .25s; }
.table-row:hover { background: #f1f7f3; transform: scale(1.01); }
.client { display: flex; align-items: center; gap: 12px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: #b8f35a; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.avatar.pink   { background: #ffb7c5; }
.avatar.blue   { background: #a8d8ff; }
.client small  { display: block; color: #888; font-size: 12px; }
.status { padding: 6px 14px; border-radius: 30px; font-size: 13px; width: max-content; }
.status.active    { background: #d7f8b8; color: #2b7a2b; }
.status.pending   { background: #fff2c2; color: #a37b00; }
.status.completed { background: #dbeaff; color: #1b4ed8; }
.dots { background: none; border: none; font-size: 20px; cursor: pointer; }

.search-box { flex: 1; min-width: 250px; position: relative; }
.search-box input { width: 100%; padding: 12px 40px 12px 16px; border: 2px solid #e0e0e0; border-radius: 8px; font-size: 14px; transition: all 0.3s ease; }
.search-box input:focus { outline: none; border-color: var(--accent); }
.search-icon { position: absolute; right: 15px; top: 50%; transform: translateY(-50%); color: #999; }

@media (max-width: 900px) {
    .table-head, .table-row { grid-template-columns: 2fr 1fr 1fr .5fr; }
    .table-head span:nth-child(2), .table-row span:nth-child(2),
    .table-head span:nth-child(5), .table-row span:nth-child(5) { display: none; }
}

/* ============================================================
   MODAL OVERLAY
============================================================ */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); z-index: 1050; align-items: center;justify-content: center; padding: 20px; animation: fadeIn 0.2s; }
.modal-overlay.active { display: flex; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-content { background: white; border-radius: var(--radius-xl); width: 100%; max-width: 700px; max-height: 90vh; overflow: hidden; overflow-y: scroll; box-shadow: var(--shadow-xl); animation: slideIn 0.3s cubic-bezier(0.16,1,0.3,1); display: flex; flex-direction: column; }
@keyframes slideIn { from { transform: translateY(-30px) scale(0.95); opacity: 0; } to { transform: translateY(0) scale(1); opacity: 1; } }

.modal-header { padding: 28px 32px; border-bottom: 1px solid var(--gray-200); display: flex; justify-content: space-between; align-items: center; background: linear-gradient(135deg,var(--light) 0%,white 100%); flex-shrink: 0; }
.modal-header h4 { font-size: 22px; font-weight: 700; color: var(--dark); display: flex; align-items: center; gap: 10px; margin: 0; }
.modal-header-icon { width: 36px; height: 36px; background: var(--primary); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.modal-close { background: var(--gray-100); border: none; width: 32px; height: 32px; border-radius: 50%; font-size: 20px; color: var(--gray-600); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.modal-close:hover { background: var(--gray-200); color: var(--dark); transform: rotate(90deg); }
.modal-body { padding: 32px; overflow-y: auto; flex: 1; }
.modal-footer { padding: 20px 32px; border-top: 1px solid var(--gray-200); display: flex; gap: 12px; justify-content: flex-end; background: var(--gray-50); flex-shrink: 0; }

.info-grid { display: grid; gap: 20px; margin-bottom: 24px; }
.info-row  { display: flex; gap: 12px; align-items: flex-start; }
.info-icon { width: 40px; height: 40px; background: var(--light); color: var(--primary); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.info-content { flex: 1; }
.info-label   { font-size: 12px; font-weight: 600; color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.info-value   { font-size: 15px; color: var(--dark); font-weight: 500; }
.message-box  { background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 20px; margin-top: 24px; }
.message-label   { font-size: 12px; font-weight: 600; color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 12px; display: block; }
.message-content { color: var(--dark); line-height: 1.7; font-size: 15px; white-space: pre-wrap; word-wrap: break-word; }

@media (max-width: 768px) {
    /* Modal */
    .modal-content { max-width: 95%; }
    .modal-header, .modal-body, .modal-footer { padding: 20px; }
    .modal-footer { flex-direction: column; }
    .modal-footer .btn { width: 100%; justify-content: center; }

    /* Table → card layout */
    .table-head { display: none !important; }

    .table-row {
        display: flex !important;
        flex-direction: column !important;
        grid-template-columns: unset !important;
        gap: 10px !important;
        padding: 16px !important;
        background: #fff !important;
        border: 1px solid #e8eaed !important;
        border-radius: 14px !important;
        margin-bottom: 12px !important;
        box-shadow: 0 2px 8px rgba(0,0,0,.05) !important;
        transform: none !important;
    }
    .table-row:hover {
        background: #f9fbfc !important;
        transform: none !important;
    }

    /* Client cell — stays as flex row with avatar */
    .table-row .client {
        padding-bottom: 10px;
        border-bottom: 1px solid #f0f0f0;
        margin-bottom: 2px;
    }

    /* Spans show data-label prefix */
    .table-row > span {
        display: flex !important;
        align-items: center;
        gap: 8px;
        font-size: 13.5px;
        flex-wrap: wrap;
    }
    .table-row > span[data-label]::before {
        content: attr(data-label) ": ";
        font-size: 11px;
        font-weight: 700;
        color: #aaa;
        text-transform: uppercase;
        letter-spacing: .4px;
        white-space: nowrap;
    }

    /* Actions row stays horizontal */
    .table-row > div {
        padding-top: 10px;
        border-top: 1px solid #f0f0f0;
        flex-wrap: wrap;
        gap: 6px !important;
    }

    /* Stats — 2 columns on mobile */
    .stats-row { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ============================================================
   DASHBOARD MAIN
============================================================ */
.dashboard-container { padding: 30px; }
.welcome-text { margin-bottom: 30px; }
.welcome-text h1 { font-size: 32px; font-weight: 600; color: #333; margin-bottom: 5px; }
.welcome-text p  { color: #666; font-size: 15px; }

.user-card { background: linear-gradient(135deg, var(--accent) 0%, #87bd0aff 100%); border-radius: 16px; padding: 30px; color: white; box-shadow: 0 4px 15px rgba(255,107,107,0.3); position: relative; height: 100%; overflow: hidden; }
.user-card::before { content: ''; position: absolute; top: -50px; right: -50px; width: 150px; height: 150px; background: rgba(255,255,255,0.1); border-radius: 50%; }
.user-avatar { width: 200px; height: 200px; border-radius: 10px; background: white; display: flex; align-items: center; justify-content: center; font-size: 36px; margin-bottom: 15px; box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.user-name { font-size: 24px; font-weight: 600; margin-bottom: 5px; }
.user-role { font-size: 14px; opacity: 0.9; margin-bottom: 15px; }
.user-stats { display: flex; gap: 30px; margin-top: 20px; }
.user-stat  { text-align: center; }
.user-stat-number { font-size: 24px; font-weight: 700; }
.user-stat-label  { font-size: 12px; opacity: 0.9; }

.notice-board { background: white; border-radius: 16px; padding: 25px; box-shadow: 0 2px 12px rgba(0,0,0,0.08); height: 360px; overflow: hidden; }
.notices-body { padding: 10px 20px 60px 10px; height: 100%; overflow: auto; }
.card-header-custom { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; padding-bottom: 15px; border-bottom: 2px solid #f0f0f0; }
.card-header-custom h3 { font-size: 20px; font-weight: 600; color: #333; margin: 0; }
.badge-count { background: var(--accent); color: white; padding: 4px 12px; border-radius: 12px; font-size: 12px; font-weight: 600; }
.notice-item { padding: 15px; border-left: 3px solid var(--accent); background: #fcfff5ff; border-radius: 8px; margin-bottom: 12px; transition: all 0.3s ease; }
.notice-item:hover { background: #b9fc4cff; transform: translateX(5px); }
.notice-title { font-size: 15px; font-weight: 600; color: #333; margin-bottom: 5px; }
.notice-time  { font-size: 12px; color: #999; }

.tasks-card, .resources-card { background: white; border-radius: 16px; padding: 25px; box-shadow: 0 2px 12px rgba(0,0,0,0.08); }
.task-item { display: flex; align-items: start; padding: 18px; background: #f8f9fa; border-radius: 12px; margin-bottom: 12px; transition: all 0.3s ease; border: 2px solid transparent; }
.task-item:hover { background: white; border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.task-checkbox { margin-right: 15px; margin-top: 3px; }
.task-checkbox input[type="checkbox"] { width: 20px; height: 20px; cursor: pointer; accent-color: var(--accent); }
.task-content { flex: 1; }
.task-title { font-size: 16px; font-weight: 600; color: #333; margin-bottom: 5px; }
.task-description { font-size: 14px; color: #666; margin-bottom: 8px; }
.task-meta { display: flex; gap: 15px; align-items: center; }
.task-priority { padding: 4px 12px; border-radius: 12px; font-size: 11px; font-weight: 600; text-transform: uppercase; }
.priority-high   { background: #ffe5e5; color: #d63031; }
.priority-medium { background: #fff4e5; color: #e17055; }
.priority-low    { background: #e5f5ff; color: #0984e3; }
.task-deadline   { font-size: 12px; color: #999; }

.resources-list { max-height: 400px; overflow-y: auto; padding-right: 10px; }
.resources-list::-webkit-scrollbar       { width: 6px; }
.resources-list::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 10px; }
.resources-list::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 10px; }
.resource-item { display: flex; align-items: center; padding: 15px; background: #f8f9fa; border-radius: 12px; margin-bottom: 10px; transition: all 0.3s ease; text-decoration: none; color: inherit; }
.resource-item:hover { background: #acf360ff; transform: translateX(5px); box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.resource-icon { width: 45px; height: 45px; background: linear-gradient(135deg, var(--accent) 0%, #87bd0aff 100%); border-radius: 12px; display: flex; align-items: center; justify-content: center; color: white; font-size: 20px; margin-right: 15px; flex-shrink: 0; }
.resource-info { flex: 1; }
.resource-title { font-size: 15px; font-weight: 600; color: #333; margin-bottom: 3px; }
.resource-description { font-size: 13px; color: #666; }
.resource-link-icon { color: var(--accent); font-size: 18px; }

@media (max-width: 768px) {
    .dashboard-container { padding: 20px; }
    .welcome-text h1     { font-size: 24px; }
    .user-stats          { gap: 15px; }
    .user-stat-number    { font-size: 20px; }
    .resources-list      { max-height: 300px; }
}

/* ============================================================
   TASKS PAGE
============================================================ */
.tasks-container { padding: 30px; }
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 20px; margin-bottom: 30px; }
.stat-card { background: white; padding: 20px; border-radius: 12px; box-shadow: 0 2px 12px rgba(0,0,0,0.08); text-align: center; transition: all 0.3s ease; }
.stat-card:hover { transform: translateY(-5px); box-shadow: 0 8px 20px rgba(0,0,0,0.12); }
.stat-number { font-size: 36px; font-weight: 700; color: var(--primary); margin-bottom: 8px; }
.stat-label  { font-size: 14px; color: #666; font-weight: 500; }
.tasks-main { display: grid; grid-template-columns: 1fr 350px; gap: 25px; }
.task-board { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px,1fr)); gap: 20px; }
.task-card.dragging  { opacity: 0.4; }
.task-list.drag-over { background: rgba(0,0,0,0.04); }
.task-column { background: white; border-radius: 16px; padding: 20px; box-shadow: 0 2px 12px rgba(0,0,0,0.08); }
.column-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; padding-bottom: 15px; border-bottom: 2px solid #f0f0f0; }
.column-title { font-size: 16px; font-weight: 700; color: #333; text-transform: uppercase; letter-spacing: 0.5px; }
.column-count { background: var(--accent); color: white; padding: 4px 10px; border-radius: 12px; font-size: 12px; font-weight: 700; }
.task-list { min-height: 400px; max-height: 600px; overflow-y: auto; padding-right: 5px; }
.task-list::-webkit-scrollbar       { width: 5px; }
.task-list::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 10px; }
.task-list::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 10px; }
.task-card { background: #f8f9fa; border-radius: 12px; padding: 16px; margin-bottom: 12px; cursor: grab; transition: all 0.3s ease; border: 2px solid transparent; }
.task-card:hover  { background: white; border-color: var(--accent); box-shadow: 0 4px 12px rgba(0,0,0,0.1); transform: translateY(-2px); }
.task-card:active { cursor: grabbing; }
.task-card-header { display: flex; justify-content: space-between; align-items: start; margin-bottom: 10px; }
.task-card .task-priority { width: 8px; height: 8px; aspect-ratio: 1/1; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 8px; }
.task-card .priority-high   { background: #ef4444; }
.task-card .priority-medium { background: #f59e0b; }
.task-card .priority-low    { background: #10b981; }
.task-menu { color: #999; cursor: pointer; font-size: 18px; line-height: 1; }
.task-assignee { display: flex; gap: -5px; }
.assignee-avatar { width: 24px; height: 24px; border-radius: 50%; background: linear-gradient(135deg, var(--accent) 0%, #ff8e8e 100%); border: 2px solid white; display: flex; align-items: center; justify-content: center; font-size: 10px; color: white; font-weight: 600; margin-left: -5px; }
.assignee-avatar:first-child { margin-left: 0; }
.tasks-sidebar  { display: flex; flex-direction: column; gap: 20px; }
.sidebar-card   { background: white; border-radius: 16px; padding: 20px; box-shadow: 0 2px 12px rgba(0,0,0,0.08); }
.sidebar-header { font-size: 18px; font-weight: 600; color: #333; margin-bottom: 15px; padding-bottom: 12px; border-bottom: 2px solid #f0f0f0; }
.mini-calendar  { text-align: center; }
.calendar-month { font-size: 14px; font-weight: 600; color: #666; margin-bottom: 15px; }
.calendar-grid  { display: grid; grid-template-columns: repeat(7,1fr); gap: 8px; }
.calendar-day   { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; font-size: 12px; color: #666; border-radius: 8px; cursor: pointer; transition: all 0.2s ease; }
.calendar-day:hover   { background: #f0f0f0; }
.calendar-day.today   { background: var(--accent); color: white; font-weight: 700; }
.calendar-day.has-tasks { position: relative; }
.calendar-day.has-tasks::after { content: ''; width: 4px; height: 4px; background: var(--accent); border-radius: 50%; position: absolute; bottom: 2px; }
.activity-item { display: flex; gap: 12px; margin-bottom: 15px; padding-bottom: 15px; border-bottom: 1px solid #f0f0f0; }
.activity-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.activity-icon    { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,107,107,0.1); display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.activity-content { flex: 1; }
.activity-title   { font-size: 13px; color: #333; font-weight: 500; margin-bottom: 3px; }
.activity-time    { font-size: 11px; color: #999; }
.team-member  { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.member-avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, var(--accent) 0%, #ff8e8e 100%); display: flex; align-items: center; justify-content: center; font-size: 16px; color: white; font-weight: 600; }
.member-info  { flex: 1; }
.member-name  { font-size: 14px; font-weight: 600; color: #333; margin-bottom: 2px; }
.member-tasks { font-size: 12px; color: #666; }
.member-status { width: 10px; height: 10px; border-radius: 50%; background: #10b981; }

@media (max-width: 1200px) {
    .tasks-main    { grid-template-columns: 1fr; }
    .tasks-sidebar { grid-template-columns: repeat(auto-fit, minmax(280px,1fr)); flex-direction: row; }
}
@media (max-width: 768px) {
    .tasks-container { padding: 20px; }
    .page-header     { flex-direction: column; align-items: flex-start; }
    .header-actions  { width: 100%; }
    .btn-primary-custom, .btn-secondary-custom { flex: 1; }
    .task-board      { grid-template-columns: 1fr; }
    .tasks-sidebar   { grid-template-columns: 1fr; flex-direction: column; }
}

/* ============================================================
   PROJECTS PAGE
============================================================ */
.projects-container { padding: 30px; }
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; flex-wrap: wrap; gap: 20px; }
.page-title-section h1 { font-size: 32px; font-weight: 700; color: #333; margin-bottom: 5px; }
.page-title-section p  { color: #666; font-size: 15px; }
.header-actions { display: flex; gap: 12px; }
.filter-section { background: white; padding: 20px 25px; border-radius: 16px; box-shadow: 0 2px 12px rgba(0,0,0,0.08); margin-bottom: 30px; display: flex; gap: 15px; align-items: center; flex-wrap: wrap;z-index: 0; }
.filter-tabs { display: flex; gap: 10px; flex-wrap: wrap; }
.filter-tab { padding: 10px 20px; border: 2px solid #e0e0e0; background: white; color: #666; border-radius: 8px; cursor: pointer; transition: all 0.3s ease; font-size: 14px; font-weight: 500; }
.filter-tab:hover, .filter-tab.active { background: var(--accent); color: white; border-color: var(--accent); }
.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(350px,1fr)); gap: 25px; margin-bottom: 30px; }
.project-card { padding: 0 0 10px 0; background: white; border-radius: 16px; overflow: hidden; box-shadow: 0 2px 12px rgba(0,0,0,0.08); transition: all 0.3s ease; cursor: pointer; }
.project-card:hover { transform: translateY(-8px); box-shadow: 0 12px 28px rgba(0,0,0,0.15); }
.project-header { padding: 20px; background: linear-gradient(135deg,#667eea 0%,#764ba2 100%); color: white; position: relative; }
.project-card:nth-child(2) .project-header { background: linear-gradient(135deg,#f093fb 0%,#f5576c 100%); }
.project-card:nth-child(3) .project-header { background: linear-gradient(135deg,#4facfe 0%,#00f2fe 100%); }
.project-card:nth-child(4) .project-header { background: linear-gradient(135deg,#43e97b 0%,#38f9d7 100%); }
.project-card:nth-child(5) .project-header { background: linear-gradient(135deg,#fa709a 0%,#fee140 100%); }
.project-card:nth-child(6) .project-header { background: linear-gradient(135deg,#30cfd0 0%,#330867 100%); }
.project-status-badge { position: absolute; top: 15px; right: 15px; padding: 6px 14px; border-radius: 20px; font-size: 11px; font-weight: 700; text-transform: uppercase; background: rgba(255,255,255,0.3); backdrop-filter: blur(10px); }
.project-name { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.project-client { font-size: 13px; opacity: 0.9; }
.project-body { padding: 20px; }
.project-description { font-size: 14px; color: #666; line-height: 1.6; margin-bottom: 20px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.project-progress  { margin-bottom: 20px; }
.progress-header   { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.progress-label    { font-size: 13px; color: #666; font-weight: 600; }
.progress-percentage { font-size: 13px; color: var(--accent); font-weight: 700; }
.progress-bar-custom { width: 100%; height: 8px; background: #f0f0f0; border-radius: 10px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--accent); border-radius: 10px; transition: width 0.3s ease; }
.project-meta { display: flex; justify-content: space-between; align-items: center; padding-top: 15px; border-top: 1px solid #f0f0f0; }
.project-deadline { font-size: 13px; color: #666; }
.project-team { display: flex; gap: -8px; }
.team-avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg,#667eea 0%,#764ba2 100%); border: 2px solid white; display: flex; align-items: center; justify-content: center; font-size: 12px; color: white; font-weight: 600; margin-left: -8px; }
.team-avatar:first-child  { margin-left: 0; }
.team-avatar:nth-child(2) { background: linear-gradient(135deg,#f093fb 0%,#f5576c 100%); }
.team-avatar:nth-child(3) { background: linear-gradient(135deg,#4facfe 0%,#00f2fe 100%); }
.empty-state { text-align: center; padding: 80px 20px; background: white; border-radius: 16px; box-shadow: 0 2px 12px rgba(0,0,0,0.08); }
.empty-state-icon { font-size: 64px; margin-bottom: 20px; opacity: 0.3; }
.empty-state h3   { font-size: 24px; color: #333; margin-bottom: 10px; }
.empty-state p    { color: #666; margin-bottom: 30px; }
@media (max-width: 768px) {
    .projects-container { padding: 20px; }
    .page-header { flex-direction: column; align-items: flex-start; }
    .header-actions { width: 100%; }
    .btn-primary-custom, .btn-secondary-custom { flex: 1; }
    .projects-grid { grid-template-columns: 1fr; }
    .filter-section { flex-direction: column; align-items: stretch; }
    .search-box { width: 100%; }
    .filter-tabs { width: 100%; }
    .filter-tab  { flex: 1; text-align: center; }
}

/* ============================================================
   PROJECT FORM (ADD/EDIT)
============================================================ */
.mp-tabs-container { background: white; border-radius: var(--radius-lg); box-shadow: var(--shadow); border: 1px solid var(--gray-200); overflow: hidden; margin-bottom: 24px; }
.mp-tab-buttons { display: flex; border-bottom: 1px solid var(--gray-200); background: var(--gray-50); overflow-x: auto; scrollbar-width: none; }
.mp-tab-buttons::-webkit-scrollbar { display: none; }
.mp-tab-buttons button { padding: 16px 32px; background: none; border: none; color: var(--gray-600); font-size: 14px; font-weight: 600; cursor: pointer; border-bottom: 3px solid transparent; transition: all 0.2s; white-space: nowrap; }
.mp-tab-buttons button:hover  { color: var(--primary); background: white; }
.mp-tab-buttons button.active { color: var(--primary); border-bottom-color: var(--accent); background: white; }
.mp-tab-buttons button .mp-tab-icon { margin-right: 8px; font-size: 16px; }
.form-container { background: white; border-radius: var(--radius-lg); box-shadow: var(--shadow); border: 1px solid var(--gray-200); padding: 32px; margin-bottom: 32px; }
.form-actions { display: flex; gap: 12px; justify-content: flex-end; align-items: center; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--gray-200); }
.tab        { display: none; }
.tab.active { display: block; animation: tabFadeIn 0.3s; }
@keyframes tabFadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.tab h3 { font-size: 20px; font-weight: 700; color: var(--dark); margin-bottom: 24px; padding-bottom: 12px; border-bottom: 2px solid var(--gray-200); }
.form-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 20px; margin-bottom: 20px; }
.form-grid.single { grid-template-columns: 1fr; }
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-group label { font-size: 14px; font-weight: 600; color: var(--dark); display: flex; align-items: center; gap: 6px; }
.form-group label .required { color: var(--danger); }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 12px 16px; border: 1px solid var(--gray-300); border-radius: var(--radius); font-size: 14px; font-family: inherit; transition: all 0.2s; background: white; }
.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(2,68,66,0.1); }
.form-group textarea { min-height: 100px; resize: vertical; }
.form-group input[type="file"] { padding: 10px; background: var(--gray-50); cursor: pointer; }
.upload-area { border: 2px dashed var(--gray-300); border-radius: var(--radius-lg); padding: 32px; text-align: center; background: var(--gray-50); transition: all 0.2s; cursor: pointer; }
.upload-area:hover { border-color: var(--primary); background: var(--light); }
.upload-area .upload-icon { font-size: 48px; margin-bottom: 12px; opacity: 0.5; }
.upload-area .upload-text { color: var(--gray-600); font-size: 14px; }
.content-grid { display: grid; grid-template-columns: 1fr 380px; gap: 24px; }
.main-content { display: flex; flex-direction: column; gap: 24px; }
.sidebar { display: flex; flex-direction: column; gap: 24px; }
.card { background: white; border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow); border: 1px solid var(--gray-200); }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--gray-200); }
.card-title  { font-size: 18px; font-weight: 700; color: var(--dark); display: flex; align-items: center; gap: 8px; }
.card-action { background: none; border: none; color: var(--gray-500); cursor: pointer; padding: 6px; border-radius: var(--radius-sm); transition: all 0.2s; font-size: 18px; }
.card-action:hover { background: var(--gray-100); color: var(--gray-700); }
.description-text { color: var(--gray-700); line-height: 1.7; font-size: 15px; }
.empty-icon { font-size: 48px; opacity: 0.5; margin-bottom: 12px; }
.team-list  { display: flex; flex-direction: column; gap: 12px; }
.team-info  { flex: 1; }
.team-name  { font-weight: 600; color: var(--dark); font-size: 14px; }
.team-role  { font-size: 13px; color: var(--gray-600); }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px,1fr)); gap: 12px; }
.gallery-item { aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; background: var(--gray-100); position: relative; cursor: pointer; transition: all 0.2s; }
.gallery-item:hover { transform: scale(1.05); box-shadow: var(--shadow-md); }
.gallery-item img   { width: 100%; height: 100%; object-fit: cover; }
.file-list  { display: flex; flex-direction: column; gap: 8px; }
.file-item  { display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--gray-50); border-radius: var(--radius); transition: all 0.2s; }
.file-item:hover { background: var(--light); }
.file-icon  { width: 40px; height: 40px; background: var(--primary); color: white; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.file-info  { flex: 1; min-width: 0; }
.file-name  { font-weight: 600; color: var(--dark); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-meta  { font-size: 12px; color: var(--gray-600); }
.file-download { background: none; border: none; color: var(--primary); cursor: pointer; padding: 8px; border-radius: var(--radius-sm); transition: all 0.2s; font-size: 18px; }
.file-download:hover { background: var(--light); }
.progress-section { margin-top: 12px; }
.progress-percent { font-size: 14px; font-weight: 700; color: var(--primary); }
.progress-bar { width: 100%; height: 8px; background: var(--gray-200); border-radius: 10px; overflow: hidden; }
.timeline { display: flex; flex-direction: column; gap: 16px; }
.timeline-item { display: flex; gap: 12px; }
.timeline-dot  { width: 12px; height: 12px; background: var(--primary); border-radius: 50%; margin-top: 4px; flex-shrink: 0; }
.timeline-content { flex: 1; }
.timeline-title { font-weight: 600; color: var(--dark); font-size: 14px; margin-bottom: 2px; }
.timeline-date  { font-size: 12px; color: var(--gray-500); }
@media (max-width: 1024px) { .content-grid { grid-template-columns: 1fr; } .sidebar { order: -1; } }
@media (max-width: 768px) {
    .project-details-header { padding: 20px; }
    .header-details-top { flex-direction: column; }
    .header-content h1  { font-size: 24px; }
    .meta-grid { grid-template-columns: repeat(2,1fr); gap: 16px; }
    .gallery-grid { grid-template-columns: repeat(2,1fr); }
}

/* ============================================================
   QUILL EDITOR
============================================================ */
.ql-toolbar.ql-snow   { border: 1px solid #eee; border-radius: 8px 8px 0 0; background: #f8f9fa; }
.ql-container.ql-snow { border: 1px solid #eee; border-radius: 0 0 8px 8px; }
.ql-editor strong     { font-weight: 600; }
.ql-editor blockquote { border-left: 3px solid var(--accent); color: var(--text-secondary); font-style: italic; }
/* ============================================================
   ICON COLORS (User requested adjustments)
============================================================ */
/* Default to primary */
i.fas, i.far, i.fa {
    color: var(--primary);
}

/* Except header and sidebar */
.l-navbar i.fas, .l-navbar i.far, .l-navbar i.fa, .l-navbar i.bx,
.header i.fas, .header i.far, .header i.fa, .header i.bx,
.nav_icon, .nav_subicon, .nav_chevron {
    color: inherit;
}

/* Dark backgrounds get accent color */
.btn-primary i.fas, .btn-primary i.far, .btn-primary i.fa,
.btn-dark i.fas, .btn-dark i.far, .btn-dark i.fa,
.bg-dark i.fas, .bg-dark i.far, .bg-dark i.fa,
.bg-primary i.fas, .bg-primary i.far, .bg-primary i.fa,
.badge-dark i.fas, .badge-dark i.far, .badge-dark i.fa,
.text-white i.fas, .text-white i.far, .text-white i.fa,
.modal-header i.fas, .modal-header i.far, .modal-header i.fa,
.profile-icon i.fas, .profile-icon i.far, .profile-icon i.fa {
    color: var(--accent);
}
