/* ОБЩЕЕ */
body {
  margin: 0;
  background: #000;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto;
}

.container {
  max-width: 1200px;
  margin: auto;
  padding: 30px 20px;
}

/* ✅ ТАБЫ (ПО ЦЕНТРУ) */
.tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 30px;
}

.tab {
  padding: 12px 22px;
  border-radius: 12px;
  background: #111;
  color: #aaa;
  border: none;
  cursor: pointer;
  font-size: 14px;
  transition: 0.2s;
}

.tab:hover {
  transform: translateY(-2px);
}

.tab.active {
  background: linear-gradient(135deg, #fe2c55, #ff4d6d);
  color: white;
}

/* ✅ ВЕРХНЯЯ ПАНЕЛЬ */
/* ✅ ПАНЕЛЬ НА ВСЮ ШИРИНУ */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;

  width: 100%;
  margin-bottom: 25px;
}

/* имя */
.user-block {
  font-size: 16px;
  font-weight: 500;
}

/* ✅ КНОПКИ РАСТЯГИВАЮТСЯ */
.buttons-bar {
  display: flex;
  flex: 1;
  justify-content: space-between;
  margin-left: 20px;
}

/* ✅ одинаковые кнопки */
.buttons-bar button {
  flex: 1;
  margin: 0 5px;
  padding: 10px;

  border-radius: 12px;
  border: none;

  cursor: pointer;
  font-size: 14px;

  transition: 0.2s;
}

/* hover эффект */
.buttons-bar button:hover {
  transform: translateY(-2px);
}

/* ✅ цвета */
#editBtn { background:#fe2c55; color:white; }
#saveBtn { background:#3b82f6; color:white; }
#addBtn { background:#10b981; color:white; }
#cancelBtn { background:#ef4444; color:white; }

/* ✅ КНОПКИ */
.top-bar button {
  margin-left: 6px;
  padding: 9px 14px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  color: white;
}

#editBtn {background:#fe2c55;}
#saveBtn {background:#3b82f6;}
#addBtn {background:#10b981;} /* 💎 изумруд */
#cancelBtn {background:#ef4444;}

.top-bar button:hover {
  transform: translateY(-2px);
}

/* ✅ ПЛАН */
.plan {
  display: flex;
  gap: 15px;
  background: #111;
  padding: 20px;
  border-radius: 16px;
  margin-bottom: 30px;
  align-items: center;
}

.plan div {
  flex: 1;
}

.plan span {
  font-size: 13px;
  color: #888;
}

.plan h2 {
  margin-top: 8px;
  font-size: 24px;
}

.chart-box-small {
  width: 160px;
}

/* ✅ ДАТА */
input[type="date"] {
  margin-bottom: 20px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #222;
  background: #111;
  color: white;
}

/* ✅ КАРТОЧКИ */
.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 10px;
}

.card {
  background: #111;
  padding: 20px;
  border-radius: 16px;
  transition: 0.2s;
  border: 1px solid #1f1f1f;
}

.card:hover {
  transform: translateY(-4px);
  border-color: #fe2c55;
  box-shadow: 0 4px 20px rgba(254,44,85,0.2);
}

.card span {
  font-size: 12px;
  color: #888;
}

.card h2 {
  margin-top: 10px;
  font-size: 28px;
}

/* ✅ ТАБЛИЦА */
table {
  width: 100%;
  margin-top: 25px;
  border-collapse: collapse;
  background: #111;
  border-radius: 16px;
  overflow: hidden;
}

th {
  font-size: 13px;
  color: #888;
  text-align: left;
}

td, th {
  padding: 12px;
  border-bottom: 1px solid #222;
}

tr:hover {
  background: #1a1a1a;
}

/* ✅ LOGIN */
.login {
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.login input {
  margin-top: 10px;
  padding: 12px;
  width: 240px;
  border-radius: 12px;
  border: none;
  background: #111;
  color: white;
}

.login button {
  margin-top: 10px;
  padding: 12px;
  width: 250px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg,#fe2c55,#ff4d6d);
  color: white;
  cursor: pointer;
}
.chart-box-small canvas {
  filter: drop-shadow(0 0 12px rgba(0,224,255,0.5));
}
.chart-box-small canvas {
  filter: drop-shadow(0 0 14px rgba(0, 200, 255, 0.7));
}
tbody tr {
  cursor: pointer;
  transition: 0.2s;
}

tbody tr:hover {
  background: #1a1a1a;
  transform: scale(1.01);
}
.delete-btn {
  background: #ef4444;
  color: white;
  border: none;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.2s;
}

.delete-btn:hover {
  background: #dc2626;
  transform: scale(1.1);
}
.delete-btn {
  background: #ef4444;
  color: white;
  border: none;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.2s;
}

.delete-btn:hover {
  background: #dc2626;
  transform: scale(1.1);
}
.date-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 15px 0;
}

.date-bar input {
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #222;
  background: #111;
  color: white;
}

.date-btn {
  background: linear-gradient(135deg,#00c6ff,#0072ff);
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 10px;
  cursor: pointer;
  transition: 0.2s;
}

.date-btn:hover {
  transform: translateY(-2px);
}
/* ✅ ПЛАН — КОМПАКТНЫЙ */
.plan {
  display: flex;
  gap: 15px;
  margin: 20px 0;
  align-items: center;
}

/* ✅ СЕТКА МЕТРИК */
.plan-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 70px;
  gap: 10px;
  flex: 1;
}

/* ✅ КАРТОЧКИ МЕНЬШЕ */
.plan-card {
  background: #111;
  padding: 10px 12px;   /* меньше padding */
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Текст компактнее */
.plan-card span {
  font-size: 11px;
  color: #777;
}

/* Числа меньше */
.plan-card h2 {
  margin-top: 4px;
  font-size: 18px;
  font-weight: 600;
}

/* ✅ ДИАГРАММА МЕНЬШЕ */
.plan-chart {
  width: 120px;
  height: 120px;
  background: #111;
  border-radius: 10px;
  padding: 10px;

  display: flex;
  align-items: center;
  justify-content: center;
}

/* glow */
.plan-chart canvas {
  /* width: 100% !important; */
  height: 100% !important;
  filter: drop-shadow(0 0 10px rgba(0,200,255,0.5));
}
.plan {
  display: flex;
  gap: 15px;
  margin: 20px 0;
  align-items: center;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  flex: 1;
}

.plan-card {
  background: #111;
  padding: 10px;
  border-radius: 10px;
  transition: 0.2s;
}

.plan-card span {
  font-size: 11px;
  color: #888;
}

.plan-card h2 {
  margin-top: 4px;
  font-size: 18px;
}

/* ✅ цвета */
.good { color: #10b981; }   /* зелёный */
.bad { color: #ef4444; }    /* красный */

.plan-chart {
  width: 140px;
  height: 140px;
}
/* ✅ БАЗА ДЛЯ ВСЕХ КНОПОК */
button {
  border: none;
  border-radius: 12px;
  padding: 10px 16px;

  font-size: 14px;
  font-weight: 500;

  cursor: pointer;
  transition: all 0.25s ease;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* ✅ ОСНОВНАЯ (ГРАДИЕНТ ТИКТОК) */
.btn-main {
  background: linear-gradient(135deg, #fe2c55, #ff4d6d);
  color: white;
}

.btn-main:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 6px 20px rgba(254,44,85,0.4);
}

/* ✅ EXCEL (голубой неон 💎) */
.btn-excel {
  background: linear-gradient(135deg, #00c6ff, #0072ff);
  color: white;
}

.btn-excel:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(0,200,255,0.6);
}

/* ✅ УДАЛЕНИЕ */
.btn-delete {
  background: #181818;
  border: 1px solid #333;
  color: #aaa;
}

.btn-delete:hover {
  background: #ef4444;
  color: #fff;
  transform: scale(1.1);
}

/* ✅ ВЫБРАТЬ */
.btn-select {
  background: #111;
  border: 1px solid #333;
  color: #ccc;
}

.btn-select:hover {
  background: #2563eb;
  color: white;
  border-color: transparent;
}

/* ✅ МАЛЕНЬКИЕ КНОПКИ В ТАБЛИЦЕ */
.small-btn {
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 8px;
}
.plan {
  display: flex;
  gap: 20px;
  margin: 20px 0;
  align-items: flex-start;
}

/* ✅ секции */
.plan-section {
  flex: 1;
  background: #111;
  padding: 15px;
  border-radius: 14px;
}

/* заголовки */
.plan-title {
  font-size: 14px;
  margin-bottom: 10px;
  color: #aaa;
}

/* сетка */
.plan-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

/* карточки */
.plan-card {
  background: #181818;
  padding: 10px;
  border-radius: 10px;
}

.plan-card span {
  font-size: 11px;
  color: #777;
}

.plan-card h2 {
  font-size: 18px;
  margin-top: 4px;
}

/* ✅ диаграмма */
.plan-chart {
  width: 140px;
  height: 140px;
  background: #111;
  border-radius: 8px;
  padding: 10px;

  display: flex;
  align-items: center;
  justify-content: center;
}

.plan-chart canvas {
  /* width: 100% !important; */
  height: 100% !important;
  filter: drop-shadow(0 0 12px rgba(0,200,255,0.5));
}
/* ✅ ПРЕМИУМ EXCEL КНОПКА */
.btn-excel-premium {
  background: linear-gradient(135deg, #00e0ff, #0072ff);
  color: white;

  padding: 10px 18px;
  border-radius: 14px;
  border: none;

  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.3px;

  display: inline-flex;
  align-items: center;
  gap: 6px;

  cursor: pointer;

  position: relative;
  overflow: hidden;

  transition: all 0.25s ease;
}

/* ✅ glow эффект */
.btn-excel-premium::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #00f0ff, #00aaff);
  opacity: 0;
  transition: 0.3s;
  z-index: 0;
}

/* ✅ поверх контент */
.btn-excel-premium span {
  position: relative;
  z-index: 2;
}

/* ✅ hover */
.btn-excel-premium:hover {
  transform: translateY(-2px) scale(1.04);

  box-shadow:
    0 0 10px rgba(0,200,255,0.5),
    0 0 25px rgba(0,200,255,0.4);
}

/* ✅ glow усиливается */
.btn-excel-premium:hover::before {
  opacity: 0.25;
}

/* ✅ клик (нажатие) */
.btn-excel-premium:active {
  transform: scale(0.97);
  box-shadow: 0 0 8px rgba(0,200,255,0.3);
}
.plan-chart {
  display: flex;
  gap: 10px;
}

.chart-box {
  width: 120px;
  height: 120px;
}

.chart-box canvas {
  width: 100% !important;
  height: 100% !important;
}
.creatives{
  margin-top: 30px;
  background:#111;
  padding:15px;
  border-radius:14px;
}

/* header */
.creatives-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:15px;
}

/* карусель */
.carousel{
  display:flex;
  gap:10px;
  overflow-x:auto;
  padding-bottom:10px;
}

/* видео */
.carousel video{
  width:220px;
  height:380px;
  border-radius:12px;
  background:black;
  object-fit:cover;
}
.tiktok-feed {
  height: 500px;
  overflow-y: scroll;

  scroll-snap-type: y mandatory;

  border-radius: 12px;
  background: black;
}

/* каждый элемент */
.tiktok-item {
  height: 500px;
  position: relative;

  display: flex;
  justify-content: center;
  align-items: center;

  scroll-snap-align: start;
}

/* видео */
.tiktok-item video {
  height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: cover;
}

/* скрываем скролл */
.tiktok-feed::-webkit-scrollbar {
  display: none;
}
.tiktok-feed{
  height:500px;
  overflow-y:scroll;
  scroll-snap-type:y mandatory;
  background:black;
}

.tiktok-item{
  height:500px;
  display:flex;
  justify-content:center;
  align-items:center;
  scroll-snap-align:start;
}

.tiktok-item video{
  height:100%;
  object-fit:cover;
}

.tiktok-feed::-webkit-scrollbar{
  display:none;
}
/* контейнер */
.creative-item{
  display:flex;
  gap:15px;
  background:#111;
  padding:12px;
  border-radius:14px;
  margin-bottom:12px;
}

/* видео */
.creative-video{
  width:180px;
  height:320px;
  object-fit:cover;
  border-radius:10px;
  background:black;
}

/* правая часть */
.creative-info{
  flex:1;
  display:flex;
  flex-direction:column;
  gap:10px;
  justify-content:flex-start;
}

/* статус */
.creative-status{
  font-size:12px;
  font-weight:bold;
  padding:6px 10px;
  border-radius:8px;
  width:fit-content;
}

/* зелёный */
.creative-status.active{
  background:#0f3;
  color:#000;
}

/* серый */
.creative-status.off{
  background:#444;
  color:#fff;
}

/* статистика */
.creative-stats{
  font-size:13px;
  color:#ccc;
  line-height:1.6;
}
.creative-buttons{
  margin-top:10px;
}

.creative-buttons button{
  margin-right:5px;
  padding:6px 10px;
  border-radius:8px;
  border:none;
  cursor:pointer;
}

.edit-btn{
  background:#333;
}

.save-btn{
  background:#00e0ff;
  color:#000;
}
.status-toggle{
  border:none;
  padding:6px 12px;
  border-radius:10px;
  font-weight:bold;
  cursor:pointer;
}

/* активный */
.status-toggle.on{
  background:#00ff66;
  color:#000;
}

/* выключен */
.status-toggle.off{
  background:#444;
  color:#fff;
}
/* контейнер тумблера */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 28px;
}

/* скрываем checkbox */
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

/* фон */
.slider {
  position: absolute;
  cursor: pointer;
  background-color: #ccc;
  transition: .3s;
  border-radius: 34px;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

/* кружок */
.slider::before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

/* включено */
.switch input:checked + .slider {
  background-color: #00e0ff;
}

/* движение */
.switch input:checked + .slider::before {
  transform: translateX(22px);
}

/* текст */
.status-text{
  font-size:12px;
  margin-top:5px;
  color:#aaa;
}
.creative-controls{
  display:flex;
  gap:10px;
  margin-bottom:15px;
}

.creative-controls select{
  padding:6px 10px;
  border-radius:8px;
  background:#111;
  color:#fff;
  border:1px solid #333;
}
/* топ 1 */
.creative-item.top1{
  border:2px solid #00ff99;
  box-shadow:0 0 10px #00ff99;
}

/* топ 2 */
.creative-item.top2{
  border:2px solid #ffd700;
}

/* топ 3 */
.creative-item.top3{
  border:2px solid #cd7f32;
}

/* метка */
.creative-rank{
  font-size:14px;
  font-weight:bold;
  margin-bottom:8px;
  color:#00e0ff;
}
.creative-chart{
  margin-top:10px;
  width:100%;
}
.creative-forecast{
  margin-top:10px;
  padding:8px;
  border-radius:10px;
  font-size:12px;
  background:#0f1720;
  color:#00e0ff;
}
.creative-note{
  margin-top:10px;
  display:flex;
  flex-direction:column;
  gap:6px;
}

.note-input{
  background:#111;
  border:1px solid #333;
  border-radius:8px;
  padding:6px;
  color:#fff;
  font-size:12px;
  resize:none;
}

.note-save{
  padding:6px;
  border:none;
  border-radius:8px;
  background:#00e0ff;
  color:#000;
  cursor:pointer;
}
#planChart{
  max-width:200px;
  margin:auto;
}