:root {
  --bg-main: #0a0d14;
  --bg-sidebar: #0f1422;
  --bg-card: rgba(22, 30, 49, 0.7);
  --bg-card-hover: rgba(30, 41, 67, 0.85);
  --bg-input: #0d121f;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: #38bdf8;
  
  --primary: #38bdf8;
  --primary-glow: rgba(56, 189, 248, 0.25);
  --accent-purple: #818cf8;
  --accent-indigo: #6366f1;
  --accent-green: #34d399;
  --accent-rose: #f43f5e;
  --accent-amber: #fbbf24;
  
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px rgba(56, 189, 248, 0.15);
  
  --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
}

/* =======================================================
   BASE & RESET (MOBILE-FIRST)
======================================================= */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-family);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(56, 189, 248, 0.06) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(129, 140, 248, 0.06) 0%, transparent 40%);
  background-attachment: fixed;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* =======================================================
   APP LAYOUT (MOBILE-FIRST RESPONSIVE)
======================================================= */
.app-container {
  display: flex;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  position: relative;
}

/* Mobile Sidebar Backdrop Overlay */
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s;
}

.sidebar-backdrop.active {
  opacity: 1;
  visibility: visible;
}

/* Sidebar Navigation (Mobile-First: Off-Canvas Drawer) */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(300px, 85vw);
  height: 100%;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  padding: 20px 16px;
  flex-shrink: 0;
  z-index: 999;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 10px 0 35px rgba(0, 0, 0, 0.6);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.sidebar.open {
  transform: translateX(0);
}

.brand-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 4px 18px 4px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 18px;
  position: relative;
}

.brand-logo {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #ef4444, #f43f5e);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.35);
  color: white;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.brand-text {
  flex: 1;
  min-width: 0;
}

.brand-text h2 {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-text span {
  font-size: 0.72rem;
  color: var(--primary);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
  display: block;
}

.btn-close-sidebar {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.btn-close-sidebar:hover {
  background: rgba(244, 63, 94, 0.15);
  color: var(--accent-rose);
  border-color: rgba(244, 63, 94, 0.3);
}

/* Navigation Links */
.nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  user-select: none;
  min-height: 44px;
}

.nav-item:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
}

.nav-item.active {
  color: var(--primary);
  background: rgba(56, 189, 248, 0.08);
  border-color: rgba(56, 189, 248, 0.2);
  font-weight: 600;
}

.nav-item i {
  font-size: 1.05rem;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}

.nav-item span {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Sidebar Channel Status Card */
.channel-status-card {
  margin-top: 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.channel-avatar {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 2px solid var(--primary);
  object-fit: cover;
  flex-shrink: 0;
}

.channel-details {
  overflow: hidden;
  flex: 1;
  min-width: 0;
}

.channel-title {
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.channel-badge {
  font-size: 0.68rem;
  color: var(--accent-green);
  display: flex;
  align-items: center;
  gap: 4px;
}

.channel-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--accent-green);
  box-shadow: 0 0 6px var(--accent-green);
}

/* =======================================================
   MAIN CONTENT WRAPPER
======================================================= */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  min-width: 0;
}

/* =======================================================
   TOPBAR (MOBILE-FIRST)
======================================================= */
.topbar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  background: rgba(10, 13, 20, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-width: 0;
}

.btn-mobile-menu {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 1.15rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.btn-mobile-menu:hover, .btn-mobile-menu:active {
  background: rgba(56, 189, 248, 0.15);
  border-color: var(--primary);
  color: var(--primary);
}

.page-heading {
  flex: 1;
  min-width: 0;
}

.page-heading h1 {
  font-size: clamp(1.1rem, 3.5vw, 1.45rem);
  font-weight: 700;
  letter-spacing: -0.4px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-heading p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.3;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
}

/* Topbar Clock Pill */
.topbar-clock-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(8px);
  user-select: none;
  flex-shrink: 0;
}

.topbar-clock-pill .clock-icon {
  color: var(--primary);
  font-size: 0.9rem;
  animation: rotateSlow 20s linear infinite;
  flex-shrink: 0;
}

@keyframes rotateSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.topbar-clock-info {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  min-width: 0;
}

#topbar-clock-time {
  font-family: var(--font-mono);
  font-size: 0.86rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.4px;
}

#topbar-clock-tz {
  font-size: 0.62rem;
  color: var(--primary);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

/* Limit Status Pill */
.limit-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  user-select: none;
  flex-shrink: 0;
}

.limit-status-pill.apto {
  background: rgba(52, 211, 153, 0.12);
  border-color: rgba(52, 211, 153, 0.25);
  color: var(--accent-green);
}

.limit-status-pill.limitado {
  background: rgba(244, 63, 94, 0.15);
  border-color: rgba(244, 63, 94, 0.35);
  color: #fb7185;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.limit-status-pill.apto .status-dot {
  background: var(--accent-green);
  box-shadow: 0 0 8px var(--accent-green);
}

.limit-status-pill.limitado .status-dot {
  background: var(--accent-rose);
  box-shadow: 0 0 8px var(--accent-rose);
  animation: pulseDot 1.5s infinite;
}

@keyframes pulseDot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 6px rgba(244, 63, 94, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(244, 63, 94, 0); }
}

/* User Badge */
.user-badge {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 4px 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* =======================================================
   CONTENT BODY & GENERAL VIEWS
======================================================= */
.content-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex: 1;
  width: 100%;
  min-width: 0;
}

.view-section {
  display: none;
  animation: fadeIn 0.25s ease;
  width: 100%;
  min-width: 0;
}

.view-section.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =======================================================
   STATS GRID (MOBILE-FIRST: 2 COLS ON MOBILE)
======================================================= */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  width: 100%;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.2s ease;
  min-width: 0;
}

.stat-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(56, 189, 248, 0.2);
  transform: translateY(-2px);
}

.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.stat-icon.cyan { background: rgba(56, 189, 248, 0.12); color: var(--primary); }
.stat-icon.purple { background: rgba(129, 140, 248, 0.12); color: var(--accent-purple); }
.stat-icon.indigo { background: rgba(99, 102, 241, 0.12); color: var(--accent-indigo); }
.stat-icon.green { background: rgba(52, 211, 153, 0.12); color: var(--accent-green); }
.stat-icon.amber { background: rgba(251, 191, 36, 0.12); color: var(--accent-amber); }

.stat-info {
  min-width: 0;
  flex: 1;
}

.stat-info h3 {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat-info span {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

/* =======================================================
   CARD PANEL & CARD HEADERS
======================================================= */
.card-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-card);
  width: 100%;
  min-width: 0;
}

.card-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
  width: 100%;
}

.card-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.card-title-group h2 {
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.3;
}

.card-title-group i {
  color: var(--primary);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.card-header .actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
}

/* =======================================================
   BUTTONS (TOUCH ERGONOMIC)
======================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-family: var(--font-family);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  text-decoration: none;
  min-height: 38px;
  user-select: none;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: linear-gradient(135deg, #0284c7, #38bdf8);
  color: white;
  box-shadow: 0 3px 12px rgba(56, 189, 248, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 5px 18px rgba(56, 189, 248, 0.45);
}

.btn-success {
  background: linear-gradient(135deg, #059669, #34d399);
  color: #064e3b;
  box-shadow: 0 3px 12px rgba(52, 211, 153, 0.3);
}

.btn-danger {
  background: rgba(244, 63, 94, 0.15);
  border-color: rgba(244, 63, 94, 0.3);
  color: #fb7185;
}

.btn-danger:hover {
  background: var(--accent-rose);
  color: white;
}

.btn-outline {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-color);
  color: var(--text-main);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-sm {
  padding: 6px 11px;
  font-size: 0.78rem;
  min-height: 32px;
}

.btn-danger-outline {
  color: var(--accent-rose) !important;
  border-color: rgba(244, 63, 94, 0.35) !important;
  background: rgba(244, 63, 94, 0.05) !important;
}

.btn-danger-outline:hover {
  background: var(--accent-rose) !important;
  color: white !important;
}

.btn-google {
  background: #ffffff;
  color: #1f2937;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  cursor: pointer;
  font-size: 0.92rem;
}

.btn-google:hover {
  background: #f8fafc;
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
  color: #0f172a;
}

.btn-google svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}


/* =======================================================
   FORMS & INPUTS (MOBILE FIRST & PREVENT IOS ZOOM)
======================================================= */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.form-group label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
}

.form-input, .form-textarea, select.form-input {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  padding: 9px 12px;
  font-family: var(--font-family);
  font-size: 0.88rem;
  outline: none;
  width: 100%;
  min-height: 40px;
  box-sizing: border-box;
}

.form-input-sm {
  padding: 5px 8px;
  min-height: 32px;
  font-size: 0.8rem;
}

.form-input:focus, .form-textarea:focus, select.form-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.15);
}

.form-textarea {
  resize: vertical;
  min-height: 80px;
}

/* =======================================================
   VIEW 1: WEEKLY SLOTS CALENDAR (MOBILE-FIRST)
======================================================= */
.slots-week-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  width: 100%;
}

.day-card {
  background: linear-gradient(180deg, rgba(22, 28, 45, 0.75) 0%, rgba(13, 17, 28, 0.85) 100%);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 240px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  width: 100%;
}

.day-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.16);
}

.day-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--day-accent, linear-gradient(90deg, #38bdf8, #818cf8));
  opacity: 0.9;
}

.day-card[data-day="0"] { --day-accent: linear-gradient(90deg, #38bdf8, #0284c7); }
.day-card[data-day="1"] { --day-accent: linear-gradient(90deg, #818cf8, #6366f1); }
.day-card[data-day="2"] { --day-accent: linear-gradient(90deg, #c084fc, #a855f7); }
.day-card[data-day="3"] { --day-accent: linear-gradient(90deg, #60a5fa, #3b82f6); }
.day-card[data-day="4"] { --day-accent: linear-gradient(90deg, #fb7185, #f43f5e); }
.day-card[data-day="5"] { --day-accent: linear-gradient(90deg, #fbbf24, #f59e0b); }
.day-card[data-day="6"] { --day-accent: linear-gradient(90deg, #34d399, #10b981); }

.day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.day-name {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.day-count-badge {
  font-size: 0.7rem;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  padding: 2px 7px;
  border-radius: var(--radius-full);
  font-weight: 600;
}

.slot-tags {
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex: 1;
  margin-bottom: 12px;
  max-height: 200px;
  overflow-y: auto;
  padding-right: 2px;
}

.slot-pill {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.15s ease;
  min-height: 36px;
}

.slot-pill:hover {
  background: rgba(255, 255, 255, 0.08);
}

.slot-pill-time {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.slot-pill-time i {
  color: var(--primary);
  font-size: 0.72rem;
}

.remove-slot {
  background: transparent;
  border: none;
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.15s ease;
}

.remove-slot:hover, .remove-slot:active {
  background: rgba(244, 63, 94, 0.2);
  color: var(--accent-rose);
}

.add-slot-row {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(10, 13, 20, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 4px 6px;
  margin-top: auto;
}

.slot-time-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 4px 6px;
  outline: none;
  text-align: center;
  min-height: 32px;
}

.btn-add-slot {
  background: rgba(56, 189, 248, 0.18);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: var(--primary);
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.85rem;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.btn-add-slot:hover, .btn-add-slot:active {
  background: var(--primary);
  color: #000;
}

/* =======================================================
   TABLES & BULK ACTIONS (MOBILE RESPONSIVE SCROLL)
======================================================= */
.bulk-action-bar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 14px;
  width: 100%;
}

.bulk-action-left, .bulk-action-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-main);
  cursor: pointer;
  user-select: none;
  min-height: 32px;
}

.divider-v {
  width: 1px;
  height: 16px;
  background: var(--border-color);
  margin: 0 4px;
}

.table-responsive {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: rgba(13, 18, 31, 0.7);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.3);
}

.data-table {
  width: 100%;
  min-width: 580px;
  border-collapse: collapse;
  text-align: left;
}

.data-table th {
  background: rgba(15, 23, 42, 0.95);
  padding: 10px 12px;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.data-table td {
  padding: 9px 12px;
  font-size: 0.84rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  vertical-align: middle;
}

.data-table tr:hover td {
  background: rgba(56, 189, 248, 0.04);
}

.data-table tr.selected td {
  background: rgba(56, 189, 248, 0.08);
}

.table-file-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-main);
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-title-cell {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.84rem;
  font-weight: 500;
}

.table-schedule-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
  color: var(--accent-amber);
  background: rgba(251, 191, 36, 0.1);
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  font-size: 0.76rem;
  border: 1px solid rgba(251, 191, 36, 0.2);
  white-space: nowrap;
}

.table-actions-group {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

/* =======================================================
   VIEW 3: SCHEDULED VIDEOS GRID
======================================================= */
.video-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  width: 100%;
}

.video-card {
  background: rgba(13, 18, 31, 0.85);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
  width: 100%;
}

.video-card:hover {
  border-color: rgba(56, 189, 248, 0.3);
  transform: translateY(-2px);
}

.video-thumb-wrapper {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: #000;
}

.video-thumb-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-schedule-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 5px;
}

.video-content {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.video-card-title {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-main);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.video-actions {
  display: flex;
  gap: 6px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border-color);
}

/* =======================================================
   VIEW 4: QUEUE COLUMNS (MOBILE: STACKED 1 COLUMN)
======================================================= */
.dropzone-area {
  border: 2px dashed rgba(56, 189, 248, 0.3);
  border-radius: var(--radius-md);
  padding: 24px 16px;
  text-align: center;
  background: rgba(56, 189, 248, 0.02);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.dropzone-area:hover, .dropzone-area.dragover {
  border-color: var(--primary);
  background: rgba(56, 189, 248, 0.06);
}

.dropzone-icon {
  font-size: 2.2rem;
  color: var(--primary);
}

.queue-columns-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  width: 100%;
}

.file-column-card {
  width: 100%;
  min-width: 0;
}

.file-list-scroll {
  max-height: 360px;
  overflow-y: auto;
  overflow-x: hidden;
  border-radius: var(--radius-sm);
  -webkit-overflow-scrolling: touch;
}

.file-bulk-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  flex-wrap: wrap;
}

.file-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-color);
  gap: 8px;
  min-width: 0;
  width: 100%;
  transition: background 0.15s ease;
}

.file-item-row:hover {
  background: rgba(255, 255, 255, 0.02);
}

.file-item-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.file-item-info {
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.file-item-name {
  font-weight: 500;
  font-size: 0.82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-main);
}

.file-item-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 1px;
}

.file-item-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

/* =======================================================
   VIEW 5: TERMINAL & PROGRESS BAR
======================================================= */
.progress-bar-container {
  width: 100%;
  height: 7px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin: 10px 0;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #38bdf8, #818cf8);
  transition: width 0.3s ease;
}

.terminal-box {
  background: #080a10;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  height: 280px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.log-line {
  line-height: 1.4;
  word-break: break-all;
}

.log-line.info { color: #94a3b8; }
.log-line.header { color: #38bdf8; font-weight: bold; }
.log-line.video_start { color: #fbbf24; }
.log-line.video_success { color: #34d399; }
.log-line.video_error { color: #f43f5e; }
.log-line.limit_reached { color: #f87171; font-weight: bold; }
.log-line.summary { color: #a78bfa; font-weight: bold; }

/* =======================================================
   VIEW 7: TITLES MANAGER & SETTINGS
======================================================= */
.titles-layout-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  width: 100%;
}

.titles-mode-toggle {
  display: flex;
  background: rgba(0,0,0,0.3);
  padding: 2px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.titles-mode-toggle .mode-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
  min-height: 30px;
}

.titles-mode-toggle .mode-btn.active {
  background: var(--primary);
  color: #090d16;
  box-shadow: 0 2px 8px rgba(56, 189, 248, 0.4);
}

.title-card-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  transition: all 0.18s ease;
  min-width: 0;
}

.title-card-item:hover {
  background: rgba(56, 189, 248, 0.05);
  border-color: rgba(56, 189, 248, 0.25);
}

.title-card-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.title-card-index {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.04);
  padding: 2px 5px;
  border-radius: 4px;
  min-width: 28px;
  text-align: center;
  flex-shrink: 0;
}

.title-card-text {
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-main);
  line-height: 1.35;
  word-break: break-word;
  flex: 1;
}

.title-card-text .hashtag-highlight {
  color: var(--primary);
  font-weight: 600;
}

.title-card-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.title-char-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
}

.title-action-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.8rem;
}

.title-action-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}

.title-action-btn.delete:hover {
  background: rgba(244, 63, 94, 0.2);
  color: var(--accent-rose);
}

/* =======================================================
   VIEW 9: LOGS & AUDIT CONSOLE
======================================================= */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  width: 100%;
}

.stat-icon-wrapper {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.log-filter-pills {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
  width: 100%;
}

.log-filter-pills .log-pill-filter {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  flex-shrink: 0;
  min-height: 28px;
}

.log-filter-pills .log-pill-filter.active {
  background: var(--primary);
  color: #090d16;
  border-color: var(--primary);
}

.log-filter-pills .log-pill-filter.error.active {
  background: var(--accent-rose);
  color: #fff;
  border-color: var(--accent-rose);
}

.log-card-item {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-left: 4px solid var(--primary);
}

.log-card-item.level-error { border-left-color: var(--accent-rose); background: rgba(244, 63, 94, 0.04); }
.log-card-item.level-warning { border-left-color: var(--accent-amber); background: rgba(251, 191, 36, 0.03); }
.log-card-item.level-success { border-left-color: var(--accent-green); }

.log-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.log-level-badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
}

.log-level-badge.error { background: rgba(244, 63, 94, 0.2); color: var(--accent-rose); }
.log-level-badge.warning { background: rgba(251, 191, 36, 0.2); color: var(--accent-amber); }
.log-level-badge.success { background: rgba(52, 211, 153, 0.2); color: var(--accent-green); }
.log-level-badge.info { background: rgba(56, 189, 248, 0.2); color: var(--primary); }

.log-timestamp {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
}

.log-card-message {
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-main);
  line-height: 1.35;
  word-break: break-word;
}

/* =======================================================
   WIZARD STEPS
======================================================= */
.wizard-steps-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  width: 100%;
}

.wizard-step-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent-indigo));
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
}

/* =======================================================
   MODALS (RESPONSIVE TOUCH DIALOGS)
======================================================= */
.modal-backdrop {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1001;
  padding: 16px;
}

.modal-backdrop.active {
  display: flex;
}

.modal-box {
  background: #111625;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  width: 100%;
  max-width: min(520px, 94vw);
  max-height: 90vh;
  max-height: 90dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 20px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: modalPop 0.2s ease;
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 16px;
  right: 16px;
  left: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 1100;
  pointer-events: none;
}

.toast {
  background: #161f33;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--text-main);
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  animation: slideIn 0.3s ease;
  pointer-events: auto;
  width: 100%;
  max-width: 400px;
  margin-left: auto;
}

.toast.success { border-left: 4px solid var(--accent-green); }
.toast.error { border-left: 4px solid var(--accent-rose); }
.toast.info { border-left: 4px solid var(--primary); }

@keyframes slideIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =======================================================
   RESPONSIVE MEDIA QUERIES (BREAKPOINTS)
======================================================= */

/* Tablet & Phablet (min-width: 640px) */
@media (min-width: 640px) {
  .topbar {
    padding: 16px 24px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .topbar-left {
    width: auto;
  }

  .topbar-actions {
    width: auto;
    justify-content: flex-end;
  }

  .content-body {
    padding: 24px;
    gap: 24px;
  }

  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }

  .slots-week-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .video-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  }

  .bulk-action-bar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .bulk-action-left, .bulk-action-right {
    width: auto;
  }

  .card-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .card-header .actions {
    width: auto;
    justify-content: flex-end;
  }

  .wizard-steps-container {
    grid-template-columns: repeat(2, 1fr);
  }

  .metrics-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Tablet Landscape & Small Desktop (min-width: 900px) */
@media (min-width: 900px) {
  .slots-week-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .wizard-steps-container {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Desktop (min-width: 1024px) */
@media (min-width: 1024px) {
  .btn-mobile-menu {
    display: none;
  }

  .btn-close-sidebar {
    display: none;
  }

  .sidebar-backdrop {
    display: none;
  }

  .sidebar {
    position: static;
    transform: none;
    width: 280px;
    height: 100vh;
    box-shadow: none;
    padding: 24px 16px;
  }

  .topbar {
    padding: 20px 32px;
  }

  .content-body {
    padding: 32px;
    gap: 28px;
  }

  .stats-grid {
    grid-template-columns: repeat(5, 1fr);
  }

  .queue-columns-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .titles-layout-grid {
    grid-template-columns: 1.35fr 0.85fr;
  }

  .toast-container {
    left: auto;
    bottom: 24px;
    right: 24px;
  }
}

/* Large Desktop (min-width: 1400px) */
@media (min-width: 1400px) {
  .slots-week-grid {
    grid-template-columns: repeat(7, 1fr);
  }
}

/* =======================================================
   CHANNEL ANALYTICS DASHBOARD (HOME VIEW)
======================================================= */
.channel-hero-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  margin-bottom: 24px;
  position: relative;
}

.channel-hero-banner {
  height: 140px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.25) 0%, rgba(99, 102, 241, 0.3) 50%, rgba(244, 63, 94, 0.2) 100%), #111827;
  background-size: cover;
  background-position: center;
  position: relative;
}

.hero-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(10, 13, 20, 0.2), rgba(10, 13, 20, 0.9));
}

.channel-hero-body {
  padding: 0 24px 22px 24px;
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  flex-wrap: wrap;
}

.channel-hero-profile {
  display: flex;
  align-items: flex-end;
  gap: 20px;
  margin-top: -45px;
  flex: 1;
  min-width: 300px;
}

.channel-avatar-wrapper {
  position: relative;
  flex-shrink: 0;
}

.channel-hero-avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 3px solid #0f1422;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  object-fit: cover;
  background: #1e293b;
}

.avatar-live-indicator {
  position: absolute;
  bottom: 6px;
  right: 6px;
  width: 14px;
  height: 14px;
  background: var(--accent-green);
  border: 2.5px solid #0f1422;
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-green);
}

.channel-hero-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding-top: 10px;
}

.hero-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.hero-title-row h2 {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.channel-handle-pill {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--primary);
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 2px 10px;
  border-radius: var(--radius-full);
}

.channel-hero-desc {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 750px;
  margin: 0;
}

.channel-hero-tags {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.hero-tag {
  font-size: 0.78rem;
  color: var(--text-dim);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.hero-tag i {
  color: var(--primary);
  font-size: 0.75rem;
}

.channel-hero-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.quota-efficiency-pill {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-green);
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.25);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* KPI Grid */
.dash-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.dash-kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s, border-color 0.2s;
  position: relative;
  overflow: hidden;
}

.dash-kpi-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.18);
}

.dash-kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 4px;
}

.dash-kpi-card.cyan::before { background: var(--primary); }
.dash-kpi-card.purple::before { background: var(--accent-purple); }
.dash-kpi-card.indigo::before { background: var(--accent-indigo); }
.dash-kpi-card.amber::before { background: var(--accent-amber); }
.dash-kpi-card.green::before { background: var(--accent-green); }
.dash-kpi-card.rose::before { background: var(--accent-rose); }

.kpi-icon-wrap {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.dash-kpi-card.cyan .kpi-icon-wrap { background: rgba(56, 189, 248, 0.15); color: var(--primary); }
.dash-kpi-card.purple .kpi-icon-wrap { background: rgba(129, 140, 248, 0.15); color: var(--accent-purple); }
.dash-kpi-card.indigo .kpi-icon-wrap { background: rgba(99, 102, 241, 0.15); color: var(--accent-indigo); }
.dash-kpi-card.amber .kpi-icon-wrap { background: rgba(251, 191, 36, 0.15); color: var(--accent-amber); }
.dash-kpi-card.green .kpi-icon-wrap { background: rgba(52, 211, 153, 0.15); color: var(--accent-green); }
.dash-kpi-card.rose .kpi-icon-wrap { background: rgba(244, 63, 94, 0.15); color: var(--accent-rose); }

.kpi-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.kpi-label {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.kpi-value {
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
  margin: 2px 0 1px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kpi-subtext {
  font-size: 0.72rem;
  color: var(--text-dim);
}

/* Highlights Grid */
.dash-highlights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.dash-highlight-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.highlight-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.highlight-badge {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.highlight-badge.gold {
  background: rgba(251, 191, 36, 0.15);
  color: #fcd34d;
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.highlight-badge.rose {
  background: rgba(244, 63, 94, 0.15);
  color: #fda4af;
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.highlight-badge.blue {
  background: rgba(56, 189, 248, 0.15);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.highlight-metric-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
}

.highlight-body {
  display: flex;
  gap: 14px;
  align-items: center;
}

.highlight-thumb-wrap {
  position: relative;
  width: 100px;
  height: 60px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: #000;
}

.highlight-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-badge-short {
  position: absolute;
  bottom: 3px;
  right: 3px;
  background: var(--accent-rose);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 3px;
  letter-spacing: 0.5px;
}

.highlight-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.highlight-info h4 {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.3;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.highlight-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.highlight-link {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
  transition: color 0.2s;
}

.highlight-link:hover {
  color: #7dd3fc;
  text-decoration: underline;
}

.highlight-breakdown-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.breakdown-metric-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.84rem;
  color: var(--text-muted);
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

/* Charts Grid */
.dash-charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 20px;
}

.chart-panel .panel-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Metadata & Technical Specs Grid */
.dash-metadata-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  margin-top: 20px;
}

.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-item {
  font-size: 0.78rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.specs-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.spec-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.84rem;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.spec-label {
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.spec-val {
  color: var(--text-main);
  font-weight: 600;
}

/* =======================================================
   AFFILIATE & MONETIZATION STYLES (ALIEXPRESS / AMAZON)
======================================================= */
.platform-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.platform-badge.aliexpress {
  background: linear-gradient(135deg, rgba(255, 87, 34, 0.2), rgba(244, 63, 94, 0.15));
  border: 1px solid #ff5722;
  color: #ff8a65;
}

.platform-badge.amazon {
  background: linear-gradient(135deg, rgba(255, 153, 0, 0.2), rgba(245, 158, 11, 0.15));
  border: 1px solid #f59e0b;
  color: #fbbf24;
}

.platform-badge.marketplace {
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid #a855f7;
  color: #c084fc;
}

.platform-badge.custom {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid #38bdf8;
  color: #38bdf8;
}

.btn-var-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.btn-var-chip:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: var(--primary);
  transform: translateY(-1px);
}

.btn-var-chip:active {
  transform: translateY(0);
}

.youtube-preview-card {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.preview-text-box {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 0.84rem;
  color: var(--text-main);
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 120px;
  overflow-y: auto;
}

.preview-comment-bubble {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(251, 191, 36, 0.25);
  border-radius: 8px;
  padding: 12px 14px;
  position: relative;
}

.badge-pinned-comment {
  font-size: 0.65rem;
  font-weight: 700;
  background: rgba(251, 191, 36, 0.2);
  color: var(--accent-amber);
  border: 1px solid rgba(251, 191, 36, 0.4);
  padding: 1px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.comment-author-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent-indigo));
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
}

.affiliate-card-item {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  transition: all 0.2s ease;
}

.affiliate-card-item:hover {
  background: rgba(15, 23, 42, 0.9);
  border-color: rgba(56, 189, 248, 0.4);
  transform: translateX(2px);
}

.affiliate-card-item.inactive {
  opacity: 0.6;
  border-left: 3px solid var(--text-dim);
}

.affiliate-card-item.active {
  border-left: 3px solid var(--accent-green);
}

.aff-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.aff-item-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.aff-item-icon.aliexpress {
  background: rgba(255, 87, 34, 0.15);
  color: #ff8a65;
  border: 1px solid rgba(255, 87, 34, 0.3);
}

.aff-item-icon.amazon {
  background: rgba(255, 153, 0, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(255, 153, 0, 0.3);
}

.aff-item-icon.custom {
  background: rgba(56, 189, 248, 0.15);
  color: var(--primary);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.aff-item-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
}

.aff-item-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.aff-item-url {
  font-size: 0.76rem;
  color: var(--primary);
  font-family: var(--font-mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.aff-item-cta {
  font-size: 0.74rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.aff-item-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

@media (max-width: 900px) {
  .affiliate-templates-grid {
    grid-template-columns: 1fr !important;
  }
  .quick-add-aff-grid {
    grid-template-columns: 1fr !important;
  }
}


