/* Colours of the brand over the design system tokens (frontend/src/styles/tokens.css), under
   selectors that outrank its own whatever order the files load in: html:root (theme-independent),
   html[data-theme="dark"], html[data-theme="light"] and html .class.
   12.11.2026: a graphite instead of near-black and a calm blue instead of the teal.
   16.11.2026: after CrowdSec's console — a deep navy, a lavender accent, a yellow for the call to
   action, a bright green for what is well. */

html[data-theme="dark"] {
  --bg0: #1a2030;
  /* A soft light in the corner; the stars over it are the canvas of the layout (16.11.2026,
     instead of the bars of the logo, which the light theme keeps) */
  --bg-grad:
    radial-gradient(1100px 700px at 10% -10%, rgba(139,143,230,0.08), transparent 60%),
    #1a2030;
  /* Cards stand out of the page as in CrowdSec's console: lighter, with a clear outline */
  --bg1: #1f2637;
  --bg2: #232b3d;
  --bg3: #283146;
  --bg4: #333d54;
  --bgH: #2b3449;
  --bd: #313a4f;
  --bdH: #434d65;
  --cbx-bd: rgba(255,255,255,0.42);
  --card-bg: rgba(31, 38, 55, 0.82);
  --shadow-card: 0 1px 0 rgba(255,255,255,0.03), 0 8px 24px rgba(0,0,0,0.28);
  --t1: #eef0f6;
  --t2: #d4d8e3;
  --t3: #a9b0c0;
  --t4: #8a92a4;
  --on-ac: #14173a;
  --ac: #8B8FE6;
  --acH: #A3A7F2;
  --acT: #A9ADF7;
  --acS: rgba(139,143,230,0.16);
  /* The main action is an outline of the accent, no fill */
  --btn-bg: transparent;
  --btn-bg-h: rgba(139,143,230,0.14);
  --btn-bg-a: rgba(139,143,230,0.10);
  --btn-bd: #8B8FE6;
  --btn-fg: #A9ADF7;
  --pr: #8B8FE6;
  --prS: rgba(139,143,230,0.16);
  --blS: rgba(139,143,230,0.16);
  --gn: #3ddc84;
  --gnS: rgba(61,220,132,0.14);
  --yl: #f6b62d;
  --ylS: rgba(246,182,45,0.15);
  --rd: #f2555c;
  --rdS: rgba(242,85,92,0.15);
  /* The chosen part of a segmented control, and the yellow of a call to action */
  --seg-on-bg: #7478CC;
  --seg-on-fg: #F4F5FF;
  --promo: #f6b62d;
  --promo-fg: #1d1a10;
  --sh1: 0 4px 12px rgba(0,0,0,0.22);
  --sh2: 0 8px 32px rgba(0,0,0,0.3);
  /* The dark green of the charts sank into the lighter cards: 2.9:1, now 4.6:1 */
  --chart-6: #5aa63a;
}

html[data-theme="light"] {
  /* 22.11.2026: as Dmitry's prototype of the office (proekty.ai/sotrudniki-ai): a white page with
     a lavender glow at the top, white cards with a thin lavender outline, the violet #6A4DF5 */
  --bg-grad:
    radial-gradient(900px 260px at 25% -60px, rgba(106,77,245,0.13), transparent 70%),
    radial-gradient(600px 220px at 95% -40px, rgba(139,108,255,0.10), transparent 70%),
    #FBFAFF;
  --bg0: #FBFAFF;
  --bg1: #ffffff;
  --bg2: #ffffff;
  --bg3: #F7F5FF;
  --bg4: #EFECF9;
  --bgH: #F4F1FF;
  --bd: #E9E7F3;
  --bdH: #DCD7EE;
  --card-bg: #ffffff;
  --shadow-card: 0 1px 3px rgba(20,20,43,0.04);
  --t1: #14142B;
  --t2: #2C2C40;
  --t3: #66667E;
  --t4: #74738C;
  --on-ac: #ffffff;
  --ac: #6A4DF5;
  --acH: #5B3FE6;
  --acT: #5B3FE6;
  --acS: #F0ECFF;
  /* The main action is filled with the violet */
  --btn-bg: #6A4DF5;
  --btn-bg-h: #5B3FE6;
  --btn-bg-a: #5034D6;
  --btn-bd: #6A4DF5;
  --btn-fg: #ffffff;
  --pr: #6A4DF5;
  --prS: #F0ECFF;
  --bl: #5B3FE6;
  --blS: #F0ECFF;
  /* Statuses as the prototype's «по плану», «ждёт ответа», «Срочно»: readable on their tint */
  --gn: #15803D;
  --gnS: #E7F8EE;
  --yl: #B45309;
  --ylS: #FEF3E2;
  --or: #B45309;
  --orS: #FEF3E2;
  --rd: #B91C1C;
  --rdS: #FDECEC;
  --teal: #12B8A9;
  --seg-on-bg: #6A4DF5;
  --seg-on-fg: #ffffff;
  --promo: #6A4DF5;
  --promo-fg: #ffffff;
  --r: 14px;
  --rr: 16px;
  --sh1: 0 4px 12px rgba(20,20,43,0.08);
  --sh2: 0 8px 32px rgba(20,20,43,0.12);
}

/* Rules of the design system with the teal written in */
html .obs-btn-secondary:hover { border-color: color-mix(in srgb, var(--ac) 45%, transparent); }
html .obs-badge-bl { border-color: color-mix(in srgb, var(--ac) 22%, transparent); }
html[data-theme="light"] input[type="checkbox"]:checked {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 12.75l5.25 5.25L19.5 6.75'/%3E%3C/svg%3E");
}
html[data-theme="light"] input[type="checkbox"]:indeterminate {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3.4' stroke-linecap='round'%3E%3Cpath d='M6 12h12'/%3E%3C/svg%3E");
}

/* The sign-in panel stays dark in both themes: graphite with the blue */
html .cabinet-login {
  --ink: #1a2030;
  --teal: #8B8FE6;
}
html .cabinet-login-brand {
  background-image:
    radial-gradient(640px 420px at 0% 100%, rgba(139,143,230,0.16), transparent 65%),
    linear-gradient(var(--line-on-dark-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-on-dark-soft) 1px, transparent 1px);
}

/* The twinkling stars behind every page of the dark theme, as the scene of the home page */
html[data-theme="dark"] .page-sky { display: block; }
/* …and the drifting clouds of colour behind every page of the light theme (28.11.2026) */
html[data-theme="light"] .page-aurora { display: block; }
/* The frame of the office lets them through (its own background covered them) */
@media (min-width: 1101px) { html[data-theme="light"] .cabinet-shell[data-framed] { background: color-mix(in srgb, var(--bg0) 45%, transparent); } }

/* ══ The light theme as Dmitry's prototype (22.11.2026) ══ — over the new look of app.css, the
   dark theme keeps that look */
html[data-theme="light"] body { font-weight: 400; }
html[data-theme="light"] .page-header-title { font-size: 30px; line-height: 1.15; letter-spacing: -0.01em; }
html[data-theme="light"] .page-header-hint { font-size: 15px; font-weight: 400; color: var(--t3); }

/* The bar above and the sections on the left: white, the chosen section a lavender plate */
html[data-theme="light"] .cabinet-topbar { background: #ffffff; -webkit-backdrop-filter: none; backdrop-filter: none; }
html[data-theme="light"] .cabinet-side { background: #ffffff; }
html[data-theme="light"] .cabinet-side .cabinet-nav-link { padding: 8px 12px; border: 0; border-radius: 10px; font-weight: 400; color: var(--t2); }
html[data-theme="light"] .cabinet-side .cabinet-nav-link:hover { background: var(--bgH); color: var(--t1); }
html[data-theme="light"] .cabinet-side .cabinet-nav-link.active { background: var(--acS); color: var(--ac); font-weight: 600; }
html[data-theme="light"] .cabinet-side .cabinet-nav-link.active svg { color: var(--ac); }
@media (max-width: 760px) {
  html[data-theme="light"] .cabinet-side .cabinet-nav-link.active { background: transparent; }
}

/* Cards: white, a thin lavender outline, rounder */
html[data-theme="light"] .obs-card { background: #ffffff; border-color: var(--bd); border-radius: 16px; box-shadow: var(--shadow-card);
  -webkit-backdrop-filter: none; backdrop-filter: none; }
html[data-theme="light"] .pj-card, html[data-theme="light"] .pj-kpi, html[data-theme="light"] .pjt { border-radius: 16px; }

/* Buttons: the main one filled, the second an outline of the violet */
html[data-theme="light"] .obs-btn-primary, html[data-theme="light"] .obs-btn-secondary, html[data-theme="light"] .obs-btn-white,
html[data-theme="light"] .btn-promo { min-height: 36px; padding: 8px 14px; border-radius: 10px; font-size: 13.5px; }
html[data-theme="light"] .obs-btn-primary { background: var(--btn-bg); border-color: var(--btn-bd); color: var(--btn-fg); }
html[data-theme="light"] .obs-btn-primary:hover { background: var(--btn-bg-h); border-color: var(--btn-bg-h); color: var(--btn-fg); }
html[data-theme="light"] .obs-btn-secondary { border: 1.5px solid var(--ac); background: #ffffff; color: var(--ac); }
html[data-theme="light"] .obs-btn-secondary:hover { border-color: var(--acH); background: var(--acS); color: var(--acH); }
html[data-theme="light"] .btn-icon { width: 36px; min-width: 36px; padding: 0; }

/* Switches: a white frame, the parts apart, the chosen one filled with the violet */
html[data-theme="light"] .segmented, html[data-theme="light"] .view-switch, html[data-theme="light"] .tabs,
html[data-theme="light"] .project-view { gap: 4px; padding: 4px; border: 1px solid var(--bd); border-radius: 12px; }
html[data-theme="light"] .segmented-item, html[data-theme="light"] .view-switch a, html[data-theme="light"] .tab,
html[data-theme="light"] .project-view button { border-radius: 9px; color: #6B6A85; box-shadow: none; }
html[data-theme="light"] .segmented-item + .segmented-item, html[data-theme="light"] .view-switch a + a,
html[data-theme="light"] .tab + .tab, html[data-theme="light"] .project-view button + button { box-shadow: none; }

/* Badges: a tint without an outline */
html[data-theme="light"] .obs-badge { border-color: transparent; border-radius: 7px; font-weight: 700; }
/* The chosen part outranks the part above whatever order the files load in */
html[data-theme="light"] .segmented-item[aria-selected='true'], html[data-theme="light"] .view-switch a[aria-current="page"],
html[data-theme="light"] .tab.tab-active, html[data-theme="light"] .project-view button[aria-selected="true"] {
  background: var(--seg-on-bg); color: var(--seg-on-fg); }

/* The home page opens as the prototype's working day (22.11.2026): no night sky in the light
   theme, the greeting on the page itself — the brand in the violet capitals, a large title, a
   calm line under it */
html[data-theme="light"] .home-hero { height: auto; margin: 4px auto 18px; border: 0; border-radius: 0; background: none; color: var(--t1); overflow: visible; }
html[data-theme="light"] .home-hero-sky, html[data-theme="light"] .home-hero-rain, html[data-theme="light"] .home-hero-horizon,
html[data-theme="light"] .home-hero-glow, html[data-theme="light"] .home-hero-sun { display: none; }
html[data-theme="light"] .home-hero-text { padding: 0; max-width: none; padding-right: 220px; }
html[data-theme="light"] .home-hero-eyebrow { margin-bottom: 6px; font-size: 12px; letter-spacing: 0.14em; color: var(--ac); }
html[data-theme="light"] .home-hero h1 { font-size: 36px; line-height: 1.1; letter-spacing: -0.01em; color: var(--t1); }
html[data-theme="light"] .home-hero h1 em { margin-top: 6px; color: var(--t3); text-transform: none; letter-spacing: 0; font-size: 16px; font-weight: 400; line-height: 1.4; }
html[data-theme="light"] .home-hero p { margin-top: 2px; font-size: 16px; color: var(--t3); }
html[data-theme="light"] .home-hero-side { top: auto; bottom: 0; right: 0; }
@media (max-width: 760px) {
  html[data-theme="light"] .home-hero { height: auto; margin: 4px 0 14px; }
  html[data-theme="light"] .home-hero-text { padding-right: 0; }
  html[data-theme="light"] .home-hero h1 { font-size: 26px; }
  html[data-theme="light"] .home-hero-side { position: static; padding: 12px 0 0; }
}

/* The cards beside the feed: a white head with a bold title, as the prototype's panels */
html[data-theme="light"] .feed-side { border-radius: 16px; box-shadow: var(--shadow-card); }
html[data-theme="light"] .feed-side-head { background: #ffffff; padding: 12px 10px 10px 8px; }
html[data-theme="light"] .feed-side-head::before, html[data-theme="light"] .feed-side-head::after { display: none; }

/* Frosted cards over the aurora (28.11.2026, the user's variant B): translucent white with a white
   edge, the clouds show through; the chosen part of a switch white with the brand's text, not black */
html[data-theme="light"] :is(.oh-card, .cal-card, .pj-card, .project-card, .brain-card, .tcx-card, .wp-chat) {
  background: rgba(255, 255, 255, 0.66); border-color: rgba(255, 255, 255, 0.9); box-shadow: 0 8px 24px rgba(40, 36, 110, 0.08);
}
html[data-theme="light"] .ws-hero {
  border: 1.5px solid rgba(91, 79, 245, 0.55); box-shadow: 0 8px 24px rgba(40, 36, 110, 0.08);
  background: linear-gradient(135deg, rgba(241, 239, 255, 0.85), rgba(255, 255, 255, 0.7) 50%, rgba(255, 243, 230, 0.8));
}
html[data-theme="light"] .wp-chat .chat-pane { background: transparent; }
html[data-theme="light"] .ws-seg { background: rgba(91, 79, 245, 0.08); }
/* The chosen part of every switch in the brand's colour (28.11.2026, the user), not black */
html[data-theme="light"] :is(.ws-seg button[aria-pressed="true"], .th-tabs button[aria-selected="true"], .wp-chip[aria-pressed="true"]) {
  border-color: var(--ac); background: var(--ac); color: var(--on-ac, #FFFFFF); box-shadow: 0 2px 8px color-mix(in srgb, var(--ac) 30%, transparent);
}
/* The messenger («Разговоры», «Задачи», a conversation) in the same frosted glass (28.11.2026: its
   panes kept their solid colours) */
html[data-theme="light"] .chat-layout { background: rgba(255, 255, 255, 0.5); border: 1px solid rgba(255, 255, 255, 0.9); border-radius: 18px; box-shadow: 0 8px 24px rgba(40, 36, 110, 0.08); }
html[data-theme="light"] .chat-list { border-right-color: rgba(255, 255, 255, 0.9); }
html[data-theme="light"] .chat-pane { background: rgba(255, 255, 255, 0.45); --chat-fade: rgba(255, 255, 255, 0.7); }
html[data-theme="light"] .chat-composer { background: rgba(255, 255, 255, 0.55); border-top-color: rgba(255, 255, 255, 0.9); }
