* {
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
    font-size: 14px;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.page {
    overflow-x: hidden;
}

.page-wrapper {
    overflow-x: hidden;
}

@media (min-width: 768px) {
    body {
        font-size: 16px;
    }
}

.page-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 1rem 0;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .page-header {
        padding: 1.5rem 0;
        margin-bottom: 2rem;
    }
}

.page-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
    margin: 0;
    line-height: 1.3;
}

@media (min-width: 768px) {
    .page-title {
        font-size: 1.75rem;
    }
}

@media (min-width: 992px) {
    .page-title {
        font-size: 2rem;
    }
}

.card {
    background-color: #fff;
    border: 1px solid #e9ecef;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.card-header {
    padding: 15px 20px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    border-radius: 8px 8px 0 0;
}

.card-body {
    padding: 15px 20px;
}

@media (min-width: 768px) {
    .card-header, .card-body {
        padding: 20px 25px;
    }
}

@media (min-width: 992px) {
    .card-header, .card-body {
        padding: 25px 30px;
    }
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin: 0;
}

@media (min-width: 768px) {
    .card-title {
        font-size: 1.125rem;
    }
}

.card-footer {
    padding: 15px 20px;
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
    border-radius: 0 0 8px 8px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

@media (min-width: 576px) {
    .card-footer {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 20px 25px;
    }
}

.table-responsive {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
    margin-top: 15px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    background-color: #fff;
    /* 🔧 CRITICAL: Prevent table from causing page overflow */
    contain: layout style !important;
}

/* 🔧 CRITICAL: Ensure table content doesn't break layout */
.table {
    width: 100% !important;
    max-width: none !important;
    margin-bottom: 0 !important;
}

/* 🔧 CRITICAL: Prevent long content from breaking layout */
.table td, .table th {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 200px !important;
}

.table td:first-child, .table th:first-child {
    max-width: 50px !important; /* Number column */
}

.table td:last-child, .table th:last-child {
    max-width: 120px !important; /* Action column */
    white-space: nowrap !important;
}

@media (min-width: 768px) {
    .table-responsive {
        margin-top: 20px;
        overflow-x: visible;
    }
}

table {
    width: 100%;
    min-width: 100%;
    border-collapse: collapse;
    background-color: #fff;
}

th, td {
    border: 1px solid #dee2e6;
    padding: 8px 12px;
    text-align: left;
    vertical-align: top;
    font-size: 0.875rem;
    word-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
}

@media (min-width: 768px) {
    th, td {
        padding: 12px 15px;
        font-size: 0.9rem;
        vertical-align: middle;
    }
}

@media (min-width: 992px) {
    th, td {
        padding: 15px 18px;
        font-size: 1rem;
    }
}

th {
    background-color: #206bc4;
    color: white;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
    white-space: nowrap;
}

tr:nth-child(even) {
    background-color: #f8f9fa;
}

tr:hover {
    background-color: #e3f2fd;
    transition: background-color 0.2s ease;
}

@media (max-width: 767.98px) {
    .table-responsive {
        overflow-x: visible;
        border-radius: 6px;
    }
    
    table {
        font-size: 0.75rem;
        min-width: 100%;
    }
    
    th, td {
        padding: 6px 8px;
        font-size: 0.75rem;
        line-height: 1.3;
    }
    
    th {
        font-size: 0.7rem;
        padding: 8px 6px;
        white-space: normal;
        text-align: center;
    }
    
    .mobile-hide {
        display: none !important;
    }
    
    .mobile-priority-1 {
        width: 30% !important;
        max-width: 120px;
    }
    
    .mobile-priority-2 {
        width: 45% !important;
        max-width: 200px;
    }
    
    .mobile-priority-3 {
        width: 15% !important;
        max-width: 80px;
    }
    
    .mobile-actions {
        width: 10% !important;
        max-width: 60px;
    }
    
    .mobile-compact-text {
        font-size: 0.7rem !important;
        line-height: 1.2 !important;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }
    
    .mobile-jurusan {
        font-size: 0.7rem !important;
        font-weight: 500;
        color: #206bc4;
        line-height: 1.2;
        max-height: 4em;
        overflow: hidden;
        word-wrap: break-word;
        word-break: break-word;
        hyphens: auto;
        text-align: left;
        min-width: 150px !important;
    }
    
    .mobile-contact {
        font-size: 0.65rem !important;
        color: #666;
        line-height: 1.1;
    }
    
    .btn-list {
        flex-direction: column;
        gap: 2px;
    }
    
    .btn-list .btn {
        padding: 3px 6px !important;
        font-size: 0.6rem !important;
        margin: 1px 0;
        width: 100%;
        min-height: 24px;
        border-radius: 3px;
    }
    
    .btn-list .btn .icon {
        width: 12px !important;
        height: 12px !important;
        margin-right: 2px;
    }
    
    .mobile-stack {
        display: flex;
        flex-direction: column;
        gap: 2px;
    }
    
    .mobile-label {
        font-size: 0.6rem;
        color: #666;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    .mobile-value {
        font-size: 0.7rem;
        color: #333;
        font-weight: 500;
    }
    
    .table-row-mobile {
        border-bottom: 2px solid #e9ecef !important;
    }
    
    .table-row-mobile:last-child {
        border-bottom: 1px solid #dee2e6 !important;
    }
}

@media (min-width: 768px) {
    .mobile-jurusan {
        font-size: 0.9rem;
        color: #333;
        line-height: 1.4;
        word-wrap: break-word;
        word-break: break-word;
        hyphens: auto;
        min-width: 300px;
        max-width: 500px;
    }
}

@media (min-width: 992px) {
    .mobile-jurusan {
        font-size: 0.95rem;
        min-width: 350px;
        max-width: 550px;
    }
}

@media (min-width: 1200px) {
    .mobile-jurusan {
        font-size: 1rem;
        min-width: 400px;
        max-width: 600px;
    }
}

.table {
    font-size: 0.875rem; /* Ukuran font standar Tabler */
    line-height: 1.5; /* Jarak antar baris standar */
}

.table th {
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.75rem 1rem; /* Padding standar Tabler */
    border-bottom: 2px solid #dee2e6;
    white-space: nowrap; /* Header tetap satu baris */
    vertical-align: middle;
}

.table td {
    font-size: 0.875rem;
    padding: 0.75rem 1rem; /* Padding standar Tabler */
    vertical-align: middle; /* Konten sel rata tengah vertikal */
    border-bottom: 1px solid #e9ecef; /* Garis antar baris lebih halus */
}

/* Styling untuk kolom spesifik */
.table td:nth-child(1) { /* Kolom # */
    width: 40px;
    text-align: center;
}
.table td:nth-child(2) { /* Kolom Nama Lengkap */
    min-width: 150px; /* Lebar minimal */
    max-width: 200px; /* Lebar maksimal sebelum wrapping */
    white-space: normal; /* Aktifkan text wrapping */
    word-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    line-height: 1.4; /* Sedikit lebih rapat untuk teks panjang */
}
.table td:nth-child(3) { /* Kolom Jurusan */
    min-width: 200px; /* Lebar minimal */
    max-width: 300px; /* Lebar maksimal sebelum wrapping */
    white-space: normal; /* Aktifkan text wrapping */
    word-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    line-height: 1.4; /* Sedikit lebih rapat untuk teks panjang */
}
.table td:nth-child(4) { /* Kolom Nomor HP */
    min-width: 110px;
    white-space: nowrap; /* Nomor HP biasanya pendek */
}
.table td:nth-child(5) { /* Kolom Status */
    min-width: 90px;
    text-align: center;
}
.table td:nth-child(6) { /* Kolom Aksi */
    min-width: 180px; /* Cukup untuk 3 tombol kecil */
    text-align: center;
    white-space: nowrap;
}

.btn-sm {
    padding: 0.25rem 0.5rem; /* Padding tombol standar */
    font-size: 0.75rem; /* Font tombol standar */
    border-radius: 0.25rem;
}

.btn-list .btn {
    margin-right: 0.25rem;
    margin-bottom: 0.25rem;
}
.btn-list .btn .icon { /* Ukuran icon pada tombol */
    width: 1rem;
    height: 1rem;
    margin-right: 0.25rem;
}

.badge {
    font-size: 0.75rem; /* Font badge standar */
    padding: 0.35em 0.65em; /* Padding badge standar */
    font-weight: 500;
}

@media (max-width: 991.98px) { /* Tablet dan di bawahnya */
    .table-responsive {
        overflow-x: auto; /* Scroll horizontal jika tabel terlalu lebar */
    }
    .table {
        min-width: 750px; /* Pastikan tabel punya lebar minimal sebelum scroll */
        font-size: 0.8rem; /* Sedikit lebih kecil di tablet */
    }
    .table th,
    .table td {
        padding: 0.6rem 0.8rem; /* Padding sedikit lebih kecil */
    }
    .table td:nth-child(2) { max-width: 180px; }
    .table td:nth-child(3) { max-width: 250px; }
}

@media (max-width: 767.98px) { /* Mobile */
    .table {
        font-size: 0.75rem; /* Lebih kecil lagi di mobile */
        min-width: 700px; /* Lebar minimal untuk mobile */
    }
    .table th,
    .table td {
        padding: 0.5rem 0.6rem; /* Padding lebih kecil di mobile */
    }
    .table td:nth-child(2) { max-width: 150px; } /* Nama di mobile */
    .table td:nth-child(3) { max-width: 200px; } /* Jurusan di mobile */
    .table td:nth-child(6) { min-width: auto; } /* Aksi di mobile, biarkan Tabler handle */

    .btn-list { /* Tombol aksi di mobile bisa stack vertikal jika perlu */
        flex-direction: row; /* Atau column jika mau stack */
        flex-wrap: nowrap;
    }
    .btn-list .btn {
        padding: 0.2rem 0.4rem;
        font-size: 0.7rem;
    }
    .btn-list .btn .icon {
        width: 0.8rem;
        height: 0.8rem;
        margin-right: 0.15rem;
    }
    .btn-list .btn span { /* Sembunyikan teks tombol di mobile jika terlalu sempit */
        /* display: none; */ /* Aktifkan jika mau icon saja */
    }
}

.form-hint {
    color: #6c757d;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.text-wrap { /* Kelas helper jika diperlukan, tapi td sudah diatur */
    white-space: normal !important;
    word-wrap: break-word !important;
    word-break: break-word !important;
    hyphens: auto !important;
}

/* ...existing code... */
