/* DPStudioPortal, the DPStudio identity: typefaces and palette. Loaded after app.css, which builds
 * every component from the tokens defined here.
 *
 * Direction "Notte tecnologica" (Luca, 2026-10-16): the night blue of the logo, blue and violet
 * glows, a luminous grid fading at the edges, frosted-glass surfaces. Dark is the default; the
 * light theme is the same design by day, chosen with the toggle in the bar (theme.js).
 * Since 2026-10-26 the dark surfaces sit on #0F1230, the night blue of the 2026 logo (Luca), as
 * on the website and in DPManager.
 *
 * Typefaces are served by the portal itself (no third-party font host): Sora for headings,
 * Figtree for text, JetBrains Mono for versions, codes and small labels. All three SIL OFL 1.1,
 * see ../fonts/OFL-NOTICE.txt.
 */
@font-face { font-family: "Sora"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("../fonts/sora-latin.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("../fonts/figtree-latin.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("../fonts/jetbrainsmono-latin.woff2") format("woff2"); }

/* Night (default). */
:root, [data-bs-theme="dark"] {
  --cp-font-ui:   "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --cp-font-head: "Sora", "Figtree", system-ui, sans-serif;
  --cp-font-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;

  --cp-bg:          #0F1230;
  --cp-bg-2:        #141838;
  --cp-text:        #e9ebff;
  --cp-muted:       #8e95c0;
  --cp-line:        rgba(150, 170, 255, 0.16);
  --cp-line-strong: rgba(150, 170, 255, 0.30);
  --cp-surface:     linear-gradient(160deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.025));
  --cp-surface-solid: #161A3C;
  --cp-surface-raised: #1C2048;
  --cp-input-bg:    rgba(10, 12, 36, 0.62);
  --cp-hover:       rgba(91, 140, 255, 0.12);
  --cp-selected:    rgba(91, 140, 255, 0.22);
  --cp-nav-bg:      rgba(15, 18, 48, 0.72);

  --cp-primary:      #5b8cff;
  --cp-primary-dark: #3b6cf6;
  --cp-accent:       #5b8cff;
  --cp-violet:       #8b6cff;
  --cp-cyan:         #22d3ee;
  --cp-btn-from:     #3b82f6;
  --cp-btn-to:       #6d5cf6;
  --cp-glow:         rgba(80, 110, 255, 0.55);
  --cp-focus:        rgba(91, 140, 255, 0.28);

  --cp-sky-1: rgba(59, 130, 246, 0.40);
  --cp-sky-2: rgba(124, 58, 237, 0.32);
  --cp-sky-3: rgba(34, 211, 238, 0.10);
  --cp-gridline: rgba(148, 170, 255, 0.065);

  --cp-success: #34d399;
  --cp-danger:  #f87171;
  --cp-warn:    #fcd34d;
  --cp-pill-bg: rgba(255, 255, 255, 0.08);
  --cp-pill-fg: #c4cbf0;
  --cp-pill-success-bg: rgba(52, 211, 153, 0.14); --cp-pill-success-fg: #6ee7b7;
  --cp-pill-danger-bg:  rgba(248, 113, 113, 0.14); --cp-pill-danger-fg:  #fca5a5;
  --cp-pill-warn-bg:    rgba(251, 191, 36, 0.14);  --cp-pill-warn-fg:    #fcd34d;
  --cp-shadow: 0 30px 60px -24px rgba(0, 0, 0, 0.75);
  --cp-blur: blur(16px);
  color-scheme: dark;
}

/* Day: the same design, white glass on a pale sky. */
[data-bs-theme="light"] {
  --cp-bg:          #eef1fb;
  --cp-bg-2:        #e4e9f8;
  --cp-text:        #0F1230;
  --cp-muted:       #5d6488;
  --cp-line:        rgba(16, 16, 48, 0.10);
  --cp-line-strong: rgba(16, 16, 48, 0.18);
  --cp-surface:     linear-gradient(160deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.72));
  --cp-surface-solid: #ffffff;
  --cp-surface-raised: #ffffff;
  --cp-input-bg:    #ffffff;
  --cp-hover:       rgba(47, 111, 228, 0.07);
  --cp-selected:    rgba(47, 111, 228, 0.13);
  --cp-nav-bg:      rgba(255, 255, 255, 0.72);

  --cp-primary:      #2f6fe4;
  --cp-primary-dark: #1f56c4;
  --cp-accent:       #2f6fe4;
  --cp-violet:       #6d4ae0;
  --cp-cyan:         #0e8aa6;
  --cp-btn-from:     #2f6fe4;
  --cp-btn-to:       #5b46e0;
  --cp-glow:         rgba(47, 111, 228, 0.35);
  --cp-focus:        rgba(47, 111, 228, 0.20);

  --cp-sky-1: rgba(59, 130, 246, 0.22);
  --cp-sky-2: rgba(124, 58, 237, 0.14);
  --cp-sky-3: rgba(34, 211, 238, 0.10);
  --cp-gridline: rgba(16, 16, 48, 0.05);

  --cp-success: #13895c;
  --cp-danger:  #c0392b;
  --cp-warn:    #8a5a00;
  --cp-pill-bg: #eceef7;
  --cp-pill-fg: #33365a;
  --cp-pill-success-bg: #dcf5ea; --cp-pill-success-fg: #0f6e49;
  --cp-pill-danger-bg:  #fde4e4; --cp-pill-danger-fg:  #9b1c1c;
  --cp-pill-warn-bg:    #fff1cc; --cp-pill-warn-fg:    #7a4f00;
  --cp-shadow: 0 24px 48px -26px rgba(16, 16, 48, 0.30);
  color-scheme: light;
}

/* The two logos: on-dark in the night theme, on-light by day. */
.cp-logo-day { display: none !important; }
[data-bs-theme="light"] .cp-logo-day { display: block !important; }
[data-bs-theme="light"] .cp-logo-night { display: none !important; }
