/* ============================================ */
/* RESET & BASE */
/* ============================================ */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body { 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
    background-color: #f4f7f6; 
    color: #333;
    line-height: 1.6;
}

.container { 
    width: 90%; 
    max-width: 1150px;
    margin: 30px auto; 
    background: #fff; 
    padding: 30px; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.1); 
    border-radius: 8px; 
}

h2 { 
    text-align: center; 
    color: #2c3e50; 
    margin-bottom: 20px;
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
}

h3 {
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 10px;
}

hr {
    border: 0;
    height: 1px;
    background: #ddd;
    margin: 20px 0;
}

/* ============================================ */
/* FORM */
/* ============================================ */
.form-group { 
    margin-bottom: 20px; 
}
.form-group label { 
    display: block; 
    margin-bottom: 8px; 
    font-weight: 600; 
    color: #555;
}
.form-group input[type="text"], 
.form-group input[type="password"], 
.form-group select,
.form-group input[type="file"] { 
    width: 100%; 
    padding: 12px; 
    border: 1px solid #ccc; 
    border-radius: 5px; 
    font-size: 14px;
    transition: border 0.3s;
}
.form-group input:focus, 
.form-group select:focus {
    border-color: #007bff;
    outline: none;
}

/* ============================================ */
/* BUTTON */
/* ============================================ */
.btn { 
    padding: 12px 20px; 
    background: #007bff; 
    color: #fff; 
    border: none; 
    border-radius: 5px; 
    cursor: pointer; 
    text-decoration: none; 
    display: inline-block;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.3s;
}
.btn:hover { background: #0056b3; }
.btn-danger { background: #dc3545; }
.btn-danger:hover { background: #c82333; }
.btn-success { background: #28a745; }
.btn-success:hover { background: #218838; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* ============================================ */
/* ALERT */
/* ============================================ */
.alert { 
    padding: 15px; 
    margin-bottom: 20px; 
    border-radius: 5px; 
    font-weight: 500;
}
.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-danger { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* ============================================ */
/* TABLE — DEFAULT (dipakai dashboard admin, verifikasi, dll) */
/* ============================================ */
table { 
    width: 100%; 
    border-collapse: collapse; 
    margin-top: 20px; 
    font-size: 14px;
}
table, th, td { 
    border: 1px solid #e0e0e0; 
}
th, td { 
    padding: 12px 15px; 
    text-align: left; 
}
th { 
    background-color: #007bff; 
    color: white; 
    font-weight: 600;
}
tr:nth-child(even) { background-color: #f9f9f9; }
tr:hover { background-color: #f1f1f1; }

/* ============================================ */
/* MENU GRID */
/* ============================================ */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}
.menu-card {
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    text-decoration: none;
    color: #333;
    transition: transform 0.2s, box-shadow 0.2s;
}
.menu-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-color: #007bff;
}
.menu-card h4 {
    margin-bottom: 10px;
    color: #007bff;
}

/* ============================================ */
/* PRINT */
/* ============================================ */
@media print {
    .btn, .no-print, a { display: none !important; }
    .container { box-shadow: none; width: 100%; margin: 0; padding: 0; }
    body { background: white; }
}

/* ============================================ */
/* ✅ SCOPED: KHUSUS HALAMAN CETAK LAPORAN */
/* Menggunakan #hasil-laporan agar TIDAK mengubah dashboard admin */
/* ============================================ */

/* Judul cetak laporan: rata kiri + border biru */
#hasil-laporan h3 {
    text-align: center;
    border: none;
    padding: 0;
}

#hasil-laporan > p {
    text-align: center;
}

/* Timpa tabel di dalam laporan */
#hasil-laporan table th,
#hasil-laporan table td {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
    border-top: none;
    border-left: none;
    border-right: none;
    font-size: 13px;
    vertical-align: top;
}

#hasil-laporan table th {
    background: #e3f2fd;
    color: #0d47a1;
    font-weight: 600;
    white-space: nowrap;
    font-size: 12px;
    text-transform: uppercase;
    text-align: center;
}

#hasil-laporan table {
    border: none;
}

/* Kolom pendek: center */
#hasil-laporan table td[data-label="No"],
#hasil-laporan table td[data-label="NIM"],
#hasil-laporan table td[data-label="Status"],
#hasil-laporan table td[data-label="Tanggal Daftar"] {
    text-align: center;
}

/* ============================================ */
/* ✅ SCOPED: KHUSUS HALAMAN CETAK LAPORAN — HP */
/* Tabel jadi VERTIKAL, VALUE RATA KANAN */
/* ============================================ */
@media (max-width: 768px) {

    /* Wrapper tabel di cetak laporan */
    #hasil-laporan .table-wrapper {
        overflow-x: visible;
        background: transparent;
        box-shadow: none;
        border-radius: 0;
    }

    #hasil-laporan table {
        min-width: 0;
        width: 100%;
        border: none;
    }

    #hasil-laporan table thead { display: none; }

    #hasil-laporan table,
    #hasil-laporan table tbody,
    #hasil-laporan table tr,
    #hasil-laporan table td {
        display: block;
        width: 100%;
    }

    #hasil-laporan table tr {
        background: #fff;
        border-radius: 8px;
        margin-bottom: 12px;
        padding: 12px 14px;
        box-shadow: 0 1px 4px rgba(0,0,0,0.06);
        border-left: 4px solid #1976d2;
        border-top: none;
        border-right: none;
        border-bottom: none;
    }

    /* ✅ PAKSA VALUE RATA KANAN */
    #hasil-laporan table td {
        border: none;
        padding: 6px 0;
        padding-left: 120px;
        min-height: 28px;
        font-size: 13px;
        border-bottom: 1px dashed #f0f0f0;
        text-align: right !important;
        text-align-last: right !important;
        word-spacing: normal !important;
        hyphens: none !important;
        position: relative;
    }

    #hasil-laporan table td:last-child {
        border-bottom: none;
    }

    /* Label di kiri */
    #hasil-laporan table td::before {
        content: attr(data-label);
        position: absolute;
        left: 0;
        top: 6px;
        width: 115px;
        font-weight: 600;
        color: #555;
        text-align: left !important;
        font-size: 12px;
    }

    /* Judul Skripsi rata KIRI (biar enak dibaca) */
    #hasil-laporan table td[data-label="Judul Skripsi"] {
        padding-left: 0;
        padding-top: 8px;
        margin-top: 4px;
        border-top: 1px solid #e3f2fd;
        text-align: left !important;
        text-align-last: left !important;
    }
    #hasil-laporan table td[data-label="Judul Skripsi"]::before {
        position: static;
        display: block;
        margin-bottom: 4px;
        width: auto;
    }
}

@media (max-width: 400px) {
    #hasil-laporan table td {
        padding-left: 100px;
        font-size: 12px;
    }
    #hasil-laporan table td::before {
        width: 95px;
        font-size: 11px;
    }
    #hasil-laporan table td[data-label="Judul Skripsi"] {
        padding-left: 0;
    }
}