/* ---------------------------------------------------------
   GLOBAL RESET + BASE
--------------------------------------------------------- */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", Arial, sans-serif;
  background: #0f0f0f;
  color: #f3f3f3;
  line-height: 1.5;
}

/* ---------------------------------------------------------
   TOP BAR
--------------------------------------------------------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 22px;
  background: #161616;
  border-bottom: 1px solid #2b2b2b;
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 2px 10px rgba(0,0,0,0.4);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.top-logo {
  height: 42px;
  width: 42px;
  object-fit: contain;
}

.top-title {
  font-size: 22px;
  font-weight: 700;
  color: #f7d26a;
}

/* ---------------------------------------------------------
   DASHBOARD NAV BUTTONS
--------------------------------------------------------- */

.top-nav {
  display: flex;
  gap: 10px;
}

.nav-btn {
  background: #1d1d1d;
  border: 1px solid #3d3d3d;
  color: #ececec;
  padding: 7px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
  transition: 0.15s;
}

.nav-btn:hover {
  background: #2a2a2a;
}

.nav-btn.active {
  background: #f7d26a;
  color: #0e0e0e;
  border-color: #f7d26a;
  box-shadow: 0 0 6px rgba(247,210,106,0.5);
}

/* ---------------------------------------------------------
   PAGE LAYOUT
--------------------------------------------------------- */

main { padding: 22px; }

.page { display: none; }
.page.active { display: block; }

h2 {
  color: #f7d26a;
  margin: 0 0 10px;
  font-weight: 700;
}

/* ---------------------------------------------------------
   BUTTONS
--------------------------------------------------------- */

.primary-btn {
  background: #f7d26a;
  border: none;
  color: #0e0e0e;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.15s;
}

.primary-btn:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}

/* ---------------------------------------------------------
   LOG BOX
--------------------------------------------------------- */

.log-box {
  margin-top: 15px;
  min-height: 50px;
  border-radius: 6px;
  border: 1px solid #2d2d2d;
  padding: 10px;
  font-size: 13px;
  background: #151515;
  white-space: pre-wrap;
}

/* ---------------------------------------------------------
   TABLES
--------------------------------------------------------- */

.channel-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
  border-radius: 8px;
  overflow: hidden;
}

.channel-table th,
.channel-table td {
  border: 1px solid #2a2a2a;
  padding: 8px 10px;
  font-size: 14px;
}

.channel-table th {
  background: #202020;
  font-weight: 700;
}

.channel-table tbody tr:hover {
  background: #1a1a1a;
}

/* Larger checkboxes */
.channel-table input[type="checkbox"] {
  transform: scale(1.2);
  cursor: pointer;
}

input[type="text"] {
  background: #121212;
  border: 1px solid #3d3d3d;
  color: #eee;
  padding: 6px 8px;
  width: 100%;
  border-radius: 4px;
}

/* ---------------------------------------------------------
   SEARCH INPUTS
--------------------------------------------------------- */

.channel-search input,
.index-search input {
  width: 100%;
  max-width: 350px;
  padding: 8px 12px;
  border-radius: 22px;
  border: 1px solid #444;
  background: #111;
  color: #eee;
  font-size: 14px;
  transition: 0.15s;
}

.channel-search input:focus,
.index-search input:focus {
  border-color: #f7d26a;
  box-shadow: 0 0 6px rgba(247,210,106,0.4);
  outline: none;
}

/* ---------------------------------------------------------
   LOGO THUMBNAILS
--------------------------------------------------------- */

.logo-thumb {
  height: 34px;
  width: 34px;
  object-fit: contain;
  border-radius: 6px;
  background: #222;
  padding: 2px;
  border: 1px solid #333;
}

/* ---------------------------------------------------------
   LOGO UPLOAD UI
--------------------------------------------------------- */

#logo-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

#logo-channel-select,
#logo-file {
  background: #111;
  border: 1px solid #444;
  color: #eee;
  padding: 6px;
  border-radius: 4px;
}

.logo-preview {
  max-height: 130px;
  max-width: 130px;
  object-fit: contain;
  background: #222;
  border-radius: 10px;
  border: 1px solid #333;
  padding: 6px;
}

/* ---------------------------------------------------------
   INDEX PAGE (LIST OF CHANNELS)
--------------------------------------------------------- */

.index-main {
  padding: 25px;
}

.index-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.index-title {
  font-size: 24px;
  font-weight: 700;
  color: #f7d26a;
}

.index-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
  margin-top: 20px;
}

.index-card {
  background: #181818;
  border-radius: 16px;
  border: 1px solid #2b2b2b;
  padding: 14px;
  display: flex;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  transition: 0.17s ease-in-out;
  box-shadow: 0 0 3px rgba(0,0,0,0.35);
}

.index-card:hover {
  border-color: #f7d26a;
  transform: translateY(-2px);
  box-shadow: 0 0 8px rgba(247,210,106,0.45);
}

.index-logo-wrap {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #2c2c2c;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.index-card-name {
  font-size: 16px;
  font-weight: 700;
}

.index-card-sub { opacity: 0.65; }

/* ---------------------------------------------------------
   CHANNEL PAGE
--------------------------------------------------------- */

.channel-page-main {
  padding: 25px;
}

.channel-page-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}

.channel-page-logo {
  width: 45px;
  height: 45px;
  background: #222;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.channel-page-title {
  font-size: 23px;
  font-weight: 700;
  color: #f7d26a;
}

.channel-page-subtitle {
  font-size: 13px;
  opacity: 0.7;
  margin-bottom: 14px;
}

/* Table wrapper inside channel pages */
.table-wrapper {
  overflow-x: auto;
}

/* ---------------------------------------------------------
   NOTE INDICATORS (M/T)
--------------------------------------------------------- */

.note-m {
  color: #4ea3ff !important;
  font-weight: 700;
  text-shadow: 0 0 4px #2e6eff;
}

.note-t {
  color: #82ff8c !important;
  font-weight: 700;
  text-shadow: 0 0 4px #3cff76;
}
