.mt-teacher-card {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 0.25rem;
}

.mt-teacher-avatar {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-color);
    box-shadow: var(--shadow-red);
    flex-shrink: 0;
    display: block;
}

.mt-teacher-name {
    font-family: var(--font-heading);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1.3;
    margin-bottom: 0.1rem;
    text-align: center;
}

.mt-teacher-email {
    font-family: var(--font-body);
    font-size: 0.76rem;
    line-height: 1.4;
    word-break: break-word;
    text-align: center;
}

.mt-teacher-email a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.mt-teacher-email a:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

.mt-count-row {
    margin-top: 1.25rem;
    padding: 0.75rem 0 0;
    border-top: 2px solid var(--portal-border);
    font-family: var(--font-body);
    font-size: var(--text-xs);
    color: var(--neutral-mid);
}

.mt-count-row strong {
    color: var(--neutral-dark);
    font-weight: 600;
}

@media (max-width: 991.98px) {
    .mt-teacher-avatar {
        width: 56px;
        height: 56px;
    }
}

@media (max-width: 767.98px) {

    .mt-teacher-card {
        flex-direction: row;
        align-items: center;
        gap: 0.85rem;
        padding: 0.25rem 0;
        width: 100%;
    }

    .mt-teacher-avatar {
        width: 52px;
        height: 52px;
        flex-shrink: 0;
    }

    .mt-teacher-name,
    .mt-teacher-email {
        text-align: left;
    }

    .mt-teacher-name {
        font-size: 0.82rem;
    }

    .mt-teacher-email {
        font-size: 0.72rem;
    }

    .as-table,
    .as-table thead,
    .as-table tbody,
    .as-table th,
    .as-table td,
    .as-table tr {
        display: block;
    }

    .as-table thead {
        display: none;
    }

    .as-table tbody tr {
        background: var(--white) !important;
        border: 1px solid #e0ddd9 !important;
        border-radius: var(--radius-md);
        margin-bottom: 0.85rem;
        box-shadow: var(--shadow-sm);
        overflow: hidden;
    }

    .as-table tbody td:first-child {
        background: var(--secondary-color);
        color: var(--white) !important;
        font-family: var(--font-heading) !important;
        font-size: 0.76rem !important;
        font-weight: 600 !important;
        text-transform: uppercase;
        letter-spacing: 0.07em;
        padding: 0.55rem 1rem !important;
        border-left: 4px solid var(--primary-color) !important;
        border-bottom: none;
    }

    .as-table tbody td:last-child {
        padding: 0.85rem 1rem !important;
        display: flex;
        justify-content: flex-start;
    }
}

@media (max-width: 480px) {
    .mt-teacher-avatar {
        width: 46px;
        height: 46px;
    }

    .mt-teacher-name {
        font-size: 0.78rem;
    }

    .mt-teacher-email {
        font-size: 0.7rem;
    }
}


.md-section-card {
    background: var(--white, #fff);
    border: 1px solid #e0ddd9;
    border-radius: 6px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, .08);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.md-section-header {
    background: var(--secondary-color, #000);
    border-bottom: 3px solid var(--primary-color, #BA0C2F);
    padding: 0.9rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.md-header-badge {
    display: inline-flex;
    align-items: center;
    background: var(--primary-color, #BA0C2F);
    color: #fff;
    font-family: 'Oswald', sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.3rem 1rem 0.3rem 0.85rem;
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%);
    padding-right: 1.4rem;
}

.md-section-header .md-header-icon {
    color: rgba(245, 198, 206, 0.85);
    font-size: 1rem;
    margin-left: auto;
}

.md-section-body {
    padding: 1.5rem 1.5rem 1.25rem;
}

.md-row {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid #f0eeeb;
    font-size: 0.875rem;
}

.md-row:last-child {
    border-bottom: none;
}

.md-label {
    min-width: 220px;
    flex-shrink: 0;
    color: var(--neutral-dark, #554F47);
    font-family: 'Merriweather Sans', sans-serif;
    font-size: 0.875rem;
}

.md-value {
    color: #1a1a1a;
    font-family: 'Merriweather Sans', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    flex: 1;
}

.md-input-val {
    background: #f5f4f1;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0.35rem 0.75rem;
    color: #333;
    font-family: 'Merriweather Sans', sans-serif;
    font-size: 0.875rem;
    display: inline-block;
    min-width: 200px;
}

.md-grade-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.md-grade-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.45rem 0;
    border-bottom: 1px solid #f0eeeb;
    font-size: 0.875rem;
    color: #1a1a1a;
}

.md-grade-list li:last-child {
    border-bottom: none;
}

.md-grade-name {
    min-width: 110px;
    font-weight: 500;
    color: #1a1a1a;
}

.md-grade-date {
    color: var(--primary-color, #BA0C2F);
    font-weight: 600;
    font-size: 0.82rem;
}

.md-course-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.md-course-list li {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.42rem 0;
    border-bottom: 1px solid #f0eeeb;
    font-size: 0.875rem;
    color: #333;
}

.md-course-list li:last-child {
    border-bottom: none;
}

.md-course-num {
    min-width: 26px;
    color: var(--primary-color, #BA0C2F);
    font-weight: 700;
    font-size: 0.8rem;
}

.md-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: var(--primary-color, #BA0C2F);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.18rem 0.6rem;
    border-radius: 3px;
    font-family: 'Oswald', sans-serif;
    letter-spacing: 0.04em;
}

.md-tag-neutral {
    background: #e0ddd9;
    color: #554F47;
}

.md-tag-info {
    background: #e8f0fe;
    color: #1a3a6b;
    border: 1px solid #4285f4;
}

.md-btn-update {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: var(--primary-color, #BA0C2F);
    color: #fff;
    font-family: 'Oswald', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.52rem 1.5rem;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: background 0.18s ease, transform 0.18s ease;
    box-shadow: 0 4px 18px rgba(186, 12, 47, 0.28);
}

.md-btn-update:hover {
    background: #E4002B;
    transform: translateY(-1px);
}

.md-subscription-row {
    padding: 0.65rem 0;
    border-bottom: 1px solid #f0eeeb;
}

.md-subscription-row:last-child {
    border-bottom: none;
}

.md-sub-label {
    font-family: 'Oswald', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary-color, #BA0C2F);
    margin-bottom: 0.2rem;
}

.md-sub-value {
    font-size: 0.875rem;
    color: #333;
    font-family: 'Merriweather Sans', sans-serif;
    padding-left: 0.75rem;
}

@media (max-width: 575.98px) {
    .md-label {
        min-width: 140px;
    }

    .md-section-body {
        padding: 1rem;
    }

    .md-row {
        flex-wrap: wrap;
        gap: 0.25rem;
    }
}