/* Haykalf.s */
/* Tempat custom style css */

/* Styling utama untuk seluruh halaman */
body {
    font-family: 'Poppins', sans-serif; /* Font dari Google Fonts */
    background-color: #f0f2f5; /* Warna latar belakang abu-abu terang */
    color: #333; /* Warna teks utama */
}

/* Branding teks di navbar */
.navbar-brand {
    font-weight: 700;
}

/* Card profil mahasiswa */
.profile-card {
    background: linear-gradient(135deg, #007bff, #0056b3); /* Gradasi biru */
    color: white; /* Teks putih */
    border-radius: 1rem; /* Sudut membulat */
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1); /* Bayangan */
    transition: transform 0.3s ease; /* Animasi hover */
}

/* Efek hover pada profile-card */
.profile-card:hover {
    transform: translateY(-5px);
}

/* Foto profil bulat */
.profile-img {
    width: 120px;
    height: 120px;
    border-radius: 50%; /* Bulat sempurna */
    border: 4px solid rgba(255, 255, 255, 0.5); /* Bingkai transparan */
    object-fit: cover; /* Supaya gambar tidak melar */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Card untuk mata kuliah */
.course-card {
    background-color: #ffffff;
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
}

/* Efek hover course-card */
.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* Header untuk course-card */
.course-header {
    cursor: pointer; /* Bisa diklik */
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

/* Judul di header course */
.course-header h5 {
    margin-bottom: 0;
    font-weight: 600;
    color: #0056b3;
}

/* Isi detail course */
.course-body {
    padding: 0 1.5rem 1.5rem 1.5rem;
    font-size: 0.95rem;
    line-height: 1.7;
}

/* Badge untuk SKS */
.sks-badge {
    font-weight: 600;
    font-size: 0.9rem;
}

/* Icon di dalam card */
.card-icon {
    font-size: 1.5rem;
    color: #007bff;
    margin-right: 1rem;
}

/* Judul section */
.section-title {
    font-weight: 700;
    color: #343a40;
    margin-bottom: 2rem;
    text-align: center;
}

/* Header utama navbar */
.main-header {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    padding: 1.5rem 1rem;
    text-align: center;
}

/* Teks judul di navbar */
.navbar-brand-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: 1px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
    position: relative; /* TAMBAHKAN INI */
    display: inline-block; /* Tambahkan ini agar posisi relatif bekerja dengan baik */
}

/* Container jam & tanggal */
.datetime-container {
    font-size: 0.95rem;
    opacity: 0.85;
    margin-top: 0.5rem;
}

/* Footer halaman */
.footer {
    background-color: #343a40;
    color: white;
    padding: 1.5rem 0;
    text-align: center;
    margin-top: 3rem;
    font-size: 0.9rem;
}

/* Warna custom tambahan */
.bg-custom-purple {
    background-color: #6f42c1;
    color: white;
}

.bg-custom-secondary {
    background-color: #c82333; 
    color: white;
}

/* Item detail di dalam course */
.course-detail-item {
    margin-bottom: 0.3rem;
}

/* Course card aktif */
.course-card.course-active {
    border-left: 5px solid #fd7e14; /* Garis oranye di kiri */
    background-color: #fffaf5; /* Latar belakang krem */
    box-shadow: 0 8px 25px rgba(253, 126, 20, 0.2);
    transform: translateY(-5px);
}

/* Icon di navbar */
.navbar-brand-title i {
    margin-right: 0.75rem;
    vertical-align: -2px;
}

/* ======================================================= */
/* DESAIN FINAL v2: Tabel Hybrid (Rapat di PC, Card di HP) */
/* ======================================================= */

/* --- (1) Style untuk Desktop & Tampilan Normal --- */
.custom-schedule-table {
    width: 100%;
    border-collapse: collapse;
}

.custom-schedule-table th,
.custom-schedule-table td {
    padding: 0.5rem 0.4rem; /* Padding super rapat */
    font-size: 0.8rem;      /* Font kecil tapi masih terbaca */
    vertical-align: middle;
}

.custom-schedule-table th {
    background-color: #f8f9fa;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.custom-schedule-table tbody tr {
    border-bottom: 1px solid #f0f0f0; /* Garis pemisah super halus */
}

.custom-schedule-table tbody tr:last-of-type {
    border-bottom: 2px solid #e0e0e0;
}


/* --- (2) Style Ajaib untuk HP (Layar di bawah 768px) --- */
@media (max-width: 768px) {
    .custom-schedule-table thead {
        /* Sembunyikan header tabel di HP, karena info sudah ada di tiap baris */
        display: none;
    }

    .custom-schedule-table,
    .custom-schedule-table tbody,
    .custom-schedule-table tr,
    .custom-schedule-table td {
        /* Ubah semua elemen tabel menjadi block agar bisa diatur seperti card */
        display: block;
        width: 100%;
    }

    .custom-schedule-table tr {
        /* Setiap baris sekarang menjadi sebuah "card" */
        margin-bottom: 1rem;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        overflow: hidden; /* Agar sudutnya rapi */
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    }

    .custom-schedule-table td {
        /* Atur tata letak di dalam card */
        text-align: right; /* Data di kanan */
        padding-left: 50%; /* Beri ruang untuk label di kiri */
        position: relative; /* Diperlukan untuk posisi label */
        border: none;
        border-bottom: 1px solid #f0f0f0;
    }

    .custom-schedule-table td:last-child {
        border-bottom: none;
    }

    .custom-schedule-table td::before {
        /* Ini "sihir"-nya: tampilkan isi data-label sebagai judul */
        content: attr(data-label); /* Ambil teks dari atribut data-label */
        position: absolute;
        left: 0.75rem; /* Posisi label di kiri */
        width: 45%;
        padding-right: 1rem;
        text-align: left; /* Label rata kiri */
        font-weight: bold;
        color: #333;
    }

    /* ======================================================= */
    /* PERBAIKAN: Mode Gelap untuk Tampilan Card di HP         */
    /* ======================================================= */
    body.dark-mode .custom-schedule-table tr {
        /* Warna latar belakang dan border card di mode gelap */
        background-color: #1F2937;
        border: 1px solid #374151;
    }

    body.dark-mode .custom-schedule-table td {
        /* Warna border pemisah antar baris di dalam card */
        border-bottom: 1px solid #374151;
    }

    body.dark-mode .custom-schedule-table td:last-child {
        border-bottom: none;
    }

    body.dark-mode .custom-schedule-table td::before {
        /* Warna teks untuk label (Hari, Pukul, dll) */
        color: #9CA3AF;
    }
}

/* --- WARNA-WARNA UNTUK MODE GELAP --- */
body.dark-mode {
    background-color: #121212;
    color: #e0e0e0;
}

/* Header & Footer */
body.dark-mode .main-header {
    background: linear-gradient(135deg, #1F2937, #111827);
    color: #f9fafb;
}
body.dark-mode .footer {
    background-color: #111827;
    color: #9CA3AF;
}

/* Profile Card */
body.dark-mode .profile-card {
    background: linear-gradient(135deg, #1F2937, #2c3e50);
    border: 1px solid #374151;
}
body.dark-mode .profile-card hr {
    border-color: rgba(255, 255, 255, 0.2);
}

/* Section Title */
body.dark-mode .section-title {
    color: #f0f2f5;
}

/* Course Card */
body.dark-mode .course-card {
    background-color: #1F2937;
    border: 1px solid #374151;
}
body.dark-mode .course-card h5 {
    color: #93c5fd; /* Biru terang */
}
body.dark-mode .course-card small.text-muted {
    color: #9CA3AF !important;
}

/* Tabel Jadwal */
/* Tabel Jadwal (Versi Perbaikan) */
body.dark-mode .custom-schedule-table th {
    background-color: #111827 !important; /* !important untuk memaksa override */
    color: #D1D5DB;
    border-bottom: 2px solid #374151;
}

body.dark-mode .custom-schedule-table td {
    background-color: #1F2937; /* INI YANG TERLEWAT */
    color: #D1D5DB;
}

body.dark-mode .custom-schedule-table tbody tr {
    border-bottom: 1px solid #374151;
}

body.dark-mode .custom-schedule-table tbody tr:last-of-type {
    border-bottom: 2px solid #4B5563;
}

body.dark-mode .custom-schedule-table tbody tr:hover td { /* Targetkan td saat hover */
    background-color: #374151;
}

body.dark-mode .custom-schedule-table small.text-muted {
    color: #9CA3AF !important;
}
body.dark-mode .custom-schedule-table tbody tr {
    border-bottom: 1px solid #374151;
}
body.dark-mode .custom-schedule-table tbody tr:last-of-type {
    border-bottom: 2px solid #4B5563;
}
body.dark-mode .custom-schedule-table tbody tr:hover {
    background-color: #374151;
}
body.dark-mode .custom-schedule-table small.text-muted {
    color: #9CA3AF !important;
}
/* ======================================================= */
/* Utility Class untuk Aksesibilitas                     */
/* ======================================================= */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
/* ======================================================= */
/* STYLE UNTUK IKON TEMA DI SAMPING JUDUL                  */
/* ======================================================= */
.theme-icon-container {
    position: absolute;          /* Posisi absolut relatif terhadap judul H1 */
    left: 100%;                  /* Mulai dari ujung kanan judul */
    margin-left: 15px;           /* Beri jarak 15px dari judul */
    top: 50%;                    /* Posisikan di tengah secara vertikal */
    transform: translateY(-50%); /* Koreksi posisi vertikal agar pas di tengah */
    width: 24px;
    height: 24px;
    cursor: pointer;
}

.theme-icon {
    position: absolute; /* Ikon saling menumpuk */
    top: 0;
    left: 0;
    font-size: 22px;
    color: white;
    opacity: 0; /* Sembunyikan semua ikon secara default */
    transform: scale(0.8);
    transition: opacity 0.4s ease, transform 0.4s ease; /* Efek transisi halus */
}

/* Tampilkan ikon yang memiliki class 'active' */
.theme-icon.active {
    opacity: 1;
    transform: scale(1);
}
/* Tempat custom style css */
/* Haykalf.s */