/* Expert AI Systems intranet — themed to expertaisys.com
   Inter · navy #0D1F3C · accent blue #00B0FF · light #F4F7FC */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --navy: #0D1F3C;
  --navy-deep: #080F1E;
  --navy-soft: #162848;
  --accent: #00B0FF;
  --accent-soft: rgba(0, 176, 255, 0.12);
  --ink: #1A2A40;
  --muted: #5b6b80;
  --bg: #F4F7FC;
  --card: #ffffff;
  --line: #e3e9f2;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(13, 31, 60, 0.06), 0 1px 2px rgba(13, 31, 60, 0.04);
  --shadow-lg: 0 16px 40px rgba(13, 31, 60, 0.16);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px; line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
}
a { color: var(--navy); text-decoration: none; }
a:hover { text-decoration: underline; }
.muted { color: var(--muted); }

/* Topbar */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 28px;
  padding: 14px 28px;
  background: var(--navy);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: #fff; letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 26px; height: 26px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: var(--navy); font-weight: 800; font-size: 15px;
}
.brand-name { font-size: 16px; }
.brand-llc { color: var(--accent); font-weight: 600; }
.topnav { display: flex; gap: 6px; margin-left: 6px; }
.topnav a {
  color: rgba(255,255,255,0.72); font-weight: 500; font-size: 14px;
  padding: 7px 12px; border-radius: 8px;
}
.topnav a:hover { color: #fff; background: rgba(255,255,255,0.08); text-decoration: none; }
.topnav a.active { color: #fff; background: rgba(0,176,255,0.18); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.user-chip { font-size: 13px; color: rgba(255,255,255,0.8); }
.btn-ghost {
  font-size: 13px; font-weight: 600; color: #fff;
  padding: 6px 13px; border: 1px solid rgba(255,255,255,0.22); border-radius: 8px; background: transparent;
}
.btn-ghost:hover { text-decoration: none; border-color: var(--accent); color: var(--accent); }

/* Page container */
.page { max-width: 1080px; margin: 0 auto; padding: 48px 28px; }
.page-head { margin-bottom: 28px; }
.page-head h1 { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 6px; color: var(--navy); }
.page-head p { margin: 0; color: var(--muted); font-size: 16px; }

/* ── Assistant hero (home) ─────────────────────────────────────────────── */
.hero {
  background:
    radial-gradient(1200px 500px at 50% -10%, rgba(0,176,255,0.18), transparent 60%),
    linear-gradient(170deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: #fff;
  padding: 84px 24px 96px;
}
.hero-inner { max-width: 760px; margin: 0 auto; text-align: center; }
.hero-eyebrow {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 16px;
}
.hero h1 { font-size: 40px; font-weight: 800; line-height: 1.12; letter-spacing: -0.025em; margin: 0 0 14px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-sub { font-size: 17px; color: rgba(255,255,255,0.82); margin: 0 auto 30px; max-width: 600px; }

.ask {
  display: flex; gap: 8px; max-width: 640px; margin: 0 auto;
  background: #fff; padding: 8px; border-radius: 16px; box-shadow: var(--shadow-lg);
}
.ask input { flex: 1; border: 0; outline: 0; font-size: 16px; padding: 13px 14px; color: var(--ink); border-radius: 10px; font-family: inherit; }
.ask button {
  border: 0; background: var(--accent); color: var(--navy); font-weight: 700; font-size: 15px;
  padding: 0 26px; border-radius: 10px; cursor: pointer; font-family: inherit;
}
.ask button:hover { filter: brightness(1.05); }
.ask button:disabled { opacity: 0.55; cursor: default; }

.examples { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 18px; }
.examples button {
  font-size: 13px; color: #fff; background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.22); border-radius: 999px; padding: 7px 14px; cursor: pointer; font-family: inherit;
}
.examples button:hover { background: rgba(0,176,255,0.20); border-color: var(--accent); }

/* Answer card */
.answer {
  max-width: 640px; margin: 22px auto 0; background: #fff; color: var(--ink);
  border-radius: var(--radius); box-shadow: var(--shadow-lg); text-align: left; overflow: hidden;
}
.answer-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.answer-badge { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--navy); background: var(--accent-soft); padding: 4px 10px; border-radius: 999px; }
.answer-close { border: 0; background: none; font-size: 16px; color: var(--muted); cursor: pointer; }
.answer-body { padding: 16px 18px; }
.answer-body p:first-child { margin-top: 0; }
.answer-body p:last-child { margin-bottom: 0; }
.answer-body ul, .answer-body ol { padding-left: 20px; }
.answer-sources { padding: 0 18px 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.answer-sources a { font-size: 12.5px; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; color: var(--navy); }
.typing { display: inline-block; color: var(--muted); }

/* Quick links under hero */
.quicklinks { max-width: 1000px; margin: -52px auto 0; padding: 0 24px 64px; position: relative; z-index: 2; }
.quicklinks-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.ql {
  display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow); transition: transform .08s ease, border-color .08s ease;
}
.ql:hover { text-decoration: none; transform: translateY(-2px); border-color: var(--accent); }
.ql-icon { font-size: 24px; }
.ql-title { font-weight: 700; color: var(--navy); margin-top: 10px; }
.ql-desc { font-size: 13px; color: var(--muted); margin-top: 3px; }

/* ── Apps ──────────────────────────────────────────────────────────────── */
.apps-cat { margin-bottom: 30px; }
.apps-cat h2 { font-size: 14px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 0 0 14px; font-weight: 700; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.tile {
  display: flex; gap: 12px; align-items: flex-start; padding: 16px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  transition: transform .08s ease, border-color .08s ease;
}
.tile:hover { text-decoration: none; transform: translateY(-2px); border-color: var(--accent); }
.tile-icon { font-size: 22px; line-height: 1; }
.tile-name { font-weight: 650; color: var(--navy); }
.tile-desc { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.tile-unset .tile-name::after { content: " · not set"; color: #c0392b; font-weight: 500; font-size: 11px; }

/* ── Handbook ──────────────────────────────────────────────────────────── */
.handbook-layout { display: grid; grid-template-columns: 270px 1fr; gap: 26px; align-items: start; }
.handbook-nav { position: sticky; top: 84px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; box-shadow: var(--shadow); max-height: 76vh; overflow: auto; }
.handbook-nav .cat-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); padding: 12px 10px 5px; font-weight: 700; }
.handbook-nav a { display: block; padding: 8px 10px; border-radius: 8px; color: var(--ink); font-size: 14px; }
.handbook-nav a:hover { background: var(--bg); text-decoration: none; }
.handbook-nav a.active { background: var(--accent-soft); color: var(--navy); font-weight: 600; }
.handbook-reader { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 34px; box-shadow: var(--shadow); min-height: 360px; }
.handbook-reader h1 { font-size: 26px; margin-top: 0; letter-spacing: -0.01em; color: var(--navy); }
.handbook-reader h2 { font-size: 19px; margin-top: 28px; color: var(--navy); }
.handbook-reader h3 { font-size: 16px; margin-top: 20px; }
.handbook-reader blockquote { border-left: 3px solid var(--accent); margin: 16px 0; padding: 4px 16px; color: var(--muted); background: #f5fbff; }
.handbook-reader code { background: var(--bg); padding: 1px 5px; border-radius: 5px; font-size: 13px; }
.handbook-reader a { color: #0773b9; }

/* ── Training & procedures ─────────────────────────────────────────────── */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.track, .proc { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.track h3 { margin: 0 0 4px; font-size: 16px; color: var(--navy); }
.track .track-desc { color: var(--muted); font-size: 13px; margin-bottom: 12px; }
.track ul { margin: 0; padding-left: 18px; }
.track li { margin: 6px 0; }
.track a { color: #0773b9; }
.proc { cursor: pointer; transition: transform .08s ease, border-color .08s ease; }
.proc:hover { transform: translateY(-2px); border-color: var(--accent); }
.proc h3 { margin: 0 0 4px; font-size: 16px; color: var(--navy); }
.proc p { margin: 0; color: var(--muted); font-size: 13px; }

/* ── Footer ────────────────────────────────────────────────────────────── */
.foot { max-width: 1080px; margin: 0 auto; padding: 36px 28px 56px; color: var(--muted); font-size: 13px; }
.foot a { color: var(--navy); }
.foot-sep { margin: 0 8px; }

/* ── Ask AI launcher (header) ──────────────────────────────────────────── */
.btn-ai {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 700; color: var(--navy);
  background: var(--accent); border: 0; border-radius: 8px; padding: 7px 13px; cursor: pointer; font-family: inherit;
}
.btn-ai:hover { filter: brightness(1.06); }

/* ── Chat drawer ───────────────────────────────────────────────────────── */
.chat-backdrop { position: fixed; inset: 0; background: rgba(13,31,60,0.32); opacity: 0; pointer-events: none; transition: opacity .2s ease; z-index: 90; }
.chat-backdrop.open { opacity: 1; pointer-events: auto; }
.chat-drawer {
  position: fixed; top: 0; right: 0; height: 100vh; width: 410px; max-width: 92vw;
  background: var(--card); box-shadow: -12px 0 40px rgba(13,31,60,0.18);
  transform: translateX(100%); transition: transform .24s cubic-bezier(.4,0,.2,1);
  z-index: 95; display: flex; flex-direction: column;
}
.chat-drawer.open { transform: translateX(0); }
.chat-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; background: var(--navy); color: #fff; }
.chat-head .t { font-weight: 700; display: flex; align-items: center; gap: 8px; }
.chat-head .t .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.chat-head button { border: 0; background: none; color: rgba(255,255,255,0.8); font-size: 18px; cursor: pointer; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.chat-empty { color: var(--muted); font-size: 14px; text-align: center; margin: auto 12px; }
.chat-empty strong { color: var(--navy); display: block; margin-bottom: 6px; font-size: 15px; }
.bubble { max-width: 84%; padding: 10px 13px; border-radius: 14px; font-size: 14px; line-height: 1.5; }
.bubble.user { align-self: flex-end; background: var(--navy); color: #fff; border-bottom-right-radius: 4px; }
.bubble.bot { align-self: flex-start; background: var(--bg); color: var(--ink); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.bubble.bot p:first-child { margin-top: 0; } .bubble.bot p:last-child { margin-bottom: 0; }
.bubble.bot ul, .bubble.bot ol { padding-left: 18px; margin: 6px 0; }
.bubble.bot a { color: #0773b9; }
.chat-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 18px 8px; }
.chat-chips button { font-size: 12.5px; color: var(--navy); background: var(--accent-soft); border: 1px solid #bfe6ff; border-radius: 999px; padding: 5px 11px; cursor: pointer; font-family: inherit; }
.chat-chips button:hover { background: #d6f1ff; }
.chat-composer { display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--line); }
.chat-composer textarea { flex: 1; resize: none; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font: inherit; font-size: 14px; max-height: 120px; }
.chat-composer button { border: 0; background: var(--accent); color: var(--navy); font-weight: 700; border-radius: 10px; padding: 0 18px; cursor: pointer; font-family: inherit; }
.chat-composer button:disabled { opacity: .5; cursor: default; }

/* ── Feedback button + modal ───────────────────────────────────────────── */
.fb-btn {
  position: fixed; right: 20px; bottom: 20px; z-index: 80;
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--navy); color: #fff; border: 0; border-radius: 999px; padding: 11px 16px;
  font-size: 13.5px; font-weight: 600; cursor: pointer; box-shadow: var(--shadow-lg); font-family: inherit;
}
.fb-btn:hover { background: var(--navy-soft); }
.fb-overlay { position: fixed; inset: 0; background: rgba(13,31,60,0.4); display: none; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.fb-overlay.open { display: flex; }
.fb-modal { background: #fff; border-radius: 16px; box-shadow: var(--shadow-lg); width: 440px; max-width: 94vw; padding: 24px; }
.fb-modal h3 { margin: 0 0 4px; font-size: 18px; color: var(--navy); }
.fb-modal p { margin: 0 0 16px; color: var(--muted); font-size: 13.5px; }
.fb-modal label { display: block; font-size: 13px; font-weight: 600; margin: 12px 0 5px; }
.fb-modal input, .fb-modal select, .fb-modal textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: 14px; }
.fb-modal textarea { resize: vertical; min-height: 90px; }
.fb-actions { display: flex; gap: 10px; margin-top: 20px; }
.fb-actions button { flex: 1; padding: 11px; border-radius: 10px; font-weight: 700; font-size: 14px; cursor: pointer; font-family: inherit; }
.fb-cancel { border: 1px solid var(--line); background: #fff; color: var(--ink); }
.fb-submit { border: 0; background: var(--accent); color: var(--navy); }
.fb-msg { font-size: 13px; margin-top: 10px; min-height: 16px; }

/* ── Issues page ───────────────────────────────────────────────────────── */
.issues-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.issue-list { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.issue-filters { display: flex; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.issue-filters select { padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 13px; }
.issue-row { padding: 12px 14px; border-bottom: 1px solid var(--line); cursor: pointer; }
.issue-row:hover { background: var(--bg); }
.issue-row.sel { background: var(--accent-soft); }
.issue-row .top { display: flex; gap: 8px; align-items: center; }
.issue-id { font-size: 12px; color: var(--muted); font-weight: 600; }
.issue-title { font-weight: 600; color: var(--ink); margin: 3px 0; font-size: 14px; }
.issue-meta { font-size: 12px; color: var(--muted); }
.badge { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; text-transform: capitalize; }
.badge.open { background: #e0f2fe; color: #075985; }
.badge.in_progress { background: #fef9c3; color: #854d0e; }
.badge.waiting { background: #f3e8ff; color: #6b21a8; }
.badge.closed { background: #e5e7eb; color: #374151; }
.badge.bug { background: #fee2e2; color: #991b1b; }
.badge.feature { background: #dcfce7; color: #166534; }
.badge.high, .badge.urgent { background: #fee2e2; color: #991b1b; }
.issue-detail { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; position: sticky; top: 84px; }
.issue-detail .controls { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0; }
.issue-detail select, .issue-detail input { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 13px; }
.comments { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 14px; }
.comment { background: var(--bg); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; font-size: 13.5px; }
.comment .who { font-size: 11.5px; color: var(--muted); margin-bottom: 3px; }

/* Responsive */
@media (max-width: 900px) {
  .quicklinks-grid { grid-template-columns: repeat(2, 1fr); }
  .issues-layout { grid-template-columns: 1fr; }
  .issue-detail { position: static; }
}
@media (max-width: 760px) {
  .topnav { display: none; }
  .handbook-layout { grid-template-columns: 1fr; }
  .handbook-nav { position: static; max-height: none; }
  .hero h1 { font-size: 31px; }
  .quicklinks-grid { grid-template-columns: 1fr 1fr; }
}
