:root {
  --ink: #eefcf6;
  --muted: #91aaa1;
  --paper: #081713;
  --panel: #0d201a;
  --line: rgba(184, 229, 210, .16);
  --green: #25d366;
  --green-soft: #b8f7cf;
  --amber: #ffcf70;
  --red: #ff857a;
}
* { box-sizing: border-box; }
html { background: var(--paper); color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
body { margin: 0; min-width: 320px; background: radial-gradient(circle at 76% 7%, rgba(37, 211, 102, .11), transparent 27rem), var(--paper); }
button { font: inherit; }
.topbar { min-height: 76px; padding: 0 clamp(20px, 4vw, 64px); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { color: var(--ink); display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 780; letter-spacing: -.02em; }
.brand-mark { width: 35px; height: 35px; display: grid; place-items: center; color: #07140f; background: var(--green); border-radius: 10px 10px 10px 3px; }
.system-state { font-size: .875rem; color: var(--muted); display: flex; align-items: center; gap: 9px; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px rgba(37, 211, 102, .1); }
main { width: min(1440px, 100%); margin: auto; padding: clamp(30px, 5vw, 70px) clamp(18px, 4vw, 64px) 40px; }
.intro { display: grid; grid-template-columns: 1.25fr .75fr; align-items: end; gap: 40px; margin-bottom: 44px; }
.eyebrow { color: var(--green); font-size: .75rem; letter-spacing: .19em; font-weight: 800; margin: 0 0 14px; }
h1 { font-size: clamp(2.7rem, 6vw, 6.2rem); line-height: .93; letter-spacing: -.072em; margin: 0; max-width: 900px; font-weight: 760; }
.intro-copy { color: var(--muted); font-size: 1rem; line-height: 1.7; max-width: 450px; margin: 0 0 8px; }
.workspace { display: grid; grid-template-columns: minmax(220px, .85fr) minmax(330px, 1.2fr) minmax(250px, .9fr); border: 1px solid var(--line); border-radius: 24px; overflow: hidden; background: rgba(10, 28, 22, .78); box-shadow: 0 40px 100px rgba(0, 0, 0, .28); }
.catalog-panel, .automation-panel { padding: clamp(20px, 2.4vw, 34px); }
.catalog-panel { border-right: 1px solid var(--line); }
.automation-panel { border-left: 1px solid var(--line); }
.panel-heading { display: flex; gap: 12px; align-items: center; margin-bottom: 26px; }
.panel-heading > span { color: var(--green); font-size: .75rem; font-weight: 800; }
.panel-heading h2 { font-size: .9rem; text-transform: uppercase; letter-spacing: .1em; margin: 0; }
.product-list { display: grid; gap: 10px; }
.product-card { width: 100%; color: var(--ink); border: 1px solid var(--line); background: rgba(255,255,255,.015); padding: 15px; border-radius: 14px; display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 10px; text-align: left; cursor: pointer; transition: border-color .2s, transform .2s, background .2s; }
.product-card:hover { transform: translateY(-2px); border-color: rgba(37,211,102,.5); }
.product-card.selected { border-color: var(--green); background: rgba(37,211,102,.07); }
.product-card:focus-visible, .primary-action:focus-visible, .inline-action:focus-visible { outline: 3px solid rgba(37, 211, 102, .35); outline-offset: 3px; }
.product-index { width: 26px; height: 26px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); font-size: .75rem; }
.product-card span:nth-child(2) { display: grid; gap: 4px; }
.product-card strong { font-size: .91rem; line-height: 1.2; }
.product-card small { color: var(--muted); font-size: .74rem; line-height: 1.35; }
.product-card b { font-size: .92rem; color: var(--green-soft); }
.catalog-note { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.catalog-note span { color: var(--green); font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 800; }
.catalog-note p { color: var(--muted); margin: 8px 0 0; font-size: .82rem; line-height: 1.55; }
.phone-panel { padding: 24px; background: linear-gradient(135deg, rgba(37, 211, 102, .045), transparent); display: grid; place-items: center; }
.phone { width: min(100%, 430px); min-height: 590px; border: 1px solid rgba(255,255,255,.17); border-radius: 28px; overflow: hidden; background: #e8e5df; color: #14241e; box-shadow: 0 24px 60px rgba(0,0,0,.32); display: grid; grid-template-rows: auto 1fr auto; }
.phone-header { background: #075e54; color: white; padding: 15px 17px; display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 11px; }
.avatar { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: #d9ffea; color: #075e54; font-weight: 850; font-size: .75rem; }
.phone-header div:nth-child(2) { display: grid; gap: 2px; }
.phone-header strong { font-size: .9rem; }
.phone-header small { font-size: .72rem; opacity: .78; }
.lock { opacity: .7; font-size: 1.2rem; }
.chat { padding: 18px 15px; background-color: #efeae2; background-image: radial-gradient(rgba(7,94,84,.065) .9px, transparent .9px); background-size: 17px 17px; overflow-y: auto; max-height: 505px; }
.day-label { color: #60746c; background: rgba(255,255,255,.7); width: fit-content; margin: 0 auto 14px; padding: 5px 9px; border-radius: 7px; font-size: .7rem; }
.message { max-width: 86%; padding: 9px 10px 6px; border-radius: 9px; margin: 7px 0; box-shadow: 0 1px 1px rgba(0,0,0,.09); animation: rise .28s ease-out both; }
.message p { margin: 0; font-size: .86rem; line-height: 1.43; }
.message span { display: block; text-align: right; font-size: .63rem; color: #718078; margin-top: 3px; }
.incoming { background: white; border-top-left-radius: 2px; }
.outgoing { background: #d9fdd3; margin-left: auto; border-top-right-radius: 2px; }
.message.system { background: #fff4c9; margin-inline: auto; text-align: center; color: #5f531e; }
.message a { color: #006b57; font-weight: 750; }
.composer { background: #f7f5f2; border-top: 1px solid #d9d4cd; padding: 12px; }
.primary-action { width: 100%; border: 0; border-radius: 11px; background: #075e54; color: white; min-height: 46px; font-weight: 760; cursor: pointer; }
.primary-action:hover { background: #064d45; }
.primary-action:disabled { cursor: not-allowed; opacity: .65; }
.inline-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.inline-action { border: 1px solid #8bb5a9; background: #fff; color: #075e54; padding: 9px 8px; border-radius: 8px; font-weight: 720; font-size: .77rem; cursor: pointer; }
.inline-action.success { background: #075e54; color: white; }
.inline-action.failure { color: #9b3128; border-color: #e6a29b; }
.metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-bottom: 25px; }
.metrics > div { background: rgba(255,255,255,.025); border: 1px solid var(--line); border-radius: 13px; padding: 14px; display: grid; gap: 5px; }
.metrics strong { font-size: 1.18rem; }
.metrics small { color: var(--muted); font-size: .72rem; }
.steps { list-style: none; margin: 0; padding: 0; }
.steps li { min-height: 66px; display: grid; grid-template-columns: 17px 1fr; gap: 12px; position: relative; }
.steps li:not(:last-child)::after { content: ""; position: absolute; left: 5px; top: 18px; bottom: -2px; width: 1px; background: var(--line); }
.steps i { width: 11px; height: 11px; margin-top: 4px; border-radius: 50%; border: 2px solid #577068; background: var(--panel); z-index: 1; }
.steps div { display: grid; align-content: start; gap: 5px; }
.steps strong { font-size: .86rem; }
.steps small { color: var(--muted); line-height: 1.4; }
.steps li.active i { border-color: var(--green); box-shadow: 0 0 0 5px rgba(37,211,102,.08); }
.steps li.done i { background: var(--green); border-color: var(--green); }
.steps li.done strong { color: var(--green-soft); }
.order-card { margin-top: 10px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.order-card > div { display: flex; justify-content: space-between; gap: 12px; padding: 11px 13px; }
.order-card > div + div { border-top: 1px solid var(--line); }
.order-card span { color: var(--muted); font-size: .68rem; letter-spacing: .08em; }
.order-card strong { font-size: .73rem; text-align: right; }
.status-success { color: var(--green); }
.status-failed { color: var(--red); }
.status-pending { color: var(--amber); }
.status-neutral { color: var(--muted); }
footer { width: min(1440px, 100%); margin: auto; padding: 0 clamp(18px, 4vw, 64px) 34px; display: flex; justify-content: space-between; color: var(--muted); font-size: .75rem; }
@keyframes rise { from { opacity: 0; transform: translateY(5px); } }
@media (max-width: 1050px) {
  .workspace { grid-template-columns: 250px 1fr; }
  .automation-panel { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: .55fr 1fr .7fr; gap: 26px; }
  .automation-panel .panel-heading { grid-column: 1 / -1; margin-bottom: 0; }
  .order-card { align-self: start; margin-top: 0; }
}
@media (max-width: 760px) {
  .topbar { min-height: 66px; }
  .system-state { font-size: .75rem; }
  .intro { grid-template-columns: 1fr; gap: 20px; margin-bottom: 28px; }
  h1 { font-size: clamp(2.55rem, 13vw, 4.5rem); }
  .workspace { grid-template-columns: 1fr; }
  .catalog-panel { border-right: 0; border-bottom: 1px solid var(--line); }
  .phone-panel { padding: 18px 10px; }
  .phone { min-height: 560px; border-radius: 22px; }
  .automation-panel { grid-column: auto; grid-template-columns: 1fr; border-top: 1px solid var(--line); gap: 20px; }
  footer { display: grid; gap: 3px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; } }
