/* Layout matches Dev Tools */
.dev-layout { display: flex; gap: 20px; min-height: 75vh; }
.dev-sidebar { flex-shrink: 0; width: 180px; display: flex; flex-direction: column; gap: 5px; border-right: 1px solid var(--border); padding-right: 15px; }
.dev-content { flex-grow: 1; background: var(--bg-panel); padding: 25px; border-radius: 12px; border: 1px solid var(--border); display: flex; flex-direction: column; min-width: 0; }

.sidebar-btn { background: transparent; text-align: left; padding: 12px 15px; border: 1px solid transparent; color: var(--text-muted); cursor: pointer; border-radius: 8px; font-weight: 600; transition: all 0.2s ease; font-size: 14px; }
.sidebar-btn:hover { background: rgba(255,255,255,0.05); color: white; }
.sidebar-btn.active { background: var(--primary); color: white; box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3); }

/* --- TABS VISIBILITY --- */
.sub-tab { 
    display: none; /* Hidden by default */
    height: 100%; 
    flex-direction: column; 
}
.sub-tab.active { 
    display: flex; /* Only show active */
    animation: fadeIn 0.3s; 
}

.header-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; padding-bottom: 15px; border-bottom: 1px solid var(--border); }
.header-row h3 { margin: 0; font-size: 18px; color: white; }

/* --- Upload Box --- */
.upload-box {
    border: 2px dashed var(--border);
    border-radius: 12px;
    padding: 50px 20px;
    text-align: center;
    cursor: pointer;
    background: rgba(15, 23, 42, 0.3);
    transition: all 0.3s ease;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}
.upload-box:hover { border-color: var(--primary); background: rgba(59, 130, 246, 0.05); transform: translateY(-2px); }
.upload-box span { font-weight: 700; color: var(--text-main); font-size: 16px; display: block; }
.upload-box span::before { content: '📂'; display: block; font-size: 32px; margin-bottom: 10px; }

/* --- PDF Viewer --- */
.pdf-container { flex-grow: 1; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; height: 100%; min-height: 600px; background: #2d2d2d; position: relative; }
.pdf-embed { width: 100%; height: 100%; border: none; display: block; }

/* --- File List --- */
.file-list { list-style: none; padding: 0; margin: 0 0 20px 0; max-height: 400px; overflow-y: auto; }
.file-list li { background: #0f172a; border: 1px solid var(--border); padding: 12px 15px; margin-bottom: 8px; border-radius: 8px; display: flex; justify-content: space-between; align-items: center; font-size: 13px; transition: transform 0.2s; }
.file-list li:hover { transform: translateX(5px); border-color: var(--text-muted); }
.file-list li span:first-child { font-weight: 600; color: #e2e8f0; display: flex; align-items: center; gap: 8px; }

/* --- Form Controls --- */
.form-group label { color: var(--text-muted); font-size: 12px; font-weight: bold; margin-bottom: 8px; display: block; }
.form-group input { width: 100%; background: #0f172a; border: 1px solid var(--border); padding: 12px; color: white; border-radius: 6px; font-family: 'JetBrains Mono', monospace; box-sizing: border-box; }
.form-group input:focus { outline: none; border-color: var(--primary); }

.hidden { display: none !important; }

@media (max-width: 768px) {
    .dev-layout { flex-direction: column; }
    .dev-sidebar { width: 100%; flex-direction: row; overflow-x: auto; border-right: none; border-bottom: 1px solid var(--border); padding-bottom: 10px; padding-right: 0; }
    .sidebar-btn { white-space: nowrap; padding: 8px 12px; }
    .pdf-container { height: 400px; }
}