/* === Neon Base Theme === */
body {
  font-family: 'Segoe UI', sans-serif;
  background-color: #1e1e1e;
  color: #FFA500;
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

a,
button {
  transition: 0.3s ease-in-out;
}

a:hover,
button:hover {
  filter: brightness(1.2);
}

.container {
  max-width: 1000px;
  margin: auto;
  padding: 20px;
  padding-bottom: 120px;
  /* เพิ่มพื้นที่ด้านล่างให้ footer ไม่ทับเนื้อหา */
}


/* === Neon Buttons === */
.btn {
  background-color: #FFA500;
  color: #1e1e1e;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 0 12px #FFA500;
  transition: 0.3s ease-in-out;
}

.btn:hover {
  background-color: #FF8000;
  box-shadow: 0 0 18px #FF8000, 0 0 25px #FF8000;
}

/* === Hub Layout === */
.hub-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 20px 80px;
}

.hub-title {
  font-size: 24px;
  color: #ffcc00;
  margin-bottom: 20px;
}

.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  justify-items: center;
}

.hub-card {
  background-color: #1a1a1a;
  border: 2px solid #ff6600;
  border-radius: 12px;
  text-align: center;
  padding: 20px 10px;
  transition: 0.3s;
  text-decoration: none;
  color: white;
  box-shadow: 0 0 15px rgba(255, 102, 0, 0.4);
  width: 100%;
  box-sizing: border-box;
}

.hub-card:hover {
  background-color: #222;
  box-shadow: 0 0 20px #ff6600, 0 0 30px #ff6600;
}

.hub-card span.icon {
  font-size: 32px;
  display: block;
  margin-bottom: 10px;
}

.hub-card span.thai {
  font-size: 18px;
  font-weight: bold;
}

.hub-card span.eng {
  font-size: 14px;
  color: #e0e0e0;
  display: block;
  margin-top: 2px;
  font-weight: 500;
}

/* === Dashboard Summary Boxes === */
.dashboard-summary {
  max-width: 1000px;
  margin: 30px auto;
  padding: 0 20px 80px;
  flex-grow: 1;
}

.summary-box {
  background-color: #1a1a1a;
  border-left: 5px solid #ff6600;
  padding: 15px 20px;
  margin-bottom: 15px;
  border-radius: 6px;
  box-shadow: 0 0 15px rgba(255, 102, 0, 0.3);
}

.summary-box h3 {
  margin: 0;
  font-size: 18px;
  color: #ffcc00;
  text-shadow: 0 0 8px #ffcc00;
}

.summary-box p {
  margin: 5px 0 0 0;
  font-size: 16px;
}

/* === Footer & Back Button === */
.footer-fixed {
  position: fixed;
  bottom: 0;
  width: 100%;
  background-color: #111;
  text-align: center;
  padding: 12px 10px;
  color: #aaa;
  font-size: 14px;
  z-index: 999;
  box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.5);
}

.footer-button {
  margin-bottom: 6px;
}

.btn-back {
  background-color: #FFA500;
  color: #1e1e1e;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: bold;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 0 10px #FFA500;
  transition: 0.3s ease-in-out;
}

.btn-back:hover {
  background-color: #FF8000;
  box-shadow: 0 0 16px #FF8000, 0 0 22px #FF8000;
}

/* === Sidebar (if needed) === */
.sidebar a {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  padding: 12px 24px;
  white-space: nowrap;
}

.sidebar a::before {
  content: attr(data-icon);
  font-size: 20px;
  display: inline-block;
  width: 30px;
  text-align: left;
}

/* === Form Styling === */
form label {
  display: block;
  margin-bottom: 6px;
  font-weight: bold;
  color: #ffcc99;
}

.form-group {
  margin-bottom: 16px;
}

form input[type="text"],
form input[type="date"],
form select,
form textarea {
  width: 100%;
  padding: 10px;
  background: #2a2a2a;
  border: 1px solid #444;
  border-radius: 6px;
  color: white;
  box-sizing: border-box;
  font-size: 16px;
  box-shadow: 0 0 10px rgba(255, 165, 0, 0.15);
  transition: 0.3s;
}

form input:focus {
  border-color: #ffa500;
  box-shadow: 0 0 14px #FFA500;
  outline: none;
}

/* === Responsive for Mobile === */
@media (max-width: 600px) {
  .container {
    padding: 16px;
    border-radius: 0;
    margin-top: 0;
    box-shadow: none;
  }

  input,
  select,
  textarea {
    font-size: 16px;
    padding: 12px;
  }

  .btn-container {
    flex-direction: column;
    gap: 12px;
  }

  .btn,
  .btn-back {
    width: 100%;
  }
}

/* === Header + Sidebar Styles previously inline in header.php === */

body {
  margin: 0;
  font-family: "Segoe UI", sans-serif;
  background-color: #0d0d0d;
  color: #fff;
}

/* Sidebar Menu */
/* Sidebar เริ่มต้นปิดอยู่เสมอ */
.sidebar {
  position: fixed;
  top: 0;
  bottom: 0;
  width: 0 !important;            /* บังคับให้ปิด */
  overflow-x: hidden;
  transition: width 0.3s ease-in-out;
  background-color: #1a1a1a;
  box-shadow: 3px 0 15px #ff6600;
  z-index: 2000;
}

/* เมื่อมี class “open” จะขยายออก */
.sidebar.open {
  width: 250px !important;
}

/* ปุ่มปิดที่อยู่ใน sidebar */
.sidebar .closebtn {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 24px;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  z-index: 1001;
}


.sidebar a {
  padding: 12px 24px;
  text-decoration: none;
  font-size: 18px;
  color: #fff;
  display: block;
  text-shadow: 0 0 5px #ff6600;
  transition: 0.3s;
  text-align: left;
  justify-content: flex-start;
  /* ✅ จัดเนื้อหาใน a ให้เริ่มจากซ้าย */
  padding-left: 24px;
  /* แน่นอนว่าคุณมีแล้ว */
  padding-right: 24px;
  /* ปรับให้เท่ากันซ้าย-ขวา */
}

.sidebar a:hover,
.sidebar a.active {
  background-color: #111;
  color: #ff6600;
  text-shadow: 0 0 8px #ff6600;
}

.sidebar-section-title {
  padding: 12px 24px 6px;
  font-weight: bold;
  font-size: 15px;
  color: #ffa500;
  text-shadow: 0 0 4px #ffa500;
  border-top: 1px solid #333;
  margin-top: 12px;
  text-align: left;
  display: block;
}


/* Open button */
.openbtn {
  font-size: 24px;
  cursor: pointer;
  background-color: transparent;
  color: #ff6600;
  padding: 10px 16px;
  border: none;
  text-shadow: 0 0 6px #ff6600;
  position: absolute;
  top: 10px;
  left: 10px;
}

/* Header title */
.main-header {
  text-align: center;
  padding: 20px 10px 10px;
}

.main-header h1 {
  margin: 0;
  font-size: 24px;
  color: #00ffff;
  text-shadow: 0 0 8px #00ffff, 0 0 14px #00ffff;
}

/* User info */
.header-user-info {
  text-align: right;
  padding: 10px 20px;
  font-size: 14px;
  color: #00ffff;
  text-shadow: 0 0 4px #00ffff;
}

.header-user-info a {
  color: #ff6600;
  text-shadow: 0 0 3px #ff6600;
  margin-left: 10px;
  font-weight: bold;
  text-decoration: none;
}

.header-user-info a:hover {
  text-decoration: underline;
}

.layout-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.spacer-footer {
  height: 50px;
  /* fallback ถ้า JS ไม่ทำงาน */
  transition: height 0.3s ease;
}

.footer-fixed {
  position: fixed;
  bottom: 0;
  width: 100%;
  background-color: #111;
  text-align: center;
  padding: 12px 10px;
  color: #aaa;
  font-size: 14px;
  z-index: 999;
  box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.5);
  box-sizing: border-box;
}

.footer-button-wrapper {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  padding: 0 16px;
  box-sizing: border-box;
}

.footer-button-wrapper .btn-back {
  width: 100%;
  padding: 12px;
  font-size: 16px;
  background-color: #FFA500;
  color: #1e1e1e;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  box-shadow: 0 0 10px #FFA500;
}

.tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.tab-btn {
  background-color: #333;
  color: #ffa500;
  padding: 10px 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 0 6px #ff6600;
  font-weight: bold;
}

.tab-btn.active {
  background-color: #ff6600;
  color: #1e1e1e;
  box-shadow: 0 0 12px #ff6600;
}

.tab-content {
  animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.form-input {
  width: 100%;
  padding: 10px;
  background: #2a2a2a;
  border: 1px solid #444;
  border-radius: 6px;
  color: white;
  box-sizing: border-box;
  font-size: 16px;
  box-shadow: 0 0 10px rgba(255, 165, 0, 0.15);
  transition: 0.3s;
}

.form-input:focus {
  border-color: #ffa500;
  box-shadow: 0 0 14px #FFA500;
  outline: none;
}

.neon-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  background-color: #1e1e1e;
  box-shadow: 0 0 12px rgba(255, 102, 0, 0.4);
  border-radius: 8px;
  overflow: hidden;
}

.neon-table th {
  background-color: #ff6600;
  color: #1e1e1e;
  padding: 12px;
  font-weight: bold;
  text-align: left;
  text-shadow: 0 0 5px #ffcc00;
}

.neon-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #333;
  color: #fff;
}

.neon-table tr:hover {
  background-color: #292929;
}

.neon-table td .btn-edit,
.neon-table td .btn-delete {
  padding: 6px 10px;
  border-radius: 6px;
  font-weight: bold;
  font-size: 14px;
  text-decoration: none;
  transition: 0.2s ease-in-out;
}

.btn-edit {
  background-color: #00ccff;
  color: #1e1e1e;
  box-shadow: 0 0 8px #00ccff;
}

.btn-edit:hover {
  background-color: #00aacc;
  box-shadow: 0 0 12px #00aacc;
}

.btn-delete {
  background-color: #ff4d4d;
  color: white;
  box-shadow: 0 0 8px #ff4d4d;
  margin-left: 6px;
}

.btn-delete:hover {
  background-color: #e60000;
  box-shadow: 0 0 12px #e60000;
}

@media (max-width: 768px) {
  .responsive-table {
    display: block;
    width: 100%;
    overflow-x: auto;
  }

  .responsive-table table {
    width: 100%;
    border-collapse: collapse;
  }

  .responsive-table thead {
    display: none;
  }

  .responsive-table tbody tr {
    display: block;
    border: 1px solid #444;
    margin-bottom: 10px;
    border-radius: 8px;
    background-color: #1e1e1e;
    box-shadow: 0 0 10px rgba(255, 102, 0, 0.2);
  }

  .responsive-table tbody td {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    border-bottom: 1px solid #333;
    position: relative;
    font-size: 14px;
  }

  .responsive-table tbody td::before {
    content: attr(data-label);
    font-weight: bold;
    color: #ffa500;
    flex-shrink: 0;
    margin-right: 10px;
  }

  .responsive-table td:last-child {
    border-bottom: none;
  }
}

/* === Updated Buttons (Edit/Delete) === */
.btn-edit {
  background-color: #00ccff;
  color: #1e1e1e;
  box-shadow: 0 0 10px #00ccff, 0 0 15px #00ccff;
  border-radius: 8px;
  padding: 8px 14px;
  font-weight: bold;
  font-size: 14px;
  display: inline-block;
  margin: 2px 3px;
  transition: 0.3s ease-in-out;
}

.btn-edit:hover {
  background-color: #0099cc;
  box-shadow: 0 0 12px #0099cc, 0 0 20px #0099cc;
}

.btn-delete {
  background-color: #ff4d4d;
  color: #fff;
  box-shadow: 0 0 10px #ff4d4d, 0 0 15px #ff4d4d;
  border-radius: 8px;
  padding: 8px 14px;
  font-weight: bold;
  font-size: 14px;
  display: inline-block;
  margin: 2px 3px;
  transition: 0.3s ease-in-out;
}

.btn-delete:hover {
  background-color: #cc0000;
  box-shadow: 0 0 12px #cc0000, 0 0 20px #cc0000;
}

/* === Improved Search Bar === */
.search-bar {
  margin: 20px 0;
  text-align: center;
  padding: 0 10px;
}

#searchInput,
#searchCars {
  width: 100%;
  max-width: 100%;
  padding: 10px 18px;
  border: 2px solid #ff6600;
  border-radius: 30px;
  font-size: 16px;
  background-color: #1a1a1a;
  color: #FFA500;
  box-shadow: 0 0 10px rgba(255, 102, 0, 0.4);
  transition: 0.3s ease-in-out;
  box-sizing: border-box;
  /* สำคัญมาก: ป้องกันล้นขอบ */
}

@media (max-width: 600px) {
  #searchInput {
    font-size: 15px;
    padding: 10px 14px;
    max-width: 100%;
  }
}


#searchInput:focus,
#searchCars:focus {
  outline: none;
  border-color: #ffaa33;
  box-shadow: 0 0 12px #ffaa33;
}

@media (max-width: 600px) {

  .btn-edit,
  .btn-delete {
    width: 100%;
    display: block;
    text-align: center;
  }

  #searchInput {
    max-width: 100%;
    font-size: 16px;
  }
}

.status-label {
  font-weight: bold;
  font-size: 14px;
  display: inline-block;
  margin: 4px 0;
  text-align: center;
}

/* สีเรืองแสงตามสถานะ */
.status-label.รอเพิ่มอุปกรณ์ {
  color: #eeff00;
  text-shadow: 0 0 6px #eeff00;
}

.status-label.กำลังทำงาน {
  color: #ff8800;
  text-shadow: 0 0 8px #ff8800;
}

.status-label.รอปิดงาน {
  color: #00aaff;
  text-shadow: 0 0 8px #00aaff;
}

.status-label.ปิดงาน {
  color: #00ff88;
  text-shadow: 0 0 8px #00ff88;
}

.tool-preview {
  max-width: 250px;
  border-radius: 8px;
  box-shadow: 0 0 12px rgba(255, 165, 0, 0.4);
  display: block;
}

.status-label.กำลังทำงาน {
  color: #ff3333;
  text-shadow: 0 0 6px #ff3333;
  font-weight: bold;
}

.status-label.ว่าง {
  color: #66ff66;
  text-shadow: 0 0 6px #66ff66;
  font-weight: bold;
}

@media (max-width: 600px) {
  .container>div:first-child {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

/* === Tool List Expand Style === */
.tool-card {
  background-color: #1a1a1a;
  padding: 14px 16px;
  margin-bottom: 16px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(255, 102, 0, 0.4);
  transition: 0.3s ease;
  cursor: pointer;
  border: 1px solid #ff6600;
}

.tool-summary {
  font-size: 16px;
  font-weight: bold;
  color: #ffa500;
  text-shadow: 0 0 4px #ffa500;
  margin-bottom: 4px;
}

.tool-subline {
  font-size: 14px;
  color: #eee;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}

.tool-subline span {
  display: inline-block;
  margin-top: 4px;
}

.tool-detail {
  display: none;
  margin-top: 10px;
  font-size: 14px;
  color: #fff;
}

.tool-detail div {
  margin-bottom: 6px;
}

.tool-image {
  max-width: 100%;
  max-height: 180px;
  margin-bottom: 10px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(255, 102, 0, 0.3);
}

/* === Tab Styling for Tool List === */
.tool-tab-btn {
  background-color: #222;
  color: #ffa500;
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  margin-right: 8px;
  cursor: pointer;
  font-weight: bold;
  box-shadow: 0 0 6px #ff6600;
  transition: 0.3s ease-in-out;
}

.tool-tab-btn.active {
  background-color: #ff6600;
  color: #1e1e1e;
  box-shadow: 0 0 12px #ff6600;
}

.tool-tab-container {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.tool-action-buttons {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tool-action-buttons a {
  flex: 1 1 120px;
  text-align: center;
}

@media (max-width: 600px) {
  .tool-summary {
    font-size: 15px;
  }

  .tool-subline {
    font-size: 13px;
    flex-direction: column;
    gap: 4px;
  }

  .tool-action-buttons a {
    width: 100%;
  }
}

/* ปรับตำแหน่งปุ่มให้แนวนอนและอยู่ในแถว */
.tool-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

/* ปรับ status ให้เด่นขึ้น */
.status-line {
  margin-top: 4px;
  font-size: 14px;
  font-weight: bold;
}

.status-line .status-label {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  background-color: #222;
  box-shadow: 0 0 6px rgba(255, 165, 0, 0.4);
}

.status-label.ว่าง {
  color: #66ff66;
  text-shadow: 0 0 6px #66ff66;
}

.status-label.กำลังใช้งาน {
  color: #ff4444;
  text-shadow: 0 0 6px #ff4444;
}

@media (max-width: 600px) {
  .tool-actions {
    flex-direction: row;
    justify-content: flex-start;
  }

  .btn-edit,
  .btn-delete {
    padding: 8px 14px;
    font-size: 14px;
  }
}

.tool-summary div {
  word-wrap: break-word;
  /* รองรับคำยาวๆ */
  overflow-wrap: break-word;
  /* รองรับในเบราว์เซอร์ใหม่ */
  white-space: normal;
  /* ให้ตัดบรรทัดอัตโนมัติ */
  line-height: 1.4;
}

.tool-buttons {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-top: 12px;
}

.tool-buttons .btn-edit,
.tool-buttons .btn-delete {
  flex: 1 1 48%;
  text-align: center;
}

@media (max-width: 600px) {
  .form-actions .btn {
    width: 100%;
    box-sizing: border-box;
  }
}

.table-dark {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

@media (max-width: 768px) {
  .table-dark {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}

@media (max-width: 600px) {
  .form-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }
}

@media (max-width: 768px) {
  .tool-card {
    background: #1c1c1c;
    border: 1px solid #444;
    margin-bottom: 10px;
    border-radius: 10px;
    cursor: pointer;
  }

  .tool-summary {
    padding: 10px;
    color: #00ccff;
    font-weight: bold;
  }

  .tool-detail {
    padding: 10px;
    display: none;
    background-color: #262626;
    color: #fff;
  }
}

.label-glow {
  color: #00ccff;
  font-weight: bold;
  text-shadow: 0 0 6px rgba(0, 204, 255, 0.7);
}

.value-normal {
  color: #fff;
  font-weight: normal;
  text-shadow: none;
}

/* 🟡 เสริมความสามารถ responsive ให้ปุ่มและตาราง */
.tool-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}

.tool-actions a {
  padding: 6px 10px;
  font-size: 14px;
  border-radius: 6px;
  box-sizing: border-box;
}

/* ✅ ไฮไลต์แถวที่เลือก */
.row-selected {
  background-color: #333333 !important;
  box-shadow: inset 0 0 8px #ffaa00;
}

/* --- ตารางแท้ที่ responsive บนมือถือ --- */
.responsive-table-true table {
  width: 100%;
  border-collapse: collapse;
}

.responsive-table-true th,
.responsive-table-true td {
  padding: 12px;
  border: 1px solid #333;
  text-align: left;
  font-size: 14px;
}

.responsive-table-true thead {
  background-color: #ff6600;
  color: black;
  font-weight: bold;
}

@media (max-width: 768px) {
  .responsive-table-true {
    overflow-x: auto;
    display: block;
  }

  .responsive-table-true table {
    min-width: 600px;
  }
}

.status-label.ปกติ {
  color: #66ff66;
  text-shadow: 0 0 6px #66ff66;
  font-weight: bold;
}

.status-label.เสีย {
  color: #ff3333;
  text-shadow: 0 0 6px #ff3333;
  font-weight: bold;
}

.status-label.ส่งซ่อม {
  color: #ffaa00;
  text-shadow: 0 0 6px #ffaa00;
  font-weight: bold;
}

.status-label.Calibrate {
  color: #3399ff;
  text-shadow: 0 0 6px #3399ff;
  font-weight: bold;
}

.status-label.งดใช้ {
  color: #ff3333;
  text-shadow: 0 0 6px #ff3333;
  font-weight: bold;
}

.table-center thead th {
  text-align: center;
}

.column-details {
  word-break: break-word;
  white-space: normal;
}

.nowrap {
  white-space: nowrap;
}

.disabled {
  opacity: 0.5;
  pointer-events: none;
  cursor: not-allowed;
  box-shadow: none;
}

.summary-box p {
  margin: 6px 0;
  line-height: 1.8em;
  font-size: 15px;
}

.label-glow {
  color: #ffaa00;
  text-shadow: 0 0 5px #ff6600, 0 0 10px #ff6600;
  font-weight: bold;
  margin-right: 8px;
}

.status-label.ปิดงาน {
  color: #00ff99;
  font-weight: bold;
}

.summary-box {
  background-color: #1e1e1e;
  padding: 15px;
  border-radius: 10px;
  margin-bottom: 20px;
}

.summary-box h3 {
  font-size: 18px;
  margin-bottom: 10px;
  word-break: break-word;
}

.info-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin-bottom: 6px;
}

.info-row span {
  display: flex;
  flex-wrap: wrap;
}


.status-label {
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 4px;
  background-color: #444;
}

/* Responsive adjustment */
@media (max-width: 768px) {
  .info-row {
    flex-direction: column;
    gap: 4px;
  }

  .summary-box h3 {
    font-size: 16px;
  }
}

.job-detail-container {
  width: 100%;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
  padding: 16px;
}

@media (min-width: 768px) {
  .job-detail-container {
    max-width: 720px;
  }
}

.role-tag {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.85em;
  font-weight: bold;
  color: #121212;
  margin-left: 8px;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
}

/* === Neon‐style Roles with Icons === */
.role-admin {
  color: #FFD700;
  /* Gold */
  text-shadow:
    0 0 6px #FFD700,
    0 0 12px #FFD700,
    0 0 18px #FFD700;
}

.role-admin::before {
  content: "🛡️";
  margin-right: 6px;
}

.role-moderator {
  color: #FF8C00;
  /* Dark Orange */
  text-shadow:
    0 0 6px #FF8C00,
    0 0 12px #FF8C00,
    0 0 18px #FF8C00;
}

.role-moderator::before {
  content: "🔧";
  margin-right: 6px;
}

.role-staff {
  color: #DA70D6;
  /* Orchid */
  text-shadow:
    0 0 6px #DA70D6,
    0 0 12px #DA70D6,
    0 0 18px #DA70D6;
}

.role-staff::before {
  content: "🛠️";
  margin-right: 6px;
}

.role-warehouse {
  color: #20B2AA;
  /* Light Sea Green */
  text-shadow:
    0 0 6px #20B2AA,
    0 0 12px #20B2AA,
    0 0 18px #20B2AA;
}

.role-warehouse::before {
  content: "🚚";
  margin-right: 6px;
}

.role-user {
  color: #C0C0C0;
  /* Silver */
  text-shadow:
    0 0 6px #C0C0C0,
    0 0 12px #C0C0C0,
    0 0 18px #C0C0C0;
}

.role-user::before {
  content: "👤";
  margin-right: 6px;
}

.role-banned {
  color: #FF0000;
  /* Bright Red */
  text-shadow:
    0 0 6px #FF0000,
    0 0 12px #FF0000,
    0 0 18px #FF0000;
  text-decoration: line-through;
  opacity: 0.8;
}

.role-banned::before {
  content: "🚫";
  margin-right: 6px;
}

/* === Neon‐style Positions === */
.position-director {
  color: #E5E4E2;
  /* Platinum */
  text-shadow:
    0 0 6px #E5E4E2,
    0 0 12px #E5E4E2,
    0 0 18px #E5E4E2;
}

.position-gm {
  color: #C0C0C0;
  /* Silver */
  text-shadow:
    0 0 6px #C0C0C0,
    0 0 12px #C0C0C0,
    0 0 18px #C0C0C0;
}

.position-officer {
  color: #CD7F32;
  /* Bronze */
  text-shadow:
    0 0 6px #CD7F32,
    0 0 12px #CD7F32,
    0 0 18px #CD7F32;
}

.position-leader {
  color: #B87333;
  /* Copper */
  text-shadow:
    0 0 6px #B87333,
    0 0 12px #B87333,
    0 0 18px #B87333;
}

.position-staft {
  color: #A9A9A9;
  /* DarkGray */
  text-shadow:
    0 0 6px #A9A9A9,
    0 0 12px #A9A9A9,
    0 0 18px #A9A9A9;
}

/* === Neon‐style Departments === */
.department-management {
  color: #8A2BE2;
  /* BlueViolet */
  text-shadow:
    0 0 6px #8A2BE2,
    0 0 12px #8A2BE2,
    0 0 18px #8A2BE2;
}

.department-engineering {
  color: #4169E1;
  /* RoyalBlue */
  text-shadow:
    0 0 6px #4169E1,
    0 0 12px #4169E1,
    0 0 18px #4169E1;
}

.department-electrician {
  color: #00CED1;
  /* DarkTurquoise */
  text-shadow:
    0 0 6px #00CED1,
    0 0 12px #00CED1,
    0 0 18px #00CED1;
}

.department-purchase {
  color: #FF1493;
  /* DeepPink */
  text-shadow:
    0 0 6px #FF1493,
    0 0 12px #FF1493,
    0 0 18px #FF1493;
}

.department-technician {
  color: #2E8B57;
  /* SeaGreen */
  text-shadow:
    0 0 6px #2E8B57,
    0 0 12px #2E8B57,
    0 0 18px #2E8B57;
}

.department-sales-maketing {
  color: #FF4500;
  /* OrangeRed */
  text-shadow:
    0 0 6px #FF4500,
    0 0 12px #FF4500,
    0 0 18px #FF4500;
}

.department-account {
  color: #FFD700;
  /* Gold */
  text-shadow:
    0 0 6px #FFD700,
    0 0 12px #FFD700,
    0 0 18px #FFD700;
}


a.disabled {
  pointer-events: none;
  color: #999 !important;
  background-color: #444 !important;
  border-color: #666 !important;
  box-shadow: none !important;
  opacity: 0.6;
  cursor: not-allowed !important;
}

@media (max-width: 600px) {

  /* ✅ ป้องกันเนื้อหาล้น */
  html,
  body {
    overflow-x: hidden;
  }

  .job-detail-container {
    padding: 16px;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
  }

  /* ✅ Tab ยังเรียงแนวนอน แต่ลดขนาดและบรรจุได้ */
  .tabs {
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start;
  }

  .tab-btn {
    flex: 1 1 auto;
    font-size: 14px;
    padding: 8px 12px;
    min-width: fit-content;
  }

  /* ✅ Info-row แบบแนวนอนที่ตัดบรรทัดได้ */
  .info-row {
    flex-wrap: wrap;
    gap: 8px 12px;
  }

  .info-row span {
    flex: 1 1 auto;
    word-break: break-word;
    white-space: normal;
  }

  /* ✅ tool-card ใช้ layout เดิมแต่ไม่ล้น */
  .tool-card,
  .tool-summary,
  .tool-detail {
    max-width: 100%;
    word-break: break-word;
    white-space: normal;
  }

  .tool-summary div {
    margin-bottom: 6px;
  }

  /* ✅ search-bar ปรับขนาด */
  .search-bar input {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  /* ✅ ปุ่มต่าง ๆ เต็มความกว้าง */
  .btn-container {
    flex-wrap: wrap;
    gap: 10px;
  }

  .btn,
  .btn-back,
  .btn-return-all {
    flex: 1 1 48%;
    text-align: center;
    box-sizing: border-box;
  }
}

.accessory-column {
  white-space: nowrap;
  word-break: keep-all;
  text-align: left;
  min-width: auto;
}

.responsive-table-true {
  width: 100%;
  overflow-x: auto;
  box-sizing: border-box;
}

.tool-list-page {
  max-width: 1400px;
  /* ขยายความกว้างเฉพาะหน้านี้ */
  background-color: #121212;
  border-radius: 12px;
  padding: 30px 20px;
  box-shadow: 0 0 20px rgba(255, 102, 0, 0.3);
  margin-top: 20px;
  margin-bottom: 40px;
}

.tool-list-page .responsive-table-true {
  overflow-x: auto;
  padding-bottom: 20px;
}

.action-menu {
  position: relative;
  display: inline-block;
}

.more-btn {
  background-color: #00ccff;
  border: none;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 18px;
  cursor: pointer;
}

.menu-options {
  position: absolute;
  right: 0;
  background-color: #262626;
  min-width: 150px;
  box-shadow: 0 0 12px rgba(255, 102, 0, 0.4);
  z-index: 1;
  border-radius: 8px;
  overflow: hidden;
}

.menu-options a {
  color: white;
  padding: 10px 15px;
  text-decoration: none;
  display: block;
  font-size: 14px;
}

.menu-options a:hover {
  background-color: #ff6600;
  color: black;
}

.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  padding-top: 100px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.7);
}

.modal-content {
  background-color: #1a1a1a;
  margin: auto;
  padding: 20px;
  border: 2px solid #ff6600;
  width: 90%;
  max-width: 400px;
  border-radius: 10px;
  text-align: center;
}

.close {
  color: #ff6600;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.modal-buttons {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* ✅ ตรงกลาง */
  gap: 10px;
}

.modal-buttons .btn {
  display: inline-block;
  width: auto;
  min-width: 160px;
  max-width: 100%;
  padding: 10px 20px;
  white-space: nowrap;
}

.btn-manage {
  background-color: #ff6600;
  color: #000;
  padding: 6px 14px;
  font-size: 14px;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 0 5px #ff6600, 0 0 10px #ff6600;
  transition: all 0.2s ease;
}

.btn-manage:hover {
  background-color: #ffaa33;
  box-shadow: 0 0 10px #ffaa00, 0 0 20px #ffaa00, 0 0 30px #ffaa00;
  color: #000;
}

.modal {
  /* copy จาก job_list modal */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: #111;
  padding: 1.5rem;
  border: 2px solid #ff6600;
  border-radius: 0.5rem;
  width: 90%;
  max-width: 500px;
}

/* ปรับ input, textarea, select ให้ match theme */
.modal-content input,
.modal-content select,
.modal-content textarea {
  width: 100%;
  margin-bottom: 0.75rem;
  padding: 0.5rem;
  background: #222;
  color: #fff;
  border: 1px solid #333;
}

/* Internal Users checkbox list */
.checkbox-group label {
  display: block;
  margin-bottom: 8px;
  cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
  transform: scale(1.2);
  margin-right: 8px;
}
/* เฉพาะใน job detail */
.job-detail-container .btn-container {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
@media (max-width: 600px) {
  .job-detail-container .btn-container {
    gap: 12px;
  }
  .job-detail-container .btn,
  .job-detail-container .btn-back,
  .job-detail-container .btn-return-all {
    flex: 1 1 100%;
  }
}

/* ไฮไลท์ใน modal ของ job detail เท่านั้น */
.job-detail-container .modal-content ul li.self-worker {
  color: #66ff66;
  font-weight: bold;
  text-shadow: 0 0 6px #66ff66;
}
.self-worker {
  color: #66ff66;
  font-weight: bold;
  text-shadow: 0 0 6px #66ff66;
}
/* === My Planned Calendar & Table Styles === */

/* ปฏิทิน */
#calendar {
  background: #1a1a1a;
  border-radius: 8px;
  padding: 0.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  max-width: 900px;
  margin: 1rem auto;
}
.fc .fc-col-header-cell-cushion {
  color: #ff6600;
}
.fc .fc-button-primary {
  background-color: #ff6600;
  border-color: #ff6600;
}

/* แถบค้นหา */
.search-wrapper {
  width: 100%;
  position: relative;
  margin: 1rem 0;
}
.search-input {
  width: 100%;
  padding: 8px 40px 8px 16px;
  border: 2px solid #ff6600;
  border-radius: 20px;
  font-size: 1em;
  background-color: #1a1a1a;
  color: #FFA500;
  box-shadow: 0 0 10px rgba(255, 102, 0, 0.4);
  transition: 0.3s ease-in-out;
  box-sizing: border-box;
}
.btn-clear {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 1.2em;
  color: #888;
  cursor: pointer;
  display: none;
}

/* ไฮไลท์แถวตาราง */
.highlight-today td {
  color: #83da01;
  text-shadow: 0 0 5px #83da01, 0 0 10px #83da01;
}
.highlight-tomorrow td {
  color: #FFFF66;
  text-shadow: 0 0 5px #FFFF66, 0 0 10px #FFFF66;
}
.highlight-ongoing {
  background-color: rgba(173, 216, 230, 0.5) !important;
}
.row-selected {
  background-color: #333 !important;
  box-shadow: inset 0 0 8px #ffaa00;
  transition: background-color 0.3s;
}
.row-search-highlight {
  background-color: rgba(204, 232, 255, 0.5) !important;
}

/* Spacer ป้องกัน footer ทับ */
.spacer-footer {
  height: 50px;
}
/* ---------------------------------- */
/* job-list: neon styles for job type */
/* ---------------------------------- */
.type-icon {
  font-size: 1.2em;
  vertical-align: middle;
}
.type-label {
  border-radius: 4px;
  font-weight: bold;
  text-shadow: 0 0 6px currentColor;
  vertical-align: middle;
}

/* สี neon ตามประเภท */
.neon-electrical { color: #00ffff; }  /* cyan */
.neon-generator { color: #ff99ff; }   /* pink */
.neon-motor     { color: #ffff66; }   /* yellow */
.neon-rental    { color: #66ff66; }   /* green */
.neon-cancel    { color: #ff6666; }   /* red */
.neon-default   { color: #ffffff; }   /* white */
.neon-claim     { color: #ffcc00; text-shadow: 0 0 6px #ffcc00;}
.neon-borrow     { color:#667dff; }