:root {
  --ink: #1b1b1a;
  --muted: #5e5a55;
  --accent: #c5592d;
  --accent-2: #2a6f6f;

  /* ⬇️ ЗАМЕНА БЕЖА НА ПРЕМИАЛЬНЫЙ ЗЕЛЁНЫЙ */
  --paper: #0f2e24;

  --panel: #ffffff;
  --line: #e4d8c6;
  --shadow: 0 24px 60px rgba(28, 22, 12, 0.15);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-weight: 400;
  color: var(--ink);

  /* ⬇️ ЗЕЛЁНЫЙ ФОН ВМЕСТО БЕЖЕВОГО */
  background:
    radial-gradient(
      1200px 700px at 20% 20%,
      rgba(255, 255, 255, 0.06) 0%,
      rgba(255, 255, 255, 0) 55%
    ),
    linear-gradient(
      135deg,
      #0f2e24 0%,
      #1f4d3a 100%
    );

  min-height: 100vh;
}

.hero h1 {
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  margin: 0.2rem 0;
  font-weight: 700;
}

.noise {
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='.05'/%3E%3C/svg%3E");
  pointer-events: none;
  mix-blend-mode: multiply;
}

.app {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 20px 80px;
  position: relative;
}

.hero {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 28px;
  border-radius: 24px;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.75));
  box-shadow: var(--shadow);
  animation: rise 0.8s ease-out both;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-size: 0.7rem;
  color: var(--accent-2);
  margin: 0;
}

.subtitle {
  color: var(--muted);
  max-width: 560px;
  margin: 0;
}

.nav {
  display: flex;
  gap: 16px;
}

.nav-link {
  text-decoration: none;
  color: var(--ink);
  font-weight: 400;
  border-bottom: 2px solid transparent;
  padding-bottom: 4px;
}

.nav-link.active {
  border-color: var(--accent);
  color: var(--accent);
}

main {
  display: grid;
  gap: 28px;
  margin-top: 28px;
}

.panel {
  background: var(--panel);
  border-radius: 22px;
  padding: 22px;
  box-shadow: var(--shadow);
  animation: fadeIn 0.7s ease-out both;
}

.panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.table-tools {
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}

.search-field {
  display: grid;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--muted);
  max-width: 320px;
}

.search-field input {
  width: min(320px, 100%);
}

.filters-wrap {
  position: relative;
}

.filters-btn {
  padding: 10px 16px;
  border-radius: 999px;
}

.filters-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 14px 30px rgba(28, 22, 12, 0.12);
  padding: 12px;
  display: grid;
  gap: 10px;
  z-index: 5;
}

.filters-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
}

.filter-option {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 8px;
  row-gap: 4px;
  align-items: center;
  font-size: 0.9rem;
  color: var(--ink);
}

.filter-option input {
  margin: 0;
}

.filter-hint {
  grid-column: 2;
  font-size: 0.78rem;
  color: var(--muted);
}

.status {
  font-size: 0.9rem;
  color: var(--accent-2);
}

.auth-widget {
  margin: 0 0 14px;
  display: flex;
  justify-content: flex-start;
}

.table-wrap {
  overflow-x: auto;
  border-radius: 14px;
  border: 1px solid var(--line);
  -webkit-overflow-scrolling: touch;
}

.card-list {
  display: none;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.data-card {
  border-radius: 18px;
  background: #fff7ec;
  border: 1px solid var(--line);
  padding: 16px;
  display: grid;
  gap: 12px;
}

.card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.98rem;
}

.card-head strong {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
}

.card-head span {
  color: var(--muted);
  font-size: 0.9rem;
}

.card-status {
  font-weight: 400;
  font-size: 0.9rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  background: #f2efe9;
  color: var(--muted);
}

.status-прогноз {
  color: #6f6a63;
  background: #ece7df;
}

.status-рекомендовано {
  color: #c5592d;
  background: #f7e0d4;
}

.status-утверждено {
  color: #1f7a4a;
  background: #dff0e6;
}

.card-grid {
  display: grid;
  gap: 8px;
}

.data-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.92rem;
}

.data-label {
  color: var(--muted);
}

.card-actions {
  display: flex;
  gap: 10px;
}

.card-empty {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px dashed var(--line);
  color: var(--muted);
  text-align: center;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  text-align: center;
  padding: 12px 14px;
  font-size: 0.92rem;
}

/* ⬇️ ЗЕЛЁНАЯ ПЛАШКА ЗАГОЛОВКА ТАБЛИЦЫ */
th {
  background: #164534;
  color: #f2f7f4;
  font-weight: 700;
}

tbody tr:nth-child(even) {
  background: #fbf7f0;
}

.card {
  background: #fff8ef;
  border-radius: 18px;
  padding: 18px;
  border: 1px solid var(--line);
}

/* дальше без изменений */

form {
  display: grid;
  gap: 12px;
}

label {
  display: grid;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--muted);
}

input,
select,
button {
  font-family: inherit;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #d9c6b0;
  font-size: 0.95rem;
}

button {
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
  font-weight: 400;
}

button.ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.hint {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.grid {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  margin-bottom: 18px;
}

.actions {
  display: flex;
  gap: 12px;
  align-items: flex-end;
}

.admin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.hidden {
  display: none;
}

.price-refresh-section {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: #f0f8ff;
  border-radius: 14px;
  margin-bottom: 18px;
  border: 1px solid #c5d9f5;
}

.auto-refresh-section {
  flex-wrap: wrap;
  justify-content: flex-start;
}

.auto-refresh-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
}

.auto-refresh-toggle input {
  width: 16px;
  height: 16px;
  margin: 0;
  padding: 0;
}

.auto-refresh-hours {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
}

.auto-refresh-hours input {
  width: 96px;
}

.ticker-manual-section {
  margin-bottom: 18px;
}

.ticker-manual-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
  align-items: center;
}

.ticker-manual-actions input {
  flex: 1;
}

.text-muted {
  color: var(--muted);
  font-size: 0.85rem;
}

.btn-primary {
  background: var(--accent-2);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 400;
  transition: background 0.2s;
}

.btn-primary:hover {
  background: #1e5a7a;
}

.btn-primary:disabled {
  background: #8faec2;
  cursor: not-allowed;
}

@media (max-width: 980px) {
  .app {
    padding: 24px 16px 64px;
  }

  .hero {
    padding: 22px;
  }

  .panel {
    padding: 18px;
  }

  th,
  td {
    padding: 10px 10px;
    font-size: 0.88rem;
  }
}

@media (max-width: 760px) {
  .table-wrap {
    display: none;
  }

  .card-list {
    display: grid;
  }

  .nav {
    flex-wrap: wrap;
  }
}
