


::after,
::before {
    --tw-content: ''
}

hr {
    height: 0;
    color: inherit;
    border-top-width: 1px
}

abbr:where([title]) {
    -webkit-text-decoration: underline dotted;
    text-decoration: underline dotted
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-size: inherit;
    font-weight: inherit;
    color: #1f2937;
}

a {
    color: inherit;
    text-decoration: inherit
}

b,
strong {
    font-weight: bolder
}

code,
kbd,
pre,
samp {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-feature-settings: normal;
    font-variation-settings: normal;
    font-size: 1em
}

small {
    font-size: 80%
}

sub,
sup {
    font-size: 75%;
    line-height: 0;
    position: relative;
    vertical-align: baseline
}

sub {
    bottom: -.25em
}

sup {
    top: -.5em
}


/* button,
input,
optgroup,
select,
textarea {
    font-family: inherit;
    font-feature-settings: inherit;
    font-variation-settings: inherit;
    font-weight: inherit;
    line-height: inherit;
    letter-spacing: inherit;
    color: inherit;
    margin: 0;
    padding: 0
} */

button,
/* select {
    text-transform: none
} */

/* button,
input:where([type=button]),
input:where([type=reset]),
input:where([type=submit]) {
    -webkit-appearance: button;
    background-color: transparent;
    background-image: none
} */

:-moz-focusring {
    outline: auto
}

:-moz-ui-invalid {
    box-shadow: none
}

progress {
    vertical-align: baseline
}

::-webkit-inner-spin-button,
::-webkit-outer-spin-button {
    height: auto
}

[type=search] {
    -webkit-appearance: textfield;
    outline-offset: -2px
}

::-webkit-search-decoration {
    -webkit-appearance: none
}

::-webkit-file-upload-button {
    -webkit-appearance: button;
    font-size:12px;
}

summary {
    display: list-item
}

blockquote,
dd,
dl,
figure,
h1,
h2,
h3,
h4,
h5,
h6,
hr,
p,
pre {
    margin: 0
}

fieldset {
    margin: 0;
    padding: 0
}

legend {
    padding: 0
}

menu,
ol,
ul {
    list-style: none;
    margin: 0;
    padding: 0
}

dialog {
    padding: 0
}

textarea {
    resize: vertical
}

input::placeholder,
textarea::placeholder {
    opacity: 1;
    color: #9ca3af
}

/* [role=button],
button {
    cursor: pointer
} */

:disabled {
    cursor: default
}

audio,
canvas,
embed,
iframe,
img,
object,
svg,
video {
    display: block;
}

img,
video {
    max-width: 100%;
    height: auto
}

[hidden]:where(:not([hidden=until-found])) {
    display: none
}

.mr-2 {
    margin-right: 0.5rem
}

.mt-4 {
    margin-top: 1rem;
}

.mt-6 {
    margin-top: 1.5rem
}

.flex {
    display: flex
}

.h-screen {
    height: 100vh
}

.w-64 {
    width: 20rem
}

.w-72 {
    width: 18rem
}

.w-full {
    width: 100%
}

.flex-1 {
    flex: 1 1 0%
}

.flex-col {
    flex-direction: column
}

.items-center {
    align-items: center
}

.justify-between {
    justify-content: space-between
}

.space-x-2> :not([hidden])~ :not([hidden]) {
    --tw-space-x-reverse: 0;
    margin-right: calc(0.5rem * var(--tw-space-x-reverse));
    margin-left: calc(0.5rem * calc(1 - var(--tw-space-x-reverse)))
}

.space-y-2> :not([hidden])~ :not([hidden]) {
    --tw-space-y-reverse: 0;
    margin-top: calc(0.5rem * calc(1 - var(--tw-space-y-reverse)));
    margin-bottom: calc(0.5rem * var(--tw-space-y-reverse))
}

.space-y-4> :not([hidden])~ :not([hidden]) {
    --tw-space-y-reverse: 0;
    margin-top: calc(1rem * calc(1 - var(--tw-space-y-reverse)));
    margin-bottom: calc(1rem * var(--tw-space-y-reverse))
}

.rounded {
    border-radius: 0.25rem
}

.rounded-lg {
    border-radius: 0.5rem
}

.bg-blue-500 {
    --tw-bg-opacity: 1;
    background-color: rgb(59 130 246 / var(--tw-bg-opacity, 1))
}

.bg-gray-700 {
    --tw-bg-opacity: 1;
    background-color: rgb(55 65 81 / var(--tw-bg-opacity, 1))
}

.bg-gray-800 {
    --tw-bg-opacity: 1;
    background-color: rgb(31 41 55 / var(--tw-bg-opacity, 1))
}

.bg-gray-900 {
    --tw-bg-opacity: 1;
    background-color: rgb(17 24 39 / var(--tw-bg-opacity, 1))
}

.bg-orange-500 {
    --tw-bg-opacity: 1;
    background-color: rgb(249 115 22 / var(--tw-bg-opacity, 1))
}

.bg-purple-500 {
    --tw-bg-opacity: 1;
    background-color: rgb(168 85 247 / var(--tw-bg-opacity, 1))
}

.bg-transparent {
    background-color: transparent
}

.p-2 {
    padding: 0.5rem;
    margin: 0.2rem 0;
    font-size: 14px;
}

.p-3 {
    padding: 0.75rem
}

.p-4 {
    padding: 1rem
}

.p-6 {
    padding: 1.5rem
}

.text-2xl {
    font-size: 1.5rem;
    line-height: 2rem
}

.text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem
}

.text-xl {
    font-size: 1.25rem;
    line-height: 1.75rem
}

.font-bold {
    font-weight: 700
}

.text-blue-400 {
    --tw-text-opacity: 1;
    color: rgb(96 165 250 / var(--tw-text-opacity, 1))
}

.text-gray-400 {
    --tw-text-opacity: 1;
    color: rgb(156 163 175 / var(--tw-text-opacity, 1))
}

.text-white {
    --tw-text-opacity: 1;
    color: rgb(255 255 255 / var(--tw-text-opacity, 1))
}

.outline-none {
    outline: 2px solid transparent;
    outline-offset: 2px
}

.hover\:bg-gray-700:hover {
    --tw-bg-opacity: 1;
    background-color: rgb(55 65 81 / var(--tw-bg-opacity, 1))
}
nav button {
    justify-content: left;
    text-align: left;
}
 

  /* Chat Button */
  #openChatBtn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: rgb(31 41 55 / var(--tw-bg-opacity, 1));
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 20px;
    cursor: pointer;
}

/* Chatbox Container */
.chatbox {
    display: block;
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 350px;
    background: rgb(31 41 55 / var(--tw-bg-opacity, 1));
    border-radius: 10px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

/* Chat Header */
.chat-header {
    /* background: rgb(31 41 55 / var(--tw-bg-opacity, 1)); */
    /* background: #003366;
    color: white;
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;border: 1px solid #111827; */
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--header-gradient);
    color: #fff;
    font-weight: bold;
    padding: 10px 12px;
}

.chat-header button {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
}

/* Chat Body */
.chat-body {
    height: calc(100vh - 30vh);
    padding: 5px;
    /* background: rgb(31 41 55 / var(--tw-bg-opacity, 1)); */
    background:#fff;
}

.bot-message {
    background: #e0e0e0;
}

/* Chat Footer */
.chat-footer {
    /* display: flex; */
    /* padding: 8px; */
    background: whitesmoke;
    border-top: 1px solid #ccc;
    /* padding: 10px; */
}

.chat-footer input {
    flex: 1;
    padding: 12px;
    /* border: 1px solid #ccc; */
    border-radius: 5px;
}

/* .chat-footer button {
    background: #007bff;
    color: white;
    border: none;
    padding: 5px 10px;
    margin-left: 5px;
    border-radius: 5px;
    cursor: pointer;
}    */

/* scrollbar */
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
  }
  
  ::-webkit-scrollbar-track {
    -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
    -webkit-border-radius: 10px;
    border-radius: 10px;
  }
  
  ::-webkit-scrollbar-thumb {
    -webkit-border-radius: 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.3);
    -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.5);
  }
  
  ::-webkit-scrollbar-thumb:window-inactive {
    background: rgba(255, 255, 255, 0.3);
  }

  /*  */
  
.text-box {
    margin-left: 44vw;
    margin-top: 42vh;
  }
  
  .text-box .btn:link,
  .text-box .btn:visited {
    text-transform: uppercase;
    text-decoration: none;
    padding: 15px 40px;
    display: inline-block;
    border-radius: 100px;
    transition: all 0.2s;
    position: absolute;
  }
  
  .text-box  .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  }
  
  .text-box  .btn:active {
    transform: translateY(-1px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
  }
  
  .text-box .btn-white {
    /* background-color: #fff; */
    color: #777;
  }
  
  .text-box  .btn::after {
    content: "";
    display: inline-block;
    height: 100%;
    width: 100%;
    border-radius: 100px;
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
    transition: all 0.4s;
  }
  
  .text-box  .btn-white::after {
    /* background-color: rgb(194, 149, 59); */
    background-color: var(--themeBgBtnColor);
  }
  .btn-animated .fa {
    color: #fff;
  }
  
  .text-box  .btn:hover::after {
    transform: scaleX(1.4) scaleY(1.6);
    opacity: 0;
  }
  
  .text-box  .btn-animated {
    -webkit-animation: moveInBottom 5s ease-out;
            animation: moveInBottom 5s ease-out;
    -webkit-animation-fill-mode: backwards;
            animation-fill-mode: backwards;
  }
  
  @-webkit-keyframes moveInBottom {
    0% {
      opacity: 0;
      transform: translateY(30px);
    }
    100% {
      opacity: 1;
      transform: translateY(0px);
    }
  }
  
  @keyframes moveInBottom {
    0% {
      opacity: 0;
      transform: translateY(30px);
    }
    100% {
      opacity: 1;
      transform: translateY(0px);
    }
  }

  .powerIcon {
    width: 30px;
    display: block;
    cursor: pointer;
  }
  .powerIcon img{
    width: 100%;
  }
  .dflexTxt {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #374151;
    padding-bottom: 15px;
    align-items: center;
    min-height: 50px;
    box-sizing: border-box;
    
  }:root {
    --themeBgColor: #fff;
    /* 002428*/
    --themeBgBtnColor: #13345F;

}

/* Base Styles */

html, body {
    height: 100%;
    margin: 0;
    overflow: hidden; /* 🔥 prevents bottom white space */
  }

body {
    font-family: 'Inter', sans-serif;
    background: var(--gray-50);
    margin: 0;
    color: var(--gray-800);
    line-height: 1.6
  }

/* Login page styles */

.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f5f5f5;
    background-color: var(--themeBgColor);
    flex-direction: row;
}

.login-container {

    padding: 2.5rem;
    border-radius: 0;
    width: 100%;
    max-width: 400px;
    border-left: 2px solid #5a5a5a;
    height: auto;
}

.login-container:first-child {
    border: none;
}

.error-message {
    text-align: center;
    color: #fff;
    padding: 10px 15px;
}

.logout-btn {
    background: transparent;
    border: none;
    padding: 6px;
    cursor: pointer;
  
    color: #EAF0FF;              /* or your header icon color */
    font-size: 16px;
  
    outline: none;
    box-shadow: none;
  }

/* Header styles */

.header {
    /* background: linear-gradient(135deg, #1A1032, #2B1A4A); */
    background: var(--themeBgColor);
    padding: 1rem 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header h1 {
    margin: 0;
    color: white;
    font-size: 1.5rem;
}

/* Layout */

.content-wrapper {
    display: flex;
    flex: 1;
    overflow: hidden;
    /* Prevent wrapper scrolling */
    height: calc(100vh - 58px);
    /* Subtract header height */
}

.main-content {
    flex: 1;
    padding: 0px;
    overflow-y: auto;
    /* Allow vertical scroll only in main content */
    /* background: whitesmoke; */
    overflow-x: hidden;
    /* Prevent horizontal scroll */
    /* padding: var(--space-3) */

}

/* Chat Sidebar */

.chat-sidebar {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* Prevent sidebar scrolling */
}

.chat-messages {
    padding: 0px;
    overflow-y: auto;
    height: calc(100vh - 12.3rem);
    overflow-y: auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
}

.chat-input-container {
    display: flex;
    align-items: center;
    /* gap: 8px;
  padding: 10px;
  border-top: 1px solid #ccc; */
    background: #fff;
    width: 100%;
}

.chat-input {
    display: flex;
    align-items: center;
    /* gap: 8px;
  padding: 10px;
  border-top: 1px solid #ccc; */
    background: #fff;
    width: 100%;
}

.chat-input-container button {
    border: none;
    background: var(--button-gradient);
    color: #fff;
    padding: 10px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    height: 60px;
}

.chat-input-container button:active {
    transform: translateY(1px);
}

.chat-message {
    color: #000;
    float: left;
    background-color: #F3F6FB;
    max-width: 70%;
    min-width: 40%;
    padding: 6px 25px 25px 10px;
    margin: 5px;
    border-radius: 6px 6px 6px 0;
    font-size: 12px;
    position: relative;
}

.user-message {
    background: #eee;
    color: black;
}

.system-message {
    align-self: flex-start;
}

.thinking-message {
    color: #ffffff;
    float: left;
    background-color: #374151;
    max-width: 70%;
    min-width: 40%;
    padding: 6px 10px 10px 10px;
    margin: 5px;
    border-radius: 6px 6px 6px 0;
    font-size: 12px;
    position: relative;
}

.upload-container {
    background: #fff;
    /* border-radius: var(--radius-lg); */
    /* box-shadow: var(--shadow); */
    /* margin-bottom: var(--space-6); */
    overflow: hidden;

    /* Add padding for inner spacing */
    padding: 0;
    /* or use a fixed value like 1rem */
}

.main-content-form{
    /* padding: var(--space-4); */
    padding-left: 35px; 
    padding-right: 35px; 
    /* restore padding for inner form */
}

@media(max-width:700px) {
    .upload-container {
        flex-direction: column;
    }
}

@media(max-width:900px) {
    .upload-container {
        flex-direction: column;
    }

    .chatbox {
        width: 100%;
        height: 320px;
        margin-left: 0;
        margin-top: 20px
    }
}

.upload-container h2 {
    display: block;
    font-size: 1.17em;
    margin-block-start: 1em;
    margin-block-end: 1em;
    margin-inline-start: 0px;
    margin-inline-end: 0px;
    font-weight: bold;
    unicode-bidi: isolate;
}

/* Form Row Layout */

.form-row {
    display: flex;
    align-items: flex-end;
    gap: 20px;
    margin-bottom: 20px;
}

.search-form {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, 5fr);
    gap: 14px;
  
    width: 100%;
    margin-bottom: 20px;
  
    padding: 14px 18px;   /* ↓ from 22px */
    background: rgb(240, 247, 255);             /* darker than before */
    border: 1px solid #D9E1F2;
    border-radius: 14px;
  
    box-shadow: 0 6px 18px rgba(31, 42, 68, 0.08);
    margin-top: 15px;     /* ← key change */
  }

.search-form input {
    height: 38px;              /* ↓ from 46px */
    padding: 0 12px;
  
    font-size: 13px;           /* admin-friendly */
    border-radius: 8px;
  
    background: #FFFFFF;
    border: 1px solid #D1D9E6; /* neutral gray */
    box-shadow: none;

  }

.search-form button {
    height: 38px;
    padding: 0 18px;
    font-size: 13px;
    border-radius: 8px;
  }

@media(max-width:1024px) {

    .chatbox {
        min-width: 240px
    }
}

@media(max-width:700px) {
}

.action-edit i {
    color: #1d4ed8;
}

/* blue */

.action-delete i {
    color: #dc2626;
}

/* red */

.tooltip {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(33, 33, 33, 0.95);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 100;
    margin-bottom: 8px;
}

/* Update button styles to apply to all forms */

/* Responsive adjustments */

/* Add icons from Material Icons */

.modal-content {
    background: #fff;
    margin: 40px auto;
    padding: 0;
    border-radius: var(--radius-lg);
    max-width: 500px;
    width: 90%;
    position: relative;
    box-shadow: var(--shadow-lg);
    animation: modalFadeIn .3s
  }

@keyframes modalFadeIn {
    from {
      opacity: 0;
      transform: translateY(-20px)
    }
  
    to {
      opacity: 1;
      transform: translateY(0)
    }
  }

.modal-header {
    padding: 10px 16px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
  }

.modal-title {
    font-size: var(--text-xl);
    font-weight: 600;
    margin: 0;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: var(--space-3)
  }

.modal-close {
    font-size: var(--text-xl);
    font-weight: bold;
    cursor: pointer;
    color: var(--gray-500);
    background: none;
    border: none;
    padding: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s
  }

.modal-close:hover {
    background: var(--gray-100);
    color: var(--gray-700)
  }

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 18px 20px;
}

.modal-footer {
    /* margin-top: 15px;
    text-align: right; */
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 12px 20px;
    background: #fff;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

@keyframes tabFadeIn {
    from {
      opacity: 0
    }
  
    to {
      opacity: 1
    }
  }

.button-group .btn-save {
    background: var(--button-gradient);
    color: #fff;
    padding: 8px 16px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-weight: 600;
}

.button-group .btn-cancel {
    background: #ccc;
    color: #000;
    padding: 8px 16px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-weight: 600;
}

.close-modal {
    position: absolute;
    right: 14px;
    top: 8px;
    font-size: 22px;
    line-height: 1;
    color: #fff;
    cursor: pointer;
    user-select: none;
}

.close-modal:hover {
    color: var(--themeBgBtnColor);
}

/* 3-col grid */

.form-grid.form-grid--3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px 16px;
}

/* --- Controls: single source of truth --- */

:root {
    --ctl-h: 32px;
    --ctl-r: 6px;
    --ctl-px: 12px;
    --ctl-py: 8px;
    --ctl-fs: 14px;
    --ctl-bd: 1px solid #d1d5db;
    --ctl-bg: #fff;
    --ctl-fg: #111827;
    --ctl-focus: #2563eb;
}

/* Grid alignment */

.form-grid.form-grid--3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px 16px;
    align-items: start;
    /* top-align rows uniformly */
}

/* Field wrapper */

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    /* prevent overflow in grid */
}

.field label {
    margin: 0;
    font-weight: 500;
    line-height: 1.2;
    font-size: var(--ctl-px);
}

label{

    font-weight: 500;
    font-size: var(--ctl-px);
    line-height: 1.2;
}

/* Normalize ALL controls */

input.text-input,
select.text-input,
textarea.text-input {
    width: 100%;
    box-sizing: border-box;
    font-size: var(--ctl-px);
    color: var(--ctl-fg);
    background: var(--ctl-bg);
    border: var(--ctl-bd);
    border-radius: var(--ctl-r);
    outline: none;
    
}

/* Single-line controls share SAME HEIGHT */

input.text-input,
select.text-input,
textarea.text-input {
    height: var(--ctl-h);
    line-height: calc(var(--ctl-h) - 2*var(--ctl-py));
}

/* Focus state */

input.text-input:focus,
select.text-input:focus,
textarea.text-input:focus {
    border-color: var(--ctl-focus);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .15);
}

/* Make select look consistent (keeps native arrow, adds padding) */

select.text-input {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-right: 34px;
    /* room for arrow */
    background-image:
        linear-gradient(45deg, transparent 50%, #6b7280 50%),
        linear-gradient(135deg, #6b7280 50%, transparent 50%),
        linear-gradient(to right, #d1d5db, #d1d5db);
    background-position:
        right 12px center,
        right 6px center,
        right 30px center;
    background-size: 6px 6px, 6px 6px, 1px 60%;
    background-repeat: no-repeat;
}

/* Description spans 2 columns on wider screens */

.span-2 {
    grid-column: span 2;
}

/* Responsive */

@media (max-width: 1024px) {
    .form-grid.form-grid--3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .span-2 {
        grid-column: span 2;
    }
}

@media (max-width: 640px) {
    .modal-contentt {
        width: 95%;
    }

    .form-grid.form-grid--3 {
        grid-template-columns: 1fr;
    }

    .span-2 {
        grid-column: span 1;
    }
}

/* Add these styles */

.text-input {
    /* width: 100%;
    padding: 8px;
    border: 1px solid #5e6879;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 10px;
    background-color: transparent; */
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 100%;

}

.hidden {
    display: none;
}

/* Desktop / Base */

.data-table {
    width: 95%;
    border-collapse: collapse;
    font-size: 12px;
    justify-content: center;
    border: 1px solid #ddd;
}

.data-table td .scroll {
    max-height: 140px;
    overflow-y: auto;
  }

.data-table thead tr th:first-child {
    border-top-left-radius: 8px;
}

.data-table thead tr th:last-child {
    border-top-right-radius: 8px;
}

.data-table th {
    background: #1F2A44;
    color: #E6ECFF;
    padding: 12px 14px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-align: left;
    border-bottom: 2px solid rgba(11, 59, 140, 0.6);
  }

/* Default cell style */

.data-table td {
    padding: 10px;
    border-top: 1px solid #ddd;
    background: #fff;
    font-size: 12px;
    vertical-align: middle;
}

/* Alternate row background */

.data-table tbody tr:nth-child(even) td {
    background: #f0f7ff;
}

/* Remove hover animations (no movement, no hover shadow) */

.data-table tbody tr {
    border-radius: 8px;
    box-shadow: none;
    transition: none;
}

.data-table tbody tr:hover {
    transform: none;
    box-shadow: none;
}

.data-table .card{
    background: #f8fafc;
    border-radius: 10px;
    overflow: hidden;
  }

.data-table.card tbody td {
    height: 160px;         /* same height for all panels */
    padding: 12px;
  }

.data-table.card .summary-card-content {
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 6px; /* space for scrollbar */
  }

.summary-card-content ol,
.summary-card-content ul {
  margin: 0;
  padding-left: 20px; /* or whatever looks right */
}

/* Action buttons */

.table-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 32px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.15s ease, filter 0.15s ease, opacity 0.15s ease;
    background: #fff;
}

.icon-btn i {
    font-size: 14px;
    line-height: 1;
}

.icon-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.03);
}

.icon-btn:active {
    transform: translateY(0);
    filter: brightness(0.95);
}

.icon-btn.action-button-del {
    color: #DC2626; /* red-600 */
  }

.icon-btn.action-button-edit {
    color: #1F3A8A; /* deep blue, matches your primary palette */
  }

.icon-btn.action-button-edit:hover {
    background: rgba(31, 58, 138, 0.1);
  }

.icon-btn.action-button-action {
    color: #0E7490; /* teal-700 */
  }

.icon-btn.action-button-action:hover {
    background: rgba(14, 116, 144, 0.12);
  }

.action-button{
    background: var(--themeBgBtnColor);
    color: #fff;
    border: none;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;

}

details-btn{
    background: var(--themeBgBtnColor);
    color: #fff;
    border: none;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
}

.secondary{
    background: #f3f4f6;
    color: #000;
}

/* .action-button-edit {
    color: #2563eb;
}

.action-button-del {
    color: #e74c3c;
}

.action-button-action {
    color: #ff8c00;
} */

/* Mobile: transform rows into cards with labels */

@media (max-width: 720px) {
    .data-table thead {
        display: none;
    }

    .data-table,
    .data-table tbody,
    .data-table tr,
    .data-table td {
        display: block;
        width: 100%;
    }

    .data-table tr {
        background: #fff;
        margin: 0 0 12px;
        border-radius: 8px;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
        overflow: hidden;
    }

    .data-table td {
        border: none;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 12px;
    }

    .data-table td:first-child {
        border-top: none;
    }

    .data-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #4b5563;
        margin-right: 12px;
        flex: 0 0 auto;
    }

    .table-buttons {
        justify-content: flex-end;
    }
}

/* New styles */

.form-select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: var(--ctl-px);
    background-color: #f9fafb;
    cursor: pointer;
    color: #080808;
    margin-bottom: 10px;
}

.form-select:focus {
    /* border-color: #C2953B; */
    outline: none;
    box-shadow: 0 0 0 2px rgba(26, 16, 50, 0.2);
}

/* Pagination styles */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
    padding: 10px;
}

.pagination button {
    padding: 8px 16px;
    background: var(--button-gradient);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination button:disabled {
    background: #374151;
    cursor: not-allowed;
}

.pagination button:hover:not(:disabled) {
    background: #c2953b80;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.pagination span {
    color: #fff;
    font-weight: 500;
}

.userName {
    padding-left: 10px;
    font-size: 16px;
}

.welcomeTxt {
    color: #ffffffab;
}

.LogginedUserName {
    display: inline-flex;
    justify-content: end;
    color: #ffffffab;
}

.VEuserName {
    font-size: 14px;
    margin-right: 15px;
}

.welcomeMsg {
    color: #fff;
    line-height: 1.2;
}

.user-avatar {
    width: 20px;
    margin: 5px;
}

.user-container {
    display: inline-flex;
    align-items: end;
    flex-direction: row;
    justify-content: end;
}

.system-avatar,
.user-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #374151;
    padding: 0px;
    font-size: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    bottom: 4px;
    border: 1px solid #c2953b66;
}

.system-container {
    display: inline-flex;
    align-items: flex-end;
}

.location-input-group {
    display: flex;
    gap: 10px;
}

.location-input-group input {
    flex: 1;
}

.location-input-group button {
    padding: 8px 12px;
    white-space: nowrap;
}

#map {
    width: 100%;
    height: 345px;
    border-radius: 8px;
    margin: 15px 0;
}

h3 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #000000;
    margin: 0;
}

/* Header */

.logo {
    font-size: 28px;
    font-weight: 700;
}

.tagline {
    font-size: 13px;
    opacity: 0.9;
    color: #f1f6fa;
}

/* Header */

.app-header {
    width: 100%;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    color: #fff;
    box-sizing: border-box;
    overflow: hidden;
    position: relative;
    z-index: 10;
  
    /* Use gradient variable */
    background: var(--header-gradient);
  }

/* Overlay the SVG pattern as a glowing animated layer */

.app-header::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    pointer-events: none;
    z-index: 0;
  
    background: url("images/header-bg.svg") no-repeat right center;
    background-size: cover;
    opacity: 0.95;
  
    animation: nodePulse 8s ease-in-out infinite;
    transition: opacity 0.3s ease;
  }

/* Pulse animation for subtle glow */

@keyframes nodePulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
  }

/* Example logo and text alignment */

.app-header .logo {
    font-size: 1.5rem;
    font-weight: 700;
    position: relative;
    /* ensure it appears above ::after */
    z-index: 2;
}

.app-header .nav-links {
    display: flex;
    gap: 20px;
    position: relative;
    z-index: 2;
}

.app-header .nav-links a {
    color: #CFE8FF;
    /* icy blue link color */
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.app-header .nav-links a:hover {
    color: #A9D1FF;
    text-shadow: 0 0 8px rgba(169, 209, 255, 0.7);
}

.app-header .nav-links a:active {
    color: #7AB8FF;
}

.app-header .nav-links a:focus {
    color: #D8F3FF;
    text-shadow: 0 0 10px rgba(216, 243, 255, 0.8);
}

/* ===== Logo and Branding Section ===== */

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 2; /* keeps above background */
  }

.app-logo {
    height: 42px;
    width: 42px;
    object-fit: contain;
    filter: drop-shadow(0 0 4px rgba(255,255,255,0.2));
  }

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #FFFFFF;
  }

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

/* SIDEBAR CSS */

.move-to-left {
    transform: translateX(-385px);
}

/* .move-to-left-partly {
    transform: translateX(-200px);
  } */

.sidebar {
    height: 100%;
    width: 400px;
    position: fixed;
    top: 57px;
    z-index: 1;
    right: -400px;
    box-shadow: 0 1rem 5rem rgba(0, 0, 0, 0.4);
    transition: transform 0.35s ease, box-shadow 0.2s ease;
    border-top: 1px solid #363f4f;
    display: flex;
    flex-direction: column;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
    margin-left: auto;

}

.container-liner {
    margin-left: 0rem;
}

.sidebar-tab {
    height: 124x;
    width: 32px;
    position: fixed;
    top: 50%;
    z-index: 1;
    right: 0;
    margin-left: auto;
    border-radius: 10px 0 0 10px;
    background: linear-gradient(180deg, #241A4A, #1A1338);
    box-shadow: -4px 0 16px rgba(26, 19, 56, 0.45);
    transition: transform 0.35s ease, box-shadow 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Sidebar tab: the visible strip you click */

#sidebar-tab {
    cursor: pointer;
    /* keep whatever positioning you already have */
  }

#sidebar-tab-text {
  pointer-events: none;          /* prevent capturing clicks outside the strip */
  display: block;
  white-space: nowrap;
  width: auto;                   /* remove JS-set giant width */
  writing-mode: vertical-rl;     /* vertical text without messy transforms */
  transform: rotate(180deg);     /* if you want text to read bottom-to-top */
  line-height: 1;
}

.vertical-text {
    writing-mode: vertical-rl;
    /* vertical text layout */
    transform: rotate(180deg);
    /* make it read top->bottom */
    color: #fff;
    font-weight: 500;
    letter-spacing: .5px;
    text-align: center;
    padding: 6px 0;
    margin-left: 5px;
    line-height: 1.1;
    user-select: none;
}

.item {
    display: flex;
    flex-direction: column;
    /* Stack text and image vertically */
    align-items: center;
    /* Center the text and image horizontally */
}

.header-text {
    margin: 15px 0px 10px;
    width: 100%;
    text-align: center;
    font-size: 16px;
}

/* Chatbox styles */

.chat-link {
    cursor: pointer;
    color: rgb(16, 16, 17);
    text-decoration: underline;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.chat-link:hover {
    cursor: pointer;
    color: var(--themeBgBtnColor);
    text-decoration: underline;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

/* Container for question + buttons (inside system-message) */

.timestamp {
    position: absolute;
    bottom: 2px;
    right: 10px;
    font-size: 0.75rem;
    color: rgb(31, 26, 26);
}

/* ========================================================== */

/* When sidebar is open: shrink content, show sidebar */

.app-container.move-to-left .content-wrapper {
    flex: 0 0 75%;
    /* Shrink to 75% width */
}

.app-container.move-to-left .sidebar {
    width: 25%;
    /* Show sidebar */
}

.move-to-left-partly .content-wrapper {
    flex: 0 0 75%;
    width: calc(100% - 400px);
    transition: transform .7s ease-in-out;
}

/* .content-wrapper{
    border: 30px solid red;
} */

.form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
  
    padding: 12px 16px;
  
    background: #FFFFFF;
    color: #1F2937;            /* dark neutral, not black */
    font-size: 16px;
    font-weight: 600;
  
    /* border-bottom: 1px solid #E3E8F3; */
    border-bottom: 1px solid grey;
  }

.search-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
  }

.search-actions-button {
    background: var(--button-gradient);
    color: #fff;
    border: none;
    padding: 10px 22px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
    transition: all 0.25s ease;
    box-shadow: 0 3px 8px rgba(14, 76, 155, 0.35);
  }

.collapse-btn {
    padding: 9px 12px;
    background: var(--themeBgBtnColor);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
    margin-bottom: 10px;
}

.collapse-btn.collapsed i {
    transform: rotate(180deg);
}

.form-collapsed {
    display: none;
}

/* Info button and tooltip for Manage Types */

.info-button {
    background: none;
    border: none;
    cursor: pointer;
    color: #C2953B;
    font-size: 1.2rem;
    padding: 0;
    margin-left: 0.5rem;
}

.info-tooltip {
    display: none;
    position: absolute;
    background: #232b3a;
    color: #fff;
    border: 1px solid #374151;
    border-radius: 8px;
    padding: 12px;
    z-index: 1000;
    left: 50px;
    top: 40px;
    min-width: 260px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    font-size: 0.98rem;
    line-height: 1.5;
}

/* 3D Viewer Container and Sensor UI */

.viewer-container {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 80vh;
    border-radius: 8px;
    overflow: hidden;
}

/* header bar pinned at top of viewer */

.viewer-header {
    position: relative;
    top: 0;
    border-radius: 8px 8px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: #FFF;
    z-index: 2;
    color: #000;
    /* padding-top: 5px; */
    border-bottom: 1px solid #ddd;
}

.vh-left {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 5px;
}

.vh-title-top {
    font-weight: 500;
    font-size: 16px;
    line-height: 1.2
}

.vh-title-sub {
    opacity: .8;
    font-size: 12px
}

.vh-right {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 10px;
}

.icon-btn.ghost {
    height: 34px;
    width: 34px;
    display: inline-grid;
    place-items: center;
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 8px;
    cursor: pointer;
}

/* canvas sits BELOW header and fills area */

.three-canvas {
    position: relative; /* let it flow below the header */
    width: 100%;
    height: calc(100% - var(--viewer-header-h)); /* fills remaining viewer height */
    display: block;
    background-color: #fff;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    z-index: 1;
}

/* ───────────── Always-visible blue gutter + vertical label ───────────── */

.sensor-list-panel {
    position: absolute;
    top: 62px;
    left: 0;
    bottom: 0; /* full height */
    width: 250px; /* full sidebar width when open */
    z-index: 12;
    border-right: 1px solid #ddd;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
    border-radius: 0;
    overflow: hidden;
  
    /* --- core layout --- */
    /* --barW: 48px; */
    /* padding-left: var(--barW); */
    background: #fff;
    /* transition: width 0.3s ease, padding-left 0.3s ease; */
  }

/* Always-visible blue bar */

/* .sensor-list-panel::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0; 
    width: var(--barW);
    background: #789fd2; 
    border-right: 1px solid #1a1a1a;
    box-shadow: 2px 0 6px rgba(0, 0, 0, 0.2);
    pointer-events: none;
  } */

/* Always-visible vertical "Sensors" label */

/* .sensor-list-panel::after {
    content: "Sensors";
    position: absolute;
    left: 10px;
    right: 0;
    top: 50%;
    transform: translateY(-50%) rotate(180deg);
    writing-mode: vertical-rl;
    color: #000;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 1px;
    text-align: center;
    opacity: 0.9;
    pointer-events: none;
  } */

/* ───────────── Collapsed state ───────────── */

.sensor-list-panel.collapsed {
    width: var(--barW);
    padding-left: 0;
    background: transparent; /* only blue bar visible */
    cursor: pointer;
  }

/* Hide list when collapsed */

.sensor-list-panel.collapsed #sensorList {
    display: none;
  }

/* Maintain "Sensors" label alignment in collapsed mode */

.sensor-list-panel.collapsed::after {
    opacity: 1;
  }

/* ───────────── Canvas shift ───────────── */

.viewer-container.sidebar-open .three-canvas {
    left: 260px;
    width: calc(100% - 260px);
  }

.viewer-container.sidebar-collapsed .three-canvas {
    left: 48px;
    width: calc(100% - 48px);
    transition: width 0.3s ease, left 0.3s ease;
  }

/* Make sure canvas stays under sidebar */

.three-canvas {
    z-index: 1;
  }

.sensor-list-panel {
    z-index: 2;
  }

/* when sidebar is open, nudge canvas so it doesn't sit under it */

.viewer-container.sidebar-open .three-canvas {
    left: 270px;
    /* 250 + 20 margin */
    top: -10px;
    width: calc(100% - 270px);
}

/* When sidebar is collapsed, canvas expands */

.viewer-container.sidebar-collapsed .three-canvas {
  left: 48px;
  width: calc(100% - 48px);
  transition: width 0.3s ease, left 0.3s ease;
}

/* small floating button to re-open sidebar when collapsed */

.sensor-list-open-btn {
    position: absolute;
    left: 12px;
    top: calc(var(--viewer-header-h) + 12px);
    height: 36px;
    width: 36px;
    display: none;
    place-items: center;
    background: #1e3a8a;
    color: #fff;
    border: none;
    border-radius: 8px;
    z-index: 12;
    cursor: pointer;
}

.sensor-list-panel.collapsed~.sensor-list-open-btn {
    display: grid;
}

.sensor-tooltip {
    display: none;
    position: absolute;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    pointer-events: none;
}

.sensor-popup-menu {
    display: none;
    position: absolute;
    background: #232b3a;
    border: 1px solid #374151;
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

.sensor-popup-title {
    color: #C2953B;
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 14px;
}

.sensor-popup-edit {
    width: 100%;
    margin-bottom: 8px;
    font-size: 12px;
    padding: 6px 12px;
}

.sensor-popup-delete {
    width: 100%;
    font-size: 12px;
    padding: 6px 12px;
    background: #dc3545;
}

.sensor-modal-title {
    color: #C2953B;
    margin-top: 0;
}

.sensor-modal-desc {
    color: #bdbdbd;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.sensor-label {
    color: #bdbdbd;
}

.sensor-remarks {
    min-height: 80px;
    background: #232b3a;
    border-color: #374151;
    color: #fff;
}

.sensor-modal-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* ===== Sidebar Panel ===== */

.sensor-list {
    overflow-y: auto;
    flex: 1;
    /*padding: 6px;*/
    /* small breathing space against edges */
}

/* ===== Sensor Row (table-like, but sidebar-friendly) ===== */

.sensor-list-item {
    display: grid;
    grid-template-columns: 1fr auto auto;
    /* name | status | actions */
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background-color .18s ease, box-shadow .18s ease;
    background: #fff;
}

.sensor-list-item:hover {
    background-color: #284e53;
}

.sensor-list-item.highlighted {
    background-color: #113c25;
    border-left: 4px solid #469a99;
    padding-left: 6px;
    /* compensate for border-left */
}

.sensor-item-name {
    font-weight: 600;
    min-width: 0;
    /* prevent overflow */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sensor-item-status {
    justify-self: end;
    /* push badge towards actions */
}

/* ===== Actions (icon buttons) ===== */

.sensor-item-actions {
    display: flex;
    gap: 6px;
    justify-self: end;
}

.action-edit i {
    color: #1d4ed8;
}

/* blue */

.action-delete i {
    color: #dc2626;
}

/* red */

.empty-list-message {
    text-align: center;
    color: #9ca3af;
    padding: 10px 6px;
}

.row-actions {
    display: inline-flex;
    gap: 6px;
    vertical-align: middle;
}

.action-edit i {
    color: #1d4ed8;
}

.action-delete i {
    color: #dc2626;
}

/* (Optional) slim scrollbars for the sidebar */

/* Body cells */

.sidebar-table tbody td {
    padding: 8px 10px;
    /* ← consistent body padding */
    vertical-align: middle;
    /* ← proper vertical alignment */
}

/* Row height & hover */

.sidebar-table tbody tr {
    /*height: 38px;*/
    transition: background-color .18s ease;
    border-bottom: 1px solid #ddd;
}

.sidebar-table tbody tr.row-highlight {
    background: rgba(19, 52, 95, 0.08);
    /* soft blue */
    /*outline: 2px solid #9ec5fe;
    outline-offset: -2px;*/
}

.name-text {
    transition: color .12s ease, font-weight .12s ease;
}

.name-text.name-highlight {
    color: #101011;
    font-weight: 700;
}

/* basic table bits used above (keep your existing styles too) */

.sidebar-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.sidebar-table thead th {
    background:#FFF;
    color: #000;
    padding: 8px 10px;
    text-align: left;
    font-weight: 600;
    border-bottom: 1px solid #e5e7eb;
}

.sidebar-table td {
    padding: 8px 10px;
    /*background: #fff;*/
    vertical-align: middle;
}

.sidebar-table .row-actions {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
}

.action-edit i {
    color: #1d4ed8;
}

.action-delete i {
    color: #dc2626;
}

/* Last row bottom border cleanup */

.sidebar-table tbody tr:last-child td {
    border-bottom: none;
}

.led {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
    background: #9ca3af;
    box-shadow: 0 0 0 rgba(0, 0, 0, 0);
}

.led-green {
    background: #22c55e;
}

/* selected row */

.led-blue {
    background: #3b82f6;
}

/* placing new sensor */

.blink {
    animation: ledPulse 1s ease-in-out infinite;
}

@keyframes ledPulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, .6);
        opacity: 0.85;
    }

    70% {
        transform: scale(1.15);
        box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);
        opacity: 1;
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
        opacity: 0.85;
    }
}

/* Make blue pulse use blue glow when .led-blue + .blink */

.led-blue.blink {
    animation-name: ledPulseBlue;
}

@keyframes ledPulseBlue {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(59, 130, 246, .6);
        opacity: 0.85;
    }

    70% {
        transform: scale(1.15);
        box-shadow: 0 0 0 6px rgba(59, 130, 246, 0);
        opacity: 1;
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
        opacity: 0.85;
    }
}

/* Columns sizing/alignment */

.cell-name {
    max-width: 128px;
    /* fits inside 250px sidebar */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cell-status {
    width: 72px;
}

/* badge column width */

.col-actions,
.cell-actions {
    width: 84px;
    text-align: right;
}

/* OPTIONAL: if you still have the floating reopen button, disable it so only the header list button controls open */

.sensor-list-open-btn {
    display: none !important;
}

/* ============ ADDITIONS: consistent cell highlight + selected badge ============ */

.button-icon {
    font-size: 1.2rem;
    line-height: 1;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Pagination */

.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.pagination button {
    padding: 0.5rem 1rem;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.pagination button:hover {
    background-color: var(--bg-hover);
    border-color: var(--primary-color);
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination .current-page {
    padding: 0.5rem 1rem;
    background-color: var(--primary-color);
    color: white;
    border-radius: 0.25rem;
    font-weight: 500;
}

/* ───────────── Viewer Controls Panel (Squared) ───────────── */

/* ================= Viewer Controls Container ================= */

#viewer-controls {
    position: absolute;
    top: var(--viewer-header-h, 70px);
    right: 12px;
    z-index: 3;
  
    /* Calm, tool-like surface */
    background: rgba(48, 56, 112, 0.55);  /* lighter bluish glass */
    backdrop-filter: blur(6px);
  
    border-radius: 12px;
    padding: 12px;
  
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
  
    color: #e5e7eb;
    font-size: 12px;
  
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  
    opacity: 0;
    animation: fadeInControls 0.35s ease-out forwards;
  }

/* ================= Checkbox / Grid Toggle ================= */

#viewer-controls label {
    font-size: 12px;
    color: #c7cbe4;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
  }

#viewer-controls input[type="checkbox"] {
    width: 14px;
    height: 14px;
    accent-color: #3b82f6; /* semantic blue */
    cursor: pointer;
  }

/* ================= Control Grid ================= */

#viewer-controls .control-buttons {
    display: grid;
    grid-template-columns: repeat(3, 38px);
    grid-template-rows: repeat(2, 38px);
    gap: 8px;
    justify-items: center;
    align-items: center;
  }

/* ================= Base Button ================= */

#viewer-controls button {
    width: 38px;
    height: 38px;
    border-radius: 10px;
  
    border: none;
    background: #2a3170; /* neutral base */
    color: #ffffff;
  
    font-size: 16px;
    font-weight: 600;
  
    display: flex;
    align-items: center;
    justify-content: center;
  
    cursor: pointer;
    transition:
      background 0.15s ease,
      transform 0.1s ease,
      box-shadow 0.15s ease;
  
    box-shadow:
      inset 0 0 0 1px rgba(255,255,255,0.08),
      0 4px 10px rgba(0,0,0,0.35);
  }

/* Hover / Active */

#viewer-controls button:hover {
    background: #3a418a;
  }

#viewer-controls button:active {
    transform: scale(0.94);
    box-shadow:
      inset 0 0 0 1px rgba(255,255,255,0.12),
      0 2px 6px rgba(0,0,0,0.4);
  }

/* ================= Fade-in ================= */

@keyframes fadeInControls {
    from {
      opacity: 0;
      transform: translateY(-6px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

/* ───────────── Model Loading Overlay ───────────── */

.model-loading-overlay {
    position: absolute;
    inset: 0; /* top:0; left:0; right:0; bottom:0 */
    background: rgba(0, 0, 0, 0.65);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 50; /* above canvas but below modals */
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0.5px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

.model-loading-overlay.visible {
    opacity: 1;
    pointer-events: all;
  }

/* Simple spinner */

.model-loading-overlay .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: #4dabf7;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
  }

@keyframes spin {
    to { transform: rotate(360deg); }
  }

/* ============================== */

/* 📦 Chat UI Enhancements        */

/* ============================== */

/* System (bot) message bubble */

.chat-message.system-message {
    border: 1px solid #b7d8fa;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    padding: 10px 18px 26px 18px;
    animation: fadeInUp 0.35s ease both;
    transition: all 0.25s ease;
  }

/* Subtle fade-up animation for chat messages */

@keyframes fadeInUp {
    from {
      opacity: 0;
      transform: translateY(6px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

/* User message refinement */

.user-message {
    background: #f5f7fa;
    border: 1px solid #e1e7ef;
    border-radius: 10px 10px 0 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    font-weight: 500;
    color: #222;
  }

/* Timestamp styling (lighter, subtle) */

.timestamp {
    font-size: 11px !important;
    color: #666 !important;
    opacity: 0.75;
    margin-top: 6px;
    text-align: right;
    display: block;
    pointer-events: none;
  }

/* "Is this what you are looking for?" container */

.chat-suggestions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 4px;
  }

/* Question text */

.chat-suggestions-title {
    font-weight: 500;
    font-size: 12px;
    color: #000;
    margin-bottom: 6px;
  }

/* Button container */

.chat-suggestions-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }

/* Suggestion buttons */

.chat-suggestion-btn {
    background: var(--button-gradient);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 9px 18px;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
    transition: all 0.25s ease;
  }

.chat-suggestion-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
  }

.chat-suggestion-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  }

/* Mobile: stack buttons vertically for better tap area */

@media (max-width: 768px) {
    .chat-suggestions-group {
      flex-direction: column;
    }
    .chat-suggestion-btn {
      width: 100%;
      text-align: center;
    }
  }

.model-hint {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
  
    background: rgba(0, 0, 0, 0.55);
    color: #ffffff;
  
    padding: 6px 14px;
    border-radius: 14px;
    font-size: 13px;
    line-height: 1.2;
  
    backdrop-filter: blur(6px);
    pointer-events: none; /* critical */
  
    box-shadow: 0 6px 18px rgba(0,0,0,0.25);
    z-index: 5;
  }
  
  :root {
  --primary: #13345F;
  --primary-light: #1E4A7F;
  --secondary: #F26913;
  --success: #2ecc71;
  --warning: #f39c12;
  --danger: #e74c3c;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --text-xs: .75rem;
  --text-sm: .875rem;
  --text-base: 1rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --space-1: .25rem;
  --space-2: .5rem;
  --space-3: .75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --radius: .375rem;
  --radius-lg: .75rem;
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, .1), 0 2px 4px -1px rgba(0, 0, 0, .06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, .1), 0 4px 6px -2px rgba(0, 0, 0, .05);
}

* {
  box-sizing: border-box
}

.alerts-container {
  /* margin-bottom: var(--space-6); */
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
}

.alerts-header {
  display: flex;
  justify-content: space-between;
  align-items: center;

  padding: 12px 16px;

  background: #FFFFFF;
  color: #1F2937;            /* dark neutral, not black */
  font-size: 16px;
  font-weight: 600;

  border-bottom: 1px solid grey;
}


.alerts-controls {
  display: flex;
  gap: var(--space-4);
  align-items: center;
  color:black;
}

.alerts-bar {
  padding: var(--space-4) var(--space-6);
  display: flex;
  gap: var(--space-3);
  overflow-x: auto;
  max-height: 200px;
  transition: max-height .3s ease
}

.alerts-bar.collapsed {
  max-height: 0;
  padding: 0;
  overflow: hidden
}

.alert-pill {
  flex: 0 0 auto;
  padding: var(--space-2) var(--space-4);
  border-radius: 999px;
  font-size: var(--text-sm);
  white-space: nowrap;
  cursor: pointer;
  transition: all .2s;
  display: flex;
  align-items: center;
  gap: var(--space-2)
}

.alert-pill.critical {
  background: #fdecea;
  color: var(--danger);
  border: 1px solid #fadbd8
}

.alert-pill.warning {
  background: #fff4e0;
  color: var(--warning);
  border: 1px solid #fae0b3
}

.alert-pill:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md)
}

.card {
  background: #fff;
  border-radius: 8px;
  padding: var(--space-6);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-5)
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  /* was 220px */
  gap: 16px;
  overflow-x: auto;
  /* enable horizontal scroll if still too many cards */
  white-space: nowrap;
  padding: 10px 12px;
}

.summary-card {
  background: #f1f3f6;
  /* soft bluish-gray, complements navy header */
  border-radius: 10px;
  padding: var(--space-5);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.summary-card:hover {
  transform: translateY(-5px);
  background: #ffffff;
  /* subtle “lift” contrast */
}


.summary-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  /* space between icon and title */
  justify-content: flex-start;
  /* icon and title on the same side */
  margin-bottom: var(--space-4);
}

.summary-card-title {
  font-size: var(--text-base);
  font-weight: 600;
  margin: 0;
  color: var(--gray-700)
}

/* --- Icon Styling --- */
.summary-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.2rem;
  flex-shrink: 0;
  /* prevent icon from shrinking */
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* Existing colors */
.summary-card-icon.healthy {
  background: var(--success);
}

.summary-card-icon.warning {
  background: var(--warning);
}

.summary-card-icon.critical {
  background: var(--danger);
}

/* --- New colorful gradient for Alerts --- */
.summary-card-icon.colorful {
  background: linear-gradient(135deg, #f26913, #ffcc33);
  color: #fff;
  box-shadow: 0 3px 8px rgba(242, 105, 19, 0.4);
  animation: pulseGlow 2.5s infinite alternate;
}

.summary-card-content {
  display: flex;
  flex-direction: column;
  /* stack value + label */
  justify-content: center;
  /* center vertically */
  align-items: center;
  /* center horizontally */
  gap: 4px;
  min-height: 60px;
  /* optional: keeps cards even */
}

.summary-card-stats {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin: 0 auto;
  /* ensures centering if width shrinks */
}

.stat-label {
  font-size: var(--text-xs);
  color: var(--gray-500);
  text-transform: uppercase;
  font-weight: 500
}

.table-container {
  display: flex;
  overflow-x: auto;
  /* border-radius: 8px; */
  /* box-shadow: 0 2px 15px rgba(0, 0, 0, 0.2); */
  justify-content: center;
}
.alert-table-wrapper{
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 10px;

}


.status-badge {
  padding: var(--space-1) var(--space-3);
  border-radius: 999px;
  font-size: var(--text-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .5px
}

.status-Healthy {
  background: #eaf9f0;
  color: var(--success)
}

.status-Warning {
  background: #fff4e0;
  color: var(--warning)
}

.status-Critical {
  background: #fdecea;
  color: var(--danger)
}



.chart-container {
  background: var(--gray-50);
  border-radius: var(--radius);
  height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  margin-bottom: var(--space-5)
}

canvas {
  width: 100% !important;
  height: 100% !important
}

/* ===== rpt-* aliases to avoid collisions ===== */
.rpt-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background: rgba(0, 0, 0, .5);
  backdrop-filter: blur(4px)
}

.rpt-modal-content {
  background: #fff;
  margin: 40px auto;
  padding: 0;
  border-radius: var(--radius-lg);
  max-width: 900px;
  width: 90%;
  position: relative;
  box-shadow: var(--shadow-lg);
  animation: modalFadeIn .3s
}

.rpt-modal-header {
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  justify-content: space-between;
  align-items: center
}

.rpt-modal-title {
  font-size: var(--text-xl);
  font-weight: 600;
  margin: 0;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: var(--space-3)
}

.rpt-modal-close {
  font-size: var(--text-xl);
  font-weight: bold;
  cursor: pointer;
  color: var(--gray-500);
  background: none;
  border: none;
  padding: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s
}

.rpt-modal-close:hover {
  background: var(--gray-100);
  color: var(--gray-700)
}

.rpt-tab-nav {
  display: flex;
  gap: var(--space-2);
  border-bottom: 1px solid var(--gray-200)
}

.rpt-tab-nav button {
  padding: var(--space-3) var(--space-5);
  border: none;
  background: transparent;
  cursor: pointer;
  font-weight: 500;
  color: var(--gray-600);
  position: relative;
  transition: all .2s
}

.rpt-tab-nav button:hover {
  color: var(--primary)
}

.rpt-tab-nav button.active {
  color: var(--primary);
  font-weight: 600
}

.rpt-tab-nav button.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--primary)
}

.rpt-tab-content>div {
  display: none
}

.rpt-tab-content>div.active {
  display: block;
  animation: tabFadeIn .3s
}

@media (max-width:768px) {

  .summary-grid {
    grid-template-columns: 1fr
  }

  .sensor-grid {
    grid-template-columns: 1fr
  }

  .modal-content {
    width: 95%;
    margin: 20px auto
  }
}

/* --- Responsive Enhancements --- */

/* Make cards, grids, and panels stack naturally */
@media (max-width: 1024px) {
  .summary-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}

/* --- Card Layouts --- */
@media (max-width: 768px) {
  .card {
    padding: var(--space-4);
    margin-bottom: var(--space-5);
  }

}

/* Match Active Alerts style for other sections */

/* --- Modal Scaling --- */
@media (max-width: 600px) {
  .rpt-modal-content {
    width: 95%;
    margin: 10px auto;
    padding: 0;
  }
}

/* 🧩 Fix: Remove table horizontal scroll when stacked (mobile view) */


/* 🎨 Dynamic light backgrounds for summary cards based on icon type */
.summary-card.healthy {
  background: rgba(46, 204, 113, 0.1); /* light green tint */
}

.summary-card.warning {
  background: rgba(243, 156, 18, 0.1); /* warm amber tint */
}

.summary-card.critical {
  background: rgba(231, 76, 60, 0.1); /* soft red tint */
}

.summary-card.omitted {
  background: rgba(107, 114, 128, 0.08); /* subtle gray tint */
}

.summary-card.colorful {
  background: linear-gradient(135deg, rgba(242, 105, 19, 0.08), rgba(255, 204, 51, 0.1));
}
.summary-card.predictive {
  background: linear-gradient(
    135deg,
    rgba(99, 102, 241, 0.08),   /* indigo-500 tint */
    rgba(129, 140, 248, 0.12)   /* indigo-400 tint */
  );
}



/* Hover enhancement (slightly brighter) */
.summary-card.healthy:hover {
  background: rgba(46, 204, 113, 0.18);
}

.summary-card.warning:hover {
  background: rgba(243, 156, 18, 0.18);
}

.summary-card.critical:hover {
  background: rgba(231, 76, 60, 0.18);
}

.summary-card.omitted:hover {
  background: rgba(107, 114, 128, 0.15);
}

.summary-card.colorful:hover {
  background: linear-gradient(135deg, rgba(242, 105, 19, 0.15), rgba(255, 204, 51, 0.18));
}
/* --- Align Filter Bar with Table Width and Detach from Header --- */

#reportViewerContainer {
  height: 65vh !important;
  min-height: unset !important;
  padding: 0 !important;
  margin: 0 !important;
  line-height: 0 !important;
}
#reportViewerContainer canvas {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
}
#rptEquipment3d {
  padding: 0 !important; 
  margin: 0 !important; 
  height: 80vh;
}
.viewer-tooltip {
  position: absolute;
  pointer-events: none;
  z-index: 99999;
  opacity: 0;
  transition: opacity 0.15s ease-out;
}

.viewer-tooltip.show {
  opacity: 1;
}

.viewer-tooltip-content {
  padding: 10px 14px;
  background: #4dabf7;
  color: #fff;
  border-radius: 8px;
  font-size: 13px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.35);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.15);

  /* arrow */
  position: relative;
}

.viewer-tooltip-content::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: calc(50% - 6px);
  border-width: 8px 6px 0 6px;
  border-style: solid;
  border-color: rgba(20,20,20,0.92) transparent transparent transparent;
}
/* 3D viewer container must be positioned for overlay */
#viewer3d-container {
  position: relative;
  width: 100%;
  height: 100%;
}

/* Fullscreen overlay */
#viewer3d-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;

  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);

  display: none; /* initially hidden */
  align-items: center;
  justify-content: center;
  flex-direction: column;

  font-size: 18px;
  color: #fff;

  z-index: 9999;
}

/* Spinner circle */
.spinner {
  width: 42px;
  height: 42px;
  border: 4px solid #ffffff;
  border-top-color: transparent;
  border-radius: 50%;
  margin-bottom: 10px;

  animation: spin 0.7s linear infinite;
}

/* Spinner animation */
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.report-3col-layout {
  display: grid;
  grid-template-columns: 250px 1fr 290px;
  gap: 12px;
  height: 100%;
  width: 100%;
  border-top: 1px solid #ddd;
}

.report-sensor-list {
  border-right: 1px solid #ddd;
  overflow-y: auto;
  padding: 10px;
  margin-top: 10px;
}

.report-3d-viewer {
  position: relative;
}

.report-sensor-details {
  border-left: 1px solid #ddd;
  overflow-y: auto;
}

/* ===== Sensor detail gauges under #rptChartPanel ===== */

.rpt-gauge-row {
  margin-top: 12px;
  display: flex;
  gap: 16px;
  align-items: flex-end;
  flex-wrap: wrap;
}

/* --- horizontal bar gauge --- */

.sensor-gauge-bar {
  position: relative;
  flex: 1 1 260px;
  padding: 8px 8px 18px;
  font-size: 11px;
}

.sensor-gauge-bar-track {
  display: flex;
  height: 18px;
  border-radius: 999px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.sgb-seg {
  flex: 1;
}

.sgb-red {
  background: #ef4444;
}

.sgb-amber {
  background: #f97316;
}

.sgb-green {
  background: #22c55e;
}

.sensor-gauge-pointer {
  position: absolute;
  top: 0;
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 10px solid #111827;
  transform: translateX(-50%);
}

.sensor-gauge-label {
  position: absolute;
  bottom: 0;
  color: var(--gray-700, #374151);
  font-size: 11px;
}

.sensor-gauge-label-min {
  left: 0;
}

.sensor-gauge-label-max {
  right: 0;
}

.sensor-gauge-label-value {
  left: 50%;
  transform: translateX(-50%);
  font-weight: 600;
}

/* --- semi-circular gauge --- */


/* Value text in the middle of the dial */
.sgd-value {
  position: relative;
  font-size: 18px;
  font-weight: 700;
  color: #111827;
}


.status-badge {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.status-critical { background:#fee2e2; color:#b91c1c; }
.status-warning  { background:#fef9c3; color:#92400e; }
.status-healthy  { background:#dcfce7; color:#166534; }
.status-unknown  { background:#e5e7eb; color:#374151; }

.sensor-card {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 0.75rem;
  margin: 1rem 0;
  font-size: 0.85rem;
}

.chart-box {
  margin-top: 0.75rem;
}
.sensor-details-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sensor-values {
  padding: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #f9fafb;
}

.sensor-chart-box {
  border: 1px solid #e5e7eb;
  padding: 10px;
  border-radius: 6px;
  background: #fff;
}

.range-wrap { position: relative; padding-top: 26px; }
.range-bar { display: flex; height: 14px; border-radius: 8px; overflow: hidden; }
.range-bar .seg { flex: 1; }

.seg.red { background: #dc2626; }
.seg.amber { background: #f59e0b; }
.seg.green { background: #16a34a; }

.range-indicator {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  text-align: center;
}

.range-value { font-weight: 600; font-size: 13px; }
.range-arrow { font-size: 14px; }

.range-scale {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-top: 4px;
}
.sensor-inner-tabs {
  display: flex;
  gap: 6px;
  margin: 10px 0;
}
.sensor-inner-tab {
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  cursor: pointer;
  background: #f9fafb;
}
.sensor-inner-tab.active {
  background: #2563eb;
  color: white;
}
.sensor-inner-content { display: none; }
.sensor-inner-content.active { display: block; }

/* ===============================
   SENSOR CHART TAB – FIXED UI
================================ */

.sensor-inner-content {
  padding: 16px 12px;
}

#chartTab {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* -------- Range Wrapper -------- */
.range-wrap {
  position: relative;
  padding-top: 36px;
}

/* -------- Range Bar -------- */
.range-bar {
  display: flex;
  height: 14px;
  border-radius: 8px;
  overflow: hidden;
  background: #e5e7eb;
}

.range-bar .seg {
  flex: 1;
}

.range-bar .red {
  background: #ef4444;
}

.range-bar .amber {
  background: #f59e0b;
}

.range-bar .green {
  background: #22c55e;
}

/* -------- Indicator -------- */
.range-indicator {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  text-align: center;
  pointer-events: none;
}

.range-value {
  background: #111827;
  color: #fff;
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 6px;
  margin-bottom: 2px;
  white-space: nowrap;
}

.range-arrow {
  font-size: 14px;
  color: #111827;
  line-height: 1;
}

/* -------- Status Badge -------- */
.status-badge {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.status-Critical {
  background: #fee2e2;
  color: #b91c1c;
}

.status-Warning {
  background: #fef3c7;
  color: #92400e;
}

.status-Healthy {
  background: #dcfce7;
  color: #166534;
}
/* ===== RANGE BAR FIXED SCALE ===== */

.range-wrap {
  position: relative;
  padding-top: 42px;
}

.range-bar {
  display: flex;
  height: 16px;
  border-radius: 10px;
  overflow: hidden;
}

.range-bar .seg {
  height: 100%;
}

.range-bar .seg.critical {
  background: #ef4444;
}

/* 🟡 Warning */
.range-bar .seg.warning {
  background: #f59e0b;
}

/* 🟢 Normal */
.range-bar .seg.normal {
  background: #22c55e;
}

/* Indicator */
.range-indicator {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  text-align: center;
}

.range-value {
  background: #111827;
  color: #fff;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 6px;
}

.range-arrow {
  font-size: 14px;
  color: #111827;
}

/* Scale */
.range-scale {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-top: 6px;
  color: #6b7280;
}
/* ===============================
   SENSOR ALERT CARDS (ALL DEVICES)
================================ */

.sensor-alert-cards {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sensor-alert-card {
  background: #ffffff;
  padding: 14px 16px;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  /* border-left: 5px solid #e5e7eb; */
}

/* Severity colors */
.sensor-alert-card.critical {
      background: rgba(231, 76, 60, 0.1);
}

.sensor-alert-card.warning {
  background: rgba(243, 156, 18, 0.1);
}

.sensor-alert-card.healthy {
  border-left-color: var(--success);
}

/* Row layout */
.alert-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 4px 0;
  gap: 12px;
}

.alert-label {
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  min-width: 90px;
}

.alert-value {
  font-size: 13px;
  color: #111827;
  text-align: right;
  word-break: break-word;
}

/* Empty state */
.no-alert-card {
  padding: 20px;
  text-align: center;
  color: #6b7280;
  background: #f9fafb;
  border-radius: 10px;
}

/* ===== Report Header Layout ===== */
.report-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* Right tabs container */
.report-header-tabs {
  display: flex;
  gap: 8px;
}

/* Tab buttons */
.report-tab {

    color: #CFE8FF;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
    font-size: 12px;
    transition: color 0.25s ease, text-shadow 0.25s ease;
}

/* .report-tab:hover {
  background: #f3f4f6;
}


.report-tab.active {
  background: #CFE8FF;
  color: #374151;
  border-color: #CFE8FF;
  font-weight: 600;
} */
/* ===== Predictive Empty Screen ===== */
.predictive-empty {
  height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  text-align: center;
}

.predictive-empty i {
  font-size: 42px;
  margin-bottom: 12px;
  color: #9ca3af;
}

.predictive-empty h3 {
  margin: 0;
  font-weight: 500;
  color: #111827;
}

.predictive-empty p {
  margin-top: 6px;
  font-size: 14px;
}
.gauge-wrap{
  width: 100%;
  max-width: 520px;
  margin: 12px auto 0;
}

.gauge-wrap canvas{
  width: 100% !important;
  height: auto !important;     /* ✅ IMPORTANT: keeps half-circle shape */
  display: block;
}
/* =========================================================
   SENSOR DETAILS PANEL (RIGHT COLUMN)
   ========================================================= */

   .sensor-panel {
    height: 75vh;

    background: #ffffff;
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  
  /* Header */
  .sensor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--gray-200);
    padding:10px
  }
  
  .sensor-header .sensor-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-800);
  }
  
  .sensor-sub {
    font-size: 12px;
    color: var(--gray-500);
  }
  
  /* Status pill */
  .sensor-status {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
  }
  
  .sensor-status.critical {
    background: #fdecea;
    color: var(--danger);
  }
  
  .sensor-status.warning {
    background: #fff4e0;
    color: var(--warning);
  }
  
  .sensor-status.healthy {
    background: #eaf9f0;
    color: var(--success);
  }
  
  /* Tabs */
 
  
  .sensor-tabs button {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    background: #F3F5F9;
    font-size: 13px;
    cursor: pointer;
    color: #1F2937;
    min-width: 72px;   /* optional */
    text-align: center;  
  }
  
  .sensor-tabs button.active {
    background: var(--primary);
    color: #ffffff;
  }
  
  /* Content */
  
  
  /* Meta info */
  .sensor-meta {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid var(--gray-200);
    font-size: 12px;
    color: #374151;
  }
  
  .sensor-meta-box {
    border: 1px solid var(--gray-200);
    text-align: center;
    background: var(--gray-50);
  }
  
  .sensor-meta-box span {
    display: block;
    font-size: 11px;
    color: var(--gray-500);
    margin-bottom: 2px;
  }
  
  .sensor-meta-box strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-800);
  }
    
  /* Status message */

  
  .sensor-message.critical {
    background: #fff1f2;
    color: #9f1239;
  }
  
  .sensor-message.warning {
    background: #fff7ed;
    color: #92400e;
  }
  
  .sensor-message.healthy {
    background: #f0fdf4;
    color: #166534;
  }
  
  /* =========================================================
     SENSOR LIST (LEFT COLUMN)
     ========================================================= */
  
  #reportSensorList {
    list-style: none;
    padding: 0;
  }
  
  /* ===== Sensor list item (merged & cleaned) ===== */

.sensor-item {
  display: flex;
  gap: 10px;
  padding: 6px 8px;
  cursor: pointer;
  border-left: 3px solid transparent;
  border-bottom: 1px solid var(--gray-200);
}

.sensor-item:hover {
  background: var(--gray-50);
}

.sensor-item.selected {
  background: rgba(19, 52, 95, 0.08);
  border-left-color: var(--primary);
  padding-left: 11px; /* compensate for left border */
}

  .sensor-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  .sensor-info .sensor-name {
    font-size: 13px;
    font-weight: 500;
  }
  
  .sensor-info .sensor-status {
    font-size: 11px;
    color: var(--gray-500);
  }
  
  /* Status dot */
  .status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-top: 4px;
  }
  
  .sensor-item.critical .status-dot {
    background: var(--danger);
  }
  
  .sensor-item.warning .status-dot {
    background: var(--warning);
  }
  
  .sensor-item.healthy .status-dot {
    background: var(--success);
  }

/* ===== FIX: ensure gauge is visible ===== */
.gauge-wrap {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gauge-wrap canvas {
  max-width: 100%;
  max-height: 100%;
}
/* ===== Compact sensor panel ===== */

.sensor-tabs {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--gray-200);
}

.sensor-content {
  padding: 6px 10px;
  height: 100%;
}


.sensor-message {
  padding: 6px 10px;
  font-size: 12px;
  border-top: 1px solid var(--gray-200);
  padding-bottom: 15px;
}
/* =========================================================
   LEFT SENSOR LIST — MINIMAL, CLEAN, STATUS-FOCUSED
   ========================================================= */

   .sensor-list {
    list-style: none;
    margin: 0;
    padding: 0;
  }
  
    
  /* Dot */
  .status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-top: 4px;
    flex-shrink: 0;
  }
  
  /* Text stack */

  
  /* Sensor name */
  .sensor-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-800);
    line-height: 1.2;
  }
  
  /* Status text (NO BOX, NO BADGE) */
  .sensor-status {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: none !important;
    padding: 0 !important;
  }
  
  /* Severity colors */
  .sensor-item.critical .status-dot,
  .sensor-item.critical .sensor-status {
    color: var(--danger);
    background-color: var(--danger);
  }
  
  .sensor-item.warning .status-dot,
  .sensor-item.warning .sensor-status {
    color: var(--warning);
    background-color: var(--warning);
  }
  
  .sensor-item.normal .status-dot,
  .sensor-item.normal .sensor-status {
    color: var(--success);
    background-color: var(--success);
  }
  

  
.status-dot { width:10px; height:10px; border-radius:50%; display:inline-block; }
.status-dot.dot-healthy  { background:#22c55e; }  /* green */
.status-dot.dot-warning  { background:#f59e0b; }  /* amber */
.status-dot.dot-critical { background:#ef4444; }  /* red */
.status-dot.dot-nodata   { background:#9ca3af; }  /* grey */

.sensor-lastseen { display:block; font-size:12px; opacity:0.75; margin-top:2px; }

:root {
    --app-header-height: 55px;

}

.map-container {
  width: 100%;
  height:100%;
  min-height: 0;
  overflow: hidden;
}
.map-floating-title {
  position: absolute;
  top: 20px;
  left: 20px;

  padding: 6px 12px;

  background: rgba(26, 16, 51, 0.85); /* matches header family */
  color: #EAF0FF;

  font-size: 14px;
  font-weight: 600;

  border-radius: 8px;
  backdrop-filter: blur(6px);

  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  z-index: 25;
}

/* ================================ */
/* Compact Scoped styles for MAP KPI panel  */
/* ================================ */
#mapSection {
  position: fixed;
  top: var(--app-header-height);
  left: 0;
  right: 0;
  bottom: 0;

  height: auto;        /* IMPORTANT */
  width: 100%;

  padding: 0;          /* override upload-container */
  margin: 0;
  z-index: 5;
}

/* Unified sidebar */
#mapSidebar {
  position: absolute;
  top: 15px;
  left: 20px;
  width: 240px;
  background: var(--themeBgColor);
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  padding: 0;
  overflow: hidden;   /* ❗ No scrolling */
  z-index: 20;
}

/* Each section inside the sidebar */

/* Reuse existing form-header colors */
#mapSidebar .form-header {
  padding: 8px 12px;
  background: var(--header-gradient);
  color: white;
  font-size: 14px;
  font-weight: 600;
  margin: 0;
  border-radius: 10px 10px 0 0;
}



/* Selector area */
#mapSidebar .panel-body {
  padding: 8px 12px;
  background: #f1f3f7;
}
#mapSidebar select {
  width: 100%;
  padding: 6px 8px;
  font-size: 13px;
}


/* =========================== */
/* MAP SIDEBAR KPI PANEL FIXED */
/* =========================== */

#mapSidebar .summary-grid {
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #f7f8fc;
}

/* Compact KPI cards */
#mapSidebar .summary-card {
  display: flex;
  align-items: center;
  justify-content: space-between;  /* ICON + TITLE left | VALUE right */
  flex-direction: row;             /* <— THIS restores horizontal layout */
  gap: 8px;
  padding:6px;
}



#mapSidebar .summary-card:hover {
  background: #f2f4f7;
  transform: scale(1.01);
}

/* header row */
#mapSidebar .summary-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
}

/* icon + title group */
#mapSidebar .summary-card-left {
  display: flex;
  align-items: center;
  gap: 8px; /* spacing between icon + title */
}

/* compact icons */
#mapSidebar .summary-card-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 11px;
}


/* color variants */
#mapSidebar .summary-card.healthy .summary-card-icon { background: #22c55e; }
#mapSidebar .summary-card.warning .summary-card-icon { background: #fbbf24; }
#mapSidebar .summary-card.critical .summary-card-icon { background: #ef4444; }
#mapSidebar .summary-card.omitted .summary-card-icon { background: #6b7280; }
#mapSidebar .summary-card.colorful .summary-card-icon { background: #2563eb; }

/* compact title */
#mapSidebar .summary-card-title {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
}

#mapSidebar .stat-value {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #1A1033;
}
.kpi-toggle-btn {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 0;
  margin: 0;
  font-size: 14px;
}
.kpi-toggle-btn:hover {
  opacity: 0.8;
}
#mapSidebar .kpi-header {
  background: var(--header-gradient);
  color: #fff;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 0;        /* <— NO CURVES */
  margin: 0;
}
/* Floating message overlay (non-blocking) */
.map-message {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.75);
  color: white;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 30;
  pointer-events: none; /* does not block clicks */
  opacity: 0;
  transition: opacity 0.3s ease;
}

.map-message.show {
  opacity: 1;
}

.map-message.hidden {
  display: none;
}

/* Color variants */
.map-message.info {
  background: rgba(33, 150, 243, 0.85); /* blue */
}

.map-message.warning {
  background: rgba(255, 193, 7, 0.85); /* amber */
  color: #222;
}

.map-message.error {
  background: rgba(244, 67, 54, 0.85); /* red */
}
.map-instance-label {
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transform: translateY(-8px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

.map-instance-label:hover {
  background: rgba(0, 0, 0, 0.9);
}
.map-click-popup {
  font-size: 12px;
  line-height: 1.4;
}

.map-click-popup .title {
  font-weight: 600;
  color: #111;
  margin-bottom: 2px;
}

.map-click-popup .address {
  color: #555;
}

.map-location-card.hidden {
  display: none;
}

@keyframes slideUp {
  from {
    transform: translate(-50%, 20px);
    opacity: 0;
  }
  to {
    transform: translate(-50%, 0);
    opacity: 1;
  }
}

.map-location-card {
  position: fixed;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  width: min(460px, calc(100% - 24px));
  background: #fff;
  border-radius: 14px;
  padding: 12px 14px;
  padding-right: 48px; /* space for close button */
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  z-index: 1000;
  animation: slideUp 0.22s ease;
}


.map-location-card.hidden {
  display: none;
}

/* Close button */
.map-location-card .close-btn {
  position: absolute;
  top: 12px;
  right: 14px;
  line-height: 1;
  border: none;
  background: transparent;
  font-size: 18px;
  cursor: pointer;
  color: #666;
}

/* Layout row */
.location-header {
  display: flex;
  gap: 12px;             /* was 16px */
  align-items: flex-start;
}


/* Text block */
.location-text {
  flex: 1;
  min-width: 0;
}

/* Title */
.location-title {
  font-size: 15px;
  font-weight: 600;
  color: #111;
  margin-bottom: 2px;
}

/* Address */
.location-address {
  font-size: 13px;
  color: #555;
  margin-bottom: 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid #e4e9f2;
  line-height: 1.35;
}
.location-last-seen {
  font-size: 12px;
  color: #666;
  margin-top: 2px;
}

/* Coordinates */
.location-coords {
  font-size: 12px;
  color: #1a73e8;
  margin-top: 4px;
  white-space: nowrap;
}

/* Actions */
.location-actions {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 2px;
  margin-right: 4px;
}



.location-actions button {
  background: #eef5ff;
  border: 1px solid #cfe0ff;
  color: #004aad;
  font-size: 12px;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
}

.location-actions button:hover {
  background: #dfeeff;
}
#resetMapViewBtn {
  display: none;
}
:root {
  --header-gradient: linear-gradient(90deg, #1A1033 0%, #1E1F6A 100%);
  --button-gradient: linear-gradient(90deg, #0B3A80 0%, #0E4C9B 100%);

}
/* =========================================================
   GLOBAL
   ========================================================= */
     
  h1 {
    font-size: 22px;
    margin-bottom: 15px;
  }
  
  
  /* =========================================================
     DASHBOARD GRID (CORE LAYOUT)
     ========================================================= */
  .dashboard-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
    min-height: 240px;
  }
  
  .dashboard-cell {
    display: flex;
    flex-direction: column;
    height: 100%;
  }
  
  /* =========================================================
     HEALTH PANEL
     ========================================================= */
  .health-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    border-radius: 16px;
    padding: 16px 18px;
    margin-bottom: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  }
  
  .health-text {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  
  .health-title {
    font-size: 14px;
    color: #666;
  }
  
  .health-value {
    font-size: 42px;
    font-weight: 700;
  }
  
  .health-confidence {
    font-size: 14px;
    color: #555;
  }
  
  .health-gauge {
    width: 90px;
    height: 90px;
  }
  
  .health-gauge canvas {
    width: 100% !important;
    height: 100% !important;
  }
  .report-section {
    display: flex;
    justify-content: center;
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  }
  
  .predictive-insights {
    display: grid;
    grid-template-columns: repeat(3, 410px);
    justify-items: center; /* horizontal centering inside columns */
  }  
  
 
  /* =========================================================
     KPI STRIP
     ========================================================= */
  .kpi-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }
  
  .kpi-predictive-card {
    border-radius: 12px;
    cursor: pointer;
  
    /* Layout */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    justify-self: center;
    width: 100%;
    height:90px;
  
    /* Visual refinement */
    border: 1px solid rgba(120, 170, 220, 0.35);
    background-clip: padding-box;
  
    /* Subtle elevation */
    box-shadow:
      0 1px 2px rgba(15, 23, 42, 0.08),
      0 4px 10px rgba(15, 23, 42, 0.06);
  
    /* Interaction */
    transition:
      box-shadow 0.25s ease,
      transform 0.2s ease,
      background 0.25s ease;
  }
  
  .kpi-predictive-card.predictive {
    background: linear-gradient(
      135deg,
      rgba(209, 232, 255, 0.95),
      rgba(180, 215, 250, 0.75)
    );
  }    
  
  .kpi-title {
    font-size: 12px;
    color: #666;
  }
  
  .kpi-value {
    font-size: 20px;
    font-weight: 600;
    margin-top: 4px;
  }
  
  /* =========================================================
     REPORT SECTIONS
     ========================================================= */
     .report-container {
      max-width: 1400px;
      margin: 0 auto;
      display: none;
      flex-direction: column;
      gap: 16px;   /* instead of 20px */
    }
    
      
  .report-section.fill {
    display: flex;
    flex-direction: column;
    height: 100%;
  }
  
  .section-header {
    margin: 0 0 10px 0;
    font-size: 16px;
    color:#000000
  }
  
  .section-body {
    font-size: 14px;
    line-height: 1.45;
    color: #444;
  }
  
  .section-body.scroll {
    flex: 1;
    overflow-y: auto;
  }
  
  /* =========================================================
     STATUS & SEVERITY
     ========================================================= */
  .status-ok {
    color: #2ecc71;
    font-weight: bold;
  }
  
  .status-warning {
    color: #f39c12;
    font-weight: bold;
  }
  
  .status-critical {
    color: #e74c3c;
    font-weight: bold;
  }
  
  .severity-low {
    color: #2ecc71;
    font-weight: bold;
  }
  
  .severity-medium {
    color: #f1c40f;
    font-weight: bold;
  }
  
  .severity-high {
    color: #e74c3c;
    font-weight: bold;
  }
  
  /* =========================================================
     SENSOR DETAILS (EXPANDABLE ROW)
     ========================================================= */
  .details-row td {
    background: #f7f9fc !important;
    border-top: none !important;
    padding: 0 !important;
  }
  
  .details-box {

    width: 100%;
    background: #ffffff;
    padding: 16px 20px;
    border: 1px solid #e1e5ea;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  }
  
  .details-box strong {
    display: block;
    margin-bottom: 12px;
    font-size: 15px;
  }
  
  .details-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px 16px;
  }
  
  .detail-item {
    background: linear-gradient(
      135deg,
      rgba(209, 232, 255, 0.95),
      rgba(180, 215, 250, 0.75)
    );
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid #e3e7eb;
    font-size: 13px;
  }
  
  .detail-label {
    font-weight: 600;
    color: #444;
  }
  
 
  /* =========================================================
     CHARTS & WIDGETS
     ========================================================= */
  .widget-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
  }
  
  .chart-wrapper {
    width: 100%;
    height: 180px;
  }
  
  .chart-wrapper canvas {
    width: 100% !important;
    height: 100% !important;
  }
  
  .small-note {
    font-size: 11px;
    color: #777;
    margin-top: 8px;
  }
  .info-icon {
    margin-left: 6px;
    cursor: pointer;
    font-size: 13px;
    color: #666;
  }
  
  .info-icon:hover {
    color: #000;
  }
  .hero-row {
    display: grid;
    grid-template-columns: 1fr;   /* ✅ THIS */
    gap: 16px;
    width: 100%;
  }
    
  .health-gauge-wrapper {
    width: 80px;
    height: 80px;
    grid-template-columns: 1fr 1fr;
    margin-left: 7px;
  }
  
  #healthGauge {
    width: 100%;
    height: 100%;
    display: block;
  }
  /* Health KPI: 2-column layout */
.kpi-predictive-card.health-kpi {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 12px;
  align-items: center;
  justify-items: center;
  text-align: center;
}

      /* KPI stack */
  .hero-kpis {
    width:100%;
    display: grid;
    grid-template-columns: repeat(4, minmax(220px, 1fr));
    gap: 12px;
    align-items: stretch;
    height: 95%;
    padding-top: 10px;
    padding-left: 10px;
    padding-right: 10px;
  }
  
   
  /* Summary */
  .hero-summary {
    background: #fff;
    border-radius: 12px;
    padding: 14px;
    overflow: auto;
    font-size: 14px;
  }
  .details-btn {
    background: var(--themeBgBtnColor);
    color: #fff;
    border: none;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
  }

  /* Full-page overlay */
.predictive-loader {
  position: fixed;
  inset: 0;
  background: rgba(15, 18, 30, 0.75);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

/* Hide helper */
.predictive-loader.hidden {
  display: none;
}

/* Center card */
.loader-card {
  background: #f1f3f5;
  border-radius: 14px;
  padding: 28px 36px;
  text-align: center;
  width: 340px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
}

/* Spinner ring (subtle, not playful) */
.loader-ring {
  width: 52px;
  height: 52px;
  margin: 0 auto 18px;
  border-radius: 50%;
  border: 4px solid #dfe4ee;
  border-top-color: #3b82f6; /* brand blue */
  animation: spin 1.1s linear infinite;
}

/* Text */
.loader-title {
  font-size: 15px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 6px;
}

.loader-sub {
  font-size: 13px;
  color: #6b7280;
}

/* Animation */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

    