/* ============================================================
   ProcurementLink App — New Design
   Based on HTML/assets/css/admin.css + dashboard.css
   ============================================================ */

:root {
    --primary-blue: #0d3b8f;
    --primary-dark: #0a2558;
    --primary-hover: #4F3CC0;
    --sidebar-bg: #ffffff;
    --sidebar-active: #0d3b8f;
    --header-bg-start: #0a2558;
    --header-bg-end: #0d6efd;
    --text-primary: rgba(32, 32, 32, 1);
    --text-secondary: rgba(102, 102, 102, 1);
    --text-main: #202020;
    --body-bg: #F0F2FA;
    --card-bg: #ffffff;
    --card-border: #e5e7eb;
    --hover-bg: #f3f4f6;
    --border-color: #C3C3C3;
    --placeholder-text: #666666;
    --green-color: #23AC86;
    --red-color: #f26464;
    --input-border: rgba(195, 195, 195, 1);
    --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,.07);
    --transition: all 0.3s ease;
}

[data-bs-theme="dark"] {
    --sidebar-bg: #0f1b2d;
    --sidebar-active: #1e5cc4;
    --primary-blue: #1e5cc4;
    --text-primary: #f0f0f0;
    --text-secondary: #a0aec0;
    --text-main: #f0f0f0;
    --body-bg: #0a1420;
    --card-bg: #1a2744;
    --card-border: #2d3f61;
    --hover-bg: #121d2f;
    --border-color: #2d3f61;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body {
    background-color: var(--body-bg);
    color: var(--text-primary);
}

a { color: inherit; text-decoration: none; transition: var(--transition); }
a:hover { color: inherit; text-decoration: none; }
ul, ol { list-style: none; margin: 0; padding: 0; }
img { max-width: 100%; }
h1,h2,h3,h4,h5,h6,p,ul,a,button { margin: 0; padding: 0; line-height: 1; font-family: 'Poppins', sans-serif; }

/* ── PAGE LAYOUT ─────────────────────────────────────────── */
.page-flex {
    display: flex;
    background-image: url(/lib/plink/images/dashboard-top-bg.png);
    background-position: top left;
    background-repeat: no-repeat;
    background-size: auto;
    min-height: 100vh;
}

/* ── SIDEBAR ─────────────────────────────────────────────── */
.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background-color: var(--sidebar-bg);
    box-shadow: 0px 3.33px 35.83px 0px rgba(0,0,0,0.1);
    max-width: 300px;
    width: 100%;
    min-height: 100vh;
    border-radius: 0 30px 30px 0;
    transition: 0.5s all;
    z-index: 100;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar::-webkit-scrollbar { width: 3px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(0,0,0,.1); border-radius: 3px; }

.sidebar-start { flex: 1; }

.sidebar-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 15px 25px 30px;
    border-bottom: 1px solid transparent;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.logo-text img { max-height: 44px; width: auto; }

.sidebar-toggle {
    background: transparent;
    border: none !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    opacity: 0.7;
    transition: opacity .2s;
}
.sidebar-toggle:hover { opacity: 1; }
.sidebar-toggle .menu-toggle-icon {
    width: 28px;
    height: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.sidebar-toggle .menu-toggle-icon span {
    display: block;
    height: 2px;
    background: var(--text-main);
    border-radius: 2px;
    transition: var(--transition);
}

.sidebar-body { padding: 20px 14px 20px 10px; }

.sidebar-body-menu { padding: 0 14px 20px 10px; }

.sidebar-body-menu li { position: relative; margin-bottom: 10px; }
.sidebar-body-menu li:last-child { margin-bottom: 0; }

.sidebar-body-menu a {
    position: relative;
    display: flex;
    padding: 12px 20px;
    gap: 0;
    align-items: center;
    font-family: 'Poppins';
    font-weight: 500;
    font-size: 16px;
    line-height: 1.2;
    text-transform: capitalize;
    color: var(--text-main);
}

.sidebar-body-menu a i { line-height: 1; font-size: 20px; }

.sidebar-body-menu a:hover,
.sidebar-body-menu a.active {
    background-color: var(--primary-blue);
    color: #fff;
    border-radius: 100px;
}

.sidebar-body-menu a > .icon { margin-right: 10px; }

/* Icon image swap on active/hover */
.sidebar-body-menu li a:hover .icon .active-img,
.sidebar-body-menu li a.active .icon .active-img,
.sidebar-body-menu li a .icon .normal-img { display: block; }
.sidebar-body-menu li a:hover .icon .normal-img,
.sidebar-body-menu li a.active .icon .normal-img,
.sidebar-body-menu li a .icon .active-img { display: none; }

.sidebar-footer { padding: 0 0 10px 0; }

.social-icons {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 15px 14px 15px 30px;
}
.social-icons a { transition: transform 0.2s ease; }
.social-icons a:hover { transform: scale(0.85); }
.social-icons img { width: 22px; height: 22px; object-fit: contain; }

/* Sidebar hidden (collapsed) */
.sidebar.hidden { max-width: 80px; }
.sidebar.hidden .sidebar-head { padding: 25px 20px; }
.sidebar.hidden .sidebar-body,
.sidebar.hidden .sidebar-body-menu { padding: 0; }
.sidebar.hidden .sidebar-body-menu a span:not(.icon) { display: none; }
.sidebar.hidden .social-icons { display: none; }
.sidebar.hidden .logo-text img { max-height: 36px; }

/* ── MAIN WRAPPER ────────────────────────────────────────── */
.main-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 0;
}

/* ── TOP NAV (blue header) ──────────────────────────────── */
.main-nav--bg {
    background-color: var(--primary-blue);
    background-image: url(/lib/plink/images/dashboard-top-bg.png);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: top center;
    padding-left: 5px;
    transition: 0.3s all;
}

.main-nav {
    padding: 20px 20px 20px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.section-title {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    flex-direction: column;
    gap: 0;
}

.main-title {
    font-weight: 600;
    font-size: 28px;
    line-height: 115%;
    color: rgba(255,255,255,1);
    margin-bottom: 0;
}

.breadcrumb_div {
    color: rgba(255,255,255,.75);
    font-size: 13px;
    line-height: 18px;
    margin-top: 4px;
}
.breadcrumb_div a { color: rgba(255,255,255,.75); }
.breadcrumb_div a:hover { color: #fff; }

.main-nav-end {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Hamburger in topnav */
.sidebar-toggle.transparent-btn {
    background: transparent;
    border: none !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
}

/* Search icon button */
.search_div {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    align-items: center;
}

.search_icon {
    background: transparent;
    color: #fff;
    cursor: pointer;
    border: 0;
    padding: 0;
    font-size: 20px;
    line-height: 1;
}

/* Theme toggle */
.icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,.15);
    color: #fff;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}
.icon-btn:hover { background: rgba(255,255,255,.25); }

/* Notification button */
.notification_icon {
    background: transparent;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    border: 1px solid #fff !important;
    padding: 4px 8px !important;
    border-radius: 6px;
    position: relative;
}
.notification_icon::after {
    content: "";
    position: absolute;
    top: -3px;
    right: -3px;
    border: 6px solid var(--red-color);
    border-radius: 50%;
}

/* User avatar in topnav */
.nav-user-img {
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    width: 38px;
    height: 38px;
    background-color: #F5EFFF;
    font-size: 15px;
    font-weight: 700;
    color: var(--primary-blue);
    cursor: pointer;
    flex-shrink: 0;
}

/* White Add Post button */
.white-circle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fff;
    height: 40px;
    border-radius: 100px;
    border-width: 0;
    font-family: 'Poppins';
    font-weight: 500;
    font-size: 14px;
    color: var(--primary-blue);
    padding: 8px 22px;
    white-space: nowrap;
}
.white-circle-btn:hover { color: #fff; background-color: var(--text-main); }

/* Tab pills in header */
.tab-pills-header {
    display: flex;
    gap: 6px;
    align-items: center;
}
.tab-pills-header .hfpill {
    padding: 5px 14px;
    border-radius: 100px;
    border: 1.5px solid rgba(255,255,255,.5);
    background: transparent;
    color: rgba(255,255,255,.8);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
}
.tab-pills-header .hfpill.on,
.tab-pills-header .hfpill:hover {
    background: #fff;
    color: var(--primary-blue);
    border-color: #fff;
}

/* Search overlay */
.search-box-wrapper {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    text-align: center;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.88);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.3s ease;
}
.search-box-wrapper.active { opacity: 1; visibility: visible; pointer-events: auto; }
.search-close {
    position: absolute;
    top: 40px;
    right: 50px;
    color: #fff;
    font-size: 36px;
    cursor: pointer;
}
.search_box {
    padding: 14px 50px 14px 20px !important;
    background: #fff;
    color: #000;
    width: 500px !important;
    font-size: 20px !important;
    border-radius: 50px;
    border: none;
    outline: none;
}
.search_btn {
    border: 0;
    background: transparent;
    color: #000;
    padding: 5px 16px;
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    font-size: 18px;
}

/* ── MAIN CONTENT AREA ─────────────────────────────────── */
.main.page-wrapper {
    padding: 20px 24px 40px;
    min-height: calc(100vh - 80px);
    background-color: var(--body-bg);
}

/* Negative top margin to pull content under blue header */
.dashboard_top {
    margin-top: -60px;
    margin-bottom: 24px;
}

/* ── NOTIFICATION DROPDOWN ─────────────────────────────── */
.notification-item-dropdown {
    right: 0;
    top: 50px;
    width: 300px !important;
    max-height: 500px;
    overflow: auto;
    position: absolute;
    padding: 5px 10px;
    background-color: var(--card-bg);
    box-shadow: 0px -2px 24px rgba(160,163,189,.25);
    border-radius: 4px;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s all;
    z-index: 99;
}
.notification-item-dropdown.active { opacity: 1; visibility: visible; }
.notification-item-dropdown li {
    padding: 0 0 10px 0;
    margin: 10px 5px;
    border-bottom: 1px solid #EEEEEE;
}
.notification-item-dropdown li:last-child { border-bottom: 0; }
.notification-item-dropdown a { line-height: 1.3; border: 0; font-size: 13px; color: var(--text-main); }
.notification-item-dropdown li.not_seen a { font-weight: 600; }
.notification-item-dropdown li.seen a { font-weight: 400; opacity: .7; }
.nav-user-wrapper { position: relative; }

/* ── STAT CARDS ─────────────────────────────────────────── */
.stat-cards-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
    gap: 10px;
    background-color: rgba(219,232,253,.4);
    border-radius: 20px;
    height: 100%;
}
.stat-cards .col:nth-child(2n) .stat-cards-item { background-color: rgba(233,247,243,1); }
.stat-cards .col:nth-child(3n) .stat-cards-item { background-color: rgba(237,235,249,.6); }
.stat-cards .col:nth-child(4n) .stat-cards-item { background-color: rgba(244,238,253,.6); }

.stat-card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; width: 100%; }
.stat-value { display: flex; justify-content: flex-start; align-items: center; gap: 10px; width: 100%; margin-bottom: 7px; }
.stat-value h4 { font-weight: 600; font-size: 32px; line-height: 100%; color: rgba(31,45,58,1); }
.stat-cards-info__title { font-weight: 400; font-size: 12px; color: var(--text-secondary); }
.stat-cards-info__profit {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,1);
    border: 0.5px solid rgba(59,153,0,.6);
    padding: 3px 6px;
    border-radius: 100px;
    font-weight: 500;
    font-size: 12px;
    color: rgba(59,153,0,1);
}

/* ── POST CARDS ─────────────────────────────────────────── */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}

.post-card {
    background: var(--card-bg);
    border-radius: 16px;
    border: 1px solid var(--card-border);
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    padding: 16px;
}
.post-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.post-header {
    display: flex;
    gap: 10px;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 14px;
}
.post-header-inner { display: flex; gap: 12px; justify-content: flex-start; width: 100%; align-items: center; }

.avatar-img {
    width: 56px;
    height: 56px;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    flex-shrink: 0;
}
.avatar-img img { width: 100%; height: 100%; object-fit: cover; }

.post-header h4 { margin: 0 0 4px 0; font-size: 16px; line-height: 120%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.post-header span { font-size: 13px; color: var(--text-secondary); }
.post-content { margin: 8px 0; font-size: 14px; }
.post-content h3 { font-size: 15px; line-height: 120%; margin-bottom: 6px; }
.post-content p {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-secondary);
}
.post-content p.expanded { display: block; -webkit-line-clamp: unset; overflow: visible; }
.post-image img { border-radius: 10px; max-width: 100%; object-fit: cover; width: 100%; }
.post-actions { display: flex; justify-content: space-between; margin-top: 10px; }
.post-actions button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    padding: 6px 10px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.post-actions button:hover { background: var(--hover-bg); color: var(--primary-blue); }

/* ── DIRECTORY CARDS ────────────────────────────────────── */
.dir-card {
    background: var(--card-bg);
    border-radius: 16px;
    border: 1px solid var(--card-border);
    padding: 20px;
    transition: var(--transition);
    cursor: pointer;
}
.dir-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* ── REQUEST CARDS ──────────────────────────────────────── */
.req-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }

/* ── FORMS ──────────────────────────────────────────────── */
.form-page { max-width: 900px; }
.form-sec { margin-bottom: 24px; background: var(--card-bg); border-radius: 16px; border: 1px solid var(--card-border); padding: 24px; }
.form-sec-title { font-size: 16px; font-weight: 700; color: var(--text-primary); margin-bottom: 6px; text-transform: uppercase; }
.form-sec-sub { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 6px; width: 100%; }

/* Inputs matching new design - rounded pill style */
input[type="text"],
input[type="email"],
input[type="number"],
input[type="tel"],
input[type="password"],
input[type="url"],
input[type="date"],
select, .form-ctrl, .form-select {
    width: 100%;
    padding: 10px 16px;
    margin-bottom: 0;
    border: 1px solid var(--border-color);
    border-radius: 30px;
    font-size: 14px;
    box-sizing: border-box;
    background: var(--card-bg);
    color: var(--text-primary);
    font-family: 'Poppins', sans-serif;
    outline: none;
    transition: border-color .2s;
}
input:focus, select:focus, .form-ctrl:focus, .form-select:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(13,59,143,.08);
}
textarea, .form-textarea {
    width: 100%;
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 14px;
    resize: vertical;
    min-height: 80px;
    background: var(--card-bg);
    color: var(--text-primary);
    font-family: 'Poppins', sans-serif;
    outline: none;
}

/* ── BUTTONS ────────────────────────────────────────────── */
button { cursor: pointer; transition: 0.3s all; border: 2px solid transparent; font-family: 'Poppins', sans-serif; }

.btn {
    padding: 10px 22px;
    border-radius: 50px;
    cursor: pointer;
    border: none;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-align: center;
    line-height: 120%;
    transition: var(--transition);
}
.btn-primary-new, .btn.btn-primary-new {
    background: var(--primary-blue);
    color: #fff;
    padding: 12px 28px;
    border-radius: 50px;
}
.btn-primary-new:hover { background: var(--text-main); color: #fff; }
.btn-outline-new, .btn.btn-outline-new {
    border: 1.5px solid var(--text-main);
    background: transparent;
    color: var(--text-main);
    padding: 12px 28px;
    border-radius: 50px;
}
.btn-outline-new:hover { background: var(--primary-blue); border-color: var(--primary-blue); color: #fff; }

/* Keep old btn classes working */
.btn-primary { background: var(--primary-blue); color: #fff; border-radius: 50px; }
.btn-primary:hover { background: var(--text-main); color: #fff; }
.btn-outline { border: 1px solid var(--text-main); background: #fff; color: var(--text-main); border-radius: 50px; }
.btn-outline:hover { background: var(--primary-blue); border-color: var(--primary-blue); color: #fff; }
.btn-sm { padding: 6px 14px !important; font-size: 12px !important; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* Upcomming button */
.upcomming-btn {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-dark));
    color: #fff;
    border-radius: 50px;
    border: none;
    padding: 12px 28px;
}
.upcomming-btn:hover { background: var(--text-main); color: #fff; }

/* ── PAGINATION ─────────────────────────────────────────── */
.pagination-container { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 16px 0; flex-wrap: wrap; margin: 20px 0; }
.page-link {
    display: flex; align-items: center; justify-content: center;
    min-width: 34px; height: 34px; padding: 0 10px;
    font-size: 13px; font-weight: 500;
    color: var(--text-main); border: 1px solid #e0e0e0;
    border-radius: 6px; background: var(--card-bg); transition: var(--transition);
}
.page-link:hover, .page-link.active { background: var(--primary-blue); color: #fff; border-color: var(--primary-blue); }
.page-link.disabled { opacity: .5; pointer-events: none; }

/* ── BADGES ─────────────────────────────────────────────── */
.badge-active   { color: #5887ff; background: rgba(88,135,255,.1); padding: 2px 10px; border-radius: 100px; font-size: 12px; }
.badge-pending  { color: #ffb648; background: rgba(255,172,50,.1); padding: 2px 10px; border-radius: 100px; font-size: 12px; }
.badge-trashed  { color: var(--red-color); background: rgba(242,100,100,.1); padding: 2px 10px; border-radius: 100px; font-size: 12px; }
.badge-success  { color: #4bde97; background: rgba(75,222,151,.1); padding: 2px 10px; border-radius: 100px; font-size: 12px; }

/* ── MESSAGE / CHAT ─────────────────────────────────────── */
.msg-layout { display: flex; gap: 0; height: calc(100vh - 140px); }
.msg-sidebar { width: 320px; flex-shrink: 0; border-right: 1px solid var(--card-border); overflow-y: auto; background: var(--card-bg); }
.msg-body { flex: 1; display: flex; flex-direction: column; background: #FAFAFA; }

.message_chat_lists { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 12px; }
.message_chat_list {
    background: var(--card-bg); border-bottom: 1px solid var(--card-border);
    padding: 14px 16px; display: flex; justify-content: space-between;
    align-items: center; gap: 10px; cursor: pointer; opacity: .8;
}
.message_chat_list:hover, .message_chat_list.active { background: var(--hover-bg); opacity: 1; }
.message_chat_list.not_seen { opacity: 1; }
.msg_list_title h4 { color: var(--text-main); font-size: 16px; line-height: 20px; margin-bottom: 3px; }
.msg_list_title span { font-size: 13px; color: var(--text-secondary); }

.chat-wrapper { height: 100%; display: flex; flex-direction: column; }
.chat-body { flex: 1; padding: 16px; overflow-y: auto; background: #FAFAFA; }
.chat_text_message p {
    color: #555;
    font-size: 15px; line-height: 135%;
    background: #F2F2F2; padding: 10px 14px;
    border-radius: 0 14px 14px 14px; margin-bottom: 6px;
    display: inline-block; max-width: 85%;
}
.chat_text_message.outgoing p {
    background: var(--primary-blue); color: #fff;
    border-radius: 14px 0 14px 14px;
}
.chat-input {
    flex-shrink: 0; display: flex; align-items: center;
    padding: 12px 16px; border-top: 1px solid var(--card-border);
    gap: 8px; background: var(--card-bg);
}
.chat-input textarea {
    flex: 1; border: none; outline: none;
    padding: 8px 12px; font-size: 15px;
    border-radius: 10px; background: #F3F6F6;
    margin: 0; height: 42px; min-height: 42px; max-height: 42px; resize: none;
}
.chat-input .send {
    background: var(--text-main); color: #fff;
    width: 38px; height: 38px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; flex-shrink: 0;
}
.chat-input .send:hover { background: var(--primary-blue); }

/* ── TASK BOX / TABLE ───────────────────────────────────── */
.task-box { border: 1px solid var(--border-color); padding: 20px; border-radius: 20px; background: var(--card-bg); }
.task-top-box { display: flex; justify-content: space-between; align-items: center; gap: 1rem; width: 100%; margin-bottom: 16px; }
.task-top-box h4 { font-weight: 500; font-size: 20px; color: var(--text-primary); }

.task-table-list { margin: 0 !important; background-color: var(--card-bg); border-radius: 12px; width: 100%; }
.task-table-list thead { background-color: rgba(244,245,254,1); }
.task-table-list tr th { font-weight: 500; font-size: 14px; text-transform: capitalize; color: var(--text-primary); background: rgba(244,245,254,1); padding: 10px 16px; }
.task-table-list tr td { font-weight: 400; font-size: 14px; color: var(--text-secondary); padding: 12px 16px; border-top: 1px solid var(--card-border); }

/* ── SERVICE CARDS ──────────────────────────────────────── */
.service_card { border: 1px solid #E6E6E6; border-radius: 14px; padding: 12px; padding-bottom: 16px; position: relative; height: 100%; background: var(--card-bg); }
.service_card img { width: 100%; max-width: 100%; border-radius: 10px; margin-bottom: 10px; }
.service_card_title { font-size: 16px; line-height: 120%; color: var(--text-primary); margin: 0 0 8px 0; }
.service_card_title a { color: var(--text-primary); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis; text-transform: capitalize; }
.service_card_title a:hover { color: var(--primary-blue); }
.service_card_tag { font-size: 13px; color: var(--text-secondary); display: block; margin-bottom: 8px; }
.service_card_map { font-size: 13px; color: var(--text-secondary); margin-bottom: 8px; display: block; }

/* ── PROFILE ────────────────────────────────────────────── */
.profile_details_top { margin-bottom: 24px; display: flex; gap: 28px; border-bottom: 1px solid var(--border-color); padding-bottom: 28px; flex-wrap: wrap; }
.profile_main_image { width: 280px; position: relative; flex-shrink: 0; }
.profile_main_image img { border-radius: 12px; width: 100%; }
.profile_details_section { flex: 1; min-width: 0; }

/* ── DASHBOARD CARDS ────────────────────────────────────── */
.dashboard_report_card {
    background: var(--card-bg); padding: 16px; border: 1px solid var(--card-border);
    border-radius: 14px; display: flex; justify-content: space-between; gap: 14px; align-items: center;
}
.dashboard_service_card {
    border-radius: 12px;
    background: #F2F9FA;
    padding: 12px 14px;
    display: grid;
    gap: 0;
    border: 1px solid #F2F9FA;
    transition: var(--transition);
}
a.dashboard_service_card:hover { border-color: #d7dcdd; }
.dashboard_service_card h5 { margin: 8px 0 0; font-size: 18px; line-height: 130%; color: var(--text-primary); }

/* ── DARK MODE OVERRIDES ─────────────────────────────────── */
[data-bs-theme="dark"] .sidebar { background-color: #0f1b2d; }
[data-bs-theme="dark"] .main.page-wrapper { background-color: #0a1420; }
[data-bs-theme="dark"] .post-card, [data-bs-theme="dark"] .task-box,
[data-bs-theme="dark"] .service_card, [data-bs-theme="dark"] .dir-card { background: var(--card-bg); border-color: var(--card-border); }
[data-bs-theme="dark"] input, [data-bs-theme="dark"] select, [data-bs-theme="dark"] textarea,
[data-bs-theme="dark"] .form-ctrl { background: #121d2f; color: #f0f0f0; border-color: var(--card-border); }
[data-bs-theme="dark"] .task-table-list thead, [data-bs-theme="dark"] .task-table-list tr th { background: #1a2744; }
[data-bs-theme="dark"] .task-table-list tr td { border-color: var(--card-border); color: #a0aec0; }
[data-bs-theme="dark"] .notification-item-dropdown { background: #1a2744; }
[data-bs-theme="dark"] .chat_text_message p { background: #1a2744; color: #f0f0f0; }
[data-bs-theme="dark"] .chat-input { background: #0f1b2d; border-color: var(--card-border); }
[data-bs-theme="dark"] .chat-input textarea { background: #1a2744; }
[data-bs-theme="dark"] .stat-cards-item { background: #1a2744; }
[data-bs-theme="dark"] .stat-value h4 { color: #f0f0f0; }
[data-bs-theme="dark"] .msg-sidebar { background: #0f1b2d; border-color: var(--card-border); }
[data-bs-theme="dark"] .message_chat_list { background: #0f1b2d; border-color: var(--card-border); }
[data-bs-theme="dark"] .message_chat_list:hover { background: #1a2744; }

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 1199px) {
    .sidebar { max-width: 250px; }
}

@media (max-width: 992px) {
    .sidebar {
        position: fixed;
        left: -320px;
        z-index: 200;
        height: 100%;
        overflow-y: auto;
    }
    .sidebar.show { left: 0; }
    .page-overlay { display: block !important; }
    .main-wrapper { margin-left: 0; }
    .form-row-3 { grid-template-columns: 1fr; }
    .posts-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .main-title { font-size: 20px; }
    .main.page-wrapper { padding: 12px 14px 30px; }
    .msg-layout { flex-direction: column; height: auto; }
    .msg-sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--card-border); max-height: 300px; }
    .profile_details_top { flex-direction: column; }
    .profile_main_image { width: 100%; }
}

/* Page overlay for mobile sidebar */
.page-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 150;
}

/* ── Override old app layout classes ────────────────────────
   Old layout used .app-header/.app-sidebar/.app-main.
   New layout uses .page-flex/.sidebar/.main-wrapper.
   These overrides prevent old CSS from conflicting.
   ─────────────────────────────────────────────────────────── */
.app-header { display: none !important; }
.app-sidebar { display: none !important; }
.app-main {
    margin-left: 0 !important;
    margin-top: 0 !important;
    padding: 0 !important;
}

/* Old auth-header conflicts */
.auth-header {
    position: relative !important;
    height: auto !important;
}

/* Make sure .msg-layout works in new layout */
.main.page-wrapper .msg-layout {
    height: calc(100vh - 160px);
    margin: 0 -24px;
}

/* Old inline grids keep working */
.main.page-wrapper #feedGrid { display: grid !important; }
