@import url("./styles-v2.css");

body {
  overflow: hidden;
}

.stores-main {
  min-width: 0;
  min-height: 0;
  height: calc(100vh - 20px);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stores-header,
.stat-card,
.table-card {
  background: var(--surface-strong);
  box-shadow: var(--shadow);
  border: 1px solid #f4f4f5;
}

.stores-header {
  padding: 16px 24px;
  border-radius: var(--radius);
}

.stores-header h1 {
  margin: 0;
  font-size: 2.4rem;
  line-height: 1.03;
}

.stores-header p:last-child {
  margin: 8px 0 0;
  max-width: 640px;
  color: #586370;
  font-size: 1rem;
  line-height: 1.65;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.stat-card {
  padding: 18px 20px;
  border-radius: 30px;
}

.stat-card span,
.stat-card small {
  display: block;
  color: var(--muted);
  font-weight: 600;
}

.stat-card strong {
  display: block;
  margin: 10px 0 2px;
  font-size: 1.8rem;
  line-height: 1.05;
}

.stat-card--online strong {
  color: #148f28;
}

.stores-panel {
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.region-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.region-filters button {
  border: 1px solid rgba(243, 108, 0, 0.14);
  background: var(--surface-strong);
  color: var(--accent);
  border-radius: 999px;
  padding: 10px 15px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.region-filters button:hover {
  transform: translateY(-1px);
}

.region-filters button.active {
  background: var(--accent);
  color: #fff;
}

.table-card {
  min-height: 0;
  flex: 1;
  border-radius: 30px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.table-scroll {
  min-height: 0;
  flex: 1;
  overflow: auto;
}

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

.stores-table th,
.stores-table td {
  padding: 16px 24px;
  text-align: left;
  border-bottom: 1px solid #f0f1f3;
}

.stores-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fff;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.11em;
}

.stores-table td {
  color: #20242a;
  font-weight: 650;
}

.stores-table td strong,
.stores-table td small {
  display: block;
}

.stores-table td small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 650;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  background: #ecfff0;
  color: #148f28;
  padding: 8px 12px;
  font-weight: 800;
}

.status-pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

@media (max-width: 980px) {
  body {
    overflow: auto;
  }

  .stores-main {
    height: auto;
    min-height: calc(100vh - 28px);
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .stores-header {
    padding: 26px;
  }

  .table-card {
    max-height: 62vh;
  }
}
