* {
    box-sizing: border-box; 
}

body { font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, 'Helvetica Neue', Arial, sans-serif; margin:0; }
.header, .footer { background:#111; color:#fff; }
.container { max-width: 960px; margin: 0 auto; padding: 16px; }
h1 { margin: 16px 0; }

.login-page {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

.login-card {
  background: #fff;
  padding: 32px 40px;
  border-radius: 8px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.08);
  max-width: 360px;
  width: 100%;
}

.login-title {
  margin: 0 0 24px;
  font-size: 20px;
}

.login-label {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
}

.login-input {
  width: 100%;
  padding: 8px 10px;
  margin-bottom: 16px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.login-button {
  width: 100%;
  padding: 10px;
  border: none;
  border-radius: 4px;
  background: #000;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.flash-list {
  margin-top: 16px;
  padding-left: 18px;
}

.flash-danger { color: #c0392b; }
.flash-success { color: #27ae60; }
.flash-info { color: #2980b9; }


.admin-header {
  background: #f0f0f0;
  border-bottom: 1px solid #ddd;
  padding: 8px 16px;
}

.admin-header__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-header__logo {
  font-weight: 600;
}

.admin-header__nav .nav-item {
  margin-left: 16px;
  text-decoration: none;
  color: #555;
  padding: 4px 8px;
}

.nav-item--active {
  background: pink;
  color: #fff;
  border-radius: 4px;
}

.subnav {
  margin: 16px 0;
  margin-left: 24px;
  border-bottom: 1px solid #ddd;
  padding-bottom: 4px;
}

.subnav__item {
  margin-right: 12px;
  text-decoration: none;
  color: #555;
}

.subnav__item--active {
  font-weight: 600;
  border-bottom: 2px solid #333;
}

/* ===== СТРАНИЦА "НОВЫЙ ПРОГНОЗ" ===== */

.forecast-page {
  padding: 16px 24px;
}

.forecast-page__inner {
  /* max-width: 1100px; */
  margin: 0 auto;
}

.forecast-form {
  display: flex;
  align-items: flex-start;
  gap: 32px;
}

/* Левая колонка */
.forecast-form__left {
  flex: 0 0 360px;
}

/* Правая колонка (пока как заглушка под предпросмотр) */
.forecast-form__right {
  flex: 1;
  min-height: 400px;
  border-radius: 8px;
  border: 1px solid #d0e6d0;
  background: #e7ffe7;
  padding: 16px;
  font-size: 14px;
  color: #333;
}

/* Общие группы полей */
.field-group {
  margin-bottom: 16px;
}

.field-label {
  display: block;
  font-size: 13px;
  margin-bottom: 4px;
}

.field-hint {
  font-size: 11px;
  color: #777;
  margin-top: 2px;
}

/* Планируемый номер */
.field-number {
  font-size: 20px;
  font-weight: 600;
  padding: 6px 0;
}

#field-title{
  height: 130px
}

div.announcement {
  /* height: 130px; */
  margin-bottom: 16px;
}

/* Инпуты */
.input-text {
  box-sizing: border-box;
  padding: 6px 8px;
  border-radius: 4px;
  border: 1px solid #ccc;
  font-size: 14px;
}

.input-text--wide {
  width: 100%;
}

.input-text--medium {
  width: 220px;
}

.input-text--small {
  width: 120px;
}

/* Файл */
.field-file {
  max-width: 100%;
}

.input-file {
  width: 100%;
  padding: 6px 8px;
  border-radius: 4px;
  border: 1px solid #ccc;
  background: #f5f5f5;
  font-size: 13px;
}

/* Цена + "баллов" справа */
.field-group--price {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.field-price-input {
  flex: 0 0 auto;
}

.field-price-suffix {
  font-size: 14px;
  padding-bottom: 6px;
}

/* Textarea */
.textarea {
  box-sizing: border-box;
  padding: 6px 8px;
  border-radius: 4px;
  border: 1px solid #ccc;
  font-size: 14px;
  resize: vertical;
}

.textarea--wide {
  width: 100%;
}

/* Кнопки */
.forecast-form__actions {
  margin-top: 24px;
  display: flex;
  gap: 12px;
}

.btn {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  font-size: 14px;
}

.btn--primary {
  background: #000;
  color: #fff;
}

.btn--secondary {
  background: #e0e0e0;
  color: #000;
}

/* Контейнер двух колонок */
.forecast-editor {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    margin-top: 16px;
}


.forecast-editor__left {
    flex: 1; 
    min-width: 300px;
}


.forecast-editor__right {
    width: 380px; /* фиксированная, как на макете моб. телефона */
    background: #d9ffd9; /* мягкий зелёный фон */
    border: 2px solid #6fcf6f;
    border-radius: 12px;
    padding: 16px;
    box-sizing: border-box;
}

/* ===== ПРЕДПРОСМОТР ===== */

.preview {
  background: #d9ffd9;          /* светло-зелёный фон как в макете */
  border-radius: 16px;
  border: 2px solid #79c879;
  padding: 10px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
  font-size: 14px;
  line-height: 1.4;
}

/* верхняя полоска с названием бота */
.preview__header {
  background: #26a65b;
  color: #fff;
  text-align: center;
  padding: 6px 8px;
  border-radius: 10px 10px 0 0;
  font-weight: 600;
  font-size: 13px;
}

/* внутренняя карточка с самим прогнозом */
.preview__card {
  background: #f7fff7;
  border-radius: 0 0 10px 10px;
  border: 1px solid #b5e6b5;
  margin-top: 6px;
  overflow: hidden;
}

/* блок с картинкой */
.preview__image {
  width: 100%;
  height: 140px;
  background: #e5fbe5;
  overflow: hidden;
}

.preview__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview__image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: #ffffff;
  background: #26a65b;
}

/* тело карточки */
.preview__body {
  padding: 10px 12px 12px;
}

/* блок с номером и заголовком */
.preview__forecast-label {
  font-weight: 700;
  margin-bottom: 4px;
}

.preview__title {
  font-weight: 600;
  margin-bottom: 8px;
}

/* мета-информация: дата, спорт, цена */
.preview__meta {
  font-size: 13px;
  margin-bottom: 10px;
}

.preview__meta div {
  margin-bottom: 2px;
}

/* заголовок секции "Обоснование" */
.preview__section-title {
  font-weight: 600;
  margin-bottom: 4px;
}

/* текст описания */
.preview__description {
  background: #f0fff0;
  border-radius: 6px;
  padding: 8px;
  min-height: 80px;
  white-space: pre-line;
}

.preview__title,
.preview__description {
   white-space: pre-line; /* сохраняет \n, но лишние пробелы схлопывает */
}

/* низ карточки */
.preview__footer {
  margin-top: 8px;
  font-style: italic;
  color: #333;
}

/* Сетка сохранённых прогнозов */
.saved-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(260px, 400px));
  gap: 24px;
}

/* Карточка */
.saved-card {
  background: #f9fff7;
  border: 2px solid #6cbf4b;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Картинка */
.saved-card__image {
  width: 100%;
  height: 140px;
  border-radius: 10px;
  overflow: hidden;
  background: #6cbf4b;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.saved-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.saved-card__image-placeholder {
  color: #ffffff;
  font-weight: 600;
}

/* Текст */
.saved-card__title {
  font-weight: 600;
  margin-bottom: 6px;
}

.saved-card__meta {
  font-size: 13px;
  line-height: 1.3;
  color: #333;
}

.saved-card__meta-value {
  font-weight: 500;
}

/* Кнопки внизу карточки */
.saved-card__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}

.saved-card__btn {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
}

.saved-card__btn--edit {
  background: #ffffff;
  border: 1px solid #999;
}

.saved-card__btn--publish {
  background: #222;
  color: #fff;
}


/* ====== Диалоги ====== */

.dialog-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 1000;
}

.dialog {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1001;
}

.dialog__content {
  background: #ffffff;
  border-radius: 6px;
  padding: 20px 24px;
  min-width: 260px;
  max-width: 360px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  font-size: 14px;
}

.dialog__text {
  margin-bottom: 16px;
  line-height: 1.4;
}

.dialog__buttons {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.dialog__btn {
  border: none;
  border-radius: 16px;
  padding: 4px 14px;
  font-size: 14px;
  cursor: pointer;
  background: #000;
  color: #fff;
}

.dialog__btn--primary {
  background: #000;
  color: #fff;
}

/* ===== МОДАЛЬНЫЕ ОКНА АДМИНКИ ===== */

.dialog-overlay {
  position: fixed;        /* поверх всей страницы */
  inset: 0;               /* top:0; right:0; bottom:0; left:0; */
  background: rgba(0, 0, 0, 0.35);  /* лёгкое затемнение */
  z-index: 1000;
}

.dialog-window {
  position: fixed;        /* центрируем относительно окна браузера */
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);

  min-width: 320px;
  max-width: 420px;

  background: #ffffff;
  border-radius: 8px;
  padding: 18px 22px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);

  font-family: inherit;
  font-size: 14px;
  line-height: 1.4;

  z-index: 1001;          /* выше оверлея */
}

.dialog-text {
  margin-bottom: 16px;
}

.dialog-buttons {
  display: flex;
  justify-content: center;
  gap: 8px;
}

/* Кнопки можно чуть уменьшить, чтобы были как на макете */
.dialog-window .btn {
  min-width: 70px;
  padding: 6px 14px;
  font-size: 13px;
}


.cards-grid--in-game {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 400px));
  gap: 16px;
  margin-top: 16px;
}

.card--forecast {
  border: 2px solid #2a9d3f;
  border-radius: 8px;
  padding: 8px;
  background: #f6fff6;
}

.card__description {
  overflow-wrap: anywhere;   
  word-break: break-word;   
  hyphens: auto;             
}

.card__line {
  overflow-wrap: anywhere;   
  word-break: break-word;   
  hyphens: auto;  
}

.card__header {
  margin-bottom: 4px;
  font-weight: 600;
}

.card__body {
  display: flex;
  gap: 12px;
}

.card__media {
  flex: 0 0 140px;
}

.card__image {
  display: block;
  width: 100%;
  border-radius: 4px;
  object-fit: cover;
}

.card__image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100px;
  background: #4caf50;
  color: #fff;
  border-radius: 4px;
  font-weight: 600;
}

.card__content {
  flex: 1;
  font-size: 14px;
}

.card__line--bold {
  font-weight: 600;
  margin-bottom: 4px;
}

.card__meta {
  margin-bottom: 6px;
}

.card__section-title {
  font-weight: 600;
  margin-top: 6px;
  margin-bottom: 2px;
}

.card__description {
  max-height: 90px;
  overflow: auto;
}

.card__footer--actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}

.btn-icon {
  border: none;
  border-radius: 4px;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}

.btn-icon--success {
  background: #2ecc71;
  color: #fff;
}

.btn-icon--danger {
  background: #e74c3c;
  color: #fff;
}

.js-mark-refund {
  background: #4b74ff;
  color: #fff;
}