/* ═══════════════════════════════════════════════════════════════════════════
   Design tokens — тёмная тема в стиле AXIOM/GMGN
   ═══════════════════════════════════════════════════════════════════════════ */
:root {
  --bg-start:       #07090d;
  --bg-end:         #040508;
  --surface:        #0c0f14;
  --surface-muted:  #111520;
  --surface-deeper: #060709;
  --border:         rgba(255, 255, 255, 0.08);
  --border-soft:    rgba(255, 255, 255, 0.04);
  --accent:         #32d2c8;
  --accent-soft:    rgba(50, 210, 200, 0.14);
  --accent-dim:     rgba(50, 210, 200, 0.6);
  --text-main:      #e8edf5;
  --text-muted:     rgba(232, 237, 245, 0.50);
  --text-dim:       rgba(232, 237, 245, 0.28);
  --shadow:         0 18px 45px rgba(0, 0, 0, 0.85);
  --alert:          #ff8484;
  --alert-strong:   #ff5e5e;
  --good:           #32d2c8;
  --good-soft:      rgba(50, 210, 200, 0.14);
  --bad:            #ff5e5e;
  --bad-soft:       rgba(255, 94, 94, 0.12);
  --warn:           #fb923c;
  --warn-soft:      rgba(251, 146, 60, 0.12);
  --info:           #7dd3fc;
  --info-soft:      rgba(125, 211, 252, 0.10);
  --radius:         14px;
  --radius-sm:      8px;
  --font:           'Space Grotesk', 'Segoe UI', sans-serif;
  --font-mono:      'JetBrains Mono', 'Courier New', monospace;
  --sidebar-w:      220px;
  --content-max:    1200px;
  --thumb-default:  url("data:image/svg+xml;charset=UTF-8,%3Csvg%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20width='256'%20height='256'%3E%3Cpath%20d='M0%200%20C84.48%200%20168.96%200%20256%200%20C256%2084.48%20256%20168.96%20256%20256%20C171.52%20256%2087.04%20256%200%20256%20C0%20171.52%200%2087.04%200%200%20Z%20'%20fill='%231B1C27'%20transform='translate(0,0)'/%3E%3Cpath%20d='M0%200%20C4.336932%201.39428897%206.6973368%203.40122929%209.8125%206.6875%20C13.35858467%2010.40712878%2017.0410759%2013.82354279%2020.9230957%2017.18139648%20C24.25636258%2020.10011107%2027.46774872%2023.14479078%2030.6875%2026.1875%20C32.07911516%2027.49642546%2033.47104725%2028.80501404%2034.86328125%2030.11328125%20C35.55244629%2030.76119629%2036.24161133%2031.40911133%2036.95166016%2032.07666016%20C40.08454054%2035.01835642%2043.22535816%2037.95126103%2046.375%2040.875%20C46.91600342%2041.3805542%2047.45700684%2041.8861084%2048.0144043%2042.40698242%20C50.78923967%2045.00502196%2050.78923967%2045.00502196%2054%2047%20C52.61508836%2050.09425165%2050.99883636%2052.28161795%2048.65625%2054.72265625%20C47.99189941%2055.42092529%2047.32754883%2056.11919434%2046.64306641%2056.83862305%20C45.93585449%2057.57250244%2045.22864258%2058.30638184%2044.5%2059.0625%20C38.67591079%2065.10684619%2038.67591079%2065.10684619%2033.0703125%2071.3515625%20C25.15019136%2080.53687871%2017.05454277%2086.30516698%204.7421875%2087.25%20C-5.84095931%2087.6157243%20-13.87632826%2085.4114374%20-22.18359375%2078.765625%20C-29.95982635%2071.20679245%20-33.99574186%2061.15883586%20-34.375%2050.4375%20C-34.21015993%2038.22434959%20-28.25374255%2030.38150946%20-20%2022%20C-18.15964991%2020.00584544%20-16.32649594%2018.00668979%20-14.5%2016%20C-13.57711943%2014.99451943%20-12.65394403%2013.98930939%20-11.73046875%2012.984375%20C-7.78893881%208.68452415%20-3.89251257%204.34423625%200%200%20Z%20'%20fill='%235FCB88'%20transform='translate(99,106)'/%3E%3Cpath%20d='M0%200%20C1.7592615%201.0555569%203.4942717%202.15397537%205.1875%203.3125%20C6.280625%204.034375%207.37375%204.75625%208.5%205.5%20C17.88218761%2015.31856843%2019.83748661%2024.15689736%2019.5859375%2037.20703125%20C18.98661779%2048.81300623%2011.9378072%2056.34418135%204.1875%2064.3125%20C2.91516877%2065.66795006%201.64587094%2067.02625114%200.37890625%2068.38671875%20C-2.26029493%2071.21989947%20-4.90249464%2074.05006559%20-7.5546875%2076.87109375%20C-8.1101123%2077.46204834%20-8.66553711%2078.05300293%20-9.23779297%2078.66186523%20C-10.73987251%2080.23637062%20-12.26701295%2081.7806924%20-13.8125%2083.3125%20C-16.819318%2081.97250502%20-18.81012609%2080.51404709%20-21.0625%2078.125%20C-24.09188411%2074.92315096%20-27.36044042%2072.07056271%20-30.68505859%2069.18383789%20C-34.0299181%2066.24163591%20-37.26264053%2063.18441592%20-40.5%2060.125%20C-41.8955059%2058.81215187%20-43.29134425%2057.49965703%20-44.6875%2056.1875%20C-45.37714844%2055.53910156%20-46.06679687%2054.89070313%20-46.77734375%2054.22265625%20C-49.8419142%2051.34631278%20-52.91694442%2048.48151235%20-56%2045.625%20C-56.5158667%2045.14458252%20-57.0317334%2044.66416504%20-57.56323242%2044.16918945%20C-60.54596597%2041.41086219%20-63.6102387%2038.81225425%20-66.8125%2036.3125%20C-65.3883355%2031.59117892%20-62.61933308%2028.8024539%20-59.125%2025.5%20C-58.03064642%2024.43815841%20-56.93819028%2023.37435773%20-55.84765625%2022.30859375%20C-55.32187988%2021.79538574%20-54.79610352%2021.28217773%20-54.25439453%2020.75341797%20C-52.4312704%2018.9315286%20-50.73536416%2017.02258445%20-49.0625%2015.0625%20C-47.98025395%2013.81155852%20-46.89692723%2012.56155112%20-45.8125%2011.3125%20C-45.22597656%2010.63445312%20-44.63945313%209.95640625%20-44.03515625%209.2578125%20C-32.62503425%20-3.1089864%20-15.52279892%20-7.44243784%200%200%20Z%20'%20fill='%23FDFDFD'%20transform='translate(171.8125,65.6875)'/%3E%3Cpath%20d='M0%200%20C9.02527993%206.52924973%2015.67418231%2015.5782634%2018.44140625%2026.42578125%20C20.2406161%2040.82636684%2017.33217659%2052.89355016%208.44140625%2064.42578125%20C5.73232278%2067.34202993%202.95273287%2070.10240336%200.08203125%2072.859375%20C-2.77884393%2075.63984097%20-5.3618688%2078.5667606%20-7.94921875%2081.59765625%20C-10.09309153%2084.03292922%20-12.3997054%2086.27932659%20-14.71459961%2088.55053711%20C-16.49916969%2090.36535013%20-18.16839615%2092.23504234%20-19.828125%2094.1640625%20C-23.99872717%2098.96053046%20-28.34596788%20103.57645631%20-32.71362305%20108.19287109%20C-35.8062594%20111.46920967%20-38.87386089%20114.75567645%20-41.84765625%20118.140625%20C-47.44124332%20124.47854154%20-52.78936835%20129.78279518%20-60.55859375%20133.42578125%20C-61.60660156%20133.96203125%20-62.65460938%20134.49828125%20-63.734375%20135.05078125%20C-68.23282151%20136.94556494%20-72.61552952%20136.86618484%20-77.43359375%20136.80078125%20C-78.28050781%20136.81238281%20-79.12742188%20136.82398438%20-80%20136.8359375%20C-90.62951515%20136.78710359%20-99.23844925%20132.96654382%20-107.55859375%20126.42578125%20C-117.90108063%20115.96222847%20-120.85940933%20105.29642368%20-120.87329102%2090.89648438%20C-120.58437553%2075.01809965%20-109.49426588%2065.13596111%20-99.23388672%2054.20996094%20C-96.92790014%2051.75409531%20-94.63052479%2049.29023597%20-92.33251953%2046.8269043%20C-91.14520494%2045.55445471%20-89.9573752%2044.28248561%20-88.76904297%2043.01098633%20C-85.03757343%2039.01752435%20-81.32300548%2035.00914036%20-77.62109375%2030.98828125%20C-73.01571231%2025.9907368%20-68.3883058%2021.01413459%20-63.74609375%2016.05078125%20C-63.13580322%2015.3966626%20-62.5255127%2014.74254395%20-61.89672852%2014.06860352%20C-60.12641454%2012.17887219%20-58.34315281%2010.30205265%20-56.55859375%208.42578125%20C-55.6910144%207.48726318%20-55.6910144%207.48726318%20-54.8059082%206.52978516%20C-50.94295231%202.46550433%20-47.44504245%20-0.04780791%20-42.37109375%20-2.44921875%20C-41.76845703%20-2.743125%20-41.16582031%20-3.03703125%20-40.54492188%20-3.33984375%20C-27.26337577%20-9.69632465%20-12.32442705%20-7.58281542%200%200%20Z%20M-64.9609375%2026.546875%20C-67.57443038%2029.62044487%20-70.32634242%2032.57129878%20-73.0546875%2035.54296875%20C-74.76662768%2037.28461009%20-74.76662768%2037.28461009%20-74.55859375%2039.42578125%20C-73.03243423%2040.98911304%20-73.03243423%2040.98911304%20-71.0390625%2042.6015625%20C-66.86227152%2046.15399255%20-62.85546524%2049.84769467%20-58.87109375%2053.61328125%20C-57.46521205%2054.93658931%20-56.05895714%2056.25950097%20-54.65234375%2057.58203125%20C-53.96140625%2058.23171875%20-53.27046875%2058.88140625%20-52.55859375%2059.55078125%20C-49.15887581%2062.73801682%20-45.73838775%2065.90261213%20-42.30224609%2069.05053711%20C-39.5051085%2071.61494377%20-36.73839281%2074.20468115%20-34.00390625%2076.8359375%20C-33.41697998%2077.39450439%20-32.83005371%2077.95307129%20-32.2253418%2078.52856445%20C-31.09935034%2079.60114166%20-29.98058872%2080.68137719%20-28.87036133%2081.77026367%20C-25.77596329%2084.69923327%20-25.00470648%2085.42578125%20-20.55859375%2085.42578125%20C-17.88064087%2083.27454503%20-17.88064087%2083.27454503%20-15.24609375%2080.42578125%20C-14.75898926%2079.92248291%20-14.27188477%2079.41918457%20-13.77001953%2078.90063477%20C-10.50995976%2075.50712542%20-7.34722519%2072.03517228%20-4.30859375%2068.44140625%20C-3.01817264%2066.95511765%20-1.67644833%2065.51300578%20-0.30859375%2064.09765625%20C9.04806253%2054.31010133%2012.19037278%2046.13845236%2012.03588867%2032.71069336%20C11.74953042%2025.99619551%2010.53350346%2020.88552898%206.44140625%2015.42578125%20C5.78978516%2014.46865234%205.78978516%2014.46865234%205.125%2013.4921875%20C0.39195167%207.22190979%20-7.11295667%202.75649767%20-14.55859375%200.42578125%20C-38.15273147%20-2.56600775%20-50.60326754%209.54533743%20-64.9609375%2026.546875%20Z%20M-81.98803711%2044.70410156%20C-82.53596924%2045.29803711%20-83.08390137%2045.89197266%20-83.6484375%2046.50390625%20C-84.26275635%2047.16438965%20-84.8770752%2047.82487305%20-85.51000977%2048.50537109%20C-86.49312134%2049.57972412%20-86.49312134%2049.57972412%20-87.49609375%2050.67578125%20C-88.50337524%2051.76753662%20-88.50337524%2051.76753662%20-89.53100586%2052.88134766%20C-90.89721673%2054.36285951%20-92.26156123%2055.84609468%20-93.62402344%2057.33105469%20C-95.32686666%2059.17487029%20-97.04828287%2060.99692152%20-98.78515625%2062.80859375%20C-108.35744857%2072.85612903%20-115.09083272%2082.07896305%20-114.80859375%2096.33203125%20C-113.97276472%20106.67541544%20-109.41299261%20115.64243678%20-101.55859375%20122.42578125%20C-92.04262535%20129.50537926%20-84.43064581%20131.25223349%20-72.55859375%20130.42578125%20C-58.58263119%20128.11906898%20-50.41934644%20118.47095346%20-41.40332031%20108.45556641%20C-39.54919058%20106.41543477%20-37.66596745%20104.40706369%20-35.76953125%20102.40625%20C-35.1672168%20101.76880859%20-34.56490234%20101.13136719%20-33.94433594%20100.47460938%20C-32.78893434%2099.25320314%20-31.6308156%2098.03436032%20-30.46972656%2096.81835938%20C-27.52592123%2094.08366394%20-27.52592123%2094.08366394%20-26.55859375%2090.42578125%20C-27.93816791%2088.99111109%20-27.93816791%2088.99111109%20-29.80859375%2087.48828125%20C-38.13188808%2080.40400622%20-46.07523082%2072.88824679%20-54.05859375%2065.42578125%20C-58.75448005%2061.03723149%20-63.45480468%2056.65389099%20-68.18359375%2052.30078125%20C-69.10398438%2051.45257813%20-70.024375%2050.604375%20-70.97265625%2049.73046875%20C-75.99819938%2044.13132448%20-75.99819938%2044.13132448%20-81.98803711%2044.70410156%20Z%20'%20fill='%231C3833'%20transform='translate(179.55859375,62.57421875)'/%3E%3Cpath%20d='M0%200%20C0.556875%200.28875%201.11375%200.5775%201.6875%200.875%20C4.08494645%202.0413253%206.51596939%203.0339881%209%204%20C7.61508836%207.09425165%205.99883636%209.28161795%203.65625%2011.72265625%20C2.99189941%2012.42092529%202.32754883%2013.11919434%201.64306641%2013.83862305%20C0.93585449%2014.57250244%200.22864258%2015.30638184%20-0.5%2016.0625%20C-6.32408921%2022.10684619%20-6.32408921%2022.10684619%20-11.9296875%2028.3515625%20C-19.84980864%2037.53687871%20-27.94545723%2043.30516698%20-40.2578125%2044.25%20C-50.85619268%2044.61625072%20-58.82628983%2042.39140906%20-67.171875%2035.79296875%20C-70.40278325%2032.62419335%20-72.72013106%2028.88614024%20-75%2025%20C-71.39856285%2025%20-70.28615233%2025.92368654%20-67.3125%2027.875%20C-58.55035796%2033.24371131%20-49.81046481%2034.4134927%20-39.6875%2032.3125%20C-23.17260897%2027.72503027%20-11.71910772%2013.78189133%20-1%201%20C-0.67%200.67%20-0.34%200.34%200%200%20Z%20'%20fill='%2360B58D'%20transform='translate(144,149)'/%3E%3Cpath%20d='M0%200%20C6.76336221%203.62912119%2010.63491406%209.52210395%2014.171875%2016.21875%20C16.8374009%2025.17089358%2016.53137251%2037.19252018%2012.5625%2045.625%20C9.07800955%2051.41635218%204.69401193%2056.17394835%200%2061%20C-1.27233123%2062.35545006%20-2.54162906%2063.71375114%20-3.80859375%2065.07421875%20C-6.44779493%2067.90739947%20-9.08999464%2070.73756559%20-11.7421875%2073.55859375%20C-12.57532471%2074.44502563%20-12.57532471%2074.44502563%20-13.42529297%2075.34936523%20C-14.92737251%2076.92387062%20-16.45451295%2078.4681924%20-18%2080%20C-20.84383123%2078.7251791%20-23.13754018%2077.54862922%20-25%2075%20C-24.8108777%2070.56060295%20-21.39116016%2068.10398153%20-18.375%2065.25%20C-17.27428986%2064.17888059%20-16.17532484%2063.1059649%20-15.078125%2062.03125%20C-14.28051758%2061.25201172%20-14.28051758%2061.25201172%20-13.46679688%2060.45703125%20C-1.9937032%2049.06032302%206.21907314%2037.85676068%206.39819336%2021.36450195%20C6.28693428%2014.48900205%204.08562399%209.10043038%201%203%20C0.67%202.01%200.34%201.02%200%200%20Z%20'%20fill='%23C0D4D4'%20transform='translate(176,69)'/%3E%3Cpath%20d='M0%200%20C0.99%200%201.98%200%203%200%20C3.33%204.62%203.66%209.24%204%2014%20C3.01%2014%202.02%2014%201%2014%20C-0.04976964%2010.85069107%20-0.10131595%208.61185544%20-0.0625%205.3125%20C-0.05347656%204.31863281%20-0.04445313%203.32476562%20-0.03515625%202.30078125%20C-0.02355469%201.54152344%20-0.01195313%200.78226563%200%200%20Z%20'%20fill='%23F5FBF7'%20transform='translate(78,152)'/%3E%3Cpath%20d='M0%200%20C4.12417063%201.6616804%207.06554039%204.62338018%2010.25%207.625%20C10.80429688%208.140625%2011.35859375%208.65625%2011.9296875%209.1875%20C13.2902712%2010.45425035%2014.64565837%2011.72657815%2016%2013%20C12.55254353%2013%2012.25874198%2012.65820401%209.86328125%2010.41015625%20C9.28642578%209.87326172%208.70957031%209.33636719%208.11523438%208.78320312%20C7.52033203%208.21537109%206.92542969%207.64753906%206.3125%207.0625%20C5.70599609%206.49853516%205.09949219%205.93457031%204.47460938%205.35351562%20C2.95776986%203.9288126%201.47569682%202.46727629%200%201%20C0%200.67%200%200.34%200%200%20Z%20'%20fill='%2361D08B'%20transform='translate(121,126)'/%3E%3Cpath%20d='M0%200%20C1.875%200.25%201.875%200.25%204%201%20C5.25%203.0625%205.25%203.0625%206%205%20C4.125%204.75%204.125%204.75%202%204%20C0.75%201.9375%200.75%201.9375%200%200%20Z%20'%20fill='%23ECF8F1'%20transform='translate(82,171)'/%3E%3Cpath%20d='M0%200%20C0.99%200%201.98%200%203%200%20C3%202.64%203%205.28%203%208%20C1.5%206.8125%201.5%206.8125%200%205%20C-0.1875%202.3125%20-0.1875%202.3125%200%200%20Z%20'%20fill='%23EFF9F3'%20transform='translate(78,152)'/%3E%3Cpath%20d='M0%200%20C0.99%200%201.98%200%203%200%20C2.34%201.65%201.68%203.3%201%205%20C0.01%204.67%20-0.98%204.34%20-2%204%20C-1.34%202.68%20-0.68%201.36%200%200%20Z%20'%20fill='%23E6F6EC'%20transform='translate(83,143)'/%3E%3C/svg%3E");
}

/* ── Reset ─────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  font-size: 13px;
  color: var(--text-main);
  background: radial-gradient(ellipse at top, var(--bg-start), var(--bg-end));
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

/* ── Scrollbar ─────────────────────────────────────────────────────────────── */
::-webkit-scrollbar              { width: 6px; height: 6px; }
::-webkit-scrollbar-track        { background: transparent; }
::-webkit-scrollbar-thumb        { background: rgba(50, 210, 200, 0.25); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover  { background: rgba(50, 210, 200, 0.50); }

/* ═══════════════════════════════════════════════════════════════════════════
   LAYOUT — sidebar (left) + main (right)
   ═══════════════════════════════════════════════════════════════════════════ */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  height: 100vh;
  width: 100vw;
}

/* ── Sidebar ───────────────────────────────────────────────────────────────── */
.sidebar {
  background: linear-gradient(180deg, rgba(8, 11, 16, 0.97), rgba(4, 6, 9, 0.99));
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 18px 12px 12px;
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 6px 18px;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 14px;
}
.brand-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent), 0 0 16px var(--accent-dim);
  flex-shrink: 0;
}
.brand-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-main);
  line-height: 1.15;
}
.brand-sub {
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 1px;
}

.nav-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav-label {
  font-size: 9px;
  color: var(--text-dim);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 10px 10px 6px;
}
.nav-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.nav-btn:hover { background: var(--surface); color: var(--text-main); }
.nav-btn.active {
  background: var(--accent-soft);
  border-color: var(--border);
  color: var(--accent);
}
.nav-btn .nav-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.5;
  flex-shrink: 0;
}
.nav-btn.active .nav-dot { opacity: 1; box-shadow: 0 0 5px currentColor; }

.nav-divider {
  height: 1px;
  background: var(--border-soft);
  margin: 14px 6px 8px;
}
.nav-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.nav-btn.disabled:hover { background: transparent; color: var(--text-muted); }

.sidebar-foot {
  margin-top: auto;
  padding: 10px 6px 4px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  color: var(--text-dim);
}
.led {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--text-dim);
  flex-shrink: 0;
}
.led.ok   { background: var(--accent); box-shadow: 0 0 5px var(--accent); }
.led.bad  { background: var(--bad); box-shadow: 0 0 5px var(--bad); }

/* ── Main column ───────────────────────────────────────────────────────────── */
.main {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 20px 24px;
}

/* По умолчанию #app скроллится сам (кошельки, fresh, mcp, api) */
#app {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}
/* Единый max-width для всего контента в .main — чтобы шапка, summary, таблицы,
   токен-карточки, mcp/api-блоки выравнивались по одной правой границе. */
.main > .page-header,
.main > #app > * {
  max-width: var(--content-max);
}

/* Шапка страницы: лого + заголовок/подзаголовок в одну строку */
.page-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.page-logo {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(50, 210, 200, 0.2));
}
.page-header h1.page-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: 0.01em;
  line-height: 1.2;
  margin: 0;
}
.page-header .subtitle {
  color: var(--text-muted);
  font-size: 12px;
  margin: 2px 0 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FILTERS BAR (RECENT TOKENS)
   ═══════════════════════════════════════════════════════════════════════════ */
.filters-bar {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 14px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
}
.filters-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.filter-item {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.filter-label {
  font-size: 12px;
  color: var(--text-main);
}

/* ═══════════════════════════════════════════════════════════════════════════
   SUMMARY (агрегаты сверху)
   ═══════════════════════════════════════════════════════════════════════════ */
.summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr)) minmax(280px, 1.5fr);
  gap: 10px;
  margin-bottom: 22px;
}
.s-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 90px;
}
.s-card .v {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.1;
  font-family: var(--font);
}
.s-card .l {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.s-card.s-age { padding: 10px 14px; }
.age-bars { display: flex; flex-direction: column; gap: 4px; }
.age-row { display: flex; align-items: center; gap: 8px; font-size: 11px; }
.age-lbl { color: var(--text-muted); width: 48px; flex-shrink: 0; font-size: 10px; }
.age-track {
  flex: 1; height: 6px;
  background: var(--surface-muted);
  border-radius: 3px; overflow: hidden;
}
.age-fill { height: 100%; border-radius: 3px; transition: width 0.3s; min-width: 1px; }
.age-cnt { font-size: 10px; font-weight: 600; width: 40px; text-align: right; flex-shrink: 0; font-family: var(--font-mono); }

/* ═══════════════════════════════════════════════════════════════════════════
   TABLES (wallets / fresh)
   ═══════════════════════════════════════════════════════════════════════════ */
.section-header { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.btn-add {
  background: var(--accent);
  border: none;
  border-radius: var(--radius-sm);
  color: #0a0f15;
  cursor: pointer;
  font: 600 11px/1 var(--font);
  letter-spacing: 0.04em;
  padding: 7px 14px;
}
.btn-add:hover { filter: brightness(1.1); }
.btn-add.btn-secondary {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.btn-add.btn-secondary:hover { color: var(--text-main); border-color: var(--accent); }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  table-layout: fixed;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
th {
  text-align: left;
  padding: 10px 12px;
  background: var(--surface-muted);
  border-bottom: 1px solid var(--border-soft);
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
}
td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: middle;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(50, 210, 200, 0.04); }
tr.tracked td { background: rgba(50, 210, 200, 0.06); }
tr.tracked:hover td { background: rgba(50, 210, 200, 0.10); }
.mono { font-family: var(--font-mono); color: var(--text-muted); font-size: 11px; }
.num { text-align: right; font-family: var(--font-mono); }
.ts { color: var(--text-muted); white-space: nowrap; font-size: 11px; }
.found b { color: var(--accent); }

/* Wallet name cell — двухстрочные имена должны переноситься чисто, без сломанной
   вёрстки строки. При переносе вырастает ВСЯ строка одинаково (стандартное
   поведение table — но только если td не имеет overflow:hidden). */
.name-cell {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  line-height: 1.35;
}

/* Address cell — иконки + укороченный адрес в один ряд, без переноса */
.addr-cell {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
}
.addr-cell .mono {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Actions cell — пара кнопок (✏ + 🗑) */
.actions-cell {
  text-align: right;
  white-space: nowrap;
}
.actions-cell .btn-hide + .btn-hide { margin-left: 4px; }
.btn-edit:hover { color: var(--accent); border-color: var(--accent); }

/* Inline buttons in tables */
.btn-copy, .btn-link, .btn-hide {
  background: none;
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 12px;
  padding: 2px 6px;
  margin-left: 2px;
  text-decoration: none;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  line-height: 1;
  font-family: inherit;
}
.btn-copy:hover, .btn-link:hover { color: var(--text-main); border-color: var(--accent); }
.btn-hide:hover { color: var(--bad); border-color: rgba(255, 94, 94, 0.4); }
.btn-delete:hover { color: var(--bad); }

/* Switch toggle */
.switch { position: relative; display: inline-block; width: 36px; height: 18px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute; inset: 0;
  background: var(--surface-muted);
  border: 1px solid var(--border-soft);
  border-radius: 18px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.slider::before {
  content: '';
  position: absolute;
  left: 2px; top: 1px;
  width: 12px; height: 12px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: transform 0.15s, background 0.15s;
}
input:checked + .slider { background: var(--accent-soft); border-color: var(--accent); }
input:checked + .slider::before { transform: translateX(18px); background: var(--accent); }

.state.cex   { color: var(--info); }
.state.dev   { color: var(--accent); }

/* Empty row */
.empty-row td, .empty-msg {
  color: var(--text-dim);
  text-align: center;
  padding: 28px;
  font-size: 12px;
  letter-spacing: 0.05em;
}

/* ═══════════════════════════════════════════════════════════════════════════
   TOKEN CARDS (используется в RECENT TOKENS и RECENT SWAPS)
   Структура взята из angry-watcher-v3 + angry-tracker-v3 (одинаковые классы).
   ═══════════════════════════════════════════════════════════════════════════ */
.token-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ── Двухколоночная лента токенов: New Pairs | Migrated ── */
.token-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: start;
}
.token-col { min-width: 0; }
.token-col-migrated {
  border-left: 1px solid var(--border);
  padding-left: 14px;
}
.token-col-head {
  font: 600 14px/1 var(--font);
  letter-spacing: 0.02em;
  color: #4ade80;
  padding: 2px 2px 10px;
  flex-shrink: 0;
}

/* Токен-таб: колонки прокручиваются внутри, заголовки остаются на месте */
#app[data-tab="tokens"] {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
#app[data-tab="tokens"] .token-cols {
  flex: 1;
  min-height: 0;
  align-items: stretch;
}
#app[data-tab="tokens"] .token-col {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}
#app[data-tab="tokens"] .token-grid {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}
@media (max-width: 1100px) {
  .token-cols { grid-template-columns: 1fr; }
  .token-col-migrated { border-left: 0; padding-left: 0; margin-top: 8px; }
}
.token-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 10px 8px;
  overflow: hidden;
  flex-shrink: 0;
  transition: border-color 0.15s;
}
.token-card:hover { border-color: rgba(50, 210, 200, 0.35); }
.token-card.tc-bad { border-color: rgba(255, 94, 94, 0.35); }
/* Мягкое схлопывание плитки при удалении (bot и т.п.). Стартовые значения
   max-height/opacity/margin-top задаёт JS (collapseCard). */
.token-card.tc-collapsing {
  transition: max-height 0.3s ease, opacity 0.3s ease, margin-top 0.3s ease, border-color 0.15s ease;
  pointer-events: none;
}

/* ── SIGNALS ─────────────────────────────────────────────────────────────────
   Карточка как RECENT TOKENS (.token-card) + spark справа от хедера + строка
   метрик. Лента — одна колонка, скроллится внутри (заголовок страницы статичен). */
#app[data-tab="signals"] {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.signals-wrap { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.signals-grid {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 4px;
}
.sc-top { display: flex; gap: 12px; align-items: stretch; }
.sc-left { flex: 1 1 auto; min-width: 0; }
.sc-spark {
  flex: 0 0 44%;
  max-width: 46%;
  min-width: 180px;
  background: #05070b;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
}
.sc-spark .spark { width: 100%; height: 100%; min-height: 64px; display: block; }
.sc-metrics { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.sc-metric {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 3px 8px;
  background: var(--surface-muted);
}
.sc-m-lbl { color: var(--text-muted); }
.sc-m-val { color: var(--text-main); font-weight: 600; }
@media (max-width: 720px) {
  .sc-top { flex-direction: column; }
  .sc-spark { flex: none; max-width: none; width: 100%; min-height: 70px; }
}

.tc-header { display: flex; gap: 10px; align-items: stretch; }

.tc-thumb-col { flex-shrink: 0; width: 75px; }
.tc-thumb-link { display: block; line-height: 0; border-radius: 8px; overflow: hidden; }

/* Контейнер: дефолтный SVG живёт ЗДЕСЬ как base layer и не исчезает никогда. */
.tc-thumb {
  position: relative;
  width: 75px; height: 75px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface-muted) var(--thumb-default) center/cover no-repeat;
}

/* Картинка — слой поверх SVG, появляется мгновенно по onload (см. thumbOk). */
.tc-thumb-img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;                                         /* скрыта пока не загрузилась — прячет битую иконку/недогруз */
}
.tc-thumb-img.is-loaded { opacity: 1; }               /* мгновенно, без перехода */
.tc-thumb-link:hover .tc-thumb-img.is-loaded { opacity: 0.85; }

.tc-header-right {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 3px;
  overflow: hidden;
}
.tc-title-line { display: flex; align-items: baseline; gap: 6px; margin-bottom: 4px; }
.tc-title-link {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  text-decoration: none;
  flex: 1;
  min-width: 0;
}
.tc-title-link:hover .token-ticker { color: var(--accent); }
.token-ticker {
  font-weight: 700;
  color: var(--text-main);
  font-size: 13px;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}
.token-name-lbl {
  font-size: 11px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}
.tc-count-badge {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 4px;
  border: 1px solid;
  opacity: 0.9;
}

.tc-addr-row {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 2px;
  min-width: 0;
}
.tc-addr-val {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}
.tc-ss-link {
  font-size: 10px;
  color: var(--text-muted);
  text-decoration: none;
  flex-shrink: 0;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.15s;
  display: inline-flex;
  align-items: center;
}
.tc-ss-link:hover { opacity: 1; color: rgb(0, 232, 180); }
.tc-ss-link svg { display: block; }

.tc-dapa-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}
.tc-time-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  color: rgba(228, 255, 228, 0.85);
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 7px;
  white-space: nowrap;
  flex-shrink: 0;
  font-family: var(--font-mono);
}
.tc-time-pill svg { display: block; flex-shrink: 0; }
.tc-addr-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface-muted);
  padding: 1px 5px 1px 6px;
}
.tc-addr-pill-lbl {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  color: rgba(244, 247, 251, 0.70);
  text-decoration: none;
  letter-spacing: 0.04em;
  line-height: 1;
  opacity: 0.75;
}
.tc-addr-pill-lbl svg { display: block; flex-shrink: 0; }
.tc-addr-pill-lbl:hover { opacity: 1; }
.tc-addr-pill .ico-btn {
  width: 14px; height: 14px;
  padding: 0;
  opacity: 0.6;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.tc-addr-pill .ico-btn:hover { opacity: 1; color: var(--accent); }
.tc-addr-pill .ico-btn svg { width: 11px; height: 11px; }

.tc-pill {
  font-size: 10px;
  font-weight: 600;
  border-radius: 4px;
  padding: 1px 6px;
  flex-shrink: 0;
  white-space: nowrap;
  border: 1px solid;
  font-family: var(--font-mono);
}
.tc-pill-bal   { color: var(--info); border-color: rgba(125, 211, 252, 0.35); background: var(--info-soft); }
.tc-pill-buy   { color: #0a0f15;     border-color: var(--accent);             background: var(--accent); }
.tc-pill-nobuy { color: var(--warn); border-color: rgba(251, 146, 60, 0.40);  background: var(--warn-soft); }
.tc-pill-migrated { color: #4ade80; border-color: rgba(74, 222, 128, 0.40); background: rgba(74, 222, 128, 0.12); }
.tc-pill-bot   { color: #a78bfa; border-color: rgba(167, 139, 250, 0.40); background: rgba(167, 139, 250, 0.12); }

.tc-fresh-section {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.tc-fresh-title {
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 2px;
}
.token-swaps { display: flex; flex-direction: column; gap: 2px; }
.token-swap-row {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 3px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 11px;
}
.token-swap-row:last-child { border-bottom: none; }
.ts-emoji { font-size: 10px; flex-shrink: 0; line-height: 1; }
.ts-tx-link {
  font-size: 10px;
  color: var(--text-muted);
  text-decoration: none;
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  padding: 1px 5px;
  letter-spacing: 0.05em;
  font-weight: 700;
}
.ts-tx-link:hover { color: var(--text-main); border-color: rgba(255, 255, 255, 0.3); }
.ts-group-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  color: #fff;
  max-width: 110px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.ts-marker {
  font-size: 9px;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(50, 210, 200, 0.15);
  color: var(--accent);
  border: 1px solid var(--border);
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ts-right {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  flex-shrink: 0;
}
.ts-sol { font-size: 11px; font-weight: 700; color: var(--accent); font-family: var(--font-mono); }
.ts-age { font-size: 10px; color: var(--text-muted); white-space: nowrap; font-family: var(--font-mono); }
.ts-user-link {
  font-size: 10px;
  color: var(--info);
  text-decoration: none;
  font-family: var(--font-mono);
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ts-user-link:hover { color: #bae6fd; }

.tc-links-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.tc-ext-link {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 8px;
  letter-spacing: 0.04em;
  transition: color 0.15s, border-color 0.15s;
}
.tc-ext-link:hover { color: var(--text-main); border-color: var(--accent); }
.tc-ext-link.social {
  color: #a78bfa;
  border-color: rgba(167, 139, 250, 0.35);
  background: rgba(167, 139, 250, 0.08);
}
.tc-ext-link.social:hover { color: #c4b5fd; border-color: #a78bfa; }

.tc-act-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  padding: 2px 6px;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  transition: color 0.15s, border-color 0.15s;
}
.tc-act-btn:hover { color: var(--text-main); border-color: var(--accent); }
.tc-act-btn svg { width: 12px; height: 12px; pointer-events: none; }
.tc-act-btn--ghost { border-color: transparent !important; }
.tc-act-btn--ghost:hover { border-color: transparent !important; }

/* ═══════════════════════════════════════════════════════════════════════════
   MCP / API STATS TAB
   ═══════════════════════════════════════════════════════════════════════════ */
.mcp-wrap, .api-stats-wrap { width: 100%; }

.mcp-header { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.mcp-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  flex-shrink: 0;
}
.mcp-url {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 14px;
  word-break: break-all;
}
.summary-cards {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
  flex-wrap: wrap;
  align-items: center;
}
.summary-cards .s-card { padding: 10px 18px; min-height: 0; text-align: center; }
.summary-cards .s-card .v { font-size: 20px; }
.summary-cards .s-card .l { font-size: 9px; }

.section-label {
  font-size: 10px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}
.mcp-tools { display: flex; flex-direction: column; gap: 3px; margin-bottom: 22px; }
.mcp-tool {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.mcp-tool:hover { border-color: var(--border); }
.mcp-tool-name { font-family: var(--font-mono); font-size: 12px; color: var(--accent); }
.mcp-badges { display: flex; gap: 4px; flex-shrink: 0; }
.mcp-badge { font-family: var(--font-mono); font-size: 10px; padding: 2px 6px; border-radius: 4px; }
.mcp-badge.calls { background: var(--info-soft); color: var(--info); }
.mcp-badge.errs  { background: var(--bad-soft); color: var(--bad); }
.mcp-badge.ms    { background: var(--surface-muted); color: var(--text-dim); }
.mcp-badge.ago   { background: var(--surface-muted); color: var(--text-dim); }
.mcp-table { width: 100%; }
.mcp-table .mcp-mono { font-family: var(--font-mono); color: var(--accent) !important; }
.mcp-err-row td { color: var(--bad); }

/* API STATS */
.ast-reset {
  margin-left: auto;
  background: var(--bad-soft);
  color: var(--bad);
  border: 1px solid rgba(255, 94, 94, 0.35);
  border-radius: var(--radius-sm);
  padding: 7px 14px;
  font: 600 11px/1 var(--font);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}
.ast-reset:hover { background: rgba(255, 94, 94, 0.18); border-color: var(--bad); }
.ast-reset:disabled { opacity: 0.5; cursor: wait; }
.ast-mono { font-family: var(--font-mono); color: var(--info); }
.ast-hot  { color: var(--accent) !important; }
.ast-count { font-family: var(--font-mono); font-weight: 600; color: var(--text-main); text-align: right; }
.ast-ago { font-family: var(--font-mono); color: var(--text-dim); text-align: right; }

/* ═══════════════════════════════════════════════════════════════════════════
   MODAL / TOAST
   ═══════════════════════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(8, 11, 17, 0.75);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center; justify-content: center;
  z-index: 100;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  min-width: 360px;
  max-width: 90vw;
  box-shadow: var(--shadow);
}
.modal h3 { margin-bottom: 14px; font-size: 14px; font-weight: 600; color: var(--text-main); }
.modal label { display: block; font-size: 11px; color: var(--text-muted); margin: 10px 0 4px; }
.modal input, .modal textarea {
  width: 100%;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font: 13px var(--font);
  padding: 8px 10px;
  outline: none;
}
.modal input:focus, .modal textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.modal textarea { min-height: 200px; font-family: var(--font-mono); font-size: 12px; resize: vertical; }
.modal-import { min-width: 560px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; }
.btn {
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font: 600 11px/1 var(--font);
  letter-spacing: 0.04em;
  padding: 8px 16px;
  cursor: pointer;
  text-transform: uppercase;
}
.btn:hover { color: var(--text-main); }
.btn-primary { background: var(--accent); color: #0a0f15; border-color: var(--accent); }
.btn-primary:hover { filter: brightness(1.1); color: #0a0f15; }

.toast {
  position: fixed;
  bottom: 24px; right: 24px;
  background: var(--surface);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-size: 12px;
  color: var(--text-main);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s, transform 0.25s;
  pointer-events: none;
  z-index: 200;
  box-shadow: var(--shadow);
}
.toast.show { opacity: 1; transform: translateY(0); }


/* ═══════════════════════════════════════════════════════════════════════════
   Utilities (вынесено из app.js — Класс B, статичные стили)
   ═══════════════════════════════════════════════════════════════════════════ */
.ta-right    { text-align: right; }
.flex-1      { flex: 1; }
.btn-tight   { padding: 1px 4px; }
.cell-empty  { text-align: center; color: var(--text-dim); padding: 14px; }
