:root {
    --bg-main: #f4f6f9;
    --bg-white: #ffffff;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --primary: #e91750;
    --primary-light: #fff0f3;
    --accent-blue: #1a73e8;
    --accent-blue-light: #e8f0fe;
    --border-color: #e2e8f0;
}

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

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

/* Menghapus paksa dekorasi link HTML jadul di seluruh aplikasi */
a {
    text-decoration: none !important;
    color: inherit;
}

/* NAVBAR / HEADER */
.navbar { background: var(--bg-white); border-bottom: 1px solid var(--border-color); padding: 12px 24px; display: flex; align-items: center; justify-content: space-between; z-index: 10; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo { background: var(--primary); color: white; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 8px; font-weight: bold; font-size: 18px; }
.brand-title h1 { font-size: 16px; font-weight: 700; color: var(--text-dark); }
.brand-title p { font-size: 11px; color: var(--text-muted); }

.search-wrapper { flex: 1; max-width: 450px; margin: 0 20px; position: relative; }
.search-wrapper input { width: 100%; padding: 8px 16px 8px 36px; border: 1px solid var(--border-color); border-radius: 20px; background: #f8fafc; font-size: 13px; outline: none; transition: 0.2s; }
.search-wrapper input:focus { border-color: var(--accent-blue); background: var(--bg-white); }
.search-wrapper::before { content: '🔍'; position: absolute; left: 14px; top: 8px; font-size: 12px; }

.nav-actions { display: flex; align-items: center; gap: 12px; }
.btn { padding: 8px 16px; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; border: none; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.btn-outline { background: var(--primary-light); color: var(--primary); border: 1px solid rgba(233,23,80,0.2); }
.btn-primary { background: var(--primary); color: white; }
.user-profile { display: flex; align-items: center; gap: 10px; margin-left: 10px; padding-left: 15px; border-left: 1px solid var(--border-color); }
.avatar { width: 32px; height: 32px; background: #ffe4e6; color: var(--primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 12px; }
.user-info font { font-size: 12px; font-weight: 600; display: block; }
.user-info a { font-size: 10px; color: var(--primary); }

/* MAIN LAYOUT */
.app-layout { display: flex; flex: 1; height: calc(100vh - 61px); overflow: hidden; }

/* KOLOM 1: SIDEBAR FOLDER */
.sidebar-left { width: 260px; background: var(--bg-white); border-right: 1px solid var(--border-color); overflow-y: auto; padding: 20px 12px; flex-shrink: 0; }
.section-title { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--text-muted); letter-spacing: 0.5px; margin-bottom: 12px; display: flex; justify-content: space-between; padding: 0 8px; }
.badge-count { background: #f1f5f9; color: var(--text-muted); padding: 2px 6px; border-radius: 10px; font-size: 10px; }

.tree-list { list-style: none; padding-left: 12px; margin: 4px 0; }
.sidebar-left > .tree-list { padding-left: 0; }
.tree-item { display: flex; align-items: center; justify-content: space-between; padding: 8px; border-radius: 6px; margin-bottom: 2px; }
.tree-item:hover { background-color: #f8fafc; }
.tree-item.active { background-color: #fffbeb; border-left: 3px solid #f59e0b; padding-left: 5px; }
.tree-item.active a { color: #b45309; font-weight: 600; }
.tree-link-wrapper { display: flex; align-items: center; gap: 8px; font-size: 13px; flex: 1; min-width: 0; }
.tree-link-wrapper span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pdf-count-badge { font-size: 10px; color: var(--text-muted); background: #f1f5f9; padding: 1px 5px; border-radius: 4px; }

/* KOLOM 2: LIST FILE MIDDLE */
.main-files-list { width: 340px; background: var(--bg-white); border-right: 1px solid var(--border-color); overflow-y: auto; display: flex; flex-direction: column; flex-shrink: 0; }
.folder-header { padding: 20px; border-bottom: 1px solid var(--border-color); }
.folder-header h2 { font-size: 16px; font-weight: 700; }
.folder-desc { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.breadcrumb { background: #f8fafc; padding: 6px 12px; border-radius: 6px; font-size: 11px; margin-top: 10px; color: var(--text-muted); font-family: monospace; }

.file-cards-container { flex: 1; overflow-y: auto; }

/* BARIS FILE PREMIUM MODERN */
.file-card-row { 
    display: flex; 
    align-items: center; 
    padding: 14px 20px; 
    border-bottom: 1px solid #f8fafc; 
    transition: 0.15s; 
    background: #ffffff;
}
.file-card-row:hover { background-color: #f8fafc; }
.file-card-row.selected { background-color: var(--accent-blue-light); border-left: 4px solid var(--accent-blue); padding-left: 16px; }

.file-icon-svg { margin-right: 12px; color: var(--primary); display: flex; align-items: center; }
.file-info-block { flex: 1; min-width: 0; }
.file-title { font-size: 13px; font-weight: 500; color: #334155; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-card-row.selected .file-title { color: var(--accent-blue); font-weight: 600; }
.file-size-text { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* KOLOM 3: PREVIEW PANEL KANAN (DI-MAKSIMALKAN) */
.preview-panel { 
    flex: 1; 
    background: #f8fafc; 
    display: flex; 
    flex-direction: column; 
    overflow: hidden; 
    height: 100%; 
}
.preview-nav { background: #f1f5f9; padding: 12px 20px; border-bottom: 1px solid var(--border-color); font-size: 12px; display: flex; justify-content: space-between; align-items: center; }
.preview-iframe { 
    flex: 1; 
    width: 100%; 
    height: 100%; 
    border: none; 
    background: #525659; /* Memberi kontras gelap premium di sekitar kertas PDF */
}

/* EMPTY STATES */
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; padding: 40px; text-align: center; color: var(--text-muted); }
.empty-state .icon { font-size: 56px; margin-bottom: 16px; opacity: 0.4; }
.empty-state h4 { font-size: 15px; font-weight: 700; color: var(--text-dark); margin-bottom: 6px; }
.empty-state p { font-size: 12px; max-width: 250px; line-height: 1.5; }

/* LOGIN PAGE */
.login-body { background: #f1f5f9; display: flex; align-items: center; justify-content: center; height: 100vh; }
.login-card { background: white; padding: 35px; border-radius: 12px; width: 100%; max-width: 400px; box-shadow: 0 10px 25px rgba(0,0,0,0.05); border: 1px solid var(--border-color); }
.login-card h2 { font-size: 20px; font-weight: 700; margin-bottom: 6px; text-align: center; }
.login-card p { font-size: 13px; color: var(--text-muted); text-align: center; margin-bottom: 24px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 12px; font-weight: 600; margin-bottom: 6px; color: #475569; }
.form-group input { width: 100%; padding: 10px 14px; border: 1px solid var(--border-color); border-radius: 8px; font-size: 13px; outline: none; }
.form-group input:focus { border-color: var(--primary); }
.btn-login { width: 100%; padding: 11px; background: var(--primary); color: white; border: none; border-radius: 8px; font-weight: 600; cursor: pointer; font-size: 14px; margin-top: 10px; }