:root {
  --bg-page: #09090b;
  --bg-window: #101013;
  --bg-card: #151519;
  --bg-card-hover: #1a1a20;

  --border-subtle: #222228;
  --border-card: #282830;
  --border-active: #3c3c48;

  --text-primary: #f4f4f6;
  --text-muted: #8a8a96;

  --accent: #c599ff;
  --accent-soft: #dfc4ff;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  display: flex;
  flex-direction: column;
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-primary);
  background-color: var(--bg-page);
  background-image: radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 24px 24px;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
}

.container {
  width: min(920px, calc(100% - 40px));
  margin-inline: auto;
}

/* Header */
.topbar {
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(9, 9, 11, 0.94);
}

.topbar__inner {
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.brand__logo {
  display: inline-block;
  width: 19px;
  height: 19px;
  background: var(--accent-soft);
  -webkit-mask-image: url('./assets/allax_logo.png');
  mask-image: url('./assets/allax_logo.png');
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  flex-shrink: 0;
}

.brand__logo--lg {
  width: 24px;
  height: 24px;
}

.brand__name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* Main */
.main {
  flex: 1;
  display: flex;
}

.view {
  width: 100%;
  display: flex;
}

.view[hidden] {
  display: none;
}

/* Главная */
.home-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 0;
}

.home-panel {
  width: min(340px, 100%);
  padding: 24px;
  border-radius: 6px;
  background: var(--bg-window);
  border: 1px solid var(--border-card);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.home-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.home-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.015em;
}

/* Кнопки */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 16px;
  border-radius: 5px;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.14s ease, border-color 0.14s ease;
}

.btn--primary {
  width: 100%;
  background: var(--accent);
  color: #0b0b0e;
}

.btn--primary:hover {
  background: var(--accent-soft);
}

.btn--ghost {
  height: 32px;
  padding: 0 13px;
  font-size: 12.5px;
  background: var(--bg-card);
  border-color: var(--border-card);
  color: var(--text-primary);
}

.btn--ghost:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-active);
}

/* Продукты */
.products-wrap {
  padding: 40px 0;
}

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

.products-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.products-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 200px;
  padding: 24px;
  border-radius: 6px;
  background: var(--bg-window);
  border: 1px solid var(--border-card);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

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

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
  border-radius: 6px;
  background: var(--bg-window);
  border: 1px solid var(--border-card);
  transition: background-color 0.14s ease, border-color 0.14s ease;
}

.card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 2px;
  background: var(--accent);
  opacity: 0;
  transition: opacity 0.14s ease;
}

.card:hover {
  background: var(--bg-card);
  border-color: var(--border-active);
}

.card:hover::before {
  opacity: 1;
}

.card__title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}

.card__desc {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
  flex: 1;
}

.card__link {
  align-self: flex-start;
  margin-top: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent-soft);
}

.card__link:hover {
  color: var(--accent);
}

@media (max-width: 680px) {
  .products-grid {
    grid-template-columns: 1fr;
  }
}
