body {
    background: #f3f6fb;
    font-family: 'Segoe UI', sans-serif;
}

/* HEADER */
.header-logo { height: 60px; }
.org-name { font-size: 22px; font-weight: 700; }
.org-subtitle { color: #6c757d; }
.header-accent {
    height: 4px;
    width: 120px;
    margin: 10px auto 0;
    background: linear-gradient(to right, #198754, #d4af37);
}

/* CARDS */
.stat-card {
    position: relative;
    background: #fff; /* 🔥 light gray (not white) */
    border-radius: 14px;
    padding: 16px 18px;

    display: flex;
    align-items: center;

    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
}

/* LEFT ACCENT BAR */
.card-accent {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    border-radius: 4px;
}

/* PROJECTS COLOR */
.stat-card.projects .card-accent {
    background: #3b82f6;
}

/* BUDGET COLOR */
.stat-card.budget .card-accent {
    background: #22c55e;
}

.stat-card-body {
    display: flex;
    align-items: center;
    gap: 14px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #f1f5f9;
    font-size: 20px;
}

/* ICON COLORS */
.stat-card.projects .stat-icon {
    background: rgba(59,130,246,0.1);
}

.stat-card.budget .stat-icon {
    background: rgba(34,197,94,0.1);
}

/* TEXT */
.stat-label {
    font-size: 13px;
    color: #64748b;
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
    margin-top: 2px;
}

.stat-border {
    height: 3px;
    margin-top: 10px;
    background: linear-gradient(to right, #198754, #d4af37);
}

/* FILTERS */
.filters-bar {
    background: #fff;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.04);
}

/* BUTTON */
.btn-reset {
    background: #3b82f6;
    color: #fff;
    border: none;

    height: 42px;
    border-radius: 10px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0 16px; /* remove vertical padding */
}

/* TABLE */
.table-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 12px;

    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

#projects-table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
}

#projects-table thead {
    background: #f1f5f9;
}

#projects-table thead th {
    font-size: 14px;
    font-weight: 600;
    color: #334155;

    padding: 14px 12px;
    border: none;
}

#projects-table tbody tr:nth-child(even) {
    background: #f9fafb;
}

#projects-table tbody tr {
    background: #ffffff;
    transition: all 0.2s ease;
}

#projects-table tbody td {
    padding: 14px 12px;
    border-top: 1px solid #f1f5f9;
}

#projects-table tbody tr:hover {
    background: #f1f5f9;
}

#projects-table thead th:first-child {
    border-top-left-radius: 12px;
}

#projects-table thead th:last-child {
    border-top-right-radius: 12px;
}

.dataTables_paginate {
    margin-top: 15px;
    display: flex;
    justify-content: flex-end;
}

.dataTables_paginate .paginate_button {
    border: none !important;
    background: #f1f5f9 !important;
    color: #334155 !important;

    border-radius: 8px;
    padding: 3px 12px!important;
    margin: 0 2px;
}

.dataTables_paginate .paginate_button.current {
    background: #3b82f6 !important;
    color: #fff !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current, .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    color: #fff !important;
}

.dataTables_paginate .paginate_button:hover {
    background: #e2e8f0 !important;
}

.dataTables_wrapper .dataTables_info {
    font-size: 13px;
    color: #64748b;
    margin-top: 10px;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    display: none; /* 🔥 remove clutter */
}

/* BADGES */
.badge {
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 12px;
}
.badge-active { background: #198754; color: #fff; }
.badge-completed { background: #3b82f6; color: #fff; }
.badge-planned { background: #facc15; color: #000; }
.badge-default { background: #e5e7eb; }

/*Header*/
/* OUTER WRAPPER */
.header-outer {
    position: relative;
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}

/* BASE (LEFT + RIGHT ONLY) */
.header-base {
    width: 100%;
    max-width: 1100px;

    height: 60px; /* 👈 SHORT height */
    background: #ffffff;
    border-radius: 16px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 20px;

    box-shadow: 0 6px 16px rgba(0,0,0,0.06);
}

/* CENTER FLOATING BLOCK */
.header-center-box {
    position: absolute;

    top: 0; /* aligns with base */
    transform: translateY(10%); /* pushes it DOWN */

    background: #ffffff;
    border-radius: 16px;

    width: auto;
    padding: 10px 24px;

    display: flex;
    align-items: center;
    gap: 12px;
}

/* optional: slight top blend */
.header-center-box::before {
    content: "";
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    height: 10px;
    background: #ffffff;
}

/* LOGO */
.header-logo {
    height: 45px;
}

/* TEXT */
.header-title {
    font-weight: 700;
    font-size: 18px;
}

.header-subtitle {
    font-size: 16px;
    font-weight: 600;
    color: #6c757d;
}

.icon-circle {
    width: 36px;
    height: 36px;
    background: #f1f5f9;
    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-circle {
    width: 36px;
    height: 36px;
    background: #3b82f6;
    color: #fff;
    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;
}

/*Select2 Height*/
.select2-container .select2-choice {
    height: 42px !important;
    line-height: 42px !important;

    border-radius: 12px !important;
    border: 1px solid #e5e7eb !important;

    background: #f8fafc !important; /* 🔥 soft modern bg */
    padding: 0 14px !important;

    font-size: 14px;
    color: #374151;

    box-shadow: inset 0 1px 2px rgba(0,0,0,0.03);
    transition: all 0.2s ease;
}

.select2-container .select2-choice:hover {
    background: #f1f5f9 !important;
}

.select2-container-active .select2-choice {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}

.select2-container .select2-choice .select2-arrow b {
    display: none !important;
}

/*custom arrow*/
.select2-container .select2-choice .select2-arrow::after {
    content: '';
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #64748b;

    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/*arrow container*/
.select2-container .select2-choice .select2-arrow {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 25px;

    pointer-events: none; /* avoids weird clicks */
}

.select2-drop {
    border-radius: 12px !important;
    border: 1px solid #e5e7eb !important;

    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    background: #ffffff !important;
}

.select2-results li {
    padding: 8px 12px;
    font-size: 14px;
}

.select2-results li.select2-highlighted {
    background: #f1f5f9 !important;
    color: #111827;
}

.filters-bar .row > div {
    display: block;
}

.btn-reset {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    box-shadow: 0 4px 10px rgba(59,130,246,0.2);
}

.select-with-icon {
    position: relative;
}

.select-with-icon .select-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: #64748b;
    z-index: 2;
}

/* push text right */
.select-with-icon .select2-container .select2-choice {
    padding-left: 36px !important;
}

/*Force full width*/
.select2-container {
    width: 100% !important;
}

/*Rotate arrow when dropdwon opens*/
.select2-dropdown-open .select2-choice .select2-arrow::after {
    transform: translate(-50%, -50%) rotate(180deg);
}

/*Add smooth animation*/
.select2-container .select2-choice .select2-arrow::after {
    transition: transform 0.2s ease;
}

/*Project View + Drawer*/
/* STICKY BAR */
.comment-action-bar {
    position: sticky;
    top: 10px;
    z-index: 10;
    background: #fff;
    padding: 10px;
    border-radius: 10px;
}

/* FLOATING BUTTON (MOBILE) */
.floating-comment-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #3b82f6;
    color: #fff;
    border-radius: 50px;
    padding: 12px 18px;
    display: none;
}

/* DRAWER */
#comment-drawer {
    position: fixed;
    top: 0;
    right: -400px;
    width: 380px;
    height: 100vh;

    background: #fff;
    box-shadow: -12px 0 40px rgba(0,0,0,0.12);

    display: flex;
    flex-direction: column; /* 🔥 IMPORTANT */

    z-index: 999;
    transition: right 0.3s ease;
}

/* SCROLLABLE AREA */
.drawer-body {
    flex: 1;
    overflow-y: auto;

    padding: 0 18px 18px 18px;
}

#comment-drawer.open {
    right: 0;
}

/* OVERLAY */
#drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.3);
    display: none;
}

#drawer-overlay.show {
    display: block;
}

/* COMMENT BOX */
.comment-box {
    background: #f8fafc;
    padding: 10px;
    border-radius: 10px;
    margin-bottom: 10px;
}

.reply-box {
    background: #eef2ff;
    padding: 10px;
    border-radius: 10px;
    margin-left: 20px;
}

/* ANIMATION */
.pulse {
    animation: pulse 0.5s;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.project-info {
    display: flex;
    flex-direction: column;
}

/* ROW */
.info-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;

    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
}

.info-item:last-child {
    border-bottom: none;
}

/* LEFT (ICON + LABEL) */
.info-left {
    font-size: 13px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ICON */
.info-left i {
    font-size: 14px;
    color: #94a3b8;
    width: 16px;
}

/* RIGHT (VALUE) */
.info-right {
    font-size: 13.5px;
    font-weight: 500;
    color: #0f172a;
    text-align: right;
    max-width: 60%;
    word-break: break-word;
}

.project-card .card-header {
    background: #ffffff;
    border: none;

    padding: 16px 18px;

    font-size: 14px;
    font-weight: 600;
    color: #1e293b;

    position: relative;
    z-index: 1;

    /* subtle lift */
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);

    border-top-left-radius: 14px;
    border-top-right-radius: 14px;
}

.project-card .card-header i {
    font-size: 14px;
    opacity: 0.8;
}

.comment-item {
    margin-bottom: 15px;
}

.comment-box {
    background: #f8fafc;
    padding: 12px;
    border-radius: 10px;
}

.reply-box {
    background: #eef2ff;
    padding: 12px;
    border-radius: 10px;
    margin-top: 8px;
    margin-left: 20px;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 5px;
}

.comment-text {
    font-size: 14px;
    color: #334155;
}

.time {
    color: #94a3b8;
}

/* THREAD CONTAINER */
.thread-item {
    margin-bottom: 18px;
}

/* BASE BUBBLE */
.comment-bubble {
    padding: 12px 14px;
    border-radius: 12px;
    max-width: 85%;
    position: relative;
}

/* USER COMMENT */
.comment-bubble.user {
    background: #f8fafc;
    border: 1px solid #eef2f7;
}

/* GOVERNMENT REPLY */
.comment-bubble.reply {
    background: #eef2ff;
    border-left: 3px solid #3b82f6;

    margin-top: 8px;
    margin-left: 30px; /* indentation */
}

/* META (NAME + TIME) */
.comment-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    margin-bottom: 6px;
}

/* AUTHOR */
.comment-author {
    font-weight: 600;
    color: #1e293b;
}

/* GOV LABEL */
.comment-author.gov {
    color: #1d4ed8;
}

/* TIME */
.comment-time {
    color: #94a3b8;
}

/* TEXT */
.comment-text {
    font-size: 14px;
    color: #334155;
    line-height: 1.5;
}

/* ATTACHMENT */
.comment-attachment {
    margin-top: 6px;
    font-size: 13px;
}

/* HOVER EFFECT */
.comment-bubble:hover {
    transform: translateY(-1px);
    transition: 0.2s ease;
}

/* BASE CARD */
.comment-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 16px;

    border: 1px solid #eef2f7;
    box-shadow: 0 6px 18px rgba(0,0,0,0.04);

    transition: all 0.2s ease;
}

/* HOVER */
.comment-card:hover {
    transform: translateY(-2px);
}

/* HEADER */
.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    font-size: 13px;
    margin-bottom: 8px;
}

/* TIME */
.time {
    color: #94a3b8;
    margin-left: 8px;
}

/* BODY */
.comment-body {
    font-size: 14px;
    color: #334155;
    line-height: 1.5;
}

/* ATTACHMENT */
.comment-attachment {
    margin-top: 8px;
    font-size: 13px;
}

/* RESPONSE CARD */
.response-card {
    margin-top: 12px;
    padding: 12px;

    background: #f8fafc;
    border-radius: 10px;

    border-left: 3px solid #3b82f6;
}

/* RESPONSE HEADER */
.response-header {
    font-size: 13px;
    font-weight: 600;
    color: #1d4ed8;

    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
}

/* RESPONSE BODY */
.response-body {
    font-size: 14px;
    color: #334155;
}

/* UNRESOLVED */
.comment-card.unresolved {
    border-left: 4px solid #f59e0b;
    background: #fffbeb;
}

/* RESOLVED */
.comment-card.resolved {
    border-left: 4px solid #22c55e;
}

.status-badge {
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 20px;
}

.status-badge.pending {
    background: #fef3c7;
    color: #92400e;
}

.status-badge.resolved {
    background: #dcfce7;
    color: #166534;
}
.response-header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-bottom: 6px;
}

/* LEFT SIDE */
.response-title {
    display: flex;
    align-items: center;
    gap: 6px;

    font-size: 13px;
    font-weight: 600;
    color: #1d4ed8;
}

/* ICON */
.response-title i {
    font-size: 12px;
    opacity: 0.8;
}

/* TIME */
.response-header .time {
    font-size: 12px;
    color: #94a3b8;
}

.citizen-feedback .card-header {
    background: #ffffff;
    border: none;

    padding: 16px 18px;

    font-size: 15px;
    font-weight: 600;
    color: #0f172a;

    border-top-left-radius: 14px;
    border-top-right-radius: 14px;

    /* subtle elevation */
    box-shadow: 0 6px 16px rgba(0,0,0,0.04);

    position: relative;
}

.btn-comment {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;

    border: none;
    border-radius: 10px;

    padding: 10px 16px;
    font-size: 13.5px;
    font-weight: 600;

    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.25);

    transition: all 0.2s ease;
}

/* HOVER */
.btn-comment:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
}

/* ACTIVE */
.btn-comment:active {
    transform: scale(0.98);
}

.comment-count {
    background: rgba(255,255,255,0.2);
    color: #fff;

    padding: 2px 8px;
    border-radius: 20px;

    font-size: 12px;
    font-weight: 600;
}

#comment-drawer {
    background: #ffffff;
    padding: 20px 18px;

    box-shadow: -12px 0 40px rgba(0,0,0,0.12);
}

/* HEADER */
.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 0 18px 16px;
    border-bottom: 1px solid #eef2f7;

    margin-bottom: 0; /* remove this */

    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
}

/* CLOSE BUTTON */
#close-drawer {
    background: #f1f5f9;
    border: none;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    cursor: pointer;
}

/* ALL INPUTS */
#comment-drawer input,
#comment-drawer textarea {
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 10px;

    padding: 10px 12px;
    font-size: 13.5px;

    background: #f8fafc;
    transition: all 0.2s ease;
}

/* FOCUS STATE */
#comment-drawer input:focus,
#comment-drawer textarea:focus {
    border-color: #3b82f6;
    background: #ffffff;
    outline: none;

    box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}

#comment-drawer .form-group {
    margin-bottom: 14px;
}

.help-block,
.invalid-feedback {
    font-size: 12px;
    color: #dc2626;
    margin-top: 4px;
}

/* ERROR INPUT */
.has-error input,
.has-error textarea {
    border-color: #dc2626;
    background: #fff1f2;
}

#comment-drawer input[type="file"] {
    background: #fff;
    padding: 6px;
}

#comment-drawer button[type="submit"] {
    width: 100%;
    margin-top: 10px;

    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;

    border: none;
    border-radius: 10px;

    padding: 11px;
    font-size: 13.5px;
    font-weight: 600;

    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.25);
    transition: all 0.2s ease;
}

#comment-drawer button[type="submit"]:hover {
    transform: translateY(-1px);
}

#comment-drawer input::placeholder,
#comment-drawer textarea::placeholder {
    color: #94a3b8;
}

/* DISABLED STATE */
#submit-btn.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* HIDE/SHOW TEXT */
.d-none {
    display: none;
}

.floating-comment-btn {
    position: fixed;
    bottom: 15px;
    right: 25px;
    z-index: 1000;

    display: flex;
    align-items: center;
    gap: 8px;

    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;

    border: none;
    border-radius: 50px;

    padding: 6px 16px;
    font-size: 13.5px;
    font-weight: 600;

    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.3);

    cursor: pointer;
    transition: all 0.25s ease;
}

/* HOVER */
.floating-comment-btn:hover {
    transform: translateY(-2px) scale(1.02);
}

/* ICON */
.floating-comment-btn i {
    font-size: 14px;
}

/* COUNT BADGE */
.floating-comment-btn .comment-count {
    background: rgba(255,255,255,0.2);
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 12px;
}

/*Hide floating button when drawer is open*/
/* DEFAULT */
.floating-comment-btn {
    transition: all 0.3s ease;
}

/* HIDDEN STATE */
.floating-comment-btn.hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

.project-content {
    margin-top: 30px;
    padding-top: 20px;
}
/*end*/

.btn-view {
    display: inline-flex;
    align-items: center;
    gap: 5px;

    padding: 6px 10px;
    font-size: 12.5px;
    font-weight: 600;

    color: #2563eb;
    background: #eff6ff;

    border-radius: 8px;
    text-decoration: none;
}

.btn-view:hover {
    background: #dbeafe;
}

.form-hint {
    font-size: 12px;
    color: #64748b;
    margin-top: -8px;
    margin-bottom: 10px;
}

/* Hide default input */
.file-input {
    display: none;
}

/* Container */
.custom-file-upload {
    display: flex;
    align-items: center;
    gap: 10px;

    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px 12px;
}

/* Button */
.file-label {
    background: #e2e8f0;
    color: #334155;

    padding: 8px 12px;
    border-radius: 8px;

    font-size: 13px;
    cursor: pointer;

    display: inline-flex;
    align-items: center;
    gap: 6px;

    transition: all 0.2s ease;
}

.file-label:hover {
    background: #cbd5f5;
}

/* File name */
.file-name {
    font-size: 13px;
    color: #64748b;
}

/* Optional text */
.optional {
    font-size: 12px;
    color: #94a3b8;
    font-weight: normal;
}

.file-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

.remove-file {
    font-size: 14px;
    color: #94a3b8;
    cursor: pointer;
    display: none; /* hidden initially */
}

.remove-file:hover {
    color: #ef4444;
}

/* ======================
   PROJECT HEADER
====================== */
.project-header {
    background: #fff;
    border-radius: 16px;
    padding: 18px 20px;

    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

/* BACK LINK */
.project-header .back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    font-size: 13px;
    color: #64748b;
    text-decoration: none;
}

.project-header .back-link:hover {
    color: #1e293b;
}

/* TITLE */
.project-title {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;

    margin-top: 6px;
}

/* META ROW */
.project-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;

    margin-top: 10px;
}

/* META ITEM */
.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;

    font-size: 13px;
    color: #475569;
}

/* STATUS BADGE */
.status-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

/* STATUS COLORS */
.status-badge.completed {
    background: #dcfce7;
    color: #166534;
}

.status-badge.ongoing {
    background: #dbeafe;
    color: #1e40af;
}

.status-badge.awaiting-bq {
    background: #fef3c7;
    color: #92400e;
}

.status-badge.not-yet-tendered {
    background: #e2e8f0;
    color: #475569;
}

.project-header {
    border: 1px solid #eef2f7;
}

.meta-item i {
    color: #94a3b8;
}