/* GrantMind | Components: cards, stats, tables, tags, bars, rows, toast, modal, AI panel, charts, calendar, kanban. */
.card {
  background: var(--sf);
  border: 1px solid var(--ln);
  border-radius: 10px;
  padding: 18px;
  margin-bottom: 16px;
}
.stat {
  background: var(--sf);
  border: 1px solid var(--ln);
  border-radius: 10px;
  padding: 12px 14px;
}
.stat b {
  display: block;
  font:
    600 1.6rem Georgia,
    serif;
}
.stat span {
  color: var(--mt);
  font-size: 13px;
}
.tw {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
}
th,
td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--ln);
  vertical-align: middle;
}
th {
  color: var(--mt);
  font-weight: 500;
  font-size: 13px;
}
.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 99px;
  background: var(--sh);
  font-size: 12px;
}
.tag.ok {
  color: var(--ok);
}
.tag.bad {
  color: var(--bad);
}
.bar {
  height: 6px;
  border-radius: 3px;
  background: var(--sh);
  overflow: hidden;
  min-width: 60px;
}
.bar i {
  display: block;
  height: 100%;
  background: var(--ac);
}
.row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.row > input,
.row > select {
  flex: 1;
  min-width: 120px;
  margin: 3px 0;
}
.mt {
  color: var(--mt);
}
.sw {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.sw input {
  width: auto;
  margin: 0;
}
#toast {
  position: fixed;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  background: var(--tx);
  color: var(--bg);
  padding: 9px 16px;
  border-radius: 8px;
  display: none;
  z-index: 50;
  max-width: 90vw;
}
.ov {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 40;
  padding: 16px;
}
.ov .card {
  max-width: 560px;
  width: 100%;
  max-height: 85vh;
  overflow: auto;
  margin: 0;
}
#ai {
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  width: 340px;
  max-width: 100%;
  background: var(--sf);
  border-left: 1px solid var(--ln);
  z-index: 30;
  display: flex;
  flex-direction: column;
  padding: 14px;
  padding-top: calc(14px + env(safe-area-inset-top, 0px));
}
#ai .log {
  flex: 1;
  overflow: auto;
}
.m {
  padding: 8px 10px;
  border-radius: 8px;
  margin-bottom: 8px;
  background: var(--sh);
}
.m.u {
  background: var(--pr);
  color: var(--pt);
}
.chart {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 120px;
}
.chart div {
  flex: 1;
  background: var(--pr);
  border-radius: 4px 4px 0 0;
  position: relative;
}
.chart small {
  position: absolute;
  bottom: -18px;
  left: 0;
  right: 0;
  text-align: center;
  color: var(--mt);
}
.cal {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.cal > div {
  background: var(--sf);
  border: 1px solid var(--ln);
  border-radius: 6px;
  min-height: 84px;
  padding: 4px;
  min-width: 0;
  cursor: pointer;
}
.cal > .h {
  min-height: 0;
  border: 0;
  background: transparent;
  color: var(--mt);
  font-size: 12px;
  cursor: default;
}
.chip {
  display: block;
  font-size: 11px;
  background: var(--sh);
  border-radius: 4px;
  padding: 1px 4px;
  margin: 2px 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kan {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
}
.kc {
  min-width: 200px;
  flex: 1;
  background: var(--sh);
  border-radius: 8px;
  padding: 8px;
}
.kc .card {
  padding: 8px;
  margin: 6px 0;
  font-size: 13px;
}
