:root {
  --bg: #080406;
  --panel: #0e0e14;
  --panel-elev: #141620;
  --line: #343a47;
  --line-strong: #4c5362;
  --text: #fcfcfc;
  --muted: #b0b6c1;
  --brand: #cc051c;
  --brand-2: #d7804d;
  --gold: #f5b700;
  --danger: #ff4f4f;
  --ok: #1cc15f;
  --shadow: 0 14px 40px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: "Inter", "IBM Plex Sans", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    linear-gradient(130deg, rgba(8, 4, 6, 0.95), rgba(14, 14, 20, 0.92)),
    radial-gradient(140% 100% at 88% 8%, rgba(204, 5, 28, 0.14), transparent 55%),
    radial-gradient(90% 70% at 8% 100%, rgba(215, 128, 77, 0.12), transparent 65%),
    url("../img/map.png") center/cover no-repeat fixed;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(204, 5, 28, 0.38);
  background: rgba(14, 14, 20, 0.9);
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.34);
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  flex-wrap: wrap;
}

.nav a,
.btn {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(30, 32, 40, 0.92), rgba(19, 20, 28, 0.95));
  color: var(--text);
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
  transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.nav a:hover,
.btn:hover {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 1px rgba(204, 5, 28, 0.2) inset;
}

.nav a.active {
  border-color: var(--brand);
  color: #fff;
  background: linear-gradient(180deg, rgba(204, 5, 28, 0.28), rgba(204, 5, 28, 0.12));
  box-shadow: 0 0 0 1px rgba(204, 5, 28, 0.32) inset;
}

.lang-wrap {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

select,
input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 10px;
  font: inherit;
  color: var(--text);
  background: rgba(20, 22, 32, 0.92);
}

select:focus,
input:focus,
textarea:focus,
.btn:focus-visible,
.nav a:focus-visible {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(204, 5, 28, 0.2);
}

.shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 330px;
  gap: 12px;
  padding: 12px;
  min-height: calc(100vh - 68px);
}

.panel {
  background:
    linear-gradient(165deg, rgba(19, 20, 28, 0.97), rgba(14, 14, 20, 0.98)),
    linear-gradient(180deg, rgba(204, 5, 28, 0.08), transparent 48%);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  box-shadow: var(--shadow);
}

.left-panel,
.right-panel {
  position: sticky;
  top: 74px;
  height: calc(100vh - 86px);
  overflow: auto;
}

.center-panel {
  min-height: 70vh;
}

.user-head {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(125deg, var(--brand), #8c0012 64%, #54000c);
  color: #fff;
  border: 1px solid rgba(245, 183, 0, 0.24);
  font-family: "IBM Plex Sans Condensed", "Inter", sans-serif;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.kv {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
  font-size: 13px;
  margin-bottom: 8px;
}

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

.stack {
  display: grid;
  gap: 8px;
}

.btn.primary {
  background: linear-gradient(125deg, var(--brand), #8f0013);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.08);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-family: "IBM Plex Sans Condensed", "Inter", sans-serif;
  font-weight: 700;
}

.btn.danger {
  background: rgba(204, 5, 28, 0.18);
  color: #ffd6db;
  border-color: rgba(204, 5, 28, 0.45);
}

.btn.block {
  width: 100%;
}

.card {
  border: 1px solid rgba(52, 58, 71, 0.95);
  border-radius: 12px;
  padding: 10px;
  background: linear-gradient(180deg, rgba(24, 26, 36, 0.93), rgba(16, 17, 24, 0.95));
}

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

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

.prod-img {
  height: 120px;
  border-radius: 10px;
  background:
    radial-gradient(circle at 80% 12%, rgba(204, 5, 28, 0.25), transparent 52%),
    radial-gradient(circle at 16% 100%, rgba(215, 128, 77, 0.2), transparent 60%),
    linear-gradient(165deg, #232734, #141821);
  border: 1px solid var(--line);
  margin-bottom: 8px;
}

.center-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 14px 0;
}

.monitor {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(20, 22, 32, 0.97), rgba(11, 12, 18, 0.96));
  padding: 10px;
}

canvas#monitorCanvas {
  width: 100%;
  height: 240px;
  border-radius: 10px;
  border: 1px solid rgba(245, 183, 0, 0.2);
  background:
    linear-gradient(135deg, rgba(245, 183, 0, 0.07), transparent 55%),
    linear-gradient(155deg, rgba(204, 5, 28, 0.14), rgba(10, 10, 14, 0.96));
}

.cart-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 6px;
  align-items: center;
  margin-bottom: 8px;
}

.qty {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.promo {
  margin-top: 14px;
  padding: 12px;
  border-radius: 12px;
  color: #fff;
  border: 1px solid rgba(245, 183, 0, 0.32);
  background:
    linear-gradient(112deg, rgba(204, 5, 28, 0.94), rgba(126, 0, 18, 0.94) 58%, rgba(215, 128, 77, 0.8)),
    linear-gradient(180deg, rgba(8, 4, 6, 0.2), transparent);
}

.track-line {
  display: flex;
  gap: 10px;
  align-items: center;
  overflow: auto;
  padding-bottom: 4px;
}

.track-dot {
  min-width: 14px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #212630;
  border: 2px solid #4c5362;
}

.track-dot.active {
  background: var(--brand);
  border-color: #ff3a54;
}

.track-dot.done {
  background: var(--ok);
  border-color: #12a24d;
}

.track-sep {
  width: 34px;
  height: 2px;
  background: #4c5362;
}

h1,
h2,
h3,
h4,
.nav a,
.btn.primary {
  font-family: "IBM Plex Sans Condensed", "Inter", sans-serif;
}

code,
pre,
.mono {
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

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

  .left-panel,
  .right-panel {
    position: static;
    height: auto;
  }

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

@media (max-width: 700px) {
  .grid-3,
  .grid-2,
  .center-actions {
    grid-template-columns: 1fr;
  }
}
