﻿/* ============================================================
   CSS CUSTOM PROPERTIES
   ============================================================ */

:root {
  /* light theme - monochrome product surfaces */
  --c-bg: #f4f4f5;
  --c-bg-grad: none;
  --c-surface: #ffffff;
  --c-surface-2: #fafafa;
  --c-surface-3: #e4e4e7;
  --c-glass: #ffffff;
  --c-glass-border: rgba(24, 24, 27, 0.10);
  --c-border: rgba(24, 24, 27, 0.10);
  --c-border-strong: rgba(24, 24, 27, 0.18);
  --c-text-1: #18181b;
  --c-text-2: #52525b;
  --c-text-3: #71717a;
  --c-accent: #18181b;
  --c-accent-2: #3f3f46;
  --c-accent-soft: rgba(24, 24, 27, 0.08);
  --c-accent-grad: #18181b;
  --c-accent-glow: none;
  --c-green: #16b364;
  --c-green-soft: rgba(22, 179, 100, 0.12);
  --c-green-text: #0f8a4c;
  --c-red: #f0384a;
  --c-red-soft: rgba(240, 56, 74, 0.1);
  --c-red-text: #cf2638;
  --c-orange: #f59e0b;
  --c-orange-soft: rgba(245, 158, 11, 0.12);
  --c-orange-text: #b45309;
  --c-shadow-sm: 0 1px 3px rgba(20, 12, 50, 0.07), 0 1px 2px rgba(20, 12, 50, 0.04);
  --c-shadow-md: 0 8px 28px rgba(20, 12, 50, 0.08), 0 2px 6px rgba(20, 12, 50, 0.04);
  --c-shadow-lg: 0 24px 70px rgba(20, 12, 50, 0.14), 0 8px 24px rgba(20, 12, 50, 0.06);
  --c-blur: 18px;
  --c-scroll-thumb: rgba(82, 82, 91, 0.42);
  --c-scroll-thumb-hover: rgba(39, 39, 42, 0.70);
}

[data-theme="dark"] {
  /* dark theme - the landing page palette */
  --c-bg: #09090b;
  --c-bg-grad: none;
  --c-surface: #18181b;
  --c-surface-2: #27272a;
  --c-surface-3: #3f3f46;
  --c-glass: #111113;
  --c-glass-border: rgba(255, 255, 255, 0.08);
  --c-border: rgba(255, 255, 255, 0.08);
  --c-border-strong: rgba(255, 255, 255, 0.16);
  --c-text-1: #fafafa;
  --c-text-2: #a1a1aa;
  --c-text-3: #71717a;
  --c-accent: #fafafa;
  --c-accent-2: #d4d4d8;
  --c-accent-soft: rgba(255, 255, 255, 0.08);
  --c-accent-grad: #fafafa;
  --c-accent-glow: none;
  --c-green: #34d27b;
  --c-green-soft: rgba(52, 210, 123, 0.14);
  --c-green-text: #4ade80;
  --c-red: #ff5a6a;
  --c-red-soft: rgba(255, 90, 106, 0.14);
  --c-red-text: #ff7585;
  --c-orange: #ffb23e;
  --c-orange-soft: rgba(255, 178, 62, 0.14);
  --c-orange-text: #ffc266;
  --c-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.5);
  --c-shadow-md: 0 8px 30px rgba(0, 0, 0, 0.55);
  --c-shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.7);
  --c-blur: 22px;
  --c-scroll-thumb: rgba(161, 161, 170, 0.38);
  --c-scroll-thumb-hover: rgba(212, 212, 216, 0.62);
}

/* ============================================================
   RESET & BASE
   ============================================================ */

* {
  box-sizing: border-box;
  margin: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--c-scroll-thumb) transparent;
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  min-height: 36px;
  border: 3px solid transparent;
  border-radius: 999px;
  background: var(--c-scroll-thumb);
  background-clip: padding-box;
}

*::-webkit-scrollbar-thumb:hover {
  background: var(--c-scroll-thumb-hover);
  background-clip: padding-box;
}

*::-webkit-scrollbar-corner {
  background: transparent;
}

html {
  overflow-y: scroll;
  scrollbar-gutter: stable;
}

body {
  background-color: var(--c-bg);
  background-image: var(--c-bg-grad);
  background-attachment: fixed;
  background-repeat: no-repeat;
  color: var(--c-text-1);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "Inter", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background-color 200ms ease, color 200ms ease, border-color 200ms ease;
}

/* ============================================================
   APP SHELL
   ============================================================ */

.app-shell {
  max-width: 1880px;
  margin: 0 auto;
  padding: 28px 40px;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
    padding: 16px;
    gap: 16px;
  }
}

/* Store and managed cloud services */
.cloud-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.cloud-page-head h2 {
  margin: 3px 0 5px;
  color: var(--c-text-1);
  font-size: 24px;
  line-height: 1.2;
}

.cloud-wallet {
  display: grid;
  grid-template-columns: 34px auto;
  column-gap: 10px;
  align-items: center;
  min-width: 164px;
  padding: 12px 14px;
  border: 1px solid var(--c-border);
  border-radius: 8px;
  background: var(--c-surface);
}

.cloud-wallet > i {
  grid-row: 1 / 3;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 7px;
  background: var(--c-surface-2);
  color: var(--c-text-2);
}

.cloud-wallet span { color: var(--c-text-3); font-size: 11px; line-height: 1.2; }
.cloud-wallet strong { color: var(--c-text-1); font-size: 15px; line-height: 1.25; }
.cloud-product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 16px; }

.cloud-product-card {
  display: flex;
  min-height: 480px;
  padding: 24px;
  flex-direction: column;
  border: 1px solid var(--c-border);
  border-radius: 8px;
  background: var(--c-surface);
  box-shadow: var(--c-shadow-sm);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .cloud-product-card:hover { border-color: var(--c-border-strong); box-shadow: var(--c-shadow-md); transform: translateY(-2px); }
}

.cloud-product-topline { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cloud-product-category,
.cloud-product-period {
  color: var(--c-text-3);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.cloud-product-icon {
  display: grid;
  width: 54px;
  height: 54px;
  margin: 28px 0 20px;
  place-items: center;
  border: 1px solid var(--c-border-strong);
  border-radius: 8px;
  background: var(--c-surface-2);
  color: var(--c-text-1);
  font-size: 24px;
}

.cloud-product-copy h3 { margin: 0 0 8px; color: var(--c-text-1); font-size: 25px; line-height: 1.2; }
.cloud-product-copy p { max-width: 560px; margin: 0; color: var(--c-text-2); font-size: 14px; line-height: 1.65; }
.cloud-feature-list { display: grid; gap: 10px; margin: 24px 0; padding: 0; list-style: none; }
.cloud-feature-list li { display: flex; align-items: center; gap: 10px; color: var(--c-text-2); font-size: 13px; }
.cloud-feature-list i { color: var(--c-green-text); font-size: 16px; }
.cloud-unavailable { display: flex; gap: 8px; margin: 0 0 14px; color: var(--c-orange-text); font-size: 12px; }

.cloud-product-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--c-border);
}

.cloud-product-footer > div { display: flex; flex-direction: column; }
.cloud-product-footer strong { color: var(--c-text-1); font-size: 22px; line-height: 1.2; }
.cloud-product-footer span { color: var(--c-text-3); font-size: 11px; }
.cloud-buy-btn { min-width: 208px; min-height: 42px; }
.cloud-buy-btn:disabled { cursor: not-allowed; opacity: .5 !important; transform: none !important; }
.cloud-refresh-btn { display: grid; width: 40px; height: 40px; padding: 0; place-items: center; }
.active-services-root { display: grid; min-height: 260px; gap: 16px; }

.active-service-card {
  overflow: hidden;
  border: 1px solid var(--c-border);
  border-radius: 8px;
  background: var(--c-surface);
  box-shadow: var(--c-shadow-sm);
}

.active-service-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--c-border);
}

.active-service-brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.active-service-icon { display: grid; width: 44px; height: 44px; flex: 0 0 auto; place-items: center; border-radius: 8px; background: var(--c-surface-2); color: var(--c-text-1); font-size: 20px; }
.active-service-brand span { color: var(--c-text-3); font-size: 11px; }
.active-service-brand h3 { margin: 1px 0 0; color: var(--c-text-1); font-size: 18px; }
.cloud-status { display: inline-flex; align-items: center; gap: 7px; padding: 6px 9px; border: 1px solid var(--c-border); border-radius: 6px; color: var(--c-text-2); font-size: 11px; font-weight: 700; }
.cloud-status > span { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.cloud-status.is-active { border-color: rgba(52, 210, 123, .25); background: var(--c-green-soft); color: var(--c-green-text); }
.cloud-status.is-pending { background: var(--c-orange-soft); color: var(--c-orange-text); }
.cloud-status.is-error { background: var(--c-red-soft); color: var(--c-red-text); }
.active-service-details { display: grid; grid-template-columns: 2fr 1fr .6fr 1.2fr; gap: 1px; background: var(--c-border); border-bottom: 1px solid var(--c-border); }
.active-service-details > div { display: flex; min-width: 0; min-height: 86px; padding: 18px 20px; flex-direction: column; justify-content: center; gap: 5px; background: var(--c-surface); }
.active-service-details span { color: var(--c-text-3); font-size: 11px; }
.active-service-details strong { overflow: hidden; color: var(--c-text-1); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.active-service-url { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.active-service-note { display: flex; align-items: center; gap: 9px; padding: 14px 24px; border-bottom: 1px solid var(--c-border); background: var(--c-surface-2); color: var(--c-text-2); font-size: 12px; }
.active-service-note.is-connected { background: var(--c-green-soft); color: var(--c-green-text); }
.active-service-note > span { flex: 1; }
.active-service-note .cloud-connect-btn { min-height: 34px; flex: 0 0 auto; }
.active-service-actions { display: flex; gap: 8px; padding: 18px 24px; flex-wrap: wrap; }
.active-service-actions .btn { min-height: 40px; }
.active-service-actions .cloud-power-btn { margin-left: auto; }
.cloud-delete-btn { color: var(--c-red-text); }
.cloud-delete-btn:hover:not(:disabled) { border-color: var(--c-red-text); background: var(--c-red-soft); color: var(--c-red-text); }

.cloud-empty,
.cloud-loading {
  display: flex;
  min-height: 280px;
  padding: 36px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  border: 1px dashed var(--c-border-strong);
  border-radius: 8px;
  color: var(--c-text-3);
  text-align: center;
}

.cloud-empty > i { margin-bottom: 6px; color: var(--c-text-2); font-size: 28px; }
.cloud-empty strong { color: var(--c-text-1); font-size: 15px; }
.cloud-empty span { max-width: 420px; }
.cloud-empty .btn { margin-top: 12px; }
.cloud-credentials-modal { width: min(560px, calc(100vw - 28px)); }
.cloud-credentials-body { display: grid; gap: 13px; }
.cloud-security-note { display: flex; gap: 10px; padding: 12px 14px; border: 1px solid rgba(52, 210, 123, .22); border-radius: 7px; background: var(--c-green-soft); color: var(--c-green-text); font-size: 12px; }
.cloud-security-note i { flex: 0 0 auto; font-size: 16px; }
.cloud-credential-field { display: grid; gap: 6px; }
.cloud-credential-field > span { color: var(--c-text-3); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.cloud-credential-field > div { display: grid; grid-template-columns: minmax(0, 1fr) 40px; overflow: hidden; border: 1px solid var(--c-border); border-radius: 7px; background: var(--c-surface-2); }
.cloud-credential-field code { overflow: hidden; padding: 11px 12px; color: var(--c-text-1); text-overflow: ellipsis; white-space: nowrap; }
.cloud-credential-field button { border: 0; border-left: 1px solid var(--c-border); background: transparent; color: var(--c-text-2); cursor: pointer; }
.cloud-credential-field button:hover { background: var(--c-surface-3); color: var(--c-text-1); }
.cloud-copy-all { min-height: 42px; margin-top: 5px; }
.cloud-delete-modal { width: min(520px, calc(100vw - 28px)); }
.cloud-delete-body { display: grid; gap: 16px; }
.cloud-delete-warning { display: flex; gap: 12px; padding: 15px; border: 1px solid var(--c-red-text); border-radius: 7px; background: var(--c-red-soft); color: var(--c-red-text); }
.cloud-delete-warning > i { flex: 0 0 auto; font-size: 18px; }
.cloud-delete-warning strong { display: block; margin-bottom: 4px; color: var(--c-text-1); }
.cloud-delete-warning p { margin: 0; line-height: 1.55; }
.cloud-delete-target { display: grid; gap: 7px; min-width: 0; }
.cloud-delete-target span { color: var(--c-text-3); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.cloud-delete-target code { overflow: hidden; padding: 11px 12px; border: 1px solid var(--c-border); border-radius: 7px; background: var(--c-surface-2); color: var(--c-text-1); text-overflow: ellipsis; white-space: nowrap; }
.cloud-delete-actions { display: flex; justify-content: flex-end; gap: 8px; }
.cloud-delete-confirm { border-color: var(--c-red-text); background: var(--c-red-soft); color: var(--c-red-text); }
.cloud-delete-confirm:hover:not(:disabled) { background: var(--c-red-text); color: var(--c-bg); }

@media (max-width: 760px) {
  .cloud-page-head { align-items: stretch; flex-direction: column; }
  .cloud-wallet { width: 100%; }
  .cloud-product-card { min-height: 0; padding: 20px; }
  .cloud-product-footer { align-items: stretch; flex-direction: column; }
  .cloud-buy-btn { width: 100%; min-width: 0; }
  .active-service-details { grid-template-columns: 1fr; }
  .active-service-details > div { min-height: 72px; }
  .active-service-actions { flex-direction: column; }
  .active-service-actions .btn { width: 100%; }
  .active-service-actions .cloud-power-btn { margin-left: 0; }
  .active-service-note { align-items: stretch; flex-direction: column; }
  .active-service-note .cloud-connect-btn { width: 100%; }
  .cloud-delete-actions { flex-direction: column-reverse; }
  .cloud-delete-actions .btn { width: 100%; }
}

@media (max-width: 880px) {
  .fwin-body {
    display: block !important;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .fwin-overview {
    width: 100%;
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .fwin-inventories {
    width: 100%;
    margin-top: 12px;
  }
}

/* ============================================================
   LEFT NAV / SIDEBAR
   ============================================================ */

.left-nav {
  background: var(--c-glass);
  -webkit-backdrop-filter: blur(var(--c-blur));
  backdrop-filter: blur(var(--c-blur));
  border: 1px solid var(--c-glass-border);
  border-radius: 24px;
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: sticky;
  top: 28px;
  box-shadow: var(--c-shadow-md);
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 4px 6px 14px;
  border-bottom: 1px solid var(--c-border);
}

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  filter: drop-shadow(var(--c-accent-glow));
}
.brand-logo img {
  width: 100%;
  height: 100%;
  display: block;
}

.brand strong {
  font-size: 17px;
  color: var(--c-text-1);
  font-weight: 700;
  letter-spacing: -0.02em;
  display: block;
}

.brand p {
  font-size: 11px;
  color: var(--c-text-3);
  margin: 0;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ============================================================
   NAVIGATION
   ============================================================ */

.tab-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tab-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 13px;
  border: none;
  background: transparent;
  color: var(--c-text-2);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
  text-align: left;
  width: 100%;
}

.tab-btn:hover {
  background: var(--c-surface-2);
  color: var(--c-text-1);
}

.tab-btn:hover:not(.is-active) {
  transform: translateX(2px);
}

.tab-btn:active {
  transform: scale(0.97);
  transition-duration: 60ms;
}

.tab-btn.is-active {
  background: var(--c-accent-soft);
  color: var(--c-text-1);
  font-weight: 600;
}

.tab-btn.is-active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 18px;
  border-radius: 0 3px 3px 0;
  background: var(--c-accent-grad);
  animation: tabBarIn 320ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes tabBarIn {
  from { transform: translateY(-50%) scaleY(0); opacity: 0; }
  to   { transform: translateY(-50%) scaleY(1); opacity: 1; }
}

.tab-btn.is-active i {
  animation: tabIconPop 320ms ease;
}

@keyframes tabIconPop {
  0%   { transform: scale(0.7); }
  60%  { transform: scale(1.15); }
  100% { transform: scale(1); }
}

.tab-btn.is-active i {
  color: var(--c-accent);
}

.tab-btn i {
  font-size: 17px;
}

/* nav action button (Р•Р¶РµРЅРµРґРµР»СЊРЅС‹Р№ РґСЂРѕРї) вЂ” matches tab look, accent icon only */
.nav-action-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 13px;
  border: none;
  background: transparent;
  color: var(--c-text-2);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.25;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.nav-action-btn i {
  font-size: 17px;
  color: inherit;
  flex-shrink: 0;
}

.nav-action-btn:hover:not(:disabled) {
  background: var(--c-surface-2);
  color: var(--c-text-1);
}

.nav-action-btn:active:not(:disabled) {
  transform: scale(0.97);
  transition-duration: 60ms;
}

.nav-action-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* ============================================================
   THEME TOGGLE
   ============================================================ */

.theme-toggle-wrap {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--c-border);
}

.theme-toggle-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--c-border);
  background: var(--c-surface-2);
  color: var(--c-text-2);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease;
}

.theme-toggle-btn:hover {
  background: var(--c-surface-3);
  color: var(--c-text-1);
}

/* ============================================================
   CONTENT AREA
   ============================================================ */

.content-area {
  display: grid;
  gap: 16px;
  min-width: 0;
}

/* ============================================================
   CARD
   ============================================================ */

.card {
  background: var(--c-surface);
  -webkit-backdrop-filter: blur(var(--c-blur));
  backdrop-filter: blur(var(--c-blur));
  border: 1px solid var(--c-glass-border);
  border-radius: 22px;
  padding: 22px;
  box-shadow: var(--c-shadow-sm);
}

/* ============================================================
   HERO
   ============================================================ */

.hero {
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  border: 1px solid var(--c-glass-border);
  background: var(--c-surface);
  box-shadow: var(--c-shadow-md);
}

.hero::after {
  display: none;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: 4px;
}

h1 {
  font-size: 32px;
  font-weight: 800;
  color: var(--c-text-1);
  letter-spacing: -0.03em;
  margin: 4px 0 6px;
}

h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--c-text-1);
  margin: 0 0 16px;
}

h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--c-text-1);
  margin: 0;
}

.hint {
  font-size: 13px;
  color: var(--c-text-2);
}

/* ============================================================
   STATE BADGE
   ============================================================ */

.state-badge {
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
  border: 1px solid currentColor;
  background: transparent !important;
}

/* glowing status dot вЂ” same motif as Mino's online eyes */
.state-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 0 currentColor;
  flex-shrink: 0;
}
.state-online .state-dot {
  animation: state-pulse 1.8s ease-out infinite;
}
@keyframes state-pulse {
  0% { box-shadow: 0 0 0 0 rgba(52, 210, 123, 0.55); }
  70% { box-shadow: 0 0 0 7px rgba(52, 210, 123, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 210, 123, 0); }
}

.state-badge-label {
  font-family: ui-monospace, "SFMono-Regular", "Cascadia Code", "Consolas", monospace;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.6;
}
.state-badge-value {
  font-weight: 600;
  letter-spacing: 0.01em;
}

.state-online {
  background: var(--c-green-soft);
  color: var(--c-green-text);
}

.state-offline {
  background: var(--c-surface-2);
  color: var(--c-text-2);
}

.state-starting {
  background: var(--c-orange-soft);
  color: var(--c-orange-text);
}

.state-stopping {
  background: var(--c-orange-soft);
  color: var(--c-orange-text);
}

.state-error {
  background: var(--c-red-soft);
  color: var(--c-red-text);
}

/* ============================================================
   BUTTONS BASE
   ============================================================ */

button,
.button-link {
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  border-radius: 10px;
  border: 1px solid var(--c-border-strong);
  background: var(--c-surface);
  color: var(--c-text-1);
  padding: 9px 16px;
  cursor: pointer;
  transition:
    background-color 150ms ease,
    border-color 150ms ease,
    color 150ms ease,
    opacity 150ms ease,
    box-shadow 150ms ease,
    transform 120ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

button:hover,
.button-link:hover {
  background: var(--c-surface-2);
}

/* tactile press feedback for all buttons */
button:active:not(:disabled),
.button-link:active {
  transform: scale(0.96);
  transition-duration: 60ms;
}

/* keyboard focus ring (mouse clicks don't trigger :focus-visible) */
button:focus-visible,
.button-link:focus-visible,
.tab-btn:focus-visible,
.chip:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--c-accent-soft), 0 0 0 1px var(--c-accent);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

button.danger {
  color: var(--c-red-text);
  background: var(--c-red-soft);
  border-color: var(--c-red);
}

/* ============================================================
   INPUT / FORM
   ============================================================ */

input {
  width: 100%;
  border: 1px solid var(--c-border-strong);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 14px;
  font-family: inherit;
  background: var(--c-surface);
  color: var(--c-text-1);
  outline: none;
  transition: border-color 150ms ease;
}

input:focus {
  border-color: var(--c-accent);
}

form {
  display: grid;
  gap: 10px;
}

pre {
  min-height: 100px;
  border: 1px solid var(--c-border);
  border-radius: 12px;
  background: var(--c-surface-2);
  color: var(--c-text-1);
  padding: 14px;
  font-size: 12px;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.6;
  font-family: "SF Mono", "Cascadia Code", monospace;
  margin: 0;
}

/* ============================================================
   TAB PANELS
   ============================================================ */

.tab-panel {
  display: grid;
  gap: 16px;
  min-height: 300px;
}

.tab-panel[hidden] {
  display: none !important;
}

/* The `hidden` attribute must win over `.tab-btn { display: flex }` — otherwise
   the admin tab (hidden for non-admins via JS) would still render. */
.tab-btn[hidden] {
  display: none !important;
}

.tab-panel-enter {
  animation: tabFadeIn 360ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes tabFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* stagger the panel's top-level cards for a layered reveal */
.tab-panel-enter > * {
  animation: tabChildIn 420ms cubic-bezier(0.22, 1, 0.36, 1) backwards;
}
.tab-panel-enter > *:nth-child(1) { animation-delay: 40ms; }
.tab-panel-enter > *:nth-child(2) { animation-delay: 100ms; }
.tab-panel-enter > *:nth-child(3) { animation-delay: 160ms; }
.tab-panel-enter > *:nth-child(4) { animation-delay: 220ms; }

@keyframes tabChildIn {
  from { opacity: 0; transform: translateY(14px) scale(0.99); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

/* ============================================================
   STATUS HINTS
   ============================================================ */

.status-hint {
  border-radius: 10px;
  padding: 10px 14px;
  border: 1px solid var(--c-accent);
  background: var(--c-accent-soft);
  color: var(--c-accent);
  font-size: 13px;
}

.status-hint-warn {
  border-color: var(--c-orange);
  background: var(--c-orange-soft);
  color: var(--c-orange-text);
}

.status-hint-error {
  border-color: var(--c-red);
  background: var(--c-red-soft);
  color: var(--c-red-text);
}

/* ============================================================
   CHIPS GRID (ACCOUNT CARDS)
   ============================================================ */

.chips {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
  align-items: start;
}

.chip {
  border: 1px solid var(--c-glass-border);
  border-radius: 18px;
  background: var(--c-surface);
  -webkit-backdrop-filter: blur(var(--c-blur));
  backdrop-filter: blur(var(--c-blur));
  padding: 16px 16px 48px;
  display: grid;
  gap: 12px;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
  box-shadow: var(--c-shadow-sm);
  min-width: 0;
  overflow: hidden;
  position: relative;
}

.chip:hover {
  border-color: var(--c-accent);
  box-shadow: var(--c-shadow-md), 0 0 0 1px var(--c-accent-soft);
  transform: translateY(-3px);
}

.chip:active {
  transform: translateY(-1px) scale(0.99);
  transition-duration: 80ms;
}

/* staggered entrance вЂ” JS sets --chip-i and adds .chip--enter on first paint only */
.chip--enter {
  animation: chipIn 460ms cubic-bezier(0.22, 1, 0.36, 1) backwards;
  animation-delay: calc(var(--chip-i, 0) * 45ms);
}

@keyframes chipIn {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.chip--main {
  border-color: var(--c-orange);
  background: var(--c-orange-soft);
}

.chip--main:hover {
  border-color: var(--c-orange);
}

.chip-main-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  font-size: 10px;
  line-height: 1;
  color: var(--c-orange-text);
  background: var(--c-surface);
  border: 1px solid var(--c-orange);
  box-shadow: var(--c-shadow-sm);
}

.chip-top {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
}

.chip-head {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
  flex: 1 1 0;
  overflow: hidden;
}

.chip-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.chip-info strong {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 14px;
  font-weight: 600;
  color: var(--c-text-1);
}

.chip-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 500;
}

.chip-status--online {
  color: var(--c-green-text);
}

.chip-status--offline {
  color: var(--c-text-3);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.chip-status--online .status-dot {
  background: var(--c-green);
  box-shadow: 0 0 0 2px var(--c-green-soft);
}

.chip-status--offline .status-dot {
  background: var(--c-text-3);
}

.chip-wallet {
  font-size: 11px;
  font-weight: 600;
  color: var(--c-green-text);
  background: var(--c-green-soft);
  border: 1px solid var(--c-green);
  border-radius: 999px;
  padding: 4px 10px;
  white-space: nowrap;
  flex-shrink: 0;
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  align-self: flex-start;
  margin-left: auto;
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--c-border);
  object-fit: cover;
  flex-shrink: 0;
}

.chip-buttons {
  display: flex;
  gap: 8px;
}

/* corner "open window" button on each bot card */
.chip-open-btn {
  position: absolute;
  bottom: 10px;
  right: 10px;
  z-index: 3;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  border: 1px solid var(--c-glass-border);
  background: var(--c-surface);
  color: var(--c-text-2);
  font-size: 14px;
  cursor: pointer;
  box-shadow: var(--c-shadow-sm);
  opacity: 0;
  transform: translateY(4px) scale(0.92);
  transition: opacity 160ms ease, transform 160ms ease, color 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.chip:hover .chip-open-btn,
.chip:focus-within .chip-open-btn {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.chip-open-btn:hover {
  color: var(--c-accent);
  border-color: var(--c-accent);
  background: var(--c-accent-soft);
}

.chip-open-btn:active {
  transform: scale(0.9);
  transition-duration: 80ms;
}

/* keep corner button reachable on touch (no hover) */
@media (hover: none) {
  .chip-open-btn { opacity: 1; transform: none; }
}

/* ============================================================
   GLOBAL LOOT BAR
   ============================================================ */

/* mass actions вЂ” single capsule that expands horizontally */
.mass-actions {
  display: inline-flex;
  align-items: center;
  margin-bottom: 20px;
  padding: 6px;
  border-radius: 14px;
  border: 1px solid var(--c-border);
  background: var(--c-surface-2);
  cursor: pointer;
  transition: border-color 180ms ease, background-color 180ms ease;
}

.mass-actions:hover {
  border-color: var(--c-accent);
}

.mass-actions-toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--c-text-1);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color 180ms ease;
}

.mass-actions-toggle:hover {
  color: var(--c-accent);
}

/* arrow sits on the left; default points right, flips to left when open */
.mass-actions-chevron {
  font-size: 13px;
  color: var(--c-accent);
  transition: transform 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mass-actions.is-open .mass-actions-chevron {
  transform: rotate(180deg);
}

/* horizontal + vertical expand; closed = collapsed to nothing so capsule
   stays as small as the toggle */
.mass-actions-panel {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* only width animates в†’ capsule height stays constant, no vertical jump */
.mass-actions-panel-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-width 360ms cubic-bezier(0.4, 0, 0.2, 1),
              opacity 240ms ease,
              padding-left 360ms ease;
}

.mass-actions.is-open .mass-actions-panel-inner {
  max-width: 760px;
  opacity: 1;
  padding-left: 8px;
}

/* keep action buttons the same height as the toggle so the row height
   never changes в†’ capsule stays compact and nothing below jumps */
.mass-actions .global-loot-btn {
  padding: 6px 13px;
  font-size: 12px;
  white-space: nowrap;
}

.mass-actions .global-loot-item {
  flex-direction: row;
  flex-shrink: 0;
  white-space: nowrap;
}

/* buttons slide in from the left edge when opened */
.mass-actions-panel-inner .global-loot-item {
  transform: translateX(-10px);
  opacity: 0;
  transition: transform 320ms cubic-bezier(0.34, 1.56, 0.64, 1), opacity 240ms ease;
}

.mass-actions.is-open .mass-actions-panel-inner .global-loot-item {
  transform: none;
  opacity: 1;
}

.mass-actions.is-open .mass-actions-panel-inner .global-loot-item:nth-child(2) {
  transition-delay: 70ms;
}

.global-loot-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.global-loot-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid;
  transition: opacity 150ms ease, background-color 150ms ease;
  font-family: inherit;
}

.global-loot-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.cs2-btn {
  background: var(--c-red-soft);
  border-color: var(--c-red);
  color: var(--c-red-text);
}

.cs2-btn:hover:not(:disabled) {
  opacity: 0.8;
}

.tf2-btn {
  background: var(--c-orange-soft);
  border-color: var(--c-orange);
  color: var(--c-orange-text);
}

.buy-btn {
  background: var(--c-accent-soft);
  border-color: var(--c-accent);
  color: var(--c-accent);
}
.buy-btn:hover:not(:disabled) {
  opacity: 0.8;
}

.mass-actions.is-open .mass-actions-panel-inner .global-loot-item:nth-child(3) {
  transition-delay: 140ms;
}

/* в”Ђв”Ђ VNC browser modal в”Ђв”Ђ */
.vnc-modal {
  /*
   * 30% wider cap (1664px vs 1280px).
   * Third min() term: when viewport height is the bottleneck, shrink modal
   * width so body (aspect-ratio 8/5) still fits exactly вЂ” no grey bars.
   * 77px = 16px modal margin + 61px header (14px pad Г— 2 + 32px avatar + 1px border).
   */
  width: min(1664px, calc(100vw - 16px), calc((100vh - 77px) * 1.6));
  height: auto;
  max-height: calc(100vh - 16px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 0;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  cursor: default;
  user-select: none;
}

.vnc-modal.is-dragging {
  transition: none;
  opacity: 0.95;
}

.vnc-backdrop {
  display: block !important;
}

.vnc-backdrop[hidden] {
  display: none !important;
}

.vnc-modal-header {
  padding: 14px 18px;
  margin-bottom: 0;
  border-bottom: 1px solid var(--c-border);
  flex-shrink: 0;
  cursor: grab;
}

.vnc-modal-header:active {
  cursor: grabbing;
}

.vnc-modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.vnc-modal-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--c-border);
  flex-shrink: 0;
}

.vnc-modal-body {
  /* aspect-ratio drives height: body = width Г— 5/8 = exact 8:5 VNC ratio в†’ no grey bars */
  aspect-ratio: 8 / 5;
  width: 100%;
  overflow: hidden;
  border-radius: 0 0 20px 20px;
  background: #111;
  position: relative;
  flex-shrink: 0;
}

.vnc-modal-body iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.vnc-loading {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 14, 0.88);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  border-radius: 0 0 20px 20px;
  opacity: 1;
  transition: opacity 0.35s ease;
}

.vnc-loading[hidden] {
  display: none !important;
}

.vnc-loading.is-fading {
  opacity: 0;
  pointer-events: none;
}

.vnc-loading-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.vnc-spinner {
  width: 52px;
  height: 52px;
  border: 3px solid rgba(255, 255, 255, 0.08);
  border-top-color: var(--c-accent, #5b8af5);
  border-radius: 50%;
  animation: vnc-spin 0.75s linear infinite;
}

@keyframes vnc-spin {
  to { transform: rotate(360deg); }
}

.vnc-loading-text {
  color: var(--c-text-muted, #888);
  font-size: 14px;
  letter-spacing: 0.01em;
}

/* в”Ђв”Ђ "in development" mini-modal (reuses .qty-modal-backdrop) в”Ђв”Ђ */
.indev-modal {
  min-width: 320px;
  max-width: 420px;
  text-align: center;
}

.indev-icon {
  width: 56px;
  height: 56px;
  margin: 4px auto 14px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 26px;
  color: var(--c-accent, #e0a82e);
  background: var(--c-accent-soft, rgba(224, 168, 46, 0.14));
  animation: indev-pulse 2.2s ease-in-out infinite;
}

@keyframes indev-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.06); opacity: 0.85; }
}

.indev-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}

.indev-text {
  font-size: 13px;
  line-height: 1.55;
  color: var(--c-text-dim, #9aa);
  margin-bottom: 16px;
}

.cs2-drop-btn {
  background: var(--c-accent-soft);
  border-color: var(--c-accent);
  color: var(--c-accent);
}
.cs2-drop-btn:hover {
  opacity: 0.85;
}

/* ============================================================
   ASF CONTROLS
   ============================================================ */

.asf-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.asf-ctrl-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid;
  transition: opacity 150ms ease, background-color 150ms ease;
  text-decoration: none;
  font-family: inherit;
}

.asf-start {
  background: var(--c-green-soft);
  border-color: var(--c-green);
  color: var(--c-green-text);
}

.asf-stop {
  background: var(--c-red-soft);
  border-color: var(--c-red);
  color: var(--c-red-text);
}

.asf-web {
  background: var(--c-accent-soft);
  border-color: var(--c-accent);
  color: var(--c-accent);
}

.asf-ctrl-btn:hover:not(:disabled) {
  opacity: 0.8;
}

/* ============================================================
   MODAL
   ============================================================ */

body.modal-open {
  overflow: hidden;
}

.modal-open .app-shell {
  pointer-events: none;
  user-select: none;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
  display: grid;
  place-items: center;
  z-index: 1000;
  animation: modalBackdropIn 220ms ease;
}

.modal-backdrop[hidden] {
  display: none !important;
}

.modal-window {
  width: min(840px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow-x: hidden;
  overflow-y: auto;
  border-radius: 20px;
  animation: modalWindowIn 360ms cubic-bezier(0.22, 1, 0.36, 1);
  transform-origin: center 40%;
}

/* exit: JS adds .is-closing, then hides after the animation (~200ms) */
.modal-backdrop.is-closing {
  animation: modalBackdropOut 200ms ease forwards;
}
.modal-backdrop.is-closing .modal-window {
  animation: modalWindowOut 200ms cubic-bezier(0.4, 0, 1, 1) forwards;
}

@keyframes modalBackdropIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes modalBackdropOut {
  from { opacity: 1; }
  to   { opacity: 0; }
}
@keyframes modalWindowIn {
  from { opacity: 0; transform: translateY(18px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes modalWindowOut {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to   { opacity: 0; transform: translateY(12px) scale(0.97); }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--c-border);
}

.modal-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--c-border);
  background: var(--c-surface-2);
  color: var(--c-text-2);
  display: grid;
  place-items: center;
  padding: 0;
  font-size: 14px;
  cursor: pointer;
  flex-shrink: 0;
}

.modal-body {
  display: grid;
  gap: 14px;
}

/* ============================================================
   INVENTORY SUMMARY BAR
   ============================================================ */

.inv-summary-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.inv-stat {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--c-surface-2);
  border: 1px solid var(--c-border);
  border-radius: 12px;
  padding: 10px 16px;
  font-size: 13px;
  flex: 1;
  min-width: 130px;
}

.inv-stat i {
  font-size: 15px;
  color: var(--c-text-2);
}

.inv-stat span {
  color: var(--c-text-2);
  font-size: 12px;
}

.inv-stat strong {
  margin-left: auto;
  font-size: 15px;
  font-weight: 700;
  color: var(--c-text-1);
}

.cs2-stat {
  border-color: var(--c-red);
  background: var(--c-red-soft);
}

.cs2-stat i {
  color: var(--c-red-text);
}

.tf2-stat {
  border-color: var(--c-orange);
  background: var(--c-orange-soft);
}

.tf2-stat i {
  color: var(--c-orange-text);
}

/* ============================================================
   INVENTORY SECTION
   ============================================================ */

.inv-section {
  display: grid;
  gap: 10px;
}

.inv-section-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--c-text-2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.inv-game-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 0.04em;
}

.inv-game-badge.cs2 {
  background: var(--c-red-soft);
  color: var(--c-red-text);
}

.inv-game-badge.tf2 {
  background: var(--c-orange-soft);
  color: var(--c-orange-text);
}

/* ============================================================
   INVENTORY ITEM GRID
   ============================================================ */

.inv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 8px;
}

.inv-thumb {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--c-surface-2);
  border: 1px solid var(--c-border);
  border-radius: 12px;
  padding: 10px 8px 8px;
  cursor: default;
  transition: border-color 150ms ease, box-shadow 150ms ease;
  gap: 4px;
  text-align: center;
}

.inv-thumb:hover {
  border-color: var(--c-accent);
  box-shadow: var(--c-shadow-sm);
}

.inv-thumb img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 8px;
}

.inv-thumb-empty {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  background: var(--c-surface-3);
}

.inv-amount {
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 10px;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.65);
  color: #ffffff;
  border-radius: 6px;
  padding: 1px 5px;
}

.inv-thumb-name {
  font-size: 10px;
  color: var(--c-text-2);
  line-height: 1.3;
  max-width: 80px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.inv-thumb-price {
  font-size: 11px;
  font-weight: 600;
  color: var(--c-green-text);
}

.inv-thumb-total {
  font-size: 10px;
  color: var(--c-text-3);
}

.inv-thumb-locked {
  border-color: var(--c-red);
  opacity: 0.7;
}

.inv-lock {
  position: absolute;
  bottom: 5px;
  right: 6px;
  font-size: 10px;
  color: var(--c-red-text);
}

.inv-empty {
  color: var(--c-text-2);
  font-size: 13px;
  padding: 16px;
  border: 1px dashed var(--c-border-strong);
  border-radius: 12px;
  text-align: center;
}

/* ============================================================
   MODAL LOOT BAR
   ============================================================ */

.modal-loot-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 14px;
  border-top: 1px solid var(--c-border);
  margin-top: 4px;
}

.modal-loot-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid;
  transition: opacity 150ms ease;
  font-family: inherit;
}

.modal-loot-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.cs2-loot-btn {
  background: var(--c-red-soft);
  border-color: var(--c-red);
  color: var(--c-red-text);
}

.tf2-loot-btn {
  background: var(--c-orange-soft);
  border-color: var(--c-orange);
  color: var(--c-orange-text);
}

.modal-loot-btn-ghost {
  background: transparent;
  border-color: var(--c-border-strong);
  color: var(--c-text-2);
  font-weight: 500;
}

/* ============================================================
   CREDENTIALS FORM
   ============================================================ */

.creds-notice {
  background: var(--c-accent-soft);
  border: 1px solid var(--c-accent);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 13px;
  color: var(--c-accent);
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.creds-form {
  display: grid;
  gap: 10px;
}

.creds-form label {
  font-size: 13px;
  font-weight: 500;
  color: var(--c-text-2);
}

.creds-form input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--c-border-strong);
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  background: var(--c-surface);
  color: var(--c-text-1);
  outline: none;
  transition: border-color 150ms ease;
}

.creds-form input:focus {
  border-color: var(--c-accent);
}

.creds-actions {
  display: flex;
  gap: 8px;
}

.creds-save-btn {
  flex: 1;
  background: var(--c-accent-grad);
  color: #ffffff;
  border: none;
  border-radius: 11px;
  padding: 11px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--c-accent-glow);
  transition: transform 150ms ease, box-shadow 150ms ease, opacity 150ms ease;
  font-family: inherit;
}

.creds-save-btn:hover {
  transform: translateY(-1px);
  opacity: 0.95;
}

.creds-cancel-btn {
  background: var(--c-surface-2);
  border: 1px solid var(--c-border-strong);
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 14px;
  cursor: pointer;
  color: var(--c-text-2);
  font-family: inherit;
  transition: background-color 150ms ease;
}

.modal-cost-form label {
  font-size: 12px;
  color: var(--c-text-2);
}

/* ============================================================
   STATUS OVERVIEW / METRIC CHIPS
   ============================================================ */

.status-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.metric-chip {
  border: 1px solid var(--c-border);
  background: var(--c-surface-2);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 13px;
  color: var(--c-text-2);
}

/* ============================================================
   LOADING / ERROR STATES
   ============================================================ */

.details-loading {
  color: var(--c-text-2);
  font-size: 13px;
  padding: 20px;
  text-align: center;
}

.details-error {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--c-red-text);
  font-size: 13px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--c-red-soft);
  border: 1px solid var(--c-red);
}

.details-error::before {
  content: "\F623"; /* bi-exclamation-triangle */
  font-family: "bootstrap-icons";
  font-size: 15px;
}

/* ============================================================
   SKELETON LOADERS (shimmer)
   ============================================================ */

.skeleton {
  position: relative;
  overflow: hidden;
  background: var(--c-surface-2);
  border-radius: 8px;
}

.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--c-accent-soft) 45%,
    rgba(255, 255, 255, 0.08) 50%,
    var(--c-accent-soft) 55%,
    transparent 100%
  );
  animation: skeletonShimmer 1.3s ease-in-out infinite;
}

@keyframes skeletonShimmer {
  100% { transform: translateX(100%); }
}

@media (prefers-reduced-motion: reduce) {
  .skeleton::after { animation: none; }
}

/* ============================================================
   PRODUCT UI REFINEMENT
   Calm, dense control-center styling and resilient layouts.
   ============================================================ */

:root {
  --c-bg: #f4f4f5;
  --c-bg-grad: none;
  --c-surface: #ffffff;
  --c-surface-2: #fafafa;
  --c-surface-3: #e4e4e7;
  --c-glass: #ffffff;
  --c-glass-border: rgba(24, 24, 27, 0.10);
  --c-border: rgba(24, 24, 27, 0.10);
  --c-border-strong: rgba(24, 24, 27, 0.18);
  --c-text-1: #18181b;
  --c-text-2: #52525b;
  --c-text-3: #71717a;
  --c-accent: #18181b;
  --c-accent-2: #3f3f46;
  --c-accent-soft: rgba(24, 24, 27, 0.08);
  --c-accent-grad: #18181b;
  --c-accent-glow: none;
  --c-green: #059669;
  --c-green-soft: rgba(5, 150, 105, 0.10);
  --c-green-text: #047857;
  --c-red: #e11d48;
  --c-red-soft: rgba(225, 29, 72, 0.08);
  --c-red-text: #be123c;
  --c-orange: #d97706;
  --c-orange-soft: rgba(217, 119, 6, 0.10);
  --c-orange-text: #b45309;
  --c-action: #3f3f46;
  --c-action-hover: #52525b;
  --c-action-text: #fafafa;
  --c-action-shadow: 0 1px 0 rgba(255, 255, 255, 0.18) inset, 0 1px 2px rgba(24, 24, 27, 0.18), 0 8px 20px rgba(24, 24, 27, 0.10);
  --c-bg-elev: #ffffff;
  --c-shadow-sm: 0 1px 2px rgba(24, 24, 27, 0.06);
  --c-shadow-md: 0 12px 32px rgba(24, 24, 27, 0.08);
  --c-shadow-lg: 0 28px 80px rgba(24, 24, 27, 0.18);
  --c-scroll-thumb: rgba(82, 82, 91, 0.42);
  --c-scroll-thumb-hover: rgba(39, 39, 42, 0.70);
  --ease-ui: cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="dark"] {
  --c-bg: #09090b;
  --c-bg-grad: none;
  --c-surface: #18181b;
  --c-surface-2: #27272a;
  --c-surface-3: #3f3f46;
  --c-glass: #111113;
  --c-glass-border: rgba(255, 255, 255, 0.08);
  --c-border: rgba(255, 255, 255, 0.08);
  --c-border-strong: rgba(255, 255, 255, 0.16);
  --c-text-1: #fafafa;
  --c-text-2: #a1a1aa;
  --c-text-3: #71717a;
  --c-accent: #fafafa;
  --c-accent-2: #d4d4d8;
  --c-accent-soft: rgba(255, 255, 255, 0.08);
  --c-accent-grad: #fafafa;
  --c-accent-glow: none;
  --c-green: #34d399;
  --c-green-soft: rgba(52, 211, 153, 0.10);
  --c-green-text: #6ee7b7;
  --c-red: #fb7185;
  --c-red-soft: rgba(251, 113, 133, 0.10);
  --c-red-text: #fda4af;
  --c-orange: #fbbf24;
  --c-orange-soft: rgba(251, 191, 36, 0.10);
  --c-orange-text: #fde68a;
  --c-action: #d4d4d8;
  --c-action-hover: #e4e4e7;
  --c-action-text: #09090b;
  --c-action-shadow: 0 1px 0 #f4f4f5 inset, 0 0 0 1px rgba(0, 0, 0, 0.60), 0 10px 28px rgba(0, 0, 0, 0.32);
  --c-bg-elev: #111113;
  --c-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.32);
  --c-shadow-md: 0 14px 36px rgba(0, 0, 0, 0.34);
  --c-shadow-lg: 0 32px 90px rgba(0, 0, 0, 0.60);
  --c-scroll-thumb: rgba(161, 161, 170, 0.32);
  --c-scroll-thumb-hover: rgba(212, 212, 216, 0.55);
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  background-image: none;
}

.app-shell {
  grid-template-columns: 232px minmax(0, 1fr);
  gap: 24px;
  padding: 24px 32px;
}

.left-nav {
  top: 24px;
  padding: 18px 14px;
  gap: 16px;
  border-radius: 8px;
  box-shadow: var(--c-shadow-sm);
}

.brand {
  padding: 2px 8px 16px;
}

.brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  filter: none;
}

.tab-btn {
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 6px;
}

.tab-btn:hover:not(.is-active),
.dash-kpi-card:hover {
  transform: none;
}

.content-area,
.tab-panel,
.dash-wrap,
.dash-charts-row,
.dash-bottom-grid,
.dash-chart-card,
.dash-card {
  min-width: 0;
}

.content-area {
  gap: 14px;
}

.card,
.dash-kpi-card,
.dash-chart-card,
.dash-card,
.section-card,
.sgroup,
.asf-connect-card,
.asf-install-quick {
  border-radius: 8px;
}

.hero {
  min-height: 88px;
  padding: 18px 20px;
  background: var(--c-surface);
  box-shadow: var(--c-shadow-sm);
}

.hero::after {
  display: none;
}

.hero h1 {
  margin: 2px 0 3px;
  font-size: 24px;
  letter-spacing: 0;
}

.eyebrow {
  margin-bottom: 0;
  letter-spacing: 0.08em;
}

.state-badge {
  border-color: var(--c-border-strong);
  border-radius: 6px;
  padding: 6px 10px;
}

.dash-wrap {
  gap: 14px;
  padding-top: 0;
}

.dash-kpi-row {
  gap: 10px;
}

.dash-kpi-card {
  min-width: 0;
  padding: 13px 14px;
  box-shadow: var(--c-shadow-sm);
}

.dash-kpi-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: 7px;
}

.dash-kpi-value {
  font-size: 1.08rem;
}

.dash-period-tabs,
.dash-refresh-btn {
  border-radius: 7px;
}

.dash-period-btn,
.dash-donut-tab {
  border-radius: 5px;
}

.dash-charts-row {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
}

.dash-bottom-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dash-chart-card,
.dash-card {
  box-shadow: var(--c-shadow-sm);
}

.dash-table-wrap {
  max-width: 100%;
  border-radius: 6px;
}

.dash-table {
  min-width: 620px;
}

.dash-bottom-grid .dash-table {
  min-width: 520px;
}

.sidebar-profile-btn,
.theme-toggle-btn {
  border-radius: 6px;
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 18px;
    padding: 20px;
  }

  .dash-charts-row {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 310px);
  }
}

@media (max-width: 940px) {
  .dash-charts-row,
  .dash-bottom-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: minmax(0, 1fr);
    padding: 12px;
  }

  .left-nav {
    position: static;
    padding: 12px;
  }
}

@media (max-width: 520px) {
  .hero {
    min-height: 0;
    padding: 16px;
  }

  .hero h1 {
    font-size: 21px;
  }

  .dash-kpi-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dash-kpi-card {
    align-items: flex-start;
    gap: 9px;
    padding: 12px;
  }

  .dash-kpi-icon-wrap {
    width: 32px;
    height: 32px;
  }

  .dash-kpi-label {
    white-space: normal;
    line-height: 1.25;
  }

  .dash-kpi-value {
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

/* chip (account card) skeleton */
.chip-skeleton {
  border: 1px solid var(--c-glass-border);
  border-radius: 18px;
  background: var(--c-surface);
  padding: 16px;
  display: grid;
  gap: 12px;
  box-shadow: var(--c-shadow-sm);
}

.sk-chip-top { display: flex; align-items: center; gap: 12px; }
.sk-avatar { width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0; }
.sk-lines { display: grid; gap: 7px; flex: 1; }
.sk-line { height: 11px; border-radius: 5px; }
.sk-line.short { width: 50%; }
.sk-btn { height: 36px; border-radius: 10px; }

/* inline spinner (ring) */
.spinner {
  display: inline-block;
  width: 15px;
  height: 15px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  opacity: 0.9;
  animation: spinnerRotate 0.65s linear infinite;
  vertical-align: -2px;
  margin-right: 2px;
}

@keyframes spinnerRotate {
  100% { transform: rotate(360deg); }
}

/* ============================================================
   MISC
   ============================================================ */

.button-link {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.farm-empty {
  border: 1px dashed var(--c-border-strong);
  border-radius: 10px;
  padding: 12px;
  color: var(--c-text-2);
  font-size: 13px;
}

/* legacy helpers retained */
.creds-row { display: flex; justify-content: flex-end; }

.creds-edit-btn {
  background: none;
  border: 1px solid var(--c-border-strong);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  color: var(--c-text-2);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: inherit;
}

.creds-edit-btn:hover {
  background: var(--c-surface-2);
}

/* ============================================================
   CS2 WEEKLY DROP PICKER
   ============================================================ */

.cs2drop-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 32px 20px;
  color: var(--c-text-2);
  font-size: 14px;
  text-align: center;
}

.cs2drop-loading small {
  font-size: 12px;
  color: var(--c-text-3);
}

.cs2drop-spin {
  display: inline-block;
  animation: cs2SpinAnim 0.9s linear infinite;
  font-size: 22px;
}

@keyframes cs2SpinAnim {
  to { transform: rotate(360deg); }
}

.cs2drop-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 32px 20px;
  color: var(--c-green-text);
  font-size: 15px;
  font-weight: 600;
}

.cs2drop-empty i {
  font-size: 32px;
}

.cs2drop-intro {
  font-size: 13px;
  color: var(--c-text-2);
  padding: 10px 14px;
  background: var(--c-accent-soft);
  border: 1px solid var(--c-accent);
  border-radius: 12px;
}

.cs2drop-bot-section {
  display: grid;
  gap: 10px;
}

.cs2drop-bot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cs2drop-bot-header strong {
  font-size: 14px;
  font-weight: 700;
  color: var(--c-text-1);
}

.cs2drop-balance {
  font-size: 12px;
  font-weight: 600;
  color: var(--c-accent);
  background: var(--c-accent-soft);
  border-radius: 999px;
  padding: 3px 10px;
}

.cs2drop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
}

.cs2drop-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 10px 8px;
  background: var(--c-surface-2);
  border: 2px solid var(--c-border);
  border-radius: 14px;
  cursor: pointer;
  text-align: center;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 100ms ease;
  user-select: none;
}

.cs2drop-item:hover:not(.is-maxed) {
  border-color: var(--c-accent);
  box-shadow: var(--c-shadow-sm);
  transform: translateY(-1px);
}

.cs2drop-item.is-selected {
  border-color: var(--c-green);
  background: var(--c-green-soft);
  box-shadow: 0 0 0 2px var(--c-green-soft);
}

.cs2drop-item.is-maxed {
  opacity: 0.4;
  cursor: not-allowed;
}

.cs2drop-item-img {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--c-surface-3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cs2drop-item-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cs2drop-item-img.rarity-covert     { background: rgba(235, 75, 75, 0.18); }
.cs2drop-item-img.rarity-classified { background: rgba(211, 44, 230, 0.15); }
.cs2drop-item-img.rarity-restricted { background: rgba(136, 71, 255, 0.15); }
.cs2drop-item-img.rarity-milspec    { background: rgba(75, 105, 255, 0.15); }
.cs2drop-item-img.rarity-industrial { background: rgba(94, 152, 217, 0.12); }

.cs2drop-item-placeholder {
  font-size: 26px;
  color: var(--c-text-3);
}

.cs2drop-check {
  position: absolute;
  inset: 0;
  background: rgba(52, 199, 89, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: #fff;
}

.cs2drop-item-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--c-text-1);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 100%;
}

.cs2drop-item-wear {
  font-size: 10px;
  color: var(--c-text-3);
}

.cs2drop-item-float {
  font-size: 10px;
  color: var(--c-text-2);
  font-variant-numeric: tabular-nums;
}

.cs2drop-item-price {
  font-size: 12px;
  font-weight: 700;
  color: var(--c-green-text);
}

.cs2drop-actions {
  display: flex;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--c-border);
  flex-wrap: wrap;
}

.cs2drop-confirm-btn {
  flex: 1;
  min-width: 160px;
  background: var(--c-accent);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: opacity 150ms ease;
  font-family: inherit;
}

.cs2drop-confirm-btn:hover:not(:disabled) {
  background: var(--c-accent);
  opacity: 0.88;
}

.cs2drop-confirm-btn:disabled {
  background: var(--c-surface-3);
  color: var(--c-text-3);
  cursor: not-allowed;
}

.cs2drop-cancel-btn {
  background: var(--c-surface-2);
  border: 1px solid var(--c-border-strong);
  border-radius: 12px;
  padding: 12px 20px;
  font-size: 14px;
  cursor: pointer;
  color: var(--c-text-2);
  font-family: inherit;
  transition: background-color 150ms ease;
}

.cs2drop-cancel-btn:hover {
  background: var(--c-surface-3);
}

.cs2drop-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 28px 20px;
  text-align: center;
  color: var(--c-green-text);
}

.cs2drop-success i {
  font-size: 40px;
}

.cs2drop-success strong {
  font-size: 18px;
  font-weight: 700;
}

.cs2drop-success p {
  font-size: 13px;
  color: var(--c-text-2);
}

.cs2drop-errors {
  margin-top: 6px;
  font-size: 11px;
  color: var(--c-red-text);
  background: var(--c-red-soft);
  border: 1px solid var(--c-red);
  border-radius: 8px;
  padding: 8px 12px;
  text-align: left;
  white-space: pre-wrap;
  word-break: break-word;
  width: 100%;
}

/* в”Ђв”Ђ CS2 Drop: background scan progress в”Ђв”Ђ */

.cs2drop-progress {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 32px 20px;
  text-align: center;
}

.cs2drop-progress-icon {
  font-size: 32px;
  color: var(--c-accent);
}

.cs2drop-progress-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--c-text-1);
}

.cs2drop-progress-bar-wrap {
  width: 100%;
  max-width: 320px;
  height: 6px;
  background: var(--c-surface-3);
  border-radius: 999px;
  overflow: hidden;
}

.cs2drop-progress-bar {
  height: 100%;
  background: var(--c-accent);
  border-radius: 999px;
  transition: width 400ms ease;
  min-width: 6px;
}

.cs2drop-progress-count {
  font-size: 13px;
  font-weight: 600;
  color: var(--c-accent);
}

.cs2drop-progress-bots {
  font-size: 12px;
  color: var(--c-text-3);
  max-width: 320px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cs2drop-progress-hint {
  font-size: 11px;
  color: var(--c-text-3);
  font-style: italic;
}

/* compact scan banner вЂ” shown ABOVE results while a background scan runs */
.cs2drop-scan-banner {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 16px;
  margin-bottom: 14px;
  background: var(--c-accent-soft);
  border: 1px solid var(--c-accent);
  border-radius: 12px;
}

.cs2drop-scan-banner-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cs2drop-scan-banner .cs2drop-spin {
  font-size: 16px;
  color: var(--c-accent);
}

.cs2drop-scan-banner-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text-1);
  flex: 1;
}

.cs2drop-scan-banner-count {
  font-size: 13px;
  font-weight: 700;
  color: var(--c-accent);
  white-space: nowrap;
}

.cs2drop-scan-banner .cs2drop-progress-bar-wrap {
  max-width: none;
}

.cs2drop-scan-banner-bots {
  font-size: 12px;
  color: var(--c-text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cs2drop-scan-banner-hint {
  font-size: 11px;
  color: var(--c-text-3);
  font-style: italic;
}

/* в”Ђв”Ђ auto-collect banner + animation в”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђ */
.cs2drop-auto-banner {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 16px;
  margin-bottom: 14px;
  background: var(--c-accent-soft);
  border: 1px solid var(--c-accent);
  border-radius: 12px;
}

.cs2drop-auto-banner.is-active {
  border-color: var(--c-green);
  background: var(--c-green-soft);
}

.cs2drop-auto-banner-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cs2drop-auto-banner-row > i {
  font-size: 16px;
  color: var(--c-accent);
}

.cs2drop-auto-banner.is-active .cs2drop-auto-banner-row > i {
  color: var(--c-green-text);
}

.cs2drop-auto-banner-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text-1);
  flex: 1;
}

.cs2drop-auto-banner-hint {
  font-size: 11px;
  color: var(--c-text-3);
}

/* highlight the bot currently being auto-collected */
.cs2drop-bot-section.is-collecting {
  padding: 12px;
  border: 1px solid var(--c-green);
  border-radius: 16px;
  background: var(--c-green-soft);
}

.cs2drop-bot-section.is-collecting .cs2drop-grid {
  gap: 14px;
}

/* the auto-picked item: same green selected look + a gentle entrance pop */
.cs2drop-item.is-auto-picked {
  animation: cs2AutoPick 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes cs2AutoPick {
  0%   { transform: scale(1); }
  55%  { transform: scale(1.06); }
  100% { transform: scale(1); }
}

/* "sending" stage вЂ” pulse the picked item to signal the trade is going out */
.cs2drop-item.is-sending {
  animation: cs2Sending 1.1s ease-in-out infinite;
}

@keyframes cs2Sending {
  0%, 100% { box-shadow: 0 0 0 2px var(--c-green-soft); }
  50%      { box-shadow: 0 0 0 4px var(--c-green); }
}

/* в”Ђв”Ђ toast notifications в”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђ */
.toast-container {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 360px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--c-surface-2, #1c1c24);
  border: 1px solid var(--c-border, rgba(255, 255, 255, 0.12));
  color: var(--c-text-1);
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--c-shadow-lg, 0 12px 32px rgba(0, 0, 0, 0.35));
  cursor: pointer;
  opacity: 0;
  transform: translateX(24px);
  transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.toast.is-in  { opacity: 1; transform: translateX(0); }
.toast.is-out { opacity: 0; transform: translateX(24px); }

.toast > i { font-size: 18px; flex-shrink: 0; }
.toast--success > i { color: var(--c-green); }
.toast--info > i    { color: var(--c-accent); }
.toast--warn > i    { color: #f5a623; }
.toast--error > i   { color: var(--c-red, #ff5b5b); }

/* empty state while scan is still running вЂ” neutral, not "success green" */
.cs2drop-empty--scanning {
  color: var(--c-text-2);
}

.cs2drop-empty--scanning i {
  color: var(--c-accent);
}

/* idle banner вЂ” no rewards right now, automatic hourly recheck */
.cs2drop-idle-banner {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px 18px;
  background: var(--c-surface-2);
  border: 1px solid var(--c-border);
  border-radius: 14px;
}

.cs2drop-idle-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.cs2drop-idle-row > i {
  font-size: 26px;
  color: var(--c-accent);
  flex-shrink: 0;
}

.cs2drop-idle-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.cs2drop-idle-text strong {
  font-size: 15px;
  color: var(--c-text-1);
}

.cs2drop-idle-text span {
  font-size: 13px;
  color: var(--c-text-2);
}

.cs2drop-idle-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  padding-top: 10px;
  border-top: 1px solid var(--c-border);
  font-size: 12px;
  color: var(--c-text-3);
}

.cs2drop-idle-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cs2drop-idle-meta i {
  font-size: 13px;
  color: var(--c-accent);
}

/* rescan button (full, shown in empty state) */
.cs2drop-rescan-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  background: var(--c-surface-2);
  border: 1px solid var(--c-border-strong);
  color: var(--c-text-2);
  font-family: inherit;
  margin-top: 4px;
  transition: background-color 150ms ease, color 150ms ease;
}

.cs2drop-rescan-btn:hover {
  background: var(--c-surface-3);
  color: var(--c-text-1);
}

/* rescan button (inline icon, shown in intro bar) */
.cs2drop-rescan-btn-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  background: var(--c-surface);
  border: 1px solid var(--c-border-strong);
  color: var(--c-text-2);
  font-family: inherit;
  vertical-align: middle;
  margin-left: 6px;
  transition: background-color 150ms ease, color 150ms ease;
}

.cs2drop-rescan-btn-inline:hover {
  background: var(--c-surface-3);
  color: var(--c-text-1);
}

/* в”Ђв”Ђ CS2 Drop: account management section в”Ђв”Ђ */

.cs2drop-mgmt {
  border: 1px solid var(--c-border);
  border-radius: 12px;
  overflow: hidden;
}

.cs2drop-mgmt-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text-2);
  cursor: pointer;
  list-style: none;
  user-select: none;
  background: var(--c-surface-2);
}

.cs2drop-mgmt-summary::-webkit-details-marker { display: none; }
.cs2drop-mgmt-summary::marker { display: none; }

.cs2drop-mgmt-summary:hover {
  color: var(--c-text-1);
  background: var(--c-surface-3);
}

.cs2drop-mgmt-badges {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cs2drop-mgmt-badge {
  background: var(--c-red-soft);
  color: var(--c-red-text);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  min-width: 22px;
  text-align: center;
}

.cs2drop-mgmt-badge.is-green {
  background: var(--c-green-soft);
  color: var(--c-green-text);
}
.cs2drop-mgmt-badge.is-yellow {
  background: rgba(245, 166, 35, 0.16);
  color: #f5a623;
}
.cs2drop-mgmt-badge.is-gray {
  background: var(--c-surface-3, rgba(255, 255, 255, 0.08));
  color: var(--c-text-3);
}

.cs2drop-mgmt-body {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-top: 1px solid var(--c-border);
}

.cs2drop-mgmt-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--c-surface-2);
  border: 1px solid var(--c-border);
  border-radius: 10px;
}

.cs2drop-mgmt-row--excluded {
  opacity: 0.65;
}

.cs2drop-mgmt-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cs2drop-mgmt-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text-1);
}

.cs2drop-mgmt-err-text {
  font-size: 11px;
  color: var(--c-red-text);
}

.cs2drop-mgmt-skip-text {
  font-size: 11px;
  color: var(--c-text-3);
  font-style: italic;
}

.cs2drop-mgmt-ok-text {
  font-size: 11px;
  color: var(--c-green-text, #22a05b);
  font-weight: 500;
}

.cs2drop-mgmt-done-text {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--c-green-text);
  font-weight: 600;
}

.cs2drop-mgmt-row--done {
  background: var(--c-green-soft);
  border-color: color-mix(in srgb, var(--c-green) 35%, transparent);
}

.cs2drop-collected-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  margin-bottom: 4px;
  border-radius: 12px;
  background: var(--c-green-soft);
  border: 1px solid color-mix(in srgb, var(--c-green) 30%, transparent);
  color: var(--c-green-text);
  font-size: 12px;
  font-weight: 600;
}

.cs2drop-collected-banner i {
  font-size: 16px;
}

.cs2drop-collected-banner strong {
  color: var(--c-green-text);
}

.cs2drop-exclude-btn,
.cs2drop-include-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  flex-shrink: 0;
  transition: opacity 150ms ease;
}

.cs2drop-exclude-btn {
  background: var(--c-red-soft);
  border: 1px solid var(--c-red);
  color: var(--c-red-text);
}

.cs2drop-include-btn {
  background: var(--c-green-soft);
  border: 1px solid var(--c-green);
  color: var(--c-green-text);
}

.cs2drop-exclude-btn:hover:not(:disabled),
.cs2drop-include-btn:hover:not(:disabled) { opacity: 0.8; }

.cs2drop-exclude-btn:disabled,
.cs2drop-include-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ============================================================
   MEDIA QUERIES
   ============================================================ */

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

  .left-nav {
    position: static;
    border-radius: 16px;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
  }

  .brand {
    flex: 0 0 auto;
  }

  .tab-nav {
    flex-direction: row;
    flex: 1;
  }

  .tab-btn {
    flex: 1;
    justify-content: center;
    min-height: 44px;
    font-size: 13px;
  }

  .nav-action-btn {
    flex: 1;
    width: auto;
    justify-content: center;
    min-height: 44px;
    font-size: 13px;
  }

  .theme-toggle-wrap {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
    border-left: 1px solid var(--c-border);
    padding-left: 12px;
  }

  .hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

@media (max-width: 680px) {
  .app-shell {
    padding: 12px;
    gap: 12px;
  }

  .card {
    border-radius: 16px;
    padding: 16px;
  }

  .chips {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .chip {
    padding: 12px;
  }

  .avatar {
    width: 38px;
    height: 38px;
  }

  .chip-info strong {
    font-size: 13px;
  }

  .chip-wallet {
    font-size: 10px;
    padding: 3px 8px;
    max-width: 80px;
  }

  h1 {
    font-size: 24px;
  }

  h2 {
    font-size: 16px;
  }

  .global-loot-btn {
    font-size: 12px;
    padding: 8px 12px;
  }

  .modal-window {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 24px);
    border-radius: 16px;
  }

  .inv-grid {
    grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
    gap: 6px;
  }

  .inv-stat {
    min-width: 100px;
    padding: 8px 12px;
    font-size: 12px;
  }
}

/* ============================================================
   MINOUR MONO PRODUCT SYSTEM
   Shared with the public landing: neutral surfaces, white actions,
   emerald status, and crisp motion with clear interaction feedback.
   ============================================================ */

body {
  background: var(--c-bg);
  color: var(--c-text-1);
}

.app-shell {
  max-width: 1920px;
  grid-template-columns: 236px minmax(0, 1fr);
  gap: 20px;
  padding: 20px 24px;
}

.left-nav {
  top: 20px;
  min-height: calc(100vh - 40px);
  padding: 18px 14px 14px;
  background: var(--c-glass);
  border-color: var(--c-border);
  border-radius: 8px;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.brand {
  padding: 0 8px 18px;
}

.brand-logo {
  width: 40px;
  height: 40px;
  border: 1px solid var(--c-border-strong);
  border-radius: 8px;
  background: var(--c-surface-2);
  overflow: hidden;
}

.brand strong {
  letter-spacing: 0;
}

.brand p,
.eyebrow,
.dash-section-title,
.sgroup-head {
  letter-spacing: 0;
}

.tab-nav {
  gap: 3px;
}

.tab-btn,
.nav-action-btn {
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  transition: background-color 160ms var(--ease-ui), border-color 160ms var(--ease-ui), color 160ms var(--ease-ui), transform 120ms var(--ease-ui);
}

.tab-btn.is-active {
  background: var(--c-surface-2);
  border-color: var(--c-border-strong);
  color: var(--c-text-1);
}

.tab-btn.is-active::before {
  left: -1px;
  width: 2px;
  height: 20px;
  border-radius: 0 2px 2px 0;
  background: var(--c-accent);
  animation: minourTabBarIn 180ms var(--ease-ui);
}

@keyframes minourTabBarIn {
  from { opacity: 0; transform: translateY(-50%) scaleY(0.72); }
  to { opacity: 1; transform: translateY(-50%) scaleY(1); }
}

.tab-btn.is-active i {
  color: var(--c-text-1);
  animation: none;
}

.theme-toggle-wrap {
  padding-top: 14px;
}

.theme-toggle-btn,
.sidebar-profile-btn {
  min-height: 40px;
  border-radius: 6px;
  background: transparent;
  transition: background-color 160ms var(--ease-ui), border-color 160ms var(--ease-ui), color 160ms var(--ease-ui), transform 120ms var(--ease-ui);
}

.content-area,
.tab-panel,
.dash-wrap {
  gap: 12px;
}

.card,
.section-card,
.dash-kpi-card,
.dash-chart-card,
.dash-card,
.sgroup,
.asf-connect-card,
.asf-install-quick,
.autosell-body {
  border-color: var(--c-border);
  border-radius: 8px;
  background: var(--c-surface);
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.hero {
  min-height: 96px;
  padding: 20px;
  background: var(--c-surface);
  border-color: var(--c-border);
  box-shadow: none;
}

.hero h1 {
  font-size: 25px;
  font-weight: 700;
}

.eyebrow {
  color: var(--c-text-3);
}

.state-badge {
  border-radius: 6px;
  background: transparent !important;
}

.state-online .state-dot,
.chip-status--online .status-dot {
  box-shadow: 0 0 0 3px var(--c-green-soft);
}

button,
.button-link,
.btn,
.s-save-btn,
.agent-dl-btn,
.misc-open-btn,
.fwin-actions button,
.fwin-tradeurl-save,
.fwin-tradeurl-get {
  border-radius: 6px;
  transition: background-color 160ms var(--ease-ui), border-color 160ms var(--ease-ui), color 160ms var(--ease-ui), box-shadow 180ms var(--ease-ui), opacity 150ms ease-out, transform 120ms var(--ease-ui) !important;
}

button:active:not(:disabled),
.button-link:active,
.btn:active:not(:disabled),
.agent-dl-btn:active,
.misc-open-btn:active:not(.is-locked) {
  transform: scale(0.97) !important;
  transition-duration: 70ms !important;
}

button:focus-visible,
.button-link:focus-visible,
.tab-btn:focus-visible,
.chip:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--c-bg), 0 0 0 4px var(--c-text-2) !important;
}

.btn-primary,
.s-save-btn,
.cs2drop-confirm-btn,
.creds-save-btn,
.fwin-login-btn,
#annModalBackdrop .btn-primary,
#tradeupModalBackdrop .btn-primary,
.autosell-body .btn-primary,
.as-save {
  border: 1px solid rgba(0, 0, 0, 0.68) !important;
  background: var(--c-action) !important;
  color: var(--c-action-text) !important;
  box-shadow: var(--c-action-shadow) !important;
  opacity: 1 !important;
}

@media (hover: hover) and (pointer: fine) {
  .tab-btn:hover:not(.is-active),
  .nav-action-btn:hover:not(:disabled),
  .theme-toggle-btn:hover,
  .sidebar-profile-btn:hover {
    background: var(--c-surface-2);
    border-color: var(--c-border);
    color: var(--c-text-1);
    transform: none;
  }

  .btn-primary:hover:not(:disabled),
  .s-save-btn:hover:not(:disabled),
  .cs2drop-confirm-btn:hover:not(:disabled),
  .creds-save-btn:hover:not(:disabled),
  .fwin-login-btn:hover:not(:disabled),
  #annModalBackdrop .btn-primary:hover:not(:disabled),
  #tradeupModalBackdrop .btn-primary:hover:not(:disabled),
  .autosell-body .btn-primary:hover:not(:disabled),
  .as-save:hover:not(:disabled) {
    background: var(--c-action-hover) !important;
    border-color: rgba(0, 0, 0, 0.82) !important;
    box-shadow: 0 1px 0 #f4f4f5 inset, 0 0 0 1px rgba(0, 0, 0, 0.48), 0 14px 34px rgba(0, 0, 0, 0.34) !important;
    filter: none !important;
    transform: translateY(-2px);
  }

  .chip:hover {
    border-color: var(--c-border-strong);
    box-shadow: var(--c-shadow-md);
    transform: translateY(-2px);
  }

  .fwin-item.is-draggable:hover {
    border-color: var(--c-border-strong);
    transform: translateY(-1px);
  }
}

input,
textarea,
select,
.sfield-input,
.as-input-wrap input,
.fwin-tradeurl-input {
  border-color: var(--c-border-strong);
  border-radius: 6px;
  background: var(--c-bg);
  color: var(--c-text-1);
  transition: border-color 150ms ease-out, background-color 150ms ease-out, box-shadow 150ms ease-out;
}

input:focus,
textarea:focus,
select:focus,
.sfield-input:focus,
.as-input-wrap input:focus,
.fwin-tradeurl-input:focus {
  border-color: var(--c-text-2);
  background: var(--c-surface);
  box-shadow: 0 0 0 3px var(--c-accent-soft);
}

.tab-panel-enter {
  animation: minourPanelIn 220ms var(--ease-ui);
}

.tab-panel-enter > * {
  animation: minourPanelChildIn 240ms var(--ease-ui) backwards;
}

.tab-panel-enter > *:nth-child(1) { animation-delay: 20ms; }
.tab-panel-enter > *:nth-child(2) { animation-delay: 50ms; }
.tab-panel-enter > *:nth-child(3) { animation-delay: 80ms; }
.tab-panel-enter > *:nth-child(4) { animation-delay: 110ms; }

@keyframes minourPanelIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes minourPanelChildIn {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

.chip {
  padding: 16px 16px 46px;
  border-radius: 8px;
  background: var(--c-surface);
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.chip--main {
  border-color: var(--c-orange);
  background: var(--c-orange-soft);
}

.chip--enter {
  animation: minourChipIn 240ms var(--ease-ui) backwards;
  animation-delay: calc(var(--chip-i, 0) * 24ms);
}

@keyframes minourChipIn {
  from { opacity: 0; transform: translateY(8px) scale(0.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.chip-open-btn,
.chip-main-badge,
.chip-wallet {
  border-radius: 6px;
}

.chip-open-btn {
  background: var(--c-action);
  border-color: rgba(0, 0, 0, 0.62);
  color: var(--c-action-text);
  box-shadow: var(--c-action-shadow);
}

.mass-actions,
.mass-actions-toggle,
.mass-actions-panel-inner,
.global-loot-btn {
  border-radius: 6px;
}

.dash-kpi-card {
  border-left-width: 2px;
  padding: 14px 15px;
}

.dash-kpi-card--accent,
.dash-kpi-card--purple {
  border-left-color: var(--c-text-1);
}

.dash-kpi-icon-wrap--accent,
.dash-kpi-icon-wrap--purple {
  background: var(--c-accent-soft);
  color: var(--c-text-1);
}

.dash-kpi-card:hover {
  box-shadow: none;
}

.dash-period-tabs,
.dash-refresh-btn,
.dash-donut-tab,
.dash-table-wrap,
.as-history-table {
  border-radius: 6px;
}

.dash-period-btn.is-active,
.dash-donut-tab.is-active,
.ann-chip.is-active {
  background: var(--c-action) !important;
  color: var(--c-action-text) !important;
  box-shadow: var(--c-action-shadow);
}

.sgroup {
  background: var(--c-surface);
}

.sgroup-head {
  padding: 13px 18px;
  background: var(--c-surface-2);
  color: var(--c-text-1);
}

.sgroup-head i,
.fwin-section-title i,
.as-history-head i {
  color: var(--c-text-2);
}

.asf-connect-badge--purple {
  background: var(--c-accent-soft);
  color: var(--c-text-1);
}

.agent-dl-btn {
  background: var(--c-surface-2);
  color: var(--c-text-1);
}

.agent-dl-btn:hover {
  background: var(--c-surface-3);
  border-color: var(--c-border-strong);
  color: var(--c-text-1);
}

.modal-backdrop,
.profile-backdrop,
.qty-modal-backdrop {
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.modal-window,
.profile-modal,
.qty-modal,
.tradeup-modal {
  border-color: var(--c-border-strong);
  border-radius: 8px;
  background: var(--c-bg-elev);
  box-shadow: var(--c-shadow-lg);
}

.fwin {
  border-color: var(--c-border-strong);
  background: var(--c-bg-elev);
  box-shadow: var(--c-shadow-lg);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.fwin--enter {
  animation: minourWindowIn 190ms ease-out;
}

.fwin.is-closing {
  animation: minourWindowOut 140ms ease-in forwards;
}

.fwin--enter .fwin-body {
  animation: minourWindowBodyIn 220ms var(--ease-ui) both;
}

@keyframes minourWindowIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes minourWindowOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes minourWindowBodyIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.fwin-header {
  padding: 11px 14px;
  background: var(--c-bg-elev);
}

.fwin-stat,
.fwin-actions button,
.fwin-section,
.fwin-item,
.fwin-tradeurl-input,
.fwin-tradeurl-save,
.fwin-tradeurl-get {
  border-radius: 6px;
  background: var(--c-surface);
}

.fwin-login-btn {
  grid-column: 1 / -1;
}

.fwin-section > summary {
  background: var(--c-surface);
}

.fwin-grid {
  gap: 7px;
  background: var(--c-bg-elev);
  scrollbar-color: var(--c-scroll-thumb) transparent;
}

.fwin-grid::-webkit-scrollbar-track {
  border-left: 1px solid var(--c-border);
  background: transparent;
}

.fwin-item.is-draggable {
  transition: border-color 150ms ease-out, transform 150ms var(--ease-ui), box-shadow 150ms ease-out;
}

.ann-card,
.admin-card,
.tu-card,
.as-section,
.as-result-item {
  border-radius: 8px;
}

@media (max-width: 900px) {
  .app-shell {
    padding: 12px;
    gap: 12px;
  }

  .left-nav {
    min-height: 0;
    top: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tab-panel-enter,
  .tab-panel-enter > *,
  .chip--enter,
  .fwin--enter .fwin-body,
  .tab-btn.is-active::before {
    animation-duration: 1ms !important;
    animation-delay: 0ms !important;
    transform: none !important;
  }

  .fwin--enter,
  .fwin.is-closing {
    animation: none !important;
  }
}

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

  .tab-btn i {
    display: none;
  }

  .chip-wallet {
    display: none;
  }
}

/* ============================================================
   SETTINGS TAB
   ============================================================ */

.settings-block {
  padding: 16px 0;
  border-top: 1px solid var(--c-border);
}
.settings-block:first-of-type {
  border-top: none;
  padding-top: 0;
}

.settings-save-status {
  align-self: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text-2);
}

.settings-subhead {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--c-text-2);
}
.settings-subhead i {
  font-size: 15px;
  color: var(--c-accent);
}

/* spacing between stacked toggle rows in a group */
.setting-toggle-group {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.setting-toggle-row,
.setting-input-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.setting-input-control {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}
.setting-input-control input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
  width: 84px;
  padding: 8px 10px;
  text-align: right;
  border-radius: 10px;
  border: 1px solid var(--c-border);
  background: var(--c-surface-2);
  color: var(--c-text-1);
  font-size: 14px;
  font-weight: 600;
}
.setting-input-control input[type="number"]:focus {
  outline: none;
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px var(--c-accent-soft);
}
.setting-input-control input[type="number"]::-webkit-outer-spin-button,
.setting-input-control input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.setting-input-unit {
  font-size: 13px;
  color: var(--c-text-2);
}
.setting-toggle-text strong {
  display: block;
  font-size: 14px;
}
.setting-toggle-text .hint {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--c-text-2);
  max-width: 520px;
}

.switch {
  position: relative;
  flex: 0 0 auto;
  display: inline-block;
  width: 46px;
  height: 26px;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.switch-slider {
  position: absolute;
  inset: 0;
  cursor: pointer;
  background: var(--c-surface-3);
  border-radius: 999px;
  transition: background 150ms ease;
}
.switch-slider::before {
  content: "";
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  top: 3px;
  background: #ffffff;
  border-radius: 50%;
  transition: transform 150ms ease;
  box-shadow: var(--c-shadow-sm);
}
.switch input:checked + .switch-slider {
  background: var(--c-accent);
}
.switch input:checked + .switch-slider::before {
  transform: translateX(20px);
}

/* ============================================================
   FLOATING ACCOUNT WINDOWS (draggable, multi-instance, no backdrop)
   ============================================================ */

.fwin {
  position: fixed;
  top: 0;
  left: 0;
  width: min(1040px, calc(100vw - 32px));
  height: min(640px, calc(100vh - 32px));
  max-width: calc(100vw - 24px);
  max-height: calc(100vh - 24px);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--c-glass-border);
  border-radius: 8px;
  background: var(--c-bg-elev, var(--c-surface));
  -webkit-backdrop-filter: blur(var(--c-blur));
  backdrop-filter: blur(var(--c-blur));
  box-shadow: var(--c-shadow-lg, 0 20px 60px rgba(0, 0, 0, 0.4));
  overflow: hidden;
  /* positioning lives in inline transform: translate3d(x,y,0). Do NOT animate transform. */
  will-change: transform;
  contain: layout paint;
}

.fwin--enter {
  animation: fwinIn 200ms ease-out;
}

.fwin.is-closing {
  animation: fwinOut 170ms ease-in forwards;
  pointer-events: none;
}

.fwin.is-dragging {
  cursor: grabbing;
  box-shadow: var(--c-shadow-lg, 0 28px 70px rgba(0, 0, 0, 0.5));
  user-select: none;
}

.fwin.fwin-attention {
  animation: fwinAttention 600ms ease;
}

@keyframes fwinIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes fwinOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes fwinAttention {
  0%, 100% { box-shadow: var(--c-shadow-lg, 0 20px 60px rgba(0, 0, 0, 0.4)); }
  35%      { box-shadow: 0 0 0 3px var(--c-accent), var(--c-shadow-lg, 0 20px 60px rgba(0, 0, 0, 0.4)); }
}

.fwin-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--c-glass-border);
  background: var(--c-surface);
  cursor: grab;
  touch-action: none;
  flex-shrink: 0;
}

.fwin-header:active { cursor: grabbing; }

.fwin-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--c-border);
  flex-shrink: 0;
  pointer-events: none;
}

.fwin-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1 1 0;
  pointer-events: none;
}

.fwin-title strong {
  font-size: 14px;
  font-weight: 600;
  color: var(--c-text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fwin-sub {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 500;
}

.fwin-sub.is-online  { color: var(--c-green-text); }
.fwin-sub.is-online  .status-dot { background: var(--c-green); box-shadow: 0 0 0 2px var(--c-green-soft); }
.fwin-sub.is-offline { color: var(--c-text-3); }
.fwin-sub.is-offline .status-dot { background: var(--c-text-3); }

.fwin-close {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--c-text-3);
  font-size: 13px;
  cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease;
}

.fwin-close:hover {
  background: var(--c-red-soft, rgba(255, 80, 80, 0.12));
  color: var(--c-red-text, #ff5b5b);
}

.fwin-body {
  position: relative;
  min-height: 0;
  flex: 1 1 auto;
  padding: 12px;
  overflow-y: hidden;
  overflow-x: hidden;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 12px;
}

.fwin-overview {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-right: 12px;
  border-right: 1px solid var(--c-border);
  overflow-y: auto;
}

.fwin-inventories {
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  overflow: hidden;
}

.fwin-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.fwin-stats--3 {
  grid-template-columns: repeat(3, 1fr);
}

.fwin-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 4px;
  border-radius: 7px;
  background: var(--c-surface);
  border: 1px solid var(--c-glass-border);
}

.fwin-stat-val {
  font-size: 14px;
  font-weight: 700;
  color: var(--c-text-1);
}

.fwin-stat-lbl {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--c-text-3);
  text-align: center;
}

.fwin-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.fwin-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 8px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid var(--c-glass-border);
  background: var(--c-surface);
  color: var(--c-text-2);
  transition: border-color 140ms ease, color 140ms ease, background-color 140ms ease, transform 120ms ease;
  min-width: 0;
}

.fwin-actions button:hover:not(:disabled) {
  border-color: var(--c-accent);
  color: var(--c-accent);
  background: var(--c-accent-soft);
}

.fwin-actions button:active:not(:disabled) { transform: scale(0.97); }
.fwin-actions button:disabled { opacity: 0.6; cursor: not-allowed; }

.fwin-login-btn {
  grid-column: 1 / -1;
  background: var(--c-accent-soft) !important;
  border-color: var(--c-accent) !important;
  color: var(--c-accent) !important;
}

/* в”Ђв”Ђ Trade URL field (bot window) в”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђ */
.fwin-tradeurl {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: auto;
}

.fwin-tradeurl-lbl {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  color: var(--c-text-3);
  letter-spacing: 0.02em;
}

.fwin-tradeurl-row {
  display: flex;
  gap: 6px;
  align-items: stretch;
}

.fwin-tradeurl-input {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 7px;
  border: 1px solid var(--c-glass-border);
  background: var(--c-surface);
  color: var(--c-text-1);
  font-size: 11px;
  font-family: inherit;
  transition: border-color 140ms ease;
}

.fwin-tradeurl-input::placeholder { color: var(--c-text-3); }
.fwin-tradeurl-input:focus {
  outline: none;
  border-color: var(--c-accent);
}

.fwin-tradeurl-save,
.fwin-tradeurl-get {
  flex-shrink: 0;
  width: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  border: 1px solid var(--c-glass-border);
  background: var(--c-surface);
  color: var(--c-text-2);
  cursor: pointer;
  font-size: 14px;
  transition: border-color 140ms ease, color 140ms ease, background-color 140ms ease, transform 120ms ease;
}

.fwin-tradeurl-save:hover:not(:disabled),
.fwin-tradeurl-get:hover:not(:disabled) {
  border-color: var(--c-accent);
  color: var(--c-accent);
  background: var(--c-accent-soft);
}

.fwin-tradeurl-save:active:not(:disabled),
.fwin-tradeurl-get:active:not(:disabled) { transform: scale(0.94); }
.fwin-tradeurl-save:disabled,
.fwin-tradeurl-get:disabled { opacity: 0.6; cursor: not-allowed; }

.fwin-tradeurl-hint {
  font-size: 10.5px;
  color: var(--c-text-3);
  min-height: 13px;
}
.fwin-tradeurl-hint.is-ok { color: var(--c-green); }
.fwin-tradeurl-hint.is-err { color: var(--c-red); }

.fwin-section {
  min-width: 0;
  min-height: 0;
  display: block;
  border: 1px solid var(--c-glass-border);
  border-radius: 8px;
  overflow: hidden;
}

.fwin-section[open] {
  height: 100%;
  display: grid;
  grid-template-rows: 44px minmax(0, 1fr);
}

.fwin-section:not([open]) {
  height: auto;
  align-self: start;
}

.fwin-section > summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  list-style: none;
  cursor: pointer;
  min-height: 44px;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--c-text-2);
  background: var(--c-surface);
  user-select: none;
}

.fwin-section > summary::-webkit-details-marker { display: none; }
.fwin-section > summary:hover { color: var(--c-text-1); }

.fwin-section-title,
.fwin-section-meta {
  min-width: 0;
  display: inline-flex;
  align-items: center;
}

.fwin-section-title {
  gap: 6px;
  color: var(--c-text-1);
}

.fwin-section-title i {
  color: var(--c-accent);
}

.fwin-section-meta {
  justify-content: flex-end;
  gap: 7px;
  overflow: hidden;
  color: var(--c-text-3);
  font-size: 10.5px;
  font-weight: 500;
  white-space: nowrap;
}

.fwin-section-meta strong {
  color: var(--c-text-2);
  font-weight: 700;
}

.fwin-section-meta strong.is-loading,
.fwin-item-price.is-muted {
  color: var(--c-text-3);
  font-weight: 500;
}

.fwin-section-chevron {
  color: var(--c-text-3);
  font-size: 10px;
  transition: transform 160ms ease;
}

.fwin-section[open] .fwin-section-chevron {
  transform: rotate(180deg);
}

.fwin-grid {
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-content: start;
  gap: 6px;
  padding: 8px 8px 16px;
  max-height: none;
  overflow-y: scroll;
  overscroll-behavior: contain;
  scroll-padding-block: 8px 16px;
  scroll-snap-type: y proximity;
  scrollbar-gutter: stable;
  scrollbar-color: var(--c-scroll-thumb) var(--c-surface-2);
}

.fwin-grid::-webkit-scrollbar {
  width: 9px;
}

.fwin-grid::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

.fwin-grid::-webkit-scrollbar-track {
  border-left: 1px solid var(--c-border);
  background: var(--c-surface-2);
}

.fwin-grid::-webkit-scrollbar-thumb {
  min-height: 48px;
  border: 2px solid transparent;
  border-radius: 999px;
  background: var(--c-scroll-thumb);
  background-clip: padding-box;
}

.fwin-grid::-webkit-scrollbar-thumb:hover {
  background: var(--c-scroll-thumb-hover);
  background-clip: padding-box;
}

.fwin-empty {
  padding: 16px;
  text-align: center;
  font-size: 12px;
  color: var(--c-text-3);
}

.fwin-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 6px;
  border-radius: 8px;
  background: var(--c-surface);
  border: 1px solid var(--c-glass-border);
  min-width: 0;
  scroll-snap-align: start;
  scroll-snap-stop: normal;
}

.fwin-item.is-locked {
  border-color: var(--c-red, #ff5b5b);
  background: var(--c-red-soft, rgba(255, 91, 91, 0.1));
}

.fwin-item.is-locked .fwin-item-img {
  box-shadow: inset 0 0 0 2px var(--c-red, #ff5b5b);
}

.fwin-item-lock {
  position: absolute;
  top: 2px;
  left: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  font-size: 10px;
  line-height: 1;
  color: #fff;
  background: var(--c-red, #ff5b5b);
}

.fwin-item-lock-text {
  font-size: 10px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--c-red-text, #ff5b5b);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fwin-item-img {
  position: relative;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  overflow: hidden;
}

.fwin-item-img img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.fwin-item-amt {
  position: absolute;
  bottom: 2px;
  right: 2px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
}

.fwin-item-name {
  font-size: 10px;
  line-height: 1.2;
  color: var(--c-text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fwin-item-price {
  font-size: 10px;
  font-weight: 700;
  color: var(--c-green-text);
}

.fwin-body.is-creds {
  display: block;
  overflow-y: auto;
  padding: 24px;
}

.fwin-body.is-creds .creds-notice,
.fwin-creds-form {
  width: min(560px, 100%);
  margin-inline: auto;
}

.fwin-creds-form {
  gap: 8px;
  margin-top: 12px;
}

.fwin-body > .details-error {
  grid-column: 1 / -1;
}

.fwin-skeleton-overview {
  overflow: hidden;
}

.fwin-skeleton-stat {
  height: 54px;
  border-radius: 7px;
}

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

.fwin-skeleton-action {
  height: 37px;
  border-radius: 7px;
}

.fwin-skeleton-action.is-wide {
  grid-column: 1 / -1;
}

.fwin-skeleton-trade {
  display: grid;
  gap: 7px;
  margin-top: auto;
}

.fwin-skeleton-label {
  width: 88px;
  height: 12px;
  border-radius: 4px;
}

.fwin-skeleton-input {
  height: 39px;
  border-radius: 7px;
}

.fwin-skeleton-section > summary {
  pointer-events: none;
}

.fwin-skeleton-title {
  width: 62px;
  height: 14px;
  border-radius: 4px;
}

.fwin-skeleton-meta {
  justify-self: end;
  width: 112px;
  height: 12px;
  border-radius: 4px;
}

.fwin-skeleton-grid {
  height: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-content: start;
  gap: 6px;
  padding: 8px 17px 8px 8px;
  overflow: hidden;
}

.fwin-skeleton-item {
  height: 142px;
  border-radius: 8px;
}

.fwin-skeleton-item:nth-child(2n) { animation-delay: 0.1s; }
.fwin-skeleton-item:nth-child(3n) { animation-delay: 0.2s; }

@media (max-width: 880px) {
  .fwin {
    width: min(720px, calc(100vw - 24px));
  }

  .fwin-body {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }

  .fwin-overview {
    overflow: visible;
    padding-right: 0;
    padding-bottom: 12px;
    border-right: 0;
    border-bottom: 1px solid var(--c-border);
  }

  .fwin-tradeurl {
    margin-top: 0;
  }

  .fwin-inventories {
    height: auto;
    min-height: 360px;
    overflow: visible;
  }

  .fwin-section[open] {
    height: 360px;
  }

  .fwin-grid {
    max-height: none;
  }
}

@media (max-width: 560px) {
  .fwin {
    width: calc(100vw - 24px);
    height: calc(100vh - 24px);
  }

  .fwin-inventories {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .fwin-section {
    min-height: 280px;
  }

  .fwin-section[open] {
    height: 360px;
  }

  .fwin-section:not([open]) {
    min-height: 0;
  }
}

/* ============================================================
   REDUCED MOTION вЂ” kill decorative animation, keep spinners
   ============================================================ */
/* ============================================================
   ITEM DRAG-AND-DROP TRANSFER
   ============================================================ */
.fwin-item.is-draggable {
  cursor: grab;
}

.fwin-item.is-draggable:active {
  cursor: grabbing;
}

.fwin-item.is-dragging-item {
  opacity: 0.4;
  transform: scale(0.96);
}

/* receiving window highlight while dragging over it */
.fwin.is-drop-target {
  outline: 2px dashed var(--c-accent);
  outline-offset: -4px;
  box-shadow: var(--c-accent-glow), var(--c-shadow-lg);
}

.fwin.is-drop-target .fwin-body::after {
  content: "РџРµСЂРµРЅРµСЃС‚Рё СЃСЋРґР°";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--c-accent);
  background: var(--c-accent-soft);
  border-radius: 14px;
  pointer-events: none;
  z-index: 5;
}

.fwin-body { position: relative; }

/* card mid-transfer */
.fwin-item.is-transferring {
  opacity: 0.55;
  pointer-events: none;
  position: relative;
}

.fwin-item.is-transferring::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--c-accent);
  border-top-color: transparent;
  border-radius: 50%;
  animation: itemSpin 700ms linear infinite;
}

@keyframes itemSpin { to { transform: rotate(360deg); } }

/* flying ghost clone */
.item-fly-ghost {
  position: fixed;
  z-index: 100000;
  pointer-events: none;
  margin: 0;
  transition: transform 600ms cubic-bezier(0.4, 0, 0.2, 1), opacity 600ms ease;
  box-shadow: var(--c-shadow-lg);
}

/* blur the source window while picking quantity */
.fwin.is-blurred {
  filter: blur(3px);
  pointer-events: none;
  transition: filter 160ms ease;
}

/* ============================================================
   TRANSFER QUANTITY MINI-MODAL
   ============================================================ */
.qty-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100001;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.45);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 160ms ease;
}

.qty-modal-backdrop.is-open { opacity: 1; }
.qty-modal-backdrop.is-closing { opacity: 0; }

.qty-modal {
  width: min(320px, 90vw);
  background: var(--c-surface-1, var(--c-surface-2));
  border: 1px solid var(--c-border);
  border-radius: 18px;
  padding: 20px;
  box-shadow: var(--c-shadow-lg);
  transform: scale(0.94);
  transition: transform 200ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.qty-modal-backdrop.is-open .qty-modal { transform: scale(1); }

.qty-modal-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--c-text-1);
  margin-bottom: 4px;
}

.qty-modal-item {
  font-size: 13px;
  color: var(--c-text-3);
  margin-bottom: 16px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qty-modal-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.qty-step {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 10px;
  border: 1px solid var(--c-border);
  background: var(--c-surface-2);
  color: var(--c-text-1);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background-color 140ms ease;
}

.qty-step:hover { background: var(--c-accent-soft); color: var(--c-accent); }

.qty-input {
  flex: 1;
  height: 38px;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  border-radius: 10px;
  border: 1px solid var(--c-border);
  background: var(--c-surface-2);
  color: var(--c-text-1);
  font-family: inherit;
  -moz-appearance: textfield;
  appearance: textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.qty-range {
  width: 100%;
  margin-bottom: 18px;
  accent-color: var(--c-accent);
}

.qty-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.qty-cancel,
.qty-confirm {
  padding: 9px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  border: 1px solid var(--c-border);
}

.qty-cancel { background: transparent; color: var(--c-text-2); }
.qty-cancel:hover { background: var(--c-surface-2); color: var(--c-text-1); }

.qty-confirm {
  background: var(--c-accent);
  border-color: var(--c-accent);
  color: #fff;
}

.qty-confirm:hover { opacity: 0.9; }

@media (prefers-reduced-motion: reduce) {
  .modal-backdrop,
  .modal-window,
  .modal-backdrop.is-closing,
  .modal-backdrop.is-closing .modal-window,
  .tab-panel-enter,
  .tab-panel-enter > *,
  .chip--enter,
  .fwin--enter,
  .fwin-attention,
  .cs2drop-item.is-auto-picked,
  .cs2drop-item.is-sending,
  .tab-btn.is-active::before,
  .tab-btn.is-active i {
    animation: none !important;
  }
  .fwin.is-closing { animation: none !important; }
  .toast { transition: opacity 0.28s ease !important; transform: none !important; }
  .mass-actions-chevron,
  .mass-actions-panel,
  .mass-actions-panel-inner .global-loot-item {
    transition: none !important;
  }
  .item-fly-ghost,
  .qty-modal,
  .qty-modal-backdrop {
    transition: opacity 0.16s ease !important;
    transform: none !important;
  }
  button:active:not(:disabled),
  .button-link:active,
  .tab-btn:active,
  .tab-btn:hover:not(.is-active),
  .chip:active,
  .chip:hover {
    transform: none !important;
  }
}

/* в•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђ
   CS2 Drop Statistics Dashboard
   в•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђ */

.dash-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 4px 0 24px;
}

/* в”Ђв”Ђ KPI row в”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђ */

.dash-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

@media (max-width: 1080px) {
  .dash-kpi-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .dash-kpi-row { grid-template-columns: 1fr; }
}

.dash-kpi-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-left-width: 3px;
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 13px;
  transition: transform 0.15s, box-shadow 0.15s;
}
.dash-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(0,0,0,0.35);
}

.dash-kpi-card--accent { border-left-color: var(--c-accent); }
.dash-kpi-card--teal   { border-left-color: #06b6d4; }
.dash-kpi-card--gold   { border-left-color: #f59e0b; }
.dash-kpi-card--purple { border-left-color: var(--c-text-1); }

.dash-kpi-icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}
.dash-kpi-icon-wrap--accent { background: var(--c-accent-soft); color: var(--c-text-1); }
.dash-kpi-icon-wrap--teal   { background: rgba(6,182,212,0.15);   color: #06b6d4; }
.dash-kpi-icon-wrap--gold   { background: rgba(245,158,11,0.15);  color: #f59e0b; }
.dash-kpi-icon-wrap--purple { background: var(--c-accent-soft); color: var(--c-text-1); }

.dash-kpi-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.dash-kpi-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--c-text-2);
  white-space: nowrap;
}

.dash-kpi-value {
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--c-text-1);
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* в”Ђв”Ђ Period bar в”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђ */

.dash-period-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.dash-period-tabs {
  display: flex;
  gap: 4px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 10px;
  padding: 4px;
}

.dash-period-btn {
  border: none;
  background: transparent;
  color: var(--c-text-2);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 5px 14px;
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.dash-period-btn:hover {
  background: var(--c-surface-2);
  color: var(--c-text-1);
}
.dash-period-btn.is-active {
  background: var(--c-accent);
  color: #fff;
}

.dash-refresh-btn {
  border: 1px solid var(--c-border);
  background: var(--c-surface);
  color: var(--c-text-2);
  width: 34px;
  height: 34px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: color 0.15s, border-color 0.15s;
  flex-shrink: 0;
}
.dash-refresh-btn:hover {
  color: var(--c-accent);
  border-color: var(--c-accent);
}

@keyframes dash-spin {
  to { transform: rotate(360deg); }
}
.spin {
  display: inline-block;
  animation: dash-spin 0.7s linear infinite;
}

/* в”Ђв”Ђ Charts row в”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђ */

.dash-charts-row {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 12px;
  align-items: stretch;
}

@media (max-width: 940px) {
  .dash-charts-row { grid-template-columns: 1fr; }
}

.dash-chart-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 14px;
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dash-chart-main {
  display: flex;
  flex-direction: column;
}

.dash-bar-canvas-wrap {
  flex: 1;
  min-height: 240px;
  position: relative;
}

.dash-bar-canvas-wrap canvas {
  position: absolute !important;
  inset: 0 !important;
  height: 100% !important;
  width: 100% !important;
}

.dash-chart-side {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dash-chart-side-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.dash-donut-total {
  text-align: center;
  padding: 2px 0 4px;
  min-height: 20px;
}
.dash-donut-total-val {
  font-size: 1rem;
  font-weight: 700;
  color: var(--c-accent);
}
.dash-donut-total-lbl {
  font-size: 0.72rem;
  color: var(--c-text-2);
}

.dash-donut-wrap {
  position: relative;
  height: 220px;
}
.dash-donut-wrap canvas {
  height: 220px !important;
  width: 220px !important;
  display: block;
  margin: 0 auto;
}

.dash-chart-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--c-text-2);
}

/* в”Ђв”Ђ Donut legend в”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђ */

/* ── Donut period mini-tabs ─────────────────────────────────────────────── */

.dash-donut-period {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.dash-donut-tab {
  border: 1px solid var(--c-border);
  background: transparent;
  color: var(--c-text-2);
  font-size: 0.72rem;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.dash-donut-tab:hover {
  background: var(--c-surface-2);
  color: var(--c-text-1);
}
.dash-donut-tab.is-active {
  background: var(--c-accent);
  border-color: var(--c-accent);
  color: #fff;
}

.dash-donut-legend {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 2px;
  overflow: hidden;
}

.donut-legend-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.76rem;
  line-height: 1.3;
  min-width: 0;
}

.donut-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.donut-legend-name {
  flex: 1;
  color: var(--c-text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.donut-legend-val {
  color: var(--c-text-2);
  white-space: nowrap;
  flex-shrink: 0;
  font-size: 0.71rem;
  text-align: right;
}

/* в”Ђв”Ђ Generic card + section header в”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђ */

.dash-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 14px;
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dash-section-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--c-text-2);
}
.dash-section-hdr i {
  margin-right: 5px;
  opacity: 0.7;
}

.dash-badge {
  background: var(--c-accent);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  letter-spacing: 0.04em;
}

/* ── Bottom two-column grid ──────────────────────────────────────────────── */

.dash-bottom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: start;
}

@media (max-width: 760px) {
  .dash-bottom-grid { grid-template-columns: 1fr; }
}

/* в”Ђв”Ђ Tables в”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђ */

.dash-table-wrap {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid var(--c-border);
}

.dash-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  color: var(--c-text-1);
}

.dash-table thead tr {
  background: var(--c-surface-2);
}

.dash-table th {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--c-text-2);
  padding: 8px 12px;
  white-space: nowrap;
  text-align: left;
  border-bottom: 1px solid var(--c-border);
}

.dash-table td {
  padding: 7px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  vertical-align: middle;
  white-space: nowrap;
}

.dash-table tbody tr:last-child td {
  border-bottom: none;
}

.dash-table tbody tr:hover td {
  background: var(--c-surface-2);
}

.dash-table .num {
  text-align: right;
}

.dash-table .muted {
  color: var(--c-text-2);
}

.dash-table .accent {
  color: var(--c-accent);
  font-weight: 600;
}

/* в”Ђв”Ђ Item rarity indicators в”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђ */

.item-rarity-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  flex-shrink: 0;
  vertical-align: middle;
  position: relative;
  top: -1px;
}

.item-rarity-tag {
  font-size: 0.7rem;
  font-weight: 500;
}

/* ── Value progress bar ──────────────────────────────────────────────────── */

.val-bar-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 80px;
}

.val-bar {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 20px;
  border-radius: 3px;
  background: var(--c-accent-soft);
  pointer-events: none;
  transition: width 0.3s ease;
}

.val-bar--week { background: rgba(91,138,245,0.11); }
.val-bar--acc  { background: rgba(16,185,129,0.1); }

.val-bar-wrap span { position: relative; z-index: 1; }

/* в”Ђв”Ђ Week table specifics в”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђ */

.dash-week-chip {
  display: inline-block;
  margin-left: 7px;
  font-size: 0.67rem;
  font-weight: 600;
  color: var(--c-text-2);
  background: var(--c-surface-2);
  border: 1px solid var(--c-border);
  border-radius: 5px;
  padding: 1px 6px;
  vertical-align: middle;
  text-transform: none;
  letter-spacing: 0;
}

.week-key { font-weight: 600; }

.week-best-badge {
  display: inline-block;
  margin-left: 6px;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #f59e0b;
  background: rgba(245,158,11,0.12);
  border: 1px solid rgba(245,158,11,0.3);
  border-radius: 4px;
  padding: 1px 5px;
  vertical-align: middle;
}

.dash-row-best td { background: rgba(245,158,11,0.04) !important; }
.dash-row-best:hover td { background: rgba(245,158,11,0.08) !important; }

.drop-fraction { color: var(--c-text-1); }

.drop-rate {
  font-size: 0.7rem;
  font-weight: 600;
  margin-left: 4px;
}

/* ── Account medal ───────────────────────────────────────────────────────── */

.dash-medal {
  font-size: 1rem;
  line-height: 1;
}

/* в”Ђв”Ђ Empty / error states в”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђ */

.dash-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 48px 24px;
  text-align: center;
  color: var(--c-text-2);
  font-size: 0.9rem;
  line-height: 1.5;
}

.dash-error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #f87171;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 0.84rem;
  margin-bottom: 4px;
}

.dash-empty-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--c-accent-soft);
  border: 1px solid var(--c-accent);
  color: var(--c-text-2);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.82rem;
}
.dash-empty-notice i {
  color: var(--c-accent);
  flex-shrink: 0;
}

.dash-table-empty {
  text-align: center;
  color: var(--c-text-2);
  font-size: 0.82rem;
  padding: 24px 12px !important;
  opacity: 0.7;
}

/* ============================================================
   LOCAL AGENT
   ============================================================ */

.agent-status-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.agent-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid var(--c-border);
  background: var(--c-bg);
  color: var(--c-text-2);
  transition: background 0.2s, border-color 0.2s;
}
.agent-status--online {
  background: var(--c-green-soft);
  border-color: rgba(22,179,100,0.3);
  color: var(--c-green-text);
}
[data-theme="dark"] .agent-status--online { color: var(--c-green); }
.agent-status--offline {
  background: var(--c-accent-soft);
  border-color: var(--c-border-strong);
  color: var(--c-text-3);
}
.agent-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.agent-status--online .agent-status-dot {
  box-shadow: 0 0 6px currentColor;
  animation: agent-pulse 2s ease-in-out infinite;
}
@keyframes agent-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.agent-refresh-btn {
  background: none;
  border: 1px solid var(--c-border);
  border-radius: 8px;
  padding: 5px 9px;
  color: var(--c-text-3);
  cursor: pointer;
  font-size: 14px;
  transition: color 0.15s, border-color 0.15s;
  line-height: 1;
}
.agent-refresh-btn:hover {
  color: var(--c-accent);
  border-color: var(--c-accent);
}

.agent-token-block,
.agent-run-block {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 12px;
}
.agent-token-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--c-text-2);
}
.agent-token-label a {
  color: var(--c-accent);
  text-decoration: none;
}
.agent-token-label a:hover { text-decoration: underline; }

.agent-token-row .asf-cmd-code {
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  word-break: break-all;
  white-space: normal;
}

.agent-regen-btn {
  align-self: flex-start;
  background: none;
  border: 1px solid var(--c-border);
  border-radius: 8px;
  padding: 5px 12px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--c-text-2);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.15s, border-color 0.15s;
}
.agent-regen-btn:hover {
  color: var(--c-accent);
  border-color: var(--c-accent);
}
.agent-regen-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ============================================================
   ASF CONNECTION GUIDE
   ============================================================ */

.asf-guide {
  margin-top: 4px;
}
/* Inside sgroup-body the guide already has gap from flex */
.sgroup-body .asf-guide { margin-top: 0; }

.asf-guide-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: 1px solid var(--c-border);
  border-radius: 10px;
  padding: 9px 14px;
  color: var(--c-text-2);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.18s, color 0.18s, background 0.18s;
  width: 100%;
  text-align: left;
}
.asf-guide-toggle:hover {
  border-color: var(--c-accent);
  color: var(--c-accent);
  background: var(--c-accent-soft);
}
.asf-guide-toggle[aria-expanded="true"] {
  border-color: var(--c-accent);
  color: var(--c-accent);
  background: var(--c-accent-soft);
  border-radius: 10px 10px 0 0;
  border-bottom-color: transparent;
}
.asf-guide-toggle i:first-child {
  font-size: 15px;
  flex-shrink: 0;
}
.asf-guide-toggle span {
  flex: 1;
}
.asf-guide-chevron {
  transition: transform 0.22s;
  flex-shrink: 0;
}
.asf-guide-toggle[aria-expanded="true"] .asf-guide-chevron {
  transform: rotate(180deg);
}

.asf-guide-body {
  border: 1px solid var(--c-accent);
  border-top: none;
  border-radius: 0 0 10px 10px;
  padding: 16px;
  background: var(--c-accent-soft);
}

.asf-connect-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 780px) {
  .asf-connect-cards { grid-template-columns: 1fr; }
}

.asf-connect-card {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.asf-connect-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.asf-connect-card-head strong {
  font-size: 0.9rem;
  color: var(--c-text-1);
}

.asf-connect-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 20px;
  flex-shrink: 0;
}
.asf-connect-badge--green {
  background: var(--c-green-soft);
  color: var(--c-green-text);
  border: 1px solid rgba(22,179,100,0.25);
}
[data-theme="dark"] .asf-connect-badge--green {
  border-color: rgba(52,210,123,0.25);
}
.asf-connect-badge--purple {
  background: var(--c-accent-soft);
  color: var(--c-accent);
  border: 1px solid var(--c-border-strong);
}

.asf-connect-desc {
  font-size: 0.82rem;
  color: var(--c-text-2);
  margin: 0;
  line-height: 1.5;
}

.asf-connect-steps {
  margin: 0;
  padding: 0 0 0 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.83rem;
  color: var(--c-text-1);
  line-height: 1.5;
}
.asf-connect-steps li {
  padding-left: 4px;
}
.asf-connect-steps li::marker {
  color: var(--c-accent);
  font-weight: 700;
}

.asf-inline-code {
  display: inline-block;
  margin-top: 4px;
  background: var(--c-border);
  border-radius: 6px;
  padding: 2px 8px;
  font-family: "SF Mono", "Fira Code", "Fira Mono", "Roboto Mono", monospace;
  font-size: 0.8rem;
  color: var(--c-accent);
  letter-spacing: 0;
}

.asf-connect-tip {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: var(--c-green-soft);
  border: 1px solid rgba(22,179,100,0.2);
  border-radius: 9px;
  padding: 9px 12px;
  font-size: 0.8rem;
  color: var(--c-text-2);
  line-height: 1.5;
}
.asf-connect-tip i {
  color: var(--c-green);
  flex-shrink: 0;
  margin-top: 1px;
  font-size: 14px;
}
.asf-connect-tip--warn {
  background: rgba(234,179,8,0.1);
  border-color: rgba(234,179,8,0.25);
}
.asf-connect-tip--warn i {
  color: #ca8a04;
}
[data-theme="dark"] .asf-connect-tip--warn i {
  color: #facc15;
}

/* ── ASF install: autoinstall box + manual steps ── */
.asf-install-quick {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--c-bg);
  border: 1px solid var(--c-accent);
  border-radius: 12px;
  padding: 14px 16px;
}
.asf-install-quick-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--c-text-1);
}
.asf-install-quick-head i {
  color: var(--c-accent);
  font-size: 15px;
}
.asf-install-rec {
  display: inline-flex;
  align-items: center;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 20px;
  background: var(--c-accent-soft);
  color: var(--c-accent);
  border: 1px solid var(--c-border-strong);
}
.asf-install-steps {
  gap: 12px;
}
.asf-install-steps .agent-dl-row {
  margin-top: 6px;
}

/* Multiline JSON snippet inside a copy row */
.asf-json-row {
  align-items: flex-start;
}
.asf-json-pre {
  flex: 1;
  margin: 0;
  font-family: "SF Mono", "Fira Code", "Fira Mono", "Roboto Mono", monospace;
  font-size: 0.76rem;
  line-height: 1.5;
  color: var(--c-text-1);
  white-space: pre;
  overflow-x: auto;
  user-select: all;
}

/* Tunnel tab switcher */
.tunnel-tabs {
  display: flex;
  gap: 6px;
  margin: 8px 0 6px;
}
.tunnel-tab {
  background: none;
  border: 1px solid var(--c-border);
  border-radius: 8px;
  padding: 5px 12px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--c-text-2);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  display: flex;
  align-items: center;
  gap: 6px;
}
.tunnel-tab:hover {
  border-color: var(--c-accent);
  color: var(--c-accent);
}
.tunnel-tab.is-active {
  background: var(--c-accent-soft);
  border-color: var(--c-accent);
  color: var(--c-accent);
}
.tunnel-tab-badge {
  background: var(--c-green-soft);
  color: var(--c-green-text);
  border-radius: 10px;
  padding: 1px 6px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

/* ============================================================
   FEATURE PERMISSIONS — locks, stubs, admin editor
   ============================================================ */

/* ── Absolute overlay (blur the thing underneath) ───────────────────────────── */
.lock-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  padding: 16px;
  border-radius: inherit;
  background: rgba(20, 12, 50, 0.18);
  -webkit-backdrop-filter: blur(7px) saturate(0.85);
  backdrop-filter: blur(7px) saturate(0.85);
}
.lock-overlay-card {
  max-width: 340px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 22px 24px;
  border-radius: 16px;
  background: var(--c-surface);
  border: 1px solid var(--c-border-strong);
  box-shadow: var(--c-shadow-lg);
}
.lock-overlay-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 20px;
  color: var(--c-accent);
  background: var(--c-accent-soft);
  margin-bottom: 2px;
}
.lock-overlay-card strong { font-size: 1rem; color: var(--c-text-1); }
.lock-overlay-card p { margin: 0; font-size: 0.85rem; color: var(--c-text-2); line-height: 1.45; }
.lock-overlay-hint {
  margin-top: 4px;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--c-accent);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* ── Inline notice card (nothing to blur behind) ────────────────────────────── */
.lock-notice {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border-radius: 14px;
  background: var(--c-surface-2);
  border: 1px dashed var(--c-border-strong);
}
.lock-notice-icon {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 18px;
  color: var(--c-accent);
  background: var(--c-accent-soft);
}
.lock-notice-text { flex: 1; min-width: 0; }
.lock-notice-text strong { display: block; font-size: 0.94rem; color: var(--c-text-1); margin-bottom: 2px; }
.lock-notice-text p { margin: 0; font-size: 0.83rem; color: var(--c-text-2); line-height: 1.4; }
.lock-notice-hint {
  flex-shrink: 0;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--c-accent);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
@media (max-width: 640px) {
  .lock-notice { flex-wrap: wrap; }
  .lock-notice-hint { width: 100%; }
}

/* ── Locked controls (bot-window buttons, drop nav, draggable items) ─────────── */
.fwin-login-btn.is-locked,
.fwin-loot-btn.is-locked,
#globalCs2DropBtn.is-locked {
  opacity: 0.55;
  cursor: not-allowed;
  filter: grayscale(0.4);
}
.fwin-login-btn.is-locked:hover,
.fwin-loot-btn.is-locked:hover,
#globalCs2DropBtn.is-locked:hover { transform: none; }
#globalCs2DropBtn.is-locked::after {
  content: "\F47A";          /* bi-lock-fill */
  font-family: "bootstrap-icons";
  margin-left: 6px;
  font-size: 0.85em;
  opacity: 0.85;
}
.fwin-item.is-locked { cursor: default; }
.fwin-item.is-locked:hover { transform: none; }

/* mass-actions block: inner is swapped for a .lock-notice when locked */
.mass-actions.is-locked .mass-actions-panel-inner { display: block; }

/* ── Settings: per-row lock badge ───────────────────────────────────────────── */
.setting-toggle-row.is-locked { opacity: 0.72; }
.setting-lock-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--c-accent);
}

/* ── Admin: per-user permissions modal ──────────────────────────────────────── */
.perms-modal-body { gap: 18px; }
.perms-loading,
.perms-error {
  padding: 24px;
  text-align: center;
  color: var(--c-text-2);
  font-size: 0.9rem;
}
.perms-error { color: var(--c-red-text); }
.perms-admin-note {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 18px 20px;
  border-radius: 14px;
  background: var(--c-green-soft);
  border: 1px solid var(--c-border);
}
.perms-admin-note > i { font-size: 26px; color: var(--c-green-text); }
.perms-admin-note strong { display: block; color: var(--c-text-1); margin-bottom: 2px; }
.perms-admin-note p { margin: 0; font-size: 0.85rem; color: var(--c-text-2); }

.perm-group { display: grid; gap: 8px; }
.perm-group-title {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--c-text-3);
  padding-bottom: 4px;
  border-bottom: 1px solid var(--c-border);
}
.perm-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--c-surface-2);
  border: 1px solid var(--c-border);
  transition: opacity 0.15s;
}
.perm-row.is-disabled { opacity: 0.5; }
.perm-row-text { flex: 1; min-width: 0; }
.perm-row-label { display: block; font-size: 0.9rem; font-weight: 600; color: var(--c-text-1); }
.perm-row-desc { display: block; margin-top: 2px; font-size: 0.8rem; color: var(--c-text-2); line-height: 1.4; }
.perm-row-hint {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 5px;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--c-orange-text);
}

.btn-perms { display: inline-flex; align-items: center; gap: 5px; }

/* ── Dashboard: stats_full lock (blur deeper graphs, lock period tabs) ───────── */
.dash-period-btn.is-locked,
.dash-donut-tab.is-locked {
  opacity: 0.5;
  cursor: not-allowed;
}
.dash-lock-i { font-size: 0.8em; margin-left: 3px; opacity: 0.9; }

.dash-chart-main.is-locked,
.dash-card.is-locked { position: relative; overflow: hidden; }
.dash-chart-main.is-locked > *:not(.dash-lock-overlay),
.dash-card.is-locked > *:not(.dash-lock-overlay) {
  filter: blur(6px);
  pointer-events: none;
  user-select: none;
}
.dash-lock-overlay {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(20, 12, 50, 0.14);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.dash-lock-card {
  max-width: 320px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 20px 22px;
  border-radius: 16px;
  background: var(--c-surface);
  border: 1px solid var(--c-border-strong);
  box-shadow: var(--c-shadow-lg);
}
.dash-lock-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 19px;
  color: var(--c-accent);
  background: var(--c-accent-soft);
}
.dash-lock-title { font-size: 0.95rem; font-weight: 700; color: var(--c-text-1); }
.dash-lock-text { font-size: 0.82rem; color: var(--c-text-2); line-height: 1.45; }

/* Command row with copy button */
.tunnel-panel {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 4px;
}
.asf-cmd-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0,0,0,0.12);
  border: 1px solid var(--c-border-strong);
  border-radius: 8px;
  padding: 8px 10px;
}
[data-theme="dark"] .asf-cmd-row {
  background: rgba(0,0,0,0.35);
}
.asf-cmd-code {
  flex: 1;
  font-family: "SF Mono", "Fira Code", "Fira Mono", "Roboto Mono", monospace;
  font-size: 0.78rem;
  color: var(--c-text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  user-select: all;
}
.asf-copy-btn {
  background: none;
  border: none;
  color: var(--c-text-3);
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 5px;
  font-size: 14px;
  flex-shrink: 0;
  transition: color 0.15s, background 0.15s;
  line-height: 1;
}
.asf-copy-btn:hover {
  color: var(--c-accent);
  background: var(--c-accent-soft);
}
.asf-copy-btn.copied {
  color: var(--c-green);
}
.asf-connect-dl {
  font-size: 0.75rem;
  color: var(--c-text-3);
}
.asf-connect-dl a {
  color: var(--c-accent);
  text-decoration: none;
}
.asf-connect-dl a:hover {
  text-decoration: underline;
}

/* ============================================================
   SETTINGS PAGE REDESIGN  (sgroup / sfield / sform)
   ============================================================ */

.settings-page h2 { margin-bottom: 20px; }

/* Each settings group = a bordered section-card within the main card */
.sgroup {
  border: 1px solid var(--c-border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--c-bg);
  transition: border-color 0.2s;
}
.sgroup:hover { border-color: var(--c-border-strong); }

.sgroup-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  background: var(--c-accent-soft);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-accent);
  border-bottom: 1px solid var(--c-border);
}
.sgroup-head i { font-size: 14px; }

.sgroup-body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Two sgroups side by side */
.sgroups-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 680px) { .sgroups-row { grid-template-columns: 1fr; } }

/* All groups stacked with gap */
.settings-page > .sgroup,
.settings-page > .sgroups-row {
  margin-bottom: 12px;
}
.settings-page > .sgroup:last-child,
.settings-page > .sgroups-row:last-child {
  margin-bottom: 0;
}

/* ── sform: inline label + input rows ── */
.sform { display: flex; flex-direction: column; gap: 10px; }

.sfield {
  display: grid;
  grid-template-columns: 110px 1fr;
  align-items: center;
  gap: 10px;
}
.sfield-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--c-text-2);
  text-align: right;
  white-space: nowrap;
}
.sfield-input {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 12px;
  border-radius: 9px;
  border: 1px solid var(--c-border);
  background: var(--c-surface-2, var(--c-bg));
  color: var(--c-text-1);
  font-size: 0.85rem;
  transition: border-color 0.15s;
}
.sfield-input:focus {
  outline: none;
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px var(--c-accent-soft);
}

.sfield-hint {
  margin: 0;
  font-size: 0.78rem;
  color: var(--c-text-3);
  padding-left: 120px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.sfield-hint i { flex-shrink: 0; }
.sfield-hint code {
  background: var(--c-border);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 0.75rem;
  color: var(--c-accent);
}

.sform-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 2px;
}

.sform-status {
  font-size: 0.8rem;
  color: var(--c-green-text);
  min-width: 80px;
  text-align: right;
}
[data-theme="dark"] .sform-status { color: var(--c-green); }

.s-save-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 18px;
  border-radius: 8px;
  border: none;
  background: var(--c-accent-grad);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.15s;
  box-shadow: 0 2px 8px var(--c-accent-soft);
}
.s-save-btn:hover { opacity: 0.9; transform: translateY(-1px); }
.s-save-btn:active { transform: translateY(0); }
.s-save-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ── Agent section inside sgroup-body ── */
.sfield--token,
.sfield--cmd {
  display: grid;
  grid-template-columns: 110px 1fr;
  align-items: flex-start;
  gap: 10px;
}
.sfield--token .sfield-label,
.sfield--cmd .sfield-label {
  padding-top: 9px;
}
.sfield-token-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.sfield-token-wrap .asf-cmd-row {
  min-width: 0;
}
.sfield-token-wrap .asf-cmd-code {
  font-size: 0.73rem;
  word-break: break-all;
  white-space: normal;
  min-width: 0;
}

.agent-dl-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.agent-dl-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 7px;
  border: 1px solid var(--c-border);
  color: var(--c-accent);
  font-size: 0.78rem;
  font-weight: 500;
  text-decoration: none;
  background: var(--c-accent-soft);
  transition: background 0.15s, border-color 0.15s;
  cursor: pointer;
  font-family: inherit;
}
.agent-dl-btn:hover {
  background: var(--c-accent);
  color: #fff;
  border-color: var(--c-accent);
}

/* asf guide link inline */
.asf-dl-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--c-accent);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.85rem;
}
.asf-dl-link:hover { text-decoration: underline; }
.asf-dl-link i { font-size: 12px; }

/* button variant of asf-dl-link (for JS-generated downloads) */
button.asf-dl-link, .asf-dl-link--btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  vertical-align: baseline;
}
button.asf-dl-link:hover, .asf-dl-link--btn:hover { text-decoration: underline; }

/* CS2 drop: ASF offline warning banner */
.cs2drop-offline-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 8px;
  color: #f87171;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 10px;
}
.cs2drop-offline-banner i { font-size: 14px; flex-shrink: 0; }

/* ============================================================
   SIDEBAR PROFILE BUTTON
   ============================================================ */
.sidebar-profile-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  margin: 0 0 4px;
  background: var(--c-surface-2);
  border: 1px solid var(--c-border);
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.12s;
  text-align: left;
}
.sidebar-profile-btn:hover {
  background: var(--c-accent-soft);
  border-color: var(--c-accent);
  transform: translateY(-1px);
}
.sidebar-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--c-border-strong);
  flex-shrink: 0;
  background: var(--c-surface-3);
}
.sidebar-profile-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sidebar-profile-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--c-text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-profile-sub {
  font-size: 0.72rem;
  color: var(--c-text-3);
}
.sidebar-profile-chevron {
  font-size: 11px;
  color: var(--c-text-3);
  flex-shrink: 0;
}

/* ============================================================
   PROFILE MODAL
   ============================================================ */
.profile-backdrop { z-index: 1100; }

.profile-modal {
  width: min(480px, 96vw);
  max-height: 90vh;
  overflow-y: auto;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.profile-modal .modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--c-border);
  flex-shrink: 0;
}
.profile-modal .modal-header h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
  color: var(--c-text-1);
}

.profile-modal-body {
  padding: 20px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Hero row: avatar + name */
.profile-hero {
  display: flex;
  align-items: center;
  gap: 18px;
}
.profile-avatar-wrap {
  position: relative;
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  cursor: pointer;
}
.profile-avatar-img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--c-border-strong);
  background: var(--c-surface-3);
  display: block;
}
.profile-avatar-overlay {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(0,0,0,0.42);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.18s;
  cursor: pointer;
  color: #fff;
  font-size: 18px;
}
.profile-avatar-wrap:hover .profile-avatar-overlay { opacity: 1; }

.profile-hero-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.profile-username {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--c-text-1);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.profile-created-at {
  font-size: 0.78rem;
  color: var(--c-text-3);
  margin: 0;
}
.profile-avatar-status {
  font-size: 0.78rem;
  font-weight: 500;
  display: block;
  min-height: 1em;
}
.profile-avatar-status.status-ok   { color: var(--c-green); }
.profile-avatar-status.status-error { color: var(--c-red); }
.profile-avatar-status.status-loading { color: var(--c-text-3); }

.profile-wallet-card {
  min-height: 74px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--c-border-strong);
  border-radius: 12px;
  background: var(--c-surface-2);
}
.profile-wallet-icon {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--c-accent);
  color: var(--c-bg);
  font-size: 18px;
}
.profile-wallet-copy { display: flex; flex-direction: column; min-width: 0; }
.profile-wallet-copy span,
.profile-wallet-note { color: var(--c-text-3); font-size: 0.72rem; font-weight: 500; }
.profile-wallet-copy strong { color: var(--c-text-1); font-size: 1.25rem; line-height: 1.2; }
.profile-wallet-note { margin-left: auto; white-space: nowrap; }

/* Stats row */
.profile-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.profile-stat-card {
  background: var(--c-surface-2);
  border: 1px solid var(--c-border);
  border-radius: 12px;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}
.profile-stat-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--c-accent);
  line-height: 1;
}
.profile-stat-label {
  font-size: 0.72rem;
  color: var(--c-text-3);
  font-weight: 500;
}

/* Section */
.profile-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.profile-section-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--c-text-2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  gap: 6px;
}
.profile-section-title i { color: var(--c-accent); font-size: 13px; }

.profile-pw-form { gap: 10px; }

/* Reuse existing sform-status; add colour variants */
.sform-status.status-ok    { color: var(--c-green); }
.sform-status.status-error { color: var(--c-red); }


/* ── Admin panel ──────────────────────────────────────────────────────────── */
.admin-pending-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px; margin-left: 6px;
  font-size: 11px; font-weight: 700; line-height: 1;
  color: #fff; background: var(--c-red); border-radius: 999px;
}
.admin-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 22px; padding: 0 7px; margin-left: 8px;
  font-size: 12px; font-weight: 700;
  color: var(--c-accent); background: var(--c-accent-soft); border-radius: 999px;
}
.admin-list { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.admin-req {
  border: 1px solid var(--c-border); border-radius: 12px;
  padding: 14px 16px; background: var(--c-accent-soft);
}
.admin-req-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.admin-req-name { font-weight: 700; color: var(--c-text-1); font-size: 15px; }
.admin-req-date { font-size: 12px; color: var(--c-text-3); white-space: nowrap; }
.admin-req-reason {
  margin: 8px 0 12px; padding: 10px 12px;
  font-size: 13px; line-height: 1.5; color: var(--c-text-2);
  background: var(--c-bg); border: 1px solid var(--c-border); border-radius: 9px;
  white-space: pre-wrap; word-break: break-word;
}
.admin-req-actions, .admin-row-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.admin-table-wrap { overflow-x: auto; margin-top: 12px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table thead th {
  text-align: left; padding: 8px 12px; font-weight: 600;
  color: var(--c-text-3); border-bottom: 1px solid var(--c-border-strong);
  white-space: nowrap;
}
.admin-table tbody td {
  padding: 10px 12px; border-bottom: 1px solid var(--c-border);
  color: var(--c-text-1); vertical-align: middle;
}
.admin-table tbody tr:last-child td { border-bottom: none; }
.admin-you {
  font-size: 11px; font-weight: 600; color: var(--c-accent);
  background: var(--c-accent-soft); padding: 1px 6px; border-radius: 999px; margin-left: 4px;
}
.admin-balance-value { font-weight: 700; color: var(--c-text-1); white-space: nowrap; }
.admin-tag {
  display: inline-block; padding: 2px 9px; font-size: 12px; font-weight: 600;
  border-radius: 999px; white-space: nowrap;
}
.admin-role-admin { color: var(--c-accent); background: var(--c-accent-soft); }
.admin-role-user  { color: var(--c-text-2); background: var(--c-border); }
.admin-st-pending  { color: var(--c-red-text);   background: var(--c-red-soft); }
.admin-st-approved { color: var(--c-green-text); background: var(--c-green-soft); }
.admin-st-rejected { color: var(--c-text-3);     background: var(--c-border); }

/* Self-contained buttons (no global .btn base in this project) */
#panel-admin .btn {
  font: inherit; cursor: pointer; border: 1px solid var(--c-border-strong);
  background: var(--c-bg); color: var(--c-text-1);
  border-radius: 9px; padding: 6px 12px; font-weight: 600; line-height: 1.2;
  transition: filter .15s ease, opacity .15s ease;
}
#panel-admin .btn:hover { filter: brightness(1.06); }
#panel-admin .btn:disabled { opacity: .45; cursor: not-allowed; }
#panel-admin .btn-sm { padding: 5px 11px; font-size: 12.5px; }
#panel-admin .btn-success { background: var(--c-green); border-color: var(--c-green); color: #fff; }
#panel-admin .btn-danger  { background: var(--c-red);   border-color: var(--c-red);   color: #fff; }
#panel-admin .btn-wallet { background: var(--c-surface-2); }

/* Admin wallet */
.wallet-modal { width: min(580px, calc(100vw - 28px)); }
.wallet-modal-body { display: flex; flex-direction: column; gap: 18px; }
.wallet-admin-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px;
  border: 1px solid var(--c-border-strong);
  border-radius: 12px;
  background: var(--c-surface-2);
}
.wallet-admin-label { color: var(--c-text-2); font-size: 13px; }
.wallet-admin-summary strong { color: var(--c-text-1); font-size: 1.35rem; }
.wallet-adjust-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.wallet-direction {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 3px;
  border: 1px solid var(--c-border);
  border-radius: 10px;
  background: var(--c-surface-2);
}
.wallet-direction label { position: relative; cursor: pointer; }
.wallet-direction input { position: absolute; opacity: 0; pointer-events: none; }
.wallet-direction span {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 7px;
  color: var(--c-text-2);
  font-size: 13px;
  font-weight: 600;
  transition: background-color 150ms ease, color 150ms ease, box-shadow 150ms ease;
}
.wallet-direction input:checked + span {
  background: var(--c-surface);
  color: var(--c-text-1);
  box-shadow: var(--c-shadow-sm);
}
.wallet-direction input:focus-visible + span { outline: 2px solid var(--c-accent); outline-offset: 1px; }
.wallet-field { display: flex; flex-direction: column; gap: 6px; }
.wallet-field > span { color: var(--c-text-2); font-size: 12px; font-weight: 600; }
.wallet-form-footer {
  grid-column: 1 / -1;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.wallet-form-footer .btn { flex: 0 0 auto; }
.wallet-history-section { display: flex; flex-direction: column; gap: 10px; }
.wallet-history-section h4 { margin: 0; color: var(--c-text-2); font-size: 12px; text-transform: uppercase; }
.wallet-history {
  max-height: 250px;
  overflow-y: auto;
  border-top: 1px solid var(--c-border);
}
.wallet-history-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 11px 2px;
  border-bottom: 1px solid var(--c-border);
}
.wallet-history-sign {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
}
.wallet-history-sign.is-credit { color: var(--c-green-text); background: var(--c-green-soft); }
.wallet-history-sign.is-debit { color: var(--c-red-text); background: var(--c-red-soft); }
.wallet-history-copy { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.wallet-history-copy strong { overflow: hidden; color: var(--c-text-1); font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }
.wallet-history-copy span { color: var(--c-text-3); font-size: 11px; }
.wallet-history-amount { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.wallet-history-amount.is-credit { color: var(--c-green-text); }
.wallet-history-amount.is-debit { color: var(--c-red-text); }
.wallet-history-empty { padding: 24px 8px; color: var(--c-text-3); font-size: 13px; text-align: center; }

@media (max-width: 560px) {
  .profile-wallet-note { display: none; }
  .wallet-adjust-form { grid-template-columns: 1fr; }
  .wallet-direction,
  .wallet-form-footer { grid-column: 1; }
  .wallet-form-footer { align-items: stretch; flex-direction: column; }
  .wallet-form-footer .btn { width: 100%; }
}

/* ============================================================
   TRADE TRANSFER MICRO-ANIMATIONS (inventory windows)
   Surgical, skeleton-free updates after a bot→bot transfer:
   source item shrinks away / counts down, target item lands.
   ============================================================ */
@keyframes fwinItemArrive {
  0%   { transform: scale(0.6); opacity: 0; }
  60%  { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
.fwin-item.item-arrive {
  animation: fwinItemArrive 0.45s cubic-bezier(0.2, 0.7, 0.3, 1.3);
  box-shadow: 0 0 0 2px var(--c-green) inset, 0 8px 24px var(--c-green-soft);
}
@keyframes fwinItemLeave {
  to { transform: scale(0.55); opacity: 0; }
}
.fwin-item.item-leaving { animation: fwinItemLeave 0.32s ease forwards; }
@keyframes fwinItemBump { 50% { transform: scale(1.12); } }
.fwin-item.item-bump { animation: fwinItemBump 0.3s ease; }
@keyframes fwinAmtBump {
  0% { transform: scale(1); }
  40% { transform: scale(1.55); }
  100% { transform: scale(1); }
}
.fwin-item-amt.amt-bump { animation: fwinAmtBump 0.35s ease; }

@media (prefers-reduced-motion: reduce) {
  .fwin-item.item-arrive,
  .fwin-item.item-leaving,
  .fwin-item.item-bump,
  .fwin-item-amt.amt-bump { animation: none !important; }
  .fwin-item.item-arrive { box-shadow: 0 0 0 2px var(--c-accent) inset; }
}

/* ============================================================
   ANNOUNCEMENTS (feed of giveaways / changelog / news)
   Buttons + inputs are self-contained — no global .btn base.
   ============================================================ */
#panel-announcements .btn,
#annModalBackdrop .btn {
  font: inherit; cursor: pointer; border: 1px solid var(--c-border-strong);
  background: var(--c-bg); color: var(--c-text-1);
  border-radius: 9px; padding: 8px 14px; font-weight: 600; line-height: 1.2;
  display: inline-flex; align-items: center; gap: 7px;
  transition: filter .15s ease, opacity .15s ease;
}
#panel-announcements .btn:hover,
#annModalBackdrop .btn:hover { filter: brightness(1.06); }
#panel-announcements .btn:disabled,
#annModalBackdrop .btn:disabled { opacity: .5; cursor: not-allowed; }
#panel-announcements .btn-primary,
#annModalBackdrop .btn-primary {
  background: var(--c-accent); border-color: var(--c-accent); color: #fff;
}
#annModalBackdrop .input {
  width: 100%; font: inherit; color: var(--c-text-1);
  background: var(--c-bg); border: 1px solid var(--c-border-strong);
  border-radius: 9px; padding: 9px 12px;
}
#annModalBackdrop .input:focus { outline: none; border-color: var(--c-accent); }
#panel-announcements .muted { color: var(--c-text-3); padding: 18px 4px; }

.ann-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.ann-head h2 { margin: 0; }
.ann-head .hint { margin: 4px 0 0; }
.ann-head-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.ann-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 4px; }
.ann-chip {
  font: inherit; cursor: pointer; border: 1px solid var(--c-border-strong);
  background: var(--c-bg); color: var(--c-text-2);
  border-radius: 999px; padding: 6px 14px; font-size: 13px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.ann-chip:hover { color: var(--c-text-1); }
.ann-chip.is-active { background: var(--c-accent); border-color: var(--c-accent); color: #fff; }

.ann-feed { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }
.ann-card {
  position: relative; border: 1px solid var(--c-border);
  border-radius: 14px; padding: 16px 18px; background: var(--c-surface);
}
.ann-card.is-unread { border-color: var(--c-accent); box-shadow: 0 0 0 1px var(--c-accent-soft) inset; }
.ann-card.is-unread::before {
  content: ""; position: absolute; top: 16px; left: -1px;
  width: 3px; height: 22px; border-radius: 0 3px 3px 0; background: var(--c-accent);
}
.ann-card-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ann-tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; font-size: 12px; font-weight: 700;
  border-radius: 999px; white-space: nowrap;
}
.ann-tag-give { color: var(--c-green-text); background: var(--c-green-soft); }
.ann-tag-log  { color: var(--c-accent);     background: var(--c-accent-soft); }
.ann-tag-news { color: var(--c-text-2);     background: var(--c-border); }
.ann-pin { color: var(--c-orange-text); font-size: 13px; }
.ann-date { font-size: 12px; color: var(--c-text-3); margin-left: auto; white-space: nowrap; }
.ann-admin-actions { display: inline-flex; gap: 4px; }
.ann-icon-btn {
  font: inherit; cursor: pointer; border: 1px solid var(--c-border);
  background: var(--c-bg); color: var(--c-text-2);
  width: 30px; height: 30px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: filter .15s ease, color .15s ease;
}
.ann-icon-btn:hover { filter: brightness(1.06); color: var(--c-text-1); }
.ann-icon-btn.ann-del:hover { color: var(--c-red-text); border-color: var(--c-red); }
.ann-title { margin: 12px 0 0; font-size: 16px; color: var(--c-text-1); }
.ann-body { margin: 8px 0 0; font-size: 14px; line-height: 1.55; color: var(--c-text-2); word-break: break-word; }
.ann-release-notes { display: grid; gap: 13px; margin-top: 12px; color: var(--c-text-2); }
.ann-release-intro { margin: 0; font-size: 14px; line-height: 1.55; }
.ann-release-section { padding-left: 13px; border-left: 2px solid var(--c-border-strong); }
.ann-release-section h4 { margin: 0 0 5px; color: var(--c-text-1); font-size: 13px; font-weight: 700; }
.ann-release-section ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.ann-release-section li { font-size: 14px; line-height: 1.5; padding-left: 2px; }
.ann-release-section li::marker { color: var(--c-accent); }

.ann-give-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.ann-give-state {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 14px;
  font-size: 13px; font-weight: 600; padding: 7px 12px; border-radius: 9px;
}
.ann-give-row .ann-give-state { margin-top: 0; }
.ann-give-state.is-done { color: var(--c-green-text); background: var(--c-green-soft); }
.ann-give-state.is-lock { color: var(--c-text-3);     background: var(--c-border); }
.ann-give-state.is-err  { color: var(--c-orange-text); background: transparent; padding-left: 0; }
.ann-activate-btn { white-space: nowrap; }

@keyframes annSpin { to { transform: rotate(360deg); } }
.ann-spin { display: inline-block; animation: annSpin .8s linear infinite; }

/* Composer modal */
.ann-modal-body { display: flex; flex-direction: column; gap: 14px; }
.ann-field { display: flex; flex-direction: column; gap: 6px; }
.ann-field-label { font-size: 13px; font-weight: 600; color: var(--c-text-2); }
.ann-field-hint { font-size: 12px; line-height: 1.5; color: var(--c-text-3); }
.ann-field-hint code {
  font-size: 11.5px; padding: 1px 5px; border-radius: 5px;
  background: var(--c-border); color: var(--c-text-2);
}
.ann-check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--c-text-1); cursor: pointer; }
.ann-modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; }

@media (prefers-reduced-motion: reduce) { .ann-spin { animation: none; } }

@media (max-width: 520px) {
  .ann-head { flex-direction: column; }
  .ann-head-actions { width: 100%; }
  .ann-head-actions .btn { flex: 1; justify-content: center; }
}

/* ============================================================
   CS2 trade-up contract modal
   Self-contained buttons/inputs (no global .btn / .input base).
   ============================================================ */
.tradeup-modal { width: min(900px, 94vw); max-width: 900px; }
.tradeup-body { display: flex; flex-direction: column; gap: 14px; }

#tradeupModalBackdrop .btn {
  font: inherit; font-weight: 600; cursor: pointer;
  border: 1px solid var(--c-border-strong); background: var(--c-bg);
  color: var(--c-text-1); border-radius: 9px; padding: 9px 14px;
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
  transition: filter .15s ease, border-color .15s ease, color .15s ease;
}
#tradeupModalBackdrop .btn:hover { filter: brightness(1.06); }
#tradeupModalBackdrop .btn:disabled { opacity: .5; cursor: not-allowed; filter: none; }
#tradeupModalBackdrop .btn-primary {
  background: var(--c-accent); border-color: var(--c-accent); color: #fff;
}
#tradeupModalBackdrop .input {
  font: inherit; color: var(--c-text-1); background: var(--c-bg);
  border: 1px solid var(--c-border-strong); border-radius: 9px; padding: 9px 12px;
}
#tradeupModalBackdrop .input:focus { outline: none; border-color: var(--c-accent); }

.tu-icon-btn {
  flex: none; cursor: pointer; width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--c-border-strong); background: var(--c-bg);
  color: var(--c-text-2); border-radius: 9px; font-size: 16px;
  transition: color .15s ease, border-color .15s ease;
}
.tu-icon-btn:hover { color: var(--c-accent); border-color: var(--c-accent); }
.tu-icon-btn i { transition: transform .5s cubic-bezier(.4, 0, .2, 1); }
.tu-icon-btn:hover i { transform: rotate(180deg); }

.tradeup-controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.tradeup-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--c-text-2); flex: 1 1 auto; }
.tradeup-field .input { min-width: 220px; width: 100%; }

.tradeup-warn {
  display: flex; align-items: flex-start; gap: 9px; margin: 0;
  font-size: 13px; line-height: 1.5; color: var(--c-orange-text);
  background: var(--c-red-soft); border: 1px solid var(--c-red);
  border-radius: 10px; padding: 10px 13px;
}
.tradeup-warn i { margin-top: 1px; }

.tradeup-status {
  font-size: 13.5px; line-height: 1.5; color: var(--c-text-2);
  background: var(--c-bg); border: 1px solid var(--c-border);
  border-radius: 10px; padding: 11px 14px;
  display: flex; align-items: center; gap: 9px;
}
.tradeup-status.tu-warn  { color: var(--c-orange-text); background: var(--c-border); border-color: var(--c-border-strong); }
.tradeup-status.tu-error { color: var(--c-red-text);    background: var(--c-red-soft); border-color: var(--c-red); }

/* Rarity / quality group chooser */
.tradeup-groups { display: flex; flex-direction: column; gap: 9px; }
.tu-groups-label { font-size: 13px; font-weight: 600; color: var(--c-text-2); }
.tu-group {
  font: inherit; cursor: pointer; text-align: left;
  display: grid; grid-template-columns: 1fr auto auto auto; align-items: center; gap: 10px;
  border: 1px solid var(--c-border-strong); background: var(--c-bg);
  color: var(--c-text-1); border-radius: 10px; padding: 10px 14px;
  transition: border-color .15s ease, background .15s ease, transform .18s cubic-bezier(.22,1,.36,1), box-shadow .18s ease;
  animation: tuRise .32s cubic-bezier(.22,1,.36,1) backwards;
}
.tu-group:hover { border-color: var(--c-accent); transform: translateY(-1px); box-shadow: 0 4px 14px -6px var(--c-accent-soft); }
.tu-group.is-active { border-color: var(--c-accent); background: var(--c-accent-soft); }
.tu-group.is-short { opacity: .5; cursor: not-allowed; }
.tu-group.is-short:hover { border-color: var(--c-border-strong); transform: none; box-shadow: none; }
.tu-group-rar  { font-weight: 700; }
.tu-group-q    { font-size: 12px; font-weight: 600; color: var(--c-text-2); padding: 2px 9px; border-radius: 999px; background: var(--c-border); }
.tu-group-n    { font-size: 13px; color: var(--c-text-3); white-space: nowrap; }
.tu-group-next { font-size: 13px; font-weight: 600; color: var(--c-accent); white-space: nowrap; }

/* Picker */
.tradeup-picker { display: flex; flex-direction: column; gap: 12px; }
.tradeup-picker-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.tradeup-cap { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--c-text-2); }
.tradeup-cap .input { width: 110px; }
.tradeup-selcount { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--c-text-2); white-space: nowrap; }
.tradeup-selcount #tradeupSelN { color: var(--c-accent); }

.tradeup-items {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px; max-height: 46vh; overflow-y: auto; padding: 2px;
}
.tu-item {
  font: inherit; cursor: pointer; position: relative; text-align: left; overflow: hidden;
  display: flex; flex-direction: column; gap: 4px;
  border: 1px solid var(--c-border-strong); background: var(--c-surface);
  color: var(--c-text-1); border-radius: 11px; padding: 9px;
  transition: border-color .15s ease, box-shadow .2s ease, opacity .15s ease, transform .2s cubic-bezier(.22,1,.36,1);
  animation: tuPop .3s cubic-bezier(.22,1,.36,1) backwards;
}
.tu-item:hover { border-color: var(--c-accent); transform: translateY(-2px); box-shadow: 0 8px 20px -10px var(--c-accent-soft); }
.tu-item.is-sel { border-color: var(--c-accent); box-shadow: 0 0 0 2px var(--c-accent) inset, 0 6px 18px -8px var(--c-accent-soft); }
.tu-item.is-sel:hover { box-shadow: 0 0 0 2px var(--c-accent) inset, 0 10px 22px -8px var(--c-accent-soft); }
.tu-item.is-over { border-color: var(--c-red); }
.tu-item.is-over::after {
  content: "₽!"; position: absolute; top: 7px; right: 7px;
  font-size: 11px; font-weight: 700; color: var(--c-red-text);
  background: var(--c-red-soft); border-radius: 6px; padding: 1px 5px;
}
.tu-item-check {
  position: absolute; top: 7px; left: 7px; z-index: 2;
  width: 22px; height: 22px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  background: var(--c-accent); color: #fff; font-size: 13px;
  transform: scale(0); opacity: 0;
  transition: transform .25s cubic-bezier(.34,1.56,.64,1), opacity .2s ease;
}
.tu-item.is-sel .tu-item-check { transform: scale(1); opacity: 1; }
.tu-item-img {
  width: 100%; aspect-ratio: 16 / 10; object-fit: contain;
  background: var(--c-bg); border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  transition: transform .25s ease;
}
.tu-item:hover .tu-item-img { transform: scale(1.06); }
.tu-item-noimg { color: var(--c-text-3); font-size: 22px; }
.tu-item-name { font-size: 12.5px; font-weight: 600; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tu-item-wear { font-size: 11.5px; color: var(--c-text-3); }
.tu-item-price { font-size: 12.5px; font-weight: 700; color: var(--c-text-2); }
.tu-item.is-over .tu-item-price { color: var(--c-red-text); }

.tradeup-actions { display: flex; justify-content: flex-end; gap: 10px; }

/* Result */
.tradeup-result {
  border: 1px solid var(--c-green); background: var(--c-green-soft);
  border-radius: 12px; padding: 13px 16px; display: flex; flex-direction: column; gap: 10px;
  animation: tuPop .35s cubic-bezier(.22,1,.36,1) backwards;
}
.tu-result-head { font-size: 14px; font-weight: 700; color: var(--c-green-text); display: flex; align-items: center; gap: 8px; }
.tu-result-item {
  display: flex; align-items: center; gap: 12px; font-size: 13px;
  background: var(--c-surface); border: 1px solid var(--c-green);
  border-radius: 10px; padding: 9px 11px;
  animation: tuPop .4s cubic-bezier(.22,1,.36,1) backwards;
}
.tu-result-img {
  flex: none; width: 72px; height: 54px; object-fit: contain;
  background: var(--c-bg); border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
}
.tu-result-noimg { color: var(--c-text-3); font-size: 24px; }
.tu-result-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tu-result-name { font-weight: 700; color: var(--c-text-1); }
.tu-result-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.tu-result-st  { font-size: 11.5px; font-weight: 700; color: var(--c-orange-text); }
.tu-result-wear { font-size: 12px; color: var(--c-text-3); }
.tu-result-rar  { font-size: 12px; font-weight: 600; color: var(--c-text-2); padding: 2px 9px; border-radius: 999px; background: var(--c-border); }
.tu-result-price { margin-left: auto; font-weight: 700; color: var(--c-green-text); white-space: nowrap; }

@keyframes tuPop {
  from { opacity: 0; transform: translateY(8px) scale(.97); }
  to   { opacity: 1; transform: none; }
}
@keyframes tuRise {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .tu-group, .tu-item, .tradeup-result, .tu-result-item { animation: none; }
  .tu-group:hover, .tu-item:hover { transform: none; }
  .tu-item:hover .tu-item-img { transform: none; }
  .tu-item-check { transition: opacity .15s ease; }
  .tu-icon-btn i, .tu-icon-btn:hover i { transition: none; transform: none; }
}

/* ============================================================
   Авто-продажа кейсов (auto-sell cases) modal
   ============================================================ */
.autosell-body {
  display: flex; flex-direction: column; gap: 14px;
  padding-bottom: 4px;
}

/* Two-column row: price params | cases */
.as-two-col {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 14px; align-items: start;
}
.as-two-col .as-cases-list { grid-template-columns: 1fr; }

.autosell-body .btn {
  font: inherit; font-weight: 600; cursor: pointer;
  border: 1px solid var(--c-border-strong); background: var(--c-bg);
  color: var(--c-text-1); border-radius: 10px; padding: 9px 16px;
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
  transition: filter .15s ease, border-color .15s ease, color .15s ease, background .15s ease;
}
.autosell-body .btn:hover { filter: brightness(1.06); border-color: var(--c-accent); }
.autosell-body .btn:disabled { opacity: .5; cursor: not-allowed; filter: none; }
.autosell-body .btn-primary {
  background: var(--c-accent); border-color: var(--c-accent); color: #fff;
}
.autosell-body .btn-primary:hover { filter: brightness(1.08); border-color: var(--c-accent); }

/* ── Прочее (misc) tab — feature-launch rows ── */
.misc-feature-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.misc-feature-row .hint { margin: 0; flex: 1 1 200px; }
.misc-open-btn {
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px; border-radius: 10px;
  background: var(--c-surface); color: var(--c-text-1);
  border: 1px solid var(--c-border-strong);
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.misc-open-btn:hover { border-color: var(--c-accent); color: var(--c-accent); }
.misc-open-btn.is-locked { opacity: .45; cursor: not-allowed; }

/* ── Toggle row ── */
.as-toggle-row {
  display: flex; align-items: center; gap: 14px;
  border: 1.5px solid var(--c-border-strong); background: var(--c-bg);
  border-radius: 16px; padding: 17px 20px;
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.as-toggle-row:has(#autosellEnabled:checked) {
  border-color: var(--c-accent); background: var(--c-accent-soft);
  box-shadow: 0 0 0 3px var(--c-accent-soft);
}
.as-toggle-icon {
  flex-shrink: 0; width: 38px; height: 38px; border-radius: 10px;
  background: var(--c-surface); border: 1px solid var(--c-border);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: var(--c-accent);
  transition: background .2s ease, border-color .2s ease;
}
.as-toggle-row:has(#autosellEnabled:checked) .as-toggle-icon {
  background: var(--c-accent); border-color: var(--c-accent); color: #fff;
}
.as-toggle-text { display: flex; flex-direction: column; gap: 4px; flex: 1 1 auto; min-width: 0; }
.as-toggle-title { font-size: 15px; font-weight: 700; color: var(--c-text-1); }
.as-toggle-sub { font-size: 12.5px; line-height: 1.45; color: var(--c-text-3); }

/* ── Generic section card ── */
.as-section {
  display: flex; flex-direction: column; gap: 14px;
  border: 1px solid var(--c-border); border-radius: 14px;
  padding: 18px 20px; background: var(--c-bg);
}
.as-section-label {
  font-size: 10.5px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--c-text-3);
}

/* ── Price inputs ── */
.as-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.as-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.as-field-label { font-size: 12px; font-weight: 600; color: var(--c-text-2); }
.as-field-label em { font-style: normal; font-weight: 500; color: var(--c-text-3); }

.as-input-wrap {
  display: flex; align-items: center; gap: 6px; height: 46px; padding: 0 14px;
  background: var(--c-surface); border: 1.5px solid var(--c-border-strong);
  border-radius: 12px; transition: border-color .15s ease, box-shadow .15s ease;
}
.as-input-wrap:focus-within {
  border-color: var(--c-accent); box-shadow: 0 0 0 3px var(--c-accent-soft);
}
.as-input-wrap input {
  flex: 1 1 auto; min-width: 0; width: 100%;
  font: inherit; font-size: 18px; font-weight: 700; color: var(--c-text-1);
  background: none; border: none; outline: none; padding: 0;
  font-variant-numeric: tabular-nums; -moz-appearance: textfield;
}
.as-input-wrap input::-webkit-outer-spin-button,
.as-input-wrap input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.as-input-suffix { font-size: 15px; font-weight: 700; color: var(--c-text-3); flex-shrink: 0; }

.autosell-body .as-save {
  width: 100%; height: 44px; justify-content: center; font-size: 13.5px; letter-spacing: .015em;
}

.as-hint {
  display: flex; align-items: flex-start; gap: 9px; margin: 0;
  font-size: 12px; line-height: 1.5; color: var(--c-text-3);
}
.as-hint i { margin-top: 1px; color: var(--c-accent); font-size: 14px; flex-shrink: 0; }

/* ── Cases ── */
.as-cases-list { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.as-case {
  display: flex; align-items: center; gap: 9px;
  font-size: 12.5px; font-weight: 600; color: var(--c-text-1);
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: 10px; padding: 9px 13px; line-height: 1.3;
}
.as-case::before {
  content: ""; display: block; flex-shrink: 0;
  width: 7px; height: 7px; border-radius: 50%; background: var(--c-accent);
}

/* ── Bottom bar: compact status + run button in one card ── */
.as-bottom {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 11px 16px; border: 1px solid var(--c-border);
  border-radius: 12px; background: var(--c-bg);
}
.as-stat-row {
  display: flex; align-items: center; gap: 10px; flex: 1 1 auto; flex-wrap: wrap;
}
.as-stat-item {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; color: var(--c-text-2);
}
.as-stat-item i { font-size: 14px; color: var(--c-accent); flex-shrink: 0; }
.as-stat-item b { color: var(--c-text-1); font-weight: 700; font-variant-numeric: tabular-nums; }
.as-stat-dot {
  width: 3px; height: 3px; border-radius: 50%;
  background: var(--c-border-strong); flex-shrink: 0;
}

/* ── Run now button ── */
.as-run-btn {
  flex-shrink: 0; height: 40px; font-size: 13.5px; font-weight: 700;
  border-style: dashed; white-space: nowrap;
}
.as-run-btn:not(:disabled):hover {
  border-style: solid; color: var(--c-accent); border-color: var(--c-accent); filter: none;
  background: var(--c-accent-soft);
}

/* ── Result area ── */
.as-result {
  border-radius: 12px; padding: 13px 15px;
  display: flex; flex-direction: column; gap: 9px;
  animation: tuPop .35s cubic-bezier(.22,1,.36,1) backwards;
}
.as-result.is-ok { border: 1px solid var(--c-green); background: var(--c-green-soft); }
.as-result.is-warn { border: 1px solid var(--c-border-strong); background: var(--c-border); }
.as-result.is-error { border: 1px solid var(--c-red); background: var(--c-red-soft); }
.as-result-head { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.as-result.is-ok .as-result-head { color: var(--c-green-text); }
.as-result.is-warn .as-result-head { color: var(--c-orange-text); }
.as-result.is-error .as-result-head { color: var(--c-red-text); }
.as-result-msg { font-size: 13px; line-height: 1.5; color: var(--c-red-text); word-break: break-word; }
.as-result-stats { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--c-text-2); }
.as-result-stats b { color: var(--c-text-1); }
.as-result-stats .is-fail { color: var(--c-red-text); }
.as-result-items { display: flex; flex-direction: column; gap: 5px; }
.as-result-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: 8px; padding: 7px 11px; font-size: 13px;
}
.as-result-item.is-fail { border-color: var(--c-red); }
.as-ri-name { font-weight: 600; color: var(--c-text-1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.as-ri-price { font-weight: 700; color: var(--c-green-text); white-space: nowrap; }
.as-result-item.is-fail .as-ri-price { color: var(--c-red-text); }
.as-result-skipped { font-size: 12px; line-height: 1.5; color: var(--c-text-3); }

/* ── Auto-sell history table ───────────────────────────────────────────── */
.as-history {
  display: flex; flex-direction: column; gap: 8px;
  margin-top: 4px; padding-top: 14px;
  border-top: 1px dashed var(--c-border);
}
.as-history-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 13.5px; font-weight: 700; color: var(--c-text-1);
}
.as-history-head i { color: var(--c-accent); }
.as-history-stat { font-size: 12.5px; font-weight: 500; color: var(--c-text-2); }
.as-history-stat b { color: var(--c-text-1); }
.as-history-empty { font-size: 12.5px; color: var(--c-text-3); padding: 6px 2px; }
.as-history-table {
  display: flex; flex-direction: column;
  max-height: 320px; overflow-y: auto;
  border: 1px solid var(--c-border); border-radius: 10px;
}
.as-h-row {
  display: grid; grid-template-columns: 96px 1fr auto 22px;
  align-items: center; gap: 10px;
  padding: 7px 12px; font-size: 12.5px;
  border-bottom: 1px solid var(--c-border);
}
.as-h-row:last-child { border-bottom: 0; }
.as-h-head {
  position: sticky; top: 0; z-index: 1;
  background: var(--c-bg); color: var(--c-text-3);
  font-size: 11px; text-transform: uppercase; letter-spacing: .4px; font-weight: 700;
}
.as-h-date { color: var(--c-text-3); white-space: nowrap; }
.as-h-name { color: var(--c-text-1); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.as-h-price { font-weight: 700; color: var(--c-green-text); white-space: nowrap; text-align: right; }
.as-h-status { text-align: center; color: var(--c-green-text); }
.as-h-row.is-fail .as-h-price,
.as-h-row.is-fail .as-h-status { color: var(--c-red-text); }
.as-h-head .as-h-price, .as-h-head .as-h-status, .as-h-head .as-h-date, .as-h-head .as-h-name { color: var(--c-text-3); font-weight: 700; }

@media (max-width: 640px) {
  .as-two-col { grid-template-columns: 1fr; }
  .as-fields { grid-template-columns: 1fr; }
  .as-cases-list { grid-template-columns: 1fr; }
  .as-bottom { flex-direction: column; align-items: stretch; }
  .as-run-btn { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .as-result { animation: none; }
}

/* Keep the dashboard overrides last: its feature styles are loaded late. */
.dash-kpi-card,
.dash-chart-card,
.dash-card {
  min-width: 0;
  border-radius: 8px;
  box-shadow: var(--c-shadow-sm);
}

.dash-kpi-card {
  padding: 13px 14px;
}

.dash-kpi-card:hover {
  transform: none;
  box-shadow: var(--c-shadow-sm);
}

.dash-kpi-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: 7px;
}

.dash-kpi-value { font-size: 1.08rem; }
.dash-charts-row { grid-template-columns: minmax(0, 1fr) minmax(280px, 340px); }
.dash-bottom-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dash-table-wrap { max-width: 100%; border-radius: 6px; }
.dash-table { min-width: 620px; }
.dash-bottom-grid .dash-table { min-width: 520px; }

@media (max-width: 1180px) {
  .dash-charts-row { grid-template-columns: minmax(0, 1fr) minmax(260px, 310px); }
}

@media (max-width: 940px) {
  .dash-charts-row,
  .dash-bottom-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 520px) {
  .dash-kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-kpi-card { align-items: flex-start; gap: 9px; padding: 12px; }
  .dash-kpi-icon-wrap { width: 32px; height: 32px; }
  .dash-kpi-label { white-space: normal; line-height: 1.25; }
  .dash-kpi-value { white-space: normal; overflow-wrap: anywhere; }
}

@media (max-width: 680px) {
  .app-shell,
  .left-nav,
  .content-area,
  .tab-panel {
    width: 100%;
    min-width: 0;
  }

  .left-nav {
    flex-direction: column;
    align-items: stretch;
    flex-wrap: nowrap;
    border-radius: 8px;
  }

  .tab-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    flex: none;
  }

  .tab-btn {
    min-width: 0;
    padding-inline: 8px;
  }

  .sidebar-profile-btn {
    width: 100%;
  }

  .theme-toggle-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
    padding: 12px 0 0;
    border-left: 0;
    border-top: 1px solid var(--c-border);
  }

  .theme-toggle-wrap form {
    margin-top: 0 !important;
  }
}

/* Final cascade: feature modules below the core system keep their behavior,
   while these rules guarantee the shared visual language wins everywhere. */
.dash-kpi-card--accent,
.dash-kpi-card--purple {
  border-left-color: var(--c-text-1) !important;
}

.dash-kpi-icon-wrap--accent,
.dash-kpi-icon-wrap--purple {
  background: var(--c-accent-soft) !important;
  color: var(--c-text-1) !important;
}

.dash-period-btn.is-active,
.dash-donut-tab.is-active,
.ann-chip.is-active {
  background: var(--c-action) !important;
  color: var(--c-action-text) !important;
  box-shadow: var(--c-action-shadow) !important;
}

.sgroup,
.asf-connect-card,
.asf-install-quick,
.profile-modal,
.tradeup-modal,
.autosell-body,
.ann-card,
.admin-card,
.tu-card,
.as-section {
  border-radius: 8px !important;
}

.sgroup {
  background: var(--c-surface) !important;
}

.sgroup-head {
  background: var(--c-surface-2) !important;
  color: var(--c-text-1) !important;
  letter-spacing: 0 !important;
}

.sgroup-head i,
.fwin-section-title i,
.as-history-head i {
  color: var(--c-text-2) !important;
}

.asf-connect-badge--purple {
  background: var(--c-accent-soft) !important;
  color: var(--c-text-1) !important;
}

.fwin {
  border-color: var(--c-border-strong) !important;
  background: var(--c-bg-elev) !important;
  box-shadow: var(--c-shadow-lg) !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

.fwin--enter {
  animation: minourWindowIn 190ms ease-out !important;
}

.fwin.is-closing {
  animation: minourWindowOut 140ms ease-in forwards !important;
}

.fwin--enter .fwin-body {
  animation: minourWindowBodyIn 220ms var(--ease-ui) both;
}

.fwin-header {
  background: var(--c-bg-elev) !important;
}

.fwin-stat,
.fwin-actions button,
.fwin-section,
.fwin-item,
.fwin-tradeurl-input,
.fwin-tradeurl-save,
.fwin-tradeurl-get {
  border-radius: 6px !important;
}

.fwin-login-btn,
.btn-primary,
.s-save-btn,
.cs2drop-confirm-btn,
.creds-save-btn,
#annModalBackdrop .btn-primary,
#tradeupModalBackdrop .btn-primary,
.autosell-body .btn-primary,
.as-save {
  min-height: 40px;
  border: 1px solid rgba(0, 0, 0, 0.68) !important;
  background: var(--c-action) !important;
  color: var(--c-action-text) !important;
  box-shadow: var(--c-action-shadow) !important;
  opacity: 1 !important;
}

.agent-dl-btn {
  border-radius: 6px !important;
  background: var(--c-surface-2) !important;
  color: var(--c-text-1) !important;
}

.ann-icon-btn,
.tu-icon-btn,
.asf-copy-btn,
.agent-refresh-btn,
.fwin-close {
  border-radius: 6px !important;
}

@media (hover: hover) and (pointer: fine) {
  .fwin-login-btn:hover:not(:disabled),
  .btn-primary:hover:not(:disabled),
  .s-save-btn:hover:not(:disabled),
  .cs2drop-confirm-btn:hover:not(:disabled),
  .creds-save-btn:hover:not(:disabled),
  #annModalBackdrop .btn-primary:hover:not(:disabled),
  #tradeupModalBackdrop .btn-primary:hover:not(:disabled),
  .autosell-body .btn-primary:hover:not(:disabled),
  .as-save:hover:not(:disabled) {
    background: var(--c-action-hover) !important;
    border-color: rgba(0, 0, 0, 0.82) !important;
    box-shadow: 0 1px 0 #f4f4f5 inset, 0 0 0 1px rgba(0, 0, 0, 0.48), 0 14px 34px rgba(0, 0, 0, 0.34) !important;
    filter: none !important;
    transform: translateY(-2px) !important;
  }
}

.dash-badge,
.tu-item-check,
.as-toggle-row:has(#autosellEnabled:checked) .as-toggle-icon {
  background: var(--c-action) !important;
  border-color: var(--c-action) !important;
  color: var(--c-action-text) !important;
}

.qty-confirm {
  background: var(--c-action) !important;
  border-color: rgba(0, 0, 0, 0.68) !important;
  color: var(--c-action-text) !important;
  box-shadow: var(--c-action-shadow) !important;
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100%;
  }

  .left-nav {
    position: static;
    top: auto;
    width: 100%;
    min-height: 0;
  }

  .content-area,
  .tab-panel,
  .dash-wrap {
    width: 100%;
    min-width: 0;
  }
}
