/* Design tokens — single source of truth for the whole UI.
 *
 * Redesign 2026-08-06 (handoff «Интерфейс в стиле Bitrix24»): flat white cards, thin grey
 * borders, light sidebar, Avito purple as the primary colour.
 *
 * The VARIABLE NAMES are deliberately unchanged from the first palette. Every screen
 * already consumes them and never hard-codes a hex, so restyling the whole product is a
 * change to this file alone — which is exactly what the rule was written for.
 */

:root {
  /* --- brand accents (Avito purple) --- */
  --accent:        #8B5CF6;  /* primary buttons, active menu item, links, progress */
  --accent-press:  #7440E0;  /* :hover / :active */
  --accent-bg:     #F2EDFE;  /* active menu background, purple badge background */

  --accent-weak:   rgba(139, 92, 246, .10);
  --accent-weak-2: rgba(139, 92, 246, .05);
  --accent-ring:   rgba(139, 92, 246, .28);  /* focus ring */

  /* Avito blue — status badges NEW / INPROCESS, informational accents. */
  --info:          #1AA3FF;
  --info-bg:       #E8F6FF;
  --note-bg:       #EAF4FF;  /* information panels */
  --note-line:     #CFE6FF;

  /* --- semantic statuses --- */
  --ok:            #1FC06B;  /* switch on, "Подключен" dot */
  --ok-bg:         #E7F9EF;
  --ok-text:       #1FA85A;  /* text inside a success badge */

  --warn:          #F2A007;
  --warn-bg:       #FFF4E0;

  --danger:        #E23A57;  /* REJECTED, "Токен истёк", destructive actions */
  --danger-bg:     #FFEBEF;
  --danger-line:   #F6C6CE;

  --special:       #8B5CF6;  /* AI modules, premium features */

  /* --- neutrals, straight from the handoff --- */
  --bg:          #F5F6F8;  /* work area background */
  --surface:     #FFFFFF;  /* cards, panels, inputs, sidebar, topbar */
  --surface-2:   #F7F8FA;  /* chips, subtle blocks, secondary button hover */
  --line:        #E3E6EB;  /* every card, control and section border */
  --line-strong: #E3E6EB;  /* inputs share the same border in this design */
  --divider:     #F0F1F4;  /* row dividers inside tables */
  --faint:       #C7CAD1;  /* switch off, checkbox border, arrows */
  --muted:       #868B96;  /* secondary text, subtitles */
  --muted-2:     #B0B4BD;  /* placeholders, hints, "— Не переносить —" */
  --caps:        #9599A3;  /* uppercase group headings */
  --ink-2:       #4A4F59;  /* field labels, panel text, inactive menu items */
  --ink:         #1B1F27;  /* body text, headings */

  /* --- light sidebar --- */
  --side-bg:          #FFFFFF;
  --side-line:        #E3E6EB;
  --side-text:        #4A4F59;
  --side-text-hover:  #8B5CF6;
  --side-hover-bg:    #F7F8FA;
  --side-active-bg:   #F2EDFE;
  --side-caps:        #9599A3;
  --side-count-bg:    #F0F1F4;
  --side-count-text:  #868B96;
  --side-card-bg:     #F7F8FA;
  --side-card-line:   #E3E6EB;
  --side-card-text:   #4A4F59;

  /* --- AI grade scale --- */
  --grade-a: #1FA85A;
  --grade-b: #1AA3FF;
  --grade-c: #F2A007;
  --grade-d: #868B96;

  /* --- data colours: the Avito mark, avatars, stage dots --- */
  --data-1: #8B5CF6;
  --data-2: #1AA3FF;
  --data-3: #1FC06B;
  --data-4: #FF4667;
  --data-5: #F2A007;
  --data-6: #868B96;

  /* --- elevation: this design is FLAT. Cards have a border, not a shadow;
   *     shadows are left only for things that float above the page. --- */
  --shadow-sm:  none;
  --shadow-md:  0 6px 22px rgba(27, 31, 39, .10);
  --shadow-pop: 0 18px 50px rgba(27, 31, 39, .16);
  --shadow-seg: 0 1px 2px rgba(0, 0, 0, .15);

  /* --- geometry --- */
  --radius-sm: 6px;   /* buttons, inputs, selects, menu items */
  --radius:    8px;   /* cards, info panels */
  --radius-lg: 8px;
  --side-w:    240px;
  --topbar-h:  56px;
}

/* Contrast notes kept from the first palette, updated for the new colours:
 *  • #8B5CF6 on white is AA for large text and UI elements; small purple text uses
 *    --accent-press (#7440E0).
 *  • #1FC06B is a UI element; success TEXT is --ok-text on --ok-bg.
 *  • Hints never go lighter than --muted-2 (#B0B4BD).
 */
.text-accent { color: var(--accent-press); }
.text-ok     { color: var(--ok-text); }
.on-warn     { color: var(--ink); }
