:root {
  color-scheme: dark;
  --bg: #0a0d0c;
  --surface: #111614;
  --line: rgba(255, 255, 255, 0.1);
  --text: #f3f6f1;
  --muted: #9ba69f;
  --accent: #b6f36b;
  --accent-dark: #17210f;
  --telegram: #2aabee;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--text); }
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; opacity: .16; background-image: radial-gradient(rgba(255,255,255,.4) .5px, transparent .5px); background-size: 7px 7px; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
.shell { width: min(1160px, calc(100% - 40px)); margin-inline: auto; }

.nav { height: 84px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 750; letter-spacing: -.02em; font-size: 19px; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; color: #0a0d0c; background: var(--accent); border-radius: 9px; font-weight: 900; }
.session-pill { padding: 8px 13px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 13px; }
.session-pill::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }

.hero { min-height: 680px; display: grid; grid-template-columns: 1.02fr .98fr; gap: 60px; align-items: center; padding-block: 76px 84px; }
.eyebrow { margin: 0 0 22px; color: var(--accent); text-transform: uppercase; letter-spacing: .15em; font-size: 12px; font-weight: 800; }
.hero-copy { position: relative; z-index: 5; }
h1 { max-width: 680px; margin: 0; font-size: clamp(48px, 6.4vw, 86px); line-height: .95; letter-spacing: -.065em; }
h1 span { color: var(--muted); }
.intro { max-width: 620px; margin: 30px 0 0; color: #b9c1bc; font-size: 18px; line-height: 1.65; }
.actions { position: relative; z-index: 10; display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.actions form { display: contents; }
.button { min-height: 52px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 0 20px; border: 0; border-radius: 13px; font-weight: 720; cursor: pointer; transition: transform .18s ease, filter .18s ease; }
.button:hover { transform: translateY(-2px); filter: brightness(1.08); }
.button-primary { color: #11160d; background: var(--accent); }
.button-telegram { color: white; background: #168dcc; }
.button-telegram svg { width: 20px; fill: currentColor; }
.privacy-note { max-width: 570px; margin-top: 17px; color: #737f77; font-size: 13px; line-height: 1.5; }

.account-card { max-width: 580px; margin-top: 34px; padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; gap: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.account-card p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.account-card .account-label { margin: 0 0 5px; color: var(--accent); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; }
.text-button { padding: 8px; color: #c3ccc6; background: none; border: 0; cursor: pointer; }
.text-button:hover { color: white; }

.admin-panel { margin-bottom: 72px; padding: 30px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.section-heading .eyebrow { margin-bottom: 10px; }
.section-heading h2 { margin: 0; font-size: 25px; letter-spacing: -.03em; }
.pending-users { display: grid; gap: 10px; }
.user-row { display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 16px; background: #0c100e; border: 1px solid var(--line); border-radius: 13px; }
.user-identity { min-width: 0; }
.user-identity strong, .user-identity span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-identity span { margin-top: 4px; color: var(--muted); font-size: 12px; }
.user-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.small-button { padding: 7px 10px; color: #dce5df; background: #1c2420; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; font-size: 12px; }
.small-button:hover { border-color: rgba(182,243,107,.45); }
.small-button.danger:hover { border-color: #cf6262; color: #ffaaaa; }
.empty-state { margin: 0; padding: 20px; color: var(--muted); text-align: center; border: 1px dashed var(--line); border-radius: 12px; }

.printer-scene { position: relative; min-height: 530px; display: grid; place-items: center; }
.glow { position: absolute; width: 410px; height: 410px; background: var(--accent); opacity: .09; filter: blur(75px); border-radius: 50%; }
.printer { position: relative; width: min(390px, 80vw); padding: 18px; background: linear-gradient(145deg, #252b28, #111513); border: 1px solid rgba(255,255,255,.16); border-radius: 28px; box-shadow: 0 45px 80px rgba(0,0,0,.55); transform: perspective(900px) rotateY(-5deg); }
.printer-top { height: 44px; display: flex; justify-content: space-between; align-items: start; }
.printer-top span { width: 80px; height: 6px; border-radius: 5px; background: #070908; }
.printer-top i { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 13px var(--accent); }
.printer-window { position: relative; height: 330px; overflow: hidden; background: linear-gradient(160deg, #080b0a, #141a17); border: 1px solid rgba(255,255,255,.12); border-radius: 11px; box-shadow: inset 0 0 50px #000; }
.printer-window::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 15%, rgba(255,255,255,.06) 40%, transparent 60%); }
.rail { position: absolute; top: 73px; left: 22px; right: 22px; height: 5px; background: #58605c; box-shadow: 0 3px 0 #080a09; }
.head { position: absolute; z-index: 2; top: 58px; left: 49%; width: 52px; height: 46px; background: #202824; border-radius: 5px 5px 12px 12px; box-shadow: 0 12px 25px #000; }
.head i { position: absolute; left: 22px; bottom: -22px; width: 8px; height: 23px; background: #8b938f; clip-path: polygon(25% 0, 75% 0, 100% 100%, 0 100%); }
.bed { position: absolute; bottom: 48px; left: 45px; right: 45px; height: 18px; background: #303933; border-top: 2px solid #87938c; transform: perspective(160px) rotateX(16deg); box-shadow: 0 20px 28px #000; }
.model { position: absolute; z-index: 2; bottom: 66px; left: calc(50% - 44px); width: 88px; height: 92px; background: repeating-linear-gradient(0deg, #9ddd58 0 2px, #afe96f 2px 4px); clip-path: polygon(22% 100%, 14% 45%, 30% 8%, 67% 0, 86% 42%, 78% 100%); filter: drop-shadow(0 0 16px rgba(182,243,107,.2)); }
.printer-base { height: 62px; display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.status-light { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.display { padding: 7px 14px; color: var(--accent); background: #080b09; border-radius: 6px; font: 11px ui-monospace, monospace; letter-spacing: .12em; }
.status-card { position: absolute; z-index: 3; padding: 14px 16px; color: #dce3de; background: rgba(18,23,21,.88); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 16px 45px rgba(0,0,0,.28); backdrop-filter: blur(14px); }
.temperature-card { top: 52px; right: -10px; display: grid; grid-template-columns: 1fr auto; min-width: 174px; }
.temperature-card span, .temperature-card small { color: var(--muted); font-size: 11px; }
.temperature-card small { grid-column: 1 / -1; margin-top: 6px; }
.secure-card { left: -18px; bottom: 50px; font-size: 12px; }
.lock { color: var(--accent); margin-right: 6px; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.features article { padding: 42px 32px; border-right: 1px solid var(--line); }
.features article:first-child { padding-left: 0; }
.features article:last-child { border-right: 0; }
.features span { color: var(--accent); font: 11px ui-monospace, monospace; }
.features h2 { margin: 22px 0 9px; font-size: 18px; }
.features p { margin: 0; color: var(--muted); line-height: 1.55; font-size: 14px; }
footer { min-height: 120px; display: flex; align-items: center; justify-content: space-between; color: #647068; font-size: 12px; }
.toast { position: fixed; z-index: 10; right: 20px; bottom: 20px; max-width: 360px; padding: 14px 17px; background: #252c28; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 20px 50px #000; cursor: pointer; animation: toast-life 4.2s both; }
@keyframes toast-life { 0% { opacity: 0; transform: translateY(8px); } 8%, 88% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(8px); } }

@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; padding-top: 55px; }
  .printer-scene { min-height: 500px; }
  .features { grid-template-columns: 1fr; }
  .features article, .features article:first-child { padding: 30px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .features article:last-child { border-bottom: 0; }
}

@media (max-width: 540px) {
  .shell { width: min(100% - 28px, 1160px); }
  .nav { height: 70px; }
  h1 { font-size: 48px; }
  .intro { font-size: 16px; }
  .actions { flex-direction: column; }
  .actions form { display: block; width: 100%; }
  .button { width: 100%; }
  .printer-scene { min-height: 430px; }
  .printer { width: 300px; }
  .printer-window { height: 260px; }
  .temperature-card { right: -4px; top: 30px; }
  .secure-card { left: -4px; bottom: 20px; }
  .admin-panel { padding: 20px; }
  .user-row { align-items: flex-start; flex-direction: column; }
  .user-actions { justify-content: flex-start; }
  footer { align-items: flex-start; flex-direction: column; justify-content: center; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
  .toast { animation-duration: .01ms; }
}
