:root {
  --ink: #101828;
  --muted: #667085;
  --line: #e4e7ec;
  --paper: #f7f8f8;
  --white: #fff;
  --accent: #22b8cf;
  --accent-strong: #0284c7;
  --green: #12b76a;
  --amber: #f79009;
  --red: #f04438;
  --violet: #7c3aed;
  --shadow: 0 18px 55px rgba(16, 24, 40, .08);
  --weight-label: 620;
  --weight-title: 570;
  --weight-action: 610;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
}
strong, b { font-weight: var(--weight-title); }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
.icon { flex: 0 0 auto; }

.login-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 18%, rgba(34, 184, 207, .18), transparent 32%),
    linear-gradient(135deg, #f7f8f8 0%, #fff 48%, #eef8fb 100%);
}
.login-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 430px;
  gap: 42px;
  min-height: 100vh;
  align-items: center;
  padding: clamp(28px, 6vw, 76px);
}
.login-hero h1 {
  max-width: 760px;
  margin: 58px 0 20px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: .96;
  letter-spacing: 0;
}
.login-hero p {
  max-width: 690px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.75;
}
.login-points {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}
.login-points span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.76);
  padding: 12px 14px;
  font-size: 14px;
  font-weight: var(--weight-label);
}
.login-card {
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 28px;
}
.login-card h2 { margin: 8px 0 10px; font-size: 30px; }
.login-card p { color: var(--muted); line-height: 1.6; }
.demo-badge {
  display: inline-flex;
  color: var(--accent-strong) !important;
  font-weight: var(--weight-label);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 12px;
}
.login-actions {
  display: grid;
  gap: 12px;
  margin: 26px 0;
}
.login-actions button, .primary-button, .ghost-button, .small-button, .icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 42px;
  border: 0;
  cursor: pointer;
  font-weight: var(--weight-action);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}
.login-actions button, .primary-button {
  background: var(--ink);
  color: var(--white);
  padding: 0 16px;
}
.login-actions button:nth-child(2), .ghost-button {
  background: var(--white);
  color: var(--ink);
  border: 1px solid #d0d5dd;
  padding: 0 16px;
}
.login-actions button:hover, .primary-button:hover, .ghost-button:hover, .small-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(16, 24, 40, .1);
}
.mini-table {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.mini-table div {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #eef1f4;
  font-size: 13px;
}
.mini-table span { color: var(--muted); }

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.brand.large { align-items: center; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  background: var(--ink);
  color: #fff;
}
.brand strong { display: block; font-size: 16px; }
.brand small { display: block; color: var(--muted); margin-top: 3px; }
.side-nav {
  display: grid;
  gap: 6px;
}
.side-nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 42px;
  padding: 0 12px;
  color: #344054;
  font-size: 14px;
  font-weight: var(--weight-action);
}
.side-nav a:hover, .side-nav a.active {
  background: #eef8fb;
  color: var(--accent-strong);
}
.demo-note {
  margin-top: auto;
  background: #f9fafb;
  border: 1px solid var(--line);
  padding: 14px;
}
.demo-note p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.main {
  min-width: 0;
  padding: 26px;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}
.topbar p {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: var(--weight-label);
}
.topbar h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: 0;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.user-chip {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: var(--weight-title);
}
.user-chip small { color: var(--muted); font-weight: var(--weight-label); }
.icon-button {
  width: 42px;
  height: 42px;
  background: #fff;
  border: 1px solid var(--line);
}
.mobile-toggle { display: none; }

.hero-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  margin-bottom: 22px;
  padding: clamp(24px, 4vw, 42px);
  background:
    linear-gradient(90deg, rgba(34,184,207,.16), transparent 42%),
    #fff;
  border: 1px solid var(--line);
}
.hero-strip.buyer {
  background:
    linear-gradient(90deg, rgba(18,183,106,.13), transparent 46%),
    #fff;
}
.hero-strip h2, .offer-band h2 {
  margin: 0;
  max-width: 860px;
  font-size: clamp(30px, 5vw, 56px);
  line-height: 1.02;
  letter-spacing: 0;
}
.hero-strip p, .offer-band p {
  max-width: 720px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}
.stats-grid article {
  background: #fff;
  border: 1px solid var(--line);
  padding: 18px;
}
.stats-grid span, .stats-grid small {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: var(--weight-label);
}
.stats-grid strong {
  display: block;
  margin: 12px 0 7px;
  font-size: 30px;
}
.grid-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}
.panel, .product-card {
  background: #fff;
  border: 1px solid var(--line);
  padding: 20px;
}
.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}
.panel-title h3 {
  margin: 0;
  font-size: 20px;
}
.panel p {
  color: var(--muted);
  line-height: 1.65;
}
.feed {
  display: grid;
  gap: 12px;
}
.feed article {
  border-top: 1px solid #eef1f4;
  padding-top: 12px;
}
.feed strong { display: block; margin-top: 8px; }
.feed p { margin: 5px 0 0; font-size: 14px; }
.action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.action-grid a {
  min-height: 78px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  padding: 14px;
  font-weight: var(--weight-action);
}
.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.searchbox {
  flex: 1;
  min-width: 220px;
  height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--line);
  padding: 0 12px;
}
.searchbox input, .panel input, .panel textarea {
  width: 100%;
  border: 1px solid #d0d5dd;
  min-height: 42px;
  padding: 0 12px;
  outline: none;
}
.searchbox input {
  border: 0;
  padding: 0;
}
.panel textarea {
  min-height: 110px;
  padding: 10px 12px;
  resize: vertical;
}
.panel label {
  display: grid;
  gap: 8px;
  margin-bottom: 13px;
  font-size: 13px;
  font-weight: var(--weight-label);
  color: #344054;
}
.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
  font-size: 14px;
}
th, td {
  padding: 13px 12px;
  border-bottom: 1px solid #eef1f4;
  text-align: left;
}
th {
  color: var(--muted);
  background: #f9fafb;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.status {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 650;
  text-transform: uppercase;
}
.status.good { background: #ecfdf3; color: #027a48; }
.status.warn { background: #fffaeb; color: #b54708; }
.status.bad { background: #fef3f2; color: #b42318; }
.status.info { background: #eef8fb; color: #026aa2; }
.status.neutral { background: #f2f4f7; color: #344054; }
.soft-count {
  color: var(--muted);
  font-size: 13px;
  font-weight: var(--weight-label);
}
.small-button {
  min-height: 34px;
  background: #fff;
  border: 1px solid #d0d5dd;
  padding: 0 12px;
  color: #344054;
}
.cards-list {
  display: grid;
  gap: 12px;
}
.row-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 14px;
  border: 1px solid #eef1f4;
  padding: 14px;
}
.row-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.product-card {
  display: grid;
  gap: 13px;
  min-height: 250px;
}
.product-art {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  background: #eef8fb;
  color: var(--accent-strong);
}
.product-card h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.25;
}
.product-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}
.product-card div:last-of-type {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
}
.product-card small { color: var(--muted); font-weight: var(--weight-label); }
.product-card.offer {
  background: linear-gradient(180deg, #fff, #f4fbfd);
}
.inventory-list {
  display: grid;
  gap: 14px;
}
.inventory-list article {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 70px;
  gap: 16px;
  align-items: center;
}
.inventory-list span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}
.meter {
  height: 10px;
  background: #eef1f4;
  overflow: hidden;
}
.meter span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--green));
}
.check-list {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}
.check-list li {
  border-top: 1px solid #eef1f4;
  padding-top: 10px;
  color: #344054;
  font-weight: var(--weight-label);
}
.offer-band {
  margin-bottom: 18px;
  padding: 36px;
  background: var(--ink);
  color: #fff;
}
.offer-band p { color: #d0d5dd; }
.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 40;
  background: var(--ink);
  color: #fff;
  padding: 13px 16px;
  box-shadow: 0 18px 40px rgba(16,24,40,.2);
  font-size: 14px;
  font-weight: var(--weight-action);
}

@media (max-width: 1080px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 30;
    width: 280px;
    transform: translateX(-100%);
    transition: transform .2s ease;
  }
  body.nav-open .sidebar { transform: translateX(0); }
  .mobile-toggle {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    background: #fff;
  }
  .stats-grid, .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .login-layout { grid-template-columns: 1fr; padding: 22px; }
  .login-hero h1 { margin-top: 38px; }
  .main { padding: 18px; }
  .topbar, .toolbar, .hero-strip {
    align-items: stretch;
    flex-direction: column;
    display: flex;
  }
  .top-actions { flex-wrap: wrap; }
  .stats-grid, .grid-two, .product-grid { grid-template-columns: 1fr; }
  .row-card {
    grid-template-columns: 1fr;
    align-items: start;
  }
  .inventory-list article {
    grid-template-columns: 1fr;
  }
  .action-grid { grid-template-columns: 1fr; }
}
