/* Google Font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap');

.break-word {
    word-wrap: break-word;     /* старый синтаксис */
    overflow-wrap: break-word; /* современный */
    word-break: break-all;     /* если очень длинная строка */
}


/* Логотип */
.logo-container {
    text-align: center; /* выравнивание по центру */
    margin: 0; /* убираем лишние отступы сверху/снизу */
    padding-top: 0; /* можно явно сбросить */
}

.logo {
    max-width: 200px; /* максимум на ПК */
    width: 50%; /* адаптивно на мобильных */
    height: auto; /* сохраняем пропорции */
}


/* --- Общие стили --- */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: #f7f8fa;
    color: #333;
    margin: 0;
    padding: 0;
}

/* Контейнер для контента */
.container {
    width: 90%;
    max-width: 480px; /* мобильный максимум */
    padding: 1.5rem;
	margin: 0.1rem auto;
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 0.6rem 1.5rem rgba(0,0,0,0.05);
}

/* Заголовки */
h1 {
    font-size: clamp(24px, 6vw, 48px);
    font-weight: 600;
    color: #222;
    margin-top: 1rem;
    margin-bottom: 1rem;
}
h3 {
    font-size: clamp(18px, 4vw, 36px);
    font-weight: 600;
    color: #222;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

/* Inputs и кнопки */
input[type="text"], input[type="number"], button {
    width: 100%;
    font-size: clamp(16px, 5vw, 32px);
    padding: clamp(10px, 3vw, 24px);
    border-radius: 12px;
    margin: 0.5rem 0;
    border: 1px solid #ccc;
}

/* Кнопки */
button {
    border: none;
    background: #4caf50;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

button:hover {
    background: #45a049;
    transform: translateY(-0.1rem);
    box-shadow: 0 0.4rem 0.8rem rgba(0,0,0,0.1);
}

/* Кнопка отключения TronLink */
#disconnect-btn {
    background: #999999;
}
#disconnect-btn:hover {
    background: #777777;
}

/* Подсказки и ошибки */
.note {
    font-size: clamp(12px, 3vw, 18px);
    color: #666;
}
.error-toast {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background: #ff6b6b;
    color: #fff;
    padding: 1.2rem 1.5rem;
    border-radius: 1rem;
    display: none;
    z-index: 1000;
    font-weight: 600;
    box-shadow: 0 0.4rem 1.2rem rgba(0,0,0,0.1);
}

.info-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #999999; /* серый */
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    z-index: 1000;
    display: none;
    font-weight: bold;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}


/* Статусы заказов */
.status-pending { color: #f39c12; font-weight: bold; }
.status-paid { color: #27ae60; font-weight: bold; }
.status-failed { color: #c0392b; font-weight: bold; }
.status-delivered { color: #28a745; font-weight: bold; }

/* Таблицы админки */
table {
    border-collapse: collapse;
    width: 100%;
    margin-top: 1.5rem;
    font-size: clamp(12px, 3vw, 18px);
}

th, td {
    padding: 0.8rem;
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
}

th {
    background: #f2f2f2;
    font-weight: 600;
}

tr:hover { background: #f9f9f9; }

/* QR-код */
canvas {
    display: block;
    margin: 1.5rem auto;
    border: 0.3rem solid #eee;
    border-radius: 1rem;
    padding: 1rem;
    background: #fff;
    width: 100%;
    max-width: 400px;
}

/* --- Desktop (≥769px) --- */
@media (min-width: 769px) {
    .container { max-width: 900px; padding: 2rem; margin: 1rem auto; }

    h1 { font-size: 2rem; }
    h3 { font-size: 1.3rem; }

    input[type="text"], input[type="number"], button { font-size: 1rem; padding: 0.8rem; }
    table, th, td { font-size: 0.95rem; padding: 0.6rem; }
    canvas { width: 60%; max-width: 250px; }
}

/* История: ссылки подчеркнуты, но не синие */
.history-link {
    text-decoration: underline;
    color: inherit;
    cursor: pointer;
}


.pagination-btn {
    margin: 0 4px;
    padding: 6px 8px;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    border-radius: 4px;
    font-size: 0.95rem;
}
.pagination-btn.active {
    border: 2px solid #333;
    background: #f0f0f0;
    font-weight: bold;
}
.pagination-dots {
    margin: 0 4px;
    font-weight: bold;
}

.logo-link {
  text-decoration: none;
  display: inline-block;
}

.logo-link {
  text-decoration: none;      /* убираем подчёркивание */
  display: inline-block;      /* чтобы ссылка вела себя как блок */
}

.logo-link .logo {
  width: auto;                /* сбрасываем ограничение */
  max-width: 200px;           /* как было */
  height: auto;
  display: block;             /* чтобы не было лишних отступов */
  margin: 0 auto;             /* центрируем */
}

.order-fragment p {
    margin-top: 0.3rem;
    margin-bottom: 0.3rem;
    line-height: 1.2;
}
