/* Tangent dashboard. Look follows the Radian client panel (client.radian.mobi): Inter, purple #6927DA, pastel tiles. */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url(inter-400.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url(inter-500.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url(inter-600.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url(inter-700.woff2) format('woff2'); }
@font-face { font-family: 'Sora'; font-style: normal; font-weight: 600; font-display: swap; src: url(sora-600.woff2) format('woff2'); }

:root {
  --purple: #6927DA; --purple-2: #5A1FC2; --purple-ink: #6F2C8E; --nav-on: #ECE9FE; --purple-soft: #F3F0FE;
  --ink: #1C1C1C; --ink-2: #3A3A3A; --muted: #666666; --faint: #8C8C99;
  --line: #E5E7EB; --line-2: #D9D9DE; --grey: #F4F5F7; --side: #F8F7FD; --bg: #FFFFFF;
  --orange: #F08A24; --tangent: #F97316; --navy: #0B1530;
  --ok: #15803D; --ok-bg: #E8F7EE; --warn: #B45309; --warn-bg: #FEF3E2; --bad: #C2410C; --bad-bg: #FDECE5; --red: #E5484D;
  --radius: 12px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { font-family: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; color: var(--ink);
  background: var(--bg); -webkit-font-smoothing: antialiased; font-size: 14px; line-height: 1.45; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--purple); }
.noscript { padding: 40px; text-align: center; }
.boot { min-height: 100vh; }
.num, td, .tile b, .stat b { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--purple); outline-offset: 2px; }

/* lockup: Tangent mark + name + "by" + Radian mark */
.lockup { display: flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; min-width: 0; }
.lockup .mark { width: 28px; height: 28px; flex: none; }
.lockup .wm { font-family: Sora, Inter, sans-serif; font-weight: 600; font-size: 19px; letter-spacing: -.03em; white-space: nowrap; }
.lockup .by { display: flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 500; color: var(--muted);
  padding-left: 9px; border-left: 1px solid var(--line-2); white-space: nowrap; }
.lockup .by img { height: 14px; width: auto; }
.mk-ring { fill: none; stroke: var(--navy); stroke-width: 2.6; }
.mk-line { stroke: var(--tangent); stroke-width: 2.6; stroke-linecap: round; }
.mk-halo { fill: var(--tangent); opacity: .22; }
.mk-dot { fill: var(--tangent); }

/* sign in */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px;
  background: radial-gradient(900px 500px at 85% -10%, #EFEAFD 0%, rgba(239,234,253,0) 60%),
              radial-gradient(700px 420px at -10% 110%, #FFF1E6 0%, rgba(255,241,230,0) 60%), #FAFAFD; }
.auth-card { width: 100%; max-width: 400px; background: #fff; border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 12px 40px rgba(26, 16, 64, .08); padding: 32px 28px 26px; }
.auth-card .lockup { justify-content: center; margin-bottom: 26px; }
.auth-card h1 { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.auth-card p.sub { color: var(--muted); margin-bottom: 22px; }
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.field small { display: block; color: var(--muted); font-size: 12px; margin-top: 5px; }
.input, select.input { width: 100%; height: 42px; border: 1px solid var(--line-2); border-radius: 8px; padding: 0 12px;
  background: #fff; font-size: 14px; }
.input:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 3px rgba(105, 39, 218, .14); }
textarea.input { height: auto; min-height: 64px; padding: 10px 12px; resize: vertical; }
a.btn { text-decoration: none; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 40px; padding: 0 16px;
  border-radius: 8px; border: 1px solid transparent; background: var(--purple); color: #fff; font-weight: 600; font-size: 14px;
  white-space: nowrap; }
.btn:hover { background: var(--purple-2); }
.btn[disabled] { opacity: .55; cursor: default; }
.btn.block { width: 100%; height: 44px; margin-top: 6px; }
.btn.ghost { background: #fff; color: var(--purple); border-color: #D8D0F5; }
.btn.ghost:hover { background: var(--purple-soft); }
.btn.quiet { background: transparent; color: var(--ink-2); border-color: var(--line-2); }
.btn.quiet:hover { background: var(--grey); }
.btn.small { height: 32px; padding: 0 11px; font-size: 13px; font-weight: 500; }
.btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.msg { border-radius: 8px; padding: 10px 12px; font-size: 13px; margin: 4px 0 12px; }
.msg.err { background: var(--bad-bg); color: var(--bad); }
.msg.ok { background: var(--ok-bg); color: var(--ok); }
.msg.info { background: var(--purple-soft); color: var(--purple-ink); }
.auth-foot { text-align: center; color: var(--faint); font-size: 12px; margin-top: 18px; }

/* shell */
.app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
aside.side { background: var(--side); border-right: 1px solid #EEEAF7; }
.side-in { display: flex; flex-direction: column; padding: 18px 10px 20px; position: sticky; top: 0; height: 100vh; }
.side-in .lockup { padding: 4px 8px 22px; }
nav.menu a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; color: var(--ink);
  text-decoration: none; font-size: 15px; margin-bottom: 3px; border-left: 3px solid transparent; }
nav.menu a:hover { background: #F1EEFB; }
nav.menu a.on { background: var(--nav-on); color: var(--purple-ink); border-left-color: var(--purple); font-weight: 500; }
nav.menu svg { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
nav.menu .grp { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--faint);
  padding: 16px 12px 6px; }
.side-foot { margin-top: auto; padding: 12px 8px 0; }
.side-foot .who { font-size: 12px; color: var(--muted); padding: 0 4px 10px; }
.signout { display: flex; align-items: center; gap: 8px; color: var(--red); background: none; border: 0; font-size: 15px; padding: 8px 4px; }
.signout svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
main.main { min-width: 0; }
header.top { height: 70px; border-bottom: 1px solid #ECECEC; display: flex; align-items: center; padding: 0 20px; gap: 14px;
  position: sticky; top: 0; background: rgba(255, 255, 255, .96); z-index: 5; }
header.top h1 { font-size: 18px; font-weight: 700; white-space: nowrap; }
.top-r { margin-left: auto; display: flex; align-items: center; gap: 10px; min-width: 0; }
.adv-l { font-size: 14px; font-weight: 600; white-space: nowrap; }
.adv-sel { height: 44px; min-width: 210px; max-width: 280px; border: 1px solid var(--line); border-radius: 8px; padding: 0 12px;
  background: #fff; font-size: 14px; }
.adv-chip { height: 44px; display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; padding: 0 16px;
  font-size: 14px; background: #fff; white-space: nowrap; }
.vr { width: 1px; height: 36px; background: var(--line); margin: 0 4px; }
.user { position: relative; }
.user > button { display: flex; align-items: center; gap: 9px; border: 0; background: none; padding: 4px 2px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: #E8E3FA; display: grid; place-items: center; font-size: 14px;
  font-weight: 600; color: #3B2A7A; flex: none; }
.user .nm { font-weight: 700; font-size: 15px; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user .role { font-size: 11px; font-weight: 600; color: var(--purple-ink); background: var(--nav-on); border-radius: 999px; padding: 2px 8px; }
.user svg.chev { width: 14px; height: 14px; fill: none; stroke: #444; stroke-width: 1.8; }
.pop { position: absolute; right: 0; top: 48px; background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 10px 30px rgba(20, 20, 40, .12); padding: 6px; min-width: 200px; z-index: 20; }
.pop button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 9px 12px; border-radius: 7px; font-size: 14px; }
.pop button:hover { background: var(--grey); }
.menu-btn { display: none; border: 1px solid var(--line); background: #fff; border-radius: 8px; width: 40px; height: 40px; place-items: center; }
.menu-btn svg { width: 18px; height: 18px; fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; }
.wrap { padding: 14px 20px 44px; max-width: 1480px; }

/* period and filters */
.controls { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.pills { display: inline-flex; background: var(--grey); border-radius: 999px; padding: 4px; flex-wrap: wrap; }
.pills button { font-size: 14px; font-weight: 500; padding: 8px 15px; border-radius: 999px; border: 0; background: none; color: var(--ink); }
.pills button.on { background: var(--purple); color: #fff; }
.range { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-2); border-radius: 8px; padding: 4px 6px 4px 10px; background: #fff; }
.range input { border: 0; height: 32px; font-size: 13.5px; background: transparent; }
.range span { color: var(--muted); font-size: 13px; }
.filters { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.filters select { height: 38px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; background: #fff; font-size: 13.5px; max-width: 260px; }
.filters .grow { flex: 1; }
.seg { display: inline-flex; border: 1px solid #D8D0F5; border-radius: 8px; overflow: hidden; }
.seg button { border: 0; background: #fff; padding: 0 12px; height: 36px; font-size: 13px; font-weight: 500; color: var(--purple); }
.seg button.on { background: var(--purple); color: #fff; }
.banner { display: flex; gap: 10px; align-items: flex-start; border-radius: 10px; padding: 11px 14px; font-size: 13px; margin-top: 14px; }
.banner.info { background: var(--purple-soft); color: var(--purple-ink); }
.banner.warn { background: var(--warn-bg); color: var(--warn); }
.banner b { font-weight: 600; }

/* sections, tiles */
.sec { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 18px; }
.sec-h { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.sec-h h2 { font-size: 18px; font-weight: 700; }
.tag { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--purple-ink);
  background: var(--nav-on); border-radius: 999px; padding: 3px 9px; }
.sec-h .sp { flex: 1; }
.note { color: var(--muted); font-size: 12.5px; }
.tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.tile { min-height: 72px; border-radius: var(--radius); display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; gap: 8px; }
.tile b { display: block; font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.tile small, .stat small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.ic { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .55);
  border: 1px solid rgba(255, 255, 255, .95); flex: none; }
.ic svg { width: 22px; height: 22px; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.g1 { background: linear-gradient(rgb(248, 226, 202), rgb(252, 239, 226)); } .g1 svg { stroke: #C8782E; }
.g2 { background: linear-gradient(rgb(254, 223, 250), rgb(249, 226, 239)); } .g2 svg { stroke: #D0379F; }
.g3 { background: linear-gradient(rgb(189, 244, 230), rgb(224, 244, 229)); } .g3 svg { stroke: #1F9468; }
.g4 { background: linear-gradient(rgb(255, 227, 223), rgb(248, 231, 223)); } .g4 svg { stroke: #D24F45; }
.g5 { background: linear-gradient(rgb(200, 239, 249), rgb(225, 242, 248)); } .g5 svg { stroke: #1B93B3; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.stats.seven { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.stat { background: var(--grey); border-radius: var(--radius); padding: 9px 12px; min-height: 54px; }
.stat b { display: block; font-size: 16px; font-weight: 600; }
.stat.hl { background: var(--nav-on); }
.stat.hl b { color: var(--purple-ink); }
.rule { font-size: 12.5px; color: var(--muted); margin-top: 12px; line-height: 1.6; }

/* cards, charts */
.card { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px 10px; background: #fff; }
.card + .card { margin-top: 16px; }
.card-h { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.card-h h3 { font-size: 16px; font-weight: 700; }
.card-h .sp { flex: 1; }
.legend { display: flex; gap: 16px; font-size: 12px; color: #444; }
.lg-imp, .dot-imp { background: #6927DA; }
.lg-eng, .dot-eng { background: #F08A24; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.chart-box { position: relative; }
svg.chart { width: 100%; height: auto; display: block; overflow: visible; }
svg.chart text { font-family: Inter, sans-serif; font-size: 11px; fill: #6B6B76; }
.tip { position: absolute; pointer-events: none; background: #1C1C28; color: #fff; border-radius: 8px; padding: 8px 10px;
  font-size: 12px; line-height: 1.5; white-space: nowrap; transform: translate(-50%, -100%); margin-top: -10px; z-index: 3;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .18); }
.tip b { font-weight: 600; }
.tip i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.empty { text-align: center; color: var(--muted); padding: 34px 10px; font-size: 13.5px; }

/* tables */
.tbl { border-radius: 12px; overflow: auto; box-shadow: 0 1px 3px rgba(16, 24, 40, .06); border: 1px solid var(--line); }
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
th { background: var(--purple); color: #fff; font-weight: 600; padding: 13px 12px; text-align: center; white-space: nowrap; font-size: 13px; }
td { padding: 12px; text-align: center; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
td:first-child { border-left: 0; }
tbody tr:nth-child(even) td { background: #FAFAFC; }
th.l, td.l { text-align: left; }
td .sub { display: block; font-size: 11.5px; color: var(--faint); margin-top: 2px; overflow-wrap: anywhere; }
td.wrap-txt { white-space: normal; max-width: 420px; text-align: left; word-break: break-word; }
.chip { display: inline-block; font-size: 12px; padding: 3px 9px; border-radius: 999px; background: #EEF0F3; color: #333; white-space: nowrap; }
.chip.ok { background: var(--ok-bg); color: var(--ok); }
.chip.warn { background: var(--warn-bg); color: var(--warn); }
.chip.bad { background: var(--bad-bg); color: var(--bad); }
.chip.pur { background: var(--nav-on); color: var(--purple-ink); }
.chip + .chip { margin-left: 4px; }
.idlist { display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; }
td.l .idlist { justify-content: flex-start; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; }
.input.mono { font-size: 13.5px; }
.input.mono::placeholder { font-family: Inter, system-ui, sans-serif; }
.foot { font-size: 12px; color: var(--muted); margin-top: 16px; line-height: 1.7; }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }

/* admin pages */
.page-intro { color: var(--muted); max-width: 820px; margin: 2px 0 18px; }
.panel { border: 1px solid var(--line); border-radius: 12px; padding: 18px; background: #fff; margin-bottom: 18px; }
.panel h3 { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.panel p.hint { color: var(--muted); font-size: 13px; margin-bottom: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 16px; }
.form-grid .full { grid-column: 1 / -1; }
.toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle .sw { width: 40px; height: 22px; border-radius: 999px; background: #D5D5DC; position: relative; transition: background .15s; flex: none; }
.toggle .sw::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: left .15s; }
.toggle input:checked + .sw { background: var(--purple); }
.toggle input:checked + .sw::after { left: 21px; }
.toggle input:focus-visible + .sw { outline: 2px solid var(--purple); outline-offset: 2px; }
.pick { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 14px; }
.pick .note { color: var(--muted); font-size: 12px; align-self: center; margin-right: 2px; }
.pick button { border: 1px dashed #C9BEF2; background: #fff; color: var(--purple-ink); border-radius: 999px; padding: 4px 10px; font-size: 12px; }
.pick button:hover { background: var(--purple-soft); }
.pick button.taken { border-style: solid; border-color: var(--line); color: var(--faint); cursor: default; }
.row-actions { display: flex; gap: 6px; justify-content: center; align-items: center; flex-wrap: wrap; }
.secret { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: #FFFBEB; border: 1px solid #F5DFA4;
  border-radius: 10px; padding: 14px; margin: 4px 0 16px; }
.secret code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 17px; font-weight: 600; letter-spacing: .03em;
  background: #fff; border: 1px solid #F0D98F; border-radius: 6px; padding: 6px 10px; }
.secret p { flex-basis: 100%; font-size: 12.5px; color: #7A5B00; }
.app-name { width: 100%; min-width: 180px; height: 36px; }
.search { max-width: 320px; margin-bottom: 12px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #1C1C28; color: #fff; padding: 11px 18px;
  border-radius: 10px; font-size: 13.5px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); z-index: 50; }
.toast.err { background: #8F2D12; }
.spin { display: inline-block; width: 14px; height: 14px; border: 2px solid rgba(255, 255, 255, .5); border-top-color: #fff;
  border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { color: var(--muted); padding: 40px 0; text-align: center; }
.hidden { display: none !important; }

/* phones and small laptops */
@media (max-width: 1180px) {
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stats.seven { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .two { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  aside.side { position: fixed; z-index: 40; left: 0; top: 0; bottom: 0; width: 260px; transform: translateX(-100%); transition: transform .2s;
    box-shadow: 0 0 40px rgba(0, 0, 0, .15); }
  aside.side.open { transform: none; }
  .menu-btn { display: grid; }
  header.top { padding: 0 14px; gap: 10px; }
  header.top h1 { font-size: 16px; }
  .adv-l, .user .nm, .user .role, .vr { display: none; }
  .adv-sel { min-width: 0; max-width: 46vw; }
  .wrap { padding: 12px 14px 36px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats, .stats.seven { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .pills button { padding: 7px 11px; font-size: 13px; }
  .tbl table { min-width: 700px; }
  svg.chart text { font-size: 12px; }
}
