* {
  box-sizing: border-box;
  font-family: system-ui, "Google Sans";
}

body {
  margin: 0;
  background: #0f172a;
  color: #e5e7eb;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
  opacity: 0.7;
  cursor: pointer;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
}

input[type="date"] {
  padding-right: 36px;
}

/* 🔝 Topbar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;

  height: 56px;
  padding: 0 24px;

  background: #020617;
  border-bottom: 1px solid #1f2937;
}

.topbar .logo {
  font-weight: 600;
  display: flex;
  gap: 10px;
  align-items: center;
}

.main-menu {
  display: flex;
  align-items: center;
  gap: 24px;
}

.main-menu a {
  display: flex;
  align-items: center;
  gap: 8px;

  color: #9ca3af;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;

  padding: 6px 10px;
  border-radius: 8px;
  transition: 0.2s;
}

.main-menu a:hover {
  background: rgba(255,255,255,0.04);
  color: #e5e7eb;
}

.main-menu a.active {
  color: #3b82f6;
  background: rgba(59,130,246,0.15);
}

/* 🧱 Layout */
.container {
  padding: 24px;
  max-width: 1400px;
  margin: auto;
}


.card {
  background: linear-gradient(
    180deg,
    #111827,
    #0b1220
  );
  border-radius: 16px;
  padding: 20px;
  box-shadow:
    inset 0 0 0 1px #1f2937,
    0 20px 40px rgba(0,0,0,0.4);
}



/* 📊 Summary */
.summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.summary strong {
  font-size: 22px;
}

.summary-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 20px;
}

.summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.summary-head .label {
  font-size: 20px;
  font-weight: 600;
  line-height: 20px;
  color: #9ca3af;
}

.summary-head i {
  font-size: 50px;
  line-height: 20px;
  padding-top: 5px;
  color: #3b82f6;
  opacity: 0.9;
}

.summary-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.summary-info strong {
  font-size: 26px;
  font-weight: 600;
  color: #e5e7eb;
}

.summary-info span {
  font-size: 12px;
  color: #6b7280;
}


/* 🔍 Filter */
.filter {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  align-items: end;
}

.filter-group label {
  font-size: 12px;
  color: #6b7280;
}

.filter input,
.filter select {
  height: 44px;
  padding: 0 14px;

  background: #020617;
  border: 1px solid #1f2937;
  border-radius: 12px;

  color: #e5e7eb;
  font-size: 14px;
  font-family: "Google Sans", system-ui, sans-serif;

  transition: border-color .2s, box-shadow .2s;
}

input::placeholder {
  color: #6b7280;
}

.filter input:focus,
.filter select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59,130,246,.25);
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}



/* 📋 Table */
.table {
  margin-top: 24px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  color: #9ca3af;
}

td {
  color: #e5e7eb;
  border-top: 1px solid #1f2937;
}

.table table {
  width: 100%;
  border-collapse: collapse;
}

.table thead th {
  text-align: left;
  font-size: 12px;
  font-weight: 500;
  color: #6b7280;
  padding: 12px 14px;
}

.table tbody td {
  padding: 14px;
  font-size: 14px;
}

.table tbody tr {
  transition: background .2s, transform .1s;
}

.table tbody tr:hover {
  background: rgba(59,130,246,0.06);
  transform: translateY(-1px);
}

tbody tr {
  transition: 0.2s;
  cursor: pointer;
}

tbody tr:hover {
  background: rgba(59,130,246,0.06);
}


.table strong {
  color: #e5e7eb;
  font-weight: 600;
}

.table td:first-child {
  color: #9ca3af;
}


.ok {
  color: #22c55e;
}

.icon-btn {
  border-radius: 8px;
  padding: 6px;
  transition: 0.2s;
  color: #9ca3af;
}

.icon-btn:hover {
  background: rgba(59,130,246,0.15);
  color: #3b82f6;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
}

.badge.success {
  background: rgba(34,197,94,0.15);
  color: #22c55e;
}

.badge.pending {
  background: rgba(234,179,8,0.15);
  color: #eab308;
}

.badge.fail {
  background: rgba(239,68,68,0.15);
  color: #ef4444;
}

.badge.blue {
  background: rgba(59,130,246,0.15);
  color: #3b82f6;
}

.badge.red {
  background: rgba(246, 59, 59, 0.15);
  color: #ce0000;
}

.badge.orange {
  background: rgba(249,115,22,0.15);
  color: #f97316;
}


.action {
  display: flex;
  align-items: center;
  gap: 10px;              /* ระยะห่างระหว่างไอคอน */
  justify-content: center;
  white-space: nowrap;   /* กันตกบรรทัด */
}


.action i {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;

  border-radius: 8px;
  color: #9ca3af;
  cursor: pointer;

  transition: 0.2s;
}

.action i:hover {
  background: rgba(59,130,246,0.15);
  color: #3b82f6;
}

.icon-btn {
  background: none;
  border: none;

  padding: 6px;
  border-radius: 8px;

  color: #9ca3af;
  cursor: pointer;
  transition: .2s;
}

.icon-btn:hover {
  background: rgba(59,130,246,0.15);
  color: #3b82f6;
}

.icon-btn.danger:hover {
  background: rgba(239,68,68,0.15);
  color: #ef4444;
}


/* ===== Modal netflix ===== */
/* Netflix modal backdrop */
#netflixModal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,.75);
}

#netflixModal.hidden {
  display: none;
}

/* ตัวกล่องหลัก */
.netflix-box {
  position: relative;
  height: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 24px;

  display: flex;
  flex-direction: column;
  gap: 20px;

  color: #fff;
}

.nf-header {
  padding: 16px 20px;
  font-weight: 600;
  border-bottom: 1px solid #1f2937;
}

.nf-viewer {
  flex: 1;
  background: #000;
  border-radius: 12px;

  display: flex;
  align-items: center;
  justify-content: center;

  overflow: hidden;
}

.nf-viewer video,
.nf-viewer img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}


/* timeline คลิป */
.nf-timeline {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  overflow-x: auto;
  border-top: 1px solid #1f2937;
  background: linear-gradient(180deg, #020617, #020617);
}

/* gallery รูป */
.nf-gallery {
  display: flex;
  gap: 10px;
  padding: 12px 16px;
  overflow-x: auto;
  border-top: 1px solid #1f2937;
}

.nf-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.7);
}

.nf-thumb {
  width: 140px;
  height: 78px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  opacity: 0.6;
  transition: all 0.15s ease;
}

 .nf-thumb:hover {
  opacity: 1;
  transform: scale(1.04);
 }

.nf-thumb.active {
  outline: 2px solid #3b82f6;
  opacity: 1;
}

video.nf-thumb {
  background: #000;
}

.nf-clips {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.nf-clip {
  min-width: 140px;
  padding: 10px 12px;

  background: #1f1f1f;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;

  font-size: 14px;
  text-align: center;
  white-space: nowrap;

  transition: all 0.15s ease;
}

.nf-clip:hover {
  background: #2a2a2a;
}

.nf-clip.active {
  background: #0d6efd;
  font-weight: 600;
}
.nf-photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;

  max-height: 180px;
  overflow-y: auto;
}

.nf-photo {
  width: 100%;
  height: 90px;
  min-width: 140px;
  object-fit: cover;

  border-radius: 6px;
  cursor: pointer;

  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.nf-photo:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(0,0,0,0.4);
}

.nf-photo.active {
  outline: 2px solid #0d6efd;
}






/* 🌫 Backdrop */
/* ===== Modal Overlay ===== */


.modal.hidden {
  display: none !important;
}


/* ❌ ปุ่มปิด */
.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;

  background: none;
  border: none;
  color: #9ca3af;
  font-size: 26px;
  cursor: pointer;
}

.modal-close:hover {
  color: #fff;
}


/* ---- header ---- */
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal h2 {
  margin: 0 0 12px;
  font-size: 22px;
}

.modal h3 {
  margin: 24px 0 12px;
  font-size: 16px;
  color: #9ca3af;
}

.badge {
  background: rgba(59,130,246,0.15);
  color: #3b82f6;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
}


.photo-thumb {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 10px;
  cursor: zoom-in;
  transition: 0.2s;
}

.photo-thumb:hover {
  transform: scale(1.05);
}

.image-viewer img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 16px;
}


/* 📋 Meta */
.meta {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 16px;
}

.meta span {
  font-size: 12px;
  color: #6b7280;
}

.meta strong {
  display: block;
  margin-top: 4px;
  font-size: 14px;
}


/* arrows */
.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 32px;
  color: #e5e7eb;
  background: rgba(0,0,0,0.4);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.gallery-nav:hover {
  background: rgba(0,0,0,0.7);
}

.gallery-nav.prev { left: -60px; }
.gallery-nav.next { right: -60px; }
