/* Home dashboard — inside .w3-mm .card */

.dash-home__intro {
  margin: 0 0 14px;
}

.dash-home__overview {
  padding-bottom: 18px;
}

.dash-home__modules-body {
  padding-top: 14px;
}

/* Status strip */
.dash-home__stats {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
}

.dash-stat {
  --chip-accent: var(--ok, #a855f7);
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  gap: 2px 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 4px;
  background: var(--cls-hud-panel);
  border: 1px solid color-mix(in srgb, var(--chip-accent) 16%, var(--cls-hud-line-dim));
  box-shadow: inset 2px 0 0 var(--chip-accent);
}

.dash-stat--ok {
  --chip-accent: var(--ok, #a855f7);
  border-color: rgba(168, 85, 247, 0.3);
}

.dash-stat--muted {
  --chip-accent: var(--muted, #6b7f9a);
  opacity: 0.9;
}

.dash-stat__ico {
  grid-row: 1 / span 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 3px;
  font-size: 0.7rem;
  color: var(--chip-accent);
  background: color-mix(in srgb, var(--chip-accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--chip-accent) 24%, transparent);
}

.dash-stat__label {
  font-family: var(--cls-font-mono);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted, #9a9aa6);
  align-self: end;
}

.dash-stat__value {
  font-family: var(--cls-font-mono);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text, #f2f2f5);
  line-height: 1.2;
  align-self: start;
}

.dash-stat__value--sm {
  font-size: 0.82rem;
  font-weight: 700;
}

.dash-stat__hint {
  grid-column: 2;
  font-size: 0.68rem;
  line-height: 1.4;
  color: var(--muted);
}

.dash-home__countdown {
  font-weight: 600;
  color: var(--ok);
  font-variant-numeric: tabular-nums;
}

.dash-home__countdown.is-soon {
  color: var(--cls-warning);
}

.dash-home__countdown.is-expired {
  color: var(--cls-danger);
}

/* Module tiles */
.dash-home__grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
}

.dash-module {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 180px;
  padding: 16px;
  border-radius: 4px;
  border: 1px solid var(--cls-hud-line-dim);
  background: var(--cls-hud-panel);
  box-shadow: none;
  text-decoration: none;
  color: inherit;
  isolation: isolate;
  overflow: hidden;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.dash-module:hover {
  background: var(--cls-hud-panel-hover);
  border-color: var(--cls-hud-line);
  box-shadow: none;
}

.dash-module:focus-visible {
  outline: 2px solid #c084fc;
  outline-offset: 2px;
}

.dash-module--static {
  cursor: default;
  opacity: 0.55;
}

.dash-module--static:hover {
  transform: none;
  box-shadow: none;
}

.dash-module--locked {
  opacity: 0.78;
}

.dash-module--green:hover { border-color: rgba(168, 85, 247, 0.3); }
.dash-module--blue:hover { border-color: rgba(168, 85, 247, 0.3); }
.dash-module--cyan:hover { border-color: rgba(168, 85, 247, 0.3); }

.dash-module__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.dash-module__icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  font-size: 0.95rem;
}

.dash-module--green .dash-module__icon {
  color: var(--ok);
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.28);
}

.dash-module--blue .dash-module__icon,
.dash-module--cyan .dash-module__icon {
  color: #c084fc;
  background: rgba(192, 132, 252, 0.1);
  border: 1px solid rgba(192, 132, 252, 0.25);
}

.dash-module--muted .dash-module__icon {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}

.dash-module__status {
  padding: 3px 8px;
  border-radius: 3px;
  font-family: var(--cls-font-mono);
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cls-purple-400);
  background: rgba(168, 85, 247, 0.08);
  border: 1px solid rgba(168, 85, 247, 0.35);
}

.dash-module--locked .dash-module__status {
  color: #c084fc;
  background: rgba(168, 85, 247, 0.1);
  border-color: rgba(168, 85, 247, 0.28);
}

.dash-module__status--off {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line);
}

.dash-module__category {
  font-family: var(--cls-font-mono);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim, #66666f);
}

.dash-module__name {
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text, #f2f2f5);
}

.dash-module__desc {
  flex: 1;
  font-size: 0.74rem;
  line-height: 1.55;
  color: var(--muted);
}

.dash-module__tip {
  font-size: 0.7rem;
  color: var(--cls-purple-400);
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
}

.dash-module__action {
  margin-top: auto;
  padding: 8px 12px;
  border-radius: 3px;
  border: 1px solid rgba(168, 85, 247, 0.3);
  background: rgba(168, 85, 247, 0.08);
  font-family: var(--cls-font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cls-purple-400);
  text-align: center;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.dash-module:hover .dash-module__action {
  background: var(--cls-purple-500);
  border-color: var(--cls-purple-500);
  color: var(--cls-text-inverse);
  box-shadow: none;
}

.dash-module--locked .dash-module__action {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--dim);
}

.dash-module--static .dash-module__action {
  opacity: 0.5;
}

.dash-module__action i {
  font-size: 0.65rem;
  margin-left: 3px;
  transition: transform 0.18s ease;
}

.dash-module:hover .dash-module__action i {
  transform: translateX(3px);
}

@media (max-width: 640px) {
  .dash-module {
    min-height: 0;
  }
}
