/* /css/dark.css */

/* ============ Dark tokens ============ */
:root{
  --re-bg0:#070a12;
  --re-bg1:#0b1020;
  --re-panel:rgba(16,22,36,.86);
  --re-panel-2:rgba(18,26,44,.92);
  --re-stroke:rgba(255,255,255,.10);

  --re-text:rgba(255,255,255,.92);
  --re-muted:rgba(255,255,255,.68);

  --re-primary:#3b82f6;
  --re-danger:#ef4444;
  --re-warning:#f59e0b;
  --re-success:#22c55e;

  --re-radius:16px;
  --re-shadow:0 18px 60px rgba(0,0,0,.55);
}

/* Only apply when body has .re-dark */
body.re-dark{
  color:var(--re-text);
  background:
    radial-gradient(1200px 600px at 18% 12%, rgba(59,130,246,.18), transparent 60%),
    radial-gradient(900px 550px at 80% 10%, rgba(34,197,94,.10), transparent 55%),
    linear-gradient(180deg, var(--re-bg0), var(--re-bg1));
  min-height:100vh;
}

/* =========================================================
   FORCE WHITE HEADINGS / TITLES (put at END of dark.css)
   ========================================================= */

/* Headings tag + Bootstrap heading helpers */
body.re-dark h1,
body.re-dark h2,
body.re-dark h3,
body.re-dark h4,
body.re-dark h5,
body.re-dark h6,
body.re-dark .h1,
body.re-dark .h2,
body.re-dark .h3,
body.re-dark .h4,
body.re-dark .h5,
body.re-dark .h6,
body.re-dark .display-1,
body.re-dark .display-2,
body.re-dark .display-3,
body.re-dark .display-4,
body.re-dark .display-5,
body.re-dark .display-6{
  color: rgba(255,255,255,.96) !important;
}

/* Common titles in Admin templates */
body.re-dark .card-title,
body.re-dark .card-header,
body.re-dark .modal-title,
body.re-dark .offcanvas-title,
body.re-dark .dropdown-header,
body.re-dark .nav-title,
body.re-dark .breadcrumb,
body.re-dark .breadcrumb-item,
body.re-dark .breadcrumb-item a{
  color: rgba(255,255,255,.94) !important;
}

/* Fix bootstrap utility classes that often force dark text */
body.re-dark .text-dark,
body.re-dark .text-body,
body.re-dark .link-dark,
body.re-dark .text-black,
body.re-dark .text-black-50{
  color: rgba(255,255,255,.92) !important;
}

/* Make <small> / captions readable too */
body.re-dark small,
body.re-dark .small{
  color: rgba(255,255,255,.80) !important;
}

/* If you want ALL headings always pure white (optional) */
/*
body.re-dark h1, body.re-dark h2, body.re-dark h3,
body.re-dark h4, body.re-dark h5, body.re-dark h6{
  color:#fff !important;
}
*/

/* ===============================
   Material Symbols – FIX
   =============================== */

.material-symbols-outlined{
  font-family: 'Material Symbols Outlined' !important;
  font-weight: normal;
  font-style: normal;
  font-size: 22px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  /* Required for correct rendering */
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;

  /* Enable ligatures */
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;

  /* Variable font control */
  font-variation-settings:
    'FILL' 0,
    'wght' 400,
    'GRAD' 0,
    'opsz' 24;
}

/* Base text helpers */
body.re-dark .text-muted{ color:var(--re-muted)!important; }
body.re-dark a{ color:rgba(147,197,253,.95); }
body.re-dark a:hover{ color:#bfdbfe; }

/* ============ Layout background ============ */
body.re-dark .wrapper,
body.re-dark .main,
body.re-dark .content{
  background: transparent !important;
}

/* ============ Sidebar (keep your existing look, but more consistent) ============ */
body.re-dark .sidebar,
body.re-dark .sidebar-content{
  background: rgba(10,14,26,.95) !important;
  border-right: 1px solid rgba(255,255,255,.06);
}
body.re-dark .sidebar-link,
body.re-dark a.sidebar-link{
  background: transparent !important;
  color: rgba(255,255,255,.82) !important;
}
body.re-dark .sidebar-link:hover{
  background: rgba(255,255,255,.06) !important;
}
body.re-dark .sidebar-header{ color: rgba(255,255,255,.70) !important; }
body.re-dark hr.sec{ border-top:1px solid rgba(255,255,255,.12)!important; }

/* ============ Top navbar ============ */
/* Your template uses navbar-light navbar-bg; we override into dark */
body.re-dark .navbar-bg{
  background: rgba(9,12,22,.72) !important;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
body.re-dark .navbar,
body.re-dark .navbar .nav-link,
body.re-dark .navbar .nav-icon{
  color: rgba(255,255,255,.86) !important;
}
body.re-dark .navbar .text-dark{
  color: rgba(255,255,255,.88) !important; /* fixes your <span class="text-dark"> */
}
body.re-dark .hamburger,
body.re-dark .hamburger::before,
body.re-dark .hamburger::after{
  background: rgba(255,255,255,.72) !important;
}

/* ============ Cards / panels ============ */
body.re-dark .card{
  background: var(--re-panel) !important;
  border: 1px solid rgba(255,255,255,.10) !important;
  border-radius: var(--re-radius) !important;
  box-shadow: var(--re-shadow);
}
body.re-dark .card-header{
  background: rgba(255,255,255,.04) !important;
  border-bottom: 1px solid rgba(255,255,255,.08) !important;
}
body.re-dark .card-title{ color: var(--re-text) !important; }

/* ============ Tables ============ */
body.re-dark .table{
  color: rgba(255,255,255,.86) !important;
  margin-bottom: 0;
}
body.re-dark .table thead th{
  color: rgba(255,255,255,.78) !important;
  background: rgba(255,255,255,.03) !important;
  border-bottom: 1px solid rgba(255,255,255,.10) !important;
}
body.re-dark .table td,
body.re-dark .table th{
  border-color: rgba(255,255,255,.08) !important;
}
body.re-dark .table-hover tbody tr:hover{
  background: rgba(59,130,246,.10) !important;
}

/* ============ Inputs / selects ============ */
body.re-dark .form-control,
body.re-dark .form-select{
  background: rgba(255,255,255,.05) !important;
  color: rgba(255,255,255,.90) !important;
  border: 1px solid rgba(255,255,255,.12) !important;
  border-radius: 12px;
}
body.re-dark .form-control::placeholder{
  color: rgba(255,255,255,.42) !important;
}
body.re-dark .form-control:focus,
body.re-dark .form-select:focus{
  border-color: rgba(59,130,246,.55) !important;
  box-shadow: 0 0 0 .2rem rgba(59,130,246,.18) !important;
}

/* remove default white helper blocks */
body.re-dark .bg-light{
  background: rgba(255,255,255,.04) !important;
}
body.re-dark .border{
  border-color: rgba(255,255,255,.10) !important;
}

/* ============ Buttons (keep bootstrap but look modern) ============ */
body.re-dark .btn{
  border-radius: 12px;
}
body.re-dark .btn-outline-secondary{
  color: rgba(255,255,255,.80) !important;
  border-color: rgba(255,255,255,.18) !important;
}
body.re-dark .btn-outline-secondary:hover{
  background: rgba(255,255,255,.10) !important;
}
body.re-dark .btn-outline-primary{
  color: rgba(147,197,253,.95) !important;
  border-color: rgba(59,130,246,.55) !important;
}
body.re-dark .btn-outline-primary:hover{
  background: rgba(59,130,246,.16) !important;
}
body.re-dark .btn-primary{
  background: linear-gradient(135deg, rgba(59,130,246,.95), rgba(29,78,216,.95)) !important;
  border-color: rgba(59,130,246,.55) !important;
}

/* ============ Modals ============ */
body.re-dark .modal-content{
  background: rgba(12,16,28,.92) !important;
  border: 1px solid rgba(255,255,255,.12) !important;
  border-radius: 18px !important;
  box-shadow: var(--re-shadow);
}
body.re-dark .modal-header,
body.re-dark .modal-footer{
  border-color: rgba(255,255,255,.10) !important;
}
body.re-dark .btn-close{
  filter: invert(1) grayscale(100%);
  opacity: .8;
}
body.re-dark .modal-backdrop.show{
  opacity: .65;
}

/* ============ Footer ============ */
body.re-dark .footer{
  background: rgba(6,8,16,.86) !important;
  border-top: 1px solid rgba(255,255,255,.10) !important;
}
body.re-dark .footer .text-muted,
body.re-dark .footer a.text-muted{
  color: rgba(255,255,255,.70) !important;
}
body.re-dark .footer a.text-muted:hover{
  color: rgba(255,255,255,.92) !important;
}

/* ============ Small polish ============ */
body.re-dark .pagination .btn{
  border-radius: 10px;
}

/* ===== Force white text for all headings + table elements (dark mode) ===== */
body.re-dark h1,
body.re-dark h2,
body.re-dark h3,
body.re-dark h4,
body.re-dark h5,
body.re-dark h6{
  color: rgba(255,255,255,.92) !important;
}

/* Table: make ALL text white, including nested spans/links */
body.re-dark table,
body.re-dark thead,
body.re-dark tbody,
body.re-dark tfoot,
body.re-dark tr,
body.re-dark th,
body.re-dark td{
  color: rgba(255,255,255,.86) !important;
}

/* If you have badges/links inside table and want them white too */
body.re-dark td *:not(.btn):not(.badge):not(.alert),
body.re-dark th *:not(.btn):not(.badge):not(.alert){
  color: rgba(255,255,255,.86) !important;
}

/* Keep Bootstrap .text-muted still muted (optional; remove if you want PURE white everywhere) */
body.re-dark .text-muted{
  color: rgba(255,255,255,.68) !important;
}

/* Leaflet controls – dark IOC style */
.re-dark .leaflet-bar a{
  background:#0b1220 !important;
  color:#e5e7eb !important;
  border-color: rgba(255,255,255,.15) !important;
}
.re-dark .leaflet-bar a:hover{
  background:#14203c !important;
}
.re-dark .leaflet-control-attribution{
  background: rgba(0,0,0,.45) !important;
  color: rgba(255,255,255,.7) !important;
}
.re-dark .leaflet-control-attribution a{
  color:#7cc4ff !important;
}

.leaflet-control-attribution {
  display: none !important;
}

/* ===== Node label (IOC style) ===== */
.node-label {
  color: #ffffff;
  font-size: 11px;
  font-weight: 500;
  text-shadow:
    0 1px 2px rgba(0,0,0,.9),
    0 0 6px rgba(0,0,0,.6);
  white-space: nowrap;
  pointer-events: none;
  transform: translate(-50%, 2px);
}

/* Flow line styling (Leaflet SVG paths) */
.flow-path{
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 2px rgba(0,0,0,.55));
  stroke-dasharray: 10 14;          /* dash pattern */
  animation-duration: 1.35s;        /* overridden per line */
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

@keyframes dashForward { from { stroke-dashoffset: 0; } to { stroke-dashoffset: -48; } }
@keyframes dashBackward { from { stroke-dashoffset: 0; } to { stroke-dashoffset: 48; } }

.flow-forward{ animation-name: dashForward; }
.flow-backward{ animation-name: dashBackward; }

/* Small arrow marker (divIcon) */
.flow-arrow{
  width: 14px; height: 14px;
  transform-origin: 50% 50%;
  opacity: .95;
  filter: drop-shadow(0 0 2px rgba(0,0,0,.6));
}
.flow-arrow::before{
  content:"";
  display:block;
  width:0;height:0;
  border-left:7px solid transparent;
  border-right:7px solid transparent;
  border-bottom:12px solid rgba(255,255,255,.92); /* overwritten by inline style */
  transform: translateY(1px);
}

.flow-path{
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 2px rgba(0,0,0,.55));
  stroke-dasharray: 10 14;
  animation-name: dashForward;
  animation-duration: 1.35s;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}
@keyframes dashForward { from { stroke-dashoffset: 0; } to { stroke-dashoffset: -48; } }

.flow-arrow{
  width: 14px; height: 14px;
  transform-origin: 50% 50%;
  opacity: .95;
  filter: drop-shadow(0 0 2px rgba(0,0,0,.6));
}
.flow-arrow::before{
  content:"";
  display:block;
  width:0;height:0;
  border-left:7px solid transparent;
  border-right:7px solid transparent;
  border-bottom:12px solid rgba(255,255,255,.92);
  transform: translateY(1px);
}

/* ===== Drawer sidebar like smartcit.com ===== */
.re-drawer{
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 320px;               /* ปรับได้ */
  max-width: 86vw;
  z-index: 1200;
  transform: translateX(-110%);
  transition: transform .22s ease;
  will-change: transform;

  /* ใช้ธีมเดิมของคุณได้ แต่ผมใส่โทนใกล้ smartcit */
  background: rgba(7, 12, 26, .92);
  backdrop-filter: blur(10px);
  border-right: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 18px 60px rgba(0,0,0,.65);
}

/* เปิด drawer */

/* Backdrop */
.re-drawer-backdrop{
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(0,0,0,.55);
  /*backdrop-filter: blur(2px);*/
}

/* Drawer header */
.re-drawer-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  padding: 14px 14px 10px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.re-brand{ display:flex; gap:10px; align-items:flex-start; }
.re-brand-logo{ width:65px; height:auto; margin-top:2px; }
.re-brand-title{ font-weight:900; font-size:1.15rem; color: rgba(255,255,255,.95); line-height:1.1; }
.re-brand-sub{ font-size:.82rem; color: rgba(255,255,255,.70); margin-top:4px; }

.re-drawer-close{
  border: 0;
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.9);
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display:grid;
  place-items:center;
  border: 1px solid rgba(255,255,255,.10);
}
.re-drawer-close:hover{ background: rgba(255,255,255,.09); }

/* ให้ sidebar-content scroll ได้ดี */
.re-drawer .sidebar-content{
  height: 100%;
  overflow: auto;
}

/* Optional: ปรับ main ให้ไม่โดนบังเวลา desktop
   - ถ้าคุณอยากให้ "ไม่ต้องเหลือที่ว่าง" แบบ smartcit ให้คอมเมนต์ส่วนนี้ทิ้ง */
@media (min-width: 992px){
  body.sidebar-open .main{
    filter: none;
  }
}

/* Dark “select” button */
body.re-dark .re-select{
  background: rgba(255,255,255,.05);
  color: rgba(255,255,255,.90);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  padding: 8px 10px;
}
body.re-dark .re-select:focus{
  box-shadow: 0 0 0 .2rem rgba(59,130,246,.18);
  border-color: rgba(59,130,246,.55);
}

/* Dark dropdown menu */
body.re-dark .dropdown-menu.re-menu{
  background: rgba(12,16,28,.96);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  box-shadow: 0 18px 60px rgba(0,0,0,.55);
  padding: 6px;
}

/* Items */
body.re-dark .dropdown-menu.re-menu .dropdown-item{
  color: rgba(255,255,255,.88);
  border-radius: 10px;
  padding: 10px 10px;
}
body.re-dark .dropdown-menu.re-menu .dropdown-item:hover,
body.re-dark .dropdown-menu.re-menu .dropdown-item:focus{
  background: rgba(59,130,246,.16);
  color: rgba(255,255,255,.96);
}

.panel-list {
  overflow: auto;
}

/* ===============================
   IOC Panel – Dark Scrollbar
   =============================== */

/* Chrome, Edge, Safari */
.panel-list::-webkit-scrollbar {
  width: 8px;
}

.panel-list::-webkit-scrollbar-track {
  background: rgba(255,255,255,.04);
  border-radius: 10px;
}

.panel-list::-webkit-scrollbar-thumb {
  background: linear-gradient(
    180deg,
    rgba(59,130,246,.65),
    rgba(59,130,246,.35)
  );
  border-radius: 10px;
  border: 2px solid rgba(0,0,0,.35);
}

.panel-list::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(
    180deg,
    rgba(59,130,246,.85),
    rgba(59,130,246,.55)
  );
}

/* Firefox */
.panel-list {
  scrollbar-width: thin;
  scrollbar-color: rgba(59,130,246,.6) rgba(255,255,255,.05);
}

/* ===== Floating Drawer (Top-Left) FINAL ===== */

:root{
  --drawer-width: 320px;
  --drawer-top-offset: 64px; /* adjust if your navbar is taller */
  --drawer-radius: 18px;
}

/* Make the drawer floating */
#sidebar.re-drawer{
  position: fixed !important;
  top: var(--drawer-top-offset) !important;
  left: 12px !important;

  width: var(--drawer-width) !important;
  max-width: 86vw;
  max-height: calc(100vh - var(--drawer-top-offset) - 24px) !important;

  background: linear-gradient(180deg, rgba(15,20,35,.96), rgba(10,14,28,.96)) !important;
  border-radius: var(--drawer-radius) !important;
  box-shadow: 0 20px 50px rgba(0,0,0,.65), inset 0 0 0 1px rgba(255,255,255,.06) !important;

  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  overflow: hidden !important;
  z-index: 1300 !important;

  transform: translateX(-120%);
  opacity: 0;
  pointer-events: none;

  transition: transform .35s cubic-bezier(.22,.61,.36,1), opacity .25s ease;
}

/* OPEN state (this is missing in your current file) */
body.sidebar-open #sidebar.re-drawer{
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

/* Scroll inside drawer */
#sidebar.re-drawer .sidebar-content{
  max-height: inherit !important;
  overflow-y: auto !important;
  padding-bottom: 12px;
}

/* Backdrop */
#sidebarBackdrop.re-drawer-backdrop{
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(0,0,0,.55);
/*  backdrop-filter: blur(2px);*/
}

/* ============================
   Drawer Navigation (Module Style)
   ============================ */

:root{
  --nav-card: rgba(255,255,255,.06);
  --nav-card2: rgba(255,255,255,.04);
  --nav-stroke: rgba(255,255,255,.10);
  --nav-stroke2: rgba(255,255,255,.14);
  --nav-glow: rgba(59,130,246,.25);
}

/* Drawer container already floating in your file (keep it) */
body.re-dark #sidebar.re-drawer{
  background: radial-gradient(900px 420px at 20% 10%, rgba(59,130,246,.18), transparent 60%),
              linear-gradient(180deg, rgba(15,20,35,.96), rgba(10,14,28,.96)) !important;
}

/* Header = "Modules" feel (same structure, just styling) */
.re-drawer-head{
  padding: 14px 14px 12px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.02);
}

.re-brand-title{
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: .2px;
}
.re-brand-sub{
  font-size: .78rem;
  opacity: .75;
}

/* Close button like example */
.re-drawer-close{
  border-radius: 14px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: 0 10px 25px rgba(0,0,0,.35);
}
.re-drawer-close:hover{
  background: rgba(255,255,255,.10);
  border-color: rgba(255,255,255,.16);
}

/* Nav list spacing */
#sidebar .sidebar-nav{
  padding: 12px;
  margin: 0;
}

/* Section header */
#sidebar .sidebar-header{
  margin: 10px 6px 8px;
  padding: 0;
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .2px;
  color: rgba(255,255,255,.70) !important;
  text-transform: none;
}

/* Each item becomes a "card" */
#sidebar .sidebar-item{
  margin: 10px 0;
}

/* Make link look like rounded module card */
#sidebar a.sidebar-link{
  display: flex;
  align-items: center;
  gap: 12px;

  padding: 14px 14px;
  border-radius: 18px;

  background: linear-gradient(180deg, var(--nav-card), var(--nav-card2)) !important;
  border: 1px solid var(--nav-stroke) !important;

  color: rgba(255,255,255,.92) !important;
  box-shadow:
    0 18px 35px rgba(0,0,0,.35),
    inset 0 0 0 1px rgba(255,255,255,.04);

  transition: transform .10s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

/* hover */
#sidebar a.sidebar-link:hover{
  transform: translateY(-1px);
  border-color: var(--nav-stroke2) !important;
  background: linear-gradient(180deg, rgba(59,130,246,.14), rgba(255,255,255,.05)) !important;
  box-shadow:
    0 22px 45px rgba(0,0,0,.42),
    0 0 0 2px rgba(59,130,246,.15) inset;
}

/* icon */
#sidebar .re-ic{
  font-size: 22px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: #1181FF;
}

/* two-line text */
#sidebar .re-lines{
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.1;
}
#sidebar .re-title{
  font-weight: 600;
  font-size: 1.02rem;
  color: rgba(255,255,255,.94);
}
#sidebar .re-sub{
  margin-top: 4px;
  font-size: .80rem;
  color: rgba(255,255,255,.70);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ACTIVE state (highlight like selected module) */
#sidebar .sidebar-item.active > a.sidebar-link,
#sidebar a.sidebar-link.active{
  border-color: rgba(59,130,246,.55) !important;
  background: linear-gradient(180deg, rgba(59,130,246,.22), rgba(255,255,255,.05)) !important;
  box-shadow:
    0 22px 55px rgba(0,0,0,.45),
    0 0 0 2px rgba(59,130,246,.22) inset;
}

/* remove template default hover bg */
body.re-dark .sidebar-link:hover{
  background: unset !important;
}

/* ===============================
   Sidebar / Drawer Typography
   =============================== */

/* Base font for drawer */
.re-drawer,
.re-drawer *{
  font-family: 'Inter','Noto Sans Thai',system-ui,-apple-system,
               'Segoe UI',Roboto,'Helvetica Neue',Arial,sans-serif;
}

/* Sidebar header */
.re-drawer .sidebar-header{
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(255,255,255,.55);
  margin: 12px 12px 6px;
}

/* Sidebar link container */
.re-drawer .sidebar-link{
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
}

/* Icon */
.re-drawer .sidebar-link .re-ic{
  font-size: 22px;
  line-height: 1;
  margin-top: 2px;
  opacity: .9;
}

/* Text block */
.re-drawer .re-lines{
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

/* Main title */
.re-drawer .re-title{
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: .1px;
  color: rgba(255,255,255,.94);
}

/* Subtitle */
.re-drawer .re-sub{
  font-size: .74rem;
  font-weight: 400;
  color: rgba(255,255,255,.60);
  margin-top: 2px;
}

/* Hover */
.re-drawer .sidebar-link:hover .re-title{
  color: #bfdbfe;
}

/* Active state (optional but recommended) */
.re-drawer .sidebar-item.active > .sidebar-link{
  background: linear-gradient(
    135deg,
    rgba(59,130,246,.28),
    rgba(59,130,246,.10)
  );
  border: 1px solid rgba(59,130,246,.45);
}

.re-drawer .sidebar-item.active .re-title{
  color: #e0f2fe;
}


/* ===============================
   Drawer Footer Zone
   =============================== */

.re-drawer{
  display: flex;
  flex-direction: column;
}

.re-drawer .sidebar-content{
  flex: 1;
  overflow-y: auto;
}

/* Footer container */
.re-drawer-footer{
  padding: 14px;
  border-top: 1px solid rgba(255,255,255,.08);
  background: linear-gradient(
    180deg,
    rgba(10,14,28,.2),
    rgba(10,14,28,.6)
  );
}

/* Card */
.re-footer-card{
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 14px;
  padding: 12px;
}

/* Title */
.re-footer-title{
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: rgba(255,255,255,.55);
  margin-bottom: 8px;
}

/* Rows */
.re-footer-row{
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .78rem;
  color: rgba(255,255,255,.80);
  margin-bottom: 4px;
}

/* Status dots */
.dot{
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.dot-ok{ background: #22c55e; }
.dot-warn{ background: #f59e0b; }
.dot-err{ background: #ef4444; }

/* Meta */
.re-footer-meta{
  margin-top: 8px;
  font-size: .68rem;
  color: rgba(255,255,255,.45);
}
/* ======================================
   Special Help Button – Pulse Ring
   ====================================== */

.re-help-btn{
  position: relative !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;

  width: 36px;
  height: 36px;
  border-radius: 999px;

  overflow: visible !important;
  isolation: isolate; /* กันโดน navbar stack ทับ */
}

/* Pulse ring */
.re-help-btn::before{
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 30px;
  height: 30px;
  transform: translate(-50%, -50%);
  border-radius: 999px;

  border: 2px solid rgba(180,220,255,.65);
  box-shadow: 0 0 0 0 rgba(46,160,255,.25);
  opacity: .85;

  animation: reHelpPulse 1.8s ease-out infinite;
  pointer-events: none;
  z-index: 0;
}

/* Icon above pulse */
.re-help-btn .re-help-ico{
  position: relative;
  z-index: 1;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  opacity: .95;
}

/* Hover feedback */
.re-help-btn:hover .re-help-ico{
  opacity: 1;
  text-shadow: 0 0 10px rgba(180,220,255,.55);
}

/* Pulse animation */
@keyframes reHelpPulse{
  0%{
    transform: translate(-50%,-50%) scale(.9);
    opacity: .75;
    box-shadow: 0 0 0 0 rgba(46,160,255,.25);
  }
  70%{
    transform: translate(-50%,-50%) scale(1.35);
    opacity: .1;
    box-shadow: 0 0 0 12px rgba(46,160,255,0);
  }
  100%{
    transform: translate(-50%,-50%) scale(1.35);
    opacity: 0;
  }
}
