body {
    background-color: #f8f9fa;
    /* light orange background for page */
}

div.dataTables_wrapper div.dataTables_info {
    padding-top: 0.85em;
    color: black;
}

.form-label {
    float: left;
    padding-left: 6px;
}

.sidebarfooter {
    text-align: center;
}

.container-text {
    color: black;
}

.navbar-orange {
    background-color: #cc5500;
    /* vibrant orange */
}

.dashboardtable {
    border-color: inherit;
    border-style: solid;
    border-width: 0;
    color: black;
    background: white;
    border-collapse: collapse;
    caption-side: bottom;
    border-collapse: collapse;
    line-height: 1.5;
}

.navbar-orange .navbar-brand,
.navbar-orange .navbar-text,
.navbar-orange .btn-outline-light {
    color: #ffffff;
}

.navbar-orange .btn-outline-light {
    border-color: #ffffff;
}

.navbar-orange .btn-outline-light:hover {
    background-color: #ffffff;
    color: #ff6f00;
}

/* Dark mode table container */
.table-container {
    background: #1e1e1e;
    border: 1px solid #444;
    color: #e4e4e4;
}

/* === Custom Table (light mode) === */
.table-custom {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    color: #212529;
}

.table-custom th,
.table-custom td {
    padding: 12px;
    border: 1px solid #dee2e6;
    vertical-align: middle;
    background: #fff;
    color: #212529;
}

/* === Status Labels === */
.table-custom .text-success {
    color: #28a745 !important;
    font-weight: 600;
}

.table-custom .text-danger {
    color: #dc3545 !important;
    font-weight: 600;
}

/* === Action Buttons inside table === */
.table-custom .btn {
    padding: 4px 8px;
    font-size: 13px;
    border-radius: 5px;
}

.table-custom .btn i {
    font-size: 14px;
}

/* Table Header */
.table-custom thead th {
    background: #fff !important;
    color: black !important;
}

/* Table Hover */
.table-custom tbody tr:hover {
    background-color: #fdf5ee;
}

/* Pagination */
.pagination .page-item.active .page-link {
    background-color: #f57c20;
    border-color: #f57c20;
    color: #fff;
}

.pagination .page-link {
    color: #f57c20;
}

.pagination .page-link:hover {
    background-color: #fdf5ee;
}

/* Sidebar */
.sidebar {
    width: 240px;
    /* background: linear-gradient(180deg, #f57c20, #f7931e); */
    background: #f57c20;

    color: #fff;
    min-height: 100vh;
}

.sidebar .nav-link {
    color: #fff;
    padding: 10px 15px;
    border-radius: 8px;
    transition: background 0.2s;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    background: rgba(255, 255, 255, 0.2);
}

/* Topbar */
.topbar {
    height: 80px;
    border-bottom: 1px solid #000000;
}

/* Table Header */
.table-orange {
    background: #f57c20 !important;
    color: #fff;
}

/* Limit logo size for both admin and customer layouts */
.logo-img {
    max-width: 100px;
    /* adjust as needed */
    max-height: 50px;
    /* adjust as needed */
    width: auto;
    height: auto;
    object-fit: contain;
    /* keeps the aspect ratio */
    display: block;
    margin: 0 auto;
    /* centers the logo if inside a block */
}

.img-fluid {
    max-width: 100%;
    height: auto;
}

.table-orange {
    background: #f57c20 !important;
}

.login_logo {
    max-height: 50px;
}

@import url("https://fonts.googleapis.com/css2?family=Life+Savers:wght@400;700;800&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");

body {
    font-family: "Poppins", sans-serif;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    background-color: #ffff;
}

html {
    font-size: 16px;
}

a {
    color: #fb8303;
}

a:hover {
    color: #fb8303;
}

.form-control:focus {
    box-shadow: none;
}

/* login-1 css start */

.login-bg {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: #fb8303;
    background: linear-gradient(
        10deg,
        rgba(251, 131, 3, 1) 0%,
        rgba(255, 206, 156, 1) 100%
    );
}

.login-logo img {
    width: 200px;
}

.sign-in-btn {
    background: #f74929;
    background: linear-gradient(
        90deg,
        rgba(247, 73, 41, 1) 0%,
        rgba(234, 123, 7, 1) 100%
    );
    color: #fff;
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: 500;
}

.sign-in-btn:hover {
    /* border: 1px solid #F74929; */
    color: #fff;
}

.form-bg {
    background-color: #fed1a2;
    padding: 80px 50px;
    width: 650px;
    border-radius: 30px;
}

.form-bg .form-control {
    padding: 1rem 0.75rem;
    padding-right: 45px;
    border: 1px solid #fff;
}

.form-bg .email-icon,
.password-icon {
    padding: 1rem 0.75rem;
    position: absolute;
    right: 0;
    top: 36%;
}

.forgot-password .form-check-input {
    width: 1.2em;
    height: 1.2em;
    margin-top: 3px;
    border: 1px solid #fb8303;
    margin-right: 7px;
}

#flash-message {
    display: none;
}

.message {
    list-style-type: none;
}

.eye-closed,
.eye-open {
    color: #000000;
}

input::-ms-reveal {
    display: none;
}

/* Dark Mode */
body.dark-mode {
    background-color: #121212 !important;
    color: #e4e4e4 !important;
}

/* Sidebar */
body.dark-mode .sidebar {
    background-color: #1f1f1f !important;
    color: #fff !important;
}

/* Table Container */
body.dark-mode .table-container {
    background: #1e1e1e !important;
    border-color: #444 !important;
}

/* Table */
body.dark-mode .table {
    color: #e4e4e4 !important;
    background-color: #1e1e1e !important;
}

body.dark-mode .table th,
body.dark-mode .table td {
    color: #e4e4e4 !important;
    border-color: #444 !important;
}

/* Topbar */
body.dark-mode .topbar {
    background-color: #222 !important;
}

/* Buttons, inputs, pagination */
body.dark-mode .btn,
body.dark-mode .form-control,
body.dark-mode .page-link {
    background-color: #2c2c2c !important;
    color: #e4e4e4 !important;
    border: 1px solid #444 !important;
}

/* Footer */
body.dark-mode .sidebarfooter {
    text-align: center;
    color: white !important;
}

/* Force override for Bootstrap text-muted */
body.dark-mode .text-muted {
    color: #aaa !important;
}

/* Customer profile text */
body.dark-mode .topbar strong {
    color: #fff !important;
}

/* === Dark Mode Custom Table === */
body.dark-mode .table-custom {
    background: #1e1e1e;
    color: #e4e4e4;
}

body.dark-mode .table-custom th,
body.dark-mode .table-custom td {
    background: #1e1e1e;
    border: 1px solid #444;
    color: #e4e4e4;
}

body.dark-mode .table-custom thead th {
    background: #333 !important;
    color: #fff !important;
}

body.dark-mode .table-custom tbody tr:hover {
    background-color: #2a2a2a;
}

/* Dark mode labels */
body.dark-mode .table-custom .text-success {
    color: #5bd877 !important;
}

body.dark-mode .table-custom .text-danger {
    color: #ff6b6b !important;
}

/* Dark mode login page */
body.dark-mode .form-bg {
    background-color: #2c2c2c;
    /* dark grey background */
    padding: 80px 50px;
    width: 650px;
    border-radius: 30px;
    color: #f1f1f1;
    /* light text */
}

body.dark-mode .form-bg .form-control {
    padding: 1rem 0.75rem;
    padding-right: 45px;
    border: 1px solid #444;
    /* subtle dark border */
    background-color: #3a3a3a;
    /* dark input background */
    color: #f1f1f1;
    /* light input text */
}

body.dark-mode .form-bg .form-control::placeholder {
    color: #bbb;
    /* muted placeholder */
}

body.dark-mode .form-bg .email-icon,
.password-icon {
    padding: 1rem 0.75rem;
    position: absolute;
    right: 0;
    top: 36%;
    color: #f1f1f1;
    /* white icon */
}

body.dark-mode .login-bg {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: #1f1f1f;
    /* fallback dark */
    background: linear-gradient(10deg, #121212 0%, #2a2a2a 100%);
}

body.dark-mode .container-text {
    color: white;
}

/* === Dark Mode: Reply Modal === */
body.dark-mode .modal-content {
    background-color: #1f1f1f !important;
    color: #e4e4e4 !important;
    border: 1px solid #333 !important;
    box-shadow: 0px 4px 10px rgba(255, 255, 255, 0.1);
}

/* Modal Header */
body.dark-mode .modal-header {
    background-color: #333 !important;
    color: #fff !important;
    border-bottom: 1px solid #444 !important;
}

body.dark-mode .modal-header .btn-close {
    filter: invert(1);
}

/* Modal Body */
body.dark-mode .modal-body {
    background-color: #1f1f1f !important;
    color: #e4e4e4 !important;
}

/* Textarea and Form Controls */
body.dark-mode .modal-body .form-control,
body.dark-mode #replyText {
    background-color: #2a2a2a !important;
    color: #e4e4e4 !important;
    border: 1px solid #444 !important;
}

body.dark-mode .modal-body .form-control::placeholder {
    color: #bbb !important;
}

/* Alert Info */
body.dark-mode .modal-body .alert-info {
    background-color: #2c2c2c !important;
    color: #ddd !important;
    border-color: #444 !important;
}

/* Buttons in Modal Footer */
body.dark-mode .modal-body .btn-light {
    background-color: #2c2c2c !important;
    color: #e4e4e4 !important;
    border: 1px solid #444 !important;
}

body.dark-mode .modal-body .btn-primary {
    background-color: #f57c20 !important;
    color: #fff !important;
    border: none !important;
}

body.dark-mode .modal-body .btn-primary:hover {
    background-color: #ff8c32 !important;
}

body.dark-mode .form-control::placeholder {
    color: #bbb;
    /* muted placeholder */
}

body.dark-mode div.dataTables_wrapper div.dataTables_info {
    padding-top: 0.85em;
    color: white;
}

body.dark-mode .eye-closed,
.eye-open {
    color: #6c6c6c;
}

.brand-logo {
    max-width: 200px;
    height: auto;
    transition: opacity 0.3s ease;
}

.theme-toggle button {
    border-radius: 20px;
    padding: 6px 14px;
    transition: all 0.3s ease;
    background-color: #222;
    color: #fff;
}

.thread-message {
    display: flex;
    gap: 12px;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.thread-left {
    width: 50px;
    height: 50px;
}

.thread-left img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

.thread-right {
    flex: 1;
}

.thread-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.thread-author {
    font-weight: bold;
    color: #333;
}

.thread-time {
    font-size: 12px;
    color: gray;
}

.thread-body {
    background: #f7f7f7;
    padding: 12px 15px;
    border-radius: 6px;
    font-size: 14px;
}

.thread-agent .thread-body {
    background: #e9f2ff;
    /* Agent messages light blue */
}

.thread-customer .thread-body {
    background: #f7f7f7;
    /* Customer messages grey */
}

/* ----- Dark Mode for Conversation Threads Modal ----- */

body.dark-mode #threadsModal .modal-content {
    background-color: #1f1f1f !important;
    color: #e4e4e4 !important;
    border: 1px solid #333 !important;
}

body.dark-mode #threadsModal .modal-header {
    background-color: #333 !important;
    color: #fff !important;
    border-bottom: 1px solid #444 !important;
}

body.dark-mode #threadsModal .btn-close {
    filter: invert(1);
}

/* Modal Body */
body.dark-mode #threadsModal .modal-body {
    background-color: #1e1e1e !important;
    padding: 0 !important;
}

/* Thread Container Text */
body.dark-mode #threadsContainer p {
    color: #ccc !important;
}

/* Thread Message Wrapper */
body.dark-mode .thread-message {
    border-bottom: 1px solid #333 !important;
    background: transparent !important;
}

/* Chat Bubble (Right side container) */
body.dark-mode .thread-right {
    background-color: #262626 !important;
    border: 1px solid #333 !important;
    color: #e4e4e4 !important;
}

/* Agent Messages */
body.dark-mode .thread-agent .thread-right {
    background-color: #2e3b4b !important;
    border-color: #3a4a5a !important;
}

/* Customer Messages */
body.dark-mode .thread-customer .thread-right {
    background-color: #34422b !important;
    border-color: #415638 !important;
}

/* Avatar Styling */
body.dark-mode .thread-message img {
    border: 2px solid #444 !important;
    box-shadow: 0px 0px 6px rgba(255, 255, 255, 0.08) !important;
}

/* Thread Header (name + time) */
body.dark-mode .thread-header {
    color: #e4e4e4 !important;
}

body.dark-mode .thread-author {
    color: #fff !important;
}

body.dark-mode .thread-author small {
    color: #ffffff !important;
}

body.dark-mode .thread-time {
    color: #aaa !important;
}

/* Body text */
body.dark-mode .thread-body {
    color: #000000 !important;
}

/* "No threads" message */
body.dark-mode #threadsContainer .text-muted {
    color: #bbb !important;
}

/* ----- Chat Layout ----- */
.thread-message {
    display: flex;
    margin-bottom: 18px;
    width: 100%;
}

/* Agent = left side */
.thread-agent {
    justify-content: flex-start;
}

/* Customer = right side */
.thread-customer {
    justify-content: flex-end;
}

/* Message bubble wrapper */
.thread-right {
    max-width: 65%;
}

/* Avatar */
.thread-left img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    margin: 0 10px;
}

/* ----- Chat Bubbles ----- */

/* Agent bubble (left) */
.thread-agent .thread-body {
    background: #e8e8e8;
    color: #000;
    padding: 12px 16px;
    border-radius: 12px;
    border-top-left-radius: 0;
}

/* Customer bubble (right) */
.thread-customer .thread-body {
    background: #e8e8e8;
    color: #000000;
    padding: 12px 16px;
    border-radius: 12px;
    border-top-right-radius: 0;
}

/* Name + Time */
.thread-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.thread-author small {
    opacity: 0.75;
}

/* Align avatar correctly */
.thread-agent .thread-left {
    order: 1;
}

.thread-agent .thread-right {
    order: 2;
}

