/* Toxic Telugu Movie Review Monitoring Dashboard - Custom CSS */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-card: rgba(30, 41, 59, 0.7);
  --border-color: rgba(255, 255, 255, 0.1);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  
  --accent-gold: #f59e0b;
  --accent-blue: #3b82f6;
  
  /* Status Colors */
  --badge-fake-bg: rgba(239, 68, 68, 0.15);
  --badge-fake-text: #ef4444;
  --badge-fake-border: rgba(239, 68, 68, 0.3);
  
  --badge-misleading-bg: rgba(245, 158, 11, 0.15);
  --badge-misleading-text: #f59e0b;
  --badge-misleading-border: rgba(245, 158, 11, 0.3);
  
  --badge-real-bg: rgba(16, 185, 129, 0.15);
  --badge-real-text: #10b981;
  --badge-real-border: rgba(16, 185, 129, 0.3);
  
  --badge-positive-bg: rgba(59, 130, 246, 0.15);
  --badge-positive-text: #60a5fa;
  
  --badge-negative-bg: rgba(225, 29, 72, 0.15);
  --badge-negative-text: #fb7185;
  
  --sidebar-width: 260px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--accent-blue);
  text-decoration: none;
  transition: all 0.2s;
}

a:hover {
  text-decoration: underline;
  color: #60a5fa;
}

/* ==================== LOGIN PAGE ==================== */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at top right, #1e1b4b 0%, #0f172a 60%);
  padding: 20px;
}

.login-card {
  background: rgba(30, 41, 59, 0.85);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  width: 100%;
  max-width: 440px;
  border-radius: 16px;
  padding: 36px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.login-header {
  text-align: center;
  margin-bottom: 28px;
}

.login-header h1 {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.login-header p {
  color: var(--text-muted);
  font-size: 13px;
}

.film-badge {
  display: inline-block;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
  font-weight: 800;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #cbd5e1;
}

.form-control {
  width: 100%;
  padding: 12px 14px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  width: 100%;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  transform: translateY(-1px);
}

.btn-success {
  background: #10b981;
  color: #fff;
}
.btn-success:hover { background: #059669; }

.btn-warning {
  background: #f59e0b;
  color: #000;
}
.btn-warning:hover { background: #d97706; }

.btn-danger {
  background: #ef4444;
  color: #fff;
}
.btn-danger:hover { background: #dc2626; }

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

.alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 20px;
}

.alert-danger {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.alert-success {
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #6ee7b7;
}

.demo-credentials {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  font-size: 12px;
  color: var(--text-muted);
}

.demo-credentials code {
  background: rgba(0, 0, 0, 0.3);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--accent-gold);
}


/* ==================== MAIN LAYOUT ==================== */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
}

.sidebar-brand {
  padding: 24px 20px;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-brand h2 {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-menu {
  list-style: none;
  padding: 20px 12px;
  flex: 1;
}

.sidebar-menu li {
  margin-bottom: 6px;
}

.sidebar-menu a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 10px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: all 0.2s;
}

.sidebar-menu a:hover,
.sidebar-menu li.active a {
  background: rgba(59, 130, 246, 0.15);
  color: #fff;
}

.sidebar-menu li.active a {
  border-left: 3px solid var(--accent-blue);
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.25) 0%, rgba(59, 130, 246, 0.05) 100%);
}

.sidebar-menu .badge-count {
  margin-left: auto;
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
}

.sidebar-footer {
  padding: 20px;
  border-top: 1px solid var(--border-color);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
}

.user-details h4 {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.user-details span {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: capitalize;
}

/* Main Content Wrapper */
.main-wrapper {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.header-bar {
  background: rgba(30, 41, 59, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 90;
}

.header-title h1 {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.timer-box {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-color);
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 12px;
  color: var(--accent-gold);
  display: flex;
  align-items: center;
  gap: 8px;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { opacity: 0.4; }
  50% { opacity: 1; }
  100% { opacity: 0.4; }
}

.content-area {
  padding: 28px;
  flex: 1;
}

/* Stats Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.stat-info h3 {
  font-size: 24px;
  font-weight: 800;
  color: #fff;
}

.stat-info p {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

/* Data Tables */
.card-panel {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 28px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.panel-header h3 {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.custom-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.custom-table th {
  background: rgba(15, 23, 42, 0.6);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.custom-table td {
  padding: 16px 18px;
  font-size: 13.5px;
  color: #cbd5e1;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.custom-table tr:last-child td {
  border-bottom: none;
}

.custom-table tbody tr {
  transition: background 0.15s;
}

.custom-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

/* Channel Nested Table / Grouping */
.channel-row {
  background: rgba(15, 23, 42, 0.4);
}

.channel-title-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.channel-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.nested-videos-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.video-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 10px 14px;
  border-radius: 8px;
}

.video-item-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.video-thumb {
  width: 48px;
  height: 32px;
  border-radius: 4px;
  object-fit: cover;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.badge-fake {
  background: var(--badge-fake-bg);
  color: var(--badge-fake-text);
  border: 1px solid var(--badge-fake-border);
}

.badge-misleading {
  background: var(--badge-misleading-bg);
  color: var(--badge-misleading-text);
  border: 1px solid var(--badge-misleading-border);
}

.badge-real {
  background: var(--badge-real-bg);
  color: var(--badge-real-text);
  border: 1px solid var(--badge-real-border);
}

.badge-positive {
  background: var(--badge-positive-bg);
  color: var(--badge-positive-text);
}

.badge-negative {
  background: var(--badge-negative-bg);
  color: var(--badge-negative-text);
}

/* Responsiveness */
@media (max-width: 900px) {
  .sidebar {
    width: 70px;
  }
  .sidebar-brand h2 span,
  .sidebar-menu a span,
  .sidebar-menu .badge-count,
  .user-details {
    display: none;
  }
  .main-wrapper {
    margin-left: 70px;
  }
}
