:root {
    --primary: #2563EB; /* Bright Blue */
    --primary-hover: #1D4ED8; /* Darker Blue */
    --secondary: #EFF6FF; /* Very light blue background */
    --bg: #F1F5F9; /* Slate 100 - Admin background */
    --card-bg: #FFFFFF; /* Pure white */
    --text-main: #1E293B; /* Slate 800 - dark text */
    --text-muted: #64748B; /* Slate 500 */
    --border: #E2E8F0; /* Slate 200 */
    
    --sidebar-width: 260px;
    --sidebar-bg: #1E293B; /* Dark slate for sidebar */
    --sidebar-text: #F8FAFC;
    --sidebar-hover: #334155;
    
    --topbar-height: 64px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    transition: all 0.3s ease;
}

.sidebar-header {
    min-height: var(--topbar-height);
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem; /* Padding lebih besar agar logo bisa tampil full */
    background-color: rgba(0,0,0,0.2);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: all 0.3s ease;
}

.sidebar-header img.jamkrindo-logo {
    width: 100%;
    max-width: 200px; /* Lebar maksimal yang lebih besar agar sangat jelas */
    height: auto;
    object-fit: contain;
    transition: all 0.3s ease;
}

.sidebar-header img.jamkrindo-logo:hover {
    transform: scale(1.05);
}

.sidebar-menu {
    list-style: none;
    padding: 1rem 0;
}

.sidebar-menu li {
    margin-bottom: 0.2rem;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1.5rem;
    color: #CBD5E1;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.sidebar-menu a:hover {
    background-color: var(--sidebar-hover);
    color: #FFFFFF;
}

.sidebar-menu a.active {
    background-color: var(--sidebar-hover);
    color: #FFFFFF;
    border-left-color: #60A5FA;
}

.sidebar-menu a i {
    font-size: 1.2rem;
}

/* Main Wrapper */
.main-wrapper {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: all 0.3s ease;
}

/* Topbar */
.topbar {
    height: var(--topbar-height);
    background-color: #FFFFFF;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 90;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.menu-toggle {
    display: block; /* Selalu tampil untuk fitur minimize desktop */
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background 0.2s;
}

.menu-toggle:hover {
    background: rgba(0,0,0,0.05);
}

/* Sidebar Collapsed State (Desktop) */
body.sidebar-collapsed .sidebar {
    width: 80px;
}

body.sidebar-collapsed .main-wrapper {
    margin-left: 80px;
}

body.sidebar-collapsed .sidebar-menu span {
    display: none; /* Sembunyikan teks menu saat di-minimize */
}

body.sidebar-collapsed .sidebar-menu a {
    justify-content: center;
    padding: 1rem 0;
}

body.sidebar-collapsed .sidebar-menu a i {
    font-size: 1.5rem;
    margin: 0;
}

body.sidebar-collapsed .sidebar-header {
    padding: 1.5rem 0.5rem;
}

body.sidebar-collapsed .sidebar-header img.jamkrindo-logo {
    max-width: 50px; /* Ukuran logo mengecil saat sidebar minimize */
}

/* PPT Slider Styles */
.ppt-card {
    position: relative;
    height: calc(100vh - var(--topbar-height) - 4rem);
    display: flex;
    flex-direction: column;
}

.ppt-slides {
    flex: 1;
    position: relative;
    overflow-y: auto; /* Memastikan bisa di-scroll jika layar terlalu kecil */
    padding-right: 0.5rem; /* Memberi ruang untuk scrollbar */
}

.ppt-slide {
    display: none;
    width: 100%;
    animation: fadeInSlide 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.ppt-slide.active {
    display: block;
}

@keyframes fadeInSlide {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

.page-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
}

.topbar-right {
    display: flex;
    align-items: center;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    cursor: pointer;
}

.avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background-color: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
}

.user-profile span {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-main);
}

/* Content Area */
.content-area {
    padding: 2rem;
    flex: 1;
}

/* Tabs Content (now controlled by sidebar) */
.tab-content {
    display: none;
    animation: fadeIn 0.4s ease forwards;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Cards & Forms */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    max-width: 900px;
    margin: 0 auto;
}

h2 {
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-main);
    border-bottom: 2px solid var(--secondary);
    padding-bottom: 0.8rem;
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-main);
    font-weight: 600;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

input, select {
    width: 100%;
    padding: 0.85rem 1rem;
    background: #F8FAFC;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 0.95rem;
    transition: all 0.2s;
    outline: none;
}

input:focus, select:focus {
    background: #FFFFFF;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

option {
    background: #FFFFFF;
    color: var(--text-main);
}

small {
    display: block;
    margin-top: 0.4rem;
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Buttons */
.btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.primary-btn {
    background: var(--primary);
    color: white;
    width: 100%;
    margin-top: 1rem;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2), 0 2px 4px -1px rgba(37, 99, 235, 0.1);
}

.primary-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 8px -1px rgba(37, 99, 235, 0.3), 0 4px 6px -1px rgba(37, 99, 235, 0.2);
}

.secondary-btn {
    background: var(--secondary);
    color: var(--primary);
    border: 1px solid rgba(37, 99, 235, 0.2);
}

.secondary-btn:hover {
    background: #DBEAFE;
    transform: translateY(-1px);
}

/* Results */
.result-box {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--secondary);
    border-radius: 12px;
    border: 1px dashed rgba(37, 99, 235, 0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.result-label {
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 600;
}

.result-text {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--text-main);
    word-break: break-all;
    text-align: center;
    background: #FFFFFF;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    width: 100%;
}

.parse-result {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.badge {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    background: #DBEAFE;
    color: var(--primary);
    border: 1px solid #BFDBFE;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.badge.error {
    background: #FEE2E2;
    color: #DC2626;
    border-color: #FECACA;
}

.info-list {
    list-style: none;
}

.info-list li {
    padding: 0.8rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.info-list li:last-child {
    border-bottom: none;
}

.info-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
}

/* Responsive Tweaks */
@media screen and (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-wrapper {
        margin-left: 0;
    }
    
    .menu-toggle {
        display: block;
    }
}

@media screen and (max-width: 600px) {
    .content-area {
        padding: 1rem;
    }
    
    .card {
        padding: 1.5rem 1rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .result-text {
        font-size: 1.2rem;
    }
}
