/* ============================================================
   STUDENT MANAGEMENT - FULL CSS (FIXED LAYOUT v5)
   - Fixed table layout so columns stay neat
   - Ellipsis for long text (email, name, curriculum)
   - Overflow visible ONLY for the Action column (dropdown)
   - Curriculum & course detail modal
   ============================================================ */

/* ========== Progress Bar ========== */
.smm-progress-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}
.smm-progress-track {
    flex: 1;
    height: 6px;
    background: #e8edf3;
    border-radius: 20px;
    overflow: hidden;
    min-width: 40px;
}
.smm-progress-fill {
    height: 100%;
    border-radius: 20px;
    transition: width .3s ease;
}
.smm-progress-fill.smm-progress-high { background: #2a9a61; }
.smm-progress-fill.smm-progress-mid  { background: #f5a400; }
.smm-progress-fill.smm-progress-low  { background: #d92332; }
.smm-progress-label {
    font-size: 10px;
    font-weight: 700;
    color: #304664;
    min-width: 30px;
    text-align: right;
    flex-shrink: 0;
}

/* ========== Activity Badge ========== */
.smm-grade-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 9px;
    font-weight: 700;
    white-space: nowrap;
    line-height: 1.3;
}
.smm-grade-done    { background: #e9f7ef; color: #2a9a61; }
.smm-grade-pending { background: #fde8e8; color: #d92332; cursor: pointer; }
.smm-grade-partial { background: #fff3d8; color: #b87800; cursor: pointer; }

/* ========== Table Layout (FIXED) ========== */
#smm-table {
    table-layout: fixed !important;
    width: 100% !important;
    min-width: 1265px !important;   /* ⬅️ from 1300px → 1265px */
    border-collapse: collapse;
    position: relative;
    z-index: 1;
}

#smm-table thead th {
    vertical-align: middle;
    white-space: nowrap;
    padding: 10px 8px !important;
    font-size: 11px !important;
    overflow: hidden;
    text-overflow: ellipsis;
}

#smm-table tbody td {
    vertical-align: middle;
    padding: 8px 8px !important;
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.3;
}

/* ========== Column widths (fixed) ========== */
/* # */
#smm-table thead th:nth-child(1)  { width: 40px  !important; }
/* Photo */
#smm-table thead th:nth-child(2)  { width: 55px  !important; }
/* Student Name */
#smm-table thead th:nth-child(3)  { width: 140px !important; }
/* Email */
#smm-table thead th:nth-child(4)  { width: 130px !important; max-width: 130px !important; }
/* Curriculum */
#smm-table thead th:nth-child(5)  { width: 160px !important; }
/* Course */
#smm-table thead th:nth-child(6)  { width: 120px !important; }
/* School */
#smm-table thead th:nth-child(7)  { width: 130px !important; }
/* Progress */
#smm-table thead th:nth-child(8)  { width: 100px !important; }
/* Progress Activity */
#smm-table thead th:nth-child(9)  { width: 140px !important; }
/* Last Access */
#smm-table thead th:nth-child(10) { width: 110px !important; }
/* Status */
#smm-table thead th:nth-child(11) { width: 85px  !important; }
/* Action */
#smm-table thead th:nth-child(12) { width: 55px  !important; }

/* ========== Email truncate ========== */
#smm-table tbody td:nth-child(4) {
    width: 130px !important;
    max-width: 130px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    display: table-cell !important;
}

/* ========== Student Name - truncate ========== */
#smm-table tbody td:nth-child(3) .tmm-name,
#smm-table tbody td:nth-child(3) .tmm-username {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 140px;
    display: block;
}

/* ========== Curriculum & Course badges ========== */
.smm-courses-cell {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    max-width: 100%;
    overflow: hidden;
}

.smm-courses-cell .tmm-badge {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 9px !important;
    padding: 2px 7px !important;
}

/* ========== School ========== */
.tmm-school {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 5px;
    background: #f0f4fa;
    color: #173e72;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

/* ========== Avatar ========== */
#smm-table .tmm-avatar {
    width: 34px !important;
    height: 34px !important;
    font-size: 13px !important;
}

/* ========== Last Access ========== */
#smm-table tbody td:nth-child(10) {
    font-size: 11px;
    line-height: 1.3;
}
#smm-table tbody td:nth-child(10) .tmm-username {
    font-size: 10px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ========== Status badge ========== */
#smm-table .tmm-status {
    font-size: 9px !important;
    padding: 3px 8px !important;
}

/* ============================================================
   ACTION COLUMN — MAIN KEY (overflow visible!)
   ============================================================ */
#smm-table thead th:last-child,
#smm-table tbody td:last-child,
#tmm-table thead th:last-child,
#tmm-table tbody td:last-child {
    width: 55px !important;
    min-width: 55px !important;
    max-width: 55px !important;
    text-align: center !important;
    padding: 6px 4px !important;
    position: relative !important;
    z-index: 10 !important;
}

/* ============================================================
   THREE-DOT BUTTON
   ============================================================ */
.tmm-action-menu {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    z-index: 100 !important;
}

.tmm-action-toggle {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    border: 1px solid #e2e7ed !important;
    background: #fff !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #4a5c75 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 auto !important;
    line-height: 1 !important;
    transition: all .15s ease !important;
    box-sizing: border-box !important;
    position: relative !important;
    z-index: 101 !important;
}

.tmm-action-toggle:hover {
    background: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
}

/* ============================================================
   ACTION DROPDOWN — FINAL FIX (position fixed)
   ============================================================ */
.tmm-action-dropdown {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: auto !important;
    min-width: 200px !important;
    max-width: 260px !important;
    background: #fff !important;
    border: 1px solid #e2e7ed !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 30px rgba(16,24,40,.20) !important;
    padding: 6px !important;
    text-align: left !important;
    z-index: 9999999 !important;
    display: none;
}

.tmm-action-dropdown.tmm-dd-open {
    display: block !important;
}

.tmm-action-dropdown a {
    display: block !important;
    padding: 10px 14px !important;
    border-radius: 6px !important;
    color: #173e72 !important;
    font-size: 13px !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    transition: background .15s ease !important;
}

.tmm-action-dropdown a:hover {
    background: #f1f5f9 !important;
}

.tmm-action-dropdown a.tmm-action-danger  { color: #d92332 !important; }
.tmm-action-dropdown a.tmm-action-success { color: #2a9a61 !important; }

/* ============================================================
   WRAPPER — MUST BE OVERFLOW VISIBLE
   ============================================================ */
.tmm-table-wrap {
    overflow-x: auto !important;
    overflow-y: visible !important;
    position: relative !important;
    z-index: 1 !important;
}

.tmm-card {
    overflow: visible !important;
}

/* ============================================================
   PROGRESS ACTIVITY MODAL
   ============================================================ */
.smm-modal-overlay {
    position: fixed; inset: 0;
    background: rgba(15, 23, 42, 0.6);
    z-index: 99999;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
}
.smm-modal {
    background: #fff; border-radius: 12px;
    width: 100%; max-width: 640px; max-height: 90vh;
    overflow: hidden; display: flex; flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,.35);
}
.smm-modal-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 18px 22px; border-bottom: 1px solid #e7ebf0;
}
.smm-modal-title { margin: 0; font-size: 17px; font-weight: 700; color: #102c5c; }
.smm-modal-close {
    width: 34px; height: 34px; border: none; background: transparent;
    color: #64748b; font-size: 24px; line-height: 1; cursor: pointer;
    border-radius: 6px;
}
.smm-modal-close:hover { background: #f1f5f9; }
.smm-modal-body { padding: 20px 22px; overflow-y: auto; flex: 1; }
.smm-modal-user {
    background: linear-gradient(135deg, #062b67, #0b56a8);
    color: #fff; padding: 16px 20px; border-radius: 10px; margin-bottom: 18px;
}
.smm-modal-user-name { font-size: 16px; font-weight: 700; margin-bottom: 2px; }
.smm-modal-user-email { font-size: 12px; opacity: .85; }
.smm-modal-summary {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 10px; margin-bottom: 20px;
}
.smm-modal-summary-card {
    background: #f8fafc; border: 1px solid #e2e7ed;
    border-radius: 8px; padding: 12px; text-align: center;
}
.smm-modal-summary-value { font-size: 22px; font-weight: 800; color: #102c5c; line-height: 1; }
.smm-modal-summary-label {
    font-size: 10px; font-weight: 700; color: #718096;
    text-transform: uppercase; margin-top: 6px;
}
.smm-modal-section { margin-bottom: 20px; }
.smm-modal-section-title {
    margin: 0 0 10px; font-size: 13px; font-weight: 700; color: #102c5c;
    padding-bottom: 8px; border-bottom: 2px solid #e7ebf0;
}
.smm-teacher-row {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; background: #fafcff; border-radius: 8px;
    margin-bottom: 6px; border-left: 3px solid #cbd5e1;
}
.smm-teacher-row.smm-teacher-pending { background: #fffbf3; border-left-color: #f5a400; }
.smm-teacher-row.smm-teacher-active  { border-left-color: #2a9a61; }
.smm-teacher-avatar, .smm-teacher-avatar-fallback {
    width: 32px; height: 32px; min-width: 32px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: #eaf2ff; color: #0756a8; font-weight: 700; font-size: 13px;
}
.smm-teacher-info { flex: 1; min-width: 0; }
.smm-teacher-name { font-size: 13px; font-weight: 700; color: #102c5c; }
.smm-teacher-course { font-size: 11px; color: #718096; margin-top: 2px; }
.smm-teacher-badge {
    font-size: 10px; font-weight: 700; padding: 4px 10px;
    border-radius: 20px; white-space: nowrap;
}
.smm-teacher-badge-pending { background: #fde8e8; color: #d92332; }
.smm-teacher-badge-active  { background: #e9f7ef; color: #2a9a61; }
.smm-item-row {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; border-bottom: 1px solid #f1f5f9;
}
.smm-item-row:last-child { border-bottom: none; }
.smm-item-icon {
    width: 32px; height: 32px; min-width: 32px; border-radius: 6px;
    background: #eff6ff; display: flex; align-items: center;
    justify-content: center; font-size: 16px;
}
.smm-item-info { flex: 1; min-width: 0; }
.smm-item-name { font-size: 13px; font-weight: 600; color: #102c5c; }
.smm-item-course { font-size: 11px; color: #718096; margin-top: 2px; }
.smm-item-link {
    padding: 5px 12px; background: #edf5ff;
    color: #1265c3 !important; font-size: 11px; font-weight: 700;
    border-radius: 6px; text-decoration: none !important; white-space: nowrap;
}
.smm-item-link:hover { background: #2563eb; color: #fff !important; }
.smm-modal-empty {
    text-align: center; padding: 40px 20px;
    color: #2a9a61; font-size: 13px; font-weight: 600;
}

@media (max-width: 600px) {
    .smm-modal { max-width: 100%; }
    .smm-modal-summary { grid-template-columns: 1fr; }
    .smm-modal-body { padding: 16px; }
}

/* ============================================================
   ABSOLUTE FIX: ONLY the Action column has overflow visible
   ============================================================ */
html body #smm-table tbody td:last-child,
html body #tmm-table tbody td:last-child,
table#smm-table td:last-child,
table#tmm-table td:last-child {
    overflow: visible !important;
    position: relative !important;
    z-index: 10 !important;
}

/* Table wrap: must be visible for dropdown */
html body .tmm-table-wrap {
    overflow-x: auto !important;
    overflow-y: visible !important;
}

/* ============================================================
   FORCE ELLIPSIS - Put at the very bottom, wins over everything
   ============================================================ */
#smm-table {
    table-layout: fixed !important;
    width: 100% !important;
}

#smm-table tbody td:nth-child(3),
#smm-table tbody td:nth-child(4),
#smm-table tbody td:nth-child(5),
#smm-table tbody td:nth-child(6),
#smm-table tbody td:nth-child(7) {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    max-width: 0 !important;
}

/* Action column — exception */
#smm-table tbody td:last-child,
#smm-table thead th:last-child {
    overflow: visible !important;
    max-width: none !important;
}

/* ============================================================
   CURRICULUM & COURSE DETAIL MODAL
   ============================================================ */
.smm-detail-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid #f1f5f9;
    transition: background .15s ease;
}
.smm-detail-row:last-child { border-bottom: none; }
.smm-detail-row:hover { background: #f8fafc; }

.smm-detail-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 8px;
    background: #eff6ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.smm-detail-info {
    flex: 1;
    min-width: 0;
}

.smm-detail-name {
    font-size: 13px;
    font-weight: 700;
    color: #102c5c;
    line-height: 1.35;
    margin-bottom: 2px;
}

.smm-detail-meta {
    font-size: 11px;
    color: #718096;
    line-height: 1.4;
}

.smm-detail-progress {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}

.smm-detail-progress .smm-progress-track {
    flex: 1;
    height: 6px;
    max-width: 160px;
}

.smm-detail-progress .smm-progress-label {
    font-size: 10px;
    min-width: 30px;
}

.smm-detail-link {
    padding: 6px 12px;
    background: #edf5ff;
    color: #1265c3 !important;
    font-size: 11px;
    font-weight: 700;
    border-radius: 6px;
    text-decoration: none !important;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all .15s ease;
}
.smm-detail-link:hover {
    background: #2563eb;
    color: #fff !important;
}

/* Hover effect for clickable badge */
.smm-kurikulum-clickable,
.smm-course-clickable {
    transition: all .15s ease;
}
.smm-kurikulum-clickable:hover,
.smm-course-clickable:hover {
    opacity: 0.75;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(37,99,235,.25);
}

/* ============================================================
   CURRICULUM & COURSE DETAIL MODAL - v2
   Design: colored header + card grid
   ============================================================ */

/* Modal box */
.smm-detail-modal-box {
    background: #fff !important;
    border-radius: 16px !important;
    width: 100% !important;
    max-width: 640px !important;
    max-height: 88vh !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    box-shadow: 0 25px 60px -12px rgba(15, 23, 42, 0.4) !important;
    animation: smmModalIn .22s cubic-bezier(.4,0,.2,1);
}

@keyframes smmModalIn {
    from { transform: translateY(20px) scale(.97); opacity: 0; }
    to   { transform: translateY(0) scale(1); opacity: 1; }
}

/* Header */
.smm-detail-header {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    padding: 20px 22px !important;
    color: #fff !important;
    position: relative !important;
}

.smm-detail-header.blue {
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
}
.smm-detail-header.green {
    background: linear-gradient(135deg, #15803d 0%, #22c55e 100%);
}

.smm-detail-header-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.smm-detail-header-text {
    flex: 1;
    min-width: 0;
}

.smm-detail-header-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 3px;
    color: #fff;
}

.smm-detail-header-subtitle {
    font-size: 12px;
    opacity: 0.85;
    line-height: 1.3;
    color: #fff;
}

.smm-detail-close {
    width: 34px;
    height: 34px;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 22px;
    line-height: 1;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s ease;
    flex-shrink: 0;
}
.smm-detail-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Body */
.smm-detail-body {
    padding: 16px;
    overflow-y: auto;
    flex: 1;
    background: #f8fafc;
}

/* Grid */
.smm-detail-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Card */
.smm-detail-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid #e2e7ed;
    border-radius: 10px;
    transition: all .15s ease;
}

.smm-detail-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
    transform: translateY(-1px);
}

.smm-detail-card-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 10px;
    background: #eff6ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.smm-detail-card-body {
    flex: 1;
    min-width: 0;
}

.smm-detail-card-name {
    font-size: 13px;
    font-weight: 700;
    color: #102c5c;
    line-height: 1.35;
    margin-bottom: 3px;
    word-break: break-word;
}

.smm-detail-card-meta {
    font-size: 11px;
    color: #718096;
    line-height: 1.4;
}

.smm-detail-card-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: #eff6ff;
    color: #2563eb !important;
    font-size: 11px;
    font-weight: 700;
    border-radius: 6px;
    text-decoration: none !important;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all .15s ease;
}
.smm-detail-card-link:hover {
    background: #2563eb;
    color: #fff !important;
}

/* Progress bar inside card */
.smm-detail-progress {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}
.smm-detail-progress .smm-progress-track {
    flex: 1;
    height: 6px;
    max-width: 180px;
}
.smm-detail-progress .smm-progress-label {
    font-size: 10px;
    min-width: 30px;
}

/* Empty state */
.smm-detail-empty {
    padding: 50px 20px;
    text-align: center;
    color: #94a3b8;
}
.smm-detail-empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}
.smm-detail-empty-text {
    font-size: 13px;
    font-weight: 600;
}

/* Mobile */
@media (max-width: 600px) {
    .smm-detail-modal-box {
        max-width: 100% !important;
        max-height: 92vh !important;
        border-radius: 14px !important;
    }
    .smm-detail-header {
        padding: 16px 18px !important;
    }
    .smm-detail-header-icon {
        width: 42px;
        height: 42px;
        min-width: 42px;
        font-size: 20px;
    }
    .smm-detail-header-title {
        font-size: 16px;
    }
    .smm-detail-body {
        padding: 12px;
    }
    .smm-detail-card {
        padding: 10px 12px;
        gap: 10px;
    }
    .smm-detail-card-icon {
        width: 36px;
        height: 36px;
        min-width: 36px;
        font-size: 18px;
    }
    .smm-detail-card-name {
        font-size: 12px;
    }
    .smm-detail-card-link {
        padding: 5px 10px;
        font-size: 10px;
    }
}


/* ============================================================
   TRUNCATE HELPER - MOST POWERFUL for ellipsis in tables
   ============================================================ */
.smm-truncate {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
}

/* Make sure the email td doesn't force width */
#smm-table tbody td:nth-child(4) {
    max-width: 0 !important;
    width: 130px !important;
    overflow: hidden !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
    font-size: 11px !important;        /* ⬅️ ADDED: smaller font */
    color: #4a5c75 !important;         /* ⬅️ ADDED: soft gray color */
}

/* ⬅️ ADDED: smaller font for the truncate div in the email column */
#smm-table tbody td:nth-child(4) .smm-truncate {
    font-size: 11px !important;
    color: #4a5c75 !important;
}

/* ============================================================
   FINAL FIX: Force the email td to be narrow (MUST be at the bottom)
   ============================================================ */
table#smm-table tbody tr td:nth-child(4),
#smm-table tbody td:nth-child(4),
html body #smm-table tbody td:nth-child(4) {
    width: 130px !important;
    min-width: 130px !important;
    max-width: 130px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
    box-sizing: border-box !important;
    table-layout: fixed !important;
}

/* Force the div inside too */
table#smm-table tbody tr td:nth-child(4) .smm-truncate,
#smm-table tbody td:nth-child(4) .smm-truncate,
html body #smm-table tbody td:nth-child(4) .smm-truncate {
    display: block !important;
    width: 100% !important;
    max-width: 114px !important;   /* 130 - 16 (padding) */
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-size: 11px !important;
    color: #4a5c75 !important;
}

/* ============================================================
   FILTER TOOLBAR - 1 ROW
   ============================================================ */
.tmm-toolbar {
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    padding: 14px 18px !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
}

/* Search field */
.tmm-toolbar .tmm-search {
    flex: 1 1 220px !important;
    min-width: 180px !important;
    max-width: 280px !important;
}

/* All dropdowns */
.tmm-toolbar .tmm-select {
    flex: 0 0 auto !important;
    min-width: 130px !important;
    max-width: 160px !important;
    height: 38px !important;
}

/* Toolbar spacer */
.tmm-toolbar .tmm-toolbar-spacer {
    flex: 1 1 auto !important;
    min-width: 0 !important;
}

/* Refresh & Download buttons */
.tmm-toolbar .tmm-btn {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
}

/* Thin horizontal scrollbar */
.tmm-toolbar::-webkit-scrollbar {
    height: 6px;
}
.tmm-toolbar::-webkit-scrollbar-track {
    background: transparent;
}
.tmm-toolbar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

/* Responsive: on small screens allow wrapping */
@media (max-width: 1200px) {
    .tmm-toolbar {
        flex-wrap: wrap !important;
        overflow-x: visible !important;
    }
}


/* ============================================================
   TMM TABLE — FIX LAYOUT (12 columns) 
   Tambahan untuk Teacher Management
   ============================================================ */

#tmm-table {
    table-layout: fixed !important;
    width: 100% !important;
    min-width: 1200px !important;
    border-collapse: collapse !important;
    position: relative;
    z-index: 1;
}

#tmm-table thead th {
    vertical-align: middle;
    white-space: nowrap;
    padding: 10px 8px !important;
    font-size: 11px !important;
    overflow: hidden;
    text-overflow: ellipsis;
    background: #0A2964;
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .3px;
    text-align: left;
}

#tmm-table tbody td {
    vertical-align: middle;
    padding: 8px 8px !important;
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.3;
    color: #304664;
    border-bottom: 1px solid #edf0f4;
}

#tmm-table tbody td:last-child {
    overflow: visible !important;
}

#tmm-table tbody tr:hover { background: #f8fafc; }

/* ========== TMM Column widths (12 kolom) ========== */
#tmm-table thead th:nth-child(1)  { width: 40px  !important; }  /* # */
#tmm-table thead th:nth-child(2)  { width: 55px  !important; }  /* Foto */
#tmm-table thead th:nth-child(3)  { width: 150px !important; }  /* Nama Guru */
#tmm-table thead th:nth-child(4)  { width: 180px !important; }  /* Email */
#tmm-table thead th:nth-child(5)  { width: 120px !important; }  /* Role */
#tmm-table thead th:nth-child(6)  { width: 130px !important; }  /* Kurikulum */
#tmm-table thead th:nth-child(7)  { width: 70px  !important; }  /* Course */
#tmm-table thead th:nth-child(8)  { width: 110px !important; }  /* Progress */
#tmm-table thead th:nth-child(9)  { width: 130px !important; }  /* Penilaian */
#tmm-table thead th:nth-child(10) { width: 130px !important; }  /* Last Access */
#tmm-table thead th:nth-child(11) { width: 90px  !important; }  /* Status */
#tmm-table thead th:nth-child(12) { width: 60px  !important; }  /* Aksi */

/* Email column truncate */
#tmm-table tbody td:nth-child(4) {
    width: 180px !important;
    min-width: 180px !important;
    max-width: 180px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-size: 11px !important;
    color: #4a5c75 !important;
}

/* Nama & Username truncate */
#tmm-table tbody td:nth-child(3) .tmm-name,
#tmm-table tbody td:nth-child(3) .tmm-username {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    display: block !important;
    max-width: 150px !important;
}

/* Avatar TMM */
#tmm-table .tmm-avatar {
    width: 34px !important;
    height: 34px !important;
    font-size: 13px !important;
}

/* Status badge TMM */
#tmm-table .tmm-status {
    font-size: 9px !important;
    padding: 3px 8px !important;
}

/* ========== TMM ACTION COLUMN (overflow visible) ========== */
#tmm-table thead th:last-child,
#tmm-table tbody td:last-child {
    width: 60px !important;
    min-width: 60px !important;
    max-width: 60px !important;
    text-align: center !important;
    padding: 6px 4px !important;
    position: relative !important;
    z-index: 10 !important;
    overflow: visible !important;
}

/* Pastikan wrap TMM overflow-y visible */
.tmm-table-wrap {
    overflow-x: auto !important;
    overflow-y: visible !important;  /* WAJIB visible */
    position: relative !important;
}

.tmm-card {
    overflow: visible !important;
}

/* Dropdown aksi — absolute + z-index tinggi */
.tmm-action-menu {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 100 !important;
}