body {
  font-family: Segoe UI, Tahoma, sans-serif;
  background: #121212;
  color: #e8e8e8;
  margin: 0;
  padding: 20px;
}
.container {
  max-width: 1250px;
  margin: auto;
}
.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-bottom: 2px solid #333;
  padding-bottom: 15px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
h1 {
  color: #4db6ac;
  margin: 0;
}
.nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.btn, a.btn {
  display: inline-block;
  background: #37474f;
  color: #fff;
  text-decoration: none;
  border: 0;
  border-radius: 6px;
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 700;
  transition: background .15s ease;
}
.btn:hover, a.btn:hover {
  background: #00897b;
}
.danger {
  background: #b71c1c !important;
}
.danger:hover {
  background: #d32f2f !important;
}
.primary {
  background: #00897b !important;
}
.primary:hover {
  background: #00796b !important;
}
.muted {
  color: #999;
}
.box {
  background: #1e1e1e;
  border: 1px solid #333;
  border-radius: 9px;
  padding: 18px;
  margin-bottom: 20px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.card {
  background: #1e1e1e;
  border: 1px solid #333;
  border-radius: 9px;
  overflow: hidden;
}
.card img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  display: block;
}
.card-body {
  padding: 14px;
}
.stats {
  display: flex;
  gap: 30px;
  justify-content: space-around;
  text-align: center;
  flex-wrap: wrap;
}
.stat b {
  display: block;
  color: #4db6ac;
  font-size: 1.5em;
}
.section {
  font-size: 1.3em;
  font-weight: 700;
  border-bottom: 1px solid #333;
  padding-bottom: 8px;
  margin: 25px 0 14px;
}
.session {
  background: #1e1e1e;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.thumb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}
.thumb {
  background: #1e1e1e;
  border: 1px solid #333;
  border-radius: 8px;
  overflow: hidden;
  content-visibility: auto;
  contain-intrinsic-size: 300px 240px;
}
.thumb img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #141414;
  display: block;
  cursor: pointer;
}
.thumb .cap {
  padding: 9px;
  color: #aaa;
  font-size: .85em;
  word-break: break-all;
}
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .95);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}
.lightbox img {
  max-width: 94%;
  max-height: 88%;
  object-fit: contain;
}
.close {
  position: absolute;
  right: 25px;
  top: 12px;
  font-size: 42px;
  cursor: pointer;
}
.lbnav {
  position: absolute;
  top: 50%;
  font-size: 38px;
  background: rgba(255, 255, 255, .12);
  border: 0;
  color: #fff;
  padding: 12px 18px;
  cursor: pointer;
}
.prev {
  left: 15px;
}
.next {
  right: 15px;
}
.form-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.form-row input, .form-row select {
  background: #111;
  color: #eee;
  border: 1px solid #555;
  border-radius: 5px;
  padding: 9px;
}
.notice {
  padding: 12px;
  border-radius: 6px;
  background: #263238;
  color: #ddd;
  margin-bottom: 15px;
}
.gallery-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.video-container {
  position: relative;
  width: 100%;
  height: 260px;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
}
.video-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.video-play-badge {
  position: absolute;
  width: 64px;
  height: 64px;
  background: rgba(0, 137, 123, .85);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, .7);
  transition: transform .2s, background .2s;
  pointer-events: none;
}
.video-container:hover .video-play-badge {
  transform: scale(1.15);
  background: #00897b;
}
.video-badge-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0, 0, 0, .75);
  color: #4db6ac;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: .78em;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
  pointer-events: none;
}

/* Modal Dialogs */
.modal-overlay {
  display: none;
  position: fixed !important;
  inset: 0 !important;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
  z-index: 99998;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}
.modal-box {
  background: #181b1f;
  border: 1px solid #37474f;
  border-radius: 10px;
  width: 100%;
  max-width: 920px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.85);
  color: #eee;
  overflow: hidden;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid #263238;
  background: #1e2228;
}
.modal-title {
  font-size: 1.15em;
  font-weight: 700;
  color: #80cbc4;
  margin: 0;
}
.modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}
.modal-footer {
  padding: 12px 20px;
  border-top: 1px solid #263238;
  display: flex;
  justify-content: flex-end;
  background: #1e2228;
  gap: 10px;
}
.fits-body-layout {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.fits-preview-col {
  flex: 0 0 310px;
  max-width: 100%;
  text-align: center;
}
.fits-preview-col img {
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  border-radius: 6px;
  border: 1px solid #37474f;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.8);
  background: #000;
  cursor: pointer;
  transition: transform 0.2s;
}
.fits-preview-col img:hover {
  transform: scale(1.02);
}
.fits-info-col {
  flex: 1 1 320px;
  min-width: 0;
}
.fits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.fits-card {
  background: #21262d;
  border: 1px solid #30363d;
  border-radius: 6px;
  padding: 10px 14px;
}
.fits-label {
  font-size: 0.78em;
  color: #8b949e;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.fits-val {
  font-size: 1.05em;
  font-weight: 600;
  color: #58a6ff;
  word-break: break-all;
}
.fits-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85em;
  font-family: monospace;
}
.fits-table th, .fits-table td {
  padding: 6px 10px;
  border-bottom: 1px solid #263238;
  text-align: left;
}
.fits-table th {
  color: #80cbc4;
  background: #1a1e24;
}
.fits-table tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

/* Inline FITS Drawer */
.fits-inline-drawer {
  grid-column: 1 / -1;
  width: 100%;
  background: #181b1f;
  border: 1px solid #00897b;
  border-radius: 8px;
  padding: 16px 20px;
  margin: 6px 0 14px 0;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.4), 0 6px 24px rgba(0, 0, 0, 0.7);
  box-sizing: border-box;
  animation: fitsDrawerFadeIn 0.25s ease-out;
}
@keyframes fitsDrawerFadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.fits-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid #263238;
  flex-wrap: wrap;
  gap: 10px;
}
.fits-drawer-title {
  font-size: 1.05em;
  font-weight: 700;
  color: #80cbc4;
  display: flex;
  align-items: center;
  gap: 8px;
}
.btn.active {
  background: #00897b !important;
  color: #fff !important;
  border-color: #4db6ac !important;
}

