:root {
  --bg-color: #121212;
  --panel-bg: #1e1e24;
  --primary: #2ecc71;
  --text-main: #f5f6fa;
  --text-muted: #7f8fa6;
  --danger: #e74c3c;
  --warning: #f1c40f;
  --social: #00a8ff;
}
body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 20px;
}
.container {
  max-width: 1400px;
  margin: 0 auto;
}
h1,
h2,
h3,
h4 {
  margin-top: 0;
}
.subtitle {
  color: var(--text-muted);
  margin-bottom: 15px;
  font-size: 1.1em;
}

.panel {
  background: var(--panel-bg);
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}
input,
select {
  width: 100%;
  padding: 12px;
  margin-bottom: 15px;
  background: #2f3640;
  border: 1px solid #353b48;
  color: white;
  border-radius: 4px;
  box-sizing: border-box;
}

.main-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 20px;
}
.grid-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
}
.stat-box {
  background: #2f3640;
  padding: 15px;
  border-radius: 8px;
  text-align: center;
}
.stat-box h3 {
  color: var(--text-muted);
  font-size: 0.8em;
  text-transform: uppercase;
  margin-bottom: 5px;
}
.stat-box .val {
  font-size: 1.4em;
  font-weight: bold;
  color: var(--primary);
}
.stat-box .val.social {
  color: var(--social);
}

.actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 15px;
}
button {
  background: #2f3640;
  color: var(--text-main);
  border: 1px solid #353b48;
  padding: 12px;
  font-size: 0.95em;
  font-weight: bold;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}
button:hover {
  background: #404855;
}
button:disabled {
  background: #222;
  color: #555;
  cursor: not-allowed;
  opacity: 0.5;
}
.btn-primary {
  background: var(--primary);
  color: black;
  border: none;
}
.btn-primary:hover {
  background: #27ae60;
  color: black;
}
.danger-btn {
  border-color: var(--danger);
}
.danger-btn:hover {
  background: var(--danger);
  color: white;
}

#log {
  height: 250px;
  overflow-y: auto;
  background: #000;
  padding: 15px;
  border-radius: 6px;
  font-family: monospace;
  font-size: 0.85em;
}
.log-entry {
  border-bottom: 1px dashed #333;
  padding: 5px 0;
}
.log-week {
  color: var(--warning);
}
.log-event {
  color: #9b59b6;
  font-weight: bold;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9em;
}
th,
td {
  padding: 8px;
  text-align: left;
  border-bottom: 1px solid #353b48;
}
.highlight-row {
  background-color: rgba(46, 204, 113, 0.2);
  font-weight: bold;
  color: var(--primary);
}
.styled-list {
  margin: 0;
  padding-left: 20px;
  color: #bdc3c7;
  font-size: 0.9em;
  line-height: 1.6;
}
.styled-list li strong {
  color: white;
}

.offer-card {
  background: #2f3640;
  padding: 12px;
  border-radius: 6px;
  margin-bottom: 10px;
  border-left: 4px solid var(--social);
}
.offer-actions {
  display: flex;
  gap: 5px;
  margin-top: 10px;
}
.offer-actions button {
  flex: 1;
  padding: 8px;
  font-size: 0.85em;
}
.badge {
  background: #555;
  font-size: 0.7em;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 5px;
  text-transform: uppercase;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
}
.modal-box {
  background: var(--panel-bg);
  width: 90%;
  max-width: 1000px;
  max-height: 85vh;
  border-radius: 8px;
  padding: 20px;
  overflow-y: auto;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}
.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}
.shop-card {
  background: #2f3640;
  border-radius: 8px;
  padding: 15px;
  display: flex;
  flex-direction: column;
}
.custom-img {
  width: 100%;
  height: 140px;
  background: #121212;
  border-radius: 4px;
  margin-bottom: 10px;
  object-fit: cover;
  border: 1px dashed #555;
}
.shop-card h4 {
  margin: 0 0 5px 0;
}
.shop-card p {
  font-size: 0.85em;
  color: var(--text-muted);
  margin: 0 0 15px 0;
  flex-grow: 1;
}

#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  background: var(--primary);
  color: #000;
  padding: 15px 20px;
  border-radius: 6px;
  font-weight: bold;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  animation:
    slideIn 0.3s,
    fadeOut 0.5s 2.5s forwards;
}
@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes fadeOut {
  to {
    opacity: 0;
    visibility: hidden;
  }
}
