:root {
  --bg-dark: #060911;
  --bg-card: rgba(13, 20, 36, 0.72);
  --bg-card-hover: rgba(22, 33, 58, 0.9);
  --bg-glass: rgba(10, 16, 30, 0.65);
  --border: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(0, 242, 254, 0.35);
  
  --primary: #00f2fe;
  --primary-glow: rgba(0, 242, 254, 0.4);
  --primary-grad: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
  
  --purple: #a855f7;
  --purple-grad: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
  
  --green: #10b981;
  --amber: #f59e0b;
  --red: #ef4444;
  
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --font: 'Outfit', sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --radius: 14px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-dark);
  background-image: 
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(0, 242, 254, 0.12), transparent),
    radial-gradient(ellipse 60% 40% at 85% 80%, rgba(168, 85, 247, 0.08), transparent);
  color: var(--text);
  font-family: var(--font);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.3); }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.16); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* Vercel Cloud Banner */
.vercel-cloud-bar {
  background: linear-gradient(90deg, rgba(0, 242, 254, 0.15) 0%, rgba(168, 85, 247, 0.15) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 6px 3%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 8px;
}

.cloud-url-link {
  color: var(--primary);
  font-weight: 700;
  font-family: var(--mono);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.4);
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0, 242, 254, 0.3);
}
.cloud-url-link:hover {
  border-color: var(--primary);
  box-shadow: 0 0 10px var(--primary-glow);
}

/* Header */
header {
  background: rgba(8, 13, 24, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 1rem 3%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.2rem;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--primary-grad);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #040812;
  box-shadow: 0 0 20px var(--primary-glow);
}

.brand-meta h1 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge-cloud {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid #10b981;
  color: #34d399;
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 700;
}

.brand-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.actions-cluster {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary-grad);
  color: #050b14;
  box-shadow: 0 4px 14px rgba(0, 242, 254, 0.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 242, 254, 0.45);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border);
  color: #f1f5f9;
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-purple {
  background: rgba(168, 85, 247, 0.15);
  border-color: rgba(168, 85, 247, 0.3);
  color: #c084fc;
}
.btn-purple:hover {
  background: rgba(168, 85, 247, 0.25);
  border-color: var(--purple);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: #f87171;
}
.btn-danger:hover {
  background: rgba(239, 68, 68, 0.25);
}

.btn-save {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border: 1px solid rgba(52, 211, 153, 0.6);
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}
.btn-save:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.55);
}

.save-pulse {
  animation: pulseSave 2s infinite;
}
@keyframes pulseSave {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.btn-sm {
  padding: 5px 10px;
  font-size: 0.78rem;
}

/* Container */
.container {
  max-width: 1650px;
  width: 95%;
  margin: 1.5rem auto;
  flex: 1;
}

/* Hero Stats Row */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.1rem;
  margin-bottom: 1.5rem;
}

.stat-box {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: transform 0.2s, border-color 0.2s;
}
.stat-box:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.18);
}

.stat-meta h4 {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 5px;
}
.stat-meta .stat-val {
  font-size: 1.85rem;
  font-weight: 800;
  font-family: var(--mono);
  color: #fff;
}
.stat-badge-sub {
  font-size: 0.75rem;
  margin-top: 4px;
}
.stat-icon {
  font-size: 2.2rem;
  opacity: 0.85;
}

/* Category Filter Bar */
.category-strip {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 12px;
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.cat-carousel {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: thin;
  padding: 4px 0;
  flex: 1;
}

.cat-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 7px 15px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: all 0.2s;
}
.cat-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.cat-chip.active {
  background: var(--primary-grad);
  border-color: transparent;
  color: #050b14;
  font-weight: 800;
  box-shadow: 0 2px 14px rgba(0, 242, 254, 0.35);
}

.cat-num {
  background: rgba(0, 0, 0, 0.35);
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-family: var(--mono);
}
.cat-chip.active .cat-num {
  background: rgba(0, 0, 0, 0.2);
  color: #040812;
}

/* Filter Controls Toolbar */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.2rem;
  flex-wrap: wrap;
}

.search-field {
  flex: 1;
  min-width: 280px;
  position: relative;
}
.search-field input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 14px 11px 42px;
  color: #fff;
  font-size: 0.9rem;
  outline: none;
  font-family: var(--font);
  transition: all 0.2s;
}
.search-field input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.2);
}
.search-field .icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
}

.toolbar-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.select-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: #fff;
  padding: 10px 14px;
  font-size: 0.85rem;
  font-family: var(--font);
  outline: none;
  cursor: pointer;
}

.view-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 9px 13px;
  border-radius: 8px;
  cursor: pointer;
}
.view-btn.active {
  background: rgba(0, 242, 254, 0.15);
  border-color: var(--primary);
  color: var(--primary);
}

/* Bulk Bar */
.bulk-tray {
  display: none;
  align-items: center;
  justify-content: space-between;
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.35);
  border-radius: 10px;
  padding: 10px 18px;
  margin-bottom: 1.2rem;
  animation: traySlide 0.2s ease-out;
}
.bulk-tray.active {
  display: flex;
}
@keyframes traySlide {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Channel Cards Grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 1.2rem;
}

.channel-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}
.channel-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-3px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
}

.card-header-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.check-input {
  margin-top: 4px;
  cursor: pointer;
  accent-color: var(--primary);
  width: 17px;
  height: 17px;
}

.channel-icon-wrap {
  width: 54px;
  height: 54px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.channel-icon-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}

.channel-info {
  flex: 1;
  min-width: 0;
}

.channel-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 5px;
}

.tag-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.tag {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: uppercase;
}
.tag-category { background: rgba(255, 255, 255, 0.08); color: #cbd5e1; }
.tag-dash { background: rgba(56, 189, 248, 0.15); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.3); }
.tag-hls { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.tag-ts { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.tag-drm { background: rgba(168, 85, 247, 0.2); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.4); }

.tag-status-online { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.tag-status-offline { background: rgba(239, 68, 68, 0.2); color: #f87171; }

.url-strip {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 7px 10px;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  overflow: hidden;
}
.url-strip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-btn-cluster {
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 10px;
}

/* Table Mode */
.table-wrap {
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
}
.channel-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.channel-table th {
  background: rgba(0, 0, 0, 0.4);
  padding: 12px 16px;
  text-align: left;
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}
.channel-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.channel-table tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

/* Pagination */
.pagination-cluster {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 1rem;
}

/* Floating Cinema Player Drawer */
.player-drawer {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 520px;
  background: #090e1a;
  border: 1px solid rgba(0, 242, 254, 0.4);
  border-radius: 16px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85), 0 0 30px rgba(0, 242, 254, 0.2);
  z-index: 150;
  overflow: hidden;
  animation: drawerUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.player-drawer.active {
  display: block;
}
.player-drawer.cinema-mode {
  inset: 0;
  width: 100vw;
  height: 100vh;
  border-radius: 0;
  bottom: 0;
  right: 0;
  z-index: 300;
}

@keyframes drawerUp {
  from { opacity: 0; transform: translateY(40px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.player-header {
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.6);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.player-title-text {
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 320px;
}

.video-stage {
  width: 100%;
  height: 290px;
  background: #000;
  position: relative;
}
.player-drawer.cinema-mode .video-stage {
  height: calc(100vh - 100px);
}
.video-stage video {
  width: 100%;
  height: 100%;
}

.player-footer {
  padding: 10px 14px;
  background: rgba(10, 16, 30, 0.95);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  flex-wrap: wrap;
  gap: 8px;
}

/* Modals */
.modal-layer {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  z-index: 250;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.modal-layer.active {
  display: flex;
}

.modal-box {
  background: #0a1122;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  max-width: 660px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85);
  animation: modalPop 0.22s ease-out;
}
@keyframes modalPop {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.modal-head {
  padding: 1.2rem 1.6rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-head h3 {
  font-size: 1.25rem;
  color: #fff;
  font-weight: 700;
}
.modal-close-x {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
}
.modal-close-x:hover { color: #fff; }

.modal-content {
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.input-group label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.input-control {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #fff;
  padding: 10px 14px;
  font-family: var(--font);
  font-size: 0.9rem;
  outline: none;
}
.input-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 14px rgba(0, 242, 254, 0.25);
}

.modal-actions {
  padding: 1rem 1.6rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Toast */
.toast-msg {
  position: fixed;
  bottom: 24px;
  left: 24px;
  background: #0d1527;
  border: 1px solid var(--primary);
  color: #fff;
  padding: 12px 20px;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  font-size: 0.9rem;
  font-weight: 600;
  z-index: 999;
  animation: toastSlide 0.2s ease-out;
}
@keyframes toastSlide {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ================= MULTI-PORTAL STYLES (HOME / USER / ADMIN) ================= */

.main-nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.4);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.nav-link-btn {
  padding: 8px 16px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.nav-link-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}
.nav-link-btn.active {
  background: var(--primary-grad);
  color: #04101e;
  font-weight: 700;
  box-shadow: 0 2px 10px var(--primary-glow);
}

/* Home Landing Page */
.home-hero {
  padding: 3.5rem 1rem 2.5rem;
  text-align: center;
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}
.home-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(0, 242, 254, 0.12);
  border: 1px solid rgba(0, 242, 254, 0.3);
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  letter-spacing: 0.5px;
}
.home-hero h2 {
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1.15;
  background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 50%, #00f2fe 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1rem;
}
.home-hero p {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 680px;
  margin: 0 auto 2rem;
}

.home-actions-row {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.home-portal-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin: 2.5rem 0 3.5rem;
}

.portal-feature-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.8rem;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.portal-feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 242, 254, 0.35);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}
.portal-feature-card .card-icon {
  font-size: 2.2rem;
  margin-bottom: 1rem;
}
.portal-feature-card h3 {
  font-size: 1.25rem;
  color: #fff;
  margin-bottom: 0.5rem;
}
.portal-feature-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 1.2rem;
  flex: 1;
}

/* Authentication Box */
.auth-container {
  max-width: 440px;
  margin: 3rem auto;
  padding: 0 1rem;
}
.auth-box {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  padding: 2.2rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}
.auth-box-header {
  text-align: center;
  margin-bottom: 1.8rem;
}
.auth-box-header .auth-avatar {
  width: 58px;
  height: 58px;
  background: var(--primary-grad);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin: 0 auto 12px;
  box-shadow: 0 0 20px var(--primary-glow);
}
.auth-box-header h2 {
  font-size: 1.5rem;
  color: #fff;
  font-weight: 700;
}
.auth-box-header p {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 4px;
}

/* Subscriber Portal Cards */
.sub-banner-card {
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.1) 0%, rgba(168, 85, 247, 0.1) 100%);
  border: 1px solid rgba(0, 242, 254, 0.25);
  border-radius: var(--radius);
  padding: 1.8rem;
  margin-bottom: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.sub-credential-item {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

/* Stream URL Builder */
.url-builder-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.url-input-container {
  display: flex;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.45);
  overflow: hidden;
  transition: all 0.2s;
}
.url-input-container:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 14px rgba(0, 242, 254, 0.25);
}
.url-protocol-toggle {
  background: rgba(0, 242, 254, 0.12);
  border: none;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--primary);
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0 14px;
  cursor: pointer;
  outline: none;
}
.url-input-container textarea {
  flex: 1;
  background: transparent;
  border: none;
  color: #fff;
  padding: 10px 12px;
  font-family: var(--mono);
  font-size: 0.85rem;
  outline: none;
  resize: vertical;
}

.url-preview-pill {
  background: rgba(0, 0, 0, 0.55);
  border: 1px dashed rgba(0, 242, 254, 0.4);
  padding: 6px 12px;
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.url-preview-pill b {
  color: var(--primary);
}

/* ================= CATEGORY HIDE / UNHIDE & STREAM HUB ================= */

.sub-section-box {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
}
.sub-section-box:hover {
  border-color: rgba(0, 242, 254, 0.25);
}

.host-switch-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.5);
  padding: 5px;
  border-radius: 10px;
  border: 1px solid var(--border);
  margin-bottom: 1.2rem;
  flex-wrap: wrap;
}
.host-tab-btn {
  padding: 6px 14px;
  border-radius: 7px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.host-tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}
.host-tab-btn.active {
  background: var(--primary);
  color: #04101e;
  font-weight: 700;
  box-shadow: 0 0 10px var(--primary-glow);
}

/* Stream Format Grid */
.stream-format-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 16px;
  margin-bottom: 1.5rem;
}

.stream-format-card {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.2s;
}
.stream-format-card:hover {
  border-color: rgba(0, 242, 254, 0.35);
  background: rgba(0, 242, 254, 0.02);
}
.stream-format-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.stream-format-title {
  font-weight: 700;
  color: #fff;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.stream-format-url-box {
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 8px 12px;
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stream-format-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

/* Category Hide / Unhide Interactive Chips */
.cat-toggle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  margin: 1rem 0;
}

.cat-toggle-item {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  transition: all 0.2s ease;
  user-select: none;
}
.cat-toggle-item:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 242, 254, 0.4);
}
.cat-toggle-item.visible {
  border-color: rgba(16, 185, 129, 0.45);
  background: rgba(16, 185, 129, 0.08);
}
.cat-toggle-item.hidden {
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.06);
  opacity: 0.65;
}
.cat-toggle-item.hidden .cat-name-label {
  text-decoration: line-through;
  color: var(--text-dim);
}
.cat-name-label {
  font-weight: 600;
  font-size: 0.88rem;
  color: #fff;
}
.cat-icon-badge {
  font-size: 1rem;
}


