/* Mudals Sales design system. Brand colours come from the Mudals Technologies logo:
   deep indigo wordmark, violet-to-lavender mark, soft grey. */
:root {
  --bg: #f5f4fc; --panel: #ffffff; --panel-2: #faf9ff; --ink: #17153a; --muted: #6b6889; --line: #e7e4f5;
  --indigo: #2b2a8c; --violet: #5b2be8; --violet-2: #8a3ff0; --lavender: #b46af0;
  --accent: var(--violet); --accent-ink: #ffffff; --accent-soft: #efe9ff;
  --grad: linear-gradient(135deg, #5b2be8 0%, #8a3ff0 55%, #b46af0 100%);
  --good: #10835d; --warn: #b26b00; --bad: #c2334d;
  --good-bg: #e4f6ee; --warn-bg: #fff3dc; --bad-bg: #fde8ec; --chip: #f0edfb;
  --radius: 16px; --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(23, 21, 58, .04), 0 10px 30px -12px rgba(43, 42, 140, .14);
  --font: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --side-1: #15113f; --side-2: #261a6b;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0d0b22; --panel: #16133a; --panel-2: #1b1844; --ink: #ecebfb; --muted: #a4a1c8; --line: #2b2758;
    --accent: #9b6bff; --accent-ink: #ffffff; --accent-soft: #261f5c; --chip: #221e4f;
    --good: #4fd6a2; --warn: #f2b955; --bad: #ff7d95; --good-bg: #0f2e27; --warn-bg: #2f2512; --bad-bg: #331525;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px -14px rgba(0, 0, 0, .6); --side-1: #0a0820; --side-2: #1a1250; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 14px/1.55 var(--font); color: var(--ink); background: var(--bg); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 26px; line-height: 1.2; margin: 0 0 4px; letter-spacing: -.02em; font-weight: 750; }
h2 { font-size: 16px; margin: 0 0 14px; letter-spacing: -.01em; font-weight: 700; }
h3 { font-size: 14px; margin: 18px 0 8px; font-weight: 700; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Shell and sidebar */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
nav.side { position: sticky; top: 0; height: 100vh; padding: 20px 14px; color: #e9e6ff; overflow-y: auto;
  background: radial-gradient(120% 60% at 0% 0%, rgba(138, 63, 240, .35), transparent 60%),
              radial-gradient(90% 50% at 100% 100%, rgba(180, 106, 240, .18), transparent 60%),
              linear-gradient(180deg, var(--side-1), var(--side-2));
  display: flex; flex-direction: column; gap: 2px; }
nav.side .brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 22px; color: #fff; }
nav.side .brand .tile { width: 42px; height: 42px; border-radius: 12px; background: #fff; display: grid; place-items: center;
  box-shadow: 0 6px 20px -6px rgba(180, 106, 240, .7); }
nav.side .brand .tile img { width: 30px; height: auto; }
nav.side .brand b { display: block; font-size: 15px; letter-spacing: .14em; font-weight: 750; }
nav.side .brand span { display: block; font-size: 11px; color: #b9b3e6; letter-spacing: .02em; }
nav.side .sect { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: #8f88c9; padding: 14px 12px 6px; }
nav.side a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 12px; color: #d9d5fb; position: relative;
  transition: background .15s, color .15s; }
nav.side a:hover { background: rgba(255, 255, 255, .07); color: #fff; text-decoration: none; }
nav.side a.on { background: rgba(255, 255, 255, .12); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
nav.side a.on::before { content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--grad); }
nav.side a .grow { flex: 1; }
nav.side .count { background: var(--grad); color: #fff; border-radius: 999px; padding: 0 8px; font-size: 11.5px; font-weight: 700; line-height: 20px; }
nav.side .who { margin-top: auto; padding: 14px 12px 0; border-top: 1px solid rgba(255, 255, 255, .1); font-size: 12px; color: #b9b3e6; }
nav.side .who .avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center;
  font-weight: 700; font-size: 12px; }
nav.side .who button { background: transparent; color: #d9d5fb; border-color: rgba(255, 255, 255, .2); padding: 3px 10px; font-size: 12px; }
main { padding: 28px 36px 72px; max-width: 1240px; width: 100%; }
.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }

/* Banners */
.banner { padding: 11px 16px; border-radius: 12px; margin-bottom: 16px; border: 1px solid transparent; }
.banner.bad, .banner.error { background: var(--bad-bg); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 20%, transparent); }
.banner.ok { background: var(--good-bg); color: var(--good); border-color: color-mix(in srgb, var(--good) 20%, transparent); }
.banner.warn { background: var(--warn-bg); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 20%, transparent); }
.banner.info { background: var(--accent-soft); color: var(--ink); border-color: color-mix(in srgb, var(--accent) 25%, transparent); }

/* Layout and cards */
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card h2 { display: flex; align-items: center; gap: 8px; }
.card h2 .i { color: var(--accent); }
.stat { display: flex; gap: 14px; align-items: center; }
.stat .ico { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.stat .ico .i { width: 22px; height: 22px; }
.stat .num { font-size: 26px; font-weight: 750; letter-spacing: -.02em; line-height: 1.1; }
.stat .lbl { color: var(--muted); font-size: 12.5px; }

/* Hero */
.hero { position: relative; overflow: hidden; border-radius: 22px; padding: 26px 28px; margin-bottom: 20px; color: #fff;
  background: radial-gradient(60% 120% at 100% 0%, rgba(180, 106, 240, .55), transparent 60%), linear-gradient(120deg, #241a7a 0%, #5b2be8 60%, #8a3ff0 100%);
  box-shadow: 0 20px 40px -20px rgba(91, 43, 232, .55); }
.hero::after { content: ""; position: absolute; right: -40px; top: -40px; width: 260px; height: 260px; opacity: .22;
  background: radial-gradient(circle at 30% 30%, #fff 0 9px, transparent 10px), radial-gradient(circle at 62% 22%, #fff 0 7px, transparent 8px),
              radial-gradient(circle at 48% 52%, #fff 0 11px, transparent 12px), radial-gradient(circle at 78% 55%, #fff 0 6px, transparent 7px),
              radial-gradient(circle at 25% 70%, #fff 0 7px, transparent 8px); }
.hero h1 { color: #fff; font-size: 28px; }
.hero p { margin: 6px 0 0; color: #e4dcff; max-width: 640px; }
.hero .row { margin-top: 18px; position: relative; z-index: 1; }
.hero .btn { background: #fff; color: #3a1fb0; border-color: #fff; }
.hero .btn.ghost { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .3); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: rgba(255, 255, 255, .14); color: #fff; }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: #4fe0a8; box-shadow: 0 0 0 3px rgba(79, 224, 168, .25); }
.pill.off .dot { background: #f2b955; box-shadow: 0 0 0 3px rgba(242, 185, 85, .25); }

/* Progress */
.bar { height: 9px; background: var(--chip); border-radius: 999px; overflow: hidden; margin-top: 7px; }
.bar i { display: block; height: 100%; background: var(--grad); border-radius: 999px; }
.bar.good i { background: linear-gradient(90deg, #10835d, #3ccf98); }
.bar.warn i { background: linear-gradient(90deg, #d08a12, #f2b955); }
.bar.bad i { background: linear-gradient(90deg, #c2334d, #ff7d95); }
.progress-row { margin-bottom: 15px; }
.progress-row .top { display: flex; justify-content: space-between; font-weight: 550; }

/* Tables */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 11.5px; color: var(--muted); font-weight: 650; text-transform: uppercase; letter-spacing: .06em; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: color-mix(in srgb, var(--chip) 55%, transparent); }

/* Chips */
.chip { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--chip); font-size: 12px; font-weight: 600; white-space: nowrap; }
.chip.good { background: var(--good-bg); color: var(--good); } .chip.warn { background: var(--warn-bg); color: var(--warn); }
.chip.bad { background: var(--bad-bg); color: var(--bad); } .chip.hot { background: var(--grad); color: #fff; }

/* Controls */
button, .btn { font: inherit; font-weight: 600; border: 1px solid var(--line); background: var(--panel); color: var(--ink); padding: 8px 15px;
  border-radius: var(--radius-sm); cursor: pointer; display: inline-flex; align-items: center; gap: 7px; transition: transform .08s, box-shadow .15s, filter .15s; }
button:hover, .btn:hover { text-decoration: none; filter: brightness(.98); box-shadow: 0 4px 14px -8px rgba(43, 42, 140, .35); }
button:active, .btn:active { transform: translateY(1px); }
button.primary, .btn.primary { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 8px 20px -10px rgba(91, 43, 232, .8); }
button.danger { color: var(--bad); }
input[type=text], input[type=email], input[type=number], input[type=url], input[type=file], select, textarea {
  font: inherit; color: var(--ink); background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 9px 11px; width: 100%;
  transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent); }
textarea { min-height: 120px; resize: vertical; }
textarea.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; min-height: 520px; }
label { display: block; font-size: 12px; color: var(--muted); margin: 12px 0 5px; font-weight: 600; }
form.inline { display: inline; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
details summary { cursor: pointer; }

/* Approvals and drafts */
.approval { margin-bottom: 18px; }
.approval.focus { outline: 2px solid var(--accent); outline-offset: 2px; }
.approval .meta { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.draft { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 10px 0; background: var(--panel-2); }
.draft .who { font-weight: 650; }
.brief { max-height: 280px; overflow: auto; background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 4px 14px; font-size: 13px; }
.brief h2 { font-size: 13px; margin: 12px 0 4px; }
.flags li { color: var(--warn); }
.tabs { display: flex; gap: 6px; margin-bottom: 18px; background: var(--chip); padding: 4px; border-radius: 12px; width: fit-content; }
.tabs a { padding: 7px 14px; color: var(--muted); border-radius: 9px; font-weight: 600; }
.tabs a:hover { text-decoration: none; color: var(--ink); }
.tabs a.on { color: var(--ink); background: var(--panel); box-shadow: var(--shadow); }
pre.mail { white-space: pre-wrap; font-family: inherit; margin: 0; }
.kbd { border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 0 6px; font-size: 11px; background: var(--panel); }

/* Lists of people and threads */
.list-item { display: flex; gap: 12px; align-items: flex-start; padding: 11px 0; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: none; }
.avatar-sm { width: 34px; height: 34px; border-radius: 11px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center;
  font-weight: 750; font-size: 13px; flex: none; text-transform: uppercase; }
.empty { text-align: center; padding: 22px 12px; color: var(--muted); }
.empty .i { width: 30px; height: 30px; color: var(--accent); opacity: .8; }

/* Ask Mudals chat */
.chat { display: flex; flex-direction: column; gap: 14px; }
.msg { max-width: 82%; padding: 12px 16px; border-radius: 16px; line-height: 1.55; }
.msg.user { align-self: flex-end; background: var(--grad); color: #fff; border-bottom-right-radius: 6px; }
.msg.assistant { align-self: flex-start; background: var(--panel); border: 1px solid var(--line); border-bottom-left-radius: 6px; box-shadow: var(--shadow); }
.msg.assistant p:first-child { margin-top: 0; } .msg.assistant p:last-child { margin-bottom: 0; }
.composer { position: sticky; bottom: 16px; display: flex; gap: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 18px;
  padding: 10px; box-shadow: 0 18px 40px -18px rgba(43, 42, 140, .35); margin-top: 18px; }
.composer textarea { min-height: 48px; height: 48px; border: none; background: transparent; box-shadow: none; }
.suggest { display: flex; flex-wrap: wrap; gap: 8px; }
.suggest button { font-weight: 500; font-size: 13px; background: var(--panel); border-radius: 999px; }
.thinking { display: none; align-items: center; gap: 8px; color: var(--muted); }
.thinking.on { display: flex; }
.thinking i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: blink 1.2s infinite; }
.thinking i:nth-child(2) { animation-delay: .2s; } .thinking i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

/* Knowledge */
.drop { border: 2px dashed color-mix(in srgb, var(--accent) 40%, var(--line)); border-radius: 16px; padding: 22px; text-align: center; background: var(--panel-2); }
.drop .i { width: 32px; height: 32px; color: var(--accent); }
.prose { font-size: 13.5px; }
.prose h2 { font-size: 14px; margin: 18px 0 6px; color: var(--accent); }

/* Login */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-brand { position: relative; overflow: hidden; color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: space-between;
  background: radial-gradient(70% 60% at 20% 10%, rgba(180, 106, 240, .45), transparent 60%), linear-gradient(150deg, #15113f, #2b1a8a 55%, #5b2be8); }
.login-brand .mark { width: 64px; height: 64px; border-radius: 18px; background: #fff; display: grid; place-items: center; }
.login-brand .mark img { width: 46px; }
.login-brand h1 { color: #fff; font-size: 36px; max-width: 460px; margin-top: 28px; }
.login-brand p { color: #ddd5ff; max-width: 440px; font-size: 15px; }
.login-brand ul { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 10px; color: #ece7ff; }
.login-brand li { display: flex; gap: 10px; align-items: center; }
.login-brand li .i { color: #c9a8ff; }
.login-side { display: grid; place-items: center; padding: 32px; }
.login { width: 100%; max-width: 380px; text-align: center; }
.login img.logo { width: 170px; margin-bottom: 18px; }
.login .btn.google { width: 100%; justify-content: center; padding: 12px; }

@media (max-width: 920px) {
  .shell { grid-template-columns: 1fr; }
  nav.side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; gap: 4px; padding: 12px; }
  nav.side .brand { width: 100%; padding-bottom: 8px; }
  nav.side .sect { display: none; }
  nav.side a.on::before { display: none; }
  nav.side .who { width: 100%; margin-top: 8px; }
  main { padding: 18px 16px 60px; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  table { display: block; overflow-x: auto; }
  .login-wrap { grid-template-columns: 1fr; }
  .login-brand { padding: 32px 24px; }
  .msg { max-width: 94%; }
}
