.mdc-card {
    position: relative;
    overflow: hidden;
    border-radius: 1.2rem;
    border: 1px solid color-mix(in srgb, var(--bs-secondary) 16%, white);
    background:
        radial-gradient(
            circle at top right,
            color-mix(in srgb, var(--bs-primary) 4%, white),
            transparent 28%
        ),
        linear-gradient(180deg, #ffffff 0%, #fcfcfd 100%);
    padding: 1rem 1rem 0.95rem;
    box-shadow:
        0 14px 30px rgba(15, 23, 42, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.mdc-card::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(
        90deg,
        color-mix(in srgb, var(--bs-primary) 70%, white),
        color-mix(in srgb, var(--bs-secondary) 45%, white),
        transparent
    );
    opacity: 0.95;
}

.mdc-card__header {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.95rem;
    flex-wrap: wrap;
}

.mdc-card__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.2;
    color: #1f2a3d;
    letter-spacing: -0.015em;
}

.mdc-card__subtitle {
    margin: 0.35rem 0 0;
    font-size: 0.84rem;
    line-height: 1.55;
    color: #7a8699;
}

.mdc-card__actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Activity */
.mdc-activity {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.mdc-activity__item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.1rem 0;
}

.mdc-activity__dot {
    width: 10px;
    height: 10px;
    margin-top: 0.42rem;
    border-radius: 999px;
    flex: 0 0 10px;
}

.mdc-activity__dot.is-success {
    background: #16a34a;
}
.mdc-activity__dot.is-warning {
    background: #f59e0b;
}
.mdc-activity__dot.is-danger {
    background: #ef4444;
}
.mdc-activity__dot.is-info {
    background: #3b82f6;
}

.mdc-activity__heading {
    font-size: 0.88rem;
    font-weight: 700;
    color: #24324a;
}

.mdc-activity__meta {
    margin-top: 0.2rem;
    font-size: 0.78rem;
    color: #8a94a6;
}

/* Table */
.mdc-table-wrap {
    overflow-x: auto;
}

.mdc-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.mdc-table thead th {
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7280;
    padding: 0.85rem 0.9rem;
    border-bottom: 1px solid #edf1f6;
    background: color-mix(in srgb, var(--bs-primary) 3%, white);
}

.mdc-table tbody td {
    font-size: 0.86rem;
    font-weight: 600;
    color: #24324a;
    padding: 0.9rem 0.9rem;
    border-bottom: 1px solid #f2f5f8;
}

.mdc-table tbody tr:last-child td {
    border-bottom: none;
}

.mdc-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 0.18rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
}

.mdc-badge.is-success {
    background: color-mix(in srgb, #16a34a 12%, white);
    color: #15803d;
}

.mdc-badge.is-warning {
    background: color-mix(in srgb, #f59e0b 12%, white);
    color: #b45309;
}

.mdc-badge.is-danger {
    background: color-mix(in srgb, #ef4444 12%, white);
    color: #dc2626;
}

.mdc-badge.is-info {
    background: color-mix(in srgb, #3b82f6 12%, white);
    color: #2563eb;
}

/* Stat list */
.mdc-stat-list {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.mdc-stat-list__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.8rem 0.9rem;
    border-radius: 0.95rem;
    background: color-mix(in srgb, var(--bs-primary) 3%, white);
    border: 1px solid color-mix(in srgb, var(--bs-secondary) 10%, white);
}

.mdc-stat-list__label {
    font-size: 0.86rem;
    font-weight: 700;
    color: #24324a;
}

.mdc-stat-list__sub {
    margin-top: 0.2rem;
    font-size: 0.77rem;
    color: #8a94a6;
}

.mdc-stat-list__value {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--bs-primary);
    white-space: nowrap;
}

/* Dark mode */
[data-bs-theme="dark"] .mdc-card {
    background:
        radial-gradient(
            circle at top right,
            color-mix(in srgb, var(--bs-primary) 8%, #1f2637),
            transparent 28%
        ),
        linear-gradient(180deg, #1f2637 0%, #1c2535 100%);
    border-color: #344054;
    box-shadow: none;
}

[data-bs-theme="dark"] .mdc-card__title,
[data-bs-theme="dark"] .mdc-activity__heading,
[data-bs-theme="dark"] .mdc-table tbody td,
[data-bs-theme="dark"] .mdc-stat-list__label {
    color: #f8f9fa;
}

[data-bs-theme="dark"] .mdc-card__subtitle,
[data-bs-theme="dark"] .mdc-activity__meta,
[data-bs-theme="dark"] .mdc-stat-list__sub {
    color: #98a2b3;
}

[data-bs-theme="dark"] .mdc-table thead th {
    color: #9aa6b8;
    border-bottom-color: #344054;
    background: color-mix(in srgb, var(--bs-primary) 5%, #1f2637);
}

[data-bs-theme="dark"] .mdc-table tbody td {
    border-bottom-color: #2b3548;
}

[data-bs-theme="dark"] .mdc-stat-list__item {
    background: color-mix(in srgb, var(--bs-primary) 5%, #1f2637);
    border-color: #344054;
}
