body{
    background: rgb(26,33,43);
}

/* Only apply dark theme overrides when dark theme is active */
[data-theme="dark"] body {
    background: rgb(26,33,43);
}

[data-theme="light"] body {
    background: #ffffff;
}

body.home a.home, body.profile a.profile, body.admin a.admin, body.credits a.credits, body.orders a.orders, body.admin_orders a.admin_orders, body.admin_users a.admin_users, body.error_codes a.error_codes {
    color:#FFF !important;
    font-weight: bold;
}

/* View Order Page - Only apply in dark theme */
[data-theme="dark"] body.view_order input:disabled{
    background-color: #2d3748 !important;
    color: #e2e8f0 !important;
    border-color: #4a5568 !important;
}

[data-theme="dark"] body.view_order textarea:disabled {
    background-color: #2d3748 !important;
    color: #e2e8f0 !important;
    border-color: #4a5568 !important;
}

[data-theme="dark"] body.view_order .form-control:disabled {
    background-color: #2d3748 !important;
    color: #e2e8f0 !important;
    border-color: #4a5568 !important;
}

/* Regular (non-disabled) form controls in dark theme */
[data-theme="dark"] body.view_order input:not(:disabled),
[data-theme="dark"] body.view_order input.form-control:not(:disabled) {
    background-color: #2d3748 !important;
    color: #e2e8f0 !important;
    border-color: #4a5568 !important;
}

[data-theme="dark"] body.view_order textarea:not(:disabled),
[data-theme="dark"] body.view_order textarea.form-control:not(:disabled) {
    background-color: #2d3748 !important;
    color: #e2e8f0 !important;
    border-color: #4a5568 !important;
}

[data-theme="dark"] body.view_order .form-control:not(:disabled) {
    background-color: #2d3748 !important;
    color: #e2e8f0 !important;
    border-color: #4a5568 !important;
}

[data-theme="dark"] body.view_order .bg-light {
    background-color: #2d3748 !important;
    color: #e2e8f0 !important;
}

[data-theme="dark"] body.view_order .text-gray-700,
[data-theme="dark"] body.view_order .text-gray-800 {
    color: #ffffff !important;
}

[data-theme="dark"] body.view_order .card-body {
    color: #ffffff;
}

[data-theme="dark"] body.view_order .card-body .text-gray-800 {
    color: #ffffff !important;
}

[data-theme="dark"] body.view_order label {
    color: #ffffff !important;
}

[data-theme="dark"] body.view_order .text-gray-300 {
    color: #ffffff !important;
}

[data-theme="dark"] body.view_order .text-muted {
    color: #adb5bd !important;
}

[data-theme="dark"] body.view_order .card-header h6 {
    color: #ffffff !important;
}

[data-theme="dark"] body.view_order small {
    color: #adb5bd !important;
}

[data-theme="dark"] body.view_order h6.font-weight-bold {
    color: #ffffff !important;
}

[data-theme="dark"] body.view_order #chat-messages {
    background-color: #f8f9fc !important;
    color: #212529 !important;
}

[data-theme="dark"] body.view_order #chat-messages .rounded {
    color: #212529 !important;
}

[data-theme="dark"] body.view_order .rounded[style*="#e3f2fd"],
[data-theme="dark"] body.view_order .rounded[style*="#f5f5f5"] {
    color: #212529 !important;
}

[data-theme="dark"] body.view_order textarea[name="chat_message"] {
    background-color: #2d3748 !important;
    color: #e2e8f0 !important;
    border-color: #4a5568 !important;
}

[data-theme="dark"] body.view_order textarea[name="chat_message"]::placeholder {
    color: #a0aec0 !important;
}

/* Home Page - Only apply in dark theme */
[data-theme="dark"] body.home .text-primary {
    color: #ffffff !important;
}

[data-theme="dark"] body.home h6.text-primary {
    color: #ffffff !important;
}

[data-theme="dark"] body.home .h4.text-primary {
    color: #ffffff !important;
}

[data-theme="dark"] body.home .card-body {
    color: #ffffff;
}

[data-theme="dark"] body.home .text-gray-800 {
    color: #ffffff !important;
}

[data-theme="dark"] body.home .text-gray-700 {
    color: #ffffff !important;
}

[data-theme="dark"] body.home .text-gray-300 {
    color: #ffffff !important;
}

[data-theme="dark"] body.home label,
[data-theme="dark"] body.home h1,
[data-theme="dark"] body.home h2,
[data-theme="dark"] body.home h3,
[data-theme="dark"] body.home h4,
[data-theme="dark"] body.home h5,
[data-theme="dark"] body.home h6 {
    color: #ffffff !important;
}

[data-theme="dark"] body.home .alert-info {
    background-color: #1e3a8a !important;
    border-color: #3b82f6 !important;
    color: #ffffff !important;
}

[data-theme="dark"] body.home .alert-info strong {
    color: #ffffff !important;
}

[data-theme="dark"] body.home .list-unstyled li {
    color: #ffffff !important;
}

[data-theme="dark"] body.home .list-unstyled .text-success {
    color: #10b981 !important;
}

/* Light Theme Specific Rules */
[data-theme="light"] body.home .text-primary {
    color: #1a212b !important;
}

[data-theme="light"] body.home h6.text-primary {
    color: #1a212b !important;
}

[data-theme="light"] body.home .h4.text-primary {
    color: #1a212b !important;
}

[data-theme="light"] body.home .text-gray-800 {
    color: #212529 !important;
}

[data-theme="light"] body.home .text-gray-700 {
    color: #495057 !important;
}

[data-theme="light"] body.home .text-gray-300 {
    color: #6c757d !important;
}

[data-theme="light"] body.home .text-muted {
    color: #6c757d !important;
}

[data-theme="light"] body.home .card-body {
    color: #212529;
}

[data-theme="light"] body.home .card-header h6 {
    color: #1a212b !important;
}

[data-theme="light"] body.home h1,
[data-theme="light"] body.home h2,
[data-theme="light"] body.home h3,
[data-theme="light"] body.home h4,
[data-theme="light"] body.home h5,
[data-theme="light"] body.home h6 {
    color: #1a212b !important;
}

/* Light theme for view order page */
[data-theme="light"] body.view_order .text-gray-800 {
    color: #212529 !important;
}

[data-theme="light"] body.view_order .text-gray-700 {
    color: #495057 !important;
}

[data-theme="light"] body.view_order .text-gray-300 {
    color: #6c757d !important;
}

[data-theme="light"] body.view_order .text-muted {
    color: #6c757d !important;
}

[data-theme="light"] body.view_order .card-body {
    color: #212529;
}

[data-theme="light"] body.view_order label {
    color: #495057 !important;
}

[data-theme="light"] body.view_order .card-header h6 {
    color: #1a212b !important;
}

[data-theme="light"] body.view_order h6.font-weight-bold {
    color: #1a212b !important;
}

/* Fix navbar to maintain original color in both themes */
.navbar {
    background-color: #1a212b !important;
}

[data-theme="dark"] .navbar {
    background-color: #1a212b !important;
}

[data-theme="light"] .navbar {
    background-color: #1a212b !important;
}
.view-order span.input-group-text{
    width:30%;
}
.place-order span.input-group-text{
    width:30%;
}
.editable:hover{
    background-color:#09C;
    cursor: pointer;
}
.order-Finished{
    background-color:green !important;
}
.order-Pending{
    background-color:yellow !important;
}
#modal-popup{
    z-index:99;
    background-color: #393939;
    position:absolute;
    top:10px;
    left:25vw;
    --bs-font-sans-serif: system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue","Noto Sans","Liberation Sans",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";
}

.modal-error{
    background-color: rgb(220, 73, 73) !important;
}

.modal-success{
    background-color: rgb(73, 220, 129) !important;
}

#hpdiff{
    color:green !important;
}

#NMdiff{
    color:green !important;
}

h5{
    color:#000;
}

/* Clickable table rows hover effect */
.table tbody tr.clickable-row:hover {
    background-color: rgba(0, 123, 255, 0.1) !important;
    transform: scale(1.01);
    transition: background-color 0.2s ease, transform 0.2s ease;
}

[data-theme="dark"] .table tbody tr.clickable-row:hover {
    background-color: rgba(0, 123, 255, 0.2) !important;
}

/* Ensure Information column text is not styled as a link and hide any links */
.table tbody tr.clickable-row td:nth-child(3) {
    color: inherit !important;
    text-decoration: none !important;
}

.table tbody tr.clickable-row td:nth-child(3) a {
    color: inherit !important;
    text-decoration: none !important;
    pointer-events: none !important;
    cursor: inherit !important;
}

/* Dark background for success alerts on reset password page */
body.reset_password .alert-success {
    background-color: #1a212b !important;
    color: #ffffff !important;
    border-color: #2d3748 !important;
}

body.reset_password .alert-success i {
    color: #10b981 !important;
}

/* Clickable dashboard cards */
.clickable-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.clickable-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

a.text-decoration-none:hover {
    text-decoration: none !important;
}

/* Ensure text colors remain unchanged on hover */
a.text-decoration-none .clickable-card:hover .text-gray-800,
a.text-decoration-none .clickable-card:hover .text-primary,
a.text-decoration-none .clickable-card:hover .text-warning,
a.text-decoration-none .clickable-card:hover .text-success,
a.text-decoration-none .clickable-card:hover .text-info {
    color: inherit !important;
}