body {
    font-family: 'Inter', sans-serif;
    transition: background-color 0.3s, color 0.3s;
}

/* Custom scrollbar for better aesthetics */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}
::-webkit-scrollbar-thumb {
    background: #a0aec0; /* gray-400 for light theme */
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: #718096; /* gray-500 for light theme */
}
.nav-item.active {
    background-color: #3b82f6;
    color: white;
}
.modal {
    transition: opacity 0.3s ease;
}
/* Style for read-only fields in modal */
.detail-view .form-input { display: none; }
.detail-view .form-value { display: block; }
.edit-view .form-input { display: block; }
.edit-view .form-value { display: none; }
.edit-view label { color: #9ca3af; }
.detail-view label { font-weight: 600; color: #9ca3af; }
.detail-view .form-value { color: #e5e7eb; margin-top: 0.25rem; }
.permission-group { background-color: #374151; padding: 1rem; border-radius: 0.5rem; }
.lms-content-section { display: none; }
.lms-content-section.active { display: block; }

/* THEME STYLES */
/* Dark Theme */
.theme-dark {
    --bg-primary: #111827; /* gray-900 */
    --bg-secondary: #1f2937; /* gray-800 */
    --bg-tertiary: #374151; /* gray-700 */
    --border-color: #4b5563; /* gray-600 */
    --text-primary: #f3f4f6; /* gray-100 */
    --text-secondary: #9ca3af; /* gray-400 */
}
/* Light Theme (Default) */
.theme-light {
    --bg-primary: #f3f4f6;    /* gray-100 */
    --bg-secondary: #ffffff;  /* white */
    --bg-tertiary: #e5e7eb;  /* gray-200 */
    --border-color: #d1d5db;  /* gray-300 */
    --text-primary: #1f2937;  /* gray-800 */
    --text-secondary: #6b7280;  /* gray-500 */
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
}
.bg-main { background-color: var(--bg-primary); }
.bg-sidebar { background-color: var(--bg-secondary); }
.bg-card { background-color: var(--bg-secondary); }
.bg-input { background-color: var(--bg-tertiary); }
.text-main { color: var(--text-primary); }
.text-subtle { color: var(--text-secondary); }
.border-main { border-color: var(--border-color); }
.hover\:bg-tertiary:hover { background-color: var(--bg-tertiary); }

/* Custom override for light theme with dark sidebar */
.theme-light #sidebar {
    background-color: #1f2937; /* gray-800 */
    color: #f3f4f6; /* gray-100 */
    border-color: #4b5563; /* gray-600 */
}
.theme-light #sidebar .text-main {
    color: #f3f4f6; /* gray-100 */
}
.theme-light #sidebar .text-subtle {
    color: #9ca3af; /* gray-400 */
}
.theme-light #sidebar .hover\:bg-tertiary:hover {
    background-color: #374151; /* gray-700 */
}
.theme-light #sidebar .nav-item.active {
    background-color: #3b82f6;
    color: white;
}
.theme-light #sidebar #logout-btn {
    color: #f87171; /* red-400 */
}
.theme-light #sidebar #logout-btn:hover {
    background-color: #ef4444; /* red-500 */
    color: white;
}
.theme-light #sidebar .nav-item {
    color: #f3f4f6; /* gray-100 */
}

@media print {
    body * {
        visibility: hidden;
    }
    #printable-transcript, #printable-transcript * {
        visibility: visible;
    }
    #printable-transcript {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }
    .no-print {
        display: none;
    }
}

#sidebar.collapsed {
    width: 5rem;
}
#sidebar.collapsed .sidebar-text, #sidebar.collapsed .sidebar-arrow, #sidebar.collapsed .app-name-wrapper {
    display: none;
}
#sidebar.collapsed .nav-item, #sidebar.collapsed [id$="-toggle"] {
    justify-content: center;
}
#sidebar.collapsed .submenu {
    display: none !important;
}
.sidebar-icon {
    width: 1.25rem; /* w-5 */
    margin-right: 0.75rem; /* mr-3 */
    text-align: center;
}
#sidebar.collapsed .sidebar-icon {
    margin-right: 0;
}

.running-text-container {
    background-color: #1e40af; /* blue-800 */
    color: white;
    padding: 0.5rem;
    overflow: hidden;
    white-space: nowrap;
}
.running-text-content {
    display: inline-block;
    padding-left: 100%;
    animation: marquee 20s linear infinite;
}
@keyframes marquee {
    0%   { transform: translate(0, 0); }
    100% { transform: translate(-100%, 0); }
}
.tab-content { display: none; }
.tab-content.active { display: block; }
.tab-btn.active { 
    border-color: #3b82f6;
    color: #3b82f6;
}


/* ======================================================================= */
/* ================== CSS BARU UNTUK PRINT TRANSKRIP ===================== */
/* ======================================================================= */
@media print {
    body * {
        visibility: hidden;
    }
    #printable-transcript, #printable-transcript * {
        visibility: visible;
    }
    #printable-transcript {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }
    .no-print {
        display: none !important;
    }
    .page-break {
        page-break-after: always;
    }
    .transcript-page {
        font-family: 'Times New Roman', Times, serif;
        color: #000;
        padding: 2cm; /* Margin halaman */
    }
    .transcript-header {
        text-align: center;
        font-weight: bold;
    }
    .transcript-header .line1 {
        font-size: 16pt;
    }
    .transcript-header .line2 {
        font-size: 18pt;
    }
    .transcript-lampiran-info {
        text-align: right;
        margin-top: 2cm;
        font-size: 12pt;
    }
    .transcript-student-info {
        margin-top: 1cm;
        margin-left: 2cm;
        font-size: 12pt;
    }
    .transcript-student-info table td {
        padding: 2px 8px;
    }
    .transcript-title {
        text-align: center;
        margin-top: 1cm;
        margin-bottom: 0.5cm;
    }
    .transcript-title h3 {
        font-size: 14pt;
        font-weight: bold;
        text-decoration: underline;
    }
    .transcript-title p {
        font-size: 12pt;
    }
    .transcript-table {
        width: 100%;
        border-collapse: collapse;
        font-size: 12pt;
        margin-top: 1cm;
    }
    .transcript-table th, .transcript-table td {
        border: 1px solid black;
        padding: 5px;
        text-align: center;
    }
    .transcript-table td:nth-child(2) {
        text-align: left;
    }
    .transcript-signatures {
        margin-top: 2cm;
        font-size: 12pt;
    }
    .signature-block {
        width: 45%;
        text-align: center;
    }
    .signature-block .name {
        font-weight: bold;
        text-decoration: underline;
        margin-top: 2cm;
    }
}
@page {
    size: A4;
    margin: 0;
}
/* ======================================================================= */
/* ===================== AKHIR DARI CSS PRINT TRANSKRIP ================== */
/* ======================================================================= */