/* Import Google Font - Poppins */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    /* Premium Brand Colors */
    --sidebar-bg: #031530; /* Deep navy */
    --main-bg: #f5f7fa; /* Light gray */
    --text-muted: #8b9bb4;
    --text-white: #ffffff;
    --brand-gradient: #0466c8; /* Royal blue */
    --brand-gold: #d4af37; /* Subtle gold */
    --brand-teal: #008080; /* Teal accent */

    --sidebar-width: 260px;
    --sidebar-collapsed-width: 80px;
    --header-height: 65px;
    --transition-speed: 0.3s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

/* Hide scrollbar for Chrome, Safari and Opera */
*::-webkit-scrollbar {
    display: none;
}

body {
    min-height: 100vh;
    background: var(--main-bg);
    overflow-x: hidden;
}

/* ===========================
   SIDEBAR STYLES
=========================== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    z-index: 1000;
    transition: all var(--transition-speed) ease;
    overflow-y: auto;
}

.sidebar .logo-details {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    margin-bottom: 20px;
}

.sidebar .logo-details img {
    max-width: 150px;
    height: auto;
    transition: all 0.3s ease;
}

.sidebar .logo-details .sidebar-logo-icon {
    display: none;
}

.sidebar .nav-links {
    list-style: none;
    padding: 0 15px;
}

.sidebar .nav-links li {
    position: relative;
    list-style: none;
    margin-bottom: 8px;
}

.sidebar .nav-links li a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-muted);
    padding: 12px 15px;
    border-radius: 8px;
    transition: all var(--transition-speed) ease;
    font-weight: 400;
    font-size: 15px;
    white-space: nowrap;
}

.sidebar .nav-links li a i {
    min-width: 35px;
    font-size: 18px;
    text-align: center;
    margin-right: 5px;
}

.sidebar .nav-links li a:hover {
    color: var(--text-white);
    background: rgba(255, 255, 255, 0.05);
}

.sidebar .nav-links li.active a {
    background: rgba(4, 102, 200, 0.16) !important;
    color: #60a5fa !important;
    font-weight: 600 !important;
    border-left: 3px solid #38bdf8 !important;
    box-shadow: none !important;
}

/* ===========================
   MAIN CONTENT
=========================== */
.home-section {
    position: relative;
    background: var(--main-bg);
    min-height: 100vh;
    width: calc(100% - var(--sidebar-width));
    left: var(--sidebar-width);
    transition: all var(--transition-speed) ease;
}

/* ===========================
   HEADER
=========================== */
.home-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
    background: #fff;
    padding: 0 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 99;
}

.home-header .sidebar-toggle-btn {
    font-size: 24px;
    cursor: pointer;
    color: var(--sidebar-bg);
    margin-right: 15px;
}

.main-content-padding {
    padding: 30px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Notifications */
.notification-box {
    position: relative;
    cursor: pointer;
    font-size: 20px;
    color: #555;
    transition: transform 0.2s;
}

.notification-box:hover {
    color: #892cdc;
    transform: scale(1.1);
}

.notification-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    height: 18px;
    min-width: 18px;
    background: var(--brand-gradient);
    color: white;
    font-size: 10px;
    font-weight: 600;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
}

/* Profile */
.profile-box {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 5px;
    border-radius: 8px;
    position: relative;
}

.profile-img {
    height: 35px;
    width: 35px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #ddd;
}

.profile-info {
    display: flex;
    flex-direction: column;
}

.profile-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.profile-role {
    font-size: 11px;
    color: #888;
}

/* Dropdown */
.profile-dropdown {
    position: absolute;
    top: 130%;
    right: 0;
    width: 180px;
    background: #fff;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
}

.profile-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.profile-dropdown a {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    color: #555;
    text-decoration: none;
    font-size: 14px;
}

.profile-dropdown a:hover {
    background: #f4f5f7;
    color: #892cdc;
}

.profile-dropdown a i {
    margin-right: 10px;
    width: 20px;
}

/* Small adjustments for this page specifically */
.welcome-card {
    background: #eef2ff;
    /* Light purple/blue tint */
    border-radius: 12px;
}

.round-50 {
    width: 50px;
    height: 50px;
    font-size: 24px;
}

.post-img-cover {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
}

.user-profile-img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Fix for card height matching */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

.uni-card {
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.uni-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 25px 0 rgba(0, 0, 0, 0.1);
    border-color: var(--bs-primary-bg-subtle);
}

.uni-img-wrapper {
    height: 160px;
    overflow: hidden;
    background: #f8f9fa;
    position: relative;
}

.uni-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.uni-card:hover .uni-img-wrapper img {
    transform: scale(1.05);
}

.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* DataTable Filter Styling */
.dataTables_wrapper .dataTables_filter input {
    border: 1px solid #dfe5ef;
    padding: 6px 12px;
    border-radius: 7px;
    outline: none;
}

.dataTables_wrapper .dataTables_filter input:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 2px rgba(var(--bs-primary-rgb), 0.1);
}

/* Pagination Container */
.dataTables_wrapper .dataTables_paginate {
    margin-top: 20px !important;
    text-align: center;
}

/* Pagination Buttons */
.dataTables_wrapper .dataTables_paginate .paginate_button {
    border: none !important;
    padding: 8px 14px !important;
    margin: 0 4px !important;
    border-radius: 12px !important;
    background: #f1f4f9 !important;
    color: #1e293b !important;
    font-weight: 600 !important;
    transition: all 0.25s ease;
}

/* Hover */
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: var(--bs-primary) !important;
    color: #fff !important;
}

/* Active Page */
.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--bs-primary) !important;
    color: #fff !important;
}

/* Hide default disabled styling */
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
    background: #e9ecef !important;
    color: #94a3b8 !important;
}

/* Force table to scroll nicely on mobile */
.table-responsive {
    overflow-x: auto;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
}
.table-responsive .dataTable td,
.table-responsive .dataTable th {
    white-space: nowrap;
    display: table-cell !important;
    visibility: visible !important;
}

.profile-card {
    transition: all 0.3s ease;
    border: 1px solid transparent;
    position: relative;
    background: #fff;
}

.profile-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
    border-color: var(--bs-primary-bg-subtle);
}

/* Icon Box Styling */
.icon-box {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 24px;
}

/* Action Buttons */
.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 0;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-view {
    background-color: var(--bs-light);
    color: var(--bs-dark);
}

.btn-view:hover {
    background-color: var(--bs-gray-300);
    color: #000;
}

.btn-edit {
    background-color: var(--bs-primary-bg-subtle);
    color: var(--bs-primary);
}

.btn-edit:hover {
    background-color: var(--bs-primary);
    color: #fff;
}

/* Make datatable layout cleaner on mobile */
@media (max-width: 576px) {
    .dataTables_wrapper .dataTables_filter {
        text-align: left !important;
        width: 100%;
    }

    .dataTables_wrapper .dataTables_filter input {
        width: 100%;
        margin-top: 8px;
    }

    .dataTables_wrapper .dataTables_paginate {
        text-align: center !important;
        margin-top: 15px !important;
    }

    .dataTables_paginate .paginate_button {
        padding: 6px 10px !important;
        margin: 0 2px !important;
        border-radius: 10px !important;
        font-size: 12px !important;
    }

    /* Hide unnecessary columns on mobile */
    #example td:nth-child(4),
    #example th:nth-child(4),
    #example td:nth-child(5),
    #example th:nth-child(5) {
        display: none;
    }
}

.support-card {
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.support-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
    border-color: var(--bs-primary-bg-subtle);
}

.support-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 30px;
    margin-bottom: 15px;
}

.accordion-button:not(.collapsed) {
    background-color: var(--bs-primary-bg-subtle);
    color: var(--bs-primary);
    box-shadow: none;
}

.accordion-button:focus {
    box-shadow: none;
}

.uni-banner {
    height: 200px;
    width: 100%;
    object-fit: cover;
    border-radius: 12px 12px 0 0;
}

.uni-logo-overlap {
    width: 80px;
    height: 80px;
    object-fit: contain;
    background: #fff;
    border: 4px solid #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-top: -40px;
    margin-left: 20px;
    position: relative;
    z-index: 2;
}

.score-card {
    background-color: var(--bs-light);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.score-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--bs-primary);
}

.score-label {
    font-size: 0.8rem;
    color: var(--bs-gray-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.feature-icon {
    width: 40px;
    height: 40px;
    background: var(--bs-primary-bg-subtle);
    color: var(--bs-primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

/* ===========================
   DESKTOP COLLAPSED STATE
=========================== */
@media (min-width: 769px) {
    .sidebar.collapsed {
        width: var(--sidebar-collapsed-width);
    }

    .sidebar.collapsed .logo-details .sidebar-logo-text {
        display: none;
        opacity: 0;
        pointer-events: none;
    }
    .sidebar.collapsed .logo-details .sidebar-logo-icon {
        display: block;
        opacity: 1;
        pointer-events: auto;
    }

    .sidebar.collapsed .nav-links li a .link_name {
        opacity: 0;
        pointer-events: none;
        display: none;
    }

    .sidebar.collapsed .nav-links li a {
        justify-content: center;
        padding: 12px 0;
    }

    .sidebar.collapsed .nav-links li a i {
        margin-right: 0;
    }

    .home-section.collapsed {
        left: var(--sidebar-collapsed-width);
        width: calc(100% - var(--sidebar-collapsed-width));
    }
}

/* ===========================
   MOBILE RESPONSIVE DASHBOARD
=========================== */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 900;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-overlay.active {
    display: block;
    opacity: 1;
}

@media (max-width: 768px) {
    .sidebar {
        left: -100%;
        width: 260px;
    }

    .sidebar.mobile-active {
        left: 0;
        box-shadow: 5px 0 15px rgba(0, 0, 0, 0.2);
    }

    .home-section {
        left: 0;
        width: 100%;
    }

    .home-section.collapsed {
        left: 0;
        width: 100%;
    }

    .main-content-padding {
        padding: 20px;
    }

    .profile-info,
    .profile-box i.fa-chevron-down {
        display: none;
    }
}

/* ===========================
   LOGIN PAGE STYLES
=========================== */
body.login-body {
    height: 100vh;
    width: 100vw;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f0f2f5;
    margin: 0;
    font-family: 'Poppins', sans-serif;
}

.login-container {
    background: #fff;
    width: 90%;
    max-width: 400px;
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.login-header {
    background: #0d6efd;
    padding: 40px 30px;
    text-align: center;
    color: #fff;
}

.login-header img {
    width: 120px;
    height: auto;
    margin-bottom: 15px;
    /* filter: brightness(0) invert(1); */
}

.login-header h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 5px;
    margin-top: 0;
}

.login-header p {
    font-size: 14px;
    opacity: 0.9;
    margin: 0;
}

.login-container form {
    padding: 30px;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #555;
    font-weight: 500;
}

.input-field {
    position: relative;
    width: 100%;
}

.input-field i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
    font-size: 16px;
}

.input-field input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    outline: none;
    transition: all 0.3s;
    font-size: 14px;
    background: #fff;
    color: #333;
    box-sizing: border-box;
}

.input-field input:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 3px rgba(250, 86, 141, 0.1);
}

.login-btn {
    width: 100%;
    padding: 14px;
    background: #0d6efd;
    border: none;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 10px;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(13, 110, 253, 0.3);
}

.error-msg {
    background: #ffebee;
    color: #c62828;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.login-footer {
    text-align: center;
    padding: 20px;
    background: #f9f9f9;
    border-top: 1px solid #eee;
    font-size: 12px;
    color: #888;
}

/* ===========================
   LATEST UPDATE PAGE STYLES
=========================== */
.square-card {
    height: 350px;
    /* FIXED HEIGHT = SAME SIZE */
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.square-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
}

/* ===== Card Body ===== */
.square-card .card-body {
    /* padding: 14px; */
    display: flex;
    flex-direction: column;
    height: 350px;
}

/* ===== Header ===== */
.post-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    flex-shrink: 0;
}

.post-header img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

/* ===== Caption ===== */
.post-caption {
    font-size: 0.85rem;
    color: #444;
    margin-bottom: 8px;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== Image Area (IMPORTANT PART) ===== */
.post-image-container {
    height: 200px;
    /* fixed image area */
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 10px;
}

/* Image fills container fully */
.post-img-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* 🔥 REMOVES WHITE SPACE */
    display: block;
}

/* ===== Footer ===== */
.post-footer {
    margin-top: auto;
    /* Push footer to bottom */
}

/* user profile view css */
.detail-group {
    background-color: #fff;
    padding: 15px;
    border-radius: 10px;
    border: 1px solid var(--bs-border-color-translucent);
    height: 100%;
    transition: 0.2s;
}

.detail-group:hover {
    border-color: var(--bs-primary-bg-subtle);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.03);
}

.detail-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--bs-gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.detail-value {
    font-size: 1rem;
    font-weight: 500;
    color: var(--bs-heading-color);
    word-break: break-word;
}

.profile-img-view {
    width: 130px;
    height: 130px;
    object-fit: cover;
    border-radius: 50%;
    border: 5px solid #fff;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.tag-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    background: var(--bs-light);
    color: var(--bs-dark);
    font-size: 0.85rem;
    margin: 2px;
    border: 1px solid var(--bs-border-color);
}

.form-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--bs-primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 1px dashed var(--bs-border-color);
}

.form-control,
.form-select {
    border-color: #dfe5ef;
    padding: 0.6rem 1rem;
    border-radius: 8px;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.1);
}

/* student\u-user-documents.php css */
.doc-card {
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

/* Logic for Uploaded (Green) vs Pending (Red) Shadows */
.doc-uploaded {
    box-shadow: 0 4px 15px rgba(25, 135, 84, 0.25) !important;
    /* Green Shadow */
    border: 1px solid rgba(25, 135, 84, 0.2) !important;
    /* Subtle Green Border */
    background-color: rgba(25, 135, 84, 0.02);
    /* Very faint green tint */
}

.doc-pending {
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.25) !important;
    /* Red Shadow */
    border: 1px solid rgba(220, 53, 69, 0.2) !important;
    /* Subtle Red Border */
    background-color: rgba(220, 53, 69, 0.02);
    /* Very faint red tint */
}

.doc-card:hover {
    transform: translateY(-5px);
}

/* Intensify shadow on hover */
.doc-uploaded:hover {
    box-shadow: 0 8px 25px rgba(25, 135, 84, 0.35) !important;
}

.doc-pending:hover {
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.35) !important;
}

.doc-icon-box {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 24px;
    background: var(--bs-light);
    color: var(--bs-primary);
}

.status-badge {
    display: block;
    width: fit-content;
    margin: 0 auto 15px auto;
}

.file-upload-wrapper {
    background: #f9fafb;
    border: 1px dashed #d1d5db;
    border-radius: 8px;
    padding: 10px;
}

.chat-app-wrapper {
    display: flex;
    height: calc(100vh - 150px);
    min-height: 600px;
    background: #f0f2f5;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
}

.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.chat-sidebar {
    width: 320px;
    background: #ffffff;
    border-right: 1px solid #d1d7db;
    display: flex;
    flex-direction: column;
}

.chat-user-item {
    padding: 12px 15px;
    border-bottom: 1px solid #f2f2f2;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.chat-user-item:hover {
    background-color: #f5f6f6;
}

.chat-user-item.active {
    background-color: #f0f2f5;
    border-left: none;
}

.chat-user-item.active .chat-name {
    color: #111b21;
    font-weight: 600;
}

.chat-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: #efeae2;
}

.chat-header {
    padding: 10px 16px;
    background: #f0f2f5;
    border-bottom: 1px solid #d1d7db;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-body {
    flex: 1;
    padding: 20px 5%;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background-color: #efeae2;
    background-image: url('https://user-images.githubusercontent.com/15075759/28719144-86dc0f70-73b1-11e7-911d-60d70fcded21.png');
    background-attachment: fixed;
}

.msg-row {
    display: flex;
    margin-bottom: 2px;
}

.msg-row.sent {
    justify-content: flex-end;
}

.msg-bubble {
    max-width: 65%;
    padding: 6px 7px 8px 9px;
    border-radius: 7.5px;
    font-size: 0.92rem;
    line-height: 1.4;
    position: relative;
    box-shadow: 0 1px 0.5px rgba(11, 20, 26, 0.13);
    word-wrap: break-word;
}

.msg-row.sent .msg-bubble {
    background-color: #d9fdd3;
    color: #111b21;
    border-top-right-radius: 0;
}

.msg-row.sent .msg-time {
    color: #667781;
}

.msg-row.received .msg-bubble {
    background-color: #ffffff;
    color: #111b21;
    border-top-left-radius: 0;
    border: none;
}

.msg-time {
    font-size: 0.68rem;
    margin-top: 2px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    color: #667781;
    gap: 4px;
    float: right;
    margin-left: 10px;
    margin-bottom: -5px;
}

.date-divider {
    display: flex;
    justify-content: center;
    margin: 12px 0;
}

.date-divider span {
    background-color: #ffffff;
    color: #54656f;
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 500;
    box-shadow: 0 1px 0.5px rgba(11, 20, 26, 0.13);
}

.chat-footer {
    padding: 10px 16px;
    background: #f0f2f5;
    border-top: none;
    position: relative;
}

.chat-footer input[name="message"] {
    background-color: #ffffff !important;
    border-radius: 8px !important;
    padding: 9px 12px !important;
    font-size: 0.95rem;
    color: #111b21;
}

.chat-footer .btn-primary {
    background-color: #00a884;
    border-color: #00a884;
    color: white;
}

.chat-footer .btn-primary:hover {
    background-color: #008f6f;
    border-color: #008f6f;
}

.chat-footer .btn-light {
    background-color: transparent;
    color: #54656f !important;
}

.chat-footer .btn-light:hover {
    background-color: transparent;
    color: #111b21 !important;
}

.attachment-popup {
    position: absolute;
    bottom: 75px;
    left: 25px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    padding: 10px;
    display: none;
    flex-direction: column;
    gap: 5px;
    min-width: 160px;
    z-index: 100;
}

.attach-option {
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--bs-body-color);
    transition: background 0.2s;
}

.attach-option:hover {
    background-color: var(--bs-light);
}

.file-preview-box {
    display: none;
    background: var(--bs-light);
    padding: 8px 12px;
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 0.85rem;
    border: 1px dashed var(--bs-gray-400);
}

.sender-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: bold;
    margin-bottom: 6px;
    padding: 2px 8px;
    border-radius: 10px;
}

.badge-uni {
    color: #008537ff;
    background: #e0f8e9;
}

.badge-coun {
    color: #5d87ff;
    background: #ebf3fe;
}

.msg-text-content {
    display: block;
    width: 100%;
}

/* New Info Button Styles */
.info-btn {
    cursor: pointer;
    opacity: 0.8;
    transition: 0.2s;
    font-size: 1.1em;
}

.info-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

.seen-status-row {
    font-size: 0.65rem;
    margin-top: 5px;
    padding-top: 5px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    display: none;
    color: rgba(255, 255, 255, 0.9);
}

.msg-row.received .seen-status-row {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    color: #666;
}

@media (max-width: 991px) {
    .chat-sidebar {
        width: 100%;
    }

    .chat-content {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 1050;
    }

    .chat-content.active {
        display: flex;
    }

    .chat-app-wrapper {
        height: auto;
        min-height: auto;
        display: block;
        border-radius: 0;
        box-shadow: none;
    }
}



/* =========================================
   GLOBAL PREMIUM SAAS DESIGN SYSTEM
   ========================================= */

/* GLOBAL COMPONENT OVERRIDES */
body {
    background-color: var(--main-bg) !important;
    color: #334155;
}

h1, h2, h3, h4, h5, h6 {
    color: #1e293b;
    font-weight: 600;
}

/* Premium Cards */
.card {
    border: 1px solid rgba(0, 0, 0, 0.04) !important;
    border-radius: 16px !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06) !important;
}

.card-header {
    background-color: #ffffff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    border-top-left-radius: 16px !important;
    border-top-right-radius: 16px !important;
    padding: 1.25rem 1.5rem;
}

.card-body {
    padding: 1.5rem;
}

/* Premium Buttons */
.btn {
    border-radius: 8px !important;
    font-weight: 500 !important;
    padding: 0.6rem 1.2rem !important;
    transition: all 0.25s ease !important;
}

.btn-primary {
    background-color: var(--brand-gradient) !important;
    border-color: var(--brand-gradient) !important;
    box-shadow: 0 4px 10px rgba(4, 102, 200, 0.2) !important;
}

.btn-primary:hover {
    background-color: #034b93 !important;
    border-color: #034b93 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(4, 102, 200, 0.3) !important;
}

.btn-outline-primary {
    color: var(--brand-gradient) !important;
    border-color: var(--brand-gradient) !important;
}

.btn-outline-primary:hover {
    background-color: var(--brand-gradient) !important;
    color: #fff !important;
}

/* Inputs & Forms */
.form-control, .form-select {
    border-radius: 10px !important;
    border: 1px solid #cbd5e1 !important;
    padding: 0.75rem 1rem !important;
    box-shadow: none !important;
    font-size: 0.95rem;
    color: #334155 !important;
    background-color: #ffffff !important;
    transition: all 0.2s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--brand-gradient) !important;
    box-shadow: 0 0 0 4px rgba(4, 102, 200, 0.1) !important;
}

.form-label {
    font-weight: 500;
    color: #475569;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

/* Table Design */
.table {
    border-collapse: separate !important;
    border-spacing: 0 8px !important;
    background: transparent !important;
}

.table th {
    border-bottom: none !important;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    color: #64748b;
    font-weight: 600;
    padding: 1rem 1.5rem !important;
    background: transparent !important;
}

.table td {
    background: #ffffff !important;
    border-top: 1px solid rgba(0,0,0,0.03) !important;
    border-bottom: 1px solid rgba(0,0,0,0.03) !important;
    padding: 1.25rem 1.5rem !important;
    vertical-align: middle;
    color: #334155;
    font-size: 0.95rem;
}

.table tr td:first-child {
    border-left: 1px solid rgba(0,0,0,0.03) !important;
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}

.table tr td:last-child {
    border-right: 1px solid rgba(0,0,0,0.03) !important;
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}

.table tbody tr {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.01);
}

.table tbody tr:hover {
    transform: scale(1.01);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    z-index: 10;
    position: relative;
}

/* Badges */
.badge {
    padding: 0.5em 0.8em !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
    font-size: 0.75rem !important;
}

/* Universal Page Headers (Welcome Card Override) */
.welcome-card {
    background: #ffffff !important;
    border-radius: 16px !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03) !important;
    border: 1px solid rgba(0,0,0,0.04) !important;
    margin-bottom: 1.5rem !important;
}

.welcome-card h3, .welcome-card h4 {
    color: #1e293b !important;
    font-weight: 700 !important;
}

.welcome-card p {
    color: #64748b !important;
}

/* Sidebar Active states */
.sidebar .nav-links li.active a {
    background: var(--brand-gradient) !important;
    color: var(--text-white) !important;
    font-weight: 500 !important;
    box-shadow: 0 4px 15px rgba(4, 102, 200, 0.3) !important;
}

.sidebar .nav-links li a:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
}

/* Alerts */
.alert {
    border-radius: 10px !important;
    border: none !important;
}

/* Make container-fluid standard padding */
.main-content-padding {
    padding: 2rem !important;
}

@media (max-width: 768px) {
    .main-content-padding {
        padding: 1rem !important;
    }
    
    .card-body {
        padding: 1rem !important;
    }
}


/* UI Components */
.timeline-wrapper { min-width: 500px; }
.timeline-line { height: 2px; background-color: #e9ecef; z-index: 1; }
.timeline-step { width: 80px; }
.timeline-step-wide { width: 100px; }
.timeline-icon { width: 45px; height: 45px; border: 3px solid #fff; }
.timeline-text { font-size: 0.85rem; }

.quick-action-card { border-radius: 12px; background-color: #f8f9fa; }
.quick-action-icon { width: 50px; height: 50px; }
.quick-action-text { font-size: 0.9rem; }

.welcome-title { font-size: 1.8rem; }
.welcome-subtitle { font-size: 1.05rem; }
.welcome-icon-box { width: 50px; height: 50px; }

.stat-icon { width: 70px; height: 70px; }
.stat-label { letter-spacing: 1px; font-size: 0.85rem; }
.stat-value { font-size: 2.2rem; }

/* Remove explicit card styling overrides since its in global now */


/* Additional UI Utility Classes to replace inline CSS */
.obj-fit-cover { object-fit: cover; }
.post-desc { font-size: 1.05rem; line-height: 1.6; }
.post-img { max-height: 400px; object-fit: cover; }
.profile-banner { height: 100px; }
.profile-img-wrap { margin-top: -50px; margin-bottom: 15px; }
.profile-img-lg { width: 100px; height: 100px; object-fit: cover; }
.mini-label { font-size: 0.75rem; letter-spacing: 0.5px; }
.profile-stat-card { background: linear-gradient(to right, #f8f9fa, #ffffff); }
.stat-icon-sm { width: 45px; height: 45px; }
.chat-container-margin { scroll-margin-top: 80px; }
.chat-avatar { width: 45px; height: 45px; }
.chat-name-max { max-width: 200px; }
.chat-badge { font-size: 0.65rem; }
.chat-attach-max { max-width: 150px; }
.chat-icon-blue { color: #80d8ff; }
.cursor-pointer { cursor: pointer; }
.toast-custom { width: fit-content; --bs-toast-padding-x: 0.5rem; --bs-toast-padding-y: 0.25rem; }
.toast-body-custom { font-size: 15px; padding: 6px 10px; white-space: nowrap; }
.toast-close-custom { transform: scale(0.7); }
.sticky-offset { top: 100px; z-index: 1; }
.icon-64 { font-size: 64px; }
.no-bg-img { background-image: none; }


/* =============================
   CHME 2026 GLOBAL DESIGN SYSTEM
   ============================= */

/* Premium color variables (already defined in :root) */

/* Global resets and typography */
body {font-family: 'Poppins', sans-serif; background-color: var(--bg-main); color: #334155; overflow-x: hidden;}

h1, h2, h3, h4, h5, h6 {color: #1e293b; font-weight: 600;}

/* Premium card component */
.card-premium {background: #ffffff; border: 1px solid rgba(0,0,0,0.04); border-radius: 16px; box-shadow: 0 4px 15px rgba(0,0,0,0.03); transition: transform 0.2s ease, box-shadow 0.2s ease;}
.card-premium:hover {transform: translateY(-3px); box-shadow: 0 8px 25px rgba(0,0,0,0.06);}

/* Featured announcement card */
.card-featured {grid-column: span 2;}

/* Buttons */
.btn-primary {background-color: var(--brand-gradient); border-color: var(--brand-gradient); color: #fff; border-radius: 8px; font-weight: 500; padding: 0.6rem 1.2rem; transition: all 0.25s ease;}
.btn-primary:hover {background-color: #034b93; border-color: #034b93; transform: translateY(-2px);}

/* Form controls */
.form-control-premium, .form-select-premium {border-radius: 10px; border: 1px solid #cbd5e1; padding: 0.75rem 1rem; font-size: 0.95rem; color: #334155; background-color: #ffffff; transition: all 0.2s ease;}
.form-control-premium:focus, .form-select-premium:focus {border-color: var(--brand-gradient); box-shadow: 0 0 0 4px rgba(4,102,200,0.1);}

/* Table styling */
.table-premium {border-collapse: separate; border-spacing: 0 8px;}
.table-premium th {background: transparent; color: #64748b; text-transform: uppercase; font-size: 0.75rem; letter-spacing: 1px; padding: 1rem 1.5rem; font-weight: 600;}
.table-premium td {background: #ffffff; border-top: 1px solid rgba(0,0,0,0.03); border-bottom: 1px solid rgba(0,0,0,0.03); padding: 1.25rem 1.5rem; vertical-align: middle; color: #334155; font-size: 0.95rem;}
.table-premium tr td:first-child {border-left: 1px solid rgba(0,0,0,0.03); border-top-left-radius: 12px; border-bottom-left-radius: 12px;}
.table-premium tr td:last-child {border-right: 1px solid rgba(0,0,0,0.03); border-top-right-radius: 12px; border-bottom-right-radius: 12px;}
.table-premium tbody tr {transition: transform 0.2s ease, box-shadow 0.2s ease; box-shadow: 0 2px 10px rgba(0,0,0,0.01);}
.table-premium tbody tr:hover {transform: scale(1.01); box-shadow: 0 5px 15px rgba(0,0,0,0.05);}

/* Sidebar navigation */
.sidebar .nav-links li a {display: flex; align-items: center; padding: 12px 15px; border-radius: 8px; transition: all var(--transition-speed) ease; color: var(--text-muted); font-weight: 400; font-size: 15px;}
.sidebar .nav-links li a i {min-width: 35px; font-size: 18px; margin-right: 5px; text-align: center;}
.sidebar .nav-links li.active a {background: var(--brand-gradient); color: var(--text-white); font-weight: 500; box-shadow: 0 4px 15px rgba(4,102,200,0.3);}
.sidebar .nav-links li a:hover {background: rgba(255,255,255,0.1); color: #fff;}

/* Header */
.home-header {display: flex; align-items: center; justify-content: space-between; height: var(--header-height); background: #fff; padding: 0 20px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); position: sticky; top: 0; z-index: 99;}
.header-breadcrumb {font-size: 0.85rem; color: #8b9bb4;}
.header-title {font-size: 1.5rem; font-weight: 600; color: #1e293b;}

/* Profile box */
.profile-box {display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 5px; border-radius: 8px; position: relative;}
.profile-box:hover .profile-dropdown {opacity: 1; visibility: visible; transform: translateY(0);}



/* ========================================================
   UNIFIED AUTHENTICATION LAYOUT (Desktop & Mobile)
   ======================================================== */
.chme-auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 10% 20%, #031530 0%, #08214d 45%, #0d2f6d 100%);
    padding: 24px 16px;
    position: relative;
    overflow: hidden;
}

.chme-auth-wrapper::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(4, 102, 200, 0.25) 0%, transparent 70%);
    top: -150px;
    right: -150px;
    border-radius: 50%;
    pointer-events: none;
}

.chme-auth-wrapper::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(0, 128, 128, 0.2) 0%, transparent 70%);
    bottom: -100px;
    left: -100px;
    border-radius: 50%;
    pointer-events: none;
}

.chme-auth-card {
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
    max-width: 1000px;
    width: 100%;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.chme-auth-brand-side {
    flex: 1 1 420px;
    background: linear-gradient(145deg, #031530 0%, #062354 100%);
    color: #ffffff;
    padding: 48px 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}

.chme-auth-brand-side .logo-container {
    margin-bottom: 30px;
}

.chme-auth-brand-side .logo-img {
    max-height: 52px;
    width: auto;
    object-fit: contain;
}

.chme-auth-brand-title {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 14px;
    color: #ffffff;
}

.chme-auth-brand-desc {
    color: #94a3b8;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 30px;
}

.chme-portal-badge-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 30px;
}

.chme-portal-badge-item {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #e2e8f0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.chme-portal-badge-item.active-dot::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #25d366;
    border-radius: 50%;
    display: inline-block;
}

.chme-auth-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.chme-auth-features li {
    font-size: 0.88rem;
    color: #cbd5e1;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chme-auth-features li i {
    color: #00d2d3;
    font-size: 1rem;
}

.chme-auth-form-side {
    flex: 1 1 450px;
    background: #ffffff;
    padding: 48px 42px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.chme-auth-heading {
    font-size: 1.6rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 6px;
}

.chme-auth-subheading {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 28px;
}

.chme-input-wrap {
    margin-bottom: 20px;
}

.chme-input-wrap label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
}

.chme-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.chme-input-icon {
    position: absolute;
    left: 14px;
    color: #94a3b8;
    font-size: 1.05rem;
    pointer-events: none;
}

.chme-input-field {
    width: 100%;
    padding: 12px 14px 12px 42px;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    font-size: 0.95rem;
    color: #1e293b;
    background: #ffffff;
    transition: all 0.2s ease;
}

.chme-input-field:focus {
    border-color: #0466c8;
    outline: none;
    box-shadow: 0 0 0 3px rgba(4, 102, 200, 0.15);
}

/* Quick Test / Demo Accounts Picker on Login */
.chme-demo-bar {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    padding: 14px;
    margin-top: 24px;
}

.chme-demo-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #64748b;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chme-demo-chips {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.chme-demo-chip {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 0.78rem;
    color: #1e293b;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    text-align: left;
    width: 100%;
}

.chme-demo-chip:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(4, 102, 200, 0.08);
}

.chme-demo-chip-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    flex-shrink: 0;
}

.chme-demo-chip.admin .chme-demo-chip-icon { background: #e0f2fe; color: #0369a1; }
.chme-demo-chip.counselor .chme-demo-chip-icon { background: #fef3c7; color: #b45309; }
.chme-demo-chip.uni .chme-demo-chip-icon { background: #f3e8ff; color: #7e22ce; }
.chme-demo-chip.student .chme-demo-chip-icon { background: #dcfce7; color: #15803d; }


.chme-pass-toggle {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 4px;
    transition: color 0.2s;
}

.chme-pass-toggle:hover {
    color: #0466c8;
}

.chme-auth-submit-btn {
    width: 100%;
    padding: 13px;
    border-radius: 10px;
    background: #0466c8;
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 14px rgba(4, 102, 200, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
}

.chme-auth-submit-btn:hover {
    background: #0352a0;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(4, 102, 200, 0.4);
}

.chme-auth-footer-note {
    margin-top: 24px;
    text-align: center;
    font-size: 0.8rem;
    color: #94a3b8;
}

@media (max-width: 768px) {
    .chme-auth-wrapper {
        padding: 16px;
    }
    .chme-auth-brand-side {
        padding: 32px 24px;
    }
    .chme-auth-form-side {
        padding: 32px 24px;
    }
    .chme-auth-brand-title {
        font-size: 1.6rem;
    }
    .chme-auth-heading {
        font-size: 1.4rem;
    }
    .chme-demo-chips {
        grid-template-columns: 1fr;
    }
}

/* ========================================================
   DESKTOP WHATSAPP MARKETING & CHAT ARCHITECTURE
   ======================================================== */
.wa-desktop-shell {
    display: flex;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
    border: 1px solid #e2e8f0;
    height: calc(100vh - 140px);
    min-height: 580px;
    overflow: hidden;
    position: relative;
}

/* WhatsApp Left Sidebar */
.wa-sidebar {
    width: 380px;
    min-width: 320px;
    max-width: 420px;
    background: #ffffff;
    border-right: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
}

@media (max-width: 991px) {
    .wa-desktop-shell {
        flex-direction: column;
        height: auto;
        min-height: auto;
    }
    .wa-sidebar {
        width: 100%;
        height: 350px;
        max-width: none;
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
    }
    .wa-chat-main {
        min-height: 500px;
    }
}

.wa-sidebar-header {
    padding: 0 20px;
    height: 70px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.wa-brand-tag {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: #0f172a;
    font-size: 1rem;
}

.wa-brand-tag .wa-icon {
    color: #25d366;
    font-size: 1.4rem;
}

.wa-sidebar-search {
    padding: 12px 16px;
    background: #ffffff;
    border-bottom: 1px solid #f1f5f9;
}

.wa-search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.wa-search-box input {
    width: 100%;
    padding: 8px 12px 8px 36px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    font-size: 0.88rem;
    color: #334155;
    outline: none;
    transition: all 0.2s;
}

.wa-search-box input:focus {
    background: #ffffff;
    border-color: #25d366;
    box-shadow: 0 0 0 2px rgba(37, 211, 102, 0.15);
}

.wa-search-box i {
    position: absolute;
    left: 12px;
    color: #94a3b8;
    font-size: 0.9rem;
}

.wa-nav-tabs {
    display: flex;
    border-bottom: 1px solid #e2e8f0;
    background: #ffffff;
    padding: 0 8px;
}

.wa-tab-btn {
    flex: 1;
    text-align: center;
    padding: 10px 8px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #64748b;
    border: none;
    background: none;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.wa-tab-btn.active {
    color: #25d366;
    border-bottom: 3px solid #25d366;
}

.wa-contacts-list {
    flex: 1;
    overflow-y: auto;
    list-style: none;
    padding: 0;
    margin: 0;
}

.wa-contact-card {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
    color: inherit;
}

.wa-contact-card:hover, .wa-contact-card.active {
    background: #f0fdf4;
}

.wa-contact-card.active {
    border-left: 3px solid #25d366;
}

.wa-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.wa-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #031530;
}

.wa-online-dot {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 10px;
    height: 10px;
    background: #25d366;
    border: 2px solid #ffffff;
    border-radius: 50%;
}

.wa-contact-info {
    flex: 1;
    min-width: 0;
}

.wa-contact-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 3px;
}

.wa-contact-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wa-contact-time {
    font-size: 0.72rem;
    color: #94a3b8;
    flex-shrink: 0;
    margin-left: 8px;
}

.wa-contact-preview {
    font-size: 0.8rem;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 4px;
}

.wa-unread-badge {
    background: #25d366;
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 12px;
    margin-left: auto;
}

/* WhatsApp Main Conversation & Campaign Pane */
.wa-chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #efeae2;
    position: relative;
}

.wa-chat-header {
    padding: 0 24px;
    height: 70px;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 5;
}

.wa-chat-header-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wa-chat-header-details h5 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
}

.wa-chat-header-details small {
    font-size: 0.75rem;
    color: #64748b;
}

.wa-chat-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wa-action-icon-btn {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s;
}

.wa-action-icon-btn:hover {
    background: #25d366;
    color: #ffffff;
    border-color: #25d366;
}

.wa-messages-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 28px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wa-msg-row {
    display: flex;
    width: 100%;
}

.wa-msg-row.sent {
    justify-content: flex-end;
}

.wa-msg-row.received {
    justify-content: flex-start;
}

.wa-bubble {
    max-width: 65%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.45;
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    word-wrap: break-word;
}

.wa-bubble.sent {
    background: #d9fdd3;
    color: #111b21;
    border-top-right-radius: 2px;
}

.wa-bubble.received {
    background: #ffffff;
    color: #111b21;
    border-top-left-radius: 2px;
}

.wa-bubble-meta {
    float: right;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.68rem;
    color: #667781;
    margin-top: 8px;
    margin-left: 12px;
    margin-bottom: -4px;
}

.wa-bubble-meta i {
    color: #53bdeb; /* Double blue tick */
}

/* WhatsApp Composer Bar */
.wa-composer {
    padding: 12px 20px;
    background: #f0f2f5;
    display: flex;
    align-items: center;
    gap: 12px;
    border-top: 1px solid #e2e8f0;
}

.wa-composer input[type="text"] {
    flex: 1;
    padding: 11px 16px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    font-size: 0.92rem;
    color: #1e293b;
    outline: none;
    transition: all 0.2s;
}

.wa-composer input[type="text"]:focus {
    border-color: #25d366;
    box-shadow: 0 0 0 2px rgba(37, 211, 102, 0.15);
}

.wa-send-btn {
    background: #25d366;
    color: #ffffff;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 6px rgba(37, 211, 102, 0.3);
}

.wa-send-btn:hover {
    background: #20ba59;
    transform: scale(1.05);
}

/* WhatsApp Marketing Broadcast Template Modal & Cards */
.wa-template-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    transition: all 0.2s;
    cursor: pointer;
    margin-bottom: 12px;
}

.wa-template-card:hover, .wa-template-card.selected {
    border-color: #25d366;
    background: #f0fdf4;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.12);
}

.wa-template-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.wa-template-badge {
    background: #dcfce7;
    color: #15803d;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
}

/* ========================================================
   UNIFIED PORTAL DASHBOARD & KPI COMPONENTS
   ======================================================== */
.chme-kpi-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 22px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.25s ease;
    margin-bottom: 20px;
}

.chme-kpi-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
    border-color: rgba(4, 102, 200, 0.2);
}

.chme-kpi-info h6 {
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.chme-kpi-info h3 {
    font-size: 1.85rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.chme-kpi-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.chme-kpi-icon.primary { background: #e0f2fe; color: #0284c7; }
.chme-kpi-icon.success { background: #dcfce7; color: #16a34a; }
.chme-kpi-icon.warning { background: #fef3c7; color: #d97706; }
.chme-kpi-icon.danger  { background: #fee2e2; color: #dc2626; }
.chme-kpi-icon.teal    { background: #ccfbf1; color: #0d9488; }

/* Status Badges */
.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.badge-status.pending {
    background: #fef3c7;
    color: #92400e;
}

.badge-status.approved {
    background: #dcfce7;
    color: #166534;
}

.badge-status.rejected {
    background: #fee2e2;
    color: #991b1b;
}

.badge-status::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}

.badge-status.pending::before { background: #f59e0b; }
.badge-status.approved::before { background: #22c55e; }
.badge-status.rejected::before { background: #ef4444; }

/* Table Modern Components */
.table-modern {
    border-radius: 12px !important;
    overflow: hidden;
    border: none;
}

.table-modern thead {
    background: #031530;
    color: #fff;
}

.table-modern thead th {
    padding: 14px !important;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: .3px;
    color: #fff !important;
    border: none !important;
}

.table-modern tbody tr {
    background: #ffffff;
    transition: 0.2s ease;
}

.table-modern tbody tr:hover {
    background: #f1f5f9;
}

.table-modern td {
    padding: 12px 14px !important;
    font-size: 14px;
    vertical-align: middle;
}

.badge-action {
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
}

.add-btn {
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
}



/* ========================================================
   OVERHAULED MODERN SAAS DATATABLES & TABLE DESIGN
   ======================================================== */
.card-table-wrapper {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 14px !important;
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.03) !important;
    overflow: hidden !important;
    margin-bottom: 24px !important;
}

.card .card-header {
    background: #ffffff !important;
    border-bottom: 1px solid #f1f5f9 !important;
    padding: 16px 22px !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    color: #0f172a !important;
}

.card .card-header strong {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
}

.card .card-body {
    padding: 20px 22px !important;
}

/* DataTables Top Toolbar */
.dataTables_wrapper {
    padding: 0 !important;
}

.dataTables_wrapper .dt-buttons {
    display: inline-flex !important;
    gap: 8px !important;
    margin-bottom: 16px !important;
    float: left !important;
}

.dataTables_wrapper .dt-button,
.dataTables_wrapper .buttons-csv,
.dataTables_wrapper .buttons-print,
.dt-button {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    color: #475569 !important;
    border-radius: 8px !important;
    padding: 6px 14px !important;
    font-size: 12.5px !important;
    font-weight: 500 !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
    transition: all 0.2s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    cursor: pointer !important;
}

.dataTables_wrapper .dt-button:hover,
.dataTables_wrapper .buttons-csv:hover,
.dataTables_wrapper .buttons-print:hover,
.dt-button:hover {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
    transform: translateY(-1px) !important;
}

/* DataTables Search Input */
.dataTables_wrapper .dataTables_filter {
    float: right !important;
    margin-bottom: 16px !important;
}

.dataTables_wrapper .dataTables_filter label {
    font-weight: 500 !important;
    color: #64748b !important;
    font-size: 13px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.dataTables_wrapper .dataTables_filter input {
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    padding: 7px 14px !important;
    font-size: 13px !important;
    color: #1e293b !important;
    background: #f8fafc !important;
    outline: none !important;
    transition: all 0.2s ease !important;
    min-width: 220px !important;
}

.dataTables_wrapper .dataTables_filter input:focus {
    border-color: #0466c8 !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(4, 102, 200, 0.12) !important;
}

/* Universal Modern Table Headers & Rows */
table.dataTable,
.table-bordered,
.table {
    border: 1px solid #f1f5f9 !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    width: 100% !important;
    margin-top: 10px !important;
    margin-bottom: 16px !important;
}

table.dataTable thead th,
.table-bordered thead th,
.table thead th {
    background: #f8fafc !important;
    color: #475569 !important;
    font-size: 11.5px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    padding: 12px 16px !important;
    border-top: none !important;
    border-bottom: 1px solid #e2e8f0 !important;
    border-left: none !important;
    border-right: none !important;
}

table.dataTable tbody td,
.table-bordered tbody td,
.table tbody td {
    padding: 13px 16px !important;
    font-size: 13.5px !important;
    color: #334155 !important;
    border-top: none !important;
    border-bottom: 1px solid #f1f5f9 !important;
    border-left: none !important;
    border-right: none !important;
    vertical-align: middle !important;
    background: #ffffff !important;
}

table.dataTable tbody tr:hover td,
.table-bordered tbody tr:hover td,
.table tbody tr:hover td {
    background-color: #f8fafc !important;
}

table.dataTable tbody tr:last-child td,
.table-bordered tbody tr:last-child td,
.table tbody tr:last-child td {
    border-bottom: none !important;
}

table.dataTable.no-footer {
    border-bottom: 1px solid #f1f5f9 !important;
}

/* Modern Action Buttons in Tables */
.table td .badge,
.table td .btn-action,
.badge-action-pill {
    padding: 5px 12px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    border-radius: 6px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    text-decoration: none !important;
    margin-right: 4px !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
}

.table td .badge.bg-info,
.table td .btn-action-view {
    background-color: #eff6ff !important;
    color: #2563eb !important;
    border: 1px solid #bfdbfe !important;
}

.table td .badge.bg-info:hover,
.table td .btn-action-view:hover {
    background-color: #2563eb !important;
    color: #ffffff !important;
    border-color: #2563eb !important;
}

.table td .badge.bg-warning,
.table td .btn-action-edit {
    background-color: #fffbeb !important;
    color: #d97706 !important;
    border: 1px solid #fde68a !important;
}

.table td .badge.bg-warning:hover,
.table td .btn-action-edit:hover {
    background-color: #d97706 !important;
    color: #ffffff !important;
    border-color: #d97706 !important;
}

.table td .badge.bg-danger,
.table td .btn-action-delete {
    background-color: #fef2f2 !important;
    color: #dc2626 !important;
    border: 1px solid #fecaca !important;
}

.table td .badge.bg-danger:hover,
.table td .btn-action-delete:hover {
    background-color: #dc2626 !important;
    color: #ffffff !important;
    border-color: #dc2626 !important;
}

/* Modern DataTables Pagination & Info */
.dataTables_wrapper .dataTables_paginate {
    margin-top: 14px !important;
    display: flex !important;
    justify-content: flex-end !important;
    gap: 4px !important;
    float: right !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    padding: 6px 12px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #64748b !important;
    background: #ffffff !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02) !important;
    margin: 0 2px !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: #0466c8 !important;
    border-color: #0466c8 !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    box-shadow: 0 2px 6px rgba(4, 102, 200, 0.25) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {
    opacity: 0.45 !important;
    cursor: default !important;
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
    color: #94a3b8 !important;
}

.dataTables_wrapper .dataTables_info {
    color: #64748b !important;
    font-size: 13px !important;
    padding-top: 16px !important;
    float: left !important;
}

/* ========================================================
   OVERHAULED SIDEBAR DESIGN
   ======================================================== */
.sidebar {
    background: #081426 !important;
    box-shadow: 2px 0 15px rgba(0, 0, 0, 0.05);
}

.sidebar .logo-details {
    height: 72px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    padding: 0 20px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    margin-bottom: 12px !important;
}

.sidebar-logo-brand {
    max-height: 100px !important;
    max-width: 180px !important;
    margin-left: 23px;
    width: auto !important;
    object-fit: contain !important;
}

.sidebar .nav-links {
    padding: 0 10px !important;
}

.sidebar .nav-links li {
    margin-bottom: 3px !important;
}

.sidebar .nav-links li a {
    display: flex !important;
    align-items: center !important;
    padding: 10px 14px !important;
    border-radius: 8px !important;
    color: #94a3b8 !important;
    font-size: 13.5px !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
    border-left: 3px solid transparent !important;
    text-decoration: none !important;
}

.sidebar .nav-links li a i {
    min-width: 24px !important;
    font-size: 16px !important;
    text-align: center !important;
    color: #64748b !important;
    margin-right: 8px !important;
    transition: color 0.2s !important;
}

.sidebar .nav-links li a:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    color: #ffffff !important;
}

.sidebar .nav-links li a:hover i {
    color: #38bdf8 !important;
}

.sidebar .nav-links li.active a {
    background: rgba(4, 102, 200, 0.16) !important;
    color: #60a5fa !important;
    font-weight: 600 !important;
    border-left: 3px solid #38bdf8 !important;
    box-shadow: none !important;
}

.sidebar .nav-links li.active a i {
    color: #38bdf8 !important;
}

.sidebar-section-header {
    margin-top: 14px !important;
    margin-bottom: 4px !important;
    padding-left: 14px !important;
    text-transform: uppercase !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 0.8px !important;
    color: #475569 !important;
    list-style: none !important;
}

/* ========================================================
   DASHBOARD FILTER TOOLBAR
   ======================================================== */
.chme-filter-toolbar {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
    margin-bottom: 24px;
}

/* Common sizing & presentation utilities */
.w-70px { width: 70px !important; }
.w-120px { width: 120px !important; }
.w-140px { width: 140px !important; }
.avatar-48 { width: 48px; height: 48px; }
.avatar-65 { width: 65px; height: 65px; }
.avatar-100 { width: 100px; height: 100px; }
.banner-240 { height: 240px; }
.bg-banner-overlay { background: linear-gradient(to top, rgba(3,21,48,0.9), transparent); }
.banner-dark-bg { background-color: #031530; }
.pre-wrap { white-space: pre-wrap; }
.lh-17 { line-height: 1.7; }
.top-85 { top: 85px; }
.support-icon-box { width: 60px; height: 60px; }
.detail-card-score { font-size: 1.35rem; font-weight: 700; }
.banner-180 { height: 180px; }
.bg-gradient-overlay { background: linear-gradient(to top, rgba(0,0,0,0.7), transparent); }
.card-zoom-img { object-fit: cover; transition: transform 0.5s ease; }
.fs-95 { font-size: 0.95rem; }

/* Mobile WhatsApp Fixes */
@media (max-width: 576px) {
    .wa-chat-header {
        flex-direction: column !important;
        height: auto !important;
        padding: 15px !important;
        gap: 15px;
        align-items: flex-start !important;
    }
    .wa-chat-header-actions {
        width: 100%;
        justify-content: flex-end;
    }
}
