/* Import font moden */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&display=swap');

* {
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    /* Background cerah dengan tona putih-biru lembut */
    background-color: #f4f7f6;
    background-image: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px; 
}

.container, .card {
    /* Kad warna putih bersih */
    background: #ffffff;
    padding: 40px; 
    border-radius: 15px;
    width: 100%;
    max-width: 400px;
    text-align: center;
    /* Shadow lembut supaya nampak 'timbul' */
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid #e1e1e1;
}

h1, h2 {
    color: #003366; /* Biru Standard */
    margin-bottom: 25px;
    font-weight: 600;
}

input, select {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border-radius: 8px;
    border: 1px solid #ccc;
    background: #ffffff;
    font-family: inherit;
    transition: 0.3s;
}

input:focus, select:focus {
    outline: none;
    border-color: #003366; /* Biru bila klik */
    box-shadow: 0 0 5px rgba(0, 51, 102, 0.2);
}

button, .btn {
    width: 100%;
    padding: 14px;
    margin-top: 10px;
    border-radius: 8px;
    border: none;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    /* Warna Biru Utama */
    background-color: #003366;
    color: #ffffff;
    transition: 0.3s;
    text-decoration: none;
    display: inline-block;
}

button:hover, .btn:hover {
    /* Tukar ke Merah bila hover */
    background-color: #cc0000;
    transform: translateY(-2px);
}

.secondary {
    background: #eeeeee;
    color: #333;
}

.secondary:hover {
    background: #dddddd;
}

/* --- DASHBOARD STYLE --- */

.card.dashboard {
    max-width: 800px;
    width: 90%;
}

.info-box {
    background: #f9f9f9;
    border-left: 5px solid #ffcc00; /* Kuning Highlight */
    padding: 20px;
    margin: 20px 0;
    text-align: left;
    border-radius: 4px;
}

.action-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; 
    gap: 15px; 
    margin-top: 20px;
}

.action-card {
    background: #ffffff;
    border: 2px solid #f0f0f0;
    padding: 20px;
    border-radius: 12px;
    text-decoration: none;
    color: #003366;
    font-weight: 600;
    transition: 0.3s;
}

.action-card:hover {
    /* Highlight Kuning bila hover pada menu */
    border-color: #ffcc00;
    background: #fffef0;
    color: #cc0000; /* Tulisan jadi merah sikit */
}

.logout-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #cc0000; /* Merah untuk butang keluar */
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: bold;
}

@media (max-width: 600px) {
    .action-grid {
        grid-template-columns: 1fr; 
    }
}

/* --- Tambah ini di bahagian paling bawah style.css asal --- */

.login-logo {
    display: block;           /* Supaya dia jadi block element */
    margin-left: auto;        /* Auto margin kiri kanan = Center */
    margin-right: auto;       
    margin-bottom: 20px;      /* Jarak antara logo dan tajuk Login */
    width: 120px;             /* Ubah nombor ni untuk besarkan/kecilkan logo */
    height: auto;             /* Maintain aspect ratio gambar */
}

/* Pastikan text dalam kad center (kalau belum ada) */
.card {
    text-align: center;
}

/* --- Tambah di bahagian paling bawah style.css --- */

.system-name {
    font-size: 18px;       /* Saiz tulisan nama sistem */
    font-weight: bold;     /* Tulisan tebal */
    color: #333;           /* Warna gelap (standard) */
    margin-top: 5px;       /* Jarak sikit dari logo */
    margin-bottom: 20px;   /* Jarak dengan perkataan 'Login' */
    line-height: 1.4;      /* Jarak antara baris kalau nama panjang sangat */
    text-transform: uppercase; /* Pilihan: Tukar jadi huruf besar semua supaya nampak rasmi */
}

/* Pastikan logo ada jarak sikit dari tulisan sistem */
.login-logo {
    margin-bottom: 10px;   /* Ubah ni kalau nak rapat atau jauh lagi */
}

/* Styling untuk table */
.booking-table {
    width: 100%;
    border-collapse: collapse; /* Supaya border tidak double */
    margin: 20px 0;
}

/* Centrekan header (th) dan data (td) */
.booking-table th, 
.booking-table td {
    text-align: center;    /* Centrekan text */
    padding: 15px 20px;    /* Jarak atas-bawah (15px) dan kiri-kanan (20px) */
    border-bottom: 1px solid #eee; /* Garisan halus antara row */
}

/* Opsional: Tambah warna sikit pada header supaya nampak kemas */
.booking-table th {
    background-color: #f8f9fa;
    font-weight: bold;
}

/* --- Table Styling --- */
.booking-table, table {
    width: 100%;
    border-collapse: collapse; /* Hilangkan ruang antara border */
    margin: 20px 0;
    font-family: sans-serif;
}

/* Centrekan text dan bagi jarak (padding) setiap column */
.booking-table th, 
.booking-table td,
table th, 
table td {
    text-align: center;      /* Centrekan kandungan */
    padding: 15px 12px;      /* Jarak atas-bawah (15px) dan kiri-kanan (12px) */
    border-bottom: 1px solid #eeeeee; /* Garisan halus pemisah row */
}

/* Warna dan gaya untuk header table */
.booking-table th, 
table th {
    background-color: #f8f9fa;
    color: #333;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
}

/* Hover effect: row akan berubah warna bila mouse lalu */
.booking-table tr:hover, 
table tr:hover {
    background-color: #fcfcfc;
}

/* --- Status Badge Styling (Optional tapi cantik) --- */
.status, .badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    display: inline-block;
}

.status.approved { background: #e6fffa; color: #2d3748; border: 1px solid #38a169; }
.status.pending { background: #fffaf0; color: #2d3748; border: 1px solid #dd6b20; }
.status.rejected { background: #fff5f5; color: #2d3748; border: 1px solid #e53e3e; }

/* Styling untuk container Pending Request (Lecturer Dashboard) */
.pending-item {
    text-align: center;
    padding: 20px;
    background: #fdfdfd;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 15px;
}

/* --- 1. SETTING BODY & GAMBAR --- */
body {
    /* Letak URL gambar awak di sini */
    background-image: url('../images/background.jpg');
    
    /* Ini rahsia gambar nampak 'mahal' */
    background-size: cover;       /* Penuhkan skrin */
    background-position: center;  /* Centerkan gambar */
    background-attachment: fixed; /* Gambar STATIK, tak gerak bila scroll */
    background-repeat: no-repeat;
    
    min-height: 100vh;
    position: relative; /* Penting untuk overlay berfungsi */
    z-index: 0;
}

/* --- 2. OVERLAY GELAP (SAFETY LAYER) --- */
/* Ini yang buat tulisan/button awak timbul & tak tenggelam dalam gambar */
body::before {
    content: "";
    position: fixed;
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    
    /* Ubah angka 0.5 ni (0.1 - 0.9) untuk kawal kegelapan */
    background-color: rgba(0, 0, 0, 0.5); 
    
    z-index: -1; /* Pastikan dia duduk BELAKANG button/table */
}

/* Highlight untuk tajuk Pending Booking Requests */
.pending-title {
    display: inline-block;        /* Supaya ikut panjang teks */
    background-color: #fffae6;    /* Kuning lembut, friendly tapi menonjol */
    color: #d97706;               /* Warna teks oren gelap supaya kontras */
    padding: 8px 15px;            /* Ruang dalam tajuk */
    border-radius: 8px;           /* Bucu bulat */
    font-weight: 600;             /* Tegaskan teks */
    font-size: 1.2rem;            /* Saiz tajuk sedikit lebih besar */
    box-shadow: 0 3px 6px rgba(0,0,0,0.1); /* Bayang lembut */
    margin-bottom: 20px;          /* Jarak dengan content bawah */
}

/* Highlight untuk tajuk My Consultation Slots */
.consultation-title {
    display: inline-block;        /* Supaya ikut panjang teks */
    background-color: #e6f7ff;    /* Biru lembut – calm & professional */
    color: #0369a1;               /* Biru gelap supaya teks jelas */
    padding: 8px 15px;            /* Ruang dalam tajuk */
    border-radius: 8px;           /* Bucu bulat */
    font-weight: 600;             /* Tegaskan teks */
    font-size: 1.2rem;            /* Saiz tajuk lebih besar */
    box-shadow: 0 3px 6px rgba(0,0,0,0.1); /* Bayang lembut */
    margin-bottom: 20px;          /* Jarak dengan content bawah */
}

/* CSS Link di bawah button */
.login-link {
    text-align: center;
    margin-top: 15px;
    font-family: sans-serif;
    font-size: 14px;
}

.login-link a {
    color: #007bff; /* Warna biru standard */
    text-decoration: none;
    font-weight: bold;
}

.login-link a:hover {
    text-decoration: underline;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
    border: 1px solid #f5c6cb;
}