.md-page .md-main {
  flex: 1;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 0 48px;
}

.md-app {
  width: 100%;
}

.md-hero {
  padding: 16px 16px 8px;
}

.md-hero h1 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  color: #1a2e28;
}

.md-hero p {
  margin: 6px 0 0;
  font-size: 0.88rem;
  color: var(--mage-muted);
  line-height: 1.45;
}

.md-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  padding: 4px 16px 12px;
  font-size: 0.92rem;
}

.md-nav a {
  color: var(--mage-green);
}

.md-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 16px 12px;
}

.md-filter {
  border: 1px solid var(--mage-border);
  background: var(--mage-white);
  color: var(--mage-muted);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
}

.md-filter.is-active {
  background: var(--mage-green);
  border-color: var(--mage-green);
  color: #fff;
}

.md-toast {
  margin: 0 16px 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #eef6f3;
  color: #1a2e28;
  font-size: 0.88rem;
}

.md-toast.err {
  background: #fdecea;
  color: #8a1f1a;
}

.md-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 16px;
}

.md-empty {
  margin: 8px 0;
  padding: 28px 16px;
  text-align: center;
  color: var(--mage-muted);
  background: var(--mage-white);
  border: 1px solid var(--mage-border);
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  line-height: 1.45;
}

.md-card {
  background: var(--mage-white);
  border: 1px solid var(--mage-border);
  border-radius: var(--radius-md);
  padding: 14px 14px 12px;
  box-shadow: 0 6px 18px rgba(26, 46, 40, 0.04);
}

.md-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.md-card-title {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 650;
  color: #1a2e28;
  line-height: 1.35;
}

.md-card-meta {
  margin: 4px 0 0;
  font-size: 0.8rem;
  color: var(--mage-muted);
}

.md-badge {
  flex-shrink: 0;
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background: #e3f2ef;
  color: #2d584b;
}

.md-badge--sap {
  background: #eef2ff;
  color: #3730a3;
}

.md-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.md-btn {
  appearance: none;
  border: 1px solid var(--mage-green);
  background: var(--mage-green);
  color: #fff;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
}

.md-btn:disabled {
  opacity: 0.55;
  cursor: wait;
}

.md-btn--ghost {
  background: transparent;
  color: var(--mage-green);
}

/* Skeleton */
.md-skeleton {
  padding: 20px 16px;
}

.md-skel {
  display: block;
  border-radius: 8px;
  background: linear-gradient(
    90deg,
    #e4ebe8 0%,
    #e4ebe8 35%,
    #f3f7f5 50%,
    #e4ebe8 65%,
    #e4ebe8 100%
  );
  background-size: 200% 100%;
  animation: md-shimmer 1.35s ease-in-out infinite;
}

@keyframes md-shimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

.md-skel--title {
  width: 12rem;
  height: 1.5rem;
  margin-bottom: 10px;
}

.md-skel--line {
  width: 80%;
  height: 0.85rem;
  margin-bottom: 18px;
}

.md-skel-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.md-skel--tab {
  width: 4.5rem;
  height: 2rem;
  border-radius: 999px;
}

.md-skel--card {
  height: 5.2rem;
  border-radius: 12px;
  margin-bottom: 10px;
}

@media (prefers-reduced-motion: reduce) {
  .md-skel {
    animation: none;
    background: #e4ebe8;
  }
}
