/* CRM C1 – new parts only: the menu in groups and "Xenyra pre teba" on Dnes / Prehľad. Uses the app's own tokens
   (--primary, --surface, --line …), so light, dark and the shared Xenyra look (xlook) apply by themselves. Thin type. */

/* thin type also for words marked strong in rows and cards (the browser would draw them bold) */
.xa-root strong, .xa-root b { font-weight: 500; }
.xa-root .xa-assistant strong, .xa-root .xa-assistant b { font-weight: revert; }

/* ---------- menu in groups ---------- */
.xa-nav-groups { display: grid; gap: 14px; }
.xa-nav-group ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.xa-nav-head { margin: 0 0 4px; padding: 0 12px; font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.xa-nav-item.is-soon { width: 100%; border: 0; background: none; font: inherit; text-align: left; cursor: default; color: var(--faint); }
.xa-nav-item.is-soon:hover { background: none; }
.xa-nav-item.is-soon .xi { opacity: .7; }
.xa-nav-soon { margin-left: auto; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--line); font-size: 10.5px; font-style: normal; font-weight: 400; color: var(--faint); white-space: nowrap; }

/* icons only (tablet): the headings turn into thin dividers, "Čoskoro" stays as a quiet icon */
@media (max-width: 1024px) and (min-width: 761px) {
  .xa-nav-head { height: 1px; margin: 2px 10px 6px; padding: 0; overflow: hidden; color: transparent; background: var(--line); }
  .xa-nav-soon { display: none; }
}

/* ---------- Xenyra pre teba ---------- */
.xa-brief { position: relative; margin: 0 0 18px; padding: 18px 20px 16px; border: 1px solid var(--line); border-radius: 22px; overflow: hidden;
  background:
    radial-gradient(520px 220px at 100% 0%, color-mix(in srgb, var(--primary) 14%, transparent) 0%, transparent 70%),
    radial-gradient(420px 200px at 0% 100%, color-mix(in srgb, #8a35ef 10%, transparent) 0%, transparent 70%),
    var(--surface);
  box-shadow: var(--shadow); }
.xa-brief > header { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.xa-brief > header h2 { font-size: 18px; font-weight: 400; letter-spacing: -.01em; }
.xa-brief-orb { flex: none; width: 46px; height: 46px; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; filter: drop-shadow(0 6px 14px rgba(70, 70, 255, .28)); }
.xa-brief-orb img { width: 44px; height: 44px; border-radius: 50%; animation: xa-float 5s ease-in-out infinite; }

.xa-brief-chips { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.xa-brief-chips::-webkit-scrollbar { display: none; }
.xa-brief-chip { flex: 1 0 118px; display: grid; gap: 2px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 16px; text-decoration: none; color: var(--text);
  background: color-mix(in srgb, var(--surface) 70%, transparent); transition: border-color .18s, transform .18s; }
.xa-brief-chip:hover { border-color: var(--primary); transform: translateY(-1px); }
.xa-brief-chip strong { font-size: 24px; font-weight: 300; line-height: 1.1; }
.xa-brief-chip span { font-size: 12.5px; color: var(--muted); }
.xa-brief-chip.is-alert strong { color: var(--danger); }

.xa-brief-next { display: flex; align-items: center; gap: 12px; width: 100%; margin: 14px 0 0; padding: 12px 14px; border: 1px solid color-mix(in srgb, var(--primary) 30%, var(--line)); border-radius: 16px;
  background: color-mix(in srgb, var(--primary-soft) 70%, transparent); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.xa-brief-next .xi { color: var(--primary); }
.xa-brief-next span { display: grid; gap: 1px; min-width: 0; }
.xa-brief-next small { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--primary); }
.xa-brief-next.is-free { cursor: default; border-color: var(--line); background: transparent; }
.xa-brief-next.is-free .xi { color: var(--ok); }

/* one line to Xenyra */
.xa-capture { display: flex; align-items: flex-end; gap: 8px; margin-top: 14px; }
.xa-capture-field { position: relative; flex: 1; min-width: 0; }
.xa-capture-field textarea { display: block; width: 100%; min-height: 48px; max-height: 160px; resize: none; padding: 13px 52px 13px 16px; border: 1px solid var(--line-2); border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 85%, transparent); color: var(--text); line-height: 1.35; font-weight: 300; }
.xa-capture-field textarea:focus { outline: none; border-color: var(--primary); background: var(--surface); }
.xa-capture-field .xa-dict { bottom: 7px; right: 8px; }
.xa-capture-send { flex: none; width: 48px; height: 48px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); cursor: pointer; display: grid; place-items: center; }
.xa-capture-send:hover { border-color: var(--primary); }
.xa-capture-send img { width: 30px; height: 30px; border-radius: 50%; }
.xa-capture-hint { margin: 6px 4px 0; font-size: 12.5px; color: var(--faint); }

/* one tap instead of typing */
.xa-quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.xa-quick-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--text); font: inherit; font-size: 13.5px; cursor: pointer; }
.xa-quick-btn .xi { width: 17px; height: 17px; color: var(--primary); }
.xa-quick-btn:hover { border-color: var(--primary); background: var(--primary-soft); }

@media (max-width: 760px) {
  .xa-brief { padding: 16px 14px 14px; border-radius: 18px; }
  .xa-brief-chip { flex-basis: 104px; }
  .xa-brief-chip strong { font-size: 21px; }
}
@media (prefers-reduced-motion: reduce) { .xa-brief-orb img { animation: none; } .xa-brief-chip { transition: none; } }

/* ================= C1b – inner pages, one look ================= */
.xa-ph { margin-bottom: 14px; }
.xa-ph h1 { font-size: 30px; font-weight: 300; }

/* one line to Xenyra on every page */
.xa-xline { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 6px 6px 12px; border: 1px solid var(--line); border-radius: 18px;
  background: radial-gradient(360px 120px at 0% 50%, color-mix(in srgb, var(--primary) 9%, transparent) 0%, transparent 70%), var(--surface); box-shadow: var(--shadow); }
.xa-xline:focus-within { border-color: var(--primary); }
.xa-xline-orb { flex: none; width: 30px; height: 30px; border-radius: 50%; animation: xa-float 5s ease-in-out infinite; }
.xa-xline input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; color: var(--text); font-weight: 300; }
.xa-xline-send { flex: none; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--primary); color: var(--primary-ink); display: grid; place-items: center; cursor: pointer; }
.xa-xline-send .xi { width: 18px; height: 18px; }
.xa-xline-ex { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 16px; }
.xa-xline-chip { border: 1px dashed var(--line-2); background: transparent; color: var(--muted); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.xa-xline-chip:hover { color: var(--primary); border-color: var(--primary); border-style: solid; }
.xa-xline + .xa-toolbar, .xa-xline + div, .xa-xline + .xa-cards { margin-top: 16px; }

/* filter pills with counts */
.xa-pills { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 0 12px; }
.xa-pills::-webkit-scrollbar { display: none; }
.xa-pill { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text); font: inherit; font-size: 14px; cursor: pointer; }
.xa-pill em { font-style: normal; font-size: 12px; min-width: 20px; padding: 1px 7px; border-radius: 999px; background: var(--surface-2); color: var(--muted); text-align: center; }
.xa-pill[aria-selected="true"] { background: var(--primary-soft); border-color: color-mix(in srgb, var(--primary) 40%, var(--line)); color: var(--primary); }
.xa-pill[aria-selected="true"] em { background: var(--primary); color: var(--primary-ink); }
.xa-pill.is-alert em { background: var(--danger-soft); color: var(--danger); }

/* tasks grouped by time */
.xa-listcard { padding: 6px 20px 10px; }
.xa-tgroup + .xa-tgroup { border-top: 1px solid var(--line); }
.xa-tgroup-h { display: flex; align-items: center; gap: 8px; margin: 14px 0 2px; font-size: 12px; font-weight: 500; letter-spacing: .07em; text-transform: uppercase; color: var(--faint); }
.xa-tgroup-h em { font-style: normal; font-size: 11px; padding: 0 7px; border-radius: 999px; background: var(--surface-2); color: var(--muted); letter-spacing: 0; }
.xa-tgroup.is-over .xa-tgroup-h { color: var(--danger); }

/* notes as cards */
.xa-notegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.xa-notegrid.sm { grid-template-columns: 1fr; gap: 10px; }
.xa-note-card { display: flex; flex-direction: column; gap: 8px; min-height: 150px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: border-color .18s, transform .18s; }
.xa-notegrid.sm .xa-note-card { min-height: 0; box-shadow: none; }
.xa-note-card:hover { border-color: var(--primary); transform: translateY(-1px); }
.xa-note-card strong { font-size: 16px; }
.xa-note-card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.xa-note-card time { margin-top: auto; font-size: 12px; color: var(--faint); }

/* people and companies with their own colour */
.xa-av { --h: 220; flex: none; display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; font-size: 14px; font-weight: 500;
  background: hsl(var(--h) 70% 92%); color: hsl(var(--h) 45% 32%); }
.xa-av.org { border-radius: 14px; }
.xa-av.lg { width: 60px; height: 60px; font-size: 20px; }
.xa-av .xi { width: 22px; height: 22px; }
:root[data-theme="dark"] .xa-av { background: hsl(var(--h) 35% 22%); color: hsl(var(--h) 70% 82%); }
.xa-pcards, .xa-ccards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.xa-pcard, .xa-ccard { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); color: var(--text); text-decoration: none; transition: border-color .18s; }
.xa-pcard:hover, .xa-ccard:hover { border-color: var(--primary); }
.xa-pcard-main, .xa-ccard-main { flex: 1; min-width: 0; display: grid; gap: 2px; border: 0; background: none; padding: 0; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.xa-pcard-main strong, .xa-ccard-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xa-pcard-main small, .xa-ccard-main small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xa-pcard-act { display: flex; gap: 2px; }
.xa-ccard-meta { flex: none; display: grid; justify-items: end; gap: 4px; text-align: right; white-space: nowrap; }
.xa-ccard-meta small { color: var(--faint); font-size: 12px; }
.xa-ccard-meta em { font-style: normal; font-size: 12px; color: var(--primary); }
.xa-health { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 15%, transparent); }
.xa-health.mid { background: var(--warn); box-shadow: 0 0 0 4px color-mix(in srgb, var(--warn) 15%, transparent); }
.xa-health.bad { background: var(--danger); box-shadow: 0 0 0 4px color-mix(in srgb, var(--danger) 15%, transparent); }

/* main actions visible on a record */
.xa-qacts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.xa-qacts:empty { display: none; }
.xa-qacts a.xa-quick-btn { text-decoration: none; }

/* an empty page that helps */
.xa-empty-help { display: grid; justify-items: center; gap: 6px; padding: 34px 16px; text-align: center; border: 1px dashed var(--line-2); border-radius: 20px; }
.xa-empty-help img { width: 40px; height: 40px; border-radius: 50%; opacity: .9; }

@media (max-width: 760px) {
  .xa-ph h1 { font-size: 24px; }
  .xa-pcards, .xa-ccards { grid-template-columns: 1fr; }
  .xa-listcard { padding: 4px 14px 8px; }
}
@media (prefers-reduced-motion: reduce) { .xa-xline-orb { animation: none; } .xa-note-card { transition: none; } }
