/* Theme B "strict store": graphite, one amber accent, Onest type, glass only on floating layers,
   one quiet ambient glow. Loaded last; presentation only. */
@font-face{font-family:Onest;font-weight:400;font-display:swap;src:url(onest-cyrillic-400.woff2) format("woff2");unicode-range:U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:Onest;font-weight:500;font-display:swap;src:url(onest-cyrillic-500.woff2) format("woff2");unicode-range:U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:Onest;font-weight:600;font-display:swap;src:url(onest-cyrillic-600.woff2) format("woff2");unicode-range:U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:Onest;font-weight:700;font-display:swap;src:url(onest-cyrillic-700.woff2) format("woff2");unicode-range:U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:Onest;font-weight:400;font-display:swap;src:url(onest-latin-400.woff2) format("woff2");unicode-range:U+0000-00FF,U+2000-206F,U+20AC,U+2122,U+2190-2199,U+2212}
@font-face{font-family:Onest;font-weight:500;font-display:swap;src:url(onest-latin-500.woff2) format("woff2");unicode-range:U+0000-00FF,U+2000-206F,U+20AC,U+2122,U+2190-2199,U+2212}
@font-face{font-family:Onest;font-weight:600;font-display:swap;src:url(onest-latin-600.woff2) format("woff2");unicode-range:U+0000-00FF,U+2000-206F,U+20AC,U+2122,U+2190-2199,U+2212}
@font-face{font-family:Onest;font-weight:700;font-display:swap;src:url(onest-latin-700.woff2) format("woff2");unicode-range:U+0000-00FF,U+2000-206F,U+20AC,U+2122,U+2190-2199,U+2212}

body.rg-design{
  --bg:#0f1117;--surface:#161922;--soft:#1e2230;--ink:#eef0f6;--text:#c6cad6;--muted:#8e94a6;--line:#262b38;
  --accent:#8b7bff;--accent-ink:#ffffff;--accent-soft:#8b7bff24;--glass:rgba(17,19,27,.72);--radius:12px;
  font-family:Onest,"Golos Text",system-ui,sans-serif;font-feature-settings:"tnum" 1;background:var(--bg);
  -webkit-font-smoothing:antialiased;
}
body.rg-design :is(input,select,textarea,button){font-family:inherit}
body.rg-design h1{letter-spacing:-.02em;font-weight:700}
body.rg-design .eyebrow,body.rg-design .nav-caption{letter-spacing:.04em;text-transform:none;font-weight:500;color:var(--muted)}

/* Ambient particles canvas (ambient.js): behind everything, never catches clicks */
.rg-ambient{position:fixed;inset:0;z-index:0;pointer-events:none}
body.rg-design :is(.shell,.auth-layout){position:relative;z-index:1}
body.rg-design :is(.content,.auth-main){background:transparent}

/* Order tabs sat flush against the rounded panel edge; give them breathing room. */
body.rg-design .order-tabs{padding-inline:18px}

/* Hover lights the whole order card, including the status line and positions below the main row */
body.rg-design .order-card{transition:background-color .12s}
body.rg-design .order-card:hover{background:var(--soft)}
body.rg-design .order-card :is(.card-main,.quick-row):hover{background:transparent}

/* Status badges in the site palette (no orange): paid = violet (act now), waiting = calm grey-lilac,
   doing = blue, done = orchid. The compact queue repeats the colours with a stronger selector. */
body.rg-design :is(.badge.paid,.compact-shell .compact-queue .quick-row>.badge.paid){color:#bdb3ff;background:rgba(139,123,255,.17)}
body.rg-design :is(.badge.review,.badge.quote,.badge.awaiting,.badge.payment_check,.badge.clarify,.compact-shell .compact-queue .quick-row>:is(.badge.review,.badge.quote,.badge.awaiting,.badge.payment_check,.badge.clarify)){color:#b9bed6;background:#222636}
body.rg-design :is(.badge.doing,.compact-shell .compact-queue .quick-row>.badge.doing){color:#9cc3ec;background:rgba(110,160,230,.14)}
body.rg-design :is(.badge.done,.compact-shell .compact-queue .quick-row>.badge.done){color:#dbb4f5;background:rgba(196,140,240,.13)}
body.rg-design .badge>i{background:currentColor}
/* In order lists the status is plain coloured text with a dot, no tinted box behind it. */
body.rg-design .quick-row>.badge{background:transparent!important;padding:0}
body.rg-design .quick-status:not([hidden]){color:#b3a9f5}
/* Catalog: favourite star and "Хит" mark in the accent */
body.rg-design .storefront .sf-fav[aria-pressed="true"]{color:#a99dff}
body.rg-design .sf-hit{background:var(--accent);color:#fff}

/* Glass: floating layers only */
body.rg-design .topbar{position:sticky;top:0;z-index:30;background:var(--glass);backdrop-filter:blur(14px) saturate(1.2);-webkit-backdrop-filter:blur(14px) saturate(1.2);border-bottom-color:rgba(255,255,255,.06)}
body.rg-design :is(.sf-pickbar,#notifications-panel,.chat-panel,.notification-toast,#notification-toasts>*){background:var(--glass);backdrop-filter:blur(16px) saturate(1.2);-webkit-backdrop-filter:blur(16px) saturate(1.2);border-color:rgba(255,255,255,.08)}
body.rg-design dialog::backdrop{background:rgba(8,8,9,.6);backdrop-filter:blur(3px)}

/* Sidebar */
body.rg-design .sidebar{background:#0c0e13;border-right:1px solid var(--line)}
body.rg-design .nav-link{border-radius:9px;color:var(--text)}
body.rg-design .nav-link:hover{background:var(--soft);color:var(--ink)}
body.rg-design .nav-link.selected{background:var(--accent-soft);color:var(--ink);box-shadow:inset 2px 0 0 var(--accent)}

/* Buttons and fields */
body.rg-design .button{border-radius:10px;font-weight:600;transition:background-color .15s,border-color .15s,transform .1s}
body.rg-design .button:active{transform:translateY(1px)}
body.rg-design .button.primary,body.rg-design button.button:not(.secondary):not(.text-button):not(.danger){background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}
body.rg-design .button.primary:hover,body.rg-design button.button:not(.secondary):not(.text-button):not(.danger):hover{background:#9b8dff;border-color:#9b8dff}
/* Link-buttons ("Новый заказ" etc.) match the primary button */
body.rg-design a.button:not(.secondary):not(.text-button):not(.danger){background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}
body.rg-design a.button:not(.secondary):not(.text-button):not(.danger):hover{background:#9b8dff;border-color:#9b8dff}
/* Native file picker: styled button instead of the bare English system control */
body.rg-design input[type=file]{padding:6px;color:var(--muted);font-size:13px}
body.rg-design input[type=file]::file-selector-button{margin-right:12px;padding:8px 14px;border:1px solid #323848;border-radius:8px;background:var(--soft);color:var(--ink);font:600 13px Onest,sans-serif;cursor:pointer}
body.rg-design input[type=file]::file-selector-button:hover{border-color:var(--accent)}
/* Small labels were all caps; sentence case reads calmer */
body.rg-design :is(.eyebrow,.balance-caption,.stat-label,.panel-caption,small.caps){text-transform:none;letter-spacing:.01em}
body.rg-design .button.secondary{background:transparent;border-color:#323848;color:var(--ink)}
body.rg-design .button.secondary:hover{background:var(--soft);border-color:#424a5e}
body.rg-design :is(input:not([type=checkbox]):not([type=radio]):not([type=range]),select,textarea){background:#12151d;border-color:#2c3242;border-radius:10px;color:var(--ink)}
body.rg-design a{color:#a99dff}
body.rg-design :is(input,select,textarea):focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}
body.rg-design :focus-visible{outline:2px solid var(--accent);outline-offset:2px}
body.rg-design a{color:var(--accent)}
body.rg-design :is(a.brand,.nav-link,.profile-account){color:var(--ink)}

/* Panels: fewer boxes, softer edges */
body.rg-design :is(.panel,.summary-card){background:var(--surface);border-color:var(--line);border-radius:14px}

/* Auth screen */
body.rg-design .auth-art{background:#0b0d12;color:var(--text)}
body.rg-design .auth-art::after{color:rgba(139,123,255,.07)}
body.rg-design .auth-copy h1{font-size:clamp(34px,4vw,52px);line-height:1.05;color:var(--ink)}
body.rg-design .auth-main{background:var(--bg)}
body.rg-design .auth-box h1{font-size:30px}

/* Action animations (motion-b.js) */
@keyframes rg-flash{0%{background-color:rgba(139,123,255,.12)}100%{background-color:transparent}}
@keyframes rg-pulse{0%{box-shadow:0 0 0 0 rgba(139,123,255,.55)}100%{box-shadow:0 0 0 10px rgba(139,123,255,0)}}
@keyframes rg-shimmer{0%{background-position:-200% 0}100%{background-position:200% 0}}
body.rg-design .rg-new-row{animation:rg-flash 1.6s ease-out 1}
/* Older themes stacked three state-change flashes (one in the legacy green); keep one short violet one. */
body.rg-design .order-flash{animation:rg-flash .7s ease-out 1}
body.rg-design .order-flash::after{content:none;animation:none}
/* Only the status badge pulses, once. A wider selector also ringed the "Заказ взят в работу." line. */
body.rg-design .rg-changed-row .card-main>.badge{animation:rg-pulse .9s ease-out 1;border-radius:999px}
body.rg-design .rg-rolling{color:#b9afff;transition:color .3s}
body.rg-design .rg-skeleton{border:1px solid var(--line);border-radius:10px;overflow:hidden;padding-bottom:12px;background:var(--surface)}
body.rg-design .rg-skeleton>span{display:block;margin:10px 11px 0;height:10px;border-radius:5px;
  background:linear-gradient(90deg,#1c2030 25%,#272c3f 50%,#1c2030 75%);background-size:200% 100%;animation:rg-shimmer 1.4s linear infinite}
body.rg-design .rg-skeleton>.rg-sk-art{margin:0;height:auto;aspect-ratio:1.25;border-radius:0}
body.rg-design .rg-skeleton>.short{width:55%}
body.rg-design .rg-motion-toggle{display:flex;align-items:center;gap:8px;margin-top:10px;font-size:13px;color:var(--text)}
body.rg-design.rg-motion-min *{animation:none!important;transition:none!important}

/* Toasts sat over page headings at the top; move them to the bottom-right above the chat button */
body.rg-design #notification-toasts{top:auto!important;left:auto!important;right:20px!important;bottom:84px!important;width:min(360px,calc(100vw - 32px))!important;
  display:flex;flex-direction:column-reverse;gap:8px}
@media (max-width:760px){body.rg-design #notification-toasts{right:12px!important;bottom:calc(150px + env(safe-area-inset-bottom))!important}}

@media (prefers-reduced-motion:reduce){body.rg-design *{animation:none!important;transition:none!important}}

/* Owner: copy decorations for the supplier */
body.rg-design .supplier-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px 14px;margin:14px 0}
body.rg-design .supplier-hint{font-size:13px}
body.rg-design .button.small{padding:6px 12px;font-size:13px}
/* Technical works: page for resellers, reminder and switch for the owner */
body.rg-design .maintenance-box{max-width:440px}
body.rg-design .maintenance-box h1{margin:6px 0 14px}
body.rg-design .maintenance-text{font-size:15px;line-height:1.65;color:var(--ink);margin:0 0 14px;white-space:pre-wrap}
body.rg-design .maintenance-banner{border:1px solid #f0b45a66;background:#f0b45a14;color:#f3c477;border-radius:9px;padding:12px 16px;font-size:13px;line-height:1.6;margin:0 0 18px}
body.rg-design .maintenance-banner a{color:#f3c477;text-decoration:underline;margin-left:4px}
body.rg-design .maintenance-state{margin-left:auto;font-size:12px;font-weight:500;color:var(--muted)}
body.rg-design .maintenance-state.on{color:#f3c477}
body.rg-design .maintenance-settings[open]{border-color:#f0b45a55}
body.rg-design .maintenance-settings .maintenance-message{margin-bottom:12px}
/* Supplier purchase bot (owner) */
body.rg-design .supplier-state{margin-left:auto;font-size:12px;font-weight:500;color:var(--muted)}
body.rg-design .supplier-state.on{color:#a99bff}
body.rg-design .supplier-state.stopped{color:#ff9b93}
body.rg-design .supplier-stop{border:1px solid #e0747066;background:#e0747014;color:#ffb4ad;border-radius:9px;padding:12px 16px;font-size:13px;line-height:1.6;margin:0 0 12px}
body.rg-design .supplier-key{color:#f3c477;font-size:13px}
body.rg-design .supplier-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0 14px}
body.rg-design .supplier-settings h3{font-size:13px;margin:18px 0 6px;color:var(--muted);font-weight:500}
body.rg-design .supplier-list{margin:0;padding-left:18px;font-size:13px;line-height:1.7}
body.rg-design .supplier-list small{color:var(--muted)}
@media (max-width:720px){body.rg-design .supplier-grid{grid-template-columns:1fr 1fr}}
/* Batch delivery (owner) */
body.rg-design .batch-table{width:100%;border-collapse:collapse;font-size:13px}
body.rg-design .batch-table th,body.rg-design .batch-table td{padding:9px 10px;border-bottom:1px solid #2a2d38;text-align:left;vertical-align:middle}
body.rg-design .batch-table th{color:var(--muted);font-weight:500}
body.rg-design .batch-link{font-family:ui-monospace,monospace;color:#c8cad3;white-space:nowrap}
body.rg-design .batch-ok{color:#8fd6a8}
body.rg-design .batch-bad{color:#ffb4ad}
body.rg-design .batch-preview h2{font-size:15px;margin:0 0 12px}
body.rg-design .batch-preview .button{margin-top:14px}
body.rg-design .compact-heading .compact-batch{margin-right:8px}
body.rg-design .supplier-verbose{display:flex;gap:9px;align-items:flex-start;font-weight:400;color:var(--muted);margin:2px 0 14px}
