:root {
  --bg: #f6f7fb;
  --card: #ffffff;

  --text: #1f2937;
  --text-light: #6b7280;

  --primary: #6366f1;
  --primary-hover: #4f46e5;

  --border: #e5e7eb;

  --success: #16a34a;
  --danger: #dc2626;
  --warning: #f59e0b;

  --radius: 10px;
}

* {
  box-sizing: border-box;
}


/* ------- custom ------------- */
.d-flex {
  display: flex;
}
.justify-content-between {
  justify-content: space-between;
}
.justify-content-around {
  justify-content: space-around;
}
.justify-content-center {
  justify-content: center;
}
.align-items-center {
  align-items: center;
}
.flex-wrap {
  flex-wrap: wrap;
}
.gap-10 {
  gap: 10px;
}
.mb-15 {
  margin-bottom: 15px;
}
.mb-20 {
  margin-bottom: 20px;
}
.p-20 {
  padding: 20px;
}
.rounded {
  border-radius: 8px;
}
/* !------ custom ------------! */
/* body {
  margin: 0;
  padding: 40px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: #f5f7fb;
  color: #222;
} */

body {
  margin: 0;
  padding: 40px;

  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;

  background: var(--bg);
  color: var(--text);

  line-height: 1.5;
}

.container {
  max-width: 1640px;
  margin: 0 auto;
}

h1, h2, h3 {
  margin-top: 0;
}

.dashboard-input{
  flex: 1;
  min-width: 120px;
  padding: 10px 12px;
  font-size: 14px;
  border: 1px solid #ccd2e0;
  border-radius: 6px;
}

/* .card {
  background: #fff;
  border-radius: 8px;
  padding: 24px 28px;
  margin-bottom: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.06);
} */

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;

  border: 1px solid var(--border);

  box-shadow:
    0 1px 2px rgba(0,0,0,0.04),
    0 8px 24px rgba(0,0,0,0.04);
}

.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.form-row input {
  flex: 1;
  min-width: 120px;
  padding: 10px 12px;
  font-size: 14px;
  border: 1px solid #ccd2e0;
  border-radius: 6px;
}

/* .form-row button, .filter-row button{
  padding: 10px 16px;
  background: #4f6af5;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
} */

.form-row button,
.filter-row button {
  background: var(--primary);
  color: white;
}

/* .form-row button:hover, .filter-row button:hover {
  background: #3f59d6;
} */

.form-row button:hover,
.filter-row button:hover {
  background: var(--primary-hover);
}

.bots-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* .bot-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border: 1px solid #e2e6f0;
  border-radius: 6px;
  background: #fafbff;
  flex-wrap: wrap;
} */

.bot-item {
  display: flex;
  justify-content: space-between;
  align-items: center;

  padding: 14px 16px;

  border: 1px solid var(--border);
  border-radius: 8px;

  background: #fff;

  transition: box-shadow .15s, transform .1s;
}

.bot-item:hover {
  box-shadow: 0 8px 20px rgba(0,0,0,0.06);
  transform: translateY(-1px);
}

.bot-info {
  display: flex;
  flex-direction: column;
}

.bot-info strong {
  font-size: 16px;
}

.bot-status {
  font-weight: 600;
  font-size: 14px;
  margin-top: 4px;
}

/* .bot-status.active {
  color: #2ecc71;
}

.bot-status.inactive {
  color: #e74c3c;
} */

.bot-status.active {
  color: var(--success);
}

.bot-status.inactive {
  color: var(--danger);
}

.bot-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}

/* button {
  padding: 6px 12px;
  font-size: 13px;
  border-radius: 5px;
  border: none;
  cursor: pointer;
} */
 button {
  padding: 8px 14px;
  font-size: 14px;

  border-radius: 8px;
  border: 1px solid transparent;

  cursor: pointer;

  transition: all .15s ease;
}

/* button.delete {
  background: #e74c3c;
  color: #fff;
}

button.delete:hover {
  background: #c0392b;
} */

button.delete {
  background: var(--danger);
  color: #fff;
}

button.delete:hover {
  filter: brightness(0.9);
}

.bot-actions button.active {
  background: #e74c3c;
  color: #fff;
}

.bot-actions button.inactive {
  background: #2ecc71;
  color: #fff;
}

.dashboard-grid {
  display: flex;
  gap: 20px; /* Расстояние между колонками */
}

.column {
  flex: 1; /* Каждая колонка занимает половину */
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Чтобы фильтры и списки красиво растягивались */
.bots-list, #usersList {
  max-height: 500px;
  overflow-y: auto;
}

.form-row {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.card {
  padding: 15px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
}

.bot-item, .user-item {
  padding: 5px;
  border-bottom: 1px solid #eee;
  display: flex;
  gap: 10px;
  align-items: center;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
  background: rgba(0,0,0,0.35);
}

.modal.hidden {
  display: none;
}

/* .modal-content {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  width: 400px;
  max-height: 80%;
  overflow-y: auto;
  position: relative;
} */

.modal-content {
  background: white;
  border-radius: 12px;
  padding: 20px;

  box-shadow:
    0 10px 40px rgba(0,0,0,0.15);
}

.modal-close {
  position: sticky;
  float: right;
  top: 18px;
  right: 24px;
  font-size: 20px;
  cursor: pointer;
  z-index: 999;
}

#botStatsModal .modal-content{
  height: 80vh;
  padding: 0 20px 20px;
  min-width: 800px;
}

#botStatsModal ul {
  font-size: 12px;
}
#botStatsModal p{
  margin: 0 10px;
}

#botStatsContent {
  max-height: 100%;
  overflow-y: auto;
  scrollbar-width: thin; /* Firefox */
  scrollbar-color: rgba(0,0,0,0.3) transparent; /* Firefox */
}

/* Chrome, Edge, Safari */
#botStatsContent::-webkit-scrollbar {
  width: 4px; /* толщина полосы прокрутки */
}

#botStatsContent::-webkit-scrollbar-track {
  background: transparent; /* фон полосы */
}

#botStatsContent::-webkit-scrollbar-thumb {
  background-color: rgba(0,0,0,0.3); /* цвет "ползунка" */
  border-radius: 2px; /* скругление */
}

#botStatsContent::-webkit-scrollbar-thumb:hover {
  background-color: rgba(0,0,0,0.5); /* при наведении */
}


.stats-found{
    position: sticky;
    top: 144px;
    background: #fff;
    padding: 10px 10px;
}

.logoutBtn{
  position: absolute;
  right: 10px;
  top: 10px;
  padding: 10px 20px;
  cursor: pointer;
  border: 1px solid #4f6af5;
  transition: all 0.2s;
}

.logoutBtn:hover{
  background: #4f6af5;
  color: #fff;
}

 .hidden { display: none; }
.bot-status.active { color: green; }
.bot-status.inactive { color: red; }
.bot-actions button { margin-left: 5px; }
.modal { display: flex; position: fixed; top:0; left:0; width:100%; height:100%; background: rgba(0,0,0,0.5); justify-content:center; align-items:center; }
.modal-content { background: white; padding: 20px; border-radius: 8px; max-width: 600px; width: 90%; }



.bot-free {
  border-left: 4px solid #ff9800;
  background: rgba(255, 152, 0, 0.08);
}

.screenshots img {
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.2s;
}

.screenshots img:hover {
  transform: scale(1.05);
}

.accordion {
  margin: 5px 0;
}
.accordion-btn{
  width: 100%;
  padding: 12px;
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.15s, border-radius 0.15s;
}

.accordion-btn.active {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.accordion-btn:hover{
  background: #cacaca;
}

/* оплаченный */
.order-paid .accordion-btn {
  background: #e8f8ec;
  border-left: 4px solid #28a745;
  color: #1b5e20;
}

/* неоплаченный */
.order-unpaid .accordion-btn {
  background: #fff3f3;
  border-left: 4px solid #dc3545;
  color: #8b0000;
}
.order-paid .accordion-btn::before {
  content: "✔ ";
  color: #28a745;
  font-weight: bold;
}

.order-unpaid .accordion-btn::before {
  content: "✖ ";
  color: #dc3545;
  font-weight: bold;
}

.accordion-content{
  padding: 10px 5px;
  border-radius: 0 5px 5px 5px;
}
/* оплаченный заказ */
.accordion-content.order-paid {
  background: #f1fbf4;
  border-left: 4px solid #28a745;
  color: #065f46;
}

/* неоплаченный заказ */
.accordion-content.order-unpaid {
  background: #fff5f5;
  border-left: 4px solid #dc3545;
  color: #b91c1c;
}


.screenshots-container{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.screenshots-container img{
  width: calc(50% - 10px);
  border-radius: 4px;
  cursor: zoom-in;
  transition: transform .15s;
}

.screenshots-container img:hover {
  transform: scale(1.03);
}
/* select */

/* === Общий стиль для select === */
select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  padding: 8px 36px 8px 12px;
  font-size: 14px;
  font-family: inherit;

  border: 1px solid #d0d5dd;
  border-radius: 6px;
  background-color: #fff;

  cursor: pointer;
  transition: all 0.2s ease;

  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23667085' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px;
}

/* Hover */
select:hover {
  border-color: #98a2b3;
}

/* Focus */
select:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

/* Disabled */
select:disabled {
  background-color: #f2f4f7;
  cursor: not-allowed;
  opacity: 0.7;
}

.bot-item select {
  margin-top: 6px;
  min-width: 160px;
}

.bot-filters input {
  padding: 10px 12px;
  font-size: 14px;
  border: 1px solid #ccd2e0;
  border-radius: 6px;
}

.bot-name{
  cursor: pointer;
  transition: .2s;
}

.bot-name:hover{
  color: var(--primary);
}


/* image preview modal */

/* Модалка просмотра изображений */
#imagePreviewModal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

#imagePreviewModal.hidden {
  display: none;
}

.image-modal-content {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 40%;
  max-height: 90vh;
}

.image-modal-content .modal-close {
  align-self: flex-end;
  cursor: pointer;
  font-size: 24px;
  margin-bottom: 8px;
}

.image-container {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  width: 100%;
  min-height: 400px;
  margin-bottom: 12px;
}

.image-container img {
  max-width: 100%;
  max-height: 70vh;
  transform: scale(1);
  transition: transform 0.15s;
}

.image-controls {
  display: flex;
  gap: 8px;
  align-items: center;
  width: 40%;
}

.image-controls button {
  padding: 4px 8px;
  cursor: pointer;
}

.image-controls input[type="range"] {
  flex: 1;
}

/* image preview modal */

.statistic-modal-title{
  position: sticky;
  top: 0;
  padding-top: 20px;
  background: #fff;
}

/* statsitic modal filters */
.stats-filters{
  position: sticky;
  top:40px;
  background:#fff;
  z-index:10;
  padding:10px;
  border-bottom:1px solid #ddd;
}

.stats-filters .filter-row {
  align-items: center;
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap; 
}

.stats-filters input.dashboard-input {
  padding: 4px 8px;
  width: 200px;
}

.stats-filters select {
  padding: 4px 8px;
}

.stats-loader{
  text-align:center;
  padding:20px;
  font-size:14px;
  color:#666;
}

#fShots{
  min-width: 80px;
}


/* statsitic modal filters */

input,
select,
.dashboard-input {
  padding: 8px 10px;
  font-size: 14px;

  border-radius: 8px;
  border: 1px solid var(--border);

  background: #fff;

  transition: border .15s, box-shadow .15s;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--primary);

  box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}