/* Tilely Cockpit theme (rebrand 2026-10-31). Loaded after the other sheets:
   it only redefines the design tokens, so every page follows without per-page
   edits. Palette "pietra vulcanica" and type (Manrope titles, Inter text) as in
   the Tilely brand and the Edge redesign prototype. The old --purple-* names are
   kept as aliases of the accent so existing rules keep working.
   Dark: the same blacks as Edge (apps/ops-svelte/src/styles/tilely-ops.css, owner 13/11):
   page #1C1C1F, card #28282C, card2 #333338, card3/line #3E3E44, field line #4A4A51. */
/* Fonts are served by the Cockpit itself: the CSP (font-src 'self') blocks Google Fonts. */
@font-face { font-family: 'Manrope'; src: url('/fonts/manrope.woff2') format('woff2'); font-weight: 200 800; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/fonts/inter-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/fonts/inter-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }

:root,
html[data-theme="dark"] {
  --font-display: 'Manrope', 'Inter', system-ui, sans-serif;
  --accent: #F2F2F0;
  --accent-fg: #1C1C1F;
  --purple-1: var(--accent);
  --purple-2: #D6D6D2;
  --purple-3: #B4B4B9;
  --purple-dark: #D6D6D2;
  --purple-bg: #333338;
  --primary: var(--accent);
  --bg: #1C1C1F;
  --bg-2: #28282C;
  --bg-3: #333338;
  --bg-4: #3E3E44;
  --bg-elevated: #28282C;
  --border: #3E3E44;
  --border-field: #4A4A51; /* fields only; cards and separators use --border */
  --border-soft: rgba(242,242,240,0.08);
  --border-strong: rgba(242,242,240,0.18);
  --text: #F2F2F0;
  --text-2: #B4B4BA;
  --text-3: #85858C; /* only on the page background, icons, placeholders and counters */
  --surface: rgba(40,40,44,0.92);
  --surface-2: rgba(51,51,56,0.80);
  --surface-glass: rgba(40,40,44,0.86);
  --surface-glass-strong: rgba(28,28,31,0.94);
  --surface-accent: rgba(51,51,56,0.90);
  --shadow-soft: 0 18px 60px rgba(0,0,0,0.30);
  --shadow-card: none;
  --shadow-glass: none;
  --glass-blur: none;
  --danger: #FF5A4E;
  /* Monochrome palette (prototype palette/tilely-palette.css): only alerts are red. */
  --success: #F2F2F0;
  --warning: #B4B4BA;
}

html[data-theme="light"] {
  --accent: #111112;
  --accent-fg: #F4F4F2;
  --purple-1: var(--accent);
  --purple-2: #34343A;
  --purple-3: #6F6F75;
  --purple-dark: #34343A;
  --purple-bg: #EDEDEA;
  --primary: var(--accent);
  --bg: #F4F4F2;
  --bg-2: #FFFFFF;
  --bg-3: #EDEDEA;
  --bg-4: #E4E4E0;
  --bg-elevated: #FFFFFF;
  --border: #E4E4E0;
  --border-field: #E4E4E0;
  --border-soft: rgba(17,17,18,0.08);
  --border-strong: rgba(17,17,18,0.18);
  --text: #111112;
  --text-2: #6F6F75;
  --text-3: #A3A3A8;
  --surface: rgba(255,255,255,0.92);
  --surface-2: rgba(237,237,234,0.80);
  --surface-glass: rgba(255,255,255,0.88);
  --surface-glass-strong: rgba(255,255,255,0.96);
  --surface-accent: rgba(237,237,234,0.92);
  --shadow-soft: 0 18px 54px rgba(0,0,0,0.08);
  --shadow-card: none;
  --shadow-glass: none;
  --glass-blur: none;
  --danger: #E5372B;
  --success: #111112;
  --warning: #6F6F75;
}

html body,
html[data-theme="light"] body {
  background: var(--bg);
}

h1, h2, h3,
.page-title, .workspace-page-head h1, .login-title, .sidebar-brand {
  font-family: var(--font-display);
  letter-spacing: -0.01em;
}

/* Brand mark: T of tiles + dot (monochrome). */
.tilely-mark { display: inline-flex; align-items: center; gap: 10px; color: var(--text); }
.tilely-mark svg { width: 28px; height: 28px; flex: none; }
.tilely-mark svg .tile-bg { fill: currentColor; }
.tilely-mark svg .tile { fill: var(--bg); }
.tilely-wordmark { font: 800 1.0625rem/1 var(--font-display); letter-spacing: -0.02em; color: var(--text); }
.tilely-wordmark small { display: block; margin-top: 3px; font: 600 0.75rem/1 var(--font-display); color: var(--text-3); letter-spacing: 0.02em; }

/* Active navigation: quiet inverse pill instead of the old purple gradient. */
.nav-item.active {
  background: var(--bg-3);
  color: var(--text);
  border-right: 3px solid var(--accent);
}

/* Focus stays clearly visible on the neutral palette. */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.login-logo-text { -webkit-text-fill-color: currentColor; background: none; color: var(--text); }
.login-page { background: var(--bg); }
.login-card { box-shadow: var(--shadow-soft); }

/* Link-styled buttons inside pages inherit text colour; keep the accent pair. */
.workspace-page a.btn-primary,
a.btn-primary { color: var(--accent-fg); }

/* Status badges: quiet grey tiles; "done" reads strongest, alerts stay red. */
.badge-success { background: var(--bg-3); color: var(--text); border: 1px solid var(--border); }
.badge-warning { background: var(--bg-3); color: var(--text-2); border: 1px solid var(--border); }
.btn, .btn-primary, .btn-secondary, .btn-outline, .form-control { border-radius: 12px; }
.form-control:focus { border-color: var(--text); box-shadow: 0 0 0 3px var(--border-strong); outline: none; }

/* Text size follows the browser/phone setting on Tilely pages (owner rule 10/11):
   app.css fixes html at 14px for the old pages; the new ones use rem from 100%. */
html:has(body.tl-body), html:has(body.tl-auth) { font-size: 100%; }
body.tl-body { font-size: 0.875rem; }
