/* Genel ayarlar */
body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f4f6f8;
  color: #333;
  padding-top: 60px;
}

h2, h3, h4 {
  margin-top: 0;
}

/* Top Bar */
#topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 30px;
  z-index: 1000;
}

.topbar-left .page-title {
  color: white;
  font-size: 20px;
  font-weight: 600;
  margin: 0;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Language Selector */
.language-selector {
  display: flex;
  gap: 8px;
  background: rgba(255,255,255,0.1);
  padding: 4px;
  border-radius: 6px;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: transparent;
  border: none;
  border-radius: 4px;
  color: rgba(255,255,255,0.7);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.lang-btn:hover {
  background: rgba(255,255,255,0.15);
  color: white;
}

.lang-btn.active {
  background: rgba(255,255,255,0.2);
  color: white;
}

.lang-btn img {
  border-radius: 2px;
}

/* User Menu */
.user-menu {
  position: relative;
}

.user-menu-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(255,255,255,0.1);
  border: none;
  border-radius: 6px;
  color: white;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.user-menu-btn:hover {
  background: rgba(255,255,255,0.2);
}

.user-icon {
  font-size: 18px;
}

.dropdown-arrow {
  font-size: 10px;
  transition: transform 0.3s ease;
}

.user-menu-btn.active .dropdown-arrow {
  transform: rotate(180deg);
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  overflow: hidden;
}

.user-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-dropdown button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  background: white;
  border: none;
  border-bottom: 1px solid #f0f0f0;
  color: #333;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s ease;
}

.user-dropdown button:last-child {
  border-bottom: none;
}

.user-dropdown button:hover {
  background: #f8f9fa;
}

.user-dropdown button.logout-btn {
  color: #dc3545;
}

.user-dropdown button.logout-btn:hover {
  background: #fff5f5;
}
/* Logo'nun boyutunu küçültüp ortalamak için */
.logo-image {
  max-width: 350px; /* Logo genişliği, istediğiniz gibi küçültebilirsiniz */
  max-height: 350px; /* Logo yüksekliği, istediğiniz gibi küçültebilirsiniz */
  display: block;    /* Görseli blok eleman yaparak ortalamayı kolaylaştırır */
  margin-left: auto; /* Sol boşluk */
  margin-right: auto; /* Sağ boşluk */
  margin-top: 20px;  /* Üst boşluk (isteğe bağlı) */
  margin-bottom: 20px; /* Alt boşluk (isteğe bağlı) */
}

.menu-icon {
  font-size: 16px;
}
/* Kanal tablolarını scrollable yapmak */
.channel-table-wrapper {
  max-height: 300px; /* istediğin yüksekliği  */
  overflow: hidden;  /* dikey scroll */
  margin-bottom: 15px;
  border: 1px solid #ddd;
  border-radius: 6px;
}
.channel-list button.action {
  display: inline-block;
  margin-right: 5px;
}

/* Tablo içi stiller aynı kalabilir */
.channel-table-wrapper table {
  width: 100%;
  border-collapse: collapse;
}

.channel-table-wrapper th, .channel-table-wrapper td {
  padding: 10px 12px;
}

.channel-table-wrapper thead {
  background-color: var(--thead-alt);
  color: white;
}

/* Sticky header row for channel lists */
.channel-table-wrapper thead th {
  position: sticky;
  top: 0;
  z-index: 5; /* above cells */
}

/* Narrow ID column (2nd column) */
/* Column sizing: [1]=checkbox, [2]=ID, [3]=Sıra, [4]=Logo, [5]=İsim, ... */
/* Checkbox column (1st) */
.channel-list th:nth-child(1),
.channel-list td:nth-child(1) {
  width: 36px;
  min-width: 32px;
  max-width: 40px;
  text-align: center;
}
.channel-list td:nth-child(1) input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

/* ID column (2nd) */
.channel-list th:nth-child(2),
.channel-list td:nth-child(2) {
  width: 30px;
  min-width: 30px;
  max-width: 80px;
  text-align: center;
  white-space: nowrap;
}

/* Sıra/Order column (3rd) */
.channel-list th:nth-child(3),
.channel-list td:nth-child(3) {
  width: 90px;
  min-width: 20px;
  max-width: 90px;
  text-align: center;
}
.channel-list td:nth-child(3) input,
.channel-list td:nth-child(3) .orderInput,
input.orderInput {
  width: 60px !important;
}
/* İsim/Name column (4th) - daralt */
.channel-list th:nth-child(4),
.channel-list td:nth-child(4) {
  min-width: 100px;    /* İsim sütununu daralt */
  max-width: 150px;    /* İsim sütununun genişliğini kısıtla */
}

.channel-list td:nth-child(4) {
  white-space: normal;        /* Satır sarma */
  overflow-wrap: anywhere;    /* Uzun kelime/URL kır */
  word-break: break-word;     /* Kelime kırma */
  overflow: visible;
  text-overflow: unset;
}

/* URL column (5th) - genişlet */
.channel-list th:nth-child(5),
.channel-list td:nth-child(5) {
  width: 400px;  
  min-width: 300px;  /* URL sütunu için minimum genişlik */
  max-width: 700px;  /* URL sütununu genişlet */
}

.channel-list td:nth-child(5) {
  white-space: nowrap;      /* Tek satırda göster */
  overflow: hidden;         /* Taşan metin gizlensin */
  text-overflow: ellipsis;  /* Taşan metin kısaltılsın */
}

/* Action buttons column (last) - daha dar tutulsun */
.channel-list th:last-child,
.channel-list td:last-child {
  width: 120px;     /* Son sütun daha dar */
  min-width: 120px;
  max-width: 150px;
}



/* Kategori column (6th) - daralt */
.channel-list th:nth-child(6),
.channel-list td:nth-child(6) {
  width: 120px;       /* daraltıldı */
  min-width: 120px;
  max-width: 240px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Logo column (7th) - ortala */
.channel-list th:nth-child(7),
.channel-list td:nth-child(7) {
  
  text-align: center;
  vertical-align: middle;
}

/* Logo görselini de ortalamak için */
.channel-list td:nth-child(7) img {
  display: block;
  margin: 0 auto;
}

.channel-table-wrapper tbody tr:nth-child(even) {
  background-color: #f9f9f9;
}

.channel-table-wrapper tbody tr:hover {
  background-color: var(--row-hover);
}

/* Device list specific styles to avoid channel-list column collisions */
.device-list {
  width: 100%;
  border-collapse: collapse;
}
.device-list th, .device-list td {
  padding: 10px 12px;
  text-align: left;
  vertical-align: middle;
}
.device-list thead th {
  background-color: var(--thead-alt);
  color: white;
}
.device-list td:first-child, .device-list th:first-child {
  width: 48px;
  min-width: 40px;
  max-width: 60px;
  text-align: center;
}
.device-list td:nth-child(2), .device-list th:nth-child(2) {
  text-align: center;
  white-space: nowrap;
}

/* Sidebar */
#sidebar {
  position: fixed;
  left: 0;
  top: 60px;
  width: 220px;
  height: calc(100% - 60px);
  background-color: #2c3e50;
  color: white;
  padding: 20px 10px;
  box-shadow: 2px 0 5px rgba(0,0,0,0.1);
  overflow: hidden;
}
#channel-upload {
  width: 100%;
  background-color: #222;   /* koyu arka plan */
  color: #fff;
  padding: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 -2px 5px rgba(0,0,0,0.1);
  z-index: 999;
  box-sizing: border-box;
}

#channel-upload h3 {
  margin: 0;
  font-size: 16px;
}

#channel-upload input[type="file"] {
  padding: 5px;
  background-color: #333;
  color: #fff;
  border: none;
  border-radius: 4px;
}
/* admin.css içine ekle */

#channel-upload button {
  padding: 6px 12px;
  background-color: #007bff;
  border: none;
  border-radius: 4px;
  color: #fff;
  cursor: pointer;
}

#channel-upload button:hover {
  background-color: #0056b3;
}

#uploadStatus {
  margin-left: 15px;
  font-size: 14px;
}

#sidebar h2 {
  font-size: 22px;
  margin-bottom: 20px;
  text-align: center;
}

#sidebar button {
  display: block;
  width: 80%;
  margin: 10px auto;
  padding: 10px;
  font-size: 16px;
  border: none;
  border-radius: 6px;
  background-color: #34495e;
  color: white;
  cursor: pointer;
  transition: 0.3s;
  text-align: center;
}

#sidebar button:hover {
  background-color: #1abc9c;
}

#sidebar .submenu {
  width: 100%;
}

#sidebar .submenu button {
  padding-left: 12px;
  justify-content: center;
  text-align: center;
}

/* Content */
#content {
  margin-left: 240px;
  padding: 40px;
  margin-top: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
  background-color: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

table th, table td {
  padding: 12px 15px;
  text-align: left;
}

table thead {
  background-color: #34495e;
  color: white;
}

table tbody tr:nth-child(even) {
  background-color: #f9f9f9;
}

table tbody tr:hover {
  background-color: #e0f7fa;
}

/* Input ve Buton */
input.channelInput, .roomInput {
  padding: 6px 10px;
  border-radius: 4px;
  border: 1px solid #ccc;
  width: 20%;
}

button.action {
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: 0.3s;
}

button.delete {
  background-color: #e74c3c;
  color: white;
}

button.delete:hover {
  background-color: #c0392b;
}

button.add {
  background-color: #27ae60;
  color: white;
}

button.add:hover {
  background-color: #1e8449;
}
/* Kanal kartları */
.channel-card {
  background-color: white;
  padding: 15px 20px;
  margin-bottom: 20px;
  border-radius: 8px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}

.channel-card h3 {
  margin-top: 0;
  color: #34495e;
}

.channel-list {
  width: 100%;
  border-collapse: collapse;
}
/* Küçültülmüş inputlar */
.channelInput {
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid #ccc;
  width: 200px; /* küçültülmüş genişlik */
  margin-right: 10px;
}

.channel-card h4 {
  margin: 10px 0 5px;
  font-weight: normal;
  font-size: 14px;
}
.sidebar-logo {
  text-align: center;
  margin-bottom: 15px;
}

.sidebar-logo img {
  max-width: 120px;
  height: auto;
}

button.add {
  padding: 5px 12px;
  font-size: 14px;
  vertical-align: middle;
}

.channel-list th, .channel-list td {
  padding: 10px 12px;
  text-align: left;
}

.channel-list thead {
  background-color: #e82323;
  color: white;
}

.channel-list tbody tr:nth-child(even) {
  background-color: #f9f9f9;
}

.channel-list tbody tr:hover {
  background-color: #e0f7fa;
}

input.orderInput {
  width: 50px;
  padding: 4px 6px;
  border-radius: 4px;
  border: 1px solid #ccc;
  text-align: center;
}
/* Küçük inputlar - sadece kanal ekleme alanı için */
.channelInputSmall {
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid #ccc;
  width: 200px; /* küçük genişlik */
  margin-right: 10px;
  font-size: 14px;
}

/* Delete selected channels button styling */
.delete-selected {
  background: linear-gradient(135deg, #ff4757 0%, #ff3838 100%);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 71, 87, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 15px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.delete-selected:hover {
  background: linear-gradient(135deg, #ff3838 0%, #ff2828 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 71, 87, 0.4);
}

.delete-selected:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(255, 71, 87, 0.3);
}

/* Inline delete selected channels button styling */
.delete-selected-inline {
  background: linear-gradient(135deg, #ff4757 0%, #ff3838 100%);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 3px 10px rgba(255, 71, 87, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.delete-selected-inline:hover {
  background: linear-gradient(135deg, #ff3838 0%, #ff2828 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(255, 71, 87, 0.4);
}

.delete-selected-inline:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(255, 71, 87, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
  #sidebar {
    width: 100%;
    height: auto;
    position: relative;
  }
  #content {
    margin-left: 0;
    padding: 20px;
  }
  table, input.channelInput, .roomInput {
    font-size: 14px;
  }
}
#videoManager {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 500px;
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 3px 15px rgba(0,0,0,0.3);
  z-index: 9999;
  display: none; /* ilk başta gizli */
}
#videoManagerClose {
  position: absolute;
  top: 5px;
  right: 10px;
  cursor: pointer;
  font-weight: bold;
  color: red;
}

/* ---- UI Enhancements for Channels ---- */
:root {
  /* Red-accented Teknoline palette */
  --primary: #e53935;        /* main red */
  --primary-dark: #c62828;   /* dark red */
  --success: #2bb673;
  --danger: #d32f2f;         /* align danger with primary hue */
  --warning: #f0ad4e;
  --muted: #6c757d;
  --thead: #3a3f47;          /* neutral dark header */
  --thead-alt: #e53935;      /* red header for channel-list */
  --row-hover: #fff2f2;      /* subtle red-tinted hover */
  --border: #e6e9ef;
}

/* Improve general background and text rendering */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: linear-gradient(180deg, #f6f9fc 0%, #f4f6f8 100%);
}

/* Sidebar polish */
#sidebar {
  background: linear-gradient(180deg, #2c3e50 0%, #1f2a36 100%);
}
#sidebar button {
  background-color: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.08);
}
#sidebar button:hover {
  background-color: var(--primary);
  border-color: var(--primary);
}

/* Channel cards */
.channel-card {
  border: 1px solid var(--border);
}

/* Tables */
.channel-table-wrapper {
  border: 1px solid var(--border);
  background: #fff;
}
.channel-table-wrapper table {
  border-collapse: separate;
  border-spacing: 0;
}
.channel-table-wrapper thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--thead);
  color: #fff;
  box-shadow: inset 0 -1px 0 rgba(255,255,255,0.1);
}
.channel-list thead {
  background: linear-gradient(180deg, var(--thead-alt) 0%, #d62828 100%);
}
.channel-list th, .channel-list td {
  border-bottom: 1px solid var(--border);
}
.channel-list tbody tr:hover {
  background-color: var(--row-hover);
}

/* Nicer checkbox */
input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
  vertical-align: middle;
}

/* ID code cell */
code {
  background: #f1f4f8;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  color: #44566c;
}

/* Action buttons */
button.action {
  font-size: 12px;
  padding: 6px 10px;
  border: 1px solid transparent;
}
button.action.edit {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 2px 6px rgba(229,57,53,0.25);
}
button.action.edit:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}
button.action.delete {
  background: var(--danger);
  border-color: var(--danger);
}

/* Add buttons */
button.add {
  background: var(--success);
  border: 1px solid var(--success);
}
button.add:hover {
  filter: brightness(0.95);
}

/* Upload toolbar refinement */
#channel-upload {
  background: linear-gradient(135deg, #f5f7fa 0%, #e6ecf5 100%);
  color: #0b1f3a;
  border: 1px solid var(--border);
}
#channel-upload button {
  background: var(--primary);
}
#channel-upload button:hover {
  background: var(--primary-dark);
}

/* Logo images inside tables - target logo column (7th) and override inline style */
.channel-list td:nth-child(7) img {
  width: 24px !important;  /* inline 50px'i geçersiz kıl */
  height: 24px !important;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(229,57,53,0.10);
  padding: 2px;
}

/* Inputs */
.channelInput, .channelInputSmall, .roomInput, input.orderInput, #videoLink, #existingVideos {
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.02);
}

/* Content spacing */
#content h2 {
  color: #b71c1c;
  letter-spacing: 0.2px;
}

/* Welcome screen tweaks (if used) */
.welcome-screen .logo-image {
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.12));
}

/* Robust fixed header: thead fixed, tbody scrollable */
/* Disable wrapper scroll; use tbody scroll to ensure consistent sticky across browsers */
.channel-table-wrapper {
  max-height: none;
  overflow: visible;
}
.channel-list {
  width: 100%;
}
.channel-list thead,
.channel-list tbody {
  display: block;
}
.channel-list thead tr {
  display: table;
  width: 100%;
  table-layout: fixed; /* ensure fixed widths apply */
}
.channel-list tbody {
  display: block;
  max-height: 300px; /* same visual height */
  overflow: hidden;
}
.channel-list tbody tr {
  display: table;
  width: 100%;
  table-layout: fixed; /* ensure fixed widths apply */
}

/* Keep header above scroll */
.channel-list thead {
  position: sticky;
  top: 0;
  z-index: 10;
}

/* Cihaz Durum Göstergesi */
.status-indicator {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 5px;
  vertical-align: middle;
}
.status-indicator.online {
  background-color: #28a745; /* Yeşil */
}
.status-indicator.offline {
  background-color: #6c757d; /* Gri */
}

/* Uygulama Yöneticisi Modalı */
.app-modal {
  display: block;
  position: fixed;
  z-index: 1001;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.6);
}

.app-modal-content {
  background-color: #fefefe;
  margin: 10% auto;
  padding: 25px;
  border: 1px solid #888;
  width: 80%;
  max-width: 600px;
  border-radius: 8px;
  position: relative;
}

.app-modal-close {
  color: #aaa;
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.app-modal-close:hover,
.app-modal-close:focus {
  color: black;
}

.app-section {
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #eee;
}

.app-list {
  max-height: 250px;
  overflow: hidden;
  border: 1px solid #ddd;
  padding: 10px;
  border-radius: 4px;
  background: #f9f9f9;
}

.app-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px;
  border-bottom: 1px solid #eee;
}
.app-item span {
  flex-grow: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-right: 10px;
}
.app-item:last-child { border-bottom: none; }

.app-status-container {
  margin-bottom: 15px;
  padding: 10px;
  border-radius: 4px;
  background-color: #e9ecef;
  font-size: 13px;
  min-height: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.app-progress-bar {
  width: 30px;
  height: 30px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Video Upload Progress Bar */
#uploadProgressBarContainer {
  display: none;
  margin-top: 10px;
  background-color: #e9ecef;
  border-radius: 4px;
  overflow: hidden;
  height: 10px;
}

#uploadProgressBar {
  width: 0%;
  height: 100%;
  background-color: #007bff;
  transition: width 0.2s ease-in-out;
}

/* Dark Mode Styles */
body.dark-mode {
  background-color: #1a1a1a;
  color: #e0e0e0;
}

body.dark-mode #sidebar {
  background: linear-gradient(180deg, #1f1f1f 0%, #121212 100%);
  border-right: 1px solid #333;
}

body.dark-mode #sidebar button {
  background-color: rgba(255,255,255,0.05);
  color: #ccc;
  border-color: rgba(255,255,255,0.05);
}

body.dark-mode #sidebar button:hover {
  background-color: var(--primary);
  color: #fff;
}

body.dark-mode .channel-card,
body.dark-mode .app-modal-content,
body.dark-mode .modal-box,
body.dark-mode .overview-card {
  background-color: #2c2c2c;
  border-color: #444;
  color: #e0e0e0;
}

body.dark-mode .channel-card h3,
body.dark-mode .modal-title,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4 {
  color: #fff;
}

body.dark-mode table,
body.dark-mode .channel-table-wrapper,
body.dark-mode .modern-table {
  background-color: #2c2c2c;
  color: #e0e0e0;
  border-color: #444;
}

body.dark-mode thead,
body.dark-mode .modern-table thead {
  background-color: #383838;
  color: #fff;
}

body.dark-mode th,
body.dark-mode td,
body.dark-mode .channel-list th,
body.dark-mode .channel-list td {
  border-bottom-color: #444;
  color: #ccc;
}

body.dark-mode tbody tr:nth-child(even),
body.dark-mode .channel-list tbody tr:nth-child(even) {
  background-color: #333;
}

body.dark-mode tbody tr:hover,
body.dark-mode .channel-list tbody tr:hover {
  background-color: #444;
}

body.dark-mode input,
body.dark-mode select,
body.dark-mode textarea,
body.dark-mode .form-input,
body.dark-mode .channelInput,
body.dark-mode .channelInputSmall {
  background-color: #383838;
  border-color: #555;
  color: #fff;
}

body.dark-mode .id-badge,
body.dark-mode .category-badge,
body.dark-mode code {
  background-color: #444;
  color: #ddd;
  border-color: #555;
}

body.dark-mode .logo-wrapper {
  background-color: #383838;
  border-color: #555;
}

/* Compact channel search and filters */
.channel-filter-bar { display:flex; align-items:center; gap:8px; padding:10px; border:1px solid #e5e9ef; border-radius:8px; background:#fafbfc; margin:0 0 10px; }
.channel-search-box { display:flex; align-items:center; gap:7px; flex:1 1 260px; height:34px; box-sizing:border-box; padding:0 10px; border:1px solid #d7dee7; border-radius:7px; background:#fff; color:#94a3b8; }
.channel-search-box input { width:100%; border:0; outline:0; font-size:12px; color:#334155; background:transparent; }
.channel-filter-bar select { height:34px; min-width:155px; padding:0 9px; border:1px solid #d7dee7; border-radius:7px; background:#fff; color:#475569; font-size:12px; }
.channel-reset-btn { height:34px; padding:0 14px; border:0; border-radius:7px; background:#f1f3f5; color:#475569; font-size:12px; cursor:pointer; }
.channel-reset-btn:hover { background:#e5e9ee; }
@media (max-width:760px) { .channel-filter-bar { flex-wrap:wrap; } .channel-filter-bar select, .channel-reset-btn { flex:1 1 140px; } }.channel-page-head h3 { font-size:18px; font-weight:700; color:#263445; }
.channel-page-head .add-btn-modern { padding:7px 12px; font-size:12px; border-radius:6px; }
.channel-page-head .toolbar-btn-muted { color:#526173; background:#f5f7f9; border-color:#e0e5eb; box-shadow:none; }
.channel-table-wrapper { border-radius:8px; overflow:hidden; }
.channel-table-wrapper .modern-table { margin:0; }
/* Corporate admin theme trial */
:root {
  --primary:#2563eb;
  --primary-dark:#1d4ed8;
  --border:#e2e8f0;
  --row-hover:#f8fafc;
  --thead:#1e293b;
}
body { padding-top:64px; background:#f5f7fb; color:#1e293b; font-family:Inter,"Segoe UI",Arial,sans-serif; }
#topbar { height:64px; padding:0 24px; background:#ffffff; border-bottom:1px solid #e2e8f0; box-shadow:0 2px 10px rgba(15,23,42,.05); }
.topbar-left .page-title { color:#0f172a; font-size:18px; font-weight:700; letter-spacing:-.2px; }
.topbar-right { gap:10px; }
.lang-btn,.theme-switcher button,.topbar-help-btn,.user-menu-btn { color:#475569; background:transparent; border:1px solid transparent; border-radius:7px; }
.lang-btn:hover,.theme-switcher button:hover,.topbar-help-btn:hover,.user-menu-btn:hover { background:#f1f5f9; color:#1d4ed8; }
#sidebar { top:64px; width:248px; height:calc(100% - 64px); box-sizing:border-box; padding:18px 12px; background:#0f172a; border-right:1px solid #1e293b; box-shadow:4px 0 18px rgba(15,23,42,.08); }
.sidebar-logo { padding:4px 8px 14px; margin-bottom:12px; border-bottom:1px solid rgba(148,163,184,.18); }
.sidebar-logo img { max-width:145px !important; }
#sidebar h2 { margin:0 8px 16px; color:#cbd5e1; font-size:11px; font-weight:700; text-align:left; text-transform:uppercase; letter-spacing:.12em; }
#sidebar button { width:100%; margin:3px 0; padding:10px 12px; border:1px solid transparent; border-radius:7px; background:transparent; color:#cbd5e1; font-size:13px; font-weight:500; text-align:left; }
#sidebar button:hover { background:#1e293b; border-color:#334155; color:#fff; }
#sidebar button.active { background:#1d4ed8; color:#fff; box-shadow:0 4px 10px rgba(37,99,235,.22); }
#sidebar .submenu { width:100%; border-left:1px solid #334155; margin:2px 0 7px 11px; }
#sidebar .submenu button { width:calc(100% - 11px); margin:1px 0; padding:8px 10px 8px 18px; color:#94a3b8; font-size:12px; }
#sidebar .submenu button:hover { background:rgba(37,99,235,.14); color:#dbeafe; border-left-color:#60a5fa; }
#content { margin-left:248px; padding:30px 32px 44px; }
#content > h2 { color:#0f172a; font-size:24px; font-weight:750; letter-spacing:-.4px; margin-bottom:22px; }
.channel-card,.overview-card { border:1px solid #e2e8f0; border-radius:10px; background:#fff; box-shadow:0 3px 12px rgba(15,23,42,.035); }
.channel-card h3 { color:#1e293b; }
.channel-table-wrapper { border:1px solid #e2e8f0; box-shadow:none; }
.channel-table-wrapper thead th { background:#f8fafc; color:#475569; border-bottom:1px solid #e2e8f0; font-size:11px; letter-spacing:.04em; text-transform:uppercase; }
.channel-table-wrapper td { border-bottom:1px solid #eef2f7; }
.channel-table-wrapper tbody tr:hover td { background:#f8fafc; }
.add-btn-modern,.btn-save { background:#2563eb; border-color:#2563eb; box-shadow:0 3px 8px rgba(37,99,235,.18); }
.add-btn-modern:hover,.btn-save:hover { background:#1d4ed8; border-color:#1d4ed8; }
.toolbar-btn-muted,.control-btn { background:#f8fafc !important; color:#475569 !important; border-color:#dbe3ed !important; }
.toolbar-btn-muted:hover,.control-btn:hover { background:#eef4ff !important; color:#1d4ed8 !important; border-color:#bfdbfe !important; }
@media (max-width:768px) {
  #topbar { padding:0 14px; }
  #sidebar { width:280px; }
  #content { margin-left:0; padding:22px 16px 36px; }
}
body.dark-mode { background:#111827; color:#e5e7eb; }
body.dark-mode #topbar { background:#111827; border-bottom-color:#273449; }
body.dark-mode .topbar-left .page-title { color:#f8fafc; }
body.dark-mode .channel-card,.dark-mode .overview-card { background:#1f2937; border-color:#374151; }
body.dark-mode #content > h2, body.dark-mode .channel-card h3 { color:#f8fafc; }
body.dark-mode .channel-table-wrapper { border-color:#374151; background:#1f2937; }
body.dark-mode .channel-table-wrapper thead th { background:#273449; color:#cbd5e1; border-color:#374151; }
body.dark-mode .channel-table-wrapper td { border-color:#374151; }
body.dark-mode .channel-table-wrapper tbody tr:hover td { background:#263449; }
/* Borderless interface submenu */
#sidebar .submenu button,
#sidebar .submenu button:hover,
#sidebar .submenu button:focus,
#sidebar .submenu button:active {
  border:0 !important;
  border-left:0 !important;
  outline:0;
  box-shadow:none;
  background:transparent;
  border-radius:6px;
  transform:none;
}
#sidebar .submenu button:hover,
#sidebar .submenu button:focus-visible {
  background:rgba(96,165,250,.12);
  color:#e0f2fe;
}
#sidebar .submenu button.active {
  background:rgba(37,99,235,.28);
  color:#fff;
}

/* Minimal channel status and action icons */
.action-buttons { display:inline-flex; align-items:center; justify-content:flex-end; gap:4px; }
.status-btn { width:24px; height:24px; padding:0; border:0 !important; border-radius:50%; background:transparent !important; color:transparent !important; font-size:0; display:inline-flex; align-items:center; justify-content:center; cursor:pointer; }
.status-btn::before { content:''; width:10px; height:10px; border-radius:50%; display:block; box-shadow:0 0 0 3px rgba(148,163,184,.12); }
.status-btn.active::before { background:#16a34a !important; box-shadow:0 0 0 3px rgba(22,163,74,.14); }
.status-btn.inactive::before { background:#dc2626 !important; box-shadow:0 0 0 3px rgba(220,38,38,.12); }
.status-btn:hover { background:#f1f5f9 !important; }
.action-icon { width:24px; height:24px; padding:0; border:0 !important; background:transparent !important; color:#64748b; font-size:15px; border-radius:5px; }
.action-icon.edit:hover { color:#2563eb; background:#eff6ff !important; }
.action-icon.delete:hover { color:#dc2626; background:#fef2f2 !important; }


/* Proper nested interface submenu */
#interfaceSubMenu { margin:4px 0 8px 8px !important; padding:4px 0 5px 12px; border:0 !important; border-left:1px solid rgba(148,163,184,.24) !important; background:transparent !important; }
#interfaceSubMenu button { position:relative; width:calc(100% - 4px) !important; min-height:32px; margin:2px 0 !important; padding:7px 10px 7px 20px !important; border:0 !important; border-left:0 !important; border-radius:6px !important; background:transparent !important; color:#94a3b8 !important; font-size:12px !important; font-weight:500 !important; line-height:1.25; text-align:left !important; box-shadow:none !important; }
#interfaceSubMenu button::before { content:'›'; position:absolute; left:7px; top:50%; transform:translateY(-50%); color:#64748b; font-size:15px; line-height:1; }
#interfaceSubMenu button:hover, #interfaceSubMenu button:focus-visible { background:rgba(59,130,246,.13) !important; color:#dbeafe !important; }
#interfaceSubMenu button:hover::before, #interfaceSubMenu button:focus-visible::before { color:#60a5fa; }
#interfaceSubMenu button.active { background:rgba(37,99,235,.25) !important; color:#fff !important; }
#interfaceSubMenu button.active::before { color:#93c5fd; }


/* Final submenu collapse and softer light channel theme */
#interfaceSubMenu { padding:0 0 0 12px !important; border-left:0 !important; }
#interfaceSubMenu.open { padding:4px 0 5px 12px !important; border-left:1px solid rgba(148,163,184,.24) !important; }
#interfaceSubMenu:not(.open) { margin-top:0 !important; margin-bottom:0 !important; }
body:not(.dark-mode) { background:#eef1f5; }
body:not(.dark-mode) #content { background:#eef1f5; }
body:not(.dark-mode) .channel-card { background:#f8fafc; border-color:#dce2e9; }
body:not(.dark-mode) .channel-table-wrapper { background:#f4f6f8; border-color:#d9e0e8; }
body:not(.dark-mode) .channel-table-wrapper .modern-table { background:#f8fafc; }
body:not(.dark-mode) .channel-table-wrapper tbody tr:nth-child(even) td { background:#f4f6f8; }
body:not(.dark-mode) .channel-table-wrapper tbody tr:hover td { background:#eaf1fb; }
body:not(.dark-mode) .channel-filter-bar { background:#eef1f5; border-color:#d8e0e8; }
body:not(.dark-mode) .channel-search-box, body:not(.dark-mode) .channel-filter-bar select { background:#f8fafc; }
body:not(.dark-mode) .channel-tool-card { background:#f1f4f7; border-color:#dce2e9; }


/* Compact channel action cell */
.channel-table-wrapper .action-buttons { gap:2px; min-width:58px; }
.channel-table-wrapper .status-btn, .channel-table-wrapper .action-icon { width:18px; height:18px; min-width:18px; padding:0; border-radius:4px; }
.channel-table-wrapper .status-btn::before { width:7px; height:7px; }
.channel-table-wrapper .action-icon { font-size:12px; line-height:18px; }


/* Clear active/inactive action state */
.channel-table-wrapper .status-btn { width:20px; height:20px; min-width:20px; border-radius:5px; color:#fff !important; font-size:0; font-weight:800; box-shadow:none !important; transition:transform .15s ease, filter .15s ease; }
.channel-table-wrapper .status-btn::before { width:auto; height:auto; background:transparent !important; box-shadow:none !important; font-size:13px; line-height:20px; }
.channel-table-wrapper .status-btn.active { background:#16a34a !important; }
.channel-table-wrapper .status-btn.active::before { content:'✓'; }
.channel-table-wrapper .status-btn.inactive { background:#dc2626 !important; }
.channel-table-wrapper .status-btn.inactive::before { content:'×'; }
.channel-table-wrapper .status-btn:hover { filter:brightness(.92); transform:scale(1.06); }


/* Reference-style channel status and actions */
.status-badge { display:inline-flex; align-items:center; justify-content:center; min-width:48px; padding:4px 8px; border-radius:999px; font-size:10px; font-weight:700; line-height:1; }
.status-badge.active { color:#087443; background:#d9f8e7; }
.status-badge.inactive { color:#b42318; background:#ffe0df; }
.channel-table-wrapper .action-buttons { gap:3px; }
.channel-table-wrapper .action-icon, .channel-table-wrapper .status-btn { width:20px; height:20px; min-width:20px; border:0 !important; border-radius:4px; padding:0; background:transparent !important; color:#64748b; font-size:13px; line-height:20px; }
.channel-table-wrapper .action-icon.edit { color:#7c3aed; }
.channel-table-wrapper .action-icon.view { color:#16a34a; }
.channel-table-wrapper .status-btn { color:transparent !important; font-size:0 !important; }
.channel-table-wrapper .status-btn::before { content:'⏻'; width:auto; height:auto; background:transparent !important; box-shadow:none !important; font-size:14px; }
.channel-table-wrapper .status-btn.active::before, .channel-table-wrapper .status-btn.inactive::before { content:'⏻'; background:transparent !important; }
.channel-table-wrapper .action-icon.delete { color:#dc2626; }
.channel-table-wrapper .action-icon:hover, .channel-table-wrapper .status-btn:hover { background:#f1f5f9 !important; transform:none; }
#sidebar { background:linear-gradient(180deg,#a832d8 0%,#7b2bc2 55%,#6125a8 100%); border-right:0; }
#sidebar button { color:#f4eaff; }
#sidebar button:hover { background:rgba(255,255,255,.16); border-color:transparent; }
#sidebar button.active { background:rgba(255,255,255,.22); color:#fff; box-shadow:none; }
#sidebar .submenu { border-left:0 !important; }
#interfaceSubMenu { padding-left:10px !important; }
#interfaceSubMenu button { color:#f0dfff !important; padding-left:22px !important; }
#interfaceSubMenu button::before { color:#e6c7ff; }
#interfaceSubMenu button:hover { background:rgba(255,255,255,.12) !important; color:#fff !important; }

.channel-table-wrapper .action-icon.edit { order:1; }
.channel-table-wrapper .action-icon.view { order:2; }
.channel-table-wrapper .status-btn { order:3; }
.channel-table-wrapper .action-icon.delete { order:4; }

.channel-table-wrapper .status-btn::before { content:'⏻'; color:#f59e0b !important; font-size:14px; line-height:20px; background:transparent !important; box-shadow:none !important; }


/* Login-matched red gradient theme */
body:not(.dark-mode) #sidebar { background:linear-gradient(135deg,rgb(199,40,40) 0%,#1f1827 100%); }
body:not(.dark-mode) #sidebar button { color:#fff1f1; }
body:not(.dark-mode) #sidebar button:hover { background:rgba(255,255,255,.14); border-color:transparent; }
body:not(.dark-mode) #sidebar button.active { background:rgba(255,255,255,.22); color:#fff; }
body:not(.dark-mode) #interfaceSubMenu button { color:#ffe3e3 !important; }
body:not(.dark-mode) #interfaceSubMenu button::before { color:#ffc1c1; }
body:not(.dark-mode) #interfaceSubMenu button:hover { background:rgba(255,255,255,.12) !important; color:#fff !important; }

/* Reliable Unicode power icon */
 .channel-table-wrapper .status-btn::before { content:"\23FB" !important; color:#f59e0b !important; display:block; font-family:Arial,sans-serif; font-size:14px; line-height:20px; }

/* Premium red power action */
.channel-table-wrapper .status-btn::before { color:#c62828 !important; text-shadow:0 1px 1px rgba(127,29,29,.18); }
.channel-table-wrapper .status-btn:hover::before { color:#991b1b !important; }

/* Premium red sidebar and visible power icon */
body:not(.dark-mode) #sidebar { background:linear-gradient(155deg,#7f1111 0%,#c62828 46%,#3f0b0b 100%) !important; }
body:not(.dark-mode) #sidebar button.active { background:rgba(255,255,255,.2) !important; }
.channel-table-wrapper .status-btn { color:transparent !important; font-size:0 !important; }
.channel-table-wrapper .power-icon { display:inline-flex; align-items:center; justify-content:center; width:20px; height:20px; color:#c62828; font-family:Arial,sans-serif; font-size:16px; font-weight:700; line-height:1; }
.channel-table-wrapper .status-btn:hover .power-icon { color:#991b1b; }

/* Remove legacy status pseudo icon; use the real power glyph only */
.channel-table-wrapper .status-btn::before { content:none !important; display:none !important; background:none !important; box-shadow:none !important; }
.channel-table-wrapper .status-btn.active::before, .channel-table-wrapper .status-btn.inactive::before { content:none !important; display:none !important; }
.channel-table-wrapper .power-icon { color:#c62828 !important; }

/* Reference action icon palette */
.channel-table-wrapper .action-icon.edit { color:#7c3aed !important; }
.channel-table-wrapper .action-icon.view { color:#f59e0b !important; }
.channel-table-wrapper .action-icon.delete { color:#64748b !important; }
.channel-table-wrapper .status-btn { width:18px; height:18px; min-width:18px; border-radius:3px; background:#16a34a !important; color:#fff !important; display:inline-flex; align-items:center; justify-content:center; }
.channel-table-wrapper .status-btn .power-icon { width:18px; height:18px; color:#fff !important; font-size:13px; line-height:18px; display:inline-flex; align-items:center; justify-content:center; }
.channel-table-wrapper .status-btn.inactive { background:#16a34a !important; }
.channel-table-wrapper .status-btn:hover { background:#15803d !important; }


/* Guaranteed visible power glyph */
.channel-table-wrapper .status-btn { width:18px; height:18px; min-width:18px; padding:0; border:0 !important; border-radius:3px; background:#16a34a !important; display:inline-flex; align-items:center; justify-content:center; }
.channel-table-wrapper .status-btn .power-icon { position:relative; width:12px; height:12px; display:block; font-size:0; color:transparent !important; }
.channel-table-wrapper .status-btn .power-icon::before { content:''; position:absolute; left:1px; top:3px; width:8px; height:8px; border:2px solid #fff; border-top-color:transparent; border-radius:50%; box-sizing:border-box; }
.channel-table-wrapper .status-btn .power-icon::after { content:''; position:absolute; left:5px; top:0; width:2px; height:7px; border-radius:2px; background:#fff; }
.channel-table-wrapper .status-btn:hover { background:#15803d !important; }
.channel-table-wrapper .action-icon.edit { color:#7c3aed !important; }
.channel-table-wrapper .action-icon.view { color:#f59e0b !important; }
.channel-table-wrapper .action-icon.delete { color:#64748b !important; }


/* Transparent red power action */
.channel-table-wrapper .status-btn, .channel-table-wrapper .status-btn.inactive { background:transparent !important; }
.channel-table-wrapper .status-btn:hover { background:rgba(198,40,40,.10) !important; }
.channel-table-wrapper .status-btn .power-icon::before { border-color:#c62828; border-top-color:transparent; }
.channel-table-wrapper .status-btn .power-icon::after { background:#c62828; }

/* Remove green from active status badge */
.channel-table-wrapper .status-badge.active { color:#b42318 !important; background:#ffe0df !important; }

/* Restore semantic status colors */
.channel-table-wrapper .status-badge.active { color:#087443 !important; background:#d9f8e7 !important; }
.channel-table-wrapper .status-badge.inactive { color:#b42318 !important; background:#ffe0df !important; }
/* Power icon remains transparent premium red */
.channel-table-wrapper .status-btn { background:transparent !important; }

/* Remove power button background only */
.channel-table-wrapper .status-btn,
.channel-table-wrapper .status-btn.active,
.channel-table-wrapper .status-btn.inactive { background-color:transparent !important; background-image:none !important; box-shadow:none !important; }
.channel-table-wrapper .status-btn .power-icon { background:transparent !important; }

/* Center the power icon precisely */
.channel-table-wrapper .status-btn { position:relative; display:inline-flex !important; align-items:center !important; justify-content:center !important; vertical-align:middle; }
.channel-table-wrapper .status-btn .power-icon { position:relative; display:block; flex:0 0 12px; width:12px; height:12px; margin:0 auto; }
.channel-table-wrapper .status-btn .power-icon::before { left:1px; top:3px; width:8px; height:8px; border-width:2px; }
.channel-table-wrapper .status-btn .power-icon::after { left:5px; top:0; width:2px; height:7px; }

/* Align power ring and center stem */
.channel-table-wrapper .status-btn .power-icon::before { left:1px !important; top:2px !important; width:10px !important; height:10px !important; border:2px solid #c62828 !important; border-top-color:transparent !important; border-radius:50%; box-sizing:border-box; }
.channel-table-wrapper .status-btn .power-icon::after { left:5px !important; top:0 !important; width:2px !important; height:7px !important; background:#c62828 !important; border-radius:2px; }


/* Rounded sidebar and refined top bar */
body:not(.dark-mode) #sidebar { border-radius:0 18px 18px 0; overflow:hidden; box-shadow:6px 0 22px rgba(63,11,11,.18); }
body:not(.dark-mode) #topbar { height:64px; padding:0 26px; background:rgba(255,255,255,.96); border-bottom:1px solid #eadfe0; box-shadow:0 3px 16px rgba(63,11,11,.08); backdrop-filter:blur(10px); }
body:not(.dark-mode) .topbar-left .page-title { color:#3f1515; font-weight:750; letter-spacing:-.25px; }
body:not(.dark-mode) .language-selector { gap:3px; padding:3px; border:1px solid #eadfe0; border-radius:999px; background:#fff7f7; box-shadow:0 2px 8px rgba(127,29,29,.07); }
body:not(.dark-mode) .lang-btn { min-width:52px; justify-content:center; padding:6px 10px; border:0; border-radius:999px; color:#8b5e5e; font-size:12px; font-weight:700; }
body:not(.dark-mode) .lang-btn.active { background:#c62828 !important; color:#fff !important; box-shadow:0 2px 6px rgba(198,40,40,.25); }
body:not(.dark-mode) .lang-btn:hover:not(.active) { background:#feecec; color:#9f2424; }
body:not(.dark-mode) .theme-switcher button, body:not(.dark-mode) .topbar-help-btn, body:not(.dark-mode) .user-menu-btn { color:#6b3f3f; }
body:not(.dark-mode) .theme-switcher button:hover, body:not(.dark-mode) .topbar-help-btn:hover, body:not(.dark-mode) .user-menu-btn:hover { background:#fff0f0; color:#a61b1b; }


/* Complete dark theme surfaces */
body.dark-mode #topbar { background:#111827 !important; border-bottom-color:#273449 !important; box-shadow:0 3px 16px rgba(0,0,0,.28); }
body.dark-mode .topbar-left .page-title { color:#f8fafc !important; }
body.dark-mode .language-selector { background:#1f2937 !important; border-color:#374151 !important; }
body.dark-mode .lang-btn { color:#cbd5e1 !important; }
body.dark-mode .lang-btn.active { background:#991b1b !important; color:#fff !important; }
body.dark-mode .theme-switcher button, body.dark-mode .topbar-help-btn, body.dark-mode .user-menu-btn { color:#cbd5e1 !important; }
body.dark-mode #sidebar { background:linear-gradient(155deg,#321313 0%,#1f2937 100%) !important; border-color:#374151 !important; }
body.dark-mode #content, body.dark-mode { background:#111827 !important; color:#e5e7eb; }
body.dark-mode .channel-card, body.dark-mode .overview-card { background:#1f2937 !important; border-color:#374151 !important; color:#e5e7eb; }
body.dark-mode .channel-table-wrapper, body.dark-mode .channel-table-wrapper .modern-table { background:#182230 !important; border-color:#374151 !important; }
body.dark-mode .channel-table-wrapper thead th { background:#273449 !important; color:#e5e7eb !important; border-color:#374151 !important; }
body.dark-mode .channel-table-wrapper td { background:#182230 !important; color:#dbe4ee !important; border-color:#334155 !important; }
body.dark-mode .channel-table-wrapper tbody tr:nth-child(even) td { background:#1d2938 !important; }
body.dark-mode .channel-table-wrapper tbody tr:hover td { background:#263449 !important; }
body.dark-mode .channel-filter-bar { background:#1b2635 !important; border-color:#374151 !important; }
body.dark-mode .channel-search-box, body.dark-mode .channel-filter-bar select { background:#111827 !important; border-color:#475569 !important; color:#e5e7eb !important; }
body.dark-mode .channel-search-box input { color:#e5e7eb !important; }
body.dark-mode .channel-tool-card { background:#1b2635 !important; border-color:#374151 !important; }
body.dark-mode .channel-tool-card select, body.dark-mode .channel-tool-card input { background:#111827 !important; color:#e5e7eb !important; border-color:#475569 !important; }


/* Premium STB volume control */
.stb-volume-card { margin:20px 0; padding:18px 20px; border:1px solid #e0d5d6; border-radius:12px; background:#fbf8f8; box-shadow:0 4px 14px rgba(63,11,11,.05); }
.stb-volume-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:16px; }
.stb-volume-label { display:block; color:#3f1515; font-size:14px; font-weight:700; }
.stb-volume-description { display:block; margin-top:4px; color:#8b6f70; font-size:12px; }
.stb-volume-value { min-width:52px; padding:6px 9px; border-radius:7px; background:#feecec; color:#b42318; font-size:13px; font-weight:800; text-align:center; }
.stb-volume-control { display:flex; align-items:center; gap:12px; }
.stb-volume-icon { color:#a36d6d; font-size:18px; line-height:1; }
.stb-volume-icon.high { color:#c62828; }
.stb-volume-range { --volume-value:50%; flex:1; width:100%; height:6px; margin:0; appearance:none; -webkit-appearance:none; border-radius:99px; outline:none; cursor:pointer; background:linear-gradient(90deg,#c62828 0 var(--volume-value),#eadbdb var(--volume-value) 100%); }
.stb-volume-range::-webkit-slider-thumb { appearance:none; -webkit-appearance:none; width:16px; height:16px; border:3px solid #fff; border-radius:50%; background:#c62828; box-shadow:0 2px 7px rgba(127,29,29,.28); }
.stb-volume-range::-moz-range-thumb { width:12px; height:12px; border:3px solid #fff; border-radius:50%; background:#c62828; box-shadow:0 2px 7px rgba(127,29,29,.28); }
body.dark-mode .stb-volume-card { background:#1f2937; border-color:#374151; }
body.dark-mode .stb-volume-label { color:#f8fafc; }
body.dark-mode .stb-volume-description { color:#94a3b8; }
body.dark-mode .stb-volume-value { background:#451a1a; color:#fecaca; }
body.dark-mode .stb-volume-range { background:linear-gradient(90deg,#ef4444 0 var(--volume-value),#374151 var(--volume-value) 100%); }
@media (max-width:600px) { .stb-volume-card { padding:15px; } .stb-volume-heading { align-items:flex-start; } }


/* Full-page settings layout: no nested scroll */
#main-wrapper { margin-left:248px !important; padding:28px 32px 48px !important; min-height:calc(100vh - 64px); height:auto !important; overflow:visible !important; overflow-x:visible !important; box-sizing:border-box; }
#content { width:100% !important; max-width:none !important; min-height:0 !important; margin:0 !important; padding:0 !important; }
.settings-panel { width:100% !important; max-width:none !important; max-height:none !important; height:auto !important; min-height:calc(100vh - 150px); margin:0 0 24px !important; padding:26px !important; box-sizing:border-box; overflow:visible !important; overflow-x:visible !important; }
#overview-view, #statistics-view, #devices-view, #system-status-view, #license-view, #adb-management-view, #menu-settings-view, #theme-highlights-view, #cafe-menu-view, #stb-settings-view, #message-settings-view, #wifi-settings-view, #logo-settings-view, #vod-settings-view, #apk-settings-view { width:100%; max-width:none; box-sizing:border-box; }
#guide-container { max-height:none !important; overflow:visible !important; overflow-x:visible !important; width:100% !important; }
body.dark-mode .settings-panel { background:#1f2937 !important; border-color:#374151; }
@media (max-width:768px) { #main-wrapper { margin-left:0 !important; padding:20px 16px 36px !important; } .settings-panel { min-height:0; padding:20px !important; } }


/* Minimal professional top bar */
#topbar { height:60px; padding:0 22px; }
.topbar-left { display:flex; align-items:center; min-width:0; }
.topbar-left .page-title { max-width:55vw; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:17px; font-weight:700; }
.topbar-left .page-title::before { content:''; display:inline-block; width:7px; height:7px; margin:0 9px 2px 0; border-radius:50%; background:#c62828; box-shadow:0 0 0 4px rgba(198,40,40,.10); vertical-align:middle; }
.topbar-right { gap:6px; }
.language-selector { padding:2px; }
.lang-btn { min-width:46px !important; height:30px; padding:5px 8px !important; gap:5px; font-size:11px !important; }
.lang-btn img { width:16px; height:11px; object-fit:cover; }
.theme-switcher button, .topbar-help-btn, .user-menu-btn { height:32px; }
.theme-switcher button { width:32px; padding:0; font-size:16px; }
.topbar-help-btn { width:32px; min-width:32px; padding:0 !important; overflow:hidden; font-size:0 !important; }
.topbar-help-btn::before { content:'ⓘ'; font-size:16px; line-height:32px; }
.user-menu { margin-left:5px; padding-left:8px; border-left:1px solid #eadfe0; }
.user-menu-btn { gap:6px; padding:6px 9px !important; font-size:12px !important; }
.user-admin-icon { font-size:14px; }
@media (max-width:650px) { .topbar-left .page-title { font-size:14px; max-width:38vw; } .user-name { display:none; } .user-menu { margin-left:2px; padding-left:4px; } }
body.dark-mode .topbar-left .page-title::before { background:#ef4444; box-shadow:0 0 0 4px rgba(239,68,68,.14); }
body.dark-mode .user-menu { border-left-color:#374151; }


/* Neutral gray corporate top bar */
body:not(.dark-mode) #topbar { background:#e7ebef !important; border-bottom:1px solid #d5dbe1; box-shadow:0 2px 12px rgba(30,41,59,.08); }
body:not(.dark-mode) .topbar-left .page-title { color:#26323d; }
body:not(.dark-mode) .topbar-right > * { color:#52606d; }
body:not(.dark-mode) .language-selector { background:#f4f6f8; border-color:#cfd6dd; box-shadow:0 1px 4px rgba(30,41,59,.08); }
body:not(.dark-mode) .lang-btn { color:#687582 !important; }
body:not(.dark-mode) .lang-btn.active { background:#b42318 !important; color:#fff !important; box-shadow:0 2px 5px rgba(127,29,29,.2); }
body:not(.dark-mode) .lang-btn:hover:not(.active) { background:#dfe4e8; color:#26323d !important; }
body:not(.dark-mode) .theme-switcher button, body:not(.dark-mode) .topbar-help-btn, body:not(.dark-mode) .user-menu-btn { background:#f4f6f8 !important; border:1px solid #d0d7de !important; color:#52606d !important; box-shadow:0 1px 3px rgba(30,41,59,.06); }
body:not(.dark-mode) .theme-switcher button:hover, body:not(.dark-mode) .topbar-help-btn:hover, body:not(.dark-mode) .user-menu-btn:hover { background:#fff !important; color:#9f2424 !important; border-color:#c5a5a5 !important; }
body:not(.dark-mode) .user-menu { border-left-color:#cbd3da; }
body:not(.dark-mode) .user-admin-icon { color:#475569; }
body:not(.dark-mode) .topbar-help-btn::before { color:#64748b; font-family:Arial,sans-serif; }
body.dark-mode #topbar { background:#202833 !important; }

/* Admin notification center */
.notification-center { position: relative; display: flex; align-items: center; }
.notification-bell { position: relative; width: 34px; height: 32px; border: 1px solid #d0d7de; border-radius: 8px; background: #f4f6f8; color: #52606d; cursor: pointer; font-size: 15px; display: inline-flex; align-items: center; justify-content: center; transition: .18s ease; }
.notification-bell:hover { background: #fff; color: #b42318; }
.notification-badge { position: absolute; top: -5px; right: -5px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: #b42318; color: #fff; font-size: 10px; font-weight: 800; line-height: 16px; text-align: center; box-sizing: border-box; }
.notification-panel { position: absolute; top: 42px; right: 0; z-index: 1100; display: none; width: min(380px, calc(100vw - 28px)); max-height: 440px; overflow: hidden; border: 1px solid #d8dee5; border-radius: 12px; background: #fff; box-shadow: 0 16px 40px rgba(15,23,42,.18); }
.notification-panel.show { display: block; }
.notification-panel-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid #edf0f3; color: #26323d; font-size: 13px; }
.notification-panel-head button { width: 26px; height: 26px; border: 0; border-radius: 6px; background: #f1f4f7; color: #64748b; cursor: pointer; }
.notification-list { max-height: 380px; overflow-y: auto; }
.notification-item { display: flex; gap: 9px; align-items: flex-start; padding: 12px 13px; border-bottom: 1px solid #eef1f4; }
.notification-item:last-child { border-bottom: 0; }
.notification-item-icon { width: 28px; height: 28px; flex: 0 0 28px; display: flex; align-items: center; justify-content: center; border-radius: 8px; background: #fff1f1; color: #b42318; }
.notification-item-body { min-width: 0; flex: 1; }
.notification-item-body strong { display: block; color: #26323d; font-size: 12px; }
.notification-item-body p { margin: 3px 0; color: #64748b; font-size: 11px; line-height: 1.35; }
.notification-item-body small { color: #94a3b8; font-size: 10px; }
.notification-read { width: 24px; height: 24px; border: 0; border-radius: 5px; background: #f1f5f9; color: #16a34a; cursor: pointer; }
.notification-empty { padding: 28px 14px; color: #94a3b8; font-size: 12px; text-align: center; }
.admin-order-toast { position: fixed; top: 78px; right: 24px; z-index: 1300; width: min(360px, calc(100vw - 32px)); display: flex; gap: 10px; align-items: flex-start; padding: 13px 14px; border: 1px solid #fecaca; border-left: 4px solid #b42318; border-radius: 10px; background: #fff; box-shadow: 0 14px 35px rgba(15,23,42,.18); animation: adminToastIn .22s ease-out; }
.admin-order-toast .toast-icon { color: #b42318; font-size: 19px; }
.admin-order-toast strong { color: #3f1515; font-size: 12px; }
.admin-order-toast p { margin: 3px 0 0; color: #64748b; font-size: 11px; line-height: 1.35; }
.admin-order-toast > button { margin-left: auto; border: 0; background: transparent; color: #94a3b8; font-size: 18px; cursor: pointer; }
@keyframes adminToastIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

/* Cafe administration layout */
#cafe-menu-view > h2 { margin: 0 0 18px; color: #26323d; font-size: 22px; font-weight: 750; }
#cafe-menu-view > .channel-card { margin-bottom: 18px; padding: 20px; border: 1px solid #e1e6eb; border-radius: 14px; background: #f8fafb; box-shadow: 0 5px 18px rgba(15,23,42,.045); }
#cafe-menu-view > .channel-card h3 { margin: 0 0 15px; color: #26323d; font-size: 14px; font-weight: 750; }
#cafe-menu-view #menuUploadForm, #cafe-menu-view #menuCatalogForm { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 12px; align-items: end; }
#cafe-menu-view #menuUploadForm > *, #cafe-menu-view #menuCatalogForm > * { grid-column: span 3; }
#cafe-menu-view #menuUploadForm button, #cafe-menu-view #menuCatalogForm button { min-height: 38px; }
#cafe-menu-view #menuOrdersContainer details { border: 1px solid #e1e6eb; border-radius: 10px; background: #fff; }
#cafe-menu-view #menuOrdersContainer details + details { margin-top: 9px; }
#cafe-menu-view #menuOrdersContainer summary { padding: 12px 14px; cursor: pointer; }
#cafe-menu-view .menu-item-card { border-color: #e1e6eb !important; border-radius: 10px !important; box-shadow: none !important; }
body.dark-mode .notification-bell { background: #1f2937; border-color: #475569; color: #cbd5e1; }
body.dark-mode .notification-panel { background: #1f2937; border-color: #374151; }
body.dark-mode .notification-panel-head { color: #f8fafc; border-color: #374151; }
body.dark-mode .notification-item { border-color: #374151; }
body.dark-mode .notification-item-body strong { color: #f1f5f9; }
body.dark-mode .notification-item-body p { color: #cbd5e1; }
body.dark-mode .notification-item-icon { background: #451a1a; }
body.dark-mode .admin-order-toast { background: #1f2937; border-color: #7f1d1d; }
body.dark-mode .admin-order-toast strong { color: #fee2e2; }
body.dark-mode #cafe-menu-view > h2, body.dark-mode #cafe-menu-view > .channel-card h3 { color: #f1f5f9; }
body.dark-mode #cafe-menu-view > .channel-card { border-color: #374151; background: #18212b; }
body.dark-mode #cafe-menu-view #menuOrdersContainer details { border-color: #374151; background: #1f2937; }
/* Cafe file and price controls */
.cafe-file-picker { position: relative; width: 100%; }
.cafe-file-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.cafe-file-button { min-height: 46px; display: flex; align-items: center; gap: 9px; padding: 8px 12px; border: 1px dashed #c9d2dc; border-radius: 9px; background: #fff; color: #52606d; cursor: pointer; transition: .18s ease; box-sizing: border-box; }
.cafe-file-button:hover { border-color: #b42318; background: #fff8f8; color: #8f1d18; }
.cafe-file-icon { width: 27px; height: 27px; display: inline-flex; align-items: center; justify-content: center; border-radius: 7px; background: #f1f4f7; color: #64748b; font-size: 15px; }
.cafe-file-button span[id$="Name"] { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 650; }
.cafe-file-button span[id$="Name"]:not(.has-file) { color: #94a3b8; font-weight: 500; }
.cafe-file-button small { margin-left: auto; color: #94a3b8; font-size: 10px; white-space: nowrap; }
.cafe-price-field { position: relative; display: flex; align-items: center; }
.cafe-price-symbol { position: absolute; left: 12px; z-index: 1; color: #8f1d18; font-size: 13px; font-weight: 800; pointer-events: none; }
.cafe-price-input { padding-left: 31px !important; font-variant-numeric: tabular-nums; font-weight: 650; color: #26323d; }
.cafe-price-input::placeholder { color: #a8b1bb; font-weight: 500; }
.cafe-price-input::-webkit-inner-spin-button, .cafe-price-input::-webkit-outer-spin-button { opacity: .55; }
body.dark-mode .cafe-file-button { border-color: #475569; background: #1f2937; color: #e2e8f0; }
body.dark-mode .cafe-file-button:hover { border-color: #ef4444; background: #2a1d22; }
body.dark-mode .cafe-file-icon { background: #334155; color: #cbd5e1; }
body.dark-mode .cafe-price-input { color: #f1f5f9; background: #1f2937; }
/* Cafe modal forms */
.cafe-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cafe-section-head h3 { margin: 0 !important; }
.cafe-section-toggle { width: 32px; height: 32px; flex: 0 0 32px; border: 0; border-radius: 8px; background: #eef2f5; color: #64748b; cursor: pointer; font-size: 14px; transition: .18s ease; }
.cafe-section-toggle:hover { background: #b42318; color: #fff; }
.cafe-section-body { display: none; }
.cafe-collapsible-card.is-open .cafe-section-body { display: block; position: fixed; top: 50%; left: 50%; z-index: 1205; width: min(720px, calc(100vw - 36px)); max-height: min(760px, calc(100vh - 52px)); overflow-y: auto; padding: 24px; border: 1px solid #e0e5ea; border-radius: 16px; background: #fff; box-shadow: 0 24px 70px rgba(15,23,42,.28); transform: translate(-50%, -50%); box-sizing: border-box; }
body.cafe-modal-open { overflow: hidden; }
body.cafe-modal-open::before { content: ''; position: fixed; inset: 0; z-index: 1200; background: rgba(15,23,42,.48); backdrop-filter: blur(2px); }
.cafe-modal-close { position: absolute; top: 12px; right: 14px; width: 30px; height: 30px; border: 0; border-radius: 8px; background: #f1f4f7; color: #64748b; cursor: pointer; font-size: 22px; line-height: 28px; }
.cafe-modal-close:hover { background: #b42318; color: #fff; }
.cafe-live-orders-card { border-color: #cddfe0 !important; box-shadow: 0 8px 24px rgba(15,118,110,.08) !important; }
.cafe-live-orders-card .cafe-section-head { padding-bottom: 12px; margin-bottom: 14px; border-bottom: 1px solid #e5eeee; }
.cafe-live-indicator { display: inline-flex; align-items: center; gap: 6px; color: #087f5b; font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.cafe-live-indicator i { width: 7px; height: 7px; border-radius: 50%; background: #16a34a; box-shadow: 0 0 0 4px rgba(22,163,74,.12); }
body.dark-mode.cafe-modal-open::before { background: rgba(2,6,23,.68); }
body.dark-mode .cafe-collapsible-card.is-open .cafe-section-body { border-color: #475569; background: #1f2937; }
body.dark-mode .cafe-section-toggle, body.dark-mode .cafe-modal-close { background: #334155; color: #cbd5e1; }
body.dark-mode .cafe-live-orders-card { border-color: #285a5b !important; }
.cafe-add-product-button { width: auto; min-width: 126px; padding: 0 13px; background: #b42318; color: #fff; font-size: 11px; font-weight: 750; letter-spacing: .01em; }
.cafe-add-product-button:hover { background: #8f1d18; color: #fff; transform: translateY(-1px); }
.cafe-catalog-card { cursor: default; }
/* Cafe clean modal controls */
.cafe-collapsible-card.is-open > .cafe-section-head { visibility: hidden; }
.cafe-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: -24px -24px 20px; padding: 17px 22px; border-bottom: 1px solid #edf0f3; color: #26323d; background: #fff; }
.cafe-modal-head strong { font-size: 17px; font-weight: 750; }
.cafe-modal-head .cafe-modal-close { position: static; flex: 0 0 30px; }
#cafe-menu-view .cafe-section-body .form-input { min-height: 42px; box-sizing: border-box; border: 1px solid #d5dce3; border-radius: 9px; background: #fbfcfd; color: #26323d; padding: 10px 12px; outline: none; transition: border-color .18s ease, box-shadow .18s ease, background .18s ease; }
#cafe-menu-view .cafe-section-body .form-input:focus { border-color: #b42318; background: #fff; box-shadow: 0 0 0 3px rgba(180,35,24,.10); }
#cafeCatalogSection .cafe-section-body #menuCatalogForm { display: block; }
#cafeCatalogSection .cafe-section-body #menuCatalogForm > .form-group { margin-bottom: 14px; }
#cafeCatalogSection .cafe-section-body #menuCatalogForm > div[style*="display:grid"] { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 14px !important; }
#cafeCatalogSection .cafe-section-body #menuCatalogForm > div[style*="display:flex"] { margin-top: 18px; padding-top: 16px; border-top: 1px solid #edf0f3; }
#cafeCatalogSection .cafe-section-body textarea.form-input { min-height: 82px; resize: vertical; }
#cafeCatalogSection .cafe-section-body .cafe-file-button { min-height: 42px; }
@media (max-width: 620px) {
  .cafe-collapsible-card.is-open .cafe-section-body { width: calc(100vw - 22px); max-height: calc(100vh - 24px); padding: 18px; }
  .cafe-modal-head { margin: -18px -18px 16px; padding: 14px 16px; }
  #cafeCatalogSection .cafe-section-body #menuCatalogForm > div[style*="display:grid"] { grid-template-columns: 1fr !important; }
}
body.dark-mode .cafe-modal-head { background: #1f2937; border-color: #374151; color: #f8fafc; }
body.dark-mode #cafe-menu-view .cafe-section-body .form-input { border-color: #475569; background: #111827; color: #f1f5f9; }
body.dark-mode #cafe-menu-view .cafe-section-body .form-input:focus { border-color: #ef4444; background: #1f2937; }
/* Flatten cafe modals: keep only one visible surface */
.cafe-collapsible-card.is-open { padding: 0 !important; border: 0 !important; background: transparent !important; box-shadow: none !important; }
.cafe-collapsible-card.is-open > .cafe-section-head { display: none; }
.cafe-collapsible-card.is-open > .cafe-section-body { padding: 24px; }
#cafeUploadSection.is-open #menuUploadForm,
#cafeBulkSection.is-open #menuCatalogImportForm { display: block; }
#cafeUploadSection.is-open #menuUploadForm .form-group,
#cafeBulkSection.is-open #menuCatalogImportForm .form-group { margin-bottom: 14px; }
#cafeUploadSection.is-open #menuUploadForm > button,
#cafeBulkSection.is-open #menuCatalogImportForm > div[style*="display:flex"] { margin-top: 18px; }
/* Disabled STB visibility */
.device-disabled { filter: grayscale(1); opacity: 0.62; background: #e8e8e8 !important; }
.device-disabled td { background: #e8e8e8 !important; color: #555 !important; }
.device-disabled .device-power-icon { color: #b00020 !important; }


/* Centered server clock in the WebUI top bar */
.web-ui-clock { position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); display:flex; flex-direction:column; align-items:center; justify-content:center; min-width:150px; line-height:1.15; pointer-events:none; color:#26323d; }
.web-ui-clock-time { font-size:18px; font-weight:750; letter-spacing:.04em; font-variant-numeric:tabular-nums; }
.web-ui-clock-date { margin-top:3px; font-size:11px; font-weight:600; color:#64748b; white-space:nowrap; }
body.dark-mode .web-ui-clock { color:#f8fafc; }
body.dark-mode .web-ui-clock-date { color:#cbd5e1; }
@media (max-width:720px) { .web-ui-clock { min-width:110px; } .web-ui-clock-time { font-size:14px; } .web-ui-clock-date { font-size:9px; } }
@media (max-width:480px) { .web-ui-clock-date { display:none; } .web-ui-clock { min-width:80px; } }

/* Room service page: same card look as the cafe page */
#room-service-view { width:100%; max-width:none; box-sizing:border-box; }
#room-service-view > h2 { margin: 0 0 18px; color: #26323d; font-size: 22px; font-weight: 750; }
#room-service-view > .channel-card { margin-bottom: 18px; padding: 20px; border: 1px solid #e1e6eb; border-radius: 14px; background: #f8fafb; box-shadow: 0 5px 18px rgba(15,23,42,.045); }
#room-service-view > .channel-card h3 { margin: 0 0 15px; color: #26323d; font-size: 14px; font-weight: 750; }
#room-service-view .form-input { min-height: 40px; box-sizing: border-box; border: 1px solid #d5dce3; border-radius: 9px; background: #fbfcfd; color: #26323d; padding: 8px 12px; }
body.dark-mode #room-service-view > h2, body.dark-mode #room-service-view > .channel-card h3 { color: #f1f5f9; }
body.dark-mode #room-service-view > .channel-card { border-color: #374151; background: #18212b; }
body.dark-mode #room-service-view .form-input { border-color: #475569; background: #111827; color: #f1f5f9; }
/* ---- device platform tabs (Android: settings / APK / ADB, TV: settings / packages) ---- */
.platform-tabs { padding: 16px 24px 0; box-sizing: border-box; }
.platform-tabs-title { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted, #6c757d); margin-bottom: 8px; }
.platform-tabs-row { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--border, #e2e8f0); }
.platform-tab { background: none; border: none; border-bottom: 3px solid transparent; padding: 10px 16px; margin-bottom: -1px; font-size: 14px; font-weight: 500; color: var(--muted, #6c757d); cursor: pointer; }
.platform-tab:hover { color: var(--primary, #2563eb); }
.platform-tab.active { color: var(--primary, #2563eb); border-bottom-color: var(--primary, #2563eb); font-weight: 600; }
.tv-pkg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; margin-top: 16px; }
.tv-pkg-info { margin: 8px 0 12px; }
.tv-pkg-row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--border, #e2e8f0); font-size: 13px; }
.tv-pkg-row span { color: var(--muted, #6c757d); }
.tv-pkg-row b { font-weight: 500; text-align: right; word-break: break-all; }
.tv-pkg-upload { display: inline-block; padding: 9px 16px; border-radius: 6px; background: var(--primary, #2563eb); color: #fff; font-size: 14px; cursor: pointer; }
.tv-pkg-upload input { display: none; }
@media (max-width: 768px) { .platform-tabs { padding: 12px 16px 0; } .platform-tab { padding: 8px 10px; font-size: 13px; } }.tv-pkg-card { display: flex; flex-direction: column; }
.tv-pkg-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.tv-pkg-head h3 { margin: 0; }
.tv-pkg-badge { font-size: 11px; font-weight: 700; letter-spacing: .05em; padding: 4px 8px; border-radius: 4px; color: #fff; }
.tv-pkg-badge.android { background: #3ddc84; color: #0b3d1f; }
.tv-pkg-badge.lg { background: #a50034; }
.tv-pkg-badge.samsung { background: #1428a0; }
.tv-pkg-help { font-size: 13px; flex: 1; }
.tv-pkg-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.tv-pkg-link { font-size: 13px; }
/* ---- upload dock (admin.js): progress of every file upload, stays while switching pages ---- */
#uploadDock { position: fixed; right: 16px; bottom: 16px; z-index: 20000; width: 320px; max-width: calc(100vw - 32px); box-sizing: border-box; padding: 12px 14px; background: #fff; color: #1e293b; border: 1px solid var(--border, #e2e8f0); border-radius: 10px; box-shadow: 0 10px 30px rgba(15, 23, 42, .18); font-size: 13px; }
#uploadDock.flash { animation: uploadDockFlash .9s ease 2; }
@keyframes uploadDockFlash { 50% { box-shadow: 0 0 0 4px rgba(37, 99, 235, .35), 0 10px 30px rgba(15, 23, 42, .18); } }
.upload-dock-title { font-weight: 600; margin-bottom: 8px; }
.upload-dock-item { margin-bottom: 10px; }
.upload-dock-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 4px; }
.upload-dock-bar { height: 6px; border-radius: 3px; background: #e2e8f0; overflow: hidden; }
.upload-dock-bar span { display: block; height: 100%; background: var(--primary, #2563eb); transition: width .3s ease; }
.upload-dock-item.done .upload-dock-bar span { background: #16a34a; }
.upload-dock-item.error .upload-dock-bar span { background: #dc2626; }
.upload-dock-meta { margin-top: 3px; font-size: 12px; color: #64748b; }
.upload-dock-item.error .upload-dock-meta { color: #dc2626; }
.upload-dock-warn { margin-top: 4px; padding: 8px 10px; border-radius: 6px; background: #fff7ed; color: #9a3412; font-size: 12px; line-height: 1.4; }
@media (prefers-color-scheme: dark) { #uploadDock { background: #1e293b; color: #e2e8f0; border-color: #334155; } .upload-dock-bar { background: #334155; } .upload-dock-warn { background: #431407; color: #fdba74; } }
/* VOD list: a deactivated film stays listed but dimmed (not shown on the TVs) */
#vodList tr.vod-row-inactive td:not(:nth-last-child(-n+3)) { opacity: .45; }
